diff --git a/.gitignore b/.gitignore index 36361d12..64717e09 100644 --- a/.gitignore +++ b/.gitignore @@ -28,12 +28,10 @@ crash-reports/ *.iws *.classpath *.project +*.launch # Specific files Thumbs.db usernamecache.json options.txt -BloodMagic_Client.launch -BloodMagic_Server.launch - usercache.json diff --git a/.settings/BloodMagic1.8IDEA.jar b/.settings/BloodMagic1.8IDEA.jar deleted file mode 100644 index 839031f4..00000000 Binary files a/.settings/BloodMagic1.8IDEA.jar and /dev/null differ diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..e8895216 --- /dev/null +++ b/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir= +eclipse.preferences.version=1 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 4e2ae6b4..52c66cdc 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,299 +1,392 @@ -# -#Sat Apr 02 15:31:00 EDT 2016 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_block=next_line -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=1 -org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=1 -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.use_on_off_tags=true -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.comment.format_line_comments=false -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.alignment_for_compact_if=49 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.lineSplit=600 -org.eclipse.jdt.core.compiler.source=1.6 -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line eclipse.preferences.version=1 -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=1 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=1 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=1 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=1 +org.eclipse.jdt.core.formatter.alignment_for_assertion_message=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=1 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=1 +org.eclipse.jdt.core.formatter.alignment_for_record_components=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=1 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=0 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=17 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_preserve +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=true +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=true +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.text_block_indentation=0 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs index f9b2d33a..1994e3f7 100644 --- a/.settings/org.eclipse.jdt.ui.prefs +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,12 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_BloodMagic1.8 -formatter_settings_version=12 +formatter_profile=_WayofTime-Dev +formatter_settings_version=20 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates= sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -17,29 +22,39 @@ sp_cleanup.always_use_this_for_non_static_field_access=false sp_cleanup.always_use_this_for_non_static_method_access=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false sp_cleanup.correct_indentation=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=false sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=false +sp_cleanup.merge_conditional_blocks=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=false -sp_cleanup.organize_imports=false +sp_cleanup.organize_imports=true +sp_cleanup.precompile_regex=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=false sp_cleanup.qualify_static_method_accesses_with_declaring_class=false sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=false sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=false sp_cleanup.remove_unused_imports=false @@ -48,15 +63,19 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.simplify_lambda_expression_and_method_ref=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=false sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=false sp_cleanup.use_this_for_non_static_field_access=false sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true sp_cleanup.use_this_for_non_static_method_access=false sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true -sp_cleanup.use_type_arguments=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false diff --git a/BM3 Progression.drawio b/BM3 Progression.drawio new file mode 100644 index 00000000..a37ad70e --- /dev/null +++ b/BM3 Progression.drawio @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 663795cd..c945030e 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,28 @@ -#Blood Magic: Alchemical Wizardry [![](http://cf.way2muchnoise.eu/full_blood-magic_downloads.svg)](https://minecraft.curseforge.com/projects/blood-magic) +# Blood Magic: Alchemical Wizardry [![](http://cf.way2muchnoise.eu/full_blood-magic_downloads.svg)](https://minecraft.curseforge.com/projects/blood-magic) [![Discord](https://img.shields.io/discord/259683256348311552.svg?colorB=7289DA&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAABWAgMAAABnZYq0AAAACVBMVEUAAB38%2FPz%2F%2F%2F%2Bm8P%2F9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhBxwQJhxy2iqrAAABoElEQVRIx7WWzdGEIAyGgcMeKMESrMJ6rILZCiiBg4eYKr%2Fd1ZAfgXFm98sJfAyGNwno3G9sLucgYGpQ4OGVRxQTREMDZjF7ILSWjoiHo1n%2BE03Aw8p7CNY5IhkYd%2F%2F6MtO3f8BNhR1QWnarCH4tr6myl0cWgUVNcfMcXACP1hKrGMt8wcAyxide7Ymcgqale7hN6846uJCkQxw6GG7h2MH4Czz3cLqD1zHu0VOXMfZjHLoYvsdd0Q7ZvsOkafJ1P4QXxrWFd14wMc60h8JKCbyQvImzlFjyGoZTKzohwWR2UzSONHhYXBQOaKKsySsahwGGDnb%2FiYPJw22sCqzirSULYy1qtHhXGbtgrM0oagBV4XiTJok3GoLoDNH8ooTmBm7ZMsbpFzi2bgPGoXWXME6XT%2BRJ4GLddxJ4PpQy7tmfoU2HPN6cKg%2BledKHBKlF8oNSt5w5g5o8eXhu1IOlpl5kGerDxIVT%2BztzKepulD8utXqpChamkzzuo7xYGk%2FkpSYuviLXun5bzdRf0Krejzqyz7Z3p0I1v2d6HmA07dofmS48njAiuMgAAAAASUVORK5CYII%3D)](https://discord.gg/VtNrGrs) -###Gruesome? Probably. Worth it? Definitely! -###[Downloads](http://minecraft.curseforge.com/mc-mods/224791-blood-magic/files) +### Gruesome? Probably. Worth it? Definitely! +### [Downloads](http://minecraft.curseforge.com/projects/blood-magic/files) -##Information +## Information Have you ever picked up a magic mod for Minecraft, and thought that it was too tame? Was there not enough danger involved when creating your next high-tech gadget? Bored with all of those peaceful animals just staring at you without a care in the world? Well then, I am glad you came here! Blood Magic is an arcane art that is practiced by mages who attempt to gather a vast amount of power through utilizing a forbidden material: blood. Even though it does grant a huge amount of power, every single action that is performed with this volatile magic can prove deadly. You have been warned. -##Links +## Links * Twitter: [@WayofTime](https://twitter.com/WayofTime) * Wiki: Found at [FTBWiki](http://ftbwiki.org/Blood_Magic) * [Minecraft Forum Thread](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1290532-bm) -* [Curseforge](http://minecraft.curseforge.com/mc-mods/224791-blood-magic) +* [Curseforge](http://minecraft.curseforge.com/projects/blood-magic) * [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=J7SNY7L82PQ82) * [Patreon](https://www.patreon.com/BloodMagic) -##Development Setup +## Development Setup 1. Fork this project to your own Github repository and clone it to your desktop. -2. Navigate to the directory you cloned to. Open a command window there and run `gradlew setupDevWorkspace` then (if you use Eclipse) `gradlew eclipse` or (if you use IDEA) `gradlew idea`. -3. This process will setup [Forge](http://www.minecraftforge.net/forum/), your workspace, and link [MineTweaker](http://minetweaker3.powerofbytes.com/) as a dependency. -4. Open the project in your IDE of choice. -5. Set `../src/api/java` as a source directory. +2. Navigate to the directory you cloned to. Follow the [Forge Documentation](http://mcforge.readthedocs.io/en/latest/gettingstarted/#from-zero-to-modding) (start at step 4) to setup your workspace. If you use IDEA, follow [this set](http://mcforge.readthedocs.io/en/latest/gettingstarted/#terminal-free-intellij-idea-configuration) of steps. -####IntelliJ IDEA extra steps +#### IntelliJ IDEA extra steps 1. Navigate to `File > Settings > Plugins > Browse repositories...`. Search for Lombok and install the plugin. 2. Navigate to `File > Settings > Build, Execution, Deployment > Compiler > Annotation Processors`. Check `Enable annotation processing`. @@ -33,7 +30,7 @@ Blood Magic is an arcane art that is practiced by mages who attempt to gather a [Setup video](https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be) by LexManos. For more information, refer to the [Forge Forums](http://www.minecraftforge.net/forum/index.php/topic,14048.0.html). -##Developing Addons +## Developing Addons Add to your build.gradle: @@ -49,23 +46,23 @@ Add to your build.gradle: `` can be found on CurseForge (or via the Maven itself), check the file name of the version you want. -##Custom Builds +## Custom Builds **Custom builds are *unsupported*. If you have an issue while using an unofficial build, it is not guaranteed that you will get support.** -####How to make a custom build: +#### How to make a custom build: 1. Clone directly from this repository to your desktop. 2. Navigate to the directory you cloned to. Open a command window there and run `gradlew build` 3. Once it completes, your new build will be found at `../build/libs/BloodMagic-*.jar`. You can ignore the `deobf`, `sources`, and `javadoc` jars. -##License +## License ![CCA4.0](https://licensebuttons.net/l/by/4.0/88x31.png) Blood Magic: AlchemicalWizardry by WayofTime is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/). -##Installation Instructions +## Installation Instructions This mod requires "Minecraft Forge" in order to operate. It is incredibly easy to download and set up, so might as well get to it! @@ -75,7 +72,7 @@ This mod requires "Minecraft Forge" in order to operate. It is incredibly easy t 3. Place the mod in the **mods** folder of your .minecraft. If you are unsure of where that is located, it is here: `../Users/you/AppData/roaming/.minecraft`. -##FAQ +## FAQ **Q**: My weak blood orb doesn't show my current LP! Fix it please. diff --git a/build.gradle b/build.gradle index fafe77aa..b9e99859 100644 --- a/build.gradle +++ b/build.gradle @@ -1,228 +1,199 @@ buildscript { repositories { + maven { url = 'https://files.minecraftforge.net/maven' } + jcenter() mavenCentral() - maven { url "http://files.minecraftforge.net/maven" } - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' - classpath 'org.ajoberstar:gradle-git:0.10.1' + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } - -plugins { - id "net.minecraftforge.gradle.forge" version "2.0.2" - id 'com.matthewprenger.cursegradle' version '1.0.7' - id 'io.franzbecker.gradle-lombok' version '1.6' -} - +apply plugin: 'net.minecraftforge.gradle' +// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. +apply plugin: 'eclipse' apply plugin: 'maven-publish' -def build_number = 'CUSTOM' +version = '1.16.4-3.1.0-15' +group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = 'BloodMagic' -if (System.getenv('BUILD_NUMBER') != null) - build_number = System.getenv('BUILD_NUMBER') +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. -def username = 'BloodMagicDev' +println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) +minecraft { + // The mappings can be changed at any time, and must be in the following format. + // snapshot_YYYYMMDD Snapshot are built nightly. + // stable_# Stables are built at the discretion of the MCP team. + // Use non-default mappings at your own risk. they may not always work. + // Simply re-run your setup task after changing the mappings to update your workspace. + mappings channel: 'snapshot', version: '20200916-1.16.2' + // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. + + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') -if (project.hasProperty('dev_username')) - username = "${dev_username}" + // Default run configurations. + // These can be tweaked, removed, or duplicated as needed. + runs { + client { + workingDirectory project.file('run') + + properties 'mixin.env.disableRefMap': 'true' -group = package_group -archivesBaseName = mod_name -version = "${mc_version}-${mod_version}-${build_number}" + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' -if (project.hasProperty('gitpush')) - version += "-ss" + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' -import org.ajoberstar.grgit.* + mods { + bloodmagic { + source sourceSets.main + } + } + } -ext.repo = Grgit.open(project.file('.')) -def gitHash = 'unknown' + server { + workingDirectory project.file('run') + + properties 'mixin.env.disableRefMap': 'true' -if (new File(projectDir, '.git').exists()) - gitHash = repo.log().find().abbreviatedId + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' + + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' + + mods { + bloodmagic { + source sourceSets.main + } + } + } + + data { + workingDirectory project.file('run') + + properties 'mixin.env.disableRefMap': 'true' + + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' + + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' + + args '--mod', 'bloodmagic', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + + mods { + bloodmagic { + source sourceSets.main + } + } + } + } +} repositories { - maven { url "http://dvs1.progwml6.com/files/maven" } - maven { url "http://mobiusstrip.eu/maven" } - maven { url "http://tehnut.info/maven" } - - ivy { - name "Thaumcraft" - artifactPattern "https://dl.dropboxusercontent.com/u/47135879/[module]-[revision]-deobf.[ext]" + maven { + url "http://dvs1.progwml6.com/files/maven/" } - ivy { - name "Baubles" - artifactPattern "https://dl.dropboxusercontent.com/u/47135879/[module]-1.8.9-[revision]-deobf.[ext]" + maven { + name = "The Loader" + url = "https://maven.blamejared.com" } } dependencies { - deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}" - deobfCompile "mcp.mobius.waila:Waila:${waila_version}_${mc_version}:dev" - deobfCompile "info.amerifrance.guideapi:Guide-API:${mc_version}-${guideapi_version}" - deobfCompile "info.tehnut.buttons:Buttons:${buttons_version}:api" + // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed + // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. + // The userdev artifact is a special name and will get all sorts of transformations applied to it. + minecraft 'net.minecraftforge:forge:1.16.4-35.1.37' + + // compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}:api") + // runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}") + + //deobfCompile "mezz.jei:jei_${minecraft_version}:${jei_version}" + + compileOnly fg.deobf("mezz.jei:jei-1.16.2:7.1.3.19:api") + runtimeOnly fg.deobf("mezz.jei:jei-1.16.2:7.1.3.19") + + compileOnly fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}:api") + runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}") + + compileOnly fg.deobf("com.blamejared.crafttweaker:CraftTweaker-1.16.4:7.1.0.84") + + // You may put jars on which you depend on in ./libs or you may define them like so.. + // compile "some.group:artifact:version:classifier" + // compile "some.group:artifact:version" + + // Real examples + // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env + // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env + + // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. + // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' + + // These dependencies get remapped to your current MCP mappings + // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' + + // For more info... + // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html + // http://www.gradle.org/docs/current/userguide/dependency_management.html -// compile name: "Thaumcraft", version: "${mc_version}-${thaumcraft_version}", ext: "jar" -// compile name: 'Baubles', version: "${baubles_version}", ext: 'jar' } -minecraft { - version = "${mc_version}-${forge_version}" - runDir = "run" - - replace "@VERSION@", project.version - replaceIn "Constants.java" - - clientRunArgs += "--username=${username}" - - if (project.hasProperty('mappings_version')) - mappings = project.mappings_version -} - -processResources { - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - - from(sourceSets.main.resources.srcDirs) { - include '**/*.info' - include '**/*.properties' - - expand 'version': project.version, 'mcversion': project.minecraft.version - } - - from(sourceSets.main.resources.srcDirs) { - exclude '**/*.info' - exclude '**/*.properties' - } -} - -if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - } -} - -lombok { - version = "1.16.6" - sha256 = "e0a471be03e1e6b02bf019480cec7a3ac9801702bf7bf62f15d077ad4df8dd5d" -} - -import io.franzbecker.gradle.lombok.task.DelombokTask - -task delombok(type: DelombokTask) { - args("src/main/java", "-d", "build/sources/delomboked/java") -} - -task delombokHelp(type: DelombokTask) { - args "--help" -} - -tasks.eclipse.dependsOn installLombok - +// Example for how to get properties into the manifest for reading by the runtime.. jar { - classifier = '' - manifest.mainAttributes( - "Built-By": System.getProperty('user.name'), - "Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})", - "Implementation-Title": project.name, - "Implementation-Version": project.version, - "Git-Hash": gitHash, - "Built-On": "${mc_version}-${forge_version}" - ) + manifest { + attributes([ + "Specification-Title": "bloodmagic", + "Specification-Vendor": "bloodmagicsareus", + "Specification-Version": "1", // We are version 1 of ourselves + "Implementation-Title": project.name, + "Implementation-Version": "${version}", + "Implementation-Vendor" :"bloodmagicsareus", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) + } +} + +// Example configuration to allow publishing using the maven-publish task +// This is the preferred method to reobfuscate your jar file +jar.finalizedBy('reobfJar') +// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing +//publish.dependsOn('reobfJar') + +sourceSets.main.resources { + srcDir 'src/generated/resources' +} + +task srcJar(type: Jar) { + from(sourceSets.main.java) + classifier = 'sources' } -// API jar task apiJar(type: Jar) { - from sourceSets.main.allSource - from sourceSets.main.output - include 'WayofTime/bloodmagic/api/**/*' + from(sourceSets.main.allJava) + from(sourceSets.main.output) + include 'wayoftime/bloodmagic/api/**' + classifier = 'api' } -// Javadoc jar -task javadocJar(type: Jar, dependsOn: javadoc) { - from javadoc.destinationDir - classifier = 'javadoc' -} - -javadoc { - source = projectDir.path + "/build/sources/delomboked/java" -} - -tasks.javadoc.dependsOn delombok -tasks.build.dependsOn javadoc, javadocJar, apiJar - -tasks.withType(JavaCompile) { task -> - task.options.encoding = 'UTF-8' +artifacts { + archives srcJar, apiJar } publishing { - tasks.publish.dependsOn 'build' publications { mavenJava(MavenPublication) { artifact jar - artifact javadocJar - artifact sourceJar + artifact srcJar artifact apiJar } } repositories { - if (project.hasProperty('maven_repo')) { - maven { url maven_repo } - } else { - mavenLocal() + maven { + url "file:///${project.projectDir}/mcmodsrepo" } } -} - -String getChangelogText() { - def changelogFile = new File('changelog.txt') - String str = '' - String separator = '---' - int lineCount = 0 - boolean done = false - changelogFile.eachLine { - if (done || it == null) { - return - } - if (lineCount < 3) { - lineCount++ - if (it.startsWith(separator)) {return} - } - if (!it.startsWith(separator)) { - str += "$it" + (lineCount < 3 ? ':\n\n' : '\n') - return - } - done = true // once we go past the first version block, parse no more - } - return str -} - -def curseRelations = { - optionalLibrary 'just-enough-items-jei' - optionalLibrary 'waila' - requiredLibrary 'guide-api' -} - -curseforge { - if (project.hasProperty('curse_key_WayofTime')) - apiKey = project.curse_key_WayofTime - - project { - id = "${curse_id}" - changelog = getChangelogText() - releaseType = 'beta' - - relations curseRelations - addGameVersion '1.10' - addGameVersion '1.10.2' - - addArtifact javadocJar - addArtifact sourceJar - addArtifact apiJar - } -} +} \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 29eca95e..e9b9c9ee 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,690 @@ +------------------------------------------------------ +Version 3.1.0 +------------------------------------------------------ +- Majorly refactored the progression of the mod. Instead of starting with a Snare, you instead start by crafting the Blood Altar. The changes are documented in the guide, and you can follow its "Getting Started" entry! + +- Changed the tooltips so that they are gray, more easily differentiating them from the name of the item. +- Added the Sigil of Holding +- Changed the crafting of Tartaric Gems so that you no longer need to use the previous tier gem in the gem slot. +-> The Hellfire Forge will now syphon from the gem in the crafting table first, and all unused will from the consumed gem will be placed in the crafted gem. + +- Changed the GUI for the Alchemy Table +-> You can now select which sides that an input/output slot is accessible from. Click on the slot you wish to change, then click on the directional toggle buttons. + +- Fixed Plunderer's Glint not properly applying the Looting level. +- Also fixed a NPE crash due to Iron Tip. Fixes some crashes due to mods using the ItemUsedFinish event. + +- Fixed the Blood Altar not being able to input fluids. About time, Way! +- Added new Explosive Charges +-> Fungal Charge, which is very useful for giant mushrooms and nether mushrooms +-> Controlled Charge, which will destroy only blocks that match the block it is placed on. +- Added the ability to apply a few select Anointments to the charges. Only one can be applied to a charge at a time. +-> Soft Touch, Fortuna, and Smelting + +- Fixed the Living Armour so that you cannot use an upgrade tome to usurp the point cap. +-> Fixed "Strong Legs" so that it no longer runs the program "CrunchyLegs.exe" - as a result, you no longer suffer fall damage from jumping on the same level. +-> Removed the direct fall damage mitigation from "Strong Legs" + +- Added two types of Throwing Daggers to the Blood Mage's offensive kit. +-> Iron Throwing Dagger +-> Syringe Throwing Dagger + +- Refactored the guide so that it provides +2 to awesomeness. + + +------------------------------------------------------ +Version 3.0.6 +------------------------------------------------------ +- Reimplemented the Well of Suffering. +- Added several new items, called "Anointments"! These are items that provide temporary buffs to your tools and weapons, such as silk touch, higher damage, and more! Look them up in the Utility section of the book. These include: + - Honing Oil + - Soft Coating + - Fortuna Extract + - Holy Water + - Miner's Secrets + - Dexterity Alkahest + - Iron Tip + - Plunderer's Glint + - Slow-burning Oil + +------------------------------------------------------ +Version 3.0.5 +------------------------------------------------------ +- Fixed a crash with the Blood Altar because I am dumb. +- Also fixed the recipe for the Day array. Now you don't need to clean your clocks! + +------------------------------------------------------ +Version 3.0.4 +------------------------------------------------------ + +- Added two new explosives: + - The Shaped Charge, which will break a 5x5x5 volume when placed + - The Deforester Charge, which can chop down a tree up to a maximum of 128 logs. + - (Both explosives drop all blocks affected, and do not cause further environmental nor entity damage.) + +- Added new alchemy arrays: + - Two arrays, which changes the current daylight cycle to day and night. Recipes are temp. + +- Fixed the following Living Armour upgrades so that they are now obtainable: + - Experienced + - Body Builder + +- Fixed Living Armour not upgrading under certain conditions. + +- Fixed the two rituals involving Living Armour so that they are properly activatable using a Weak Activation Crystal. + +- Fixed NPE in Blood Altar when trying to interact with the contained Fluids +- Also fixed bug that prevented the Altar from accepting fluids piped in as inputs. +- Fixed a client-side crash when right clicking the ground with a Lava Crystal when on a server - now properly makes a fire without consuming the client. + +- Fixed the JEI so that it no longer ouputs an error when loading Alchemy Array recipes without a crafting output. +- Fixed crash with Actually Additions + + +------------------------------------------------------ +Version 3.0.3 +------------------------------------------------------ + +- Updated the Sanguine Scientiem - it's very well written! Special thanks to both VT-14 and Wrince for their long hours of effort to make this book better than I could have done! +- Fixed a crash with the Living Armour when crafted and worn right after enchanting. + + + +------------------------------------------------------ +Version 3.0.2 +------------------------------------------------------ + +Readded the Living Armour. Currently only with a few upgrades, and no downgrades. + - Pin Cushion + - Soft Fall + - Tough + - Strong Legs (Now can be temporarily deactivated when jumping by sneaking) + - Healthy + - Experienced + - Charging Strike + - Tough Palms + - Quick Feet + - Poison Resistance + - Gift of Ignis + - Dwarven Might + - Body Builder + +Reimplemented the following rituals: + - Resonance of the Faceted Crystal + - Crack of the Fractured Crystal + - Reap of the Harvest Moon + - Ritual of the Shepherd + - Ritual of the Green Grove + - Focus of the Ellipsoid + - Sound of the Cleansing Soul + - Ritual of Living Evolution + +------------------------------------------------------ +Version 3.0.1 +------------------------------------------------------ + +- Reimplemented the Incense Altar with all appropriate blocks. +- Added guide entries for the Incense Altar and Blood Altar. Other misc entries added, too. +- Fixed a server-related crash on the client on the Sigil of the Green Grove. +- Added ore processing to Ancient Debris. +- Readded the other Sentient Tool types (with one more on the way). +- Added a few WIP items that cannot be used yet - they're part of the D*$)@ D*#@(@* system that I'm adding for Tier 4. +- Added the API - It's still in flux, so expect it to change very soon! +- Probably forgot something important. +- Fixed a crash for the Lava Crystal that made it blow up the Client if used on a server. No, that was not the intended purpose! +- Added the Ritual Tinkerer for Rituals. +- Added the "Tome of Peritia" again - stores EXP. + + +------------------------------------------------------ +Version 2.4.3 +------------------------------------------------------ + +- Fixed Lava Crystals causing crash when used while not yet bound +- Fixed Teleposers sending entities at the destination position the wrong way +- Fixed Speed Runes not working on Tier 2 altars +- Fixed crash when checking tasks for some entities +- Fixed crash when checking some entities for potion effects +- Re-implemented the Boost potion + - The PR still had TODOs in the description when I merged so this may not be complete yet + +------------------------------------------------------ +Version 2.4.2 +------------------------------------------------------ +Now with no guarantees for working textures! + +Blood Altar: + - A Blood Altar with a Redstone Lamp below it will now emit a redstone signal upon finishing crafting (#1635) + - Fixed Blood Altar being able to obtain negative progress (#1649) + +Living Armor: + - Fixed Storm Trooper Level 4 costing 65 instead of -65 upgrade points (#1631) + +Rituals: + - Fixed Ritual of the Eternal Soul (Ritual Stone layout & didn't work) (#1633) + - Fixed Ritual Tinkerer (ritual area is now unique per ritual instance), added the ability to reset the ritual ranges to default (#1636) + +Misc: + - Lava Crystals can now set things on fire (#1652) + - Fixed parts of the German translation. Other translations still need to be reworked to accomodate changed translation keys (#1640) + - Fixed Guidebook showing wrong recipes (Rune of Self-Sacrifice instead of others) (#1641) + - Wooden Paths now behave like wood instead of stone (sound & efficient tool) (#1638) + + +Technical Stuff: + - Fixed Veil of Evil and Ward of Sacrosanctity console spam (which could eventually lead to an out of memory exception) (#1639) + - Fixed GLSL shader compilation errors (affected Mesa driver (AMD GPU) on Linux) (#1624) + - Fixed `/bloodmagic network` command permissions (#1613) + - Fixed a rare crash that could occur when summoning mobs (#1618) + +------------------------------------------------------ +Version 2.4.1 +------------------------------------------------------ + +Nut was too lazy to create a changelog, it's AEon's turn now! +Changes made from Feb 02 - now (Fill end date in later) + + +Living Armor: + - Fixed "Soft Fall" not preventing damage + - "Nocturnal Prowess" should not flash anymore + - "Trickshot" now ignores HurtResistanceTime + - "Trickshot" now works properly with sentient arrows + - "Step Assist" does not take effect while sneaking + +Sentient Bow: + - Fixed Destructive Will arrows exploding continuously + - Fixed Tipped Arrows getting improved even if no Will can be used + +Sigils: + - Buffed "Sigil of the Fast Miner" to be in accordance to the "Sanguine Scientium" + - Fixed a bug where "Sigil of the Fast Miner" would also cause the whirlwind effect + - Added "Whirlwind" to the potion registry + - Fixed broken Sigil tooltip formatting + - Fixed Sigil of Holding not updating some Sigil data, allowing for exploits + - Greatly improved "Sigil of Compression" performance + - Fixed "Sigil of Compression" bug that would eat leftover items (usually everything between 55 and 64 items for a 3x3 compression) + + +Rituals: + - Ported Veil of Evil & Ward of Sacrosanctity + - Fixed "Serenade of the Nether" replacing lava source blocks with lava (fixed underlying function to detect flowing liquids) + - Added configurability to Ritual of the High Jump by modifying a new ritual area with the Ritual Tinkerer + +Misc: + - Fixed routing node oredict filter (crashes) + - Fixed mimic vanishing in some cases + - Fixed "Blood Letter's Pack" and "Coat of Arms" always being used in the main hand slot (action bar/hotbar) + - Stop insertions into Demon Crucible if the inventory is not empty + - Fixed abnormal deaths at your own hands through the sacrificial dagger (hopefully) (Gravestone bugginess) + - Fixed "Unmending" mod incompatibility + - Fixed Teleposers crashing the game if someone force-fed it junk + - added Nut being angery at contributors for messing stuff up + - Added some Russian language strings for the guide book + - Added repair recipes for Sentient Tools & Living Armor to JEI + - Many translation keys have changed which makes affected translations fall back to english + +Technical Stuff no player cares about: + - Formatted Project code + - Fixed BlockState parsing (mimic vanishing) + - Fixed some and streamlined ritual block ranges + - Mystery drain still mysterious + - Use TextFormatting rather than color codes in block lang names + - Fixed world unload crash (may happen if a world is loaded by world generators or JEI Resource graphing) + - Fixed `/bloodmagic network get` command + - Added translation keys for tickethistory command help strings + +------------------------------------------------------ +Version 2.4.0 +------------------------------------------------------ + +It's been a while, eh? Some of you may be asking yourself "whats up with bloodmagic" like that damned recon on a certain +social media site. Well here's what's up: put something snarky here when done writing changelog + +There's so much here, I'm probably going to miss some. Here's a general overview from just skimming commit titles. + +Much of this was done via PR because I'm ~~lazy~~ too busy having fun with Fabric. + +- Fixed harvest moon not working with pumpkins +- [API] Added a way to unregister an altar component +- Moved anything related to Tier 6 behind an opt-in config. Please stop asking me how to get it. +- Fixed small demon stone bricks recipe so it returns 4 instead of 1 +- Ported some old rituals from 1.7 + - Cry of the Eternal Soul + - Reverence of the Condor + - Ritual of the Feathered Earth +- Added a new ritual, Ritual of Grounding +- Optimized bound tool harvesting +- Fixed render issues with demon crystals +- Fixed Hymn of Syphoning not updating some tanks visually +- Added very basic documentation for several rituals to the guide book +- Made meteor costs for Mark of the Falling Tower configurable in the meteor json +- Fluid related sigils should now work identically to buckets of the fluid +- Fixed ritual tinkerer area setting behaving wonkily +- Fixed Seer Sigil not working for incense altars +- Added the ability to buff movement and updraft arrays by providing more of their ingredient +- Ported the ritual dismantler from 1.7.10 +- Logic fix for the Solar Powered + - Now it requires a clear line of sight to the sky as well as it being day time +- Fixed Sigil of Magnetism AOE being offset from the player +- Rewrote commands + - They're different in some way, some how + - Don't ask me how +- Quality of life improvements for the ritual tinkerer +- Changed the activation crystal levels of some rituals to use the awakened crystal + - Mark of the Falling Tower + - All the living armor ones + - It's late and I'm tired don't hate me for being too lazy to look up their names +- Fixed up some bounding boxes for some blocks with fancier models +- Sentient Bow now properly handles modded and potion-ified arrows + +I can't wait for this to turn out to be very broken so I can yell at the contributor :> + +------------------------------------------------------ +Version 2.3.3 +------------------------------------------------------ + +- Fixed Altars not filling orbs of their own tier + +------------------------------------------------------ +Version 2.3.2 +------------------------------------------------------ + +looky bois, we beta now + +- Fixed Sentient Sword attacking mobs and players without being provoked +- Fixed weird Crystal Clusters being weird + - They are now less weird +- Fixed Ritual Reader and Tinkerer not being in the creative tab +- Fixed an NPE that would happen with some blocks in the Ritual of Magnetism's area of effect +- Fixed Mimics not being able to replace blocks during placement +- Fixed issues with inter-dimensional teleportation + - Teleposers and Teleposition Sigils are now fully functional +- Fixed custom arrows not having their effects when fired from the Sentient Bow +- Fixed Splash Potions being unthrowable while Living Armor had the quenched downgrade +- Fixed Ritual Stones being considered Iron instead of Rock +- Fixed the Lava, Water, and Void sigils so they now work properly with tanks +- Fixed an issue where the Teleposer would attempt to damage an offline player +- Fixed the Compression Sigil so it now functions +- Fixed low tier altars being able to fill high tier orbs +- Fixed Sentient Tools having the wrong material +- Fixed Sentient Tools not having a repair material + - It is now demon crystals +- Added a config to disable mob drops from mobs killed by the Well of Suffering +- Added an additional glow to the Dagger of Sacrifice when it has a full incense bonus +- Reworked the Phantom Bridge +- Updated german translation +- Updated chinese translation + +------------------------------------------------------ +Version 2.3.1 +------------------------------------------------------ + +- Fixed Ritual of Magnetism not being registered +- Fixed Mob Sacrifice Array so it no longer kills bosses and players +- Fixed Will type serializer using lowercase names +- Fixed item rendering for the Sigil of Holding HUD +- Added mod id to command localization keys to prevent potential conflicts + +------------------------------------------------------ +Version 2.3.0 +------------------------------------------------------ + +- Fixed Basic Cutting Fluid recipe so it no longer requires an unobtainable potion +- Fixed Teleposer Blacklist not working +- Fixed the bounding box on the Blood Tank +- Fixed crafted Inscription Tools not having their uses tag applied +- Fixed JEI queries with bound Blood Orbs +- Fixed Crushing Ritual not passing a valid player +- Fixed Mending applying to Potion Flasks +- Fixed Teleposition Sigil not checking for a Teleposer at it's destination +- Fixed Lava Crystal not syphoning LP +- Fixed the Laputa array moving unbreakable blocks + - ie: Bedrock +- Fixed the Ritual of the Green Grove not working on Cactus and Reeds +- Added a Mob Sacrifice array +- Updated the HUD system + - You can now edit the HUD layout via the in-game config editor with a drag'n'drop system. + - This screen is only available while in a world. +- Updated the German translation +- Updated the Chinese translation +- [API] Reworked how rituals are registered + - This will break any addons that work with rituals + - If you report an issue to me regarding broken addons, it will be closed without any comment + +------------------------------------------------------ +Version 2.2.12 +------------------------------------------------------ +- Fixed Hellfire Forge and Alchemy Table's shape-crafted-ness. +- Fixed Cutting Fluids so they now work properly. +- Fixed the Fluid filters so that they now work perfectly in the routing system. +- Fixed the Living Armour Upgrade that provides night vision, so it is no longer as finicky. +- Proved that Way could update the version number properly without being told by the maid. + +------------------------------------------------------ +Version 2.2.11 +------------------------------------------------------ +- Fixed the Alchemy Array from voiding items when broken when it shouldn't have. +- Fixed Blood Tank NBT transfer between item/tile form. +- Made sure to not offend TehNut's sensibilities :NutMaid: + +------------------------------------------------------ +Version 2.2.10 +------------------------------------------------------ +- Fixed Turret Array crash on servers. +- Fixed the Blood Altar so it can actually fill Blood Orbs (derp). + +------------------------------------------------------ +Version 2.2.9 +------------------------------------------------------ +- Fixed stupid NPE in the Furnace Array +- Fixed various issues with the Alchemy Table: + - Now works for recipes that require an LP cost. + - Hoppers no longer lose items when items are placed into the "slave" Alchemy Table who has some slots restricted. +- Added an entry to the book that explains you can, in fact, use Sea Lanterns instead of glowstone blocks for your Tier 3 altar. +- Fixed the Demon Will crystals growing when they shouldn't. Also lowered the time between natural crystal growths in Will-enriched areas. + - Side note: who's bright idea was it to have to wait 15 minutes per crystal growth? +- Added the "Resonance of the Faceted Crystal", which can be used to create your first aspected Will crystal clusters. +- Made it so the Crystallizer no longer generates a random aspected Will crystal cluster. +- Fixed rare crash with the Blood Altar, which only has a chance of occuring on restart. + +------------------------------------------------------ +Version 2.2.8 +------------------------------------------------------ +- Fixed a client side null-pointer exception with the Blood Lamp + - It's a bright idea to fix this as soon as I can. +- Changed the recipe of the Teleport Array: + - Note from Scotty: Captain, I'll remind ya what happened last time you put an apple in her array! Use an Enderpearl and redstone dust next time! +- Added new arrays + - The Turret Array: + > Place an array on top of an inventory with arrows and then place a bow and an arrow in the array. The array will target enemies greater than 3 blocks away and less than 32, using any arrows in the inventory. + - Spike Array: + > Place a piece of cobblestone and iron ingot in the array. The array deals damage to any living entity that enters +- Increased the max number of items transferable by the Master Routing Node in its system to 64 per second. Will revisit this limit if I figure out a less silly upgrade system. +- Added additional effects to the Sentient Bow when aspected to different Will types. +- Added in book entries for the Teleport Array and the Turret Array. +- Fixed the Haste sigil and "Quick Feet" so that they work with MC's new movement method. +- Removed added health from "Quick Feet" - seriously, why was this a thing? +- Readded the ritual "Focus of the Ellipsoid": creates a hollow ellipsoid from blocks provided in the connecting chest. + - Note: The dictionary definition for "Ellipsoid" is a three-dimensional figure whose plane sections are ellipses or circles. For those who weren't born in a math class, it means it is a sphere that has different radii in each direction. +- Fixed an off by one in altar upgrade management causing the first of any upgrade to not be counted +- Fixed the LP cost of the Master Blood Orb + - This bug has gone unnoticed for 2 years now. +- Potion Flasks can be crafted now +- Fixed a server crash when handling dye recipes +- Moved several text outputs out of the chat and into the action bar +- Fixed a crash when trying to use unbound toggle-able sigils in the Sigil of Holding +- Fixed an issue where unbound sigils could be used inside the Sigil of Holding +- Added missing items for Demon Crystals and Demon Pylons + +------------------------------------------------------ +Version 2.2.7 +------------------------------------------------------ +- Added the Furnace Array: + - Name pending. + - Takes health from nearby players to power adjacent furnaces. + - Not covered by standard medical insurance. +- Added a new Teleport Array: + - Please keep all hands and feet inside the floating circle until you have come to a complete stop. + - Note to Scotty: Feed the non-floating circle a Feather followed by an Apple to initiate the Beaming sequence. +- Seer Sigil should now properly mimic all functions of the Divination Sigil. +- Fixed some console error spam when using Lava/Water/Void sigils. +- Registered Sulfur (dustSulfur) and Saltpeter (dustSaltpeter) to the ore dictionary. +- Rewrote how IBindable stores it's data: + - This will probably break existing worlds if you have Rituals running. Stop them before updating. + - This will also unbind any of your bound items. Bind them again after updating. + - *glances at the big red A next to all 1.12 files* +- Fixed Haste being *constricted* when above level 2. +- De-nerf Fast Miner array so it provides Haste 3 again. +- Prepped API for recipe tweaking mods. + +------------------------------------------------------ +Version 2.2.6 +------------------------------------------------------ + +- Fixed a weird thing where slates were weird +- Added HUD elements for Tranquility and Inversion +- Fixed Sigils stacking 64 times higher than they should have + +As a side note, I've been listening to http://loli.dance/ for the last like 2 hours now. + +------------------------------------------------------ +Version 2.2.5 +------------------------------------------------------ + +- We are now even more sure we're looking at a block before doing blocky things +- Fix Lava Crystal being consumed by furnaces +- Augmented Capacity and Self Sacrifice runes remember their names now +- Satiated Stomach will now let you gorge yourself on overly high saturation foods + - I'm looking at you, Pam. Stop being weird and giving your foods 28 saturation. +- Made Mod ID node filter dumber so it actually, like, works properly +- "Temporarily" disabled cross-dimensional teleports for entities. Temporarily. + - Did I mention this is temporary? As in totally not permanently? + - Who am I kidding? I'll probably forget about this. +- Bounce Arrays are no longer death traps when sneaking. + +------------------------------------------------------ +Version 2.2.4 +------------------------------------------------------ + +- Make sure we're looking at a block before doing blocky things +- Slightly altered the altar's renderer +- Added new spammy logging with config options + - Prints out information like mods registering things via the API and stuff + +------------------------------------------------------ +Version 2.2.3 +------------------------------------------------------ + +- Fixed mundane components being really really really thirsty + - (everything required water reagents. everything.) +- Buffed the Fast Miner array with a nerf + - Vanilla doesn't like Haste 3 I guess? +- Moved Divination Sigil altar output to a HUD element + - RIP Blood Altar chat spam 2014-2018 +- Mark of the Falling Tower is now re-opened and ready for sacrifices. +- Polished Demon Stones are no longer lonely uncraftable bois +- Somewhat more efficient (at least LoC wise) altar upgrade checking +- Blood Altar is now less stingy about outputs +- Coerced augmented Potion Flask recipe outputs out of hiding + +------------------------------------------------------ +Version 2.2.2 +------------------------------------------------------ + +- Fixed Alchemy Arrays so they might actually function now. Might. + - How did this even function properly before? I have no idea. +- Soul Snare should now stop giving the thrower ghosty debuffs. Should. +- Blood Magic is now in the mood to launch on servers. Probably. +- Soul Forge crafting works again! Potentially! +- Fixed the altar nuking any and all NBT attached to output items. +- Fixed the version not being replaced properly +- Rewrote Hwyla integration. + - Should now function a lot nicer. +- Implemented a new API for recipe registration + - Still need to move the alchemy table over, but otherwise this seems to function just fine. +- Implemented a new API for registering tranquility blocks. + - Will allow Chisel to stop crashing + +------------------------------------------------------ +Version 2.2.1 +------------------------------------------------------ + +- Fixed crashes when using systems that depended on internal entity names +- Fixed a crash when attempting to get the owner from unbound bindable items +- Fixed a server crash on startup +- Fixed GUIs not displaying the background and tooltips properly +- Helped the Sentient Sword get over it's identity crisis +- By the way I'm not actually upset or anything guys. + - Please stop overreacting Reddit. + +------------------------------------------------------ +Version 2.2.0 +------------------------------------------------------ + +- Basic port to 1.12 + - Does not include the vast majority of rewrites and cleanup I did on the other branch + - Completely untested. Done out of spite. Go away. + - There, you have it. Screw off now. + +------------------------------------------------------ +Version 2.1.11 +------------------------------------------------------ + +- Added support for some modded crops (Untested. Theoretically they work) + - Harvestcraft + - Actually Additions + - Extra Utilities +- Fixed permission level for sub-commands +- Large Bloodstone Bricks should receive 4 from a craft +- Fixed Diamond Meteor giving blocks of diamond +- Dynamically calculate Meteor Weight +- Fixed NPE in fluid filter +- Fixed Blood Tank capacity being reset when the chunk reloaded +- Updated russian translation +- Fixed Rune Type capability not registering on physical client +- Updated Sigil of Holding texture so set color is more visible +- Fixed blocks destroyed by bound tools not storing any NBT data +- Fixed Harvest ritual not working on Melons and Pumpkins +- [API] Methods for removing recipes + +------------------------------------------------------ +Version 2.1.10 +------------------------------------------------------ + +- Fixed malicious clients being able to load arbitrary chunks on the server +- Fixed Bound tools not setting their tool class and harvest level + +------------------------------------------------------ +Version 2.1.9 +------------------------------------------------------ + +- Fixed Alchemy Table overwriting output each time it crafted something + - https://github.com/WayofTime/BloodMagic/issues/1119 +- Blood Magic commands (/bloodmagic) can now be used in Command Blocks + - https://github.com/WayofTime/BloodMagic/issues/1117 +- Re-implemented the Soul Fray debuff on death + - No more exploiting sacrifice by killing yourself over and over (again) + - https://github.com/WayofTime/BloodMagic/issues/1118 +- Updated Traditional Chinese localization + - https://github.com/WayofTime/BloodMagic/pull/1116 + +------------------------------------------------------ +Version 2.1.8 +------------------------------------------------------ + +- Fixed more null stack issues + - Will it ever end? +- Fixed a crash when activating a ritual via Redstone +- Fixed a fluid handling issue with Blood Tanks + - https://github.com/WayofTime/BloodMagic/issues/1108 +- Fixed issue where Sigils inside a Sigil of Holding were using the wrong item + - https://github.com/WayofTime/BloodMagic/issues/1102 +- Fixed crash when activing Bound Tools + - https://github.com/WayofTime/BloodMagic/issues/1114 +- Updated the Chinese localization + - https://github.com/WayofTime/BloodMagic/pull/1052 +- Placer Ritual is now much more performant +- Many recipes have been moved over to support the Ore Dictionary + - https://github.com/WayofTime/BloodMagic/issues/1101 + +------------------------------------------------------ +Version 2.1.7 +------------------------------------------------------ + +- Fixed Grave Digger not applying damage bonus + - https://github.com/WayofTime/BloodMagic/issues/1098 +- Fixed crash when attempting to handle the dropping of Demonic Will + - https://github.com/WayofTime/BloodMagic/issues/1091 +- Fixed Crash of the Timberman dupe + - This also adds support for IItemHandler based inventories + - https://github.com/WayofTime/BloodMagic/issues/1090 +- Fixed a crash when a Meteor struck the ground + - https://github.com/WayofTime/BloodMagic/issues/1088 +- Fixed the Seer's Sigil not using Roman Numerals to display the altar tier + - https://github.com/WayofTime/BloodMagic/pull/1094 + +------------------------------------------------------ +Version 2.1.6 +------------------------------------------------------ +- Fixed invisible Sentient Specters destroying everything and everybody around their owners + - lol + - https://github.com/WayofTime/BloodMagic/issues/1065 +- Fixed occasional crash when Blood Altar checked it's recipe + - https://github.com/WayofTime/BloodMagic/issues/1086 +- Fixed Blood Light acting as a collidable block in obfuscated environments + - I think + - https://github.com/WayofTime/BloodMagic/issues/1083 +- Fixed crash when Alchemy Table fully depleted a Cutting Fluid item + - https://github.com/WayofTime/BloodMagic/issues/1082 +- Fixed crash when scrolling through Sigil of Holding + - https://github.com/WayofTime/BloodMagic/issues/1081 +- Fixed not being able to take Gems out of Demon Crucibles + - https://github.com/WayofTime/BloodMagic/issues/1079 +- Fixed some more null stack issues + - When is this going to be over... + - https://github.com/WayofTime/BloodMagic/issues/1068 +- Fixed JEI not displaying Armor Tomes +- Fixed Body Builder level 4 being 5x more expensive than level 5 + - https://github.com/WayofTime/BloodMagic/pull/1080 +- Updated Japanese localization + - https://github.com/WayofTime/BloodMagic/pull/1076 + +------------------------------------------------------ +Version 2.1.5 +------------------------------------------------------ +- Fixed Hellfire Forge slots acting up + - i is not j no matter how similar they look +- Fixed JEI compat for Alchemy Table recipes +- Fixed a lot more null stack checks +- Fixed (yet another) crash when creating an "invalid" stack of the Blood Tank +- Fixed Demon Will Crystal and Teleposer crashy interaction +- Fixed crash when working with toggleable sigils + +------------------------------------------------------ +Version 2.1.4 +------------------------------------------------------ +- Fixed a crash when checking if two items could be combined +- Fixed a crash when attempting to open the Sigil of Holding GUI +- Fixed a crash when somebody made an "invalid" stack of the Blood Tank +- Fixed a crash/hilarity where a Blood Altar would update itself as a Comparator + - Thanks to Arcaratus for causing this. I haven't laughed that hard in a while. + +------------------------------------------------------ +Version 2.1.3 +------------------------------------------------------ +- Added a new Master Ritual Stone that inverts it's redstone activity +- Fixed Living Armor attributes overriding eachother instead of adding up +- Fixed Ore doubling sometimes adding invalid recipes +- Downgrade tomes are now called Downgrade Tomes +- Added some caching to rituals to (hopefully) increase performance with less world data query-ing + +------------------------------------------------------ +Version 2.1.2 +------------------------------------------------------ +- Fixed server crash when creating the guide entries + +------------------------------------------------------ +Version 2.1.1-70 +------------------------------------------------------ +- Updated to Minecraft 1.11(.2) +- Fixed the Living Armour Sacrificial Upgrade +- Fixed Bound Tools not draining LP +- Implemented the Blood Tank + - Current recipes are temporaryâ„¢ +- Empty flasks can now be refilled to create a new flask +- Fixed Aura of Expulsion whitelist +- Added the Altar's Charge value to the Waila Tooltip when holding a Seer's Sigil +- Fixed meteor config error caused by EnderCore reloading configs early into startup +- Fixed meteor config not generating new entries +- Blacklisted Sentient Spectres from the Well of Suffering +- Fixed Sigils drawing from the user instead of the bound network +- Added Fluid routing to the routing nodes - this is done by using the Fluid Filter and placing a fluid container as the filter. +- Made it so the book does not give the filling recipe when the Blood Orb recipe is queried. +- Added a null check for the Will getter for the Aura incase the WillChunk somehow does not generate. +- [API] Added a new IMC API for modders to register their blocks as an altar component. + - Example: Chisel Glowstone can now be used for the Tier 3 caps (once Chisel implements it) + ------------------------------------------------------ Version 2.1.0-69 ------------------------------------------------------ @@ -656,4 +1343,4 @@ Changed - A graphical overhaul of everything has been implemented. These textures were provided by CyanideX's Unity texture pack. BBoldt and Yulife (Inap) from the Unity team are our new permanent texture artists. Bug Fixes -- \ No newline at end of file +- diff --git a/gradle.properties b/gradle.properties index 2fd30a99..27da6a0e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,10 @@ -mod_name=BloodMagic -package_group=com.wayoftime.bloodmagic -mod_version=2.1.0 -mc_version=1.9.4 -forge_version=12.17.0.1957 -curse_id=224791 +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false -mappings_version=snapshot_20160518 +minecraft_version=1.16.3 -jei_version=3.6.8.225 -waila_version=1.7.0-B3 -thaumcraft_version=5.1.5 -baubles_version=1.1.3.0 -guideapi_version=2.0.0-37 -buttons_version=1.10.2-0.0.3-3 \ No newline at end of file +#Mod dependencies +jei_version=7.6.0.49 +patchouli_version=1.16.4-48-SNAPSHOT \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3d0dee6e..7a3265ee 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 928cda88..1d5b29fb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Sep 26 11:20:52 CDT 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip diff --git a/gradlew b/gradlew index 91a7e269..cccdd3d5 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -6,47 +6,6 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 8a0b282a..f9553162 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index af2ab34f..00000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'BloodMagic' \ No newline at end of file diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache new file mode 100644 index 00000000..6089bd47 --- /dev/null +++ b/src/generated/resources/.cache/cache @@ -0,0 +1,757 @@ +cb435652c27b4978d8db83af2fd531ccaa82ada7 assets/bloodmagic/blockstates/accelerationrune.json +43be0406da1c9f7cf734427bea235a65cda073d2 assets/bloodmagic/blockstates/airritualstone.json +5ba8e1b2a7ef85028044056cc971b8fe02ab7e7f assets/bloodmagic/blockstates/alchemicalreactionchamber.json +4a60c54def00d68368ed0a0d4783979aa63d5f60 assets/bloodmagic/blockstates/altarcapacityrune.json +950fff9f06033741091aa8a66a62857da673efb9 assets/bloodmagic/blockstates/bettercapacityrune.json +8a5edb859a6f4d0adfbe2f608bab6b8c8addf01a assets/bloodmagic/blockstates/blankrune.json +904d9baa649250571bce5f965cf48fbec69c2c1a assets/bloodmagic/blockstates/bloodlight.json +5f3898cc4891f85091fe6104800d6c88d9e85e29 assets/bloodmagic/blockstates/bloodstonebrick.json +631b579c38652efbcd9e5771d09ad6e476f3ba00 assets/bloodmagic/blockstates/chargingrune.json +a35188b0244bf9808098c7d49d0af9bd32cef297 assets/bloodmagic/blockstates/corrosivedemoncrystal.json +b943c6433f295c168841aec3c3f62e525c5c9cc9 assets/bloodmagic/blockstates/creeping_doubt.json +a54ab8dfd36a593829dc33644c5f9dbccaaadaf3 assets/bloodmagic/blockstates/deforester_charge.json +b696f680545dffa4d3fbcc83b4b81ab58ac69aef assets/bloodmagic/blockstates/destructivedemoncrystal.json +6bd58d1d02a40416cec29409dee7ef80038b26d5 assets/bloodmagic/blockstates/dislocationrune.json +0b7d0241c379d0b3a8a4fa2dae79d4f998800a1f assets/bloodmagic/blockstates/dungeon_brick1.json +19d1da41c8b836a88ea7164b32e5a8525e5155cf assets/bloodmagic/blockstates/dungeon_brick2.json +79853c0ffa8fd2eb9e2ddd0848c572de0cf49037 assets/bloodmagic/blockstates/dungeon_brick3.json +1117fb4dd4f110a7b7fabae92760e0a3b949c461 assets/bloodmagic/blockstates/dungeon_brick_assorted.json +c67498a81f8dd53770da51df45192b171cdd234c assets/bloodmagic/blockstates/dungeon_brick_gate.json +8b568926830785a5cb848fb36d4ae01e67590501 assets/bloodmagic/blockstates/dungeon_brick_stairs.json +6c10c79909e008b960f2d78543f55847eec7a226 assets/bloodmagic/blockstates/dungeon_brick_wall.json +8a04e502b6965d912793699d61071e44428fceb8 assets/bloodmagic/blockstates/dungeon_eye.json +40051ea4111a9c2fd2524d664d52f241eed5317e assets/bloodmagic/blockstates/dungeon_metal.json +fe31978b41dc50c21f413c81410221f657fd4d23 assets/bloodmagic/blockstates/dungeon_ore.json +388af5c6d34f62d66d987760871c64793df84a37 assets/bloodmagic/blockstates/dungeon_pillar_cap.json +8d8d58ad890f339b75dbdfc710b30dc00eed2ef3 assets/bloodmagic/blockstates/dungeon_pillar_center.json +48e7b0533fa722eb66956e01de661ebac6470da7 assets/bloodmagic/blockstates/dungeon_pillar_special.json +e3f31a23580bce835115483f5790cb08bac44fe2 assets/bloodmagic/blockstates/dungeon_polished.json +aa980029d03236ba34f53952fdadc06cf1cff245 assets/bloodmagic/blockstates/dungeon_polished_gate.json +30c3dc138436c2a25a7fcdd7edca7f70f1adb425 assets/bloodmagic/blockstates/dungeon_polished_stairs.json +512bd11d55934229cb464c720362949302309eba assets/bloodmagic/blockstates/dungeon_polished_wall.json +2015a403ca2bcc73afbb4768df99554a13b171b6 assets/bloodmagic/blockstates/dungeon_smallbrick.json +f5b4cda776f7aabe537ca843e41074c03429cdfb assets/bloodmagic/blockstates/dungeon_stone.json +167512323d506489adb4487d3da092ceec0bd17e assets/bloodmagic/blockstates/dungeon_tile.json +4806276351c534917c2e72f98c4618e6592b18a0 assets/bloodmagic/blockstates/dungeon_tilespecial.json +ba1cd8a9475212843e3b26232c8a9943fa0d2d20 assets/bloodmagic/blockstates/duskritualstone.json +bb3db171734f511fc0c259d86e869b49aa1d0c77 assets/bloodmagic/blockstates/earthritualstone.json +e780d6d9e891082dc6ce83fde1697ce36281a02a assets/bloodmagic/blockstates/fireritualstone.json +e2c9c08bab702938e1a861d096526f16f68f6691 assets/bloodmagic/blockstates/fungal_charge.json +f78ce2be09ab794bf5f5679414eee0dc85cf4fb1 assets/bloodmagic/blockstates/largebloodstonebrick.json +002795212cc7bf2cad2a91f873d85e2204c6367d assets/bloodmagic/blockstates/lightritualstone.json +e1a98bd53fca155e4bbb03c1e548341af0f84bd7 assets/bloodmagic/blockstates/masterritualstone.json +505e45be4a207e22433d853e5139c5b1d48c57d7 assets/bloodmagic/blockstates/nether_soil.json +95a0c9a84139cf92c2689e53408b51619db126a1 assets/bloodmagic/blockstates/obsidianbrickpath.json +8b0ea137c63cf3a658a03eee58ca4b2c3d996f87 assets/bloodmagic/blockstates/obsidiantilepath.json +372ecd737f7082a4c2c70e46745f893b1179f885 assets/bloodmagic/blockstates/orbcapacityrune.json +a2eaa9166258d7179d9e5099200f777bb9edf613 assets/bloodmagic/blockstates/rawdemoncrystal.json +90daa355e528ab8a6582f796951201882f3c56da assets/bloodmagic/blockstates/ritualstone.json +285618c1a8ec36e36d479f577190579ae7616529 assets/bloodmagic/blockstates/sacrificerune.json +b03040d7a168653bf8df3600033b8fde2383db30 assets/bloodmagic/blockstates/selfsacrificerune.json +d2e2e78bd859c321a72f40fbb17ca79292d58031 assets/bloodmagic/blockstates/shaped_charge.json +487ffdc02ab7b65aafcb932e3b5cf6ea0500b21d assets/bloodmagic/blockstates/speedrune.json +f1ca47098385a955155cab9c2a97219e02d390a0 assets/bloodmagic/blockstates/steadfastdemoncrystal.json +297bc2425f7b07b1a9dd3f7f6649c44f88dbac29 assets/bloodmagic/blockstates/stonebrickpath.json +e3256db10fc8a8ab540f6ac8d27e0f47861e817a assets/bloodmagic/blockstates/stonetilepath.json +6989c4e23e5405772a8601ea88f071a479ed3fa9 assets/bloodmagic/blockstates/veinmine_charge.json +48ed6b25a5d8d8074c38d772fdc27c1753d42c36 assets/bloodmagic/blockstates/vengefuldemoncrystal.json +e6d9cf699667aaa47efff37b2b033895dee29c15 assets/bloodmagic/blockstates/waterritualstone.json +74c889434f46e060e8f185e8ef674312eb2f1192 assets/bloodmagic/blockstates/woodbrickpath.json +42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json +3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json +d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json +0492479fed31666acdf2d5f3fb2dab3b6ebdf6b5 assets/bloodmagic/lang/en_us.json +34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json +bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json +adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json +3c98a88c2283ad54f0efb9d7194361bbc3e93c17 assets/bloodmagic/models/block/altarcapacityrune.json +7cd62092c6fb3109e016d42090cf89bfa3ab7fca assets/bloodmagic/models/block/bettercapacityrune.json +1fe0f89895addb7abcacf6ce7e39b6ddc87b0d85 assets/bloodmagic/models/block/blankrune.json +3c83e090a1cff00e2bb2c7eb475785954b6eb980 assets/bloodmagic/models/block/bloodlight.json +ae2ff1abd707f2193d04d235de8f0ce92ada1d0f assets/bloodmagic/models/block/bloodstonebrick.json +320827ad2feaa51a90ebb7064a70bdc6d3765203 assets/bloodmagic/models/block/chargingrune.json +d5d82916652aee95adb8c16c97788be0a0f9f9d6 assets/bloodmagic/models/block/creeping_doubt_1.json +3effbe56422e18a44138e13e33eb26ba33b9381f assets/bloodmagic/models/block/creeping_doubt_2.json +8a7e5bfc63d3de0987bd71c1237fb580a6317601 assets/bloodmagic/models/block/creeping_doubt_3.json +8c75a72923902d5000852728436313f5979e903a assets/bloodmagic/models/block/creeping_doubt_4.json +38d083dbe1852d6dc0995a46d63a8a6dbe2c31ac assets/bloodmagic/models/block/creeping_doubt_5.json +ec5fcd20fee4260f131c82ec0a6558cc4e70e781 assets/bloodmagic/models/block/creeping_doubt_6.json +f38c5b52e9215a3d819e0b35c590d8924ca84200 assets/bloodmagic/models/block/creeping_doubt_7.json +9b332dc0443cb28c08d3af52096b7dd4fb2b68cc assets/bloodmagic/models/block/creeping_doubt_8.json +17ed7bf0e4e0aba9fc6390c8fa46f02b63145b1c assets/bloodmagic/models/block/crystal/corrosivecrystal1.json +0ae47095829ba2218113131f29e0a870b7ac7c71 assets/bloodmagic/models/block/crystal/corrosivecrystal2.json +f2fa5d770d52b5888d4fcba9161bc6485938cc21 assets/bloodmagic/models/block/crystal/corrosivecrystal3.json +f3f58ce78925d6c5e9c3beaa325f75084b9fab7c assets/bloodmagic/models/block/crystal/corrosivecrystal4.json +ca4af4bd7d6bfefbdb925aafe9d7ea80b18eaa3a assets/bloodmagic/models/block/crystal/corrosivecrystal5.json +1e0d6dc84398a2e12d177578c6c798b2c22ca95c assets/bloodmagic/models/block/crystal/corrosivecrystal6.json +302703cfe171a5f5bca492eb781ab3f3fd1c5cc1 assets/bloodmagic/models/block/crystal/corrosivecrystal7.json +6e4a3ba1cbd063757f2781e61bfae1b6191f750f assets/bloodmagic/models/block/crystal/defaultcrystal1.json +c41eee3071f1c1b27548eed79d333ab40d18a993 assets/bloodmagic/models/block/crystal/defaultcrystal2.json +3cf921a7416da052e2879cf0daae21144a40fa98 assets/bloodmagic/models/block/crystal/defaultcrystal3.json +6019d4e18f271f67b970c4e9b140ff96dc2c26fb assets/bloodmagic/models/block/crystal/defaultcrystal4.json +a106985d414ba63680da8a6b1abe77a0406adcc7 assets/bloodmagic/models/block/crystal/defaultcrystal5.json +8c3307e3ef8f44eb95c70774e32989454da8b675 assets/bloodmagic/models/block/crystal/defaultcrystal6.json +592af0e2cf2849bd0581a43271d391a9ddbc6fb0 assets/bloodmagic/models/block/crystal/defaultcrystal7.json +f688ae826b9f42b092d8de2e419f67f8049a5d00 assets/bloodmagic/models/block/crystal/destructivecrystal1.json +e27df3ee62984fc10026e721b262c89db95f2b40 assets/bloodmagic/models/block/crystal/destructivecrystal2.json +df186d5bbcb608d7e91b2a67ab7fc347aa715a34 assets/bloodmagic/models/block/crystal/destructivecrystal3.json +c4839ceb06d5a22aa47c71e1a7d7dfd12a7af68c assets/bloodmagic/models/block/crystal/destructivecrystal4.json +091b5b1986e7542485c7d03419baf6f3f81fd8cb assets/bloodmagic/models/block/crystal/destructivecrystal5.json +cf05718711393bf322680bc24897ba82bafd1f53 assets/bloodmagic/models/block/crystal/destructivecrystal6.json +a66d5091e5241479e512a3a71aba67d93992f32b assets/bloodmagic/models/block/crystal/destructivecrystal7.json +47d8fa9891d7baad8a17df455fd6d9baf6da56de assets/bloodmagic/models/block/crystal/steadfastcrystal1.json +6bbd2e8584e783e07390b0f30d0f3fbb2782f663 assets/bloodmagic/models/block/crystal/steadfastcrystal2.json +0883e99e1d5fa81d2ea0212ab8e9f4d5313717f4 assets/bloodmagic/models/block/crystal/steadfastcrystal3.json +c0a2ec89a412ce6dc078697f6ab92944a8a65cd9 assets/bloodmagic/models/block/crystal/steadfastcrystal4.json +b8d576ca3daf0b597b222f9d0645526e1d8a65be assets/bloodmagic/models/block/crystal/steadfastcrystal5.json +1e6b6825d373b1532d2458e6122a9869153d3776 assets/bloodmagic/models/block/crystal/steadfastcrystal6.json +2478650854e8e82b46bfb58754004e89771636fc assets/bloodmagic/models/block/crystal/steadfastcrystal7.json +dc2fff8fbabd58db8c0f2fb83d3d68446e324389 assets/bloodmagic/models/block/crystal/vengefulcrystal1.json +623e226eb28df9d7e2311ed6c68fba0835c80785 assets/bloodmagic/models/block/crystal/vengefulcrystal2.json +fe8271e4e815de11cd617179dedface57bd8c696 assets/bloodmagic/models/block/crystal/vengefulcrystal3.json +658bcbf2eadb0e2b442668e47b8a3a0fc684a57f assets/bloodmagic/models/block/crystal/vengefulcrystal4.json +825352d6cdd314dd4cb775062757e2b8eb39f5d7 assets/bloodmagic/models/block/crystal/vengefulcrystal5.json +9603b46cb4ebc567878ca5f54fe96e1199f34d0c assets/bloodmagic/models/block/crystal/vengefulcrystal6.json +ecf64f8c06743f0c2752e32a67753c0d5f9f67a1 assets/bloodmagic/models/block/crystal/vengefulcrystal7.json +c75695cf399d96d66914ab7dcfe1fe6bf171d6b9 assets/bloodmagic/models/block/deforester_charge.json +6adbeedc17f649ef47419845a6da0d50cfc76742 assets/bloodmagic/models/block/dislocationrune.json +313607b36c7c30073bbc64d3130f15b5871c5cd3 assets/bloodmagic/models/block/dungeon_brick1.json +55a9c171872cf9fb40c06dc2e9e826223a9096e0 assets/bloodmagic/models/block/dungeon_brick2.json +ff6727ee9a149e89deef8d666f373bdb4e68a545 assets/bloodmagic/models/block/dungeon_brick3.json +5b95b5519b04dec4f87ad7d287e3e1fa344725d8 assets/bloodmagic/models/block/dungeon_brick_gate.json +3de5c424b0928c220bf2073ee6aca5dbf4f379bb assets/bloodmagic/models/block/dungeon_brick_gate_open.json +daaeb0a0adb39fb6df3c6e6d380b34efd14bf4ce assets/bloodmagic/models/block/dungeon_brick_gate_wall.json +62ecdb415d060bf8a815f57fcf4c56b1e788f8f2 assets/bloodmagic/models/block/dungeon_brick_gate_wall_open.json +d40eb07dfa8b700d08a7f4c3739f4b6eef0bc95f assets/bloodmagic/models/block/dungeon_brick_stairs.json +df27c2b4e3345199ba29e16cddffcb86efe457b5 assets/bloodmagic/models/block/dungeon_brick_stairs_inner.json +2fbb36a96684b4acc57e551ac1f971878685a2aa assets/bloodmagic/models/block/dungeon_brick_stairs_outer.json +ffb2021036b74d29fca5fc706885f3e1399c2950 assets/bloodmagic/models/block/dungeon_brick_wall_inventory.json +70508a960748a3f62a11b1a7277977f0256be58a assets/bloodmagic/models/block/dungeon_brick_wall_post.json +a7d371e5d0efefae2729131bda16120bfe477bb8 assets/bloodmagic/models/block/dungeon_brick_wall_side.json +bd152efd619489661cac86a80190bf9e88c86363 assets/bloodmagic/models/block/dungeon_brick_wall_side_tall.json +19ae530a34eb5cee35dc7b9cdd51c9c2d61fdc9e assets/bloodmagic/models/block/dungeon_eye.json +72d70f0acb18b765340167559c10b027bd98673a assets/bloodmagic/models/block/dungeon_metal.json +61eb4e5ede53a8278d2d95fbeb40dc01424f2895 assets/bloodmagic/models/block/dungeon_ore.json +a4449c1d14c46bcda58b542c3efdddadff15bedc assets/bloodmagic/models/block/dungeon_pillar_cap.json +1752cc99d0c334016bebd0e8027b8abe3ca5d7e8 assets/bloodmagic/models/block/dungeon_pillar_cap_down.json +f171162bb4b86e70f2b2f13f3393704d295a4d86 assets/bloodmagic/models/block/dungeon_pillar_cap_east.json +c340c5e6c593cec4d342b36097fe7cca85ad647b assets/bloodmagic/models/block/dungeon_pillar_cap_north.json +c8ee14fcf2f46c755b47cc407e3cd0dbe7a477f9 assets/bloodmagic/models/block/dungeon_pillar_cap_south.json +4ac68eafddb0c99ad884af596bc48cd63af5a021 assets/bloodmagic/models/block/dungeon_pillar_cap_west.json +e6f858e8aa3c4bf2189885400a76892e707f5403 assets/bloodmagic/models/block/dungeon_pillar_center.json +12209619fc1d437d9339402ce437e6c9b2f3c02b assets/bloodmagic/models/block/dungeon_pillar_center_x.json +a4223ff2570f04a4a5d068944e8964811a62e92a assets/bloodmagic/models/block/dungeon_pillar_center_z.json +5b884f4ad41e9f0ba94a1a91938af497d3dde49b assets/bloodmagic/models/block/dungeon_pillar_special.json +eb4237db6507002305969c55ba64c9e19fe90357 assets/bloodmagic/models/block/dungeon_pillar_special_x.json +29736a69c3d5eef5b11befa0be27ddd274abc29e assets/bloodmagic/models/block/dungeon_pillar_special_z.json +a0aabc2be78af27e620e82d9f9b877dc99ae2798 assets/bloodmagic/models/block/dungeon_polished.json +05b4a25735c96036005bea06e013651a8aac5641 assets/bloodmagic/models/block/dungeon_polished_gate.json +fd32ed9981b8164f88319b66811f8e6d41ec8470 assets/bloodmagic/models/block/dungeon_polished_gate_open.json +590dbd87da39d8dc0f03dd274e46e5fec55a6ab0 assets/bloodmagic/models/block/dungeon_polished_gate_wall.json +9b86f7cfcf9b539090a49fe213ca76eb4295a7cd assets/bloodmagic/models/block/dungeon_polished_gate_wall_open.json +a9871493a35453a0f0cf1f5ff3e54f646325c2cf assets/bloodmagic/models/block/dungeon_polished_stairs.json +b073d62667acc4d278b96efcfbb929e4c70afe22 assets/bloodmagic/models/block/dungeon_polished_stairs_inner.json +fc4b1f91035eab88ea3178713ff950dce2637e41 assets/bloodmagic/models/block/dungeon_polished_stairs_outer.json +f5176982c9143ec07275349178617102af40ebeb assets/bloodmagic/models/block/dungeon_polished_wall_inventory.json +eb1252284b87f352e5d7eeae48d57e189f25340f assets/bloodmagic/models/block/dungeon_polished_wall_post.json +3c060012163a8c95532b85010773326a28e6f30e assets/bloodmagic/models/block/dungeon_polished_wall_side.json +6b5d875b69643f9daa4302a317ef3863fcce1a91 assets/bloodmagic/models/block/dungeon_polished_wall_side_tall.json +ef2a677751c2ae6c3cec9b905c28aeb615ea03e7 assets/bloodmagic/models/block/dungeon_smallbrick.json +84555e144215de4477ab826420400747b11edf9a assets/bloodmagic/models/block/dungeon_stone.json +d4e4cbb3a24e069a8e6c8e60764f8bbb7b3adb2b assets/bloodmagic/models/block/dungeon_stone_mirrored.json +8a922c0105191857905467f048aa40221cb34853 assets/bloodmagic/models/block/dungeon_tile.json +3895234c0c49d936ad0ad420dedd3669999b8a81 assets/bloodmagic/models/block/dungeon_tilespecial.json +81313327125e6e7396df0408595228bf0f63e1c9 assets/bloodmagic/models/block/duskritualstone.json +c30064f4aa09c42d23e94d118ae5b148eadb3a6c assets/bloodmagic/models/block/earthritualstone.json +44c4d3178261b3756987643b62f263c91fa74198 assets/bloodmagic/models/block/etherealopaquemimic.json +4ff1cab1014cd8f655e5f032ecf60dd371f421c3 assets/bloodmagic/models/block/fireritualstone.json +0fb05dea521223c58619fd71ccc2bcdf82ba7563 assets/bloodmagic/models/block/fungal_charge.json +d6bf1482345199e7d056a60865024ea5d480b986 assets/bloodmagic/models/block/largebloodstonebrick.json +2e1a81c758bfeec2aee807b48239f23241302268 assets/bloodmagic/models/block/lightritualstone.json +eab1713a8879decb2ae05258a6bcfa9da78ec67b assets/bloodmagic/models/block/masterritualstone.json +c0e0f918b237d2f25718bae4774750b90a88de7b assets/bloodmagic/models/block/nether_soil.json +1e354903812e9cf8e2fea26b908430d7e1cf20a9 assets/bloodmagic/models/block/obsidianbrickpath.json +71893b8b185c2b0f64f21b7dc6c4f2850f936206 assets/bloodmagic/models/block/obsidiantilepath.json +c3a813b735cd229f8597e41d04465926b2e65fe1 assets/bloodmagic/models/block/orbcapacityrune.json +9b2bf2a44b788cbaecbe63a3e085e8de76672e1b assets/bloodmagic/models/block/ritualstone.json +a8a1d06fcc2f8395530c72d2846133fff37d5537 assets/bloodmagic/models/block/sacrificerune.json +791c9f2e27215ff0a45eed7efe385276bfc09aed assets/bloodmagic/models/block/selfsacrificerune.json +d6238c0661560abd991d534ef6c8836f4655a7e7 assets/bloodmagic/models/block/sentientmimic.json +04a1e67d1587be970310912849119903b99412ef assets/bloodmagic/models/block/shaped_charge.json +6556131b1aeb25dc67daf31a1ecdb3ce23e718d4 assets/bloodmagic/models/block/solidclearmimic.json +88b9f25444280d323fff11046d4d3a3af11265e8 assets/bloodmagic/models/block/solidlightmimic.json +23d937795efdb02507d301c459e52cd4b0cfa5cb assets/bloodmagic/models/block/solidopaquemimic.json +65fe5e01ed2660e45a5c329ff2389a87e4d791ec assets/bloodmagic/models/block/speedrune.json +c5d2b0e33500a5c51046cd606e0d1272ec0dddd6 assets/bloodmagic/models/block/stonebrickpath.json +359e28e79778961f57c6369b5d1b68218972fccb assets/bloodmagic/models/block/stonetilepath.json +d8c8cb24e0e8479ec620b4cd8d5a6f5abb1a2dcb assets/bloodmagic/models/block/veinmine_charge.json +6041f2e47f5437d90a58586e42d18dadc42df439 assets/bloodmagic/models/block/waterritualstone.json +d77cdb168a084aeb962be6ad7b4f41b181837be6 assets/bloodmagic/models/block/woodbrickpath.json +e54a4f2b3cd405c69782662b1b0d57e24f7c2524 assets/bloodmagic/models/block/woodtilepath.json +ee59117289640eaebf7a9d7f629dd584ac3ed50f assets/bloodmagic/models/block/wornstonebrickpath.json +bee51abed529a89ad088b2cb89a4c1d0de541bf1 assets/bloodmagic/models/block/wornstonetilepath.json +9462d62d9bc9408359d30728de8651dc104aacf1 assets/bloodmagic/models/item/accelerationrune.json +28dc926a434253f140a7c4eece1522a64a7cccae assets/bloodmagic/models/item/activationcrystalawakened.json +3f64f82051888db51f30a75c41e1d249d7899235 assets/bloodmagic/models/item/activationcrystalcreative.json +10fa1f758c52f639880607bfaac3ced18b8b91ae assets/bloodmagic/models/item/activationcrystalweak.json +fe8e3deb3ad0107ca3ebd70694c1fc55a987d912 assets/bloodmagic/models/item/airritualstone.json +33074d865864911fcaf65e6d56430e87d466a1b8 assets/bloodmagic/models/item/airscribetool.json +60487d07a2fc1af61993e6bbebf012cf20aa3edd assets/bloodmagic/models/item/airsigil.json +92cc51b70ce22796804d093e3fc21141658f85fd assets/bloodmagic/models/item/alchemicalreactionchamber.json +f150f178edf7d6d250bcfd84af1c28a21cff09c6 assets/bloodmagic/models/item/altarcapacityrune.json +cb96caeaa30f168d03a7763f06fdff9fe47d29c5 assets/bloodmagic/models/item/apprenticebloodorb.json +5ae6e2eedcbf4a58b2e437aae2304e8171e05689 assets/bloodmagic/models/item/arcaneashes.json +69dc96914b3f5c8f672bbaca16720ffef951c179 assets/bloodmagic/models/item/basemonstersoul.json +975b721b2a1b40b4d3b3bf20d17329476f4bfc98 assets/bloodmagic/models/item/basemonstersoul_corrosive.json +318e954cc662ea33e30dad9bdff5e73b1da3b129 assets/bloodmagic/models/item/basemonstersoul_destructive.json +366657ca2747a4c8f9521c5b0b8f439d7880fcce assets/bloodmagic/models/item/basemonstersoul_steadfast.json +af6319be25a2aeadf7366c6f4b83a6c8e9e07343 assets/bloodmagic/models/item/basemonstersoul_vengeful.json +f5a0419f239ff5079b60011adb903a126265942e assets/bloodmagic/models/item/basiccuttingfluid.json +d3c33ff908880e7abc8a2cd977304419ec48a23d assets/bloodmagic/models/item/bettercapacityrune.json +7a1c55d55fe59d8a70bc2a867d127cb303c1ba23 assets/bloodmagic/models/item/blankrune.json +db9d31cae77018833be0e4d38db84d75adeb30a1 assets/bloodmagic/models/item/blankslate.json +c801f34e88224f9fabd89245f9d2a0d9ef466b64 assets/bloodmagic/models/item/bloodlightsigil.json +c795d1b7aa99ce27da63868f81bac615cf199c66 assets/bloodmagic/models/item/bloodstonebrick.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/bow_power_anointment.json +7315e49149eca494e6b132d383082cb76fc9c0e4 assets/bloodmagic/models/item/chargingrune.json +8c84f53166f2fdf7eaac4b6dc45402e3fa5b18d9 assets/bloodmagic/models/item/coalsand.json +3636c40fafa385642db14ca5f09d68e547060c4d assets/bloodmagic/models/item/corrosivecrystal.json +e8bdf0e3f557bb09c665312df380672e676f4382 assets/bloodmagic/models/item/corrosivedemoncrystal.json +470406aa7191f99f8b8d144fa0b1c314bdc10f11 assets/bloodmagic/models/item/corrupted_dust.json +1136b546d2cf73fc0f419447f7c328b8e2083323 assets/bloodmagic/models/item/corrupted_tinydust.json +9b332dc0443cb28c08d3af52096b7dd4fb2b68cc assets/bloodmagic/models/item/creeping_doubt.json +7b4471ae902c8e96a3730a86e1b15fb5c13aeec7 assets/bloodmagic/models/item/crystalline_resonator.json +5414b42d1246ff780f15ebd42212f19e90891daa assets/bloodmagic/models/item/daggerofsacrifice.json +08e573e533ecbfed2a734691608abe0119f3f3e3 assets/bloodmagic/models/item/defaultcrystal.json +cad1aef333d131d77b7960f5dc295694baeead1c assets/bloodmagic/models/item/deforester_charge.json +6353ff212d21942d3fcbf7ea0cedd027e831059f assets/bloodmagic/models/item/demonslate.json +fd9ec2b5fe4436363ae5058b6ff9d77bd81ce85d assets/bloodmagic/models/item/demonwillgauge.json +51f65b07ce2ff59d740e28a27a039bd0022c367f assets/bloodmagic/models/item/destructivecrystal.json +3e952fc5e87bd7883dadd761ef708ddfac29638c assets/bloodmagic/models/item/destructivedemoncrystal.json +7af07ab578bbd20e2f834b26d9cafb5fe23bc7d4 assets/bloodmagic/models/item/dislocationrune.json +d57d9bcecc2580bdc009e1cd2b4a87cc39b4bca9 assets/bloodmagic/models/item/divinationsigil.json +f866879eed9f1bd7eebac14495de599ca3ad855d assets/bloodmagic/models/item/dungeon_brick1.json +78f206d696acf10f082a34c7ec2fdbddc321231a assets/bloodmagic/models/item/dungeon_brick2.json +52f18a291e92fe5218dd4abacdabdc106dc2d380 assets/bloodmagic/models/item/dungeon_brick3.json +f866879eed9f1bd7eebac14495de599ca3ad855d assets/bloodmagic/models/item/dungeon_brick_assorted.json +1a1ab86e948d6f2a7e928750d5442fff1edb4c19 assets/bloodmagic/models/item/dungeon_brick_gate.json +2ec6a2c66e88981ff54e74035bb3adb1ec4f6396 assets/bloodmagic/models/item/dungeon_brick_stairs.json +098a26f4e9222c801f9a17a6db1b266ad4085003 assets/bloodmagic/models/item/dungeon_brick_wall.json +0a48c4fd74036702ae2d72a9b2333c2bdf5ab31b assets/bloodmagic/models/item/dungeon_eye.json +e5b467f756ccc4d3ab42a1249864d47f2b9c4587 assets/bloodmagic/models/item/dungeon_metal.json +95a45fae0890e626aa5e5ff85b9884bd30087244 assets/bloodmagic/models/item/dungeon_ore.json +ba5c610437b7d3a84820109c32d204310ff41fd7 assets/bloodmagic/models/item/dungeon_pillar_cap.json +d098a544e7b9918a45106c2cbc5e10baea66502a assets/bloodmagic/models/item/dungeon_pillar_center.json +5284f1cc7508546c66669564182fe5056053333d assets/bloodmagic/models/item/dungeon_pillar_special.json +9e876e438fa9bac067f6b3af4904e6bbd24044c8 assets/bloodmagic/models/item/dungeon_polished.json +9a7bf4c6c15f2a6e39588b1b8aed7988a7713a02 assets/bloodmagic/models/item/dungeon_polished_gate.json +477cd98babad0a71ccfcc9e541169fe9bc31d8d1 assets/bloodmagic/models/item/dungeon_polished_stairs.json +f3b763d6edc3c75655797481f05e02d409f481d9 assets/bloodmagic/models/item/dungeon_polished_wall.json +2ecba4811bd02698f6a34b5cdd9160426f7bda63 assets/bloodmagic/models/item/dungeon_smallbrick.json +2d7a8a3ed9f91a5bf5c277c6342c69e97692d347 assets/bloodmagic/models/item/dungeon_stone.json +717a9dcc833d1fbea4e5f989f45f46268d4ffe37 assets/bloodmagic/models/item/dungeon_tester.json +6186d2045f87b1e6cc7006226993a93b63d650ff assets/bloodmagic/models/item/dungeon_tile.json +21e8a4fa93ba249684e0624a10a6f0f00ff6d194 assets/bloodmagic/models/item/dungeon_tilespecial.json +10aceefca3ad3f0da773cb317c4effc6c06051ea assets/bloodmagic/models/item/duskritualstone.json +1f8ce936602a2e55ecf05b926734099c057733e5 assets/bloodmagic/models/item/duskscribetool.json +4d56efd7fdbf430f49903ce201577047687c3804 assets/bloodmagic/models/item/earthritualstone.json +b29b6d11b54e98dbfbeb9d677298e6ca95bf2ca2 assets/bloodmagic/models/item/earthscribetool.json +cdbaaf8662f2e855a34a66f28e49403c4ea9a45e assets/bloodmagic/models/item/ethereal_mimic.json +c5a3b58c52f75650ae38391841b21ad1cb0855f9 assets/bloodmagic/models/item/etherealslate.json +64529fc174f49c6eabca127ebdd287ff77a7ed63 assets/bloodmagic/models/item/experiencebook.json +dbd20c2ac822262cc368fd7d649de67c754e693d assets/bloodmagic/models/item/explosivepowder.json +c36bde4f98c0aeb3bf0f369ad3bc067e5f0dc916 assets/bloodmagic/models/item/fireritualstone.json +0a3dcea188a3e5cf5f7c9a2cc4ad62667ac5821b assets/bloodmagic/models/item/firescribetool.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/fortune_anointment.json +0392d220dc92ab8abad335e620b011e000b61ef9 assets/bloodmagic/models/item/fragment_netherite_scrap.json +4228d831053597cbb7d7e5fb68b7a6dbf1dbf977 assets/bloodmagic/models/item/fungal_charge.json +27ce75b6179a4620fd23aa07568c47fad36a14eb assets/bloodmagic/models/item/furnacecell_primitive.json +72386afa0dcb2444a8072d1618425038c73106c7 assets/bloodmagic/models/item/goldfragment.json +2bf9f4f4901425531903ace1cebee594bc37e55a assets/bloodmagic/models/item/goldgravel.json +bad504721d3bfd106869df9902bac0aa4001a1a7 assets/bloodmagic/models/item/goldsand.json +ebb91dfd0f28c439478b5f041b127aefa00ae583 assets/bloodmagic/models/item/gravel_netherite_scrap.json +44663089f348642bcca1c5020b5081c3ab172f92 assets/bloodmagic/models/item/growthsigil.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/hidden_knowledge_anointment.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/holy_water_anointment.json +f68825f667ca73b4373fd5068a47f0d1ca9b2aad assets/bloodmagic/models/item/icesigil.json +5d151f9d9007fb7459dde9f2d5c182b9b6aa06e0 assets/bloodmagic/models/item/infusedslate.json +59940408324c0379fa791a58f4a81781d06d1257 assets/bloodmagic/models/item/ingot_hellforged.json +80c575c613c1696069284224fe2c711c343bb0be assets/bloodmagic/models/item/ironfragment.json +4b803c1c838284d78474bab0f8ced938985dd958 assets/bloodmagic/models/item/irongravel.json +d83040a473f44ff2fd9d290f3fd6ef0d8b9f3114 assets/bloodmagic/models/item/ironsand.json +9b9fc4a11a187257d30334cd3faa949790b6ca29 assets/bloodmagic/models/item/largebloodstonebrick.json +ffc3da1cbb86adc5aec7dfd503d23af319aec529 assets/bloodmagic/models/item/lavacrystal.json +12360580230f4eab90dbe7de3d5bbf79e2338b03 assets/bloodmagic/models/item/lavasigil.json +5a76914a87fc9b99079bb6afed1d4cfe3e4a532e assets/bloodmagic/models/item/lightritualstone.json +0d6c9d3b2ec30835ef74b6d6e8184074ac0861b8 assets/bloodmagic/models/item/livingboots.json +dd50db84188025895693164736f4799e75b8c7a9 assets/bloodmagic/models/item/livinghelmet.json +e39cf255d5c8873e02d1f2df2c829d0858df25e3 assets/bloodmagic/models/item/livingleggings.json +45756697d2f012fcc2de5fead120768a87655662 assets/bloodmagic/models/item/livingplate.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/looting_anointment.json +7211624c82431d12dd21b3de262f4f332a69e0e1 assets/bloodmagic/models/item/magicianbloodorb.json +2b760616f7dad714accf1249b85eec4761f69706 assets/bloodmagic/models/item/masterbloodorb.json +9e377ab2c131993f96ab6fb544bda4dbba0ab87e assets/bloodmagic/models/item/masterritualstone.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/melee_anointment.json +3d5c71d1f24ebcc65db48765b56db60d64673a0d assets/bloodmagic/models/item/mimic.json +7596826c5b40c2809eb0a42eb5f5f2089290e3e5 assets/bloodmagic/models/item/miningsigil.json +9010fdcefb80ed0db271b41263412a1673c6c311 assets/bloodmagic/models/item/nether_soil.json +eaa0548775c3d5839b46d333af33f815dc6dd0fe assets/bloodmagic/models/item/obsidianbrickpath.json +cf066d15baae650a383240a91240abd335bbb0e3 assets/bloodmagic/models/item/obsidiantilepath.json +ff9b802098659824626dc90dbb5a0d8960234228 assets/bloodmagic/models/item/orbcapacityrune.json +d5fd516b1cf94ab01d5b1fbe554705215f21ff66 assets/bloodmagic/models/item/plantoil.json +abdd58730704a0936783c6752098a9fec1e3f18d assets/bloodmagic/models/item/primitive_crystalline_resonator.json +f3dd3ad67c86895983e3cf0f21e44d0f4046962e assets/bloodmagic/models/item/primitive_explosive_cell.json +0a88f03b48e0032f7ed7878212b0b01a930186d0 assets/bloodmagic/models/item/primitive_hydration_cell.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/quick_draw_anointment.json +63fe86d0faf9aa03a513221a6a12828a886b1301 assets/bloodmagic/models/item/rawdemoncrystal.json +6f5418ed5739381e95b4d3b33f3e2924a6233941 assets/bloodmagic/models/item/reagentair.json +0f3fbea424448d41cac91bc479d9235def615af7 assets/bloodmagic/models/item/reagentbinding.json +df9beacb97275ffaa7f186778d94ad11138dffe3 assets/bloodmagic/models/item/reagentbloodlight.json +ba57b2a11a0920e7a4df894c6fbae38bf2a6e0ce assets/bloodmagic/models/item/reagentfastminer.json +f9a2fbb703e22dee4ae74daff99249e5f22caa0f assets/bloodmagic/models/item/reagentgrowth.json +a0e2480efd5433e9ead1ef87c2b31b0dbbc7ecb6 assets/bloodmagic/models/item/reagentholding.json +2f8cfb7f2c9cb3dd62a007c2ec56f585414149d8 assets/bloodmagic/models/item/reagentlava.json +2a07dc18d2d8166815c29aa989ccd0093d5d112b assets/bloodmagic/models/item/reagentmagnetism.json +7ce18ad9b0de94a3fc5abf03c6726c8cc4cf5524 assets/bloodmagic/models/item/reagentsight.json +7aa180a374f6a60f0525659c90f386a9df7bedcd assets/bloodmagic/models/item/reagentvoid.json +d6fefc8d0d11bcc40ec6c9fa41e8e9402274251a assets/bloodmagic/models/item/reagentwater.json +98783464efdcbcaf2f457dfafc4a126f57454f8c assets/bloodmagic/models/item/reinforcedslate.json +8c473f375d7e45adb82f615a6d9e6dea312f57bd assets/bloodmagic/models/item/ritualdiviner.json +152682fd87d660cb06931b65d7a402ccd332a21a assets/bloodmagic/models/item/ritualdivinerdusk.json +2722891c9c40b124d85bf9ff8eb885e175f5e6ff assets/bloodmagic/models/item/ritualstone.json +7f7c3f406430ca088c3993c1347c2219b287498e assets/bloodmagic/models/item/ritualtinkerer.json +db73abb3bcb1731b6fc389e3577910b6aab87b10 assets/bloodmagic/models/item/sacrificerune.json +7d0c46410e4e256bd88f9220cd3eaf948a4b715f assets/bloodmagic/models/item/sacrificialdagger.json +9a67ae7be820dca31446758377677cc2c906ab80 assets/bloodmagic/models/item/saltpeter.json +db66835b16edd296fe71a63a2f195ffdc9e97519 assets/bloodmagic/models/item/sand_hellforged.json +1e7fca5638c09e4c46f9e65854bc0316d8142361 assets/bloodmagic/models/item/sand_netherite.json +eb098783e91a17d07429d9006fb09bf056350e57 assets/bloodmagic/models/item/sanguinereverter.json +b6e98c7b1789654fe7ff559e95011c0a28c58bc1 assets/bloodmagic/models/item/seersigil.json +cc71421e98ee7ee047a4cfbb6cb69529c2b02d4e assets/bloodmagic/models/item/selfsacrificerune.json +7f0256ef2f219d92882e759677399050b0776d64 assets/bloodmagic/models/item/shaped_charge.json +6cc73920a09d4d6925154732f4064d8d03590f25 assets/bloodmagic/models/item/sigilofholding.json +ea5747638d0b5dcc03f008b202cc60a11e0827bb assets/bloodmagic/models/item/sigilofmagnetism.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/silk_touch_anointment.json +96eca80edd26a325bd65f325f4c3d651b1080912 assets/bloodmagic/models/item/slate_ampoule.json +08bee690d5092e3c9e6c04c43f50af668fdb3b7e assets/bloodmagic/models/item/slate_vial.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/smelting_anointment.json +db0f63198089161b8d4ecfb1ec8a45f7dc5ba83d assets/bloodmagic/models/item/soulaxe.json +9ec68a2dcf04b987c3c5d5c6c52195e3deccacbb assets/bloodmagic/models/item/soulgemcommon.json +6501bb4b72457e8107bec818f26de6178b655203 assets/bloodmagic/models/item/soulgemgreater.json +ad010d9680cd748bd04c8fc36262c236f7d90105 assets/bloodmagic/models/item/soulgemlesser.json +b49e7f34913e32ccb68eeb6f6c196ff6b209f482 assets/bloodmagic/models/item/soulgempetty.json +c873e91c70eef9ad4c39aeb2fe8b9aa16a26cccd assets/bloodmagic/models/item/soulpickaxe.json +5682770badd4dbc1ae533de0ce0f9a7cd0b2aeea assets/bloodmagic/models/item/soulscythe.json +bde2befafc97fd89a428dfa3f39fc970e9a3ae29 assets/bloodmagic/models/item/soulshovel.json +7b375670d1fa52a3585907d3e880863dbcc04b32 assets/bloodmagic/models/item/soulsnare.json +fe2b201007c974229509f6900c6eb8b03d158b0a assets/bloodmagic/models/item/soulsword.json +52d21027ac6fed000e77b5e8ad9102319b25cb33 assets/bloodmagic/models/item/speedrune.json +36e0914768c8b3eb3b80702280ca74bbd8546623 assets/bloodmagic/models/item/steadfastcrystal.json +6968a3d0c3bbeac8ea4cb2c050e28506e8938851 assets/bloodmagic/models/item/steadfastdemoncrystal.json +29009ca92dc30e1ec4ae1d454cd3f8726d8edc3c assets/bloodmagic/models/item/stonebrickpath.json +2dc28b0e2b7ae7bb0bcf8c8e74b9ba7c800446ff assets/bloodmagic/models/item/stonetilepath.json +1992b3655f7bbca8b7aac7c53f1a0e7b1ab3124d assets/bloodmagic/models/item/sulfur.json +451fa4812d23a207882eb95d89673b1e4c2dd257 assets/bloodmagic/models/item/throwing_dagger.json +4f4e6c72a160eb635bdf78ed0a6ba5765fbf51ea assets/bloodmagic/models/item/throwing_dagger_syringe.json +d13731c45f6dd23b8e70d2a75d4068bdae88ef5c assets/bloodmagic/models/item/upgradetome.json +e8fe01c5cddc268538681889f3161472a8f1c8ad assets/bloodmagic/models/item/variants/growthsigil_activated.json +20c802279de4df496057795c2e891fa54a21376f assets/bloodmagic/models/item/variants/growthsigil_deactivated.json +2778ea3a62ce6dd718a557beee7b5329bb185ff9 assets/bloodmagic/models/item/variants/icesigil_activated.json +11f5516cea8ac65bbb0f5958d6492170482ae8d8 assets/bloodmagic/models/item/variants/icesigil_deactivated.json +be3772fd711ccf4a2adfad122a8b39e8a36e874a assets/bloodmagic/models/item/variants/miningsigil_activated.json +7dec45f3167426d975564692a80196cdb3f4bdb4 assets/bloodmagic/models/item/variants/miningsigil_deactivated.json +9403d6195d4d38d5876c2a42f4edfb9bdcd05210 assets/bloodmagic/models/item/variants/sacrificialdagger.json +89ea1f760bac680b1baa98536d6bc407e347676e assets/bloodmagic/models/item/variants/sacrificialdagger_ceremonial.json +79c61e61656a934397c92626809c1869b0617fc3 assets/bloodmagic/models/item/variants/sigilofmagnetism_activated.json +129ace1f4a25f22bd09215603248a25adcf234e0 assets/bloodmagic/models/item/variants/sigilofmagnetism_deactivated.json +81e1cb0664f53f30ad195fc4330786b71db9e20c assets/bloodmagic/models/item/variants/soulaxe.json +2254b45194021cdd3fbc7d384d958b031a8e7cea assets/bloodmagic/models/item/variants/soulaxe_corrosive.json +c11750d01a720a1b0eca0610ec12cba0fef4d5da assets/bloodmagic/models/item/variants/soulaxe_destructive.json +368e428410c7c6d6bf444970221bb5ebe5f6bacd assets/bloodmagic/models/item/variants/soulaxe_steadfast.json +267875926ed261400a10371e044e9f54aafa637a assets/bloodmagic/models/item/variants/soulaxe_vengeful.json +cddaa2be8db3aff90933fb772b92cab735ebf11e assets/bloodmagic/models/item/variants/soulgemcommon.json +874aa708d02de2315e29033b2f67fd313edc8aff assets/bloodmagic/models/item/variants/soulgemcommon_corrosive.json +3ca3c4251a8907c1c47caf49e53a711265e0e92c assets/bloodmagic/models/item/variants/soulgemcommon_destructive.json +3ad2785d3e893943ea769c7e39d69cedd71e556a assets/bloodmagic/models/item/variants/soulgemcommon_steadfast.json +016ccdfb8a6e0101975e64f9f548e6a93d32f53c assets/bloodmagic/models/item/variants/soulgemcommon_vengeful.json +daef17113abd2003f745e069c1ccecc911445919 assets/bloodmagic/models/item/variants/soulgemgreater.json +73926de465b378adad07303f02a01c41c2f3656e assets/bloodmagic/models/item/variants/soulgemgreater_corrosive.json +1807f9b243e98c9ea43ac230ae211a324c82db79 assets/bloodmagic/models/item/variants/soulgemgreater_destructive.json +07c68e7574ef7d4db2e011e23c3bc20ad258daea assets/bloodmagic/models/item/variants/soulgemgreater_steadfast.json +3691ec7d9fedd3694feb1d6d387a9420e87ff8ce assets/bloodmagic/models/item/variants/soulgemgreater_vengeful.json +2b2322dfd3f7e28ea5d0ad2d9df2223d7ee47f00 assets/bloodmagic/models/item/variants/soulgemlesser.json +8eaab2fddfe201dc83d2d2ffd65e1537a3e5a388 assets/bloodmagic/models/item/variants/soulgemlesser_corrosive.json +24608fc7a19e41d71ec84a80c18ceccbc869cd79 assets/bloodmagic/models/item/variants/soulgemlesser_destructive.json +1ef6dd3ceed7f6ffd3e91283146fbe3f6db46d10 assets/bloodmagic/models/item/variants/soulgemlesser_steadfast.json +7801bda9366c21aad10137d30151ac4154acbea1 assets/bloodmagic/models/item/variants/soulgemlesser_vengeful.json +0b37376d07ecf8ff91df345435abd5d94d28714e assets/bloodmagic/models/item/variants/soulgempetty.json +fb9e51a933316daa4a99b6e6c9a2606dc354f0dc assets/bloodmagic/models/item/variants/soulgempetty_corrosive.json +0a15d2c90a8d139c1689579460379e5feefaddec assets/bloodmagic/models/item/variants/soulgempetty_destructive.json +a94516c3019969baa379f4a32d68736010cb473a assets/bloodmagic/models/item/variants/soulgempetty_steadfast.json +eabd2e88451ef42250e86c6675868b322aa0db92 assets/bloodmagic/models/item/variants/soulgempetty_vengeful.json +cebb0537b96480ac99314840a45107108b1bbc3a assets/bloodmagic/models/item/variants/soulpickaxe.json +2045e6593e80a11da9c60d0bdcef456503141232 assets/bloodmagic/models/item/variants/soulpickaxe_corrosive.json +37144adb7eb312c66a3567faeb3ece5aeef76e70 assets/bloodmagic/models/item/variants/soulpickaxe_destructive.json +e09d7927fdb84c372d36b290e3c69f728c922675 assets/bloodmagic/models/item/variants/soulpickaxe_steadfast.json +bec6cecf74db6a32fb5890b0596ddb7e2bf2daef assets/bloodmagic/models/item/variants/soulpickaxe_vengeful.json +a1fa69851bf9bb7022a25c0bef26fd44633616e2 assets/bloodmagic/models/item/variants/soulscythe.json +7c97bf4b12fc39cbe100d0e54e6b1b53a592c771 assets/bloodmagic/models/item/variants/soulscythe_corrosive.json +ad9c84341af3f0e90cdb206f39fbf4c2e589c52a assets/bloodmagic/models/item/variants/soulscythe_destructive.json +00b631dc41ee04264a91fe9a9e0b5660daf9fbc5 assets/bloodmagic/models/item/variants/soulscythe_steadfast.json +379922deb3b4e352763b335c01d4d66bfc531218 assets/bloodmagic/models/item/variants/soulscythe_vengeful.json +501142d1ff49eaf663e9a2044da17b8b5a25e361 assets/bloodmagic/models/item/variants/soulshovel.json +f65e2a2d4f0cae6c3dc986274c2dee0f1773cfb2 assets/bloodmagic/models/item/variants/soulshovel_corrosive.json +6c6b04b81358bb82b4d127fc621190dc2804fd45 assets/bloodmagic/models/item/variants/soulshovel_destructive.json +0e193ee2b27783f3d10461977c7d719be96af203 assets/bloodmagic/models/item/variants/soulshovel_steadfast.json +a8a7f03cc24f0d796e8868ace72f50ec4343dd5b assets/bloodmagic/models/item/variants/soulshovel_vengeful.json +0cd32e8e693d85b8a81e96ea305ffafb4a72e861 assets/bloodmagic/models/item/variants/soulsword_activated.json +60831276c8b0a5ecfa8e1a7beee6c5a4838cae69 assets/bloodmagic/models/item/variants/soulsword_corrosive_activated.json +792bb3a3e613808890cf0c31585318dc8e16891d assets/bloodmagic/models/item/variants/soulsword_corrosive_deactivated.json +ba7a7366b1471dd58b27b523bde130e39220fe01 assets/bloodmagic/models/item/variants/soulsword_deactivated.json +ef838be270d9d87651aec70c6b59197b01e48a6c assets/bloodmagic/models/item/variants/soulsword_destructive_activated.json +ec6f6bf7f520182b2044f3cc5a10f1d4c7a8d7ab assets/bloodmagic/models/item/variants/soulsword_destructive_deactivated.json +149f3e3049bd4f4ed559e56db79027bda9e8478e assets/bloodmagic/models/item/variants/soulsword_steadfast_activated.json +7d22fdba9bb8593c247a0b33df11f3b26a16c254 assets/bloodmagic/models/item/variants/soulsword_steadfast_deactivated.json +2029220112f89a3f4d432ab4749dff6143846659 assets/bloodmagic/models/item/variants/soulsword_vengeful_activated.json +0f5a3e1e5993a03ccda156eed855b71fbd0be0a2 assets/bloodmagic/models/item/variants/soulsword_vengeful_deactivated.json +81776d7be5f2d13e44622a6d38929821bc78ae7d assets/bloodmagic/models/item/veinmine_charge.json +16bde91467016c6012fe2b618c898d0340043492 assets/bloodmagic/models/item/vengefulcrystal.json +11e3347147e079093c4fa12018412071db22a4f5 assets/bloodmagic/models/item/vengefuldemoncrystal.json +9019dcd2f21b03e703ceeee1ea3199de72110268 assets/bloodmagic/models/item/voidsigil.json +a31019db55828cb937a071ac2f74b125a2d0c955 assets/bloodmagic/models/item/waterritualstone.json +23d5a97cb44909c470ea76833138cd187f13ba80 assets/bloodmagic/models/item/waterscribetool.json +bfa6dec13cc193bbe634c2c68b641f3897ccb342 assets/bloodmagic/models/item/watersigil.json +cb4eaa9292890e172b0f36a63605db0c973f735e assets/bloodmagic/models/item/weakbloodorb.json +46423c1325542ab0efad772e1aab52082d9ef636 assets/bloodmagic/models/item/weakbloodshard.json +6b16a94dcb06f31b7a92f250449ec42dbc3568aa assets/bloodmagic/models/item/will_power_anointment.json +c0907e611e09ccc924452070519006add21f3d12 assets/bloodmagic/models/item/woodbrickpath.json +1de444baa270a146dcd33c784b08f75a3d745421 assets/bloodmagic/models/item/woodtilepath.json +c8ea88c439c91d0eeee3e6204a3c50f8cfd36758 assets/bloodmagic/models/item/wornstonebrickpath.json +2d9dab8ebc036473d82eb044eb7a7bba0d0937a4 assets/bloodmagic/models/item/wornstonetilepath.json +273f8363ef906c87c67ae8aeb21a7d9d2834bbc6 data/bloodmagic/advancements/recipes/bloodmagictab/alchemy_table.json +e6a3ac3998653b10ee09780be9099a9d0c5b3917 data/bloodmagic/advancements/recipes/bloodmagictab/arc.json +08af21340e8457f43f7e5235790f58c2a67b9b3a data/bloodmagic/advancements/recipes/bloodmagictab/blood_altar.json +80cf1e0f026565be99279c46306b92be06bda65c data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_acceleration.json +f77e3947a24a252c04a80d1eb26547a3fbf868e7 data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_aug_capacity.json +f8b66411c96c6a7a409fb10f6888d078f1f8fa14 data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_blank.json +ab5612f33028487c08e51de4b91bb786df1b1b95 data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_capacity.json +e59e508cdbd51f62f83559edeb5f2a89226d7694 data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_charging.json +d707d48cc670ae65f224487a5012d5464c0a9760 data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_displacement.json +e897d6f91e2a0bd12b0da0a50e5c897294989e7c data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_orb.json +4a53004c651901cd1245de452810161736d9b067 data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_sacrifice.json +263f7c251d2f163db5bd229f2ab8a222f23ae03a data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_self_sacrifice.json +7ca400d1141ff4be1b529cd060950b42cf3b9bfb data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_speed.json +764e54fdaa24f87cceb815990bbbd2e2cd87f205 data/bloodmagic/advancements/recipes/bloodmagictab/bloodstonebrick.json +2e7ec285e758b06c2bd7d9fd93eedd96f511fa49 data/bloodmagic/advancements/recipes/bloodmagictab/corrupted_dust.json +f92c8a88a2c0ca63510d170c33f5eb2d1aee25ec data/bloodmagic/advancements/recipes/bloodmagictab/experience_tome.json +1b1dab3143eae33e25c4a14c011adec72768c9b5 data/bloodmagic/advancements/recipes/bloodmagictab/hellforged_block.json +a6f012d0584d36d9b7dd0ec4f9e4cbd2a3ff1146 data/bloodmagic/advancements/recipes/bloodmagictab/incense_altar.json +4c24af93a64071aadc0308b27bcbc44572e5ccfc data/bloodmagic/advancements/recipes/bloodmagictab/largebloodstonebrick.json +344567e6f5671131addcfebbd92d18e5cbd66ef5 data/bloodmagic/advancements/recipes/bloodmagictab/lava_crystal.json +d8ca7255f72a2ab6915552cdeb682ecc6efde03a data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stone.json +1b85f9d2b823aef941158276b6f46bd8279cd693 data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stonetile.json +f17f721149daf9246788be3235e5a6472155215a data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wood.json +147ba38e68ca50e503ecf1ea96e85ce62c2dd86d data/bloodmagic/advancements/recipes/bloodmagictab/path/path_woodtile.json +ea0b32b5595661f0d09f68a8a596577cc62ba0b1 data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstone.json +0dc717f46c2c6f36b58114df2bf5c82aadb104d2 data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstonetile.json +091fbd276c5ad173716e9e7474fa278e742a662f data/bloodmagic/advancements/recipes/bloodmagictab/primitive_furnace_cell.json +7cf09fef1a5bfc1401ecc34857bdf78c7282c12a data/bloodmagic/advancements/recipes/bloodmagictab/primitive_hydration_cell.json +01e90bb9c59d44a52777ecc0cf28754295fda675 data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_0.json +836e1fc171dba197e02d6a9e3e61a3718cb5a482 data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_1.json +5deb91599f19a4f28e5b03c9fcb428d3f00a3644 data/bloodmagic/advancements/recipes/bloodmagictab/ritual_reader.json +c8e5cdac0e7328640ab1cb0eab0a46f0733b59b3 data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_blank.json +1578416eb302aecb3fd61e481634c5c021541f51 data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_master.json +832301a424345b7ca70b43cb214faa104179f0fb data/bloodmagic/advancements/recipes/bloodmagictab/sacrificial_dagger.json +b76943e5606d3cd4ec9933b533e0925499af5c65 data/bloodmagic/advancements/recipes/bloodmagictab/smelting/ingot_hellforged.json +766cf6a61f198a8426debb6f0c9f43e36193fc76 data/bloodmagic/advancements/recipes/bloodmagictab/soul_forge.json +1c751b044e5ce4d05746857d6cf5e812e94a4026 data/bloodmagic/advancements/recipes/misc/smelting/ingot_gold.json +af036dd1bd5193c2d36e7cb96c0a2b73a37b76ab data/bloodmagic/advancements/recipes/misc/smelting/ingot_iron.json +ab358377c93ecbdd790722d5e796df59095e79e1 data/bloodmagic/advancements/recipes/misc/smelting/ingot_netherite_scrap.json +639ebb2ccabb2eaece59be96c2e6f28c31f4d2f4 data/bloodmagic/loot_tables/blocks/accelerationrune.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/airritualstone.json +1ed1f3cebe68450b6d5ca3ce69e4728a7d250b1c data/bloodmagic/loot_tables/blocks/alchemicalreactionchamber.json +443550be9eaf1021b11fd2bbe6afcfe2cee6f7ad data/bloodmagic/loot_tables/blocks/alchemyarray.json +c92a9f2a90f2c17933f89832899c295cde1f194d data/bloodmagic/loot_tables/blocks/alchemytable.json +17d8dcc62320d5d2eeb781e925963d9b9d5eec54 data/bloodmagic/loot_tables/blocks/altar.json +05bb6268d7e884c962061a632e162d5baf73271e data/bloodmagic/loot_tables/blocks/altarcapacityrune.json +87d44fa5143733864c12608443d11744b91e0496 data/bloodmagic/loot_tables/blocks/bettercapacityrune.json +867d0fa555de94140215d9edb7cd7ae533bbc619 data/bloodmagic/loot_tables/blocks/blankrune.json +f1a8e3131d85077665563372cad868534a72fb31 data/bloodmagic/loot_tables/blocks/bloodlight.json +f0827ad5bf71c06a71f50aeb0298c04d0cb1a1d9 data/bloodmagic/loot_tables/blocks/bloodstonebrick.json +779b809a2a51e6dab46f9e6799249f2f14653ebb data/bloodmagic/loot_tables/blocks/chargingrune.json +0d501e4eb447e84b38250ab1c396abe1218d129c data/bloodmagic/loot_tables/blocks/corrosivedemoncrystal.json +e59c93dcc8d42b3ddb71dad1695573b1c284213f data/bloodmagic/loot_tables/blocks/creeping_doubt.json +794eab6d989fe113f797835fa6a2f7ead5bfbd38 data/bloodmagic/loot_tables/blocks/deforester_charge.json +4c9ed83e7e7215f995df35054e96d2f4e5027016 data/bloodmagic/loot_tables/blocks/demoncrucible.json +c590b923d28b3d7916932dfcb05091df815f71dd data/bloodmagic/loot_tables/blocks/demoncrystallizer.json +b0ce964c69f63aa13350259279e5fe831ae18e2c data/bloodmagic/loot_tables/blocks/destructivedemoncrystal.json +a9fcfc656fab957328c10ee1d9d33807e697b7f7 data/bloodmagic/loot_tables/blocks/dislocationrune.json +e39c50638d466bf706327f52fd42c915e2990d7e data/bloodmagic/loot_tables/blocks/dungeon_brick1.json +be050ff812ae62793e3c51d7c2ab343294ede7f0 data/bloodmagic/loot_tables/blocks/dungeon_brick2.json +75252b630d7e0cf77db12125844283949ee94226 data/bloodmagic/loot_tables/blocks/dungeon_brick3.json +607d6e286ff2280686f258a931341aeed5334781 data/bloodmagic/loot_tables/blocks/dungeon_brick_assorted.json +03410080009911badbf6458a54b596bee464cbe4 data/bloodmagic/loot_tables/blocks/dungeon_brick_gate.json +0d30aeb91425e2419abf555e9baab34475f45afc data/bloodmagic/loot_tables/blocks/dungeon_brick_stairs.json +fa335aded871280065ca02db79d6de59ced7f6c9 data/bloodmagic/loot_tables/blocks/dungeon_brick_wall.json +47baa958866616d96eb39e2671a4cf488e0abae2 data/bloodmagic/loot_tables/blocks/dungeon_eye.json +055aa396cd80393d84ed340692be62f74ecb6ffc data/bloodmagic/loot_tables/blocks/dungeon_metal.json +234675dab5d5ff7e1fec0e13cede1f141811fc92 data/bloodmagic/loot_tables/blocks/dungeon_ore.json +53864c213b973e67006cda4596877bcdd3474396 data/bloodmagic/loot_tables/blocks/dungeon_pillar_cap.json +db8be3b67639ab451d0a28e0674240094ceea046 data/bloodmagic/loot_tables/blocks/dungeon_pillar_center.json +c3deab4dd4ef8c1cf6f217d660ea07e5d7bd8555 data/bloodmagic/loot_tables/blocks/dungeon_pillar_special.json +32d9f0674d7d416a5d668af187b89caede4188a3 data/bloodmagic/loot_tables/blocks/dungeon_polished.json +dc0822572a66634163dd630797b1b90d98d47c22 data/bloodmagic/loot_tables/blocks/dungeon_polished_gate.json +a44e605af1925a17a806c751f9f4279dbffa417f data/bloodmagic/loot_tables/blocks/dungeon_polished_stairs.json +d6f0610c923131dee1c8723231ffafd7a75eb689 data/bloodmagic/loot_tables/blocks/dungeon_polished_wall.json +e936d89fc5a75a786a455a32e9bce2f7b1bdcb34 data/bloodmagic/loot_tables/blocks/dungeon_smallbrick.json +b6732b30df9e946739a1913671a60f56090679f8 data/bloodmagic/loot_tables/blocks/dungeon_stone.json +69eb25424b97782eb86d9667581ada8d03e3b220 data/bloodmagic/loot_tables/blocks/dungeon_tile.json +6381473b6e0bc7c16b8214eb083f5069622b4dd1 data/bloodmagic/loot_tables/blocks/dungeon_tilespecial.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/duskritualstone.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/earthritualstone.json +2f27b244e5b3459408e9519dde05dc70cbb03998 data/bloodmagic/loot_tables/blocks/ethereal_mimic.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/fireritualstone.json +70ecedd4cea1655ce9fe5b1d3f72796a5c0ff133 data/bloodmagic/loot_tables/blocks/fungal_charge.json +59dd54a876b7ccd0b6c90f409753c2af2d687f03 data/bloodmagic/loot_tables/blocks/incensealtar.json +462a82b07e7fe3e479a2c072c73507686c339346 data/bloodmagic/loot_tables/blocks/largebloodstonebrick.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/lightritualstone.json +72610188b4538d98ffcd015c2813d63d19889d5f data/bloodmagic/loot_tables/blocks/masterritualstone.json +ce5bf03f0ee03205ef6a1b6f512cb5da23addc57 data/bloodmagic/loot_tables/blocks/mimic.json +842c4dce4e47561fe29d7b5c03d3953808ada929 data/bloodmagic/loot_tables/blocks/nether_soil.json +3892d33bbef90db50034b1358d4a9ee8b731bc8d data/bloodmagic/loot_tables/blocks/obsidianbrickpath.json +3576b2f9d92ab5bdc456cb904905fb5c969e55f3 data/bloodmagic/loot_tables/blocks/obsidiantilepath.json +95442c1bb740fab2eb8ee051f7184813f6023afa data/bloodmagic/loot_tables/blocks/orbcapacityrune.json +6c59e846922061c0f2249b0c73c3be89ec73ea31 data/bloodmagic/loot_tables/blocks/rawdemoncrystal.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/ritualstone.json +e0239eff7762a414a4e4faa0158d844dffb8c1f6 data/bloodmagic/loot_tables/blocks/sacrificerune.json +9b697e37046b6238b3a19eae9113b88010ccff32 data/bloodmagic/loot_tables/blocks/selfsacrificerune.json +fce757b3f3b79758be0fba70e016b3bdb373814e data/bloodmagic/loot_tables/blocks/shaped_charge.json +f748a5ba8838b50de0502f132fe2a65f4726dae6 data/bloodmagic/loot_tables/blocks/soulforge.json +015e07226fd90935f7ec663f4bcf3873a57a82d1 data/bloodmagic/loot_tables/blocks/speedrune.json +128ec3ee93e927d457beeb8161e80706e9239760 data/bloodmagic/loot_tables/blocks/steadfastdemoncrystal.json +8849e41b699c2eb7c3712a8e862bd9dd309a5c31 data/bloodmagic/loot_tables/blocks/stonebrickpath.json +6149fd464bafaabf35ca431202680c84cf5441b1 data/bloodmagic/loot_tables/blocks/stonetilepath.json +10b636d364f9ff72eb6db34f6f5e6aca704fc621 data/bloodmagic/loot_tables/blocks/veinmine_charge.json +33a22d9b198c93ed07ac69b7a594bb08db64b239 data/bloodmagic/loot_tables/blocks/vengefuldemoncrystal.json +26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/waterritualstone.json +04c5bc02383ddff04588af3a048ee3973e69666f data/bloodmagic/loot_tables/blocks/woodbrickpath.json +2c471cedf5e3e39610821766609646698d2b47e3 data/bloodmagic/loot_tables/blocks/woodtilepath.json +9ab0aac56f75e7811f9641a6a20ff8d9dd78876a data/bloodmagic/loot_tables/blocks/wornstonebrickpath.json +4a7395079f874ae08af94f64a8a00211a56e906a data/bloodmagic/loot_tables/blocks/wornstonetilepath.json +c95cd70b7ca320e18618c07827add555984b0e45 data/bloodmagic/loot_tables/test.json +966981b01944985f1fe5cfa72b21c9ceeebd9cc4 data/bloodmagic/recipes/alchemy_table.json +6e508e442b24c2a0e3f85026277c199cc0deada0 data/bloodmagic/recipes/alchemytable/arcane_ash.json +a343604b5a75e1b3810df97d024813fb041cffb6 data/bloodmagic/recipes/alchemytable/basic_cutting_fluid.json +cc28a48ec4b21be99c4ec13f6e560c322012192c data/bloodmagic/recipes/alchemytable/bow_power_anointment.json +6a93bcd65cf2636fc684276777f56630f82d710c data/bloodmagic/recipes/alchemytable/bread.json +e50009fa724173c2dcb4fab49b4f029039f69bf8 data/bloodmagic/recipes/alchemytable/clay_from_sand.json +72f8d4afe57970d3969a9373b18f8eac86b245bc data/bloodmagic/recipes/alchemytable/cobweb.json +96cc66cdb9c5f786eaa899e1fbdd38144e44a0fe data/bloodmagic/recipes/alchemytable/explosive_powder.json +1fa964af556af521d8eaf1a686befdd9d69c63af data/bloodmagic/recipes/alchemytable/flint_from_gravel.json +90b9431139014864558e96916eb835105f3b5a2f data/bloodmagic/recipes/alchemytable/fortune_anointment.json +7b4b20c316a4c2e533d8a123025a4424ea808142 data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json +aff95e4322f9e8daaffc2337964f95ab6f9d631c data/bloodmagic/recipes/alchemytable/grass_block.json +540edca1f507d366e55887b4429a9952c00f4060 data/bloodmagic/recipes/alchemytable/gunpowder.json +9f1b37b59f8abbe419306b3eb8af59317a54483a data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json +566352daaa6e6803df68475d964108b3f89cebd2 data/bloodmagic/recipes/alchemytable/holy_water_anointment.json +0657a60976678fdfbdf0b8ee2c178502520d194a data/bloodmagic/recipes/alchemytable/leather_from_flesh.json +c42ae24ad8955d8cf0a1f1096b0bca37d55621cf data/bloodmagic/recipes/alchemytable/looting_anointment.json +93620eaad39a46a97f3381ff5c645e59d7dddd16 data/bloodmagic/recipes/alchemytable/melee_damage_anointment.json +b18dde32d8a428f44437c0e53e5fdb990597498d data/bloodmagic/recipes/alchemytable/nether_wart_from_block.json +0a5ce0f2d09a596fb47b27a60e66eceeb04e0b0d data/bloodmagic/recipes/alchemytable/plantoil_from_beets.json +f1fd76dab242882e327b4677b95328cb3a52deee data/bloodmagic/recipes/alchemytable/plantoil_from_carrots.json +e9f5a06e4800cb03cc13480db9fdb7b9fa47f487 data/bloodmagic/recipes/alchemytable/plantoil_from_taters.json +f41e9bf8376ffcad07752b5657e27e06e500be0a data/bloodmagic/recipes/alchemytable/plantoil_from_wheat.json +6230b36712a5b6d239ec35b85e7fda0917ca7bc2 data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json +eb8f2ef0c592ba022190d727eec69d73b7437bac data/bloodmagic/recipes/alchemytable/reagent_air.json +755960529025fecd187cae962dc76988c1d52c8e data/bloodmagic/recipes/alchemytable/reagent_binding.json +47a4511054bd10454302a6b41eecfac942d27864 data/bloodmagic/recipes/alchemytable/reagent_blood_light.json +e50bf64f33ac29e704f553ef465c2631c1857777 data/bloodmagic/recipes/alchemytable/reagent_fastminer.json +00d41617bb2e67cdfcfcd87c3bb931726bd37e13 data/bloodmagic/recipes/alchemytable/reagent_growth.json +2c613ba6d23fb3a133963e48134893ac7e404042 data/bloodmagic/recipes/alchemytable/reagent_holding.json +e06d24e618d3f2f17cb34a79ac630bd81c85dc45 data/bloodmagic/recipes/alchemytable/reagent_lava.json +41969af0a92baece82c53a779f2e71aec71fe0cb data/bloodmagic/recipes/alchemytable/reagent_magnetism.json +cb5b17173d9f6b7dad40a59aa920f47601e1304e data/bloodmagic/recipes/alchemytable/reagent_sight.json +1f19c4b4070c9e519c83fc624cb401503d8178cb data/bloodmagic/recipes/alchemytable/reagent_void.json +ef693cd04a08d89990ec8bb2620ff5e7efc353fc data/bloodmagic/recipes/alchemytable/reagent_water.json +842713a090b5abf3ce967dbee90d7582f7414949 data/bloodmagic/recipes/alchemytable/sand_coal.json +9292733697eca52de2c2ac7325ba45ab0354bfa3 data/bloodmagic/recipes/alchemytable/sand_gold.json +06f00cce47e0d5e5d25a2587796494340f8a3278 data/bloodmagic/recipes/alchemytable/sand_iron.json +3e3359b89a8c38c0fdeb2b4ca2920bce053082f8 data/bloodmagic/recipes/alchemytable/silk_touch_anointment.json +f7e91d164ea5c782420ff3507a98da16c5915b73 data/bloodmagic/recipes/alchemytable/slate_vial.json +4158f21d795aeeec52cfdec718ba9f82b0f2d10d data/bloodmagic/recipes/alchemytable/smelting_anointment.json +a91e81c79959b522bcd1bac901bca646184015de data/bloodmagic/recipes/alchemytable/string.json +3c9d829f7bff8a4d607c46fc3ff4f86dffa28fd5 data/bloodmagic/recipes/altar/air_tool.json +f41b0e9dfab608c42a85c3c5c5bbc050b03f02a1 data/bloodmagic/recipes/altar/apprenticebloodorb.json +2269c03d8ba4b790fb6a30c32bdb0169c283e5e2 data/bloodmagic/recipes/altar/bucket_life.json +2a67e37497a571b5ee944375d315fddccea87697 data/bloodmagic/recipes/altar/daggerofsacrifice.json +c5a4a256a7437f2e13c574a6f0c4d75fc2e718cb data/bloodmagic/recipes/altar/demonicslate.json +d79a96eb3eed597f1c18a8983764a6362a24748c data/bloodmagic/recipes/altar/dusk_tool.json +7272cdd4e1469cf83849e5444b4b93a7563a6bf2 data/bloodmagic/recipes/altar/earth_tool.json +37913b1babf9b8159332db09b114c919b1b49473 data/bloodmagic/recipes/altar/fire_tool.json +9aeb0d2d33d839eedb2d9bbdaf76fc73e0b39941 data/bloodmagic/recipes/altar/imbuedslate.json +2643d1516f6dae79128fdc8c48c4cfe23453f171 data/bloodmagic/recipes/altar/magicianbloodorb.json +5996888ae6e4ae9afc86a5d629a729d624fc4372 data/bloodmagic/recipes/altar/masterbloodorb.json +30d84c946ad9235f6e59f1046edbe8d44acc799e data/bloodmagic/recipes/altar/reinforcedslate.json +584d01dff4d64bb88bd3783751a29723700f1728 data/bloodmagic/recipes/altar/slate.json +5e6289a1c8deb414202bba0f16fc09f9fdf7add0 data/bloodmagic/recipes/altar/soul_snare.json +926d4a0e165c87a15a609744d832d2f5f04a40d0 data/bloodmagic/recipes/altar/water_tool.json +dd59da50b674ec8f680e01a91261bf34091075cf data/bloodmagic/recipes/altar/weakbloodorb.json +5807b2515f4a2dc9855327940e6055f6947f0749 data/bloodmagic/recipes/arc.json +f35bb47d609201f6568b598307ae9d157792fe3e data/bloodmagic/recipes/arc/clay_from_sand.json +6b8ba1822bac8a1af426a14f87d613dc89e3fca0 data/bloodmagic/recipes/arc/clay_from_terracotta.json +5206a65f02d3bea5c23164325eb23ce8e928102f data/bloodmagic/recipes/arc/dustsfrom_gravel_gold.json +5af6c601a7be4c0fc4811befa59324c1a2cdb758 data/bloodmagic/recipes/arc/dustsfrom_gravel_iron.json +6f3f5d2f3054d61a3965b10bcebc8cefe107cf5f data/bloodmagic/recipes/arc/dustsfrom_gravel_netherite_scrap.json +b5d3a7ee94494665a9e69519da43a0d4056deb76 data/bloodmagic/recipes/arc/dustsfrom_ingot_gold.json +a31e17fb2da1259fb186cfd07c9cd500e6354518 data/bloodmagic/recipes/arc/dustsfrom_ingot_iron.json +b9dc41ad0d9ee6035084a8e9a8eb920223817d33 data/bloodmagic/recipes/arc/dustsfrom_ingot_netherite_scrap.json +e0846e670dc94334ba695d2a1182527a5016cd31 data/bloodmagic/recipes/arc/dustsfrom_ore_gold.json +855c963531471cedd2f5f067801b96c0bd6a0c56 data/bloodmagic/recipes/arc/dustsfrom_ore_iron.json +e410be937d52aea0f186aa14fa9b2929a98ffaf3 data/bloodmagic/recipes/arc/dustsfrom_ore_netherite_scrap.json +517a3b7a6bbfc486777f509c2d9af6490ff722c9 data/bloodmagic/recipes/arc/fragmentsgold.json +d8b9e64d14e67299aa08888246cdead76ebd91ce data/bloodmagic/recipes/arc/fragmentsiron.json +ec54b6d447bf5709b15d7bccb9c7d0790661f621 data/bloodmagic/recipes/arc/fragmentsnetherite_scrap.json +0275b4a539ccac64818c19bcb5351408eea9d193 data/bloodmagic/recipes/arc/gravelsgold.json +32b0aeab82c1d98b86b162e98036b2591ccf649c data/bloodmagic/recipes/arc/gravelsiron.json +f83ad96ea74fd51f1fd78ee40ff0fbeb08755b12 data/bloodmagic/recipes/arc/gravelsnetherite_scrap.json +2eb26a1af68ed7a5fdb6ac9d4bbc7557729c56cd data/bloodmagic/recipes/arc/netherrack_to_sulfer.json +0a6a8034c55d093fed458759bbc85e5893712d35 data/bloodmagic/recipes/arc/ore/dustgold.json +b2760564e300976d88a3938bc0e9e2d2defa0841 data/bloodmagic/recipes/arc/ore/dustiron.json +249229687c1b41a4191c455278624b642b501b4e data/bloodmagic/recipes/arc/reversion/apprentice_blood_orb.json +a2b7d868ac099dd6fb29fa54892aad90e29d028d data/bloodmagic/recipes/arc/reversion/magician_blood_orb.json +a7f51456052d0fd317164d400cdd595ae2687df8 data/bloodmagic/recipes/arc/reversion/master_blood_orb.json +8d9d66d63e21cc8a6f02fac2111f5d169c8542ff data/bloodmagic/recipes/arc/reversion/weak_blood_orb.json +1e5814caf63714b8e1ff2b2f413a86ba8c840ebb data/bloodmagic/recipes/arc/weakbloodshard.json +e1285ec51100f2336c1ea1a1a3057e74a0dd84d1 data/bloodmagic/recipes/array/airsigil.json +d1ac23080f72f21adb5908befefe965ffb4efd4f data/bloodmagic/recipes/array/bloodlightsigil.json +f6b6c72c0a2d6b3e602976f0dd2dfa778be41777 data/bloodmagic/recipes/array/bounce.json +7110895fe75e65404bc66d6c09087d9e58220a11 data/bloodmagic/recipes/array/day.json +1890706e5b93cd6df764b0419483c348e0d7f277 data/bloodmagic/recipes/array/divinationsigil.json +4bd220ced486f1d8fc4468ebd61dac755670d716 data/bloodmagic/recipes/array/fastminersigil.json +d9ae32c70d4bd872f22229006ad3c8e0cf7e3721 data/bloodmagic/recipes/array/grove.json +f191a3c9982b827b0b2ba93164a81fc4f8cb0959 data/bloodmagic/recipes/array/growthsigil.json +4452b681c328ed01ec680b6b68cb2a0aee11ed3d data/bloodmagic/recipes/array/holdingsigil.json +78c880321f0bfad14239d4b9d2edae170a7fa86e data/bloodmagic/recipes/array/lavasigil.json +165f8f8ba7ae094cdd1367716a0797a0f8d4d605 data/bloodmagic/recipes/array/living_boots.json +1de17e8a769d471c934835955184d0c8782fb619 data/bloodmagic/recipes/array/living_helmet.json +4a48885f110a87505381c7e2f2607d30612a3604 data/bloodmagic/recipes/array/living_leggings.json +5e3c6dd7bfcd16e79f17e963d8c1b59c0d1aebe9 data/bloodmagic/recipes/array/living_plate.json +8b1007de1b7fca5d27b54d7c9839cde9e47ab1c0 data/bloodmagic/recipes/array/magnetismsigil.json +7a674784e0d8d4f6f071a72d26ba677087976970 data/bloodmagic/recipes/array/movement.json +5c208259e33c3a56c5d6f6ab951ac0c4d5b60e26 data/bloodmagic/recipes/array/night.json +6fd91801759c6a7a018b9d18601fc3db4d3ee3b4 data/bloodmagic/recipes/array/seersigil.json +1921cc1cba3bcc36a6be6edd377dd44eb9b884a0 data/bloodmagic/recipes/array/spike.json +085bf564ec74060e5c0224155cefc6ba0635c2c8 data/bloodmagic/recipes/array/updraft.json +cabe693e7c714203ad708a1068f302b3ee3120b0 data/bloodmagic/recipes/array/voidsigil.json +5e68d933fff631142a8dd819aee235d343d43cff data/bloodmagic/recipes/array/watersigil.json +ac895b8c95ca10d61ae6efedfe5815b980588433 data/bloodmagic/recipes/blood_altar.json +f4de3cfc4616f762b4a87b08510153ae06733528 data/bloodmagic/recipes/blood_rune_acceleration.json +78e3f4666bc13897821abec9fa41e8b72accd007 data/bloodmagic/recipes/blood_rune_aug_capacity.json +2f31d0108cdb0cca056405023bd0ac64b6c02524 data/bloodmagic/recipes/blood_rune_blank.json +5c4e4af372250a3f967666f0f97198547cfbd5e1 data/bloodmagic/recipes/blood_rune_capacity.json +f905c1a8ca4d3a9f841ca6c44caa91de327fc29d data/bloodmagic/recipes/blood_rune_charging.json +ac0ee73ab691edd09be24453bd3fe3dc1a8f1ecb data/bloodmagic/recipes/blood_rune_displacement.json +89563d5c176d465632a45005cbe5e570791fd8dd data/bloodmagic/recipes/blood_rune_orb.json +b63d77c3762f86d4a91f62e192c3e9b26e3b52ca data/bloodmagic/recipes/blood_rune_sacrifice.json +7c4e247c1df6ef594bbb2fc2196afb102f45982b data/bloodmagic/recipes/blood_rune_self_sacrifice.json +e2bcf2a6f951fbcef45554ec90ba28d14e261d18 data/bloodmagic/recipes/blood_rune_speed.json +eeb5e64b8bc90adc2554dde88b8792b92ad7c8cc data/bloodmagic/recipes/bloodstonebrick.json +68e9201ef0d0051618a73434b35791a208bacde1 data/bloodmagic/recipes/corrupted_dust.json +ab11cf6806dab2a2d1cda2f7fde9cd2ecd9cdf9f data/bloodmagic/recipes/experience_tome.json +84aeee900c15d94f1940e72c8f331755d0a97b11 data/bloodmagic/recipes/hellforged_block.json +9a5749465020b32b0147b3367784ce31a0d3b54b data/bloodmagic/recipes/incense_altar.json +63bca28ba5eebb9c488c819bcb117595eadb877d data/bloodmagic/recipes/largebloodstonebrick.json +9dedad36e9d2ab6688e069c2e6df3851c395b583 data/bloodmagic/recipes/lava_crystal.json +50d84717ac673875e4b52522b583f564a8a75e8e data/bloodmagic/recipes/path/path_stone.json +2756ff3f29e1231795671c94fdaf9e5abc65bbee data/bloodmagic/recipes/path/path_stonetile.json +dcb702aeb768bc0ff5d1f05c5ac95066c4082193 data/bloodmagic/recipes/path/path_wood.json +7491b9f62c29d2fde6ff1dbff09f16f458b9afe8 data/bloodmagic/recipes/path/path_woodtile.json +d85f637e3c87ba050c24581b8f4bef4176e1ba14 data/bloodmagic/recipes/path/path_wornstone.json +2ee3e7f073df764289939b8df814cc8f056eced0 data/bloodmagic/recipes/path/path_wornstonetile.json +0b1a11f0e1b6bc317e2dbf04560a81581623f41e data/bloodmagic/recipes/primitive_furnace_cell.json +7e1a70935e9b5ba6b345af6a7077287896ec6cfe data/bloodmagic/recipes/primitive_hydration_cell.json +bfd7925ad30534463d7daf0f7dce03cf1502cbcf data/bloodmagic/recipes/ritual_diviner_0.json +2ec436681cdd169bae99d090bb889c2a45420b6c data/bloodmagic/recipes/ritual_diviner_1.json +18accae45d6c592b108c227c629caf15e430bf2b data/bloodmagic/recipes/ritual_reader.json +7757e5fd52f71b0d21595e072593fc592210dd64 data/bloodmagic/recipes/ritual_stone_blank.json +8608f828f997b1a8015287bd9cd436e9d7dff2ff data/bloodmagic/recipes/ritual_stone_master.json +aefbf1fd258f1cda8d04db7e0794b9612993e6bf data/bloodmagic/recipes/sacrificial_dagger.json +1eab0535b38c4a8a021a72244b9e6a75353970f0 data/bloodmagic/recipes/smelting/ingot_gold.json +b644726cea2da0626f33b60fbc64701f26d48561 data/bloodmagic/recipes/smelting/ingot_hellforged.json +477f968ee84a5b9cd3e9c2a9864be32b5e7d3a32 data/bloodmagic/recipes/smelting/ingot_iron.json +06855bcd8951355604ab1e63b5db717382430967 data/bloodmagic/recipes/smelting/ingot_netherite_scrap.json +d4ee90b52934c7c530fb031dcf81d4f1ccb27a9b data/bloodmagic/recipes/soul_forge.json +8b64af8453c60b6b1ae55bd0dd1a68fe95e8ba19 data/bloodmagic/recipes/soulforge/commontartaricgem.json +659db62f8fb71c792b00d6409b1c9a2f1ca96048 data/bloodmagic/recipes/soulforge/corrosive_crystal_block.json +5ad148899ed46134ae0572b220736b9d38004980 data/bloodmagic/recipes/soulforge/deforester_charge.json +26d7fb7f868bcc96ce268adccead7207d5559afb data/bloodmagic/recipes/soulforge/deforester_charge_fortune_1.json +40ae097cd8b3c0dcd38f7032d928acdb71da13da data/bloodmagic/recipes/soulforge/deforester_charge_silk_touch.json +bd63ccb772c829a4a50df17f06a641353dc3b98e data/bloodmagic/recipes/soulforge/deforester_charge_smelting.json +2c90f1da43a79e61d2b6b09c012d08f53b133264 data/bloodmagic/recipes/soulforge/demon_crucible.json +bc4ad3b44720a3f7363ef53027b4aae35622e7c1 data/bloodmagic/recipes/soulforge/demon_crystallizer.json +759279a190f3bc74e162dedf0f5d311267e06fbc data/bloodmagic/recipes/soulforge/destructive_crystal_block.json +78f0e3dc5fa61d8f9c182a3608184f21925f79db data/bloodmagic/recipes/soulforge/fungal_charge.json +61003f9b47ae96e5bccd518d514ef2532ce6e028 data/bloodmagic/recipes/soulforge/fungal_charge_fortune_1.json +9f7efc88c863110e6253b8877eee93c2e6533090 data/bloodmagic/recipes/soulforge/fungal_charge_silk_touch.json +a625c60e99970a93cb188e17579bcb958890d7a9 data/bloodmagic/recipes/soulforge/fungal_charge_smelting.json +0b82d2354aaa635b4fe5514e4815298ee0dedf80 data/bloodmagic/recipes/soulforge/greatertartaricgem.json +d46b61779b3c8382862d4e66c3909a1241ecca18 data/bloodmagic/recipes/soulforge/lessertartaricgem.json +d6e06747c75fc06e708a15358911f1c63eee86b1 data/bloodmagic/recipes/soulforge/pettytartaricgem.json +2468dd785e301732b1be8108caa468bdd5008e46 data/bloodmagic/recipes/soulforge/primitive_crystalline_resonator.json +535a9ec33a425bde205dffc3254635741d1c82d6 data/bloodmagic/recipes/soulforge/raw_crystal_block.json +4a4340f334c51beaacb77fd201298ad94b71e79c data/bloodmagic/recipes/soulforge/sanguine_reverter.json +799c9b83373966f70bbd6777cdae0ff2ff89fd84 data/bloodmagic/recipes/soulforge/sentientaxe.json +6d94372ffffbe36ca91ed2a5e46991bff896726c data/bloodmagic/recipes/soulforge/sentientpickaxe.json +6b47831e5c2f3033b6706706d810fa96d8abebd6 data/bloodmagic/recipes/soulforge/sentientscythe.json +6dcced40126f950b85f868aa04c77e90b71b69f2 data/bloodmagic/recipes/soulforge/sentientshovel.json +7e281841a2953c1284d332c2bbf75097f8128241 data/bloodmagic/recipes/soulforge/sentientsword.json +dc977e9d98fcba66fbcce3f6c31a746db5ed60f5 data/bloodmagic/recipes/soulforge/shaped_charge.json +865cac49dd9604f35577aa6cfd2756946b49b8b1 data/bloodmagic/recipes/soulforge/shaped_charge_fortune_1.json +83b9b038785f449e4948cf17f8fa35457c24a3cb data/bloodmagic/recipes/soulforge/shaped_charge_silk_touch.json +7417c0ad20f4c23a7fed958f658e6dc96720ec60 data/bloodmagic/recipes/soulforge/shaped_charge_smelting.json +c4102a1573e632d0b9f894353b0d522a51a7c65e data/bloodmagic/recipes/soulforge/steadfast_crystal_block.json +ed0875aaba76e013684b8ea2f8275d5563e90e98 data/bloodmagic/recipes/soulforge/throwing_dagger.json +b081dbc0865421df6a591366393ffdbceb205907 data/bloodmagic/recipes/soulforge/throwing_dagger_syringe.json +978033adf58e34fa317bcea448ac1ddf3f0cd69e data/bloodmagic/recipes/soulforge/vein_charge.json +a06bb2d29cfa5d9c38092e93196bed7f331bcc97 data/bloodmagic/recipes/soulforge/vein_charge_fortune_1.json +29a712f5e12e1702f6221c4c8918ba37299edd7c data/bloodmagic/recipes/soulforge/vein_charge_silk_touch.json +911023ba84eed7836875793a21c32a83755760d3 data/bloodmagic/recipes/soulforge/vein_charge_smelting.json +3aa852edda803a2225ebe53d2daa55bd46b0a1b9 data/bloodmagic/recipes/soulforge/vengeful_crystal_block.json +d7d993bb729284a5201c164ea81fbe1d8e4e4750 data/bloodmagic/recipes/weak_activation_crystal.json +cf63fdccec992f2cb36c72843791623463cecc44 data/bloodmagic/tags/items/arc/cuttingfluid.json +54a0fcc973590c80a4d3cd6b82f5602ba7208438 data/bloodmagic/tags/items/arc/explosive.json +331b978ba851ae3c48390c5d992bcd5f28ac644d data/bloodmagic/tags/items/arc/furnace.json +a62b82e1f59284d230b4b983ffa4a4cecb288c0e data/bloodmagic/tags/items/arc/hydrate.json +9689738644fcfa3a80effc6ee150b67c67e8b8f4 data/bloodmagic/tags/items/arc/resonator.json +65326040c8974fcfcc8711d29040b4297ff55ec1 data/bloodmagic/tags/items/arc/reverter.json +14fb88c612622be110e273818eee9512cd285d56 data/bloodmagic/tags/items/arc/sieve.json +bcd2befe59cbb4931c8c9bed183d19b2a469e506 data/bloodmagic/tags/items/arc/tool.json +2bdc1397bd092d373f785f08a2befdce8c1c1e2e data/bloodmagic/tags/items/crystals/demon.json +dab44ece8bcdf079b349fc4f49da67aafe9c4cf7 data/bloodmagic/tags/items/dusts/corrupted.json +dc8d6f8f8d128499f3d2632ef1bc353cc49d1ddb data/bloodmagic/tags/items/fragments/gold.json +a60c7b779168689387a03f00002bfd8380d919e5 data/bloodmagic/tags/items/fragments/iron.json +590aab8d5f5a4ed18dd211865e917674dcabfea0 data/bloodmagic/tags/items/fragments/netherite_scrap.json +af9b1a9ba1b16a85e3e1cf84b99e4cc9e12f9886 data/bloodmagic/tags/items/gravels/gold.json +19547e1b8859f1e2f1ae858e74b4456fc20be53f data/bloodmagic/tags/items/gravels/iron.json +3597daeddb742612d0b7fe2d0f711251a2781ac2 data/bloodmagic/tags/items/gravels/netherite_scrap.json +04fdfff381183672d6d7b3e55ded42a0a5b89f16 data/bloodmagic/tags/items/tiny_dusts/corrupted.json +b7b3ffae086763317f5ed70a4f857e9634932972 data/forge/tags/fluids/life.json +4f8f46a7e30fe81d36790d3ffed37efef7c87d06 data/forge/tags/items/dusts/coal.json +82f2679934e550a1188658350e52cfac7c450c4d data/forge/tags/items/dusts/gold.json +205d57b4f622a13fceda5e8062d9bba80d619e92 data/forge/tags/items/dusts/hellforged.json +625a1e6a3b635b2ac5176a49afbae9b476de4f71 data/forge/tags/items/dusts/iron.json +05fbe38ee5bdb3d912a5980254886ad64399e062 data/forge/tags/items/dusts/netherite_scrap.json +9380fe45b06787ba776af4a7d542a047c1441031 data/forge/tags/items/dusts/saltpeter.json +5c709b6444acb94ca784c33618547ba535e15db2 data/forge/tags/items/dusts/sulfur.json +ca758f49ba878f8e498fe156d4916c1e332d552c data/forge/tags/items/ingots/hellforged.json +74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/copper.json +74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/lead.json +74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/osmium.json +74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/silver.json +74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/tin.json +d348e6ef5f30db7c6c6ef2aac89c45e9c4c6fef7 data/minecraft/tags/blocks/mushroom_hyphae.json +95fd3a7b178a92c5aecdd097fec5359f14a06c13 data/minecraft/tags/blocks/mushroom_stem.json +2ba6f93ee0567360afa3ae9999027b839ed06532 data/minecraft/tags/blocks/walls.json +d348e6ef5f30db7c6c6ef2aac89c45e9c4c6fef7 data/minecraft/tags/items/mushroom_hyphae.json +95fd3a7b178a92c5aecdd097fec5359f14a06c13 data/minecraft/tags/items/mushroom_stem.json diff --git a/src/generated/resources/assets/bloodmagic/blockstates/accelerationrune.json b/src/generated/resources/assets/bloodmagic/blockstates/accelerationrune.json new file mode 100644 index 00000000..dc97d5de --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/accelerationrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/accelerationrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/airritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/airritualstone.json new file mode 100644 index 00000000..a64ce156 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/airritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/airritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/alchemicalreactionchamber.json b/src/generated/resources/assets/bloodmagic/blockstates/alchemicalreactionchamber.json new file mode 100644 index 00000000..05658c8b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/alchemicalreactionchamber.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=north,lit=false": { + "model": "bloodmagic:block/alchemicalreactionchamber" + }, + "facing=south,lit=false": { + "model": "bloodmagic:block/alchemicalreactionchamber", + "y": 180 + }, + "facing=west,lit=false": { + "model": "bloodmagic:block/alchemicalreactionchamber", + "y": 270 + }, + "facing=east,lit=false": { + "model": "bloodmagic:block/alchemicalreactionchamber", + "y": 90 + }, + "facing=north,lit=true": { + "model": "bloodmagic:block/alchemicalreactionchamber" + }, + "facing=south,lit=true": { + "model": "bloodmagic:block/alchemicalreactionchamber", + "y": 180 + }, + "facing=west,lit=true": { + "model": "bloodmagic:block/alchemicalreactionchamber", + "y": 270 + }, + "facing=east,lit=true": { + "model": "bloodmagic:block/alchemicalreactionchamber", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/altarcapacityrune.json b/src/generated/resources/assets/bloodmagic/blockstates/altarcapacityrune.json new file mode 100644 index 00000000..f5a088ea --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/altarcapacityrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/altarcapacityrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/bettercapacityrune.json b/src/generated/resources/assets/bloodmagic/blockstates/bettercapacityrune.json new file mode 100644 index 00000000..ead6c945 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/bettercapacityrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/bettercapacityrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/blankrune.json b/src/generated/resources/assets/bloodmagic/blockstates/blankrune.json new file mode 100644 index 00000000..d211f0a6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/blankrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/blankrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/bloodlight.json b/src/generated/resources/assets/bloodmagic/blockstates/bloodlight.json new file mode 100644 index 00000000..dfa612f0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/bloodlight.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/bloodlight" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/bloodstonebrick.json b/src/generated/resources/assets/bloodmagic/blockstates/bloodstonebrick.json new file mode 100644 index 00000000..4bf17916 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/bloodstonebrick.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/bloodstonebrick" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/chargingrune.json b/src/generated/resources/assets/bloodmagic/blockstates/chargingrune.json new file mode 100644 index 00000000..5c238290 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/chargingrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/chargingrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json new file mode 100644 index 00000000..fb67a253 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json @@ -0,0 +1,431 @@ +{ + "multipart": [ + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal1", + "x": 180 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal1" + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal1", + "x": 90 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal1", + "x": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal1", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal1", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal2", + "x": 180 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal2" + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal2", + "x": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal2", + "x": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal2", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal2", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal3", + "x": 180 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal3" + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal3", + "x": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal3", + "x": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal3", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal3", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal4", + "x": 180 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal4" + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal4", + "x": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal4", + "x": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal4", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal4", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal5", + "x": 180 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal5" + } + }, + { + "when": { + "age": "4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal5", + "x": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal5", + "x": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal5", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal5", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal6", + "x": 180 + } + }, + { + "when": { + "age": "5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal6" + } + }, + { + "when": { + "age": "5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal6", + "x": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal6", + "x": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal6", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal6", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal7", + "x": 180 + } + }, + { + "when": { + "age": "6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal7" + } + }, + { + "when": { + "age": "6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal7", + "x": 90 + } + }, + { + "when": { + "age": "6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal7", + "x": 270 + } + }, + { + "when": { + "age": "6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal7", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/corrosivecrystal7", + "x": 90, + "y": 90 + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/creeping_doubt.json b/src/generated/resources/assets/bloodmagic/blockstates/creeping_doubt.json new file mode 100644 index 00000000..d7e819a0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/creeping_doubt.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "bloodmagic:block/creeping_doubt_1" + }, + "age=1": { + "model": "bloodmagic:block/creeping_doubt_2" + }, + "age=2": { + "model": "bloodmagic:block/creeping_doubt_3" + }, + "age=3": { + "model": "bloodmagic:block/creeping_doubt_4" + }, + "age=4": { + "model": "bloodmagic:block/creeping_doubt_5" + }, + "age=5": { + "model": "bloodmagic:block/creeping_doubt_6" + }, + "age=6": { + "model": "bloodmagic:block/creeping_doubt_7" + }, + "age=7": { + "model": "bloodmagic:block/creeping_doubt_8" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/deforester_charge.json b/src/generated/resources/assets/bloodmagic/blockstates/deforester_charge.json new file mode 100644 index 00000000..bac5692f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/deforester_charge.json @@ -0,0 +1,29 @@ +{ + "variants": { + "attached=down": { + "model": "bloodmagic:block/deforester_charge", + "x": 180 + }, + "attached=up": { + "model": "bloodmagic:block/deforester_charge" + }, + "attached=north": { + "model": "bloodmagic:block/deforester_charge", + "x": 90 + }, + "attached=south": { + "model": "bloodmagic:block/deforester_charge", + "x": 270 + }, + "attached=west": { + "model": "bloodmagic:block/deforester_charge", + "x": 90, + "y": 270 + }, + "attached=east": { + "model": "bloodmagic:block/deforester_charge", + "x": 90, + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json new file mode 100644 index 00000000..b99a263f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json @@ -0,0 +1,431 @@ +{ + "multipart": [ + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal1", + "x": 180 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal1" + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal1", + "x": 90 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal1", + "x": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal1", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal1", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal2", + "x": 180 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal2" + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal2", + "x": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal2", + "x": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal2", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal2", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal3", + "x": 180 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal3" + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal3", + "x": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal3", + "x": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal3", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal3", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal4", + "x": 180 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal4" + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal4", + "x": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal4", + "x": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal4", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal4", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal5", + "x": 180 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal5" + } + }, + { + "when": { + "age": "4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal5", + "x": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal5", + "x": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal5", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal5", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal6", + "x": 180 + } + }, + { + "when": { + "age": "5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal6" + } + }, + { + "when": { + "age": "5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal6", + "x": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal6", + "x": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal6", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal6", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal7", + "x": 180 + } + }, + { + "when": { + "age": "6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal7" + } + }, + { + "when": { + "age": "6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal7", + "x": 90 + } + }, + { + "when": { + "age": "6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal7", + "x": 270 + } + }, + { + "when": { + "age": "6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal7", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/destructivecrystal7", + "x": 90, + "y": 90 + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dislocationrune.json b/src/generated/resources/assets/bloodmagic/blockstates/dislocationrune.json new file mode 100644 index 00000000..e788f3d5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dislocationrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dislocationrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick1.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick1.json new file mode 100644 index 00000000..149337cf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick1.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_brick1" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick2.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick2.json new file mode 100644 index 00000000..2be23091 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick2.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_brick2" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick3.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick3.json new file mode 100644 index 00000000..b5c84c5c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick3.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_brick3" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_assorted.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_assorted.json new file mode 100644 index 00000000..81dc572a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_assorted.json @@ -0,0 +1,15 @@ +{ + "variants": { + "": [ + { + "model": "bloodmagic:block/dungeon_brick1" + }, + { + "model": "bloodmagic:block/dungeon_brick2" + }, + { + "model": "bloodmagic:block/dungeon_brick3" + } + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_gate.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_gate.json new file mode 100644 index 00000000..4dae3f78 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_gate.json @@ -0,0 +1,80 @@ +{ + "variants": { + "facing=north,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate", + "uvlock": true + }, + "facing=west,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate", + "y": 270, + "uvlock": true + }, + "facing=north,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate_wall", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate_wall", + "uvlock": true + }, + "facing=west,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate_wall", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_brick_gate_wall", + "y": 270, + "uvlock": true + }, + "facing=north,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_open", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_open", + "uvlock": true + }, + "facing=west,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_open", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_open", + "y": 270, + "uvlock": true + }, + "facing=north,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_wall_open", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_wall_open", + "uvlock": true + }, + "facing=west,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_wall_open", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_brick_gate_wall_open", + "y": 270, + "uvlock": true + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_stairs.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_stairs.json new file mode 100644 index 00000000..f36609c1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_stairs.json @@ -0,0 +1,209 @@ +{ + "variants": { + "facing=north,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=south,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=west,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=east,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "x": 180, + "uvlock": true + }, + "facing=north,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "y": 270, + "uvlock": true + }, + "facing=south,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "y": 90, + "uvlock": true + }, + "facing=west,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs", + "y": 180, + "uvlock": true + }, + "facing=east,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_brick_stairs" + }, + "facing=north,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=south,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=west,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=east,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "uvlock": true + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "y": 180, + "uvlock": true + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner" + }, + "facing=west,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "y": 90, + "uvlock": true + }, + "facing=east,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "y": 270, + "uvlock": true + }, + "facing=north,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "uvlock": true + }, + "facing=south,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=west,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=east,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "y": 270, + "uvlock": true + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "y": 90, + "uvlock": true + }, + "facing=west,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner", + "y": 180, + "uvlock": true + }, + "facing=east,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_inner" + }, + "facing=north,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=south,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=west,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=east,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "uvlock": true + }, + "facing=north,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "y": 180, + "uvlock": true + }, + "facing=south,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer" + }, + "facing=west,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "y": 90, + "uvlock": true + }, + "facing=east,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "y": 270, + "uvlock": true + }, + "facing=north,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "uvlock": true + }, + "facing=south,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=west,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=east,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "y": 270, + "uvlock": true + }, + "facing=south,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "y": 90, + "uvlock": true + }, + "facing=west,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer", + "y": 180, + "uvlock": true + }, + "facing=east,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_brick_stairs_outer" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_wall.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_wall.json new file mode 100644 index 00000000..9ffbb2d4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_brick_wall.json @@ -0,0 +1,90 @@ +{ + "multipart": [ + { + "when": { + "up": "true" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_post" + } + }, + { + "when": { + "east": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side", + "y": 90, + "uvlock": true + } + }, + { + "when": { + "east": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side_tall", + "y": 90, + "uvlock": true + } + }, + { + "when": { + "north": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side", + "uvlock": true + } + }, + { + "when": { + "north": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side_tall", + "uvlock": true + } + }, + { + "when": { + "south": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side", + "y": 180, + "uvlock": true + } + }, + { + "when": { + "south": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side_tall", + "y": 180, + "uvlock": true + } + }, + { + "when": { + "west": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side", + "y": 270, + "uvlock": true + } + }, + { + "when": { + "west": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_brick_wall_side_tall", + "y": 270, + "uvlock": true + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_eye.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_eye.json new file mode 100644 index 00000000..baa1f6ce --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_eye.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_eye" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_metal.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_metal.json new file mode 100644 index 00000000..bef6c3bf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_metal.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_metal" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json new file mode 100644 index 00000000..a44ddeae --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_ore" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_cap.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_cap.json new file mode 100644 index 00000000..cc2654a2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_cap.json @@ -0,0 +1,22 @@ +{ + "variants": { + "facing=down": { + "model": "bloodmagic:block/dungeon_pillar_cap_down" + }, + "facing=up": { + "model": "bloodmagic:block/dungeon_pillar_cap" + }, + "facing=north": { + "model": "bloodmagic:block/dungeon_pillar_cap_north" + }, + "facing=south": { + "model": "bloodmagic:block/dungeon_pillar_cap_south" + }, + "facing=west": { + "model": "bloodmagic:block/dungeon_pillar_cap_west" + }, + "facing=east": { + "model": "bloodmagic:block/dungeon_pillar_cap_east" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_center.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_center.json new file mode 100644 index 00000000..56d64ff0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_center.json @@ -0,0 +1,13 @@ +{ + "variants": { + "axis=x": { + "model": "bloodmagic:block/dungeon_pillar_center_x" + }, + "axis=y": { + "model": "bloodmagic:block/dungeon_pillar_center" + }, + "axis=z": { + "model": "bloodmagic:block/dungeon_pillar_center_z" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_special.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_special.json new file mode 100644 index 00000000..6b7e479d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_pillar_special.json @@ -0,0 +1,13 @@ +{ + "variants": { + "axis=x": { + "model": "bloodmagic:block/dungeon_pillar_special_x" + }, + "axis=y": { + "model": "bloodmagic:block/dungeon_pillar_special" + }, + "axis=z": { + "model": "bloodmagic:block/dungeon_pillar_special_z" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished.json new file mode 100644 index 00000000..0a334ab3 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_polished" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_gate.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_gate.json new file mode 100644 index 00000000..467dc35d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_gate.json @@ -0,0 +1,80 @@ +{ + "variants": { + "facing=north,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate", + "uvlock": true + }, + "facing=west,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=false,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate", + "y": 270, + "uvlock": true + }, + "facing=north,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate_wall", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate_wall", + "uvlock": true + }, + "facing=west,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate_wall", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=true,open=false": { + "model": "bloodmagic:block/dungeon_polished_gate_wall", + "y": 270, + "uvlock": true + }, + "facing=north,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_open", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_open", + "uvlock": true + }, + "facing=west,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_open", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=false,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_open", + "y": 270, + "uvlock": true + }, + "facing=north,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_wall_open", + "y": 180, + "uvlock": true + }, + "facing=south,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_wall_open", + "uvlock": true + }, + "facing=west,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_wall_open", + "y": 90, + "uvlock": true + }, + "facing=east,in_wall=true,open=true": { + "model": "bloodmagic:block/dungeon_polished_gate_wall_open", + "y": 270, + "uvlock": true + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_stairs.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_stairs.json new file mode 100644 index 00000000..0b576e77 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_stairs.json @@ -0,0 +1,209 @@ +{ + "variants": { + "facing=north,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=south,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=west,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=east,half=top,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "x": 180, + "uvlock": true + }, + "facing=north,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "y": 270, + "uvlock": true + }, + "facing=south,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "y": 90, + "uvlock": true + }, + "facing=west,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs", + "y": 180, + "uvlock": true + }, + "facing=east,half=bottom,shape=straight": { + "model": "bloodmagic:block/dungeon_polished_stairs" + }, + "facing=north,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=south,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=west,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=east,half=top,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "uvlock": true + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "y": 180, + "uvlock": true + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner" + }, + "facing=west,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "y": 90, + "uvlock": true + }, + "facing=east,half=bottom,shape=inner_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "y": 270, + "uvlock": true + }, + "facing=north,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "uvlock": true + }, + "facing=south,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=west,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=east,half=top,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "y": 270, + "uvlock": true + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "y": 90, + "uvlock": true + }, + "facing=west,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner", + "y": 180, + "uvlock": true + }, + "facing=east,half=bottom,shape=inner_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_inner" + }, + "facing=north,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=south,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=west,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=east,half=top,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "uvlock": true + }, + "facing=north,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "y": 180, + "uvlock": true + }, + "facing=south,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer" + }, + "facing=west,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "y": 90, + "uvlock": true + }, + "facing=east,half=bottom,shape=outer_left": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "y": 270, + "uvlock": true + }, + "facing=north,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "uvlock": true + }, + "facing=south,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=west,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=east,half=top,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "x": 180, + "y": 90, + "uvlock": true + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "y": 270, + "uvlock": true + }, + "facing=south,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "y": 90, + "uvlock": true + }, + "facing=west,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer", + "y": 180, + "uvlock": true + }, + "facing=east,half=bottom,shape=outer_right": { + "model": "bloodmagic:block/dungeon_polished_stairs_outer" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_wall.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_wall.json new file mode 100644 index 00000000..228f6735 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_polished_wall.json @@ -0,0 +1,90 @@ +{ + "multipart": [ + { + "when": { + "up": "true" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_post" + } + }, + { + "when": { + "east": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side", + "y": 90, + "uvlock": true + } + }, + { + "when": { + "east": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side_tall", + "y": 90, + "uvlock": true + } + }, + { + "when": { + "north": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side", + "uvlock": true + } + }, + { + "when": { + "north": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side_tall", + "uvlock": true + } + }, + { + "when": { + "south": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side", + "y": 180, + "uvlock": true + } + }, + { + "when": { + "south": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side_tall", + "y": 180, + "uvlock": true + } + }, + { + "when": { + "west": "low" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side", + "y": 270, + "uvlock": true + } + }, + { + "when": { + "west": "tall" + }, + "apply": { + "model": "bloodmagic:block/dungeon_polished_wall_side_tall", + "y": 270, + "uvlock": true + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_smallbrick.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_smallbrick.json new file mode 100644 index 00000000..c9950639 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_smallbrick.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_smallbrick" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_stone.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_stone.json new file mode 100644 index 00000000..7e4a6bec --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_stone.json @@ -0,0 +1,20 @@ +{ + "variants": { + "": [ + { + "model": "bloodmagic:block/dungeon_stone" + }, + { + "model": "bloodmagic:block/dungeon_stone_mirrored" + }, + { + "model": "bloodmagic:block/dungeon_stone", + "y": 180 + }, + { + "model": "bloodmagic:block/dungeon_stone_mirrored", + "y": 180 + } + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_tile.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_tile.json new file mode 100644 index 00000000..c34e5e71 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_tile.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_tile" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_tilespecial.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_tilespecial.json new file mode 100644 index 00000000..1204cd1d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_tilespecial.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_tilespecial" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/duskritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/duskritualstone.json new file mode 100644 index 00000000..474324b4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/duskritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/duskritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/earthritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/earthritualstone.json new file mode 100644 index 00000000..75d2c5eb --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/earthritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/earthritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/fireritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/fireritualstone.json new file mode 100644 index 00000000..33e7f1b2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/fireritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/fireritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/fungal_charge.json b/src/generated/resources/assets/bloodmagic/blockstates/fungal_charge.json new file mode 100644 index 00000000..88c95e60 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/fungal_charge.json @@ -0,0 +1,29 @@ +{ + "variants": { + "attached=down": { + "model": "bloodmagic:block/fungal_charge", + "x": 180 + }, + "attached=up": { + "model": "bloodmagic:block/fungal_charge" + }, + "attached=north": { + "model": "bloodmagic:block/fungal_charge", + "x": 90 + }, + "attached=south": { + "model": "bloodmagic:block/fungal_charge", + "x": 270 + }, + "attached=west": { + "model": "bloodmagic:block/fungal_charge", + "x": 90, + "y": 270 + }, + "attached=east": { + "model": "bloodmagic:block/fungal_charge", + "x": 90, + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/largebloodstonebrick.json b/src/generated/resources/assets/bloodmagic/blockstates/largebloodstonebrick.json new file mode 100644 index 00000000..e7f7e853 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/largebloodstonebrick.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/largebloodstonebrick" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/lightritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/lightritualstone.json new file mode 100644 index 00000000..d198280b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/lightritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/lightritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/masterritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/masterritualstone.json new file mode 100644 index 00000000..c6276d28 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/masterritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/masterritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/nether_soil.json b/src/generated/resources/assets/bloodmagic/blockstates/nether_soil.json new file mode 100644 index 00000000..de25c31e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/nether_soil.json @@ -0,0 +1,28 @@ +{ + "variants": { + "moisture=0": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=1": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=2": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=3": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=4": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=5": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=6": { + "model": "bloodmagic:block/nether_soil" + }, + "moisture=7": { + "model": "bloodmagic:block/nether_soil" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/obsidianbrickpath.json b/src/generated/resources/assets/bloodmagic/blockstates/obsidianbrickpath.json new file mode 100644 index 00000000..38e7c85f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/obsidianbrickpath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/obsidianbrickpath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/obsidiantilepath.json b/src/generated/resources/assets/bloodmagic/blockstates/obsidiantilepath.json new file mode 100644 index 00000000..185a1d06 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/obsidiantilepath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/obsidiantilepath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/orbcapacityrune.json b/src/generated/resources/assets/bloodmagic/blockstates/orbcapacityrune.json new file mode 100644 index 00000000..afa6fb84 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/orbcapacityrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/orbcapacityrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json new file mode 100644 index 00000000..be9a5c2a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json @@ -0,0 +1,431 @@ +{ + "multipart": [ + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal1", + "x": 180 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal1" + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal1", + "x": 90 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal1", + "x": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal1", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal1", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal2", + "x": 180 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal2" + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal2", + "x": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal2", + "x": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal2", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal2", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal3", + "x": 180 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal3" + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal3", + "x": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal3", + "x": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal3", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal3", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal4", + "x": 180 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal4" + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal4", + "x": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal4", + "x": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal4", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal4", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal5", + "x": 180 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal5" + } + }, + { + "when": { + "age": "4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal5", + "x": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal5", + "x": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal5", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal5", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal6", + "x": 180 + } + }, + { + "when": { + "age": "5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal6" + } + }, + { + "when": { + "age": "5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal6", + "x": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal6", + "x": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal6", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal6", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal7", + "x": 180 + } + }, + { + "when": { + "age": "6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal7" + } + }, + { + "when": { + "age": "6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal7", + "x": 90 + } + }, + { + "when": { + "age": "6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal7", + "x": 270 + } + }, + { + "when": { + "age": "6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal7", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/defaultcrystal7", + "x": 90, + "y": 90 + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/ritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/ritualstone.json new file mode 100644 index 00000000..8f09bcba --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/ritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/ritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/sacrificerune.json b/src/generated/resources/assets/bloodmagic/blockstates/sacrificerune.json new file mode 100644 index 00000000..1564fd64 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/sacrificerune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/sacrificerune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/selfsacrificerune.json b/src/generated/resources/assets/bloodmagic/blockstates/selfsacrificerune.json new file mode 100644 index 00000000..05620681 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/selfsacrificerune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/selfsacrificerune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/shaped_charge.json b/src/generated/resources/assets/bloodmagic/blockstates/shaped_charge.json new file mode 100644 index 00000000..8b918ec1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/shaped_charge.json @@ -0,0 +1,29 @@ +{ + "variants": { + "attached=down": { + "model": "bloodmagic:block/shaped_charge", + "x": 180 + }, + "attached=up": { + "model": "bloodmagic:block/shaped_charge" + }, + "attached=north": { + "model": "bloodmagic:block/shaped_charge", + "x": 90 + }, + "attached=south": { + "model": "bloodmagic:block/shaped_charge", + "x": 270 + }, + "attached=west": { + "model": "bloodmagic:block/shaped_charge", + "x": 90, + "y": 270 + }, + "attached=east": { + "model": "bloodmagic:block/shaped_charge", + "x": 90, + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/speedrune.json b/src/generated/resources/assets/bloodmagic/blockstates/speedrune.json new file mode 100644 index 00000000..9ebf2703 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/speedrune.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/speedrune" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json new file mode 100644 index 00000000..f886422f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json @@ -0,0 +1,431 @@ +{ + "multipart": [ + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal1", + "x": 180 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal1" + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal1", + "x": 90 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal1", + "x": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal1", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal1", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal2", + "x": 180 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal2" + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal2", + "x": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal2", + "x": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal2", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal2", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal3", + "x": 180 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal3" + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal3", + "x": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal3", + "x": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal3", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal3", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal4", + "x": 180 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal4" + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal4", + "x": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal4", + "x": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal4", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal4", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal5", + "x": 180 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal5" + } + }, + { + "when": { + "age": "4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal5", + "x": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal5", + "x": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal5", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal5", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal6", + "x": 180 + } + }, + { + "when": { + "age": "5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal6" + } + }, + { + "when": { + "age": "5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal6", + "x": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal6", + "x": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal6", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal6", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal7", + "x": 180 + } + }, + { + "when": { + "age": "6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal7" + } + }, + { + "when": { + "age": "6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal7", + "x": 90 + } + }, + { + "when": { + "age": "6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal7", + "x": 270 + } + }, + { + "when": { + "age": "6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal7", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/steadfastcrystal7", + "x": 90, + "y": 90 + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/stonebrickpath.json b/src/generated/resources/assets/bloodmagic/blockstates/stonebrickpath.json new file mode 100644 index 00000000..dd693c22 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/stonebrickpath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/stonebrickpath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/stonetilepath.json b/src/generated/resources/assets/bloodmagic/blockstates/stonetilepath.json new file mode 100644 index 00000000..e3f65a05 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/stonetilepath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/stonetilepath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/veinmine_charge.json b/src/generated/resources/assets/bloodmagic/blockstates/veinmine_charge.json new file mode 100644 index 00000000..beb5ad11 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/veinmine_charge.json @@ -0,0 +1,29 @@ +{ + "variants": { + "attached=down": { + "model": "bloodmagic:block/veinmine_charge", + "x": 180 + }, + "attached=up": { + "model": "bloodmagic:block/veinmine_charge" + }, + "attached=north": { + "model": "bloodmagic:block/veinmine_charge", + "x": 90 + }, + "attached=south": { + "model": "bloodmagic:block/veinmine_charge", + "x": 270 + }, + "attached=west": { + "model": "bloodmagic:block/veinmine_charge", + "x": 90, + "y": 270 + }, + "attached=east": { + "model": "bloodmagic:block/veinmine_charge", + "x": 90, + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json new file mode 100644 index 00000000..c4f8f825 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json @@ -0,0 +1,431 @@ +{ + "multipart": [ + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal1", + "x": 180 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal1" + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal1", + "x": 90 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal1", + "x": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal1", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "0|1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal1", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal2", + "x": 180 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal2" + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal2", + "x": 90 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal2", + "x": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal2", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "1|2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal2", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal3", + "x": 180 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal3" + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal3", + "x": 90 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal3", + "x": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal3", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "2|3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal3", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal4", + "x": 180 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal4" + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal4", + "x": 90 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal4", + "x": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal4", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "3|4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal4", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal5", + "x": 180 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal5" + } + }, + { + "when": { + "age": "4|5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal5", + "x": 90 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal5", + "x": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal5", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "4|5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal5", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal6", + "x": 180 + } + }, + { + "when": { + "age": "5|6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal6" + } + }, + { + "when": { + "age": "5|6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal6", + "x": 90 + } + }, + { + "when": { + "age": "5|6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal6", + "x": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal6", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "5|6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal6", + "x": 90, + "y": 90 + } + }, + { + "when": { + "age": "6", + "attached": "down" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal7", + "x": 180 + } + }, + { + "when": { + "age": "6", + "attached": "up" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal7" + } + }, + { + "when": { + "age": "6", + "attached": "north" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal7", + "x": 90 + } + }, + { + "when": { + "age": "6", + "attached": "south" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal7", + "x": 270 + } + }, + { + "when": { + "age": "6", + "attached": "west" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal7", + "x": 90, + "y": 270 + } + }, + { + "when": { + "age": "6", + "attached": "east" + }, + "apply": { + "model": "bloodmagic:block/crystal/vengefulcrystal7", + "x": 90, + "y": 90 + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/waterritualstone.json b/src/generated/resources/assets/bloodmagic/blockstates/waterritualstone.json new file mode 100644 index 00000000..35b1d3aa --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/waterritualstone.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/waterritualstone" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/woodbrickpath.json b/src/generated/resources/assets/bloodmagic/blockstates/woodbrickpath.json new file mode 100644 index 00000000..5b1d7ce2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/woodbrickpath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/woodbrickpath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/woodtilepath.json b/src/generated/resources/assets/bloodmagic/blockstates/woodtilepath.json new file mode 100644 index 00000000..6439e3bc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/woodtilepath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/woodtilepath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/wornstonebrickpath.json b/src/generated/resources/assets/bloodmagic/blockstates/wornstonebrickpath.json new file mode 100644 index 00000000..4c9539bf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/wornstonebrickpath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/wornstonebrickpath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/blockstates/wornstonetilepath.json b/src/generated/resources/assets/bloodmagic/blockstates/wornstonetilepath.json new file mode 100644 index 00000000..db7e680a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/wornstonetilepath.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/wornstonetilepath" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/lang/en_us.json b/src/generated/resources/assets/bloodmagic/lang/en_us.json new file mode 100644 index 00000000..32f01ab1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/lang/en_us.json @@ -0,0 +1,503 @@ +{ + "anointment.bloodmagic.bow_power": "Heavy Shot", + "anointment.bloodmagic.fortune": "Fortunate", + "anointment.bloodmagic.hidden_knowledge": "Miner's Secrets", + "anointment.bloodmagic.holy_water": "Holy Light", + "anointment.bloodmagic.looting": "Plundering", + "anointment.bloodmagic.melee_damage": "Whetstone", + "anointment.bloodmagic.quick_draw": "Deft Hands", + "anointment.bloodmagic.silk_touch": "Soft Touch", + "anointment.bloodmagic.smelting": "Heated Tool", + "block.bloodmagic.accelerationrune": "Acceleration Rune", + "block.bloodmagic.airritualstone": "Air Ritual Stone", + "block.bloodmagic.alchemicalreactionchamber": "Alchemical Reaction Chamber", + "block.bloodmagic.alchemytable": "Alchemy Table", + "block.bloodmagic.altar": "Blood Altar", + "block.bloodmagic.altarcapacityrune": "Rune of Capacity", + "block.bloodmagic.bettercapacityrune": "Rune of Augmented Capacity", + "block.bloodmagic.blankrune": "Blank Rune", + "block.bloodmagic.bloodstonebrick": "Bloodstone Brick", + "block.bloodmagic.chargingrune": "Charging Rune", + "block.bloodmagic.corrosivedemoncrystal": "Corrosive Crystal Cluster", + "block.bloodmagic.deforester_charge": "Deforester Charge", + "block.bloodmagic.demoncrucible": "Demon Crucible", + "block.bloodmagic.demoncrystallizer": "Demon Crystallizer", + "block.bloodmagic.destructivedemoncrystal": "Destructive Crystal Cluster", + "block.bloodmagic.dislocationrune": "Displacement Rune", + "block.bloodmagic.dungeon_brick1": "Demon Bricks", + "block.bloodmagic.dungeon_brick2": "Offset Demon Bricks", + "block.bloodmagic.dungeon_brick3": "Long Demon Bricks", + "block.bloodmagic.dungeon_brick_assorted": "Assorted Demon Bricks", + "block.bloodmagic.dungeon_brick_gate": "Demon Brick Gate", + "block.bloodmagic.dungeon_brick_stairs": "Demon Brick Stairs", + "block.bloodmagic.dungeon_brick_wall": "Demon Brick Wall", + "block.bloodmagic.dungeon_eye": "Demon Eye", + "block.bloodmagic.dungeon_ore": "Demonite", + "block.bloodmagic.dungeon_pillar_cap": "Demon Stone Pillar Cap", + "block.bloodmagic.dungeon_pillar_center": "Demon Stone Pillar", + "block.bloodmagic.dungeon_pillar_special": "Accented Demon Stone Pillar", + "block.bloodmagic.dungeon_polished": "Polished Demon Stone", + "block.bloodmagic.dungeon_polished_gate": "Demon Stone Gate", + "block.bloodmagic.dungeon_polished_stairs": "Demon Stone Stairs", + "block.bloodmagic.dungeon_polished_wall": "Demon Stone Wall", + "block.bloodmagic.dungeon_smallbrick": "Small Demon Bricks", + "block.bloodmagic.dungeon_stone": "Demon Stone", + "block.bloodmagic.dungeon_tile": "Demon Stone Tiles", + "block.bloodmagic.dungeon_tilespecial": "Accented Demon Stone Tiles", + "block.bloodmagic.duskritualstone": "Dusk Ritual Stone", + "block.bloodmagic.earthritualstone": "Earth Ritual Stone", + "block.bloodmagic.fireritualstone": "Fire Ritual Stone", + "block.bloodmagic.fungal_charge": "Fungal Charge", + "block.bloodmagic.incensealtar": "Incense Altar", + "block.bloodmagic.largebloodstonebrick": "Large Bloodstone Brick", + "block.bloodmagic.lightritualstone": "Dawn Ritual Stone", + "block.bloodmagic.masterritualstone": "Master Ritual Stone", + "block.bloodmagic.obsidianbrickpath": "Obsidian Path", + "block.bloodmagic.obsidiantilepath": "Tiled Obsidian Path", + "block.bloodmagic.orbcapacityrune": "Rune of the Orb", + "block.bloodmagic.rawdemoncrystal": "Raw Crystal Cluster", + "block.bloodmagic.ritualstone": "Ritual Stone", + "block.bloodmagic.sacrificerune": "Rune of Sacrifice", + "block.bloodmagic.selfsacrificerune": "Rune of Self Sacrifice", + "block.bloodmagic.shaped_charge": "Shaped Charge", + "block.bloodmagic.soulforge": "Hellfire Forge", + "block.bloodmagic.speedrune": "Speed Rune", + "block.bloodmagic.steadfastdemoncrystal": "Steadfast Crystal Cluster", + "block.bloodmagic.stonebrickpath": "Stone Path", + "block.bloodmagic.stonetilepath": "Tiled Stone Path", + "block.bloodmagic.veinmine_charge": "Controlled Charge", + "block.bloodmagic.vengefuldemoncrystal": "Vengeful Crystal Cluster", + "block.bloodmagic.waterritualstone": "Water Ritual Stone", + "block.bloodmagic.woodbrickpath": "Wooden Path", + "block.bloodmagic.woodtilepath": "Tiled Wooden Path", + "block.bloodmagic.wornstonebrickpath": "Worn Stone Path", + "block.bloodmagic.wornstonetilepath": "Tiled Worn Stone Path", + "bloodmagic.keybind.cycle_holding_neg": "Cycle Sigil (-)", + "bloodmagic.keybind.cycle_holding_pos": "Cycle Sigil (+)", + "bloodmagic.keybind.open_holding": "Open Sigil of Holding", + "chat.bloodmagic.damageSource": "%s's soul became too weak", + "chat.bloodmagic.living_upgrade_level_increase": "%s has leveled up to %d", + "chat.bloodmagic.ritual.activate": "A rush of energy flows through the ritual!", + "chat.bloodmagic.ritual.notValid": "You feel that these runes are not configured correctly...", + "chat.bloodmagic.ritual.prevent": "The ritual is actively resisting you!", + "chat.bloodmagic.ritual.weak": "You feel a push, but are too weak to perform this ritual.", + "gui.bloodmagic.empty": "Empty", + "guide.bloodmagic.landing_text": "\"It is my dear hope that by holding this tome in your hands, I may impart the knowledge of the lost art that is Blood Magic\"$(br)$(o)- Magus Arcana$()", + "guide.bloodmagic.name": "Sanguine Scientiem", + "hud.bloodmagic.inactive": "Inactive", + "item.bloodmagic.activationcrystalawakened": "Awakened Activation Crystal", + "item.bloodmagic.activationcrystalcreative": "Creative Activation Crystal", + "item.bloodmagic.activationcrystalweak": "Weak Activation Crystal", + "item.bloodmagic.airscribetool": "Inscription Tool: Air", + "item.bloodmagic.airsigil": "Air Sigil", + "item.bloodmagic.apprenticebloodorb": "Apprentice Blood Orb", + "item.bloodmagic.arcaneashes": "Arcane Ashes", + "item.bloodmagic.basemonstersoul": "Demon Will", + "item.bloodmagic.basemonstersoul_corrosive": "Demon Will", + "item.bloodmagic.basemonstersoul_destructive": "Demon Will", + "item.bloodmagic.basemonstersoul_steadfast": "Demon Will", + "item.bloodmagic.basemonstersoul_vengeful": "Demon Will", + "item.bloodmagic.basiccuttingfluid": "Basic Cutting Fluid", + "item.bloodmagic.blankslate": "Blank Slate", + "item.bloodmagic.bloodlightsigil": "Sigil of the Blood Lamp", + "item.bloodmagic.bow_power_anointment": "Iron Tip", + "item.bloodmagic.coalsand": "Coal Sand", + "item.bloodmagic.corrosivecrystal": "Corrosive Will Crystal", + "item.bloodmagic.crystalline_resonator": "Crystalline Resonator", + "item.bloodmagic.daggerofsacrifice": "Dagger of Sacrifice", + "item.bloodmagic.defaultcrystal": "Demon Will Crystal", + "item.bloodmagic.demonslate": "Demonic Slate", + "item.bloodmagic.destructivecrystal": "Destructive Will Crystal", + "item.bloodmagic.divinationsigil": "Divination Sigil", + "item.bloodmagic.duskscribetool": "Inscription Tool: Dusk", + "item.bloodmagic.earthscribetool": "Inscription Tool: Earth", + "item.bloodmagic.etherealslate": "Ethereal Slate", + "item.bloodmagic.experiencebook": "Tome of Peritia", + "item.bloodmagic.explosivepowder": "Explosive Powder", + "item.bloodmagic.firescribetool": "Inscription Tool: Fire", + "item.bloodmagic.fortune_anointment": "Fortuna Extract", + "item.bloodmagic.fragment_netherite_scrap": "Ancient Debris Fragment", + "item.bloodmagic.furnacecell_primitive": "Primitive Fuel Cell", + "item.bloodmagic.goldfragment": "Gold Ore Fragment", + "item.bloodmagic.goldgravel": "Gold Gravel", + "item.bloodmagic.goldsand": "Gold Sand", + "item.bloodmagic.gravel_netherite_scrap": "Ancient Debris Gravel", + "item.bloodmagic.growthsigil": "Sigil of the Green Grove", + "item.bloodmagic.hidden_knowledge_anointment": "Miner's Secrets", + "item.bloodmagic.holy_water_anointment": "Holy Water", + "item.bloodmagic.icesigil": "Sigil of the Frozen Lake", + "item.bloodmagic.infusedslate": "Imbued Slate", + "item.bloodmagic.ironfragment": "Iron Ore Fragment", + "item.bloodmagic.irongravel": "Iron Gravel", + "item.bloodmagic.ironsand": "Iron Sand", + "item.bloodmagic.lavacrystal": "Lava Crystal", + "item.bloodmagic.lavasigil": "Lava Sigil", + "item.bloodmagic.life_essence_bucket": "Bucket of Life", + "item.bloodmagic.livingboots": "Living Boots", + "item.bloodmagic.livinghelmet": "Living Helmet", + "item.bloodmagic.livingleggings": "Living Leggings", + "item.bloodmagic.livingplate": "Living Chestplate", + "item.bloodmagic.looting_anointment": "Plunderer's Glint", + "item.bloodmagic.magicianbloodorb": "Magician Blood Orb", + "item.bloodmagic.masterbloodorb": "Master Blood Orb", + "item.bloodmagic.melee_anointment": "Honing Oil", + "item.bloodmagic.miningsigil": "Sigil of the Fast Miner", + "item.bloodmagic.plantoil": "Plant Oil", + "item.bloodmagic.primitive_crystalline_resonator": "Primitive Resonator", + "item.bloodmagic.primitive_explosive_cell": "Primitive Explosive Cell", + "item.bloodmagic.primitive_hydration_cell": "Primitive Hydration Cell", + "item.bloodmagic.quick_draw_anointment": "Dexterity Alkahest", + "item.bloodmagic.reagentair": "Air Reagent", + "item.bloodmagic.reagentbinding": "Binding Reagent", + "item.bloodmagic.reagentbloodlight": "Blood Lamp Reagent", + "item.bloodmagic.reagentfastminer": "Mining Reagent", + "item.bloodmagic.reagentgrowth": "Growth Reagent", + "item.bloodmagic.reagentholding": "Holding Reagent", + "item.bloodmagic.reagentlava": "Lava Reagent", + "item.bloodmagic.reagentmagnetism": "Magnetism Reagent", + "item.bloodmagic.reagentsight": "Sight Reagent", + "item.bloodmagic.reagentvoid": "Void Reagent", + "item.bloodmagic.reagentwater": "Water Reagent", + "item.bloodmagic.reinforcedslate": "Reinforced Slate", + "item.bloodmagic.ritualdiviner": "Ritual Diviner", + "item.bloodmagic.ritualdivinerdusk": "Ritual Diviner [Dusk]", + "item.bloodmagic.ritualtinkerer": "Ritual Tinkerer", + "item.bloodmagic.sacrificialdagger": "Sacrificial Knife", + "item.bloodmagic.saltpeter": "Saltpeter", + "item.bloodmagic.sand_netherite": "Netherite Scrap Sand", + "item.bloodmagic.sanguinereverter": "Sanguine Reverter", + "item.bloodmagic.seersigil": "Seer's Sigil", + "item.bloodmagic.sigilofholding": "Sigil of Holding", + "item.bloodmagic.sigilofmagnetism": "Sigil of Magnetism", + "item.bloodmagic.silk_touch_anointment": "Soft Coating", + "item.bloodmagic.slate_ampoule": "Slate Ampoule", + "item.bloodmagic.slate_vial": "Slate-infused Vial", + "item.bloodmagic.smelting_anointment": "Slow-burning Oil", + "item.bloodmagic.soulaxe": "Sentient Axe", + "item.bloodmagic.soulgemcommon": "Common Tartaric Gem", + "item.bloodmagic.soulgemgreater": "Greater Tartaric Gem", + "item.bloodmagic.soulgemlesser": "Lesser Tartaric Gem", + "item.bloodmagic.soulgempetty": "Petty Tartaric Gem", + "item.bloodmagic.soulpickaxe": "Sentient Pickaxe", + "item.bloodmagic.soulscythe": "Sentient Scythe", + "item.bloodmagic.soulshovel": "Sentient Shovel", + "item.bloodmagic.soulsnare": "Soul Snare", + "item.bloodmagic.soulsword": "Sentient Sword", + "item.bloodmagic.steadfastcrystal": "Steadfast Will Crystal", + "item.bloodmagic.sulfur": "Sulfur", + "item.bloodmagic.throwing_dagger": "Iron Throwing Dagger", + "item.bloodmagic.throwing_dagger_syringe": "Syringe Throwing Dagger", + "item.bloodmagic.upgradetome": "Living Armour Upgrade Tome", + "item.bloodmagic.vengefulcrystal": "Vengeful Will Crystal", + "item.bloodmagic.voidsigil": "Void Sigil", + "item.bloodmagic.waterscribetool": "Inscription Tool: Water", + "item.bloodmagic.watersigil": "Water Sigil", + "item.bloodmagic.weakbloodorb": "Weak Blood Orb", + "item.bloodmagic.weakbloodshard": "Weak Blood Shard", + "itemGroup.bloodmagic.creativeTab": "Blood Magic", + "itemGroup.bloodmagictab": "Blood Magic", + "jei.bloodmagic.recipe.alchemyarraycrafting": "Alchemy Array", + "jei.bloodmagic.recipe.alchemytable": "Alchemy Table", + "jei.bloodmagic.recipe.altar": "Blood Altar", + "jei.bloodmagic.recipe.arc": "ARC Recipe", + "jei.bloodmagic.recipe.arcfurnace": "ARC Furnace Recipe", + "jei.bloodmagic.recipe.consumptionrate": "Consumption: %s LP/t", + "jei.bloodmagic.recipe.drainrate": "Drain: %s LP/t", + "jei.bloodmagic.recipe.lpDrained": "Drained: %s LP", + "jei.bloodmagic.recipe.minimumsouls": "Minimum: %s Will", + "jei.bloodmagic.recipe.requiredlp": "LP: %d", + "jei.bloodmagic.recipe.requiredtier": "Tier: %d", + "jei.bloodmagic.recipe.soulforge": "Hellfire Forge", + "jei.bloodmagic.recipe.soulsdrained": "Drained: %s Will", + "jei.bloodmagic.recipe.ticksRequired": "Time: %sTicks", + "key.bloodmagic.category": "Blood Magic", + "living_upgrade.bloodmagic.arrow_protect": "Pin Cushion", + "living_upgrade.bloodmagic.arrow_shot": "Trick Shot", + "living_upgrade.bloodmagic.battleHunger": "Battle Hungry", + "living_upgrade.bloodmagic.crippledArm": "Crippled Arm", + "living_upgrade.bloodmagic.critical_strike": "True Strike", + "living_upgrade.bloodmagic.digSlowdown": "Weakened Pick", + "living_upgrade.bloodmagic.digging": "Dwarven Might", + "living_upgrade.bloodmagic.disoriented": "Disoriented", + "living_upgrade.bloodmagic.elytra": "Elytra", + "living_upgrade.bloodmagic.experienced": "Experienced", + "living_upgrade.bloodmagic.fall_protect": "Soft Fall", + "living_upgrade.bloodmagic.fire_resist": "Gift of Ignis", + "living_upgrade.bloodmagic.grave_digger": "Grave Digger", + "living_upgrade.bloodmagic.grim_reaper": "Grim Reaper's Sprint", + "living_upgrade.bloodmagic.health": "Healthy", + "living_upgrade.bloodmagic.jump": "Strong Legs", + "living_upgrade.bloodmagic.knockback_resist": "Body Builder", + "living_upgrade.bloodmagic.meleeDecrease": "Dulled Blade", + "living_upgrade.bloodmagic.melee_damage": "Fierce Strike", + "living_upgrade.bloodmagic.night_sight": "Nocturnal Prowess", + "living_upgrade.bloodmagic.physical_protect": "Tough", + "living_upgrade.bloodmagic.poison_resist": "Poison Resistance", + "living_upgrade.bloodmagic.quenched": "Quenched", + "living_upgrade.bloodmagic.repair": "Repairing", + "living_upgrade.bloodmagic.revealing": "Revealing", + "living_upgrade.bloodmagic.self_sacrifice": "Tough Palms", + "living_upgrade.bloodmagic.slippery": "Loose Traction", + "living_upgrade.bloodmagic.slowHeal": "Diseased", + "living_upgrade.bloodmagic.slowness": "Limp Leg", + "living_upgrade.bloodmagic.solar_powered": "Solar Powered", + "living_upgrade.bloodmagic.speed": "Quick Feet", + "living_upgrade.bloodmagic.sprint_attack": "Charging Strike", + "living_upgrade.bloodmagic.step_assist": "Step Assist", + "living_upgrade.bloodmagic.stormTrooper": "Storm Trooper", + "living_upgrade.bloodmagic.thaumRunicShielding": "Runic Shielding", + "ritual.bloodmagic.altarBuilderRitual": "The Assembly of the High Altar", + "ritual.bloodmagic.altarBuilderRitual.info": "Builds an altar out of the components inside of the connected inventory.", + "ritual.bloodmagic.animalGrowthRitual": "Ritual of the Shepherd", + "ritual.bloodmagic.animalGrowthRitual.chest.info": "(Chest) Chest for breeding items if properly augmented.", + "ritual.bloodmagic.animalGrowthRitual.corrosive.info": "(Corrosive) Unimplemented.", + "ritual.bloodmagic.animalGrowthRitual.default.info": "(Raw) Increases the speed of the ritual based on the total Will in the Aura.", + "ritual.bloodmagic.animalGrowthRitual.destructive.info": "(Destructive) Causes adults that have not bred lately to run at mobs and explode.", + "ritual.bloodmagic.animalGrowthRitual.growing.info": "(Growth) Animals within this range will grow much faster.", + "ritual.bloodmagic.animalGrowthRitual.info": "Increases the maturity rate of baby animals within its range.", + "ritual.bloodmagic.animalGrowthRitual.steadfast.info": "(Steadfast) Automatically breeds adults within its area using items in the connected chest.", + "ritual.bloodmagic.animalGrowthRitual.vengeful.info": "(Vengeful) Decreases the time it takes for adults to breed again.", + "ritual.bloodmagic.armourEvolveRitual": "Ritual of Living Evolution", + "ritual.bloodmagic.armourEvolveRitual.info": "Increases the amount of maximum Upgrade Points on your Living Armor to 300.", + "ritual.bloodmagic.blockRange.firstBlock": "First block for new range stored.", + "ritual.bloodmagic.blockRange.inactive": "The ritual stone is currently inactive, and cannot have its range modified.", + "ritual.bloodmagic.blockRange.noRange": "The range was not properly chosen.", + "ritual.bloodmagic.blockRange.success": "New range successfully set!", + "ritual.bloodmagic.blockRange.tooBig": "The block range given is too big! Needs to be at most %s blocks.", + "ritual.bloodmagic.blockRange.tooFar": "The block range given is too far! Needs to be within a vertical range of %s blocks and a horizontal range of %s blocks.", + "ritual.bloodmagic.cobblestoneRitual": "Le Vulcanos Frigius", + "ritual.bloodmagic.condorRitual.info": "Provides flight in an area around the ritual.", + "ritual.bloodmagic.containmentRitual": "Ritual of Containment", + "ritual.bloodmagic.containmentRitual.containmentRange.info": "(Containment) The area of the ritual where mobs will be pulled. All mobs are pulled towards the master ritual stone, regardless of where this area is.", + "ritual.bloodmagic.containmentRitual.info": "Pulls all mobs within its area towards the master ritual stone.", + "ritual.bloodmagic.crushingRitual": "Ritual of the Crusher", + "ritual.bloodmagic.crushingRitual.chest.info": "(Chest) The location of the inventory that the ritual will place the broken blocks into.", + "ritual.bloodmagic.crushingRitual.corrosive.info": "(Corrosive) All blocks are broken to be processed with a form of cutting fluid. Overrides Silk Touch where applicable.", + "ritual.bloodmagic.crushingRitual.crushingRange.info": "(Crushing) The blocks that the ritual will break.", + "ritual.bloodmagic.crushingRitual.default.info": "(Raw) Increases the speed of the ritual based on total Will.", + "ritual.bloodmagic.crushingRitual.destructive.info": "(Destructive) Blocks are broken down forcefully: all blocks broken are affected by Fortune III.", + "ritual.bloodmagic.crushingRitual.info": "Breaks blocks within its crushing range and places the items into the linked chest.", + "ritual.bloodmagic.crushingRitual.steadfast.info": "(Steadfast) Causes all blocks that are broken to be picked up with silk touch. Overrides Fortune where applicable.", + "ritual.bloodmagic.crushingRitual.vengeful.info": "(Vengeful) Compresses the inventory on successful operation. Currently only does one compression per operation.", + "ritual.bloodmagic.crystalHarvestRitual": "Crack of the Fractured Crystal", + "ritual.bloodmagic.crystalHarvestRitual.crystal.info": "(Crystal) All Demon Will crystal clusters have a single crystal broken off, spawning the crystal into the world. If there is only one crystal on the cluster, it will not break it.", + "ritual.bloodmagic.crystalHarvestRitual.info": "Breaks Demon Will crystal clusters within its range, dropping the results on top of the crystals.", + "ritual.bloodmagic.crystalSplitRitual": "Resonance of the Faceted Crystal", + "ritual.bloodmagic.crystalSplitRitual.info": "Splits apart a well-grown Raw crystal cluster into seperal aspected crystal clusters.", + "ritual.bloodmagic.ellipseRitual": "Focus of the Ellipsoid", + "ritual.bloodmagic.ellipseRitual.chest.info": "(Chest) The location of the inventory that the ritual will grab blocks from to place in the world.", + "ritual.bloodmagic.ellipseRitual.info": "Creates a hollow spheroid around the ritual using the blocks in the attached chest.", + "ritual.bloodmagic.ellipseRitual.spheroidRange.info": "(Placement) The range that the ritual will place its blocks in. Spheroid is centered on the ritual - if one side is shorter than the side opposite the spheroid is truncated.", + "ritual.bloodmagic.eternalSoulRitual.info": "Capable of transferring Life Essence from a Network back into an Altar at a cost.", + "ritual.bloodmagic.expulsionRitual": "Aura of Expulsion", + "ritual.bloodmagic.expulsionRitual.expulsionRange.info": "(Expulsion) The area from which players that are not owner or have an orb in the chest will be teleported away from.", + "ritual.bloodmagic.expulsionRitual.info": "Expels players from its range that are neither the owner nor have a bound blood orb in the chest on top of the master ritual stone.", + "ritual.bloodmagic.featheredKnifeRitual": "Ritual of the Feathered Knife", + "ritual.bloodmagic.featheredKnifeRitual.altar.info": "(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region.", + "ritual.bloodmagic.featheredKnifeRitual.corrosive.info": "(Corrosive) Uses the player's Incense to increase the yield.", + "ritual.bloodmagic.featheredKnifeRitual.damage.info": "(Damage) This defines where the ritual will damage a player. Players inside of this range will receive damage over time up to the specified limit.", + "ritual.bloodmagic.featheredKnifeRitual.default.info": "(Raw) Increases the speed of the ritual based on the total Will in the Aura.", + "ritual.bloodmagic.featheredKnifeRitual.destructive.info": "(Destructive) Increases the yield of the ritual based on total Will.", + "ritual.bloodmagic.featheredKnifeRitual.info": "Drains health from players in its area and puts the LP into a nearby blood altar.", + "ritual.bloodmagic.featheredKnifeRitual.steadfast.info": "(Steadfast) Sets the minimum health for sacrificing from 30%% to 70%%.", + "ritual.bloodmagic.featheredKnifeRitual.vengeful.info": "(Vengeful) Sets the minimum health for sacrificing to 10%%. Overridden by Steadfast for the Owner if active.", + "ritual.bloodmagic.fellingRitual": "The Timberman", + "ritual.bloodmagic.fellingRitual.chest.info": "(Chest) The location of the inventory that the ritual will place the results into.", + "ritual.bloodmagic.fellingRitual.fellingRange.info": "(Cutting) The range that the ritual will search out logs and leaves in order to cut down.", + "ritual.bloodmagic.fellingRitual.info": "A standard tree-cutting machine, this ritual will cut down all trees and leaves within its area and collect the drops.", + "ritual.bloodmagic.forsakenSoulRitual": "Gathering of the Forsaken Souls", + "ritual.bloodmagic.forsakenSoulRitual.crystal.info": "(Crystal) Demon Crystals in this range receive an increase in growth speed when a mob is killed by the ritual.", + "ritual.bloodmagic.forsakenSoulRitual.damage.info": "(Damage) Mobs within this range will be slowly damaged, and when killed will grow the crystals.", + "ritual.bloodmagic.forsakenSoulRitual.info": "Damages mobs within its damage range and when the mob dies a demon crystal within its crystal range will be grown.", + "ritual.bloodmagic.fullStomachRitual": "Ritual of the Satiated Stomach", + "ritual.bloodmagic.fullStomachRitual.chest.info": "(Chest) The location of the inventory that the ritual will grab food from to feed players in range.", + "ritual.bloodmagic.fullStomachRitual.fillRange.info": "(Feeding) The range that the ritual will look at to feed players.", + "ritual.bloodmagic.fullStomachRitual.info": "Takes food from the linked chest and fills the player's saturation with it.", + "ritual.bloodmagic.greenGroveRitual": "Ritual of the Green Grove", + "ritual.bloodmagic.greenGroveRitual.corrosive.info": "(Corrosive) Entities within range are attacked by nearby plants, leeching away their life.", + "ritual.bloodmagic.greenGroveRitual.default.info": "(Raw) Increases the speed of all of the ritual operations depending on the total Will in the Aura.", + "ritual.bloodmagic.greenGroveRitual.destructive.info": "(Destructive) Growing range is increased based on total Will.", + "ritual.bloodmagic.greenGroveRitual.growing.info": "(Growth) The area that the ritual will grow plants in.", + "ritual.bloodmagic.greenGroveRitual.hydrate.info": "(Steadfast) Blocks within this range are rehydrated into farmland, and seeds within the area are planted nearby.", + "ritual.bloodmagic.greenGroveRitual.info": "Grows crops within its area.", + "ritual.bloodmagic.greenGroveRitual.leech.info": "(Corrosive) Entities in this area have their life drained to grow nearby crops.", + "ritual.bloodmagic.greenGroveRitual.steadfast.info": "(Steadfast) Seeds are replanted and blocks are hydrated within the Hydration range.", + "ritual.bloodmagic.greenGroveRitual.vengeful.info": "(Vengeful) Increases the rate that a growth tick is successful.", + "ritual.bloodmagic.groundingRitual.corrosive.info": "(Corrosive) Disables gravity (+Vengeful) Applies Levitation.", + "ritual.bloodmagic.groundingRitual.default.info": "(Raw) Affects players.", + "ritual.bloodmagic.groundingRitual.destructive.info": "(Destructive) Applies Heavy Heart (increases fall damage) (+Vengeful) Stronger effect.", + "ritual.bloodmagic.groundingRitual.info": "Forces entities on the ground and prevents jumping.", + "ritual.bloodmagic.groundingRitual.steadfast.info": "(Steadfast) Affects Bosses. Doesn't affect bosses that are immune against motion change or immune against potions (except Wither and Ender Dragon).", + "ritual.bloodmagic.groundingRitual.vengeful.info": "(Vengeful) Makes effects stronger. (+Corrosive) Applies Levitation. (+Destructive) Higher Heavy Heart amplifier.", + "ritual.bloodmagic.harvestRitual": "Reap of the Harvest Moon", + "ritual.bloodmagic.harvestRitual.harvestRange.info": "(Harvesting) Plants within this range will be harvested.", + "ritual.bloodmagic.harvestRitual.info": "Harvests plants within its range, dropping the results on the ground.", + "ritual.bloodmagic.interdictionRitual": "Ritual of Interdiction", + "ritual.bloodmagic.interdictionRitual.info": "Pushes all mobs within its area away from the master ritual stone.", + "ritual.bloodmagic.interdictionRitual.interdictionRange.info": "(Push) The area of the ritual where mobs will be pushed. All mobs are pushed away from the master ritual stone, regardless of where this area is.", + "ritual.bloodmagic.jumpRitual": "Ritual of the High Jump", + "ritual.bloodmagic.jumpRitual.info": "Causes entities to leap up into the air.", + "ritual.bloodmagic.jumpRitual.jumpRange.info": "(Jumping) Entities in this range will be launched in the air.", + "ritual.bloodmagic.lavaRitual": "Serenade of the Nether", + "ritual.bloodmagic.lavaRitual.corrosive.info": "(Corrosive) Entities within range that are immune to fire are damaged severely.", + "ritual.bloodmagic.lavaRitual.default.info": "(Raw) Decreases the LP cost of placing lava and allows lava to be placed insided of a linked container.", + "ritual.bloodmagic.lavaRitual.destructive.info": "(Destructive) Lava placement range is increased based on total Will.", + "ritual.bloodmagic.lavaRitual.fireDamage.info": "(Corrosive) Entities within this range that are immune to fire damage are hurt proportional to the Will.", + "ritual.bloodmagic.lavaRitual.fireFuse.info": "(Vengeful) Entities in this range are afflicted by Fire Fuse.", + "ritual.bloodmagic.lavaRitual.fireResist.info": "(Steadfast) Players in this range have Fire Resist applied.", + "ritual.bloodmagic.lavaRitual.info": "Generates a source of lava from the master ritual stone.", + "ritual.bloodmagic.lavaRitual.lavaRange.info": "(Lava) The area that the ritual will place lava source blocks.", + "ritual.bloodmagic.lavaRitual.lavaTank.info": "(Raw) The tank that the ritual will place lava into.", + "ritual.bloodmagic.lavaRitual.steadfast.info": "(Steadfast) Players within a designated range have Fire Resistance applied to them.", + "ritual.bloodmagic.lavaRitual.vengeful.info": "(Vengeful) Entities within range have Fire Fuse applied to them.", + "ritual.bloodmagic.magneticRitual": "Ritual of Magnetism", + "ritual.bloodmagic.magneticRitual.info": "Pulls up ores from the ground and puts them into its placement range.", + "ritual.bloodmagic.magneticRitual.placementRange.info": "(Placement) The range that the ritual will place the grabbed ores into.", + "ritual.bloodmagic.meteorRitual.info": "Consumes an item inside of its item range to summon a meteor full of resources from the sky, aimed directly at the ritual.", + "ritual.bloodmagic.placerRitual": "The Filler", + "ritual.bloodmagic.placerRitual.chest.info": "(Chest) The location of the inventory that the ritual will grab blocks from to place in the world.", + "ritual.bloodmagic.placerRitual.info": "Grabs blocks that are inside of the connected inventory and places them into the world.", + "ritual.bloodmagic.placerRitual.placerRange.info": "(Placement) The range that the ritual will place its blocks in.", + "ritual.bloodmagic.portalRitual": "The Gate of the Fold", + "ritual.bloodmagic.portalRitual.info": "Creates a portal network based on the activator and the immediately surrounding blocks. Blocks can be changed after activation without changing the network of portals, and portals with the same \"key\" will link together.", + "ritual.bloodmagic.pumpRitual": "Hymn of Siphoning", + "ritual.bloodmagic.pumpRitual.info": "Looks around the world and grabs fluids from the defined area. Will only remove and put the fluid into the connected tank if the tank has at least a bucket's worth of the same fluid.", + "ritual.bloodmagic.pumpRitual.pumpRange.info": "(Pump) The region that the ritual will look for fluids to grab from the world.", + "ritual.bloodmagic.regenerationRitual": "Ritual of Regeneration", + "ritual.bloodmagic.regenerationRitual.corrosive.info": "(Corrosive) Steals health from non-players inside of its Vampirism range and directly heals players.", + "ritual.bloodmagic.regenerationRitual.default.info": "(Raw)", + "ritual.bloodmagic.regenerationRitual.destructive.info": "(Destructive)", + "ritual.bloodmagic.regenerationRitual.heal.info": "(Healing) Entities within this range will receive a regeneration buff.", + "ritual.bloodmagic.regenerationRitual.info": "Casts regeneration on entities within its range if they are missing health.", + "ritual.bloodmagic.regenerationRitual.steadfast.info": "(Steadfast)", + "ritual.bloodmagic.regenerationRitual.vampire.info": "(Vampirism) Mobs within this range have their health syphoned to heal players in the Healing range.", + "ritual.bloodmagic.regenerationRitual.vengeful.info": "(Vengeful)", + "ritual.bloodmagic.speedRitual": "Ritual of Speed", + "ritual.bloodmagic.speedRitual.default.info": "(Raw) Increases the velocity caused by the ritual based on total Will.", + "ritual.bloodmagic.speedRitual.destructive.info": "(Destructive) Prevents child mobs and players from being transported. Players are transported if paired with Vengeful.", + "ritual.bloodmagic.speedRitual.info": "Launches players within its range in the direction of the ritual.", + "ritual.bloodmagic.speedRitual.sanicRange.info": "(Speed) All entities within this area are launched in the direction of the arrow formed by the ritual.", + "ritual.bloodmagic.speedRitual.vengeful.info": "(Vengeful) Prevents adult mobs and players from being transported. Players are transported if paired with Destructive.", + "ritual.bloodmagic.suppressionRitual": "Ritual of Suppression", + "ritual.bloodmagic.suppressionRitual.info": "Suppresses fluids within its range - deactivating the ritual returns the fluids back to the world.", + "ritual.bloodmagic.suppressionRitual.suppressionRange.info": "(Suppress) All liquids within the range are suppressed.", + "ritual.bloodmagic.testRitual": "Test Ritual", + "ritual.bloodmagic.upgradeRemoveRitual": "Sound of the Cleansing Soul", + "ritual.bloodmagic.upgradeRemoveRitual.info": "Removes all upgrades (and downgrades) from your Living Armor and gives you the corresponding Upgrade (and Downgrade) Tomes. These Tomes can be used to be applied to your Living Armor again.", + "ritual.bloodmagic.waterRitual": "Ritual of the Full Spring", + "ritual.bloodmagic.waterRitual.info": "Generates a source of water from the master ritual stone.", + "ritual.bloodmagic.waterRitual.waterRange.info": "(Water) The area that the ritual will place water source blocks.", + "ritual.bloodmagic.waterRitual.waterTank.info": "(Raw) The tank that the ritual will place water into.", + "ritual.bloodmagic.wellOfSufferingRitual": "Well of Suffering", + "ritual.bloodmagic.wellOfSufferingRitual.altar.info": "(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region.", + "ritual.bloodmagic.wellOfSufferingRitual.damage.info": "(Damage) This defines where the ritual will damage a mob. All mobs inside of this range (except for players) will receive damage over time.", + "ritual.bloodmagic.wellOfSufferingRitual.info": "Attacks mobs within its damage zone and puts the LP into a nearby blood altar.", + "ritual.bloodmagic.willConfig.set": "The ritual will use these Demon Will types: %s", + "ritual.bloodmagic.willConfig.void": "The ritual no longer uses Demon Will", + "ritual.bloodmagic.zephyrRitual": "Call of the Zephyr", + "ritual.bloodmagic.zephyrRitual.chest.info": "(Chest) The location of the inventory that the ritual will place the picked up items into.", + "ritual.bloodmagic.zephyrRitual.info": "Picks up items within its range and places them into the linked chest.", + "ritual.bloodmagic.zephyrRitual.zephyrRange.info": "(Suction) Items within this range will be sucked into the linked chest.", + "tile.bloodmagic.alchemytable.name": "Alchemy Table", + "tile.bloodmagic.arc.name": "Alchemical Reaction Chamber", + "tile.bloodmagic.soulforge.name": "Hellfire Forge", + "tooltip.bloodmagic.activated": "Activated", + "tooltip.bloodmagic.activationcrystal.awakened": "Activates more powerful rituals", + "tooltip.bloodmagic.activationcrystal.creative": "Creative Only - Activates any ritual", + "tooltip.bloodmagic.activationcrystal.weak": "Activates low-level rituals", + "tooltip.bloodmagic.arcaneAshes": "Ashes used to draw an alchemy circle", + "tooltip.bloodmagic.arctool.additionaldrops": "Increases chance of additional outputs by: x%s", + "tooltip.bloodmagic.arctool.uses": "Uses remaining: %s", + "tooltip.bloodmagic.blood_provider.slate.desc": "A simple ampoule containing 500LP", + "tooltip.bloodmagic.config.disabled": "Currently disabled in the Config", + "tooltip.bloodmagic.currentBaseType.corrosive": "Corrosive", + "tooltip.bloodmagic.currentBaseType.default": "Raw", + "tooltip.bloodmagic.currentBaseType.destructive": "Destructive", + "tooltip.bloodmagic.currentBaseType.steadfast": "Steadfast", + "tooltip.bloodmagic.currentBaseType.vengeful": "Vengeful", + "tooltip.bloodmagic.currentOwner": "Current owner: %s", + "tooltip.bloodmagic.currentTier": "Current tier: %d", + "tooltip.bloodmagic.currentType.corrosive": "Contains: Corrosive Will", + "tooltip.bloodmagic.currentType.default": "Contains: Raw Will", + "tooltip.bloodmagic.currentType.destructive": "Contains: Destructive Will", + "tooltip.bloodmagic.currentType.steadfast": "Contains: Steadfast Will", + "tooltip.bloodmagic.currentType.vengeful": "Contains: Vengeful Will", + "tooltip.bloodmagic.deactivated": "Deactivated", + "tooltip.bloodmagic.decoration.notSafe": "Dangerous for decoration", + "tooltip.bloodmagic.decoration.safe": "Safe for decoration", + "tooltip.bloodmagic.diviner.airRune": "Air Runes: %d", + "tooltip.bloodmagic.diviner.blankRune": "Blank Runes: %d", + "tooltip.bloodmagic.diviner.currentDirection": "Current Direction: %s", + "tooltip.bloodmagic.diviner.currentRitual": "Current Ritual: %s", + "tooltip.bloodmagic.diviner.dawnRune": "Dawn Runes: %d", + "tooltip.bloodmagic.diviner.duskRune": "Dusk Runes: %d", + "tooltip.bloodmagic.diviner.earthRune": "Earth Runes: %d", + "tooltip.bloodmagic.diviner.extraExtraInfo": "-Hold shift + alt for augmentation info-", + "tooltip.bloodmagic.diviner.extraInfo": "Press shift for extra info", + "tooltip.bloodmagic.diviner.fireRune": "Fire Runes: %d", + "tooltip.bloodmagic.diviner.totalRune": "Total Runes: %d", + "tooltip.bloodmagic.diviner.waterRune": "Water Runes: %d", + "tooltip.bloodmagic.experienceTome": "A book used to store experience", + "tooltip.bloodmagic.experienceTome.exp": "Exp: %0.3f", + "tooltip.bloodmagic.experienceTome.expLevel": "Level: %d", + "tooltip.bloodmagic.extraInfo": "&9-Hold shift for more info-", + "tooltip.bloodmagic.holdShiftForInfo": "Press shift for extra info", + "tooltip.bloodmagic.inscriber.desc": "The writing is on the wall...", + "tooltip.bloodmagic.livingarmour.extraExtraInfo": "&9-Hold shift + M for progress info-", + "tooltip.bloodmagic.livingarmour.upgrade.level": "%s (Level %d)", + "tooltip.bloodmagic.livingarmour.upgrade.points": "Upgrade points: %s / %s", + "tooltip.bloodmagic.livingarmour.upgrade.progress": "%s (%d/100)", + "tooltip.bloodmagic.orb.desc": "Stores raw Life Essence", + "tooltip.bloodmagic.orb.owner": "Added by: %s", + "tooltip.bloodmagic.ritualReader.currentState": "Current mode: %s", + "tooltip.bloodmagic.ritualReader.desc.information": "Right click on an active Master Ritual Stone to gather basic information about the ritual.", + "tooltip.bloodmagic.ritualReader.desc.set_area": "Right click on an active Master Ritual stone to cycle what area of the ritual you want to modify. Then click on the two corners of the new range you want to set the range.", + "tooltip.bloodmagic.ritualReader.desc.set_will_types": "Set the types of demon will that the ritual will consume from the aura by right clicking on the MRS with the same types of crystals on your hotbar.", + "tooltip.bloodmagic.ritualReader.information": "Information", + "tooltip.bloodmagic.ritualReader.set_area": "Define Area", + "tooltip.bloodmagic.ritualReader.set_will_types": "Set Will Consumed", + "tooltip.bloodmagic.sacrificialdagger.desc": "Just a prick of the finger will suffice...", + "tooltip.bloodmagic.sentientAxe.desc": "Uses demon will to unleash its full potential.", + "tooltip.bloodmagic.sentientPickaxe.desc": "Uses demon will to unleash its full potential.", + "tooltip.bloodmagic.sentientShovel.desc": "Uses demon will to unleash its full potential.", + "tooltip.bloodmagic.sentientSword.desc": "Uses demon will to unleash its full potential.", + "tooltip.bloodmagic.sigil.air.desc": "I feel lighter already...", + "tooltip.bloodmagic.sigil.bloodlight.desc": "I see a light!", + "tooltip.bloodmagic.sigil.divination.currentAltarCapacity": "Current Capacity: %d LP", + "tooltip.bloodmagic.sigil.divination.currentAltarTier": "Current Tier: %d", + "tooltip.bloodmagic.sigil.divination.currentBonus": "Current Bonus: +%d%%", + "tooltip.bloodmagic.sigil.divination.currentEssence": "Current Essence: %d LP", + "tooltip.bloodmagic.sigil.divination.currentTranquility": "Current Tranquility: %d", + "tooltip.bloodmagic.sigil.divination.desc": "Peer into the soul", + "tooltip.bloodmagic.sigil.divination.otherNetwork": "Peering into the soul of %s", + "tooltip.bloodmagic.sigil.fastminer.desc": "Keep mining, and mining...", + "tooltip.bloodmagic.sigil.greengrove.desc": "Environmentally friendly", + "tooltip.bloodmagic.sigil.holding.desc": "Sigil-ception", + "tooltip.bloodmagic.sigil.holding.press": "Press %s to modify", + "tooltip.bloodmagic.sigil.holding.sigilInSlot": "Slot %d: %s", + "tooltip.bloodmagic.sigil.lava.desc": "HOT! DO NOT EAT", + "tooltip.bloodmagic.sigil.magnetism.desc": "I have a very magnetic personality", + "tooltip.bloodmagic.sigil.seer.currentAltarCapacity": "Current Capacity: %d LP", + "tooltip.bloodmagic.sigil.seer.currentAltarConsumptionRate": "Consumption Rate: %d LP", + "tooltip.bloodmagic.sigil.seer.currentAltarProgress": "Current Progress: %d LP/ %s LP", + "tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent": "Current Progress: %s", + "tooltip.bloodmagic.sigil.seer.currentAltarTier": "Current Tier: %d", + "tooltip.bloodmagic.sigil.seer.currentBonus": "Current Bonus: +%d%%", + "tooltip.bloodmagic.sigil.seer.currentCharge": "Current Charge: %d", + "tooltip.bloodmagic.sigil.seer.currentEssence": "Current Essence: %d LP", + "tooltip.bloodmagic.sigil.seer.currentTranquility": "Current Tranquility: %d", + "tooltip.bloodmagic.sigil.seer.desc": "When seeing all is not enough", + "tooltip.bloodmagic.sigil.void.desc": "Better than a Swiffer\u00AE!", + "tooltip.bloodmagic.sigil.water.desc": "Infinite water, anyone?", + "tooltip.bloodmagic.slate.desc": "Infused stone inside of a Blood Altar", + "tooltip.bloodmagic.slate_vial": "A glass vial infused with a simple slate", + "tooltip.bloodmagic.soulGem.common": "A gem used to contain more will", + "tooltip.bloodmagic.soulGem.grand": "A gem used to contain a large amount of will", + "tooltip.bloodmagic.soulGem.greater": "A gem used to contain a greater amount of will", + "tooltip.bloodmagic.soulGem.lesser": "A gem used to contain some will", + "tooltip.bloodmagic.soulGem.petty": "A gem used to contain a little will", + "tooltip.bloodmagic.soulSnare.desc": "Throw at a monster and then kill them to obtain their demonic will", + "tooltip.bloodmagic.throwing_dagger.desc": "Not to be used in the kitchen", + "tooltip.bloodmagic.tier": "Tier %d", + "tooltip.bloodmagic.will": "Will Quality: %s" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/accelerationrune.json b/src/generated/resources/assets/bloodmagic/models/block/accelerationrune.json new file mode 100644 index 00000000..fd09a780 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/accelerationrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/accelerationrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/airritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/airritualstone.json new file mode 100644 index 00000000..428b9552 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/airritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/airritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/alchemicalreactionchamber.json b/src/generated/resources/assets/bloodmagic/models/block/alchemicalreactionchamber.json new file mode 100644 index 00000000..84690dfc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/alchemicalreactionchamber.json @@ -0,0 +1,9 @@ +{ + "parent": "minecraft:block/orientable_with_bottom", + "textures": { + "side": "bloodmagic:block/arc_side", + "front": "bloodmagic:block/arc_front", + "bottom": "bloodmagic:block/arc_bottom", + "top": "bloodmagic:block/arc_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/altarcapacityrune.json b/src/generated/resources/assets/bloodmagic/models/block/altarcapacityrune.json new file mode 100644 index 00000000..c8a6d830 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/altarcapacityrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/altarcapacityrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/bettercapacityrune.json b/src/generated/resources/assets/bloodmagic/models/block/bettercapacityrune.json new file mode 100644 index 00000000..3ffccb3a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/bettercapacityrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/bettercapacityrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/blankrune.json b/src/generated/resources/assets/bloodmagic/models/block/blankrune.json new file mode 100644 index 00000000..ab6f65ac --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/blankrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/blankrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/bloodlight.json b/src/generated/resources/assets/bloodmagic/models/block/bloodlight.json new file mode 100644 index 00000000..1a06cf8d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/bloodlight.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/bloodlight" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/bloodstonebrick.json b/src/generated/resources/assets/bloodmagic/models/block/bloodstonebrick.json new file mode 100644 index 00000000..b0eccad9 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/bloodstonebrick.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/bloodstonebrick" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/chargingrune.json b/src/generated/resources/assets/bloodmagic/models/block/chargingrune.json new file mode 100644 index 00000000..8a0996cf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/chargingrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/chargingrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_1.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_1.json new file mode 100644 index 00000000..2f9e67a5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_2.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_2.json new file mode 100644 index 00000000..614b4b22 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_2" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_3.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_3.json new file mode 100644 index 00000000..b8c6af48 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_3" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_4.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_4.json new file mode 100644 index 00000000..a9f300dd --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_4" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_5.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_5.json new file mode 100644 index 00000000..cba7434f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_5" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_6.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_6.json new file mode 100644 index 00000000..ebe9679d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_6" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_7.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_7.json new file mode 100644 index 00000000..d0b2d010 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_7.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_7" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_8.json b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_8.json new file mode 100644 index 00000000..9763321c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/creeping_doubt_8.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_8" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal1.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal1.json new file mode 100644 index 00000000..2b4aebed --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal1.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal1", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal2.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal2.json new file mode 100644 index 00000000..24b1ec69 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal2.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal2", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal3.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal3.json new file mode 100644 index 00000000..fc658c68 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal3.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal3", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal4.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal4.json new file mode 100644 index 00000000..5fc95052 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal4.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal4", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal5.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal5.json new file mode 100644 index 00000000..a39edf1b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal5.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal5", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal6.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal6.json new file mode 100644 index 00000000..40221914 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal6.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal6", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal7.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal7.json new file mode 100644 index 00000000..bb114d6c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/corrosivecrystal7.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal7", + "textures": { + "crystal": "bloodmagic:models/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal1.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal1.json new file mode 100644 index 00000000..d6f96ee5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal1.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal1", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal2.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal2.json new file mode 100644 index 00000000..64eb34d7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal2.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal2", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal3.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal3.json new file mode 100644 index 00000000..985aa46e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal3.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal3", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal4.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal4.json new file mode 100644 index 00000000..6832216d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal4.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal4", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal5.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal5.json new file mode 100644 index 00000000..516a689d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal5.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal5", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal6.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal6.json new file mode 100644 index 00000000..b1fd517f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal6.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal6", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal7.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal7.json new file mode 100644 index 00000000..058eca74 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/defaultcrystal7.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal7", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal1.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal1.json new file mode 100644 index 00000000..a94ae6dc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal1.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal1", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal2.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal2.json new file mode 100644 index 00000000..4f35bb55 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal2.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal2", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal3.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal3.json new file mode 100644 index 00000000..a01fcd89 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal3.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal3", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal4.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal4.json new file mode 100644 index 00000000..94865f70 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal4.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal4", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal5.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal5.json new file mode 100644 index 00000000..94c1c39c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal5.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal5", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal6.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal6.json new file mode 100644 index 00000000..5d63f3ba --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal6.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal6", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal7.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal7.json new file mode 100644 index 00000000..81eb3805 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/destructivecrystal7.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal7", + "textures": { + "crystal": "bloodmagic:models/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal1.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal1.json new file mode 100644 index 00000000..ba1d5669 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal1.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal1", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal2.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal2.json new file mode 100644 index 00000000..cce291fc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal2.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal2", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal3.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal3.json new file mode 100644 index 00000000..046018b9 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal3.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal3", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal4.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal4.json new file mode 100644 index 00000000..1dc6165a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal4.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal4", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal5.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal5.json new file mode 100644 index 00000000..3ea44bc5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal5.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal5", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal6.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal6.json new file mode 100644 index 00000000..6de624be --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal6.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal6", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal7.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal7.json new file mode 100644 index 00000000..d66e329b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/steadfastcrystal7.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal7", + "textures": { + "crystal": "bloodmagic:models/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal1.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal1.json new file mode 100644 index 00000000..9fa509cf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal1.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal1", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal2.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal2.json new file mode 100644 index 00000000..c6a89b2b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal2.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal2", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal3.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal3.json new file mode 100644 index 00000000..83b5dd09 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal3.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal3", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal4.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal4.json new file mode 100644 index 00000000..16322807 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal4.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal4", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal5.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal5.json new file mode 100644 index 00000000..13d761b5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal5.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal5", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal6.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal6.json new file mode 100644 index 00000000..6c25cecf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal6.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal6", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal7.json b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal7.json new file mode 100644 index 00000000..d3a5b678 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/crystal/vengefulcrystal7.json @@ -0,0 +1,6 @@ +{ + "parent": "bloodmagic:block/crystal7", + "textures": { + "crystal": "bloodmagic:models/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/deforester_charge.json b/src/generated/resources/assets/bloodmagic/models/block/deforester_charge.json new file mode 100644 index 00000000..f441dc4e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/deforester_charge.json @@ -0,0 +1,11 @@ +{ + "parent": "bloodmagic:block/sub/shaped_charge", + "textures": { + "1": "minecraft:block/oak_log_top", + "3": "minecraft:block/oak_log_top", + "4": "bloodmagic:block/blankrune", + "5": "minecraft:block/oak_planks", + "6": "bloodmagic:models/defaultcrystal", + "particle": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dislocationrune.json b/src/generated/resources/assets/bloodmagic/models/block/dislocationrune.json new file mode 100644 index 00000000..a4b7b5f3 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dislocationrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dislocationrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick1.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick1.json new file mode 100644 index 00000000..67fd1fd3 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick2.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick2.json new file mode 100644 index 00000000..f928def2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_brick2" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick3.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick3.json new file mode 100644 index 00000000..cde0ff61 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_brick3" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate.json new file mode 100644 index 00000000..e31759c0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_open.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_open.json new file mode 100644 index 00000000..d4a81aaa --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_open.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate_open", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_wall.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_wall.json new file mode 100644 index 00000000..19ef409e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_wall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate_wall", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_wall_open.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_wall_open.json new file mode 100644 index 00000000..1d63b5c3 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_gate_wall_open.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate_wall_open", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs.json new file mode 100644 index 00000000..97ec435b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/stairs", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_brick1", + "bottom": "bloodmagic:block/dungeon/dungeon_brick1", + "top": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs_inner.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs_inner.json new file mode 100644 index 00000000..ab8c305f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs_inner.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/inner_stairs", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_brick1", + "bottom": "bloodmagic:block/dungeon/dungeon_brick1", + "top": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs_outer.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs_outer.json new file mode 100644 index 00000000..54284cbc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_stairs_outer.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/outer_stairs", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_brick1", + "bottom": "bloodmagic:block/dungeon/dungeon_brick1", + "top": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_inventory.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_inventory.json new file mode 100644 index 00000000..c90f1034 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_post.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_post.json new file mode 100644 index 00000000..1e2aa564 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_post.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_post", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_side.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_side.json new file mode 100644 index 00000000..d68f15be --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_side.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_side", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_side_tall.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_side_tall.json new file mode 100644 index 00000000..88c3bc4a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_brick_wall_side_tall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_side_tall", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_brick1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_eye.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_eye.json new file mode 100644 index 00000000..050b373a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_eye.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_eye" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_metal.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_metal.json new file mode 100644 index 00000000..bad4f014 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_metal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_metal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json new file mode 100644 index 00000000..93254ada --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_ore" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap.json new file mode 100644 index 00000000..80da11c8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/cube_bottom_top", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_pillartop", + "bottom": "bloodmagic:block/dungeon/dungeon_pillarheart", + "top": "bloodmagic:block/dungeon/dungeon_pillarheart" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_down.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_down.json new file mode 100644 index 00000000..1c9c81fa --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_down.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/cube_bottom_top", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_pillarbottom", + "bottom": "bloodmagic:block/dungeon/dungeon_pillarheart", + "top": "bloodmagic:block/dungeon/dungeon_pillarheart" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_east.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_east.json new file mode 100644 index 00000000..ddca684f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_east.json @@ -0,0 +1,59 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideBottom": "bloodmagic:block/dungeon/dungeon_pillarbottom", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideTop": "bloodmagic:block/dungeon/dungeon_pillartop" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#sideBottom", + "rotation": 270 + }, + "up": { + "texture": "#sideBottom", + "rotation": 270 + }, + "north": { + "texture": "#sideTop", + "rotation": 270 + }, + "south": { + "texture": "#sideBottom", + "rotation": 270 + }, + "west": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + }, + "east": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_north.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_north.json new file mode 100644 index 00000000..ba59597e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_north.json @@ -0,0 +1,57 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideBottom": "bloodmagic:block/dungeon/dungeon_pillarbottom", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideTop": "bloodmagic:block/dungeon/dungeon_pillartop" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#sideBottom" + }, + "up": { + "texture": "#sideTop" + }, + "north": { + "texture": "#end" + }, + "south": { + "texture": "#end" + }, + "west": { + "texture": "#sideTop", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + }, + "east": { + "texture": "#sideBottom", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_south.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_south.json new file mode 100644 index 00000000..643f943d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_south.json @@ -0,0 +1,57 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideBottom": "bloodmagic:block/dungeon/dungeon_pillarbottom", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideTop": "bloodmagic:block/dungeon/dungeon_pillartop" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#sideTop" + }, + "up": { + "texture": "#sideBottom" + }, + "north": { + "texture": "#end" + }, + "south": { + "texture": "#end" + }, + "west": { + "texture": "#sideBottom", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + }, + "east": { + "texture": "#sideTop", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_west.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_west.json new file mode 100644 index 00000000..d871f337 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_cap_west.json @@ -0,0 +1,59 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideBottom": "bloodmagic:block/dungeon/dungeon_pillarbottom", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "sideTop": "bloodmagic:block/dungeon/dungeon_pillartop" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#sideTop", + "rotation": 270 + }, + "up": { + "texture": "#sideTop", + "rotation": 270 + }, + "north": { + "texture": "#sideBottom", + "rotation": 270 + }, + "south": { + "texture": "#sideTop", + "rotation": 270 + }, + "west": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + }, + "east": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center.json new file mode 100644 index 00000000..0ee75aa8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_pillar", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center_x.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center_x.json new file mode 100644 index 00000000..dc0d116a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center_x.json @@ -0,0 +1,58 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillar", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "side": "bloodmagic:block/dungeon/dungeon_pillar" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#side", + "rotation": 270 + }, + "up": { + "texture": "#side", + "rotation": 270 + }, + "north": { + "texture": "#side", + "rotation": 270 + }, + "south": { + "texture": "#side", + "rotation": 270 + }, + "west": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + }, + "east": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center_z.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center_z.json new file mode 100644 index 00000000..8cf66442 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_center_z.json @@ -0,0 +1,56 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillar", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "side": "bloodmagic:block/dungeon/dungeon_pillar" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#side" + }, + "north": { + "texture": "#end" + }, + "south": { + "texture": "#end" + }, + "west": { + "texture": "#side", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + }, + "east": { + "texture": "#side", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special.json new file mode 100644 index 00000000..3ad64eb6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_pillarspecial", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special_x.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special_x.json new file mode 100644 index 00000000..4c04aa89 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special_x.json @@ -0,0 +1,58 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillarspecial", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "side": "bloodmagic:block/dungeon/dungeon_pillarspecial" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#side", + "rotation": 270 + }, + "up": { + "texture": "#side", + "rotation": 270 + }, + "north": { + "texture": "#side", + "rotation": 270 + }, + "south": { + "texture": "#side", + "rotation": 270 + }, + "west": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + }, + "east": { + "texture": "#end", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special_z.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special_z.json new file mode 100644 index 00000000..5c198826 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_pillar_special_z.json @@ -0,0 +1,56 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "bloodmagic:block/dungeon/dungeon_pillarspecial", + "end": "bloodmagic:block/dungeon/dungeon_pillarheart", + "side": "bloodmagic:block/dungeon/dungeon_pillarspecial" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#side" + }, + "north": { + "texture": "#end" + }, + "south": { + "texture": "#end" + }, + "west": { + "texture": "#side", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + }, + "east": { + "texture": "#side", + "uv": [ + 16.0, + 0.0, + 0.0, + 16.0 + ], + "rotation": 270 + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished.json new file mode 100644 index 00000000..0cfce680 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate.json new file mode 100644 index 00000000..00d14be8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_open.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_open.json new file mode 100644 index 00000000..eeeb11e3 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_open.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate_open", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_wall.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_wall.json new file mode 100644 index 00000000..5a753921 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_wall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate_wall", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_wall_open.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_wall_open.json new file mode 100644 index 00000000..94f199d1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_gate_wall_open.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_fence_gate_wall_open", + "textures": { + "texture": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs.json new file mode 100644 index 00000000..291e9cff --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/stairs", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_polished", + "bottom": "bloodmagic:block/dungeon/dungeon_polished", + "top": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs_inner.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs_inner.json new file mode 100644 index 00000000..f74477bd --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs_inner.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/inner_stairs", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_polished", + "bottom": "bloodmagic:block/dungeon/dungeon_polished", + "top": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs_outer.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs_outer.json new file mode 100644 index 00000000..7df9f548 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_stairs_outer.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/outer_stairs", + "textures": { + "side": "bloodmagic:block/dungeon/dungeon_polished", + "bottom": "bloodmagic:block/dungeon/dungeon_polished", + "top": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_inventory.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_inventory.json new file mode 100644 index 00000000..1b6724a7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_post.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_post.json new file mode 100644 index 00000000..a65da079 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_post.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_post", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_side.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_side.json new file mode 100644 index 00000000..c2da5f14 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_side.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_side", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_side_tall.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_side_tall.json new file mode 100644 index 00000000..2d55b1bc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_polished_wall_side_tall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_side_tall", + "textures": { + "wall": "bloodmagic:block/dungeon/dungeon_polished" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_smallbrick.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_smallbrick.json new file mode 100644 index 00000000..dd5793ed --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_smallbrick.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_smallbrick" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_stone.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_stone.json new file mode 100644 index 00000000..e76740d6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_stone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_stone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_stone_mirrored.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_stone_mirrored.json new file mode 100644 index 00000000..3b579c73 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_stone_mirrored.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_mirrored_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_stone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_tile.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_tile.json new file mode 100644 index 00000000..8f93a06d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_tile.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_tile" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_tilespecial.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_tilespecial.json new file mode 100644 index 00000000..2fb38846 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_tilespecial.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_tilespecial" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/duskritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/duskritualstone.json new file mode 100644 index 00000000..ecfcfa10 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/duskritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/duskritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/earthritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/earthritualstone.json new file mode 100644 index 00000000..e0949faa --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/earthritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/earthritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/etherealopaquemimic.json b/src/generated/resources/assets/bloodmagic/models/block/etherealopaquemimic.json new file mode 100644 index 00000000..71983d4a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/etherealopaquemimic.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/etherealopaquemimic" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/fireritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/fireritualstone.json new file mode 100644 index 00000000..1661fe87 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/fireritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/fireritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/fungal_charge.json b/src/generated/resources/assets/bloodmagic/models/block/fungal_charge.json new file mode 100644 index 00000000..49b4c667 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/fungal_charge.json @@ -0,0 +1,11 @@ +{ + "parent": "bloodmagic:block/sub/shaped_charge", + "textures": { + "1": "minecraft:block/crimson_planks", + "3": "minecraft:block/nether_wart_block", + "4": "bloodmagic:block/blankrune", + "5": "minecraft:block/crimson_stem", + "6": "bloodmagic:models/defaultcrystal", + "particle": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/largebloodstonebrick.json b/src/generated/resources/assets/bloodmagic/models/block/largebloodstonebrick.json new file mode 100644 index 00000000..25aaa1a4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/largebloodstonebrick.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/largebloodstonebrick" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/lightritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/lightritualstone.json new file mode 100644 index 00000000..89bce579 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/lightritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/lightritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/masterritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/masterritualstone.json new file mode 100644 index 00000000..cbb503be --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/masterritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/masterritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/nether_soil.json b/src/generated/resources/assets/bloodmagic/models/block/nether_soil.json new file mode 100644 index 00000000..9014e226 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/nether_soil.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/template_farmland", + "textures": { + "top": "bloodmagic:block/nether_soil", + "dirt": "minecraft:block/netherrack" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/obsidianbrickpath.json b/src/generated/resources/assets/bloodmagic/models/block/obsidianbrickpath.json new file mode 100644 index 00000000..77f2ba8e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/obsidianbrickpath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/obsidianbrickpath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/obsidiantilepath.json b/src/generated/resources/assets/bloodmagic/models/block/obsidiantilepath.json new file mode 100644 index 00000000..40a85379 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/obsidiantilepath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/obsidiantilepath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/orbcapacityrune.json b/src/generated/resources/assets/bloodmagic/models/block/orbcapacityrune.json new file mode 100644 index 00000000..db85074a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/orbcapacityrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/orbcapacityrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/ritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/ritualstone.json new file mode 100644 index 00000000..ca5b7b23 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/ritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/ritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/sacrificerune.json b/src/generated/resources/assets/bloodmagic/models/block/sacrificerune.json new file mode 100644 index 00000000..9f99851f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/sacrificerune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/sacrificerune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/selfsacrificerune.json b/src/generated/resources/assets/bloodmagic/models/block/selfsacrificerune.json new file mode 100644 index 00000000..bad7ca8e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/selfsacrificerune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/selfsacrificerune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/sentientmimic.json b/src/generated/resources/assets/bloodmagic/models/block/sentientmimic.json new file mode 100644 index 00000000..09592433 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/sentientmimic.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/sentientmimic" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/shaped_charge.json b/src/generated/resources/assets/bloodmagic/models/block/shaped_charge.json new file mode 100644 index 00000000..75078a95 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/shaped_charge.json @@ -0,0 +1,11 @@ +{ + "parent": "bloodmagic:block/sub/shaped_charge", + "textures": { + "1": "bloodmagic:block/dungeon/dungeon_tile", + "3": "bloodmagic:block/dungeon/dungeon_stone", + "4": "bloodmagic:block/blankrune", + "5": "bloodmagic:block/largebloodstonebrick", + "6": "bloodmagic:models/defaultcrystal", + "particle": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/solidclearmimic.json b/src/generated/resources/assets/bloodmagic/models/block/solidclearmimic.json new file mode 100644 index 00000000..bed0be1c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/solidclearmimic.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/solidclearmimic" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/solidlightmimic.json b/src/generated/resources/assets/bloodmagic/models/block/solidlightmimic.json new file mode 100644 index 00000000..7dbf0fc7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/solidlightmimic.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/solidlightmimic" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/solidopaquemimic.json b/src/generated/resources/assets/bloodmagic/models/block/solidopaquemimic.json new file mode 100644 index 00000000..0028f9e4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/solidopaquemimic.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/solidopaquemimic" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/speedrune.json b/src/generated/resources/assets/bloodmagic/models/block/speedrune.json new file mode 100644 index 00000000..d33d1f07 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/speedrune.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/speedrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/stonebrickpath.json b/src/generated/resources/assets/bloodmagic/models/block/stonebrickpath.json new file mode 100644 index 00000000..59ad054f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/stonebrickpath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/stonebrickpath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/stonetilepath.json b/src/generated/resources/assets/bloodmagic/models/block/stonetilepath.json new file mode 100644 index 00000000..380149f4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/stonetilepath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/stonetilepath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/veinmine_charge.json b/src/generated/resources/assets/bloodmagic/models/block/veinmine_charge.json new file mode 100644 index 00000000..1c50bf82 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/veinmine_charge.json @@ -0,0 +1,11 @@ +{ + "parent": "bloodmagic:block/sub/shaped_charge", + "textures": { + "1": "minecraft:block/sandstone_bottom", + "3": "minecraft:block/sandstone_bottom", + "4": "bloodmagic:block/blankrune", + "5": "minecraft:block/sand", + "6": "bloodmagic:models/defaultcrystal", + "particle": "bloodmagic:models/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/waterritualstone.json b/src/generated/resources/assets/bloodmagic/models/block/waterritualstone.json new file mode 100644 index 00000000..1222a06c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/waterritualstone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/waterritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/woodbrickpath.json b/src/generated/resources/assets/bloodmagic/models/block/woodbrickpath.json new file mode 100644 index 00000000..32aa5bb7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/woodbrickpath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/woodbrickpath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/woodtilepath.json b/src/generated/resources/assets/bloodmagic/models/block/woodtilepath.json new file mode 100644 index 00000000..b2a8fbe6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/woodtilepath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/woodtilepath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/wornstonebrickpath.json b/src/generated/resources/assets/bloodmagic/models/block/wornstonebrickpath.json new file mode 100644 index 00000000..b4a3da7b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/wornstonebrickpath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/wornstonebrickpath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/block/wornstonetilepath.json b/src/generated/resources/assets/bloodmagic/models/block/wornstonetilepath.json new file mode 100644 index 00000000..b1e91317 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/wornstonetilepath.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/wornstonetilepath" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/accelerationrune.json b/src/generated/resources/assets/bloodmagic/models/item/accelerationrune.json new file mode 100644 index 00000000..4551c1a8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/accelerationrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/accelerationrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/activationcrystalawakened.json b/src/generated/resources/assets/bloodmagic/models/item/activationcrystalawakened.json new file mode 100644 index 00000000..25f235a5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/activationcrystalawakened.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/activationcrystalawakened" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/activationcrystalcreative.json b/src/generated/resources/assets/bloodmagic/models/item/activationcrystalcreative.json new file mode 100644 index 00000000..3b5983f3 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/activationcrystalcreative.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/activationcrystalcreative" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/activationcrystalweak.json b/src/generated/resources/assets/bloodmagic/models/item/activationcrystalweak.json new file mode 100644 index 00000000..fddc803a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/activationcrystalweak.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/activationcrystalweak" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/airritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/airritualstone.json new file mode 100644 index 00000000..a32ef885 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/airritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/airritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/airscribetool.json b/src/generated/resources/assets/bloodmagic/models/item/airscribetool.json new file mode 100644 index 00000000..000892ca --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/airscribetool.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/airscribetool" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/airsigil.json b/src/generated/resources/assets/bloodmagic/models/item/airsigil.json new file mode 100644 index 00000000..b90cce51 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/airsigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/airsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/alchemicalreactionchamber.json b/src/generated/resources/assets/bloodmagic/models/item/alchemicalreactionchamber.json new file mode 100644 index 00000000..bb6ed1e2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/alchemicalreactionchamber.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/alchemicalreactionchamber" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/altarcapacityrune.json b/src/generated/resources/assets/bloodmagic/models/item/altarcapacityrune.json new file mode 100644 index 00000000..819ef814 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/altarcapacityrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/altarcapacityrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/apprenticebloodorb.json b/src/generated/resources/assets/bloodmagic/models/item/apprenticebloodorb.json new file mode 100644 index 00000000..e010d2b7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/apprenticebloodorb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/apprenticebloodorb" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/arcaneashes.json b/src/generated/resources/assets/bloodmagic/models/item/arcaneashes.json new file mode 100644 index 00000000..19120a51 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/arcaneashes.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/arcaneashes" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul.json b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul.json new file mode 100644 index 00000000..5455472a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/basemonstersoul" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_corrosive.json new file mode 100644 index 00000000..bd22eb5f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/basemonstersoul_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_destructive.json new file mode 100644 index 00000000..3fcd9fd7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/basemonstersoul_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_steadfast.json new file mode 100644 index 00000000..db32c775 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/basemonstersoul_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_vengeful.json new file mode 100644 index 00000000..966c0f17 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/basemonstersoul_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/basemonstersoul_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/basiccuttingfluid.json b/src/generated/resources/assets/bloodmagic/models/item/basiccuttingfluid.json new file mode 100644 index 00000000..0d5d0cdc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/basiccuttingfluid.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/basiccuttingfluid" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/bettercapacityrune.json b/src/generated/resources/assets/bloodmagic/models/item/bettercapacityrune.json new file mode 100644 index 00000000..f8b79342 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/bettercapacityrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/bettercapacityrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/blankrune.json b/src/generated/resources/assets/bloodmagic/models/item/blankrune.json new file mode 100644 index 00000000..7bf5795e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/blankrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/blankrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/blankslate.json b/src/generated/resources/assets/bloodmagic/models/item/blankslate.json new file mode 100644 index 00000000..d3094597 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/blankslate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/blankslate" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/bloodlightsigil.json b/src/generated/resources/assets/bloodmagic/models/item/bloodlightsigil.json new file mode 100644 index 00000000..4ae506f9 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/bloodlightsigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/bloodlightsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/bloodstonebrick.json b/src/generated/resources/assets/bloodmagic/models/item/bloodstonebrick.json new file mode 100644 index 00000000..533f926a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/bloodstonebrick.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/bloodstonebrick" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/bow_power_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/bow_power_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/bow_power_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/chargingrune.json b/src/generated/resources/assets/bloodmagic/models/item/chargingrune.json new file mode 100644 index 00000000..ccd29652 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/chargingrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/chargingrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/coalsand.json b/src/generated/resources/assets/bloodmagic/models/item/coalsand.json new file mode 100644 index 00000000..12aaa0cc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/coalsand.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/coalsand" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/corrosivecrystal.json b/src/generated/resources/assets/bloodmagic/models/item/corrosivecrystal.json new file mode 100644 index 00000000..d99e15f4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/corrosivecrystal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/corrosivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/corrosivedemoncrystal.json b/src/generated/resources/assets/bloodmagic/models/item/corrosivedemoncrystal.json new file mode 100644 index 00000000..5e739ff2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/corrosivedemoncrystal.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/crystal/corrosivecrystal1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/corrupted_dust.json b/src/generated/resources/assets/bloodmagic/models/item/corrupted_dust.json new file mode 100644 index 00000000..a5f430a4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/corrupted_dust.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/corrupted_dust" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/corrupted_tinydust.json b/src/generated/resources/assets/bloodmagic/models/item/corrupted_tinydust.json new file mode 100644 index 00000000..a9ecf66f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/corrupted_tinydust.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/corrupted_tinydust" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/creeping_doubt.json b/src/generated/resources/assets/bloodmagic/models/item/creeping_doubt.json new file mode 100644 index 00000000..9763321c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/creeping_doubt.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/crop", + "textures": { + "crop": "bloodmagic:block/creeping_doubt_8" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/crystalline_resonator.json b/src/generated/resources/assets/bloodmagic/models/item/crystalline_resonator.json new file mode 100644 index 00000000..44408cd6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/crystalline_resonator.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/crystalline_resonator" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/daggerofsacrifice.json b/src/generated/resources/assets/bloodmagic/models/item/daggerofsacrifice.json new file mode 100644 index 00000000..762c92a7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/daggerofsacrifice.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/daggerofsacrifice" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/defaultcrystal.json b/src/generated/resources/assets/bloodmagic/models/item/defaultcrystal.json new file mode 100644 index 00000000..630e05a5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/defaultcrystal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/defaultcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/deforester_charge.json b/src/generated/resources/assets/bloodmagic/models/item/deforester_charge.json new file mode 100644 index 00000000..64187a41 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/deforester_charge.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/deforester_charge" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/demonslate.json b/src/generated/resources/assets/bloodmagic/models/item/demonslate.json new file mode 100644 index 00000000..97d3e2f5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/demonslate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/demonslate" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/demonwillgauge.json b/src/generated/resources/assets/bloodmagic/models/item/demonwillgauge.json new file mode 100644 index 00000000..db062669 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/demonwillgauge.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/demonwillgauge" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/destructivecrystal.json b/src/generated/resources/assets/bloodmagic/models/item/destructivecrystal.json new file mode 100644 index 00000000..728b4dc5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/destructivecrystal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/destructivecrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/destructivedemoncrystal.json b/src/generated/resources/assets/bloodmagic/models/item/destructivedemoncrystal.json new file mode 100644 index 00000000..132afed7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/destructivedemoncrystal.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/crystal/destructivecrystal1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dislocationrune.json b/src/generated/resources/assets/bloodmagic/models/item/dislocationrune.json new file mode 100644 index 00000000..1ddb2946 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dislocationrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dislocationrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/divinationsigil.json b/src/generated/resources/assets/bloodmagic/models/item/divinationsigil.json new file mode 100644 index 00000000..364fb1ec --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/divinationsigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/divinationsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick1.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick1.json new file mode 100644 index 00000000..11d3536b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick1.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick2.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick2.json new file mode 100644 index 00000000..5f9095c0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick2.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick2" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick3.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick3.json new file mode 100644 index 00000000..fc97a2a2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick3.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick3" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_assorted.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_assorted.json new file mode 100644 index 00000000..11d3536b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_assorted.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_gate.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_gate.json new file mode 100644 index 00000000..818f37f8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_gate.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick_gate" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_stairs.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_stairs.json new file mode 100644 index 00000000..f4f7c835 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_stairs.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick_stairs" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_wall.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_wall.json new file mode 100644 index 00000000..ee594c7e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_brick_wall.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_brick_wall_inventory" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_eye.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_eye.json new file mode 100644 index 00000000..b306aa4e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_eye.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_eye" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_metal.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_metal.json new file mode 100644 index 00000000..b4412870 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_metal.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_metal" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json new file mode 100644 index 00000000..64362081 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_ore" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_cap.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_cap.json new file mode 100644 index 00000000..03211bec --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_cap.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_pillar_cap" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_center.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_center.json new file mode 100644 index 00000000..7a965604 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_center.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_pillar_center" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_special.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_special.json new file mode 100644 index 00000000..dcbe8148 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_pillar_special.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_pillar_special" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished.json new file mode 100644 index 00000000..334777b9 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_polished" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_gate.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_gate.json new file mode 100644 index 00000000..ec9c6b87 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_gate.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_polished_gate" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_stairs.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_stairs.json new file mode 100644 index 00000000..cb02affc --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_stairs.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_polished_stairs" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_wall.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_wall.json new file mode 100644 index 00000000..f02221cf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_polished_wall.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_polished_wall_inventory" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_smallbrick.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_smallbrick.json new file mode 100644 index 00000000..2ccf3f92 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_smallbrick.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_smallbrick" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_stone.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_stone.json new file mode 100644 index 00000000..4c9c2b6a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_stone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_stone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json new file mode 100644 index 00000000..f408e84c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/dungeon_tester" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_tile.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tile.json new file mode 100644 index 00000000..4c80f99b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tile.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_tile" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_tilespecial.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tilespecial.json new file mode 100644 index 00000000..98d6dc5a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tilespecial.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_tilespecial" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/duskritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/duskritualstone.json new file mode 100644 index 00000000..289ff1ee --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/duskritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/duskritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/duskscribetool.json b/src/generated/resources/assets/bloodmagic/models/item/duskscribetool.json new file mode 100644 index 00000000..c95b2d43 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/duskscribetool.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/duskscribetool" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/earthritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/earthritualstone.json new file mode 100644 index 00000000..3758ede0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/earthritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/earthritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/earthscribetool.json b/src/generated/resources/assets/bloodmagic/models/item/earthscribetool.json new file mode 100644 index 00000000..4eb734a9 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/earthscribetool.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/earthscribetool" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ethereal_mimic.json b/src/generated/resources/assets/bloodmagic/models/item/ethereal_mimic.json new file mode 100644 index 00000000..caeb3a85 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ethereal_mimic.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/etherealopaquemimic" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/etherealslate.json b/src/generated/resources/assets/bloodmagic/models/item/etherealslate.json new file mode 100644 index 00000000..c0f0f8a0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/etherealslate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/etherealslate" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/experiencebook.json b/src/generated/resources/assets/bloodmagic/models/item/experiencebook.json new file mode 100644 index 00000000..693287c2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/experiencebook.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/experiencebook" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/explosivepowder.json b/src/generated/resources/assets/bloodmagic/models/item/explosivepowder.json new file mode 100644 index 00000000..25c7aa64 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/explosivepowder.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/explosivepowder" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/fireritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/fireritualstone.json new file mode 100644 index 00000000..6eef57c2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/fireritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/fireritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/firescribetool.json b/src/generated/resources/assets/bloodmagic/models/item/firescribetool.json new file mode 100644 index 00000000..9eb63402 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/firescribetool.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/firescribetool" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/fortune_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/fortune_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/fortune_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/fragment_netherite_scrap.json b/src/generated/resources/assets/bloodmagic/models/item/fragment_netherite_scrap.json new file mode 100644 index 00000000..791fa55c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/fragment_netherite_scrap.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/fragment_netherite_scrap" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/fungal_charge.json b/src/generated/resources/assets/bloodmagic/models/item/fungal_charge.json new file mode 100644 index 00000000..59b1be87 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/fungal_charge.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/fungal_charge" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/furnacecell_primitive.json b/src/generated/resources/assets/bloodmagic/models/item/furnacecell_primitive.json new file mode 100644 index 00000000..cefb8192 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/furnacecell_primitive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/furnacecell_primitive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/goldfragment.json b/src/generated/resources/assets/bloodmagic/models/item/goldfragment.json new file mode 100644 index 00000000..d8024eaf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/goldfragment.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/goldfragment" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/goldgravel.json b/src/generated/resources/assets/bloodmagic/models/item/goldgravel.json new file mode 100644 index 00000000..c104e0f5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/goldgravel.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/goldgravel" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/goldsand.json b/src/generated/resources/assets/bloodmagic/models/item/goldsand.json new file mode 100644 index 00000000..29106249 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/goldsand.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/goldsand" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/gravel_netherite_scrap.json b/src/generated/resources/assets/bloodmagic/models/item/gravel_netherite_scrap.json new file mode 100644 index 00000000..79f99443 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/gravel_netherite_scrap.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/gravel_netherite_scrap" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/growthsigil.json b/src/generated/resources/assets/bloodmagic/models/item/growthsigil.json new file mode 100644 index 00000000..545030bf --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/growthsigil.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/growthsigil_deactivated" + }, + { + "predicate": { + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/growthsigil_activated" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/hidden_knowledge_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/hidden_knowledge_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/hidden_knowledge_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/holy_water_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/holy_water_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/holy_water_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/icesigil.json b/src/generated/resources/assets/bloodmagic/models/item/icesigil.json new file mode 100644 index 00000000..67d4348e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/icesigil.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/icesigil_deactivated" + }, + { + "predicate": { + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/icesigil_activated" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/infusedslate.json b/src/generated/resources/assets/bloodmagic/models/item/infusedslate.json new file mode 100644 index 00000000..057c0fc7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/infusedslate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/infusedslate" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ingot_hellforged.json b/src/generated/resources/assets/bloodmagic/models/item/ingot_hellforged.json new file mode 100644 index 00000000..6f2132df --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ingot_hellforged.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/ingot_hellforged" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ironfragment.json b/src/generated/resources/assets/bloodmagic/models/item/ironfragment.json new file mode 100644 index 00000000..acd23d13 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ironfragment.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/ironfragment" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/irongravel.json b/src/generated/resources/assets/bloodmagic/models/item/irongravel.json new file mode 100644 index 00000000..cd5e0c4d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/irongravel.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/irongravel" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ironsand.json b/src/generated/resources/assets/bloodmagic/models/item/ironsand.json new file mode 100644 index 00000000..9ad179b8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ironsand.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/ironsand" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/largebloodstonebrick.json b/src/generated/resources/assets/bloodmagic/models/item/largebloodstonebrick.json new file mode 100644 index 00000000..c048956c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/largebloodstonebrick.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/largebloodstonebrick" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/lavacrystal.json b/src/generated/resources/assets/bloodmagic/models/item/lavacrystal.json new file mode 100644 index 00000000..663eee3d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/lavacrystal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/lavacrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/lavasigil.json b/src/generated/resources/assets/bloodmagic/models/item/lavasigil.json new file mode 100644 index 00000000..78803529 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/lavasigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/lavasigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/lightritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/lightritualstone.json new file mode 100644 index 00000000..96ca64a5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/lightritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/lightritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/livingboots.json b/src/generated/resources/assets/bloodmagic/models/item/livingboots.json new file mode 100644 index 00000000..6fc62fe4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/livingboots.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/livingboots" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/livinghelmet.json b/src/generated/resources/assets/bloodmagic/models/item/livinghelmet.json new file mode 100644 index 00000000..26231b72 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/livinghelmet.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/livinghelmet" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/livingleggings.json b/src/generated/resources/assets/bloodmagic/models/item/livingleggings.json new file mode 100644 index 00000000..9f9e8220 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/livingleggings.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/livingleggings" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/livingplate.json b/src/generated/resources/assets/bloodmagic/models/item/livingplate.json new file mode 100644 index 00000000..ffcf6a31 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/livingplate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/livingplate" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/looting_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/looting_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/looting_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/magicianbloodorb.json b/src/generated/resources/assets/bloodmagic/models/item/magicianbloodorb.json new file mode 100644 index 00000000..218986d2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/magicianbloodorb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/magicianbloodorb" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/masterbloodorb.json b/src/generated/resources/assets/bloodmagic/models/item/masterbloodorb.json new file mode 100644 index 00000000..63d243a6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/masterbloodorb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/masterbloodorb" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/masterritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/masterritualstone.json new file mode 100644 index 00000000..84e36366 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/masterritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/masterritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/melee_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/melee_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/melee_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/mimic.json b/src/generated/resources/assets/bloodmagic/models/item/mimic.json new file mode 100644 index 00000000..82d7c08b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/mimic.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/solidopaquemimic" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/miningsigil.json b/src/generated/resources/assets/bloodmagic/models/item/miningsigil.json new file mode 100644 index 00000000..f2f8923a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/miningsigil.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/miningsigil_deactivated" + }, + { + "predicate": { + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/miningsigil_activated" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/nether_soil.json b/src/generated/resources/assets/bloodmagic/models/item/nether_soil.json new file mode 100644 index 00000000..e26c6db7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/nether_soil.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/nether_soil" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/obsidianbrickpath.json b/src/generated/resources/assets/bloodmagic/models/item/obsidianbrickpath.json new file mode 100644 index 00000000..03c76b69 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/obsidianbrickpath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/obsidianbrickpath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/obsidiantilepath.json b/src/generated/resources/assets/bloodmagic/models/item/obsidiantilepath.json new file mode 100644 index 00000000..3db5658a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/obsidiantilepath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/obsidiantilepath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/orbcapacityrune.json b/src/generated/resources/assets/bloodmagic/models/item/orbcapacityrune.json new file mode 100644 index 00000000..c851584c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/orbcapacityrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/orbcapacityrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/plantoil.json b/src/generated/resources/assets/bloodmagic/models/item/plantoil.json new file mode 100644 index 00000000..f61b1551 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/plantoil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/plantoil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/primitive_crystalline_resonator.json b/src/generated/resources/assets/bloodmagic/models/item/primitive_crystalline_resonator.json new file mode 100644 index 00000000..71d561ab --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/primitive_crystalline_resonator.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/primitive_crystalline_resonator" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/primitive_explosive_cell.json b/src/generated/resources/assets/bloodmagic/models/item/primitive_explosive_cell.json new file mode 100644 index 00000000..29f8d0f1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/primitive_explosive_cell.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/primitive_explosive_cell" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/primitive_hydration_cell.json b/src/generated/resources/assets/bloodmagic/models/item/primitive_hydration_cell.json new file mode 100644 index 00000000..73f64a0c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/primitive_hydration_cell.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/primitive_hydration_cell" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/quick_draw_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/quick_draw_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/quick_draw_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/rawdemoncrystal.json b/src/generated/resources/assets/bloodmagic/models/item/rawdemoncrystal.json new file mode 100644 index 00000000..d1f4da91 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/rawdemoncrystal.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/crystal/defaultcrystal1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentair.json b/src/generated/resources/assets/bloodmagic/models/item/reagentair.json new file mode 100644 index 00000000..3cdc9d64 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentair.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentair" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentbinding.json b/src/generated/resources/assets/bloodmagic/models/item/reagentbinding.json new file mode 100644 index 00000000..e8409a07 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentbinding.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentbinding" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentbloodlight.json b/src/generated/resources/assets/bloodmagic/models/item/reagentbloodlight.json new file mode 100644 index 00000000..54d4afa2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentbloodlight.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentbloodlight" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentfastminer.json b/src/generated/resources/assets/bloodmagic/models/item/reagentfastminer.json new file mode 100644 index 00000000..3c4434b7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentfastminer.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentfastminer" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentgrowth.json b/src/generated/resources/assets/bloodmagic/models/item/reagentgrowth.json new file mode 100644 index 00000000..3d4ee45c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentgrowth.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentgrowth" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentholding.json b/src/generated/resources/assets/bloodmagic/models/item/reagentholding.json new file mode 100644 index 00000000..b84ea6fb --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentholding.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentholding" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentlava.json b/src/generated/resources/assets/bloodmagic/models/item/reagentlava.json new file mode 100644 index 00000000..d6139efe --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentlava.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentlava" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentmagnetism.json b/src/generated/resources/assets/bloodmagic/models/item/reagentmagnetism.json new file mode 100644 index 00000000..121d0018 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentmagnetism.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentmagnetism" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentsight.json b/src/generated/resources/assets/bloodmagic/models/item/reagentsight.json new file mode 100644 index 00000000..37f60639 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentsight.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentsight" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentvoid.json b/src/generated/resources/assets/bloodmagic/models/item/reagentvoid.json new file mode 100644 index 00000000..4f6564c8 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentvoid.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentvoid" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reagentwater.json b/src/generated/resources/assets/bloodmagic/models/item/reagentwater.json new file mode 100644 index 00000000..b5730d1a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reagentwater.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reagentwater" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/reinforcedslate.json b/src/generated/resources/assets/bloodmagic/models/item/reinforcedslate.json new file mode 100644 index 00000000..3299a6a5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/reinforcedslate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/reinforcedslate" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ritualdiviner.json b/src/generated/resources/assets/bloodmagic/models/item/ritualdiviner.json new file mode 100644 index 00000000..39b88d5c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ritualdiviner.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/ritualdiviner" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ritualdivinerdusk.json b/src/generated/resources/assets/bloodmagic/models/item/ritualdivinerdusk.json new file mode 100644 index 00000000..48ee296e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ritualdivinerdusk.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/ritualdivinerdusk" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/ritualstone.json new file mode 100644 index 00000000..4dea1d50 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/ritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/ritualtinkerer.json b/src/generated/resources/assets/bloodmagic/models/item/ritualtinkerer.json new file mode 100644 index 00000000..31fcff20 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/ritualtinkerer.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/ritualtinkerer" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sacrificerune.json b/src/generated/resources/assets/bloodmagic/models/item/sacrificerune.json new file mode 100644 index 00000000..dcbe6138 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sacrificerune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/sacrificerune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sacrificialdagger.json b/src/generated/resources/assets/bloodmagic/models/item/sacrificialdagger.json new file mode 100644 index 00000000..08eefb43 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sacrificialdagger.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/sacrificialdagger" + }, + "overrides": [ + { + "predicate": { + "bloodmagic:incense": 0.0 + }, + "model": "bloodmagic:item/variants/sacrificialdagger" + }, + { + "predicate": { + "bloodmagic:incense": 1.0 + }, + "model": "bloodmagic:item/variants/sacrificialdagger_ceremonial" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/saltpeter.json b/src/generated/resources/assets/bloodmagic/models/item/saltpeter.json new file mode 100644 index 00000000..b9ba71f1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/saltpeter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/saltpeter" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sand_hellforged.json b/src/generated/resources/assets/bloodmagic/models/item/sand_hellforged.json new file mode 100644 index 00000000..03c5f26d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sand_hellforged.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/sand_hellforged" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sand_netherite.json b/src/generated/resources/assets/bloodmagic/models/item/sand_netherite.json new file mode 100644 index 00000000..99d41148 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sand_netherite.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/sand_netherite" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sanguinereverter.json b/src/generated/resources/assets/bloodmagic/models/item/sanguinereverter.json new file mode 100644 index 00000000..2e6c6de6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sanguinereverter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/sanguinereverter" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/seersigil.json b/src/generated/resources/assets/bloodmagic/models/item/seersigil.json new file mode 100644 index 00000000..f513120b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/seersigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/seersigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/selfsacrificerune.json b/src/generated/resources/assets/bloodmagic/models/item/selfsacrificerune.json new file mode 100644 index 00000000..ab853e7b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/selfsacrificerune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/selfsacrificerune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/shaped_charge.json b/src/generated/resources/assets/bloodmagic/models/item/shaped_charge.json new file mode 100644 index 00000000..de035a33 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/shaped_charge.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/shaped_charge" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sigilofholding.json b/src/generated/resources/assets/bloodmagic/models/item/sigilofholding.json new file mode 100644 index 00000000..32760a59 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sigilofholding.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/sigilofholding" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sigilofmagnetism.json b/src/generated/resources/assets/bloodmagic/models/item/sigilofmagnetism.json new file mode 100644 index 00000000..8a5253db --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sigilofmagnetism.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/sigilofmagnetism_deactivated" + }, + { + "predicate": { + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/sigilofmagnetism_activated" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/silk_touch_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/silk_touch_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/silk_touch_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/slate_ampoule.json b/src/generated/resources/assets/bloodmagic/models/item/slate_ampoule.json new file mode 100644 index 00000000..bfabb3e6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/slate_ampoule.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/slate_ampoule" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/slate_vial.json b/src/generated/resources/assets/bloodmagic/models/item/slate_vial.json new file mode 100644 index 00000000..1dfb1022 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/slate_vial.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/smelting_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/smelting_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/smelting_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulaxe.json b/src/generated/resources/assets/bloodmagic/models/item/soulaxe.json new file mode 100644 index 00000000..7a752a51 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulaxe.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulaxe" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulaxe_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulaxe_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulaxe_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulaxe_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulgemcommon.json b/src/generated/resources/assets/bloodmagic/models/item/soulgemcommon.json new file mode 100644 index 00000000..7629117a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulgemcommon.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulgemcommon" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulgemcommon_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulgemcommon_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulgemcommon_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulgemcommon_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulgemgreater.json b/src/generated/resources/assets/bloodmagic/models/item/soulgemgreater.json new file mode 100644 index 00000000..8c237764 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulgemgreater.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulgemgreater" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulgemgreater_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulgemgreater_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulgemgreater_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulgemgreater_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulgemlesser.json b/src/generated/resources/assets/bloodmagic/models/item/soulgemlesser.json new file mode 100644 index 00000000..3489ce2f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulgemlesser.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulgemlesser" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulgemlesser_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulgemlesser_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulgemlesser_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulgemlesser_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulgempetty.json b/src/generated/resources/assets/bloodmagic/models/item/soulgempetty.json new file mode 100644 index 00000000..b8c2358c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulgempetty.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulgempetty" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulgempetty_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulgempetty_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulgempetty_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulgempetty_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulpickaxe.json b/src/generated/resources/assets/bloodmagic/models/item/soulpickaxe.json new file mode 100644 index 00000000..14619409 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulpickaxe.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulpickaxe" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulpickaxe_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulpickaxe_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulpickaxe_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulpickaxe_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulscythe.json b/src/generated/resources/assets/bloodmagic/models/item/soulscythe.json new file mode 100644 index 00000000..54c81982 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulscythe.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulscythe" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulscythe_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulscythe_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulscythe_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulscythe_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulshovel.json b/src/generated/resources/assets/bloodmagic/models/item/soulshovel.json new file mode 100644 index 00000000..b6d3c67e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulshovel.json @@ -0,0 +1,34 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0 + }, + "model": "bloodmagic:item/variants/soulshovel" + }, + { + "predicate": { + "bloodmagic:type": 1.0 + }, + "model": "bloodmagic:item/variants/soulshovel_corrosive" + }, + { + "predicate": { + "bloodmagic:type": 2.0 + }, + "model": "bloodmagic:item/variants/soulshovel_destructive" + }, + { + "predicate": { + "bloodmagic:type": 3.0 + }, + "model": "bloodmagic:item/variants/soulshovel_vengeful" + }, + { + "predicate": { + "bloodmagic:type": 4.0 + }, + "model": "bloodmagic:item/variants/soulshovel_steadfast" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulsnare.json b/src/generated/resources/assets/bloodmagic/models/item/soulsnare.json new file mode 100644 index 00000000..91fa098e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulsnare.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/soulsnare" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/soulsword.json b/src/generated/resources/assets/bloodmagic/models/item/soulsword.json new file mode 100644 index 00000000..47e58c18 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/soulsword.json @@ -0,0 +1,74 @@ +{ + "overrides": [ + { + "predicate": { + "bloodmagic:type": 0.0, + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/soulsword_deactivated" + }, + { + "predicate": { + "bloodmagic:type": 1.0, + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/soulsword_corrosive_deactivated" + }, + { + "predicate": { + "bloodmagic:type": 2.0, + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/soulsword_destructive_deactivated" + }, + { + "predicate": { + "bloodmagic:type": 3.0, + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/soulsword_vengeful_deactivated" + }, + { + "predicate": { + "bloodmagic:type": 4.0, + "bloodmagic:active": 0.0 + }, + "model": "bloodmagic:item/variants/soulsword_steadfast_deactivated" + }, + { + "predicate": { + "bloodmagic:type": 0.0, + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/soulsword_activated" + }, + { + "predicate": { + "bloodmagic:type": 1.0, + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/soulsword_corrosive_activated" + }, + { + "predicate": { + "bloodmagic:type": 2.0, + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/soulsword_destructive_activated" + }, + { + "predicate": { + "bloodmagic:type": 3.0, + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/soulsword_vengeful_activated" + }, + { + "predicate": { + "bloodmagic:type": 4.0, + "bloodmagic:active": 1.0 + }, + "model": "bloodmagic:item/variants/soulsword_steadfast_activated" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/speedrune.json b/src/generated/resources/assets/bloodmagic/models/item/speedrune.json new file mode 100644 index 00000000..d2bec661 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/speedrune.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/speedrune" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/steadfastcrystal.json b/src/generated/resources/assets/bloodmagic/models/item/steadfastcrystal.json new file mode 100644 index 00000000..5a4fee55 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/steadfastcrystal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/steadfastcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/steadfastdemoncrystal.json b/src/generated/resources/assets/bloodmagic/models/item/steadfastdemoncrystal.json new file mode 100644 index 00000000..d874984d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/steadfastdemoncrystal.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/crystal/steadfastcrystal1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/stonebrickpath.json b/src/generated/resources/assets/bloodmagic/models/item/stonebrickpath.json new file mode 100644 index 00000000..f7f36e89 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/stonebrickpath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/stonebrickpath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/stonetilepath.json b/src/generated/resources/assets/bloodmagic/models/item/stonetilepath.json new file mode 100644 index 00000000..42594e88 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/stonetilepath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/stonetilepath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/sulfur.json b/src/generated/resources/assets/bloodmagic/models/item/sulfur.json new file mode 100644 index 00000000..c52f67e0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/sulfur.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/sulfur" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/throwing_dagger.json b/src/generated/resources/assets/bloodmagic/models/item/throwing_dagger.json new file mode 100644 index 00000000..59297614 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/throwing_dagger.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/throwing_dagger" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/throwing_dagger_syringe.json b/src/generated/resources/assets/bloodmagic/models/item/throwing_dagger_syringe.json new file mode 100644 index 00000000..2e98d782 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/throwing_dagger_syringe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/throwing_dagger_syringe" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/upgradetome.json b/src/generated/resources/assets/bloodmagic/models/item/upgradetome.json new file mode 100644 index 00000000..674756d4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/upgradetome.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/upgradetome" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/growthsigil_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/growthsigil_activated.json new file mode 100644 index 00000000..0f5b60bd --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/growthsigil_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/growthsigil_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/growthsigil_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/growthsigil_deactivated.json new file mode 100644 index 00000000..5d14ea40 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/growthsigil_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/growthsigil_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/icesigil_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/icesigil_activated.json new file mode 100644 index 00000000..9f6e940a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/icesigil_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/icesigil_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/icesigil_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/icesigil_deactivated.json new file mode 100644 index 00000000..5a461a5d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/icesigil_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/icesigil_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/miningsigil_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/miningsigil_activated.json new file mode 100644 index 00000000..12877c52 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/miningsigil_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/miningsigil_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/miningsigil_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/miningsigil_deactivated.json new file mode 100644 index 00000000..858e701f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/miningsigil_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/miningsigil_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/sacrificialdagger.json b/src/generated/resources/assets/bloodmagic/models/item/variants/sacrificialdagger.json new file mode 100644 index 00000000..20e1c9f1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/sacrificialdagger.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/sacrificialdagger" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/sacrificialdagger_ceremonial.json b/src/generated/resources/assets/bloodmagic/models/item/variants/sacrificialdagger_ceremonial.json new file mode 100644 index 00000000..ba8ea9db --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/sacrificialdagger_ceremonial.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/sacrificialdagger_ceremonial" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/sigilofmagnetism_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/sigilofmagnetism_activated.json new file mode 100644 index 00000000..b49d9096 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/sigilofmagnetism_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/sigilofmagnetism_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/sigilofmagnetism_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/sigilofmagnetism_deactivated.json new file mode 100644 index 00000000..f0b2fa42 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/sigilofmagnetism_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/sigilofmagnetism_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe.json new file mode 100644 index 00000000..30fdc78b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulaxe" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_corrosive.json new file mode 100644 index 00000000..a55f906f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulaxe_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_destructive.json new file mode 100644 index 00000000..8df2b5f9 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulaxe_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_steadfast.json new file mode 100644 index 00000000..d67ffdc2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulaxe_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_vengeful.json new file mode 100644 index 00000000..57f65f4c --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulaxe_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulaxe_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon.json new file mode 100644 index 00000000..460ba68b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemcommon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_corrosive.json new file mode 100644 index 00000000..0fa3a377 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemcommon_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_destructive.json new file mode 100644 index 00000000..2e30b739 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemcommon_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_steadfast.json new file mode 100644 index 00000000..56b5b375 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemcommon_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_vengeful.json new file mode 100644 index 00000000..fc3b3fd5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemcommon_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemcommon_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater.json new file mode 100644 index 00000000..00ffd7ea --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemgreater" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_corrosive.json new file mode 100644 index 00000000..bdbcf609 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemgreater_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_destructive.json new file mode 100644 index 00000000..285cff8e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemgreater_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_steadfast.json new file mode 100644 index 00000000..beb0d2a7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemgreater_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_vengeful.json new file mode 100644 index 00000000..2808693f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemgreater_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemgreater_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser.json new file mode 100644 index 00000000..7a253c28 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemlesser" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_corrosive.json new file mode 100644 index 00000000..a191b1f6 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemlesser_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_destructive.json new file mode 100644 index 00000000..241d5b93 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemlesser_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_steadfast.json new file mode 100644 index 00000000..9ea458c2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemlesser_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_vengeful.json new file mode 100644 index 00000000..dbc3cc32 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgemlesser_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgemlesser_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty.json new file mode 100644 index 00000000..3085ac3b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgempetty" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_corrosive.json new file mode 100644 index 00000000..b5c185ea --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgempetty_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_destructive.json new file mode 100644 index 00000000..955e2c62 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgempetty_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_steadfast.json new file mode 100644 index 00000000..5031e33f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgempetty_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_vengeful.json new file mode 100644 index 00000000..e7ae0df4 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulgempetty_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulgempetty_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe.json new file mode 100644 index 00000000..fe117924 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulpickaxe" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_corrosive.json new file mode 100644 index 00000000..1e88cff5 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulpickaxe_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_destructive.json new file mode 100644 index 00000000..2aaac132 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulpickaxe_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_steadfast.json new file mode 100644 index 00000000..8f6ed094 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulpickaxe_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_vengeful.json new file mode 100644 index 00000000..bd938ace --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulpickaxe_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulpickaxe_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe.json new file mode 100644 index 00000000..c6ada5af --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulscythe" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_corrosive.json new file mode 100644 index 00000000..9da5186f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulscythe_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_destructive.json new file mode 100644 index 00000000..a9e5999b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulscythe_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_steadfast.json new file mode 100644 index 00000000..9a8e1765 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulscythe_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_vengeful.json new file mode 100644 index 00000000..e0a42699 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulscythe_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulscythe_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel.json new file mode 100644 index 00000000..ad3f0972 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulshovel" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_corrosive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_corrosive.json new file mode 100644 index 00000000..93b102a0 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_corrosive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulshovel_corrosive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_destructive.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_destructive.json new file mode 100644 index 00000000..34bbd132 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_destructive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulshovel_destructive" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_steadfast.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_steadfast.json new file mode 100644 index 00000000..3da6185d --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_steadfast.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulshovel_steadfast" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_vengeful.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_vengeful.json new file mode 100644 index 00000000..2a9bbdf2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulshovel_vengeful.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulshovel_vengeful" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_activated.json new file mode 100644 index 00000000..9ade5a1a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_corrosive_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_corrosive_activated.json new file mode 100644 index 00000000..55c0bb87 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_corrosive_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_corrosive_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_corrosive_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_corrosive_deactivated.json new file mode 100644 index 00000000..610f36ce --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_corrosive_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_corrosive_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_deactivated.json new file mode 100644 index 00000000..c87c8ee7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_destructive_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_destructive_activated.json new file mode 100644 index 00000000..e34becaa --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_destructive_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_destructive_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_destructive_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_destructive_deactivated.json new file mode 100644 index 00000000..78ddb49b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_destructive_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_destructive_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_steadfast_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_steadfast_activated.json new file mode 100644 index 00000000..40313e52 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_steadfast_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_steadfast_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_steadfast_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_steadfast_deactivated.json new file mode 100644 index 00000000..13aa70f1 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_steadfast_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_steadfast_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_vengeful_activated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_vengeful_activated.json new file mode 100644 index 00000000..1547ea7e --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_vengeful_activated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_vengeful_activated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_vengeful_deactivated.json b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_vengeful_deactivated.json new file mode 100644 index 00000000..64c72e95 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/variants/soulsword_vengeful_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/soulsword_vengeful_deactivated" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/veinmine_charge.json b/src/generated/resources/assets/bloodmagic/models/item/veinmine_charge.json new file mode 100644 index 00000000..d4e412ca --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/veinmine_charge.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/veinmine_charge" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/vengefulcrystal.json b/src/generated/resources/assets/bloodmagic/models/item/vengefulcrystal.json new file mode 100644 index 00000000..1256032a --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/vengefulcrystal.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/vengefulcrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/vengefuldemoncrystal.json b/src/generated/resources/assets/bloodmagic/models/item/vengefuldemoncrystal.json new file mode 100644 index 00000000..b116d448 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/vengefuldemoncrystal.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/crystal/vengefulcrystal1" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/voidsigil.json b/src/generated/resources/assets/bloodmagic/models/item/voidsigil.json new file mode 100644 index 00000000..41dac6e2 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/voidsigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/voidsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/waterritualstone.json b/src/generated/resources/assets/bloodmagic/models/item/waterritualstone.json new file mode 100644 index 00000000..4c02099f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/waterritualstone.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/waterritualstone" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/waterscribetool.json b/src/generated/resources/assets/bloodmagic/models/item/waterscribetool.json new file mode 100644 index 00000000..658f9c03 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/waterscribetool.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/waterscribetool" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/watersigil.json b/src/generated/resources/assets/bloodmagic/models/item/watersigil.json new file mode 100644 index 00000000..12a3f053 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/watersigil.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/watersigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/weakbloodorb.json b/src/generated/resources/assets/bloodmagic/models/item/weakbloodorb.json new file mode 100644 index 00000000..93800f41 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/weakbloodorb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/weakbloodorb" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/weakbloodshard.json b/src/generated/resources/assets/bloodmagic/models/item/weakbloodshard.json new file mode 100644 index 00000000..8cc8378f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/weakbloodshard.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/weakbloodshard" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/will_power_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/will_power_anointment.json new file mode 100644 index 00000000..057dedef --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/will_power_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial_will", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon_will" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/woodbrickpath.json b/src/generated/resources/assets/bloodmagic/models/item/woodbrickpath.json new file mode 100644 index 00000000..d598f8f7 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/woodbrickpath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/woodbrickpath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/woodtilepath.json b/src/generated/resources/assets/bloodmagic/models/item/woodtilepath.json new file mode 100644 index 00000000..fd20da53 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/woodtilepath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/woodtilepath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/wornstonebrickpath.json b/src/generated/resources/assets/bloodmagic/models/item/wornstonebrickpath.json new file mode 100644 index 00000000..78f2ee16 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/wornstonebrickpath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/wornstonebrickpath" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/wornstonetilepath.json b/src/generated/resources/assets/bloodmagic/models/item/wornstonetilepath.json new file mode 100644 index 00000000..7394723f --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/wornstonetilepath.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/wornstonetilepath" +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/alchemy_table.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/alchemy_table.json new file mode 100644 index 00000000..6f38ef77 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/alchemy_table.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:alchemy_table" + ] + }, + "criteria": { + "has_blank_slate": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:blankslate" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:alchemy_table" + } + } + }, + "requirements": [ + [ + "has_blank_slate", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/arc.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/arc.json new file mode 100644 index 00000000..8fdd602b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/arc.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:arc" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:arc" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_altar.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_altar.json new file mode 100644 index 00000000..7eff31d1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_altar.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_altar" + ] + }, + "criteria": { + "has_gold": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:gold_ingot" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_altar" + } + } + }, + "requirements": [ + [ + "has_gold", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_acceleration.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_acceleration.json new file mode 100644 index 00000000..e0555e28 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_acceleration.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_acceleration" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_acceleration" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_aug_capacity.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_aug_capacity.json new file mode 100644 index 00000000..4de0eed5 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_aug_capacity.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_aug_capacity" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_aug_capacity" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_blank.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_blank.json new file mode 100644 index 00000000..3de3b9d5 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_blank.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_blank" + ] + }, + "criteria": { + "has_weak_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:weakbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_blank" + } + } + }, + "requirements": [ + [ + "has_weak_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_capacity.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_capacity.json new file mode 100644 index 00000000..85b29fb4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_capacity.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_capacity" + ] + }, + "criteria": { + "has_imbued_slate": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:infusedslate" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_capacity" + } + } + }, + "requirements": [ + [ + "has_imbued_slate", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_charging.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_charging.json new file mode 100644 index 00000000..c2add425 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_charging.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_charging" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_charging" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_displacement.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_displacement.json new file mode 100644 index 00000000..6e77a0e8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_displacement.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_displacement" + ] + }, + "criteria": { + "has_imbued_slate": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:infusedslate" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_displacement" + } + } + }, + "requirements": [ + [ + "has_imbued_slate", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_orb.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_orb.json new file mode 100644 index 00000000..46aaf95c --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_orb.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_orb" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_orb" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_sacrifice.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_sacrifice.json new file mode 100644 index 00000000..2b7ee148 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_sacrifice.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_sacrifice" + ] + }, + "criteria": { + "has_apprentice_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:apprenticebloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_sacrifice" + } + } + }, + "requirements": [ + [ + "has_apprentice_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_self_sacrifice.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_self_sacrifice.json new file mode 100644 index 00000000..076daaee --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_self_sacrifice.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_self_sacrifice" + ] + }, + "criteria": { + "has_apprentice_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:apprenticebloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_self_sacrifice" + } + } + }, + "requirements": [ + [ + "has_apprentice_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_speed.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_speed.json new file mode 100644 index 00000000..7a866e04 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/blood_rune_speed.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:blood_rune_speed" + ] + }, + "criteria": { + "has_blank_rune": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:blankrune" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:blood_rune_speed" + } + } + }, + "requirements": [ + [ + "has_blank_rune", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/bloodstonebrick.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/bloodstonebrick.json new file mode 100644 index 00000000..37f650c6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/bloodstonebrick.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:bloodstonebrick" + ] + }, + "criteria": { + "has_weak_shard": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:weakbloodshard" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:bloodstonebrick" + } + } + }, + "requirements": [ + [ + "has_weak_shard", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/corrupted_dust.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/corrupted_dust.json new file mode 100644 index 00000000..885b1b2f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/corrupted_dust.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:corrupted_dust" + ] + }, + "criteria": { + "has_tiny": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:corrupted_tinydust" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:corrupted_dust" + } + } + }, + "requirements": [ + [ + "has_tiny", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/experience_tome.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/experience_tome.json new file mode 100644 index 00000000..16e94029 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/experience_tome.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:experience_tome" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:experience_tome" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/hellforged_block.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/hellforged_block.json new file mode 100644 index 00000000..cf79dc99 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/hellforged_block.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:hellforged_block" + ] + }, + "criteria": { + "has_hellforged": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:ingot_hellforged" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:hellforged_block" + } + } + }, + "requirements": [ + [ + "has_hellforged", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/incense_altar.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/incense_altar.json new file mode 100644 index 00000000..cc469b58 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/incense_altar.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:incense_altar" + ] + }, + "criteria": { + "has_weak_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:weakbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:incense_altar" + } + } + }, + "requirements": [ + [ + "has_weak_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/largebloodstonebrick.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/largebloodstonebrick.json new file mode 100644 index 00000000..cef9ce21 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/largebloodstonebrick.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:largebloodstonebrick" + ] + }, + "criteria": { + "has_weak_shard": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:weakbloodshard" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:largebloodstonebrick" + } + } + }, + "requirements": [ + [ + "has_weak_shard", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/lava_crystal.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/lava_crystal.json new file mode 100644 index 00000000..84bc8f36 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/lava_crystal.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:lava_crystal" + ] + }, + "criteria": { + "has_weak_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:weakbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:lava_crystal" + } + } + }, + "requirements": [ + [ + "has_weak_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stone.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stone.json new file mode 100644 index 00000000..c4388608 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stone.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:path/path_stone" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:path/path_stone" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stonetile.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stonetile.json new file mode 100644 index 00000000..e89a4e06 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_stonetile.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:path/path_stonetile" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:path/path_stonetile" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wood.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wood.json new file mode 100644 index 00000000..dd6dc1ec --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wood.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:path/path_wood" + ] + }, + "criteria": { + "has_apprentice_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:apprenticebloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:path/path_wood" + } + } + }, + "requirements": [ + [ + "has_apprentice_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_woodtile.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_woodtile.json new file mode 100644 index 00000000..1e7d7d71 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_woodtile.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:path/path_woodtile" + ] + }, + "criteria": { + "has_apprentice_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:apprenticebloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:path/path_woodtile" + } + } + }, + "requirements": [ + [ + "has_apprentice_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstone.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstone.json new file mode 100644 index 00000000..cde914c3 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstone.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:path/path_wornstone" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:path/path_wornstone" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstonetile.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstonetile.json new file mode 100644 index 00000000..658edfb7 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/path/path_wornstonetile.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:path/path_wornstonetile" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:path/path_wornstonetile" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/primitive_furnace_cell.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/primitive_furnace_cell.json new file mode 100644 index 00000000..801f59f1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/primitive_furnace_cell.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:primitive_furnace_cell" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:primitive_furnace_cell" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/primitive_hydration_cell.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/primitive_hydration_cell.json new file mode 100644 index 00000000..69a0f6b6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/primitive_hydration_cell.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:primitive_hydration_cell" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:primitive_hydration_cell" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_0.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_0.json new file mode 100644 index 00000000..ac4dd373 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_0.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:ritual_diviner_0" + ] + }, + "criteria": { + "has_scribe": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:airscribetool" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:ritual_diviner_0" + } + } + }, + "requirements": [ + [ + "has_scribe", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_1.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_1.json new file mode 100644 index 00000000..b671e3bd --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_diviner_1.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:ritual_diviner_1" + ] + }, + "criteria": { + "has_demon_slate": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:demonslate" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:ritual_diviner_1" + } + } + }, + "requirements": [ + [ + "has_demon_slate", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_reader.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_reader.json new file mode 100644 index 00000000..f6f08c7a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_reader.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:ritual_reader" + ] + }, + "criteria": { + "has_master_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:masterbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:ritual_reader" + } + } + }, + "requirements": [ + [ + "has_master_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_blank.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_blank.json new file mode 100644 index 00000000..ef6c9fdb --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_blank.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:ritual_stone_blank" + ] + }, + "criteria": { + "has_apprentice_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:apprenticebloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:ritual_stone_blank" + } + } + }, + "requirements": [ + [ + "has_apprentice_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_master.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_master.json new file mode 100644 index 00000000..878c9ebb --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/ritual_stone_master.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:ritual_stone_master" + ] + }, + "criteria": { + "has_magician_orb": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:magicianbloodorb" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:ritual_stone_master" + } + } + }, + "requirements": [ + [ + "has_magician_orb", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/sacrificial_dagger.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/sacrificial_dagger.json new file mode 100644 index 00000000..744c16e1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/sacrificial_dagger.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:sacrificial_dagger" + ] + }, + "criteria": { + "has_glass": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:glass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:sacrificial_dagger" + } + } + }, + "requirements": [ + [ + "has_glass", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/smelting/ingot_hellforged.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/smelting/ingot_hellforged.json new file mode 100644 index 00000000..bd8021ec --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/smelting/ingot_hellforged.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:smelting/ingot_hellforged" + ] + }, + "criteria": { + "has_hellforged_dust": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:sand_hellforged" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:smelting/ingot_hellforged" + } + } + }, + "requirements": [ + [ + "has_hellforged_dust", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/soul_forge.json b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/soul_forge.json new file mode 100644 index 00000000..262a22ec --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/bloodmagictab/soul_forge.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:soul_forge" + ] + }, + "criteria": { + "has_blank_slate": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:blankslate" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:soul_forge" + } + } + }, + "requirements": [ + [ + "has_blank_slate", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_gold.json b/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_gold.json new file mode 100644 index 00000000..aceef4c7 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_gold.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:smelting/ingot_gold" + ] + }, + "criteria": { + "has_gold_sand": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:goldsand" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:smelting/ingot_gold" + } + } + }, + "requirements": [ + [ + "has_gold_sand", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_iron.json b/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_iron.json new file mode 100644 index 00000000..444757df --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_iron.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:smelting/ingot_iron" + ] + }, + "criteria": { + "has_iron_sand": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:ironsand" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:smelting/ingot_iron" + } + } + }, + "requirements": [ + [ + "has_iron_sand", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_netherite_scrap.json b/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_netherite_scrap.json new file mode 100644 index 00000000..5265d945 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/advancements/recipes/misc/smelting/ingot_netherite_scrap.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "bloodmagic:smelting/ingot_netherite_scrap" + ] + }, + "criteria": { + "has_netherite_dust": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "bloodmagic:sand_netherite" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "bloodmagic:smelting/ingot_netherite_scrap" + } + } + }, + "requirements": [ + [ + "has_netherite_dust", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/accelerationrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/accelerationrune.json new file mode 100644 index 00000000..bff0c94d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/accelerationrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:accelerationrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/airritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/airritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/airritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemicalreactionchamber.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemicalreactionchamber.json new file mode 100644 index 00000000..e3d6ee73 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemicalreactionchamber.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:alchemicalreactionchamber" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemyarray.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemyarray.json new file mode 100644 index 00000000..f27b7f82 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemyarray.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "bloodmagic:alchemyarray", + "rolls": 1.0, + "entries": [] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemytable.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemytable.json new file mode 100644 index 00000000..35297d28 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/alchemytable.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:alchemytable" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/altar.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/altar.json new file mode 100644 index 00000000..49c1cf36 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/altar.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:altar" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/altarcapacityrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/altarcapacityrune.json new file mode 100644 index 00000000..a71126ce --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/altarcapacityrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:altarcapacityrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/bettercapacityrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/bettercapacityrune.json new file mode 100644 index 00000000..eb0cce26 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/bettercapacityrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:bettercapacityrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/blankrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/blankrune.json new file mode 100644 index 00000000..80a59b7a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/blankrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:blankrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/bloodlight.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/bloodlight.json new file mode 100644 index 00000000..20e1ab88 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/bloodlight.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "bloodmagic:bloodlight", + "rolls": 1.0, + "entries": [] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/bloodstonebrick.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/bloodstonebrick.json new file mode 100644 index 00000000..3f2c2b35 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/bloodstonebrick.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:bloodstonebrick" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/chargingrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/chargingrune.json new file mode 100644 index 00000000..66c32d3f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/chargingrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:chargingrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/corrosivedemoncrystal.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/corrosivedemoncrystal.json new file mode 100644 index 00000000..d2cad931 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/corrosivedemoncrystal.json @@ -0,0 +1,173 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "0" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "1" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 2 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "2" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "3" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 4 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "4" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 5 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "5" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 6 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:corrosivedemoncrystal", + "properties": { + "age": "6" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 7 + } + ], + "name": "bloodmagic:corrosivecrystal" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/creeping_doubt.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/creeping_doubt.json new file mode 100644 index 00000000..2c5b9549 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/creeping_doubt.json @@ -0,0 +1,173 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "0" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "1" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "2" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "3" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "4" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "5" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:creeping_doubt", + "properties": { + "age": "6" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:weakbloodshard" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/deforester_charge.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/deforester_charge.json new file mode 100644 index 00000000..78e28375 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/deforester_charge.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "bloodmagic:deforester_charge", + "rolls": 1.0, + "entries": [] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/demoncrucible.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/demoncrucible.json new file mode 100644 index 00000000..3e3a8d39 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/demoncrucible.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:demoncrucible" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/demoncrystallizer.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/demoncrystallizer.json new file mode 100644 index 00000000..55cce224 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/demoncrystallizer.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:demoncrystallizer" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/destructivedemoncrystal.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/destructivedemoncrystal.json new file mode 100644 index 00000000..a42c22e1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/destructivedemoncrystal.json @@ -0,0 +1,173 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "0" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "1" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 2 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "2" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "3" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 4 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "4" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 5 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "5" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 6 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:destructivedemoncrystal", + "properties": { + "age": "6" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 7 + } + ], + "name": "bloodmagic:destructivecrystal" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dislocationrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dislocationrune.json new file mode 100644 index 00000000..d158c403 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dislocationrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dislocationrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick1.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick1.json new file mode 100644 index 00000000..5bf91c81 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick1.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick1" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick2.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick2.json new file mode 100644 index 00000000..491a46ec --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick2.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick2" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick3.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick3.json new file mode 100644 index 00000000..ef502cb0 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick3.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick3" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_assorted.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_assorted.json new file mode 100644 index 00000000..01211879 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_assorted.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick_assorted" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_gate.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_gate.json new file mode 100644 index 00000000..bd9af9b7 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_gate.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick_gate" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_stairs.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_stairs.json new file mode 100644 index 00000000..8df43bad --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_stairs.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick_stairs" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_wall.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_wall.json new file mode 100644 index 00000000..f047c0cd --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_brick_wall.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_brick_wall" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_eye.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_eye.json new file mode 100644 index 00000000..d7a703f1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_eye.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_eye" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_metal.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_metal.json new file mode 100644 index 00000000..6b57213b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_metal.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_metal" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json new file mode 100644 index 00000000..666396e2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_ore" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_cap.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_cap.json new file mode 100644 index 00000000..29906c2d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_cap.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_pillar_cap" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_center.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_center.json new file mode 100644 index 00000000..5aa43bb8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_center.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_pillar_center" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_special.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_special.json new file mode 100644 index 00000000..bde90c58 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_pillar_special.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_pillar_special" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished.json new file mode 100644 index 00000000..fa0436f5 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_polished" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_gate.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_gate.json new file mode 100644 index 00000000..46d3c924 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_gate.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_polished_gate" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_stairs.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_stairs.json new file mode 100644 index 00000000..fc7d93be --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_stairs.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_polished_stairs" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_wall.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_wall.json new file mode 100644 index 00000000..e3c69dbb --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_polished_wall.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_polished_wall" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_smallbrick.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_smallbrick.json new file mode 100644 index 00000000..872ac5de --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_smallbrick.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_smallbrick" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_stone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_stone.json new file mode 100644 index 00000000..7fc9228d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_stone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_stone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_tile.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_tile.json new file mode 100644 index 00000000..b8211e0f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_tile.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_tile" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_tilespecial.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_tilespecial.json new file mode 100644 index 00000000..3f90bc80 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_tilespecial.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_tilespecial" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/duskritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/duskritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/duskritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/earthritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/earthritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/earthritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/ethereal_mimic.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/ethereal_mimic.json new file mode 100644 index 00000000..abe50fb6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/ethereal_mimic.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ethereal_mimic" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/fireritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/fireritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/fireritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/fungal_charge.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/fungal_charge.json new file mode 100644 index 00000000..0344f5a2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/fungal_charge.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "bloodmagic:fungal_charge", + "rolls": 1.0, + "entries": [] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/incensealtar.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/incensealtar.json new file mode 100644 index 00000000..b588d41d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/incensealtar.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:incensealtar" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/largebloodstonebrick.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/largebloodstonebrick.json new file mode 100644 index 00000000..ee4181fc --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/largebloodstonebrick.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:largebloodstonebrick" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/lightritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/lightritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/lightritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/masterritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/masterritualstone.json new file mode 100644 index 00000000..8b9eb94d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/masterritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:masterritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/mimic.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/mimic.json new file mode 100644 index 00000000..5e904859 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/mimic.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:mimic" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/nether_soil.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/nether_soil.json new file mode 100644 index 00000000..5cf5a8ce --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/nether_soil.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:netherrack" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/obsidianbrickpath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/obsidianbrickpath.json new file mode 100644 index 00000000..6eb3eea4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/obsidianbrickpath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:obsidianbrickpath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/obsidiantilepath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/obsidiantilepath.json new file mode 100644 index 00000000..ee7bbbf2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/obsidiantilepath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:obsidiantilepath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/orbcapacityrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/orbcapacityrune.json new file mode 100644 index 00000000..239dcb53 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/orbcapacityrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:orbcapacityrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/rawdemoncrystal.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/rawdemoncrystal.json new file mode 100644 index 00000000..6774eb52 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/rawdemoncrystal.json @@ -0,0 +1,173 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "0" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "1" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 2 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "2" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "3" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 4 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "4" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 5 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "5" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 6 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:rawdemoncrystal", + "properties": { + "age": "6" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 7 + } + ], + "name": "bloodmagic:defaultcrystal" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/ritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/ritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/ritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/sacrificerune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/sacrificerune.json new file mode 100644 index 00000000..30afc854 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/sacrificerune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:sacrificerune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/selfsacrificerune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/selfsacrificerune.json new file mode 100644 index 00000000..edbac39e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/selfsacrificerune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:selfsacrificerune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/shaped_charge.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/shaped_charge.json new file mode 100644 index 00000000..c34bb043 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/shaped_charge.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "bloodmagic:shaped_charge", + "rolls": 1.0, + "entries": [] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/soulforge.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/soulforge.json new file mode 100644 index 00000000..32b39be4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/soulforge.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:soulforge" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/speedrune.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/speedrune.json new file mode 100644 index 00000000..37341278 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/speedrune.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:speedrune" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/steadfastdemoncrystal.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/steadfastdemoncrystal.json new file mode 100644 index 00000000..dea3fee2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/steadfastdemoncrystal.json @@ -0,0 +1,173 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "0" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "1" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 2 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "2" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "3" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 4 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "4" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 5 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "5" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 6 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:steadfastdemoncrystal", + "properties": { + "age": "6" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 7 + } + ], + "name": "bloodmagic:steadfastcrystal" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/stonebrickpath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/stonebrickpath.json new file mode 100644 index 00000000..3a9b4289 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/stonebrickpath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:stonebrickpath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/stonetilepath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/stonetilepath.json new file mode 100644 index 00000000..7796876b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/stonetilepath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:stonetilepath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/veinmine_charge.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/veinmine_charge.json new file mode 100644 index 00000000..e7f06266 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/veinmine_charge.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "bloodmagic:veinmine_charge", + "rolls": 1.0, + "entries": [] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/vengefuldemoncrystal.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/vengefuldemoncrystal.json new file mode 100644 index 00000000..c0801fe5 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/vengefuldemoncrystal.json @@ -0,0 +1,173 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "0" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "1" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 2 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "2" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "3" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 4 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "4" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 5 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "5" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 6 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "bloodmagic:vengefuldemoncrystal", + "properties": { + "age": "6" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 7 + } + ], + "name": "bloodmagic:vengefulcrystal" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/waterritualstone.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/waterritualstone.json new file mode 100644 index 00000000..e8935390 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/waterritualstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:ritualstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/woodbrickpath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/woodbrickpath.json new file mode 100644 index 00000000..d4116d40 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/woodbrickpath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:woodbrickpath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/woodtilepath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/woodtilepath.json new file mode 100644 index 00000000..fd8a04c6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/woodtilepath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:woodtilepath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/wornstonebrickpath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/wornstonebrickpath.json new file mode 100644 index 00000000..d66e2617 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/wornstonebrickpath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:wornstonebrickpath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/wornstonetilepath.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/wornstonetilepath.json new file mode 100644 index 00000000..4de9ffb8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/wornstonetilepath.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:wornstonetilepath" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/test.json b/src/generated/resources/data/bloodmagic/loot_tables/test.json new file mode 100644 index 00000000..86acee43 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/test.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "name": "test", + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "weight": 10, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": 30, + "treasure": true + } + ], + "name": "minecraft:book" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemy_table.json b/src/generated/resources/data/bloodmagic/recipes/alchemy_table.json new file mode 100644 index 00000000..6c9bc44a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemy_table.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "wbw", + "gog" + ], + "key": { + "b": { + "tag": "forge:ingots/iron" + }, + "s": { + "tag": "forge:stone" + }, + "w": { + "tag": "minecraft:planks" + }, + "g": { + "tag": "forge:ingots/gold" + }, + "o": { + "item": "bloodmagic:blankslate" + } + }, + "result": { + "item": "bloodmagic:alchemytable" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/arcane_ash.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/arcane_ash.json new file mode 100644 index 00000000..24f98096 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/arcane_ash.json @@ -0,0 +1,24 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:dusts/redstone" + }, + { + "tag": "forge:dyes/white" + }, + { + "tag": "forge:gunpowder" + }, + { + "tag": "minecraft:coals" + } + ], + "output": { + "item": "bloodmagic:arcaneashes", + "nbt": "{Damage:0}" + }, + "syphon": 500, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/basic_cutting_fluid.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/basic_cutting_fluid.json new file mode 100644 index 00000000..bf555741 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/basic_cutting_fluid.json @@ -0,0 +1,30 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:plantoil" + }, + { + "tag": "forge:dusts/redstone" + }, + { + "tag": "forge:gunpowder" + }, + { + "item": "minecraft:sugar" + }, + { + "tag": "forge:dusts/coal" + }, + { + "item": "minecraft:potion" + } + ], + "output": { + "item": "bloodmagic:basiccuttingfluid", + "nbt": "{Damage:0}" + }, + "syphon": 1000, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/bow_power_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/bow_power_anointment.json new file mode 100644 index 00000000..e8eac2dc --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/bow_power_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "tag": "forge:ingots/iron" + }, + { + "item": "minecraft:bow" + } + ], + "output": { + "item": "bloodmagic:bow_power_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/bread.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/bread.json new file mode 100644 index 00000000..5e30f8ec --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/bread.json @@ -0,0 +1,17 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:crops/wheat" + }, + { + "item": "minecraft:sugar" + } + ], + "output": { + "item": "minecraft:bread" + }, + "syphon": 100, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/clay_from_sand.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/clay_from_sand.json new file mode 100644 index 00000000..8cd302ff --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/clay_from_sand.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:sand" + }, + { + "tag": "forge:sand" + }, + { + "item": "minecraft:water_bucket" + } + ], + "output": { + "item": "minecraft:clay_ball", + "count": 2 + }, + "syphon": 50, + "ticks": 100, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/cobweb.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/cobweb.json new file mode 100644 index 00000000..847b555a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/cobweb.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:string" + }, + { + "tag": "forge:string" + }, + { + "tag": "forge:string" + } + ], + "output": { + "item": "minecraft:cobweb" + }, + "syphon": 50, + "ticks": 50, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/explosive_powder.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/explosive_powder.json new file mode 100644 index 00000000..87b3103b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/explosive_powder.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:gunpowder" + }, + { + "tag": "forge:gunpowder" + }, + { + "tag": "forge:dusts/coal" + } + ], + "output": { + "item": "bloodmagic:explosivepowder", + "nbt": "{Damage:0}" + }, + "syphon": 500, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/flint_from_gravel.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/flint_from_gravel.json new file mode 100644 index 00000000..ffe0ce43 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/flint_from_gravel.json @@ -0,0 +1,18 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:gravel" + }, + { + "item": "minecraft:flint" + } + ], + "output": { + "item": "minecraft:flint", + "count": 2 + }, + "syphon": 50, + "ticks": 20, + "upgradeLevel": 0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/fortune_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/fortune_anointment.json new file mode 100644 index 00000000..2f66bc4e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/fortune_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "tag": "forge:dusts/redstone" + }, + { + "tag": "forge:dusts/coal" + } + ], + "output": { + "item": "bloodmagic:fortune_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json new file mode 100644 index 00000000..bf34285f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:gilded_blackstone" + } + ], + "output": { + "item": "minecraft:gold_nugget", + "count": 9 + }, + "syphon": 200, + "ticks": 100, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/grass_block.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/grass_block.json new file mode 100644 index 00000000..03e6aee6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/grass_block.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:dirt" + }, + { + "item": "minecraft:bone_meal" + }, + { + "item": "minecraft:wheat_seeds" + } + ], + "output": { + "item": "minecraft:grass_block" + }, + "syphon": 200, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/gunpowder.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/gunpowder.json new file mode 100644 index 00000000..aec2762a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/gunpowder.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:dusts/sulfur" + }, + { + "tag": "forge:dusts/saltpeter" + }, + { + "tag": "minecraft:coals" + } + ], + "output": { + "item": "minecraft:gunpowder", + "count": 3 + }, + "syphon": 0, + "ticks": 100, + "upgradeLevel": 0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json new file mode 100644 index 00000000..228e57a5 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "item": "minecraft:glass_bottle" + }, + { + "item": "minecraft:enchanted_book" + } + ], + "output": { + "item": "bloodmagic:hidden_knowledge_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/holy_water_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/holy_water_anointment.json new file mode 100644 index 00000000..126bd5aa --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/holy_water_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "item": "minecraft:glistering_melon_slice" + }, + { + "tag": "forge:gems/quartz" + } + ], + "output": { + "item": "bloodmagic:holy_water_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/leather_from_flesh.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/leather_from_flesh.json new file mode 100644 index 00000000..6fd3738b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/leather_from_flesh.json @@ -0,0 +1,30 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:rotten_flesh" + }, + { + "item": "minecraft:rotten_flesh" + }, + { + "item": "minecraft:rotten_flesh" + }, + { + "item": "minecraft:rotten_flesh" + }, + { + "item": "minecraft:flint" + }, + { + "item": "minecraft:water_bucket" + } + ], + "output": { + "item": "minecraft:leather", + "count": 4 + }, + "syphon": 100, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/looting_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/looting_anointment.json new file mode 100644 index 00000000..cdec19e3 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/looting_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "tag": "forge:gems/lapis" + }, + { + "tag": "forge:bones" + } + ], + "output": { + "item": "bloodmagic:looting_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/melee_damage_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/melee_damage_anointment.json new file mode 100644 index 00000000..496abd4b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/melee_damage_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "tag": "forge:gems/quartz" + } + ], + "output": { + "item": "bloodmagic:melee_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/nether_wart_from_block.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/nether_wart_from_block.json new file mode 100644 index 00000000..10442cb7 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/nether_wart_from_block.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:nether_wart_block" + } + ], + "output": { + "item": "minecraft:nether_wart" + }, + "syphon": 50, + "ticks": 40, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_beets.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_beets.json new file mode 100644 index 00000000..718a1062 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_beets.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:crops/beetroot" + }, + { + "tag": "forge:crops/beetroot" + }, + { + "tag": "forge:crops/beetroot" + }, + { + "item": "minecraft:bone_meal" + } + ], + "output": { + "item": "bloodmagic:plantoil" + }, + "syphon": 100, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_carrots.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_carrots.json new file mode 100644 index 00000000..51ca6f26 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_carrots.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:crops/carrot" + }, + { + "tag": "forge:crops/carrot" + }, + { + "tag": "forge:crops/carrot" + }, + { + "item": "minecraft:bone_meal" + } + ], + "output": { + "item": "bloodmagic:plantoil" + }, + "syphon": 100, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_taters.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_taters.json new file mode 100644 index 00000000..8c0f281b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_taters.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:crops/potato" + }, + { + "tag": "forge:crops/potato" + }, + { + "item": "minecraft:bone_meal" + } + ], + "output": { + "item": "bloodmagic:plantoil" + }, + "syphon": 100, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_wheat.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_wheat.json new file mode 100644 index 00000000..af4e9e80 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/plantoil_from_wheat.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:crops/wheat" + }, + { + "tag": "forge:crops/wheat" + }, + { + "item": "minecraft:bone_meal" + } + ], + "output": { + "item": "bloodmagic:plantoil" + }, + "syphon": 100, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json new file mode 100644 index 00000000..629a12f4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "tag": "forge:string" + }, + { + "item": "minecraft:spectral_arrow" + } + ], + "output": { + "item": "bloodmagic:quick_draw_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_air.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_air.json new file mode 100644 index 00000000..3ac1e251 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_air.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:ghast_tear" + }, + { + "tag": "forge:feathers" + }, + { + "tag": "forge:feathers" + } + ], + "output": { + "item": "bloodmagic:reagentair" + }, + "syphon": 2000, + "ticks": 200, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_binding.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_binding.json new file mode 100644 index 00000000..fb49418e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_binding.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:dusts/glowstone" + }, + { + "tag": "forge:dusts/redstone" + }, + { + "tag": "forge:gunpowder" + }, + { + "tag": "forge:nuggets/gold" + } + ], + "output": { + "item": "bloodmagic:reagentbinding" + }, + "syphon": 1000, + "ticks": 200, + "upgradeLevel": 3 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_blood_light.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_blood_light.json new file mode 100644 index 00000000..c9f119f9 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_blood_light.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:dusts/glowstone" + }, + { + "item": "minecraft:torch" + }, + { + "tag": "forge:dusts/redstone" + }, + { + "tag": "forge:dusts/redstone" + } + ], + "output": { + "item": "bloodmagic:reagentbloodlight" + }, + "syphon": 1000, + "ticks": 200, + "upgradeLevel": 3 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_fastminer.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_fastminer.json new file mode 100644 index 00000000..7e90329b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_fastminer.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:iron_pickaxe" + }, + { + "item": "minecraft:iron_axe" + }, + { + "item": "minecraft:iron_shovel" + }, + { + "tag": "forge:gunpowder" + } + ], + "output": { + "item": "bloodmagic:reagentfastminer" + }, + "syphon": 2000, + "ticks": 200, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_growth.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_growth.json new file mode 100644 index 00000000..8707950f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_growth.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "minecraft:saplings" + }, + { + "tag": "minecraft:saplings" + }, + { + "item": "minecraft:sugar_cane" + }, + { + "item": "minecraft:sugar" + } + ], + "output": { + "item": "bloodmagic:reagentgrowth" + }, + "syphon": 2000, + "ticks": 200, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_holding.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_holding.json new file mode 100644 index 00000000..d293e725 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_holding.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:chests" + }, + { + "tag": "forge:leather" + }, + { + "tag": "forge:string" + }, + { + "tag": "forge:string" + } + ], + "output": { + "item": "bloodmagic:reagentholding" + }, + "syphon": 2000, + "ticks": 200, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_lava.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_lava.json new file mode 100644 index 00000000..6618996f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_lava.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:lava_bucket" + }, + { + "tag": "forge:dusts/redstone" + }, + { + "tag": "forge:cobblestone" + }, + { + "tag": "forge:storage_blocks/coal" + } + ], + "output": { + "item": "bloodmagic:reagentlava" + }, + "syphon": 1000, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_magnetism.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_magnetism.json new file mode 100644 index 00000000..4fb4d117 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_magnetism.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:string" + }, + { + "tag": "forge:ingots/gold" + }, + { + "tag": "forge:ingots/gold" + }, + { + "tag": "forge:storage_blocks/iron" + } + ], + "output": { + "item": "bloodmagic:reagentmagnetism" + }, + "syphon": 1000, + "ticks": 200, + "upgradeLevel": 3 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_sight.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_sight.json new file mode 100644 index 00000000..fb57653d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_sight.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:dusts/glowstone" + }, + { + "tag": "forge:glass" + }, + { + "tag": "forge:glass" + }, + { + "item": "bloodmagic:divinationsigil" + } + ], + "output": { + "item": "bloodmagic:reagentsight" + }, + "syphon": 500, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_void.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_void.json new file mode 100644 index 00000000..d549746e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_void.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:bucket" + }, + { + "tag": "forge:string" + }, + { + "tag": "forge:string" + }, + { + "tag": "forge:gunpowder" + } + ], + "output": { + "item": "bloodmagic:reagentvoid" + }, + "syphon": 1000, + "ticks": 200, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_water.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_water.json new file mode 100644 index 00000000..93a5b884 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/reagent_water.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:sugar" + }, + { + "item": "minecraft:water_bucket" + }, + { + "item": "minecraft:water_bucket" + } + ], + "output": { + "item": "bloodmagic:reagentwater" + }, + "syphon": 300, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_coal.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_coal.json new file mode 100644 index 00000000..a3fb3e74 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_coal.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:coal" + }, + { + "item": "minecraft:coal" + }, + { + "item": "minecraft:flint" + } + ], + "output": { + "item": "bloodmagic:coalsand", + "count": 4 + }, + "syphon": 400, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_gold.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_gold.json new file mode 100644 index 00000000..618980ef --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_gold.json @@ -0,0 +1,18 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:ores/gold" + }, + { + "tag": "bloodmagic:arc/cuttingfluid" + } + ], + "output": { + "item": "bloodmagic:goldsand", + "count": 2 + }, + "syphon": 400, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_iron.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_iron.json new file mode 100644 index 00000000..29fd3e67 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/sand_iron.json @@ -0,0 +1,18 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "forge:ores/iron" + }, + { + "tag": "bloodmagic:arc/cuttingfluid" + } + ], + "output": { + "item": "bloodmagic:ironsand", + "count": 2 + }, + "syphon": 400, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/silk_touch_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/silk_touch_anointment.json new file mode 100644 index 00000000..764753f6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/silk_touch_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "item": "minecraft:cobweb" + }, + { + "tag": "forge:nuggets/gold" + } + ], + "output": { + "item": "bloodmagic:silk_touch_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/slate_vial.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/slate_vial.json new file mode 100644 index 00000000..2a613dbe --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/slate_vial.json @@ -0,0 +1,30 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:blankslate" + }, + { + "tag": "forge:glass" + }, + { + "tag": "forge:glass" + }, + { + "tag": "forge:glass" + }, + { + "tag": "forge:glass" + }, + { + "tag": "forge:glass" + } + ], + "output": { + "item": "bloodmagic:slate_vial", + "count": 8 + }, + "syphon": 500, + "ticks": 200, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/smelting_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/smelting_anointment.json new file mode 100644 index 00000000..a23514d9 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/smelting_anointment.json @@ -0,0 +1,28 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "item": "minecraft:furnace" + }, + [ + { + "item": "minecraft:charcoal" + }, + { + "item": "minecraft:coal" + } + ] + ], + "output": { + "item": "bloodmagic:smelting_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/string.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/string.json new file mode 100644 index 00000000..0455b315 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/string.json @@ -0,0 +1,18 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "tag": "minecraft:wool" + }, + { + "item": "minecraft:flint" + } + ], + "output": { + "item": "minecraft:string", + "count": 4 + }, + "syphon": 100, + "ticks": 100, + "upgradeLevel": 0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/air_tool.json b/src/generated/resources/data/bloodmagic/recipes/altar/air_tool.json new file mode 100644 index 00000000..a34cb046 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/air_tool.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "minecraft:ghast_tear" + }, + "output": { + "item": "bloodmagic:airscribetool", + "nbt": "{Damage:0}" + }, + "upgradeLevel": 2, + "altarSyphon": 1000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/apprenticebloodorb.json b/src/generated/resources/data/bloodmagic/recipes/altar/apprenticebloodorb.json new file mode 100644 index 00000000..3637afb8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/apprenticebloodorb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:storage_blocks/redstone" + }, + "output": { + "item": "bloodmagic:apprenticebloodorb" + }, + "upgradeLevel": 1, + "altarSyphon": 5000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/bucket_life.json b/src/generated/resources/data/bloodmagic/recipes/altar/bucket_life.json new file mode 100644 index 00000000..6902924e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/bucket_life.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "minecraft:bucket" + }, + "output": { + "item": "bloodmagic:life_essence_bucket" + }, + "upgradeLevel": 0, + "altarSyphon": 1000, + "consumptionRate": 5, + "drainRate": 0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/daggerofsacrifice.json b/src/generated/resources/data/bloodmagic/recipes/altar/daggerofsacrifice.json new file mode 100644 index 00000000..f1d7fc16 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/daggerofsacrifice.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "minecraft:iron_sword" + }, + "output": { + "item": "bloodmagic:daggerofsacrifice" + }, + "upgradeLevel": 1, + "altarSyphon": 3000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/demonicslate.json b/src/generated/resources/data/bloodmagic/recipes/altar/demonicslate.json new file mode 100644 index 00000000..60a29822 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/demonicslate.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "bloodmagic:infusedslate" + }, + "output": { + "item": "bloodmagic:demonslate" + }, + "upgradeLevel": 3, + "altarSyphon": 15000, + "consumptionRate": 20, + "drainRate": 20 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/dusk_tool.json b/src/generated/resources/data/bloodmagic/recipes/altar/dusk_tool.json new file mode 100644 index 00000000..a8a08519 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/dusk_tool.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:storage_blocks/coal" + }, + "output": { + "item": "bloodmagic:duskscribetool", + "nbt": "{Damage:0}" + }, + "upgradeLevel": 3, + "altarSyphon": 2000, + "consumptionRate": 20, + "drainRate": 10 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/earth_tool.json b/src/generated/resources/data/bloodmagic/recipes/altar/earth_tool.json new file mode 100644 index 00000000..72ddfcc8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/earth_tool.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:obsidian" + }, + "output": { + "item": "bloodmagic:earthscribetool", + "nbt": "{Damage:0}" + }, + "upgradeLevel": 2, + "altarSyphon": 1000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/fire_tool.json b/src/generated/resources/data/bloodmagic/recipes/altar/fire_tool.json new file mode 100644 index 00000000..859c6e17 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/fire_tool.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "minecraft:magma_cream" + }, + "output": { + "item": "bloodmagic:firescribetool", + "nbt": "{Damage:0}" + }, + "upgradeLevel": 2, + "altarSyphon": 1000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/imbuedslate.json b/src/generated/resources/data/bloodmagic/recipes/altar/imbuedslate.json new file mode 100644 index 00000000..b1a577b1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/imbuedslate.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "bloodmagic:reinforcedslate" + }, + "output": { + "item": "bloodmagic:infusedslate" + }, + "upgradeLevel": 2, + "altarSyphon": 5000, + "consumptionRate": 15, + "drainRate": 10 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/magicianbloodorb.json b/src/generated/resources/data/bloodmagic/recipes/altar/magicianbloodorb.json new file mode 100644 index 00000000..941c312f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/magicianbloodorb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:storage_blocks/gold" + }, + "output": { + "item": "bloodmagic:magicianbloodorb" + }, + "upgradeLevel": 2, + "altarSyphon": 25000, + "consumptionRate": 20, + "drainRate": 20 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/masterbloodorb.json b/src/generated/resources/data/bloodmagic/recipes/altar/masterbloodorb.json new file mode 100644 index 00000000..f40e0229 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/masterbloodorb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "bloodmagic:weakbloodshard" + }, + "output": { + "item": "bloodmagic:masterbloodorb" + }, + "upgradeLevel": 3, + "altarSyphon": 40000, + "consumptionRate": 30, + "drainRate": 50 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/reinforcedslate.json b/src/generated/resources/data/bloodmagic/recipes/altar/reinforcedslate.json new file mode 100644 index 00000000..52a37c81 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/reinforcedslate.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "bloodmagic:blankslate" + }, + "output": { + "item": "bloodmagic:reinforcedslate" + }, + "upgradeLevel": 1, + "altarSyphon": 2000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/slate.json b/src/generated/resources/data/bloodmagic/recipes/altar/slate.json new file mode 100644 index 00000000..3be29e67 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/slate.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:stone" + }, + "output": { + "item": "bloodmagic:blankslate" + }, + "upgradeLevel": 0, + "altarSyphon": 1000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/soul_snare.json b/src/generated/resources/data/bloodmagic/recipes/altar/soul_snare.json new file mode 100644 index 00000000..ffa64e8f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/soul_snare.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:string" + }, + "output": { + "item": "bloodmagic:soulsnare" + }, + "upgradeLevel": 0, + "altarSyphon": 500, + "consumptionRate": 5, + "drainRate": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/water_tool.json b/src/generated/resources/data/bloodmagic/recipes/altar/water_tool.json new file mode 100644 index 00000000..95508bc1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/water_tool.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:storage_blocks/lapis" + }, + "output": { + "item": "bloodmagic:waterscribetool", + "nbt": "{Damage:0}" + }, + "upgradeLevel": 2, + "altarSyphon": 1000, + "consumptionRate": 5, + "drainRate": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/altar/weakbloodorb.json b/src/generated/resources/data/bloodmagic/recipes/altar/weakbloodorb.json new file mode 100644 index 00000000..16769109 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/altar/weakbloodorb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "tag": "forge:gems/diamond" + }, + "output": { + "item": "bloodmagic:weakbloodorb" + }, + "upgradeLevel": 0, + "altarSyphon": 2000, + "consumptionRate": 5, + "drainRate": 1 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc.json b/src/generated/resources/data/bloodmagic/recipes/arc.json new file mode 100644 index 00000000..2b02de09 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "SoS", + "IfI" + ], + "key": { + "s": { + "tag": "forge:stone" + }, + "f": { + "item": "minecraft:furnace" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 3 + }, + "I": { + "tag": "forge:storage_blocks/iron" + }, + "S": { + "item": "bloodmagic:infusedslate" + } + }, + "result": { + "item": "bloodmagic:alchemicalreactionchamber" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/clay_from_sand.json b/src/generated/resources/data/bloodmagic/recipes/arc/clay_from_sand.json new file mode 100644 index 00000000..4843ce04 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/clay_from_sand.json @@ -0,0 +1,25 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:sand" + }, + "tool": { + "tag": "bloodmagic:arc/hydrate" + }, + "inputfluid": { + "amount": 200, + "fluid": "minecraft:water" + }, + "addedoutput": [ + { + "chance": 0.5, + "type": { + "item": "minecraft:clay_ball" + } + } + ], + "output": { + "item": "minecraft:clay_ball" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/clay_from_terracotta.json b/src/generated/resources/data/bloodmagic/recipes/arc/clay_from_terracotta.json new file mode 100644 index 00000000..da406447 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/clay_from_terracotta.json @@ -0,0 +1,17 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "minecraft:terracotta" + }, + "tool": { + "tag": "bloodmagic:arc/hydrate" + }, + "inputfluid": { + "amount": 200, + "fluid": "minecraft:water" + }, + "output": { + "item": "minecraft:clay" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_gold.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_gold.json new file mode 100644 index 00000000..c77dec87 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_gold.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "bloodmagic:gravels/gold" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:goldsand" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_iron.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_iron.json new file mode 100644 index 00000000..f2b834b7 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_iron.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "bloodmagic:gravels/iron" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:ironsand" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_netherite_scrap.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_netherite_scrap.json new file mode 100644 index 00000000..498f1d0f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_gravel_netherite_scrap.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "bloodmagic:gravels/netherite_scrap" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:sand_netherite" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_gold.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_gold.json new file mode 100644 index 00000000..c1cdecc1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_gold.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ingots/gold" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "output": { + "item": "bloodmagic:goldsand" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_iron.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_iron.json new file mode 100644 index 00000000..7c4e0afd --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_iron.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ingots/iron" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "output": { + "item": "bloodmagic:ironsand" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_netherite_scrap.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_netherite_scrap.json new file mode 100644 index 00000000..fc4af18a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ingot_netherite_scrap.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "minecraft:netherite_scrap" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "output": { + "item": "bloodmagic:sand_netherite" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_gold.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_gold.json new file mode 100644 index 00000000..8aa0031c --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_gold.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ores/gold" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:goldsand", + "count": 2 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_iron.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_iron.json new file mode 100644 index 00000000..6afdf627 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_iron.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ores/iron" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:ironsand", + "count": 2 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_netherite_scrap.json b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_netherite_scrap.json new file mode 100644 index 00000000..cfc195d4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/dustsfrom_ore_netherite_scrap.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ores/netherite_scrap" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:sand_netherite", + "count": 2 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsgold.json b/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsgold.json new file mode 100644 index 00000000..74ed09a7 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsgold.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ores/gold" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "output": { + "item": "bloodmagic:goldfragment", + "count": 3 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsiron.json b/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsiron.json new file mode 100644 index 00000000..bdd4aad2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsiron.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ores/iron" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "output": { + "item": "bloodmagic:ironfragment", + "count": 3 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsnetherite_scrap.json b/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsnetherite_scrap.json new file mode 100644 index 00000000..2f2e64a0 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/fragmentsnetherite_scrap.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:ores/netherite_scrap" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "output": { + "item": "bloodmagic:fragment_netherite_scrap", + "count": 3 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/gravelsgold.json b/src/generated/resources/data/bloodmagic/recipes/arc/gravelsgold.json new file mode 100644 index 00000000..0920bb12 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/gravelsgold.json @@ -0,0 +1,27 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "bloodmagic:fragments/gold" + }, + "tool": { + "tag": "bloodmagic:arc/resonator" + }, + "addedoutput": [ + { + "chance": 0.05, + "type": { + "item": "bloodmagic:corrupted_tinydust" + } + }, + { + "chance": 0.01, + "type": { + "item": "bloodmagic:corrupted_tinydust" + } + } + ], + "output": { + "item": "bloodmagic:goldgravel" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/gravelsiron.json b/src/generated/resources/data/bloodmagic/recipes/arc/gravelsiron.json new file mode 100644 index 00000000..980da2fa --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/gravelsiron.json @@ -0,0 +1,27 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "bloodmagic:fragments/iron" + }, + "tool": { + "tag": "bloodmagic:arc/resonator" + }, + "addedoutput": [ + { + "chance": 0.05, + "type": { + "item": "bloodmagic:corrupted_tinydust" + } + }, + { + "chance": 0.01, + "type": { + "item": "bloodmagic:corrupted_tinydust" + } + } + ], + "output": { + "item": "bloodmagic:irongravel" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/gravelsnetherite_scrap.json b/src/generated/resources/data/bloodmagic/recipes/arc/gravelsnetherite_scrap.json new file mode 100644 index 00000000..86971ad1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/gravelsnetherite_scrap.json @@ -0,0 +1,27 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "bloodmagic:fragments/netherite_scrap" + }, + "tool": { + "tag": "bloodmagic:arc/resonator" + }, + "addedoutput": [ + { + "chance": 0.05, + "type": { + "item": "bloodmagic:corrupted_tinydust" + } + }, + { + "chance": 0.01, + "type": { + "item": "bloodmagic:corrupted_tinydust" + } + } + ], + "output": { + "item": "bloodmagic:gravel_netherite_scrap" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/netherrack_to_sulfer.json b/src/generated/resources/data/bloodmagic/recipes/arc/netherrack_to_sulfer.json new file mode 100644 index 00000000..ee5e9bdc --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/netherrack_to_sulfer.json @@ -0,0 +1,17 @@ +{ + "type": "bloodmagic:arc", + "input": { + "tag": "forge:netherrack" + }, + "tool": { + "tag": "bloodmagic:arc/explosive" + }, + "outputfluid": { + "fluid": "minecraft:lava", + "amount": 5 + }, + "output": { + "item": "bloodmagic:sulfur" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/ore/dustgold.json b/src/generated/resources/data/bloodmagic/recipes/arc/ore/dustgold.json new file mode 100644 index 00000000..284985ab --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/ore/dustgold.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "minecraft:gold_ore" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:goldsand", + "count": 2 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/ore/dustiron.json b/src/generated/resources/data/bloodmagic/recipes/arc/ore/dustiron.json new file mode 100644 index 00000000..185879fb --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/ore/dustiron.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "minecraft:iron_ore" + }, + "tool": { + "tag": "bloodmagic:arc/cuttingfluid" + }, + "output": { + "item": "bloodmagic:ironsand", + "count": 2 + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/reversion/apprentice_blood_orb.json b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/apprentice_blood_orb.json new file mode 100644 index 00000000..393c065a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/apprentice_blood_orb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "bloodmagic:apprenticebloodorb" + }, + "tool": { + "tag": "bloodmagic:arc/reverter" + }, + "output": { + "item": "minecraft:redstone_block" + }, + "consumeingredient": true +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/reversion/magician_blood_orb.json b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/magician_blood_orb.json new file mode 100644 index 00000000..4ddb9c5c --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/magician_blood_orb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "bloodmagic:magicianbloodorb" + }, + "tool": { + "tag": "bloodmagic:arc/reverter" + }, + "output": { + "item": "minecraft:gold_block" + }, + "consumeingredient": true +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/reversion/master_blood_orb.json b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/master_blood_orb.json new file mode 100644 index 00000000..a258faa9 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/master_blood_orb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "bloodmagic:masterbloodorb" + }, + "tool": { + "tag": "bloodmagic:arc/reverter" + }, + "output": { + "item": "bloodmagic:weakbloodshard" + }, + "consumeingredient": true +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/reversion/weak_blood_orb.json b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/weak_blood_orb.json new file mode 100644 index 00000000..52823f43 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/reversion/weak_blood_orb.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "bloodmagic:weakbloodorb" + }, + "tool": { + "tag": "bloodmagic:arc/reverter" + }, + "output": { + "item": "minecraft:diamond" + }, + "consumeingredient": true +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/arc/weakbloodshard.json b/src/generated/resources/data/bloodmagic/recipes/arc/weakbloodshard.json new file mode 100644 index 00000000..806f31b2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/arc/weakbloodshard.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:arc", + "input": { + "item": "bloodmagic:infusedslate" + }, + "tool": { + "tag": "bloodmagic:arc/reverter" + }, + "addedoutput": [ + { + "chance": 0.2, + "type": { + "item": "bloodmagic:weakbloodshard" + } + } + ], + "output": { + "item": "bloodmagic:weakbloodshard" + }, + "consumeingredient": false +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/airsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/airsigil.json new file mode 100644 index 00000000..7cd5e7ff --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/airsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/airsigil.png", + "baseinput": { + "item": "bloodmagic:reagentair" + }, + "addedinput": { + "item": "bloodmagic:reinforcedslate" + }, + "output": { + "item": "bloodmagic:airsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/bloodlightsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/bloodlightsigil.json new file mode 100644 index 00000000..2e6e3e48 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/bloodlightsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/lightsigil.png", + "baseinput": { + "item": "bloodmagic:reagentbloodlight" + }, + "addedinput": { + "item": "bloodmagic:infusedslate" + }, + "output": { + "item": "bloodmagic:bloodlightsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/bounce.json b/src/generated/resources/data/bloodmagic/recipes/array/bounce.json new file mode 100644 index 00000000..d15b0de6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/bounce.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/bouncearray.png", + "baseinput": { + "tag": "forge:slimeballs" + }, + "addedinput": { + "tag": "forge:dusts/redstone" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/day.json b/src/generated/resources/data/bloodmagic/recipes/array/day.json new file mode 100644 index 00000000..32c6212b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/day.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/sunarray.png", + "baseinput": { + "item": "minecraft:coal" + }, + "addedinput": { + "item": "minecraft:coal" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/divinationsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/divinationsigil.json new file mode 100644 index 00000000..b7b8d0bf --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/divinationsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/divinationsigil.png", + "baseinput": { + "item": "minecraft:redstone" + }, + "addedinput": { + "item": "bloodmagic:blankslate" + }, + "output": { + "item": "bloodmagic:divinationsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/fastminersigil.json b/src/generated/resources/data/bloodmagic/recipes/array/fastminersigil.json new file mode 100644 index 00000000..b3644330 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/fastminersigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/fastminersigil.png", + "baseinput": { + "item": "bloodmagic:reagentfastminer" + }, + "addedinput": { + "item": "bloodmagic:reinforcedslate" + }, + "output": { + "item": "bloodmagic:miningsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/grove.json b/src/generated/resources/data/bloodmagic/recipes/array/grove.json new file mode 100644 index 00000000..f09741a3 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/grove.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/growthsigil.png", + "baseinput": { + "tag": "forge:bones" + }, + "addedinput": { + "tag": "forge:bones" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/growthsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/growthsigil.json new file mode 100644 index 00000000..22e90ecc --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/growthsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/growthsigil.png", + "baseinput": { + "item": "bloodmagic:reagentgrowth" + }, + "addedinput": { + "item": "bloodmagic:reinforcedslate" + }, + "output": { + "item": "bloodmagic:growthsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/holdingsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/holdingsigil.json new file mode 100644 index 00000000..9aa7670a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/holdingsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/sightsigil.png", + "baseinput": { + "item": "bloodmagic:reagentholding" + }, + "addedinput": { + "item": "bloodmagic:infusedslate" + }, + "output": { + "item": "bloodmagic:sigilofholding" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/lavasigil.json b/src/generated/resources/data/bloodmagic/recipes/array/lavasigil.json new file mode 100644 index 00000000..f71cd318 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/lavasigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/lavasigil.png", + "baseinput": { + "item": "bloodmagic:reagentlava" + }, + "addedinput": { + "item": "bloodmagic:blankslate" + }, + "output": { + "item": "bloodmagic:lavasigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/living_boots.json b/src/generated/resources/data/bloodmagic/recipes/array/living_boots.json new file mode 100644 index 00000000..6150d54b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/living_boots.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png", + "baseinput": { + "item": "bloodmagic:reagentbinding" + }, + "addedinput": { + "item": "minecraft:iron_boots" + }, + "output": { + "item": "bloodmagic:livingboots", + "nbt": "{Damage:0}" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/living_helmet.json b/src/generated/resources/data/bloodmagic/recipes/array/living_helmet.json new file mode 100644 index 00000000..b11c33dc --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/living_helmet.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png", + "baseinput": { + "item": "bloodmagic:reagentbinding" + }, + "addedinput": { + "item": "minecraft:iron_helmet" + }, + "output": { + "item": "bloodmagic:livinghelmet", + "nbt": "{Damage:0}" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/living_leggings.json b/src/generated/resources/data/bloodmagic/recipes/array/living_leggings.json new file mode 100644 index 00000000..28e8f5ce --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/living_leggings.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png", + "baseinput": { + "item": "bloodmagic:reagentbinding" + }, + "addedinput": { + "item": "minecraft:iron_leggings" + }, + "output": { + "item": "bloodmagic:livingleggings", + "nbt": "{Damage:0}" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/living_plate.json b/src/generated/resources/data/bloodmagic/recipes/array/living_plate.json new file mode 100644 index 00000000..803b429c --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/living_plate.json @@ -0,0 +1,14 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png", + "baseinput": { + "item": "bloodmagic:reagentbinding" + }, + "addedinput": { + "item": "minecraft:iron_chestplate" + }, + "output": { + "item": "bloodmagic:livingplate", + "nbt": "{Damage:0}" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/magnetismsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/magnetismsigil.json new file mode 100644 index 00000000..324ec177 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/magnetismsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/magnetismsigil.png", + "baseinput": { + "item": "bloodmagic:reagentmagnetism" + }, + "addedinput": { + "item": "bloodmagic:infusedslate" + }, + "output": { + "item": "bloodmagic:sigilofmagnetism" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/movement.json b/src/generated/resources/data/bloodmagic/recipes/array/movement.json new file mode 100644 index 00000000..2d4f6309 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/movement.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/movementarray.png", + "baseinput": { + "item": "minecraft:feather" + }, + "addedinput": { + "tag": "forge:dusts/redstone" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/night.json b/src/generated/resources/data/bloodmagic/recipes/array/night.json new file mode 100644 index 00000000..c0130213 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/night.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/moonarray.png", + "baseinput": { + "item": "minecraft:lapis_lazuli" + }, + "addedinput": { + "item": "minecraft:lapis_lazuli" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/seersigil.json b/src/generated/resources/data/bloodmagic/recipes/array/seersigil.json new file mode 100644 index 00000000..3441514b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/seersigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/sightsigil.png", + "baseinput": { + "item": "bloodmagic:reagentsight" + }, + "addedinput": { + "item": "bloodmagic:reinforcedslate" + }, + "output": { + "item": "bloodmagic:seersigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/spike.json b/src/generated/resources/data/bloodmagic/recipes/array/spike.json new file mode 100644 index 00000000..88ce4ff5 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/spike.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/spikearray.png", + "baseinput": { + "item": "minecraft:cobblestone" + }, + "addedinput": { + "tag": "forge:ingots/iron" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/updraft.json b/src/generated/resources/data/bloodmagic/recipes/array/updraft.json new file mode 100644 index 00000000..700967ce --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/updraft.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/updraftarray.png", + "baseinput": { + "item": "minecraft:feather" + }, + "addedinput": { + "tag": "forge:dusts/glowstone" + }, + "output": { + "item": "minecraft:air" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/voidsigil.json b/src/generated/resources/data/bloodmagic/recipes/array/voidsigil.json new file mode 100644 index 00000000..4d10c446 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/voidsigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/voidsigil.png", + "baseinput": { + "item": "bloodmagic:reagentvoid" + }, + "addedinput": { + "item": "bloodmagic:reinforcedslate" + }, + "output": { + "item": "bloodmagic:voidsigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/array/watersigil.json b/src/generated/resources/data/bloodmagic/recipes/array/watersigil.json new file mode 100644 index 00000000..0862f909 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/array/watersigil.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:array", + "texture": "bloodmagic:textures/models/alchemyarrays/watersigil.png", + "baseinput": { + "item": "bloodmagic:reagentwater" + }, + "addedinput": { + "item": "bloodmagic:blankslate" + }, + "output": { + "item": "bloodmagic:watersigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_altar.json b/src/generated/resources/data/bloodmagic/recipes/blood_altar.json new file mode 100644 index 00000000..aa83901e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_altar.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "a a", + "aba", + "cdc" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "item": "minecraft:furnace" + }, + "c": { + "tag": "forge:ingots/gold" + }, + "d": { + "item": "minecraft:gold_ingot" + } + }, + "result": { + "item": "bloodmagic:altar" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_acceleration.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_acceleration.json new file mode 100644 index 00000000..a7e0d300 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_acceleration.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "cdc", + "aea" + ], + "key": { + "a": { + "item": "minecraft:bucket" + }, + "b": { + "item": "bloodmagic:demonslate" + }, + "c": { + "tag": "forge:ingots/gold" + }, + "d": { + "item": "bloodmagic:speedrune" + }, + "e": { + "type": "bloodmagic:bloodorb", + "orb_tier": 4 + } + }, + "result": { + "item": "bloodmagic:accelerationrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_aug_capacity.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_aug_capacity.json new file mode 100644 index 00000000..7a79f948 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_aug_capacity.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "cdc", + "aea" + ], + "key": { + "a": { + "tag": "forge:obsidian" + }, + "b": { + "item": "bloodmagic:demonslate" + }, + "c": { + "item": "minecraft:bucket" + }, + "d": { + "item": "bloodmagic:altarcapacityrune" + }, + "e": { + "type": "bloodmagic:bloodorb", + "orb_tier": 4 + } + }, + "result": { + "item": "bloodmagic:bettercapacityrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_blank.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_blank.json new file mode 100644 index 00000000..dba609b8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_blank.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "asa", + "aoa", + "aaa" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "s": { + "item": "bloodmagic:blankslate" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 1 + } + }, + "result": { + "item": "bloodmagic:blankrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_capacity.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_capacity.json new file mode 100644 index 00000000..daf3fef6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_capacity.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "bcb", + "ada" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "item": "minecraft:bucket" + }, + "c": { + "item": "bloodmagic:blankrune" + }, + "d": { + "item": "bloodmagic:infusedslate" + } + }, + "result": { + "item": "bloodmagic:altarcapacityrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_charging.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_charging.json new file mode 100644 index 00000000..acd341f6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_charging.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "RsR", + "GrG", + "ReR" + ], + "key": { + "R": { + "tag": "forge:dusts/redstone" + }, + "r": { + "item": "bloodmagic:blankrune" + }, + "s": { + "item": "bloodmagic:demonslate" + }, + "e": { + "type": "bloodmagic:bloodorb", + "orb_tier": 4 + }, + "G": { + "tag": "forge:dusts/glowstone" + } + }, + "result": { + "item": "bloodmagic:chargingrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_displacement.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_displacement.json new file mode 100644 index 00000000..b43644d9 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_displacement.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "bcb", + "ada" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "item": "minecraft:water_bucket" + }, + "c": { + "item": "bloodmagic:blankrune" + }, + "d": { + "item": "bloodmagic:infusedslate" + } + }, + "result": { + "item": "bloodmagic:dislocationrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_orb.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_orb.json new file mode 100644 index 00000000..1ca7d126 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_orb.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "cdc", + "aba" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "type": "bloodmagic:bloodorb", + "orb_tier": 1 + }, + "c": { + "item": "bloodmagic:blankrune" + }, + "d": { + "type": "bloodmagic:bloodorb", + "orb_tier": 4 + } + }, + "result": { + "item": "bloodmagic:orbcapacityrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_sacrifice.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_sacrifice.json new file mode 100644 index 00000000..3d43229b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_sacrifice.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "cdc", + "aea" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "item": "bloodmagic:reinforcedslate" + }, + "c": { + "tag": "forge:ingots/gold" + }, + "d": { + "item": "bloodmagic:blankrune" + }, + "e": { + "type": "bloodmagic:bloodorb", + "orb_tier": 2 + } + }, + "result": { + "item": "bloodmagic:sacrificerune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_self_sacrifice.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_self_sacrifice.json new file mode 100644 index 00000000..054a70d8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_self_sacrifice.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "cdc", + "aea" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "item": "bloodmagic:reinforcedslate" + }, + "c": { + "item": "minecraft:glowstone_dust" + }, + "d": { + "item": "bloodmagic:blankrune" + }, + "e": { + "type": "bloodmagic:bloodorb", + "orb_tier": 2 + } + }, + "result": { + "item": "bloodmagic:selfsacrificerune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/blood_rune_speed.json b/src/generated/resources/data/bloodmagic/recipes/blood_rune_speed.json new file mode 100644 index 00000000..7ef75bfc --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/blood_rune_speed.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "cdc", + "aba" + ], + "key": { + "a": { + "tag": "forge:stone" + }, + "b": { + "item": "bloodmagic:blankslate" + }, + "c": { + "item": "minecraft:sugar" + }, + "d": { + "item": "bloodmagic:blankrune" + } + }, + "result": { + "item": "bloodmagic:speedrune" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/bloodstonebrick.json b/src/generated/resources/data/bloodmagic/recipes/bloodstonebrick.json new file mode 100644 index 00000000..44fbc33d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/bloodstonebrick.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ss", + "ss" + ], + "key": { + "s": { + "item": "bloodmagic:largebloodstonebrick" + } + }, + "result": { + "item": "bloodmagic:bloodstonebrick", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/corrupted_dust.json b/src/generated/resources/data/bloodmagic/recipes/corrupted_dust.json new file mode 100644 index 00000000..cdcfdbab --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/corrupted_dust.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "sss", + "sss" + ], + "key": { + "s": { + "tag": "bloodmagic:tiny_dusts/corrupted" + } + }, + "result": { + "item": "bloodmagic:corrupted_dust" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/experience_tome.json b/src/generated/resources/data/bloodmagic/recipes/experience_tome.json new file mode 100644 index 00000000..633dbd55 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/experience_tome.json @@ -0,0 +1,32 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ses", + "lbl", + "gog" + ], + "key": { + "b": { + "item": "minecraft:enchanted_book" + }, + "s": { + "tag": "forge:string" + }, + "e": { + "tag": "forge:storage_blocks/lapis" + }, + "g": { + "tag": "forge:ingots/gold" + }, + "l": { + "item": "bloodmagic:infusedslate" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 3 + } + }, + "result": { + "item": "bloodmagic:experiencebook" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/hellforged_block.json b/src/generated/resources/data/bloodmagic/recipes/hellforged_block.json new file mode 100644 index 00000000..3c7c8bbb --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/hellforged_block.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "sss", + "sss" + ], + "key": { + "s": { + "tag": "forge:ingots/hellforged" + } + }, + "result": { + "item": "bloodmagic:dungeon_metal" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/incense_altar.json b/src/generated/resources/data/bloodmagic/recipes/incense_altar.json new file mode 100644 index 00000000..95826002 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/incense_altar.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "s s", + "shs", + "coc" + ], + "key": { + "s": { + "tag": "forge:stone" + }, + "c": { + "tag": "forge:cobblestone" + }, + "h": { + "item": "minecraft:charcoal" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 1 + } + }, + "result": { + "item": "bloodmagic:incensealtar" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/largebloodstonebrick.json b/src/generated/resources/data/bloodmagic/recipes/largebloodstonebrick.json new file mode 100644 index 00000000..915b47ef --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/largebloodstonebrick.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:stone" + }, + { + "item": "bloodmagic:weakbloodshard" + } + ], + "result": { + "item": "bloodmagic:largebloodstonebrick", + "count": 8 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/lava_crystal.json b/src/generated/resources/data/bloodmagic/recipes/lava_crystal.json new file mode 100644 index 00000000..7a96e775 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/lava_crystal.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "bcb", + "ded" + ], + "key": { + "a": { + "tag": "forge:glass" + }, + "b": { + "item": "minecraft:lava_bucket" + }, + "c": { + "type": "bloodmagic:bloodorb", + "orb_tier": 1 + }, + "d": { + "tag": "forge:obsidian" + }, + "e": { + "tag": "forge:gems/diamond" + } + }, + "result": { + "item": "bloodmagic:lavacrystal" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/path/path_stone.json b/src/generated/resources/data/bloodmagic/recipes/path/path_stone.json new file mode 100644 index 00000000..3bcdf018 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/path/path_stone.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:stone" + }, + { + "tag": "forge:stone" + }, + { + "tag": "forge:stone" + }, + { + "tag": "forge:stone" + }, + { + "type": "bloodmagic:bloodorb", + "orb_tier": 3 + } + ], + "result": { + "item": "bloodmagic:stonebrickpath", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/path/path_stonetile.json b/src/generated/resources/data/bloodmagic/recipes/path/path_stonetile.json new file mode 100644 index 00000000..64521902 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/path/path_stonetile.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "bloodmagic:stonebrickpath" + }, + { + "item": "bloodmagic:stonebrickpath" + }, + { + "item": "bloodmagic:stonebrickpath" + }, + { + "item": "bloodmagic:stonebrickpath" + } + ], + "result": { + "item": "bloodmagic:stonetilepath", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/path/path_wood.json b/src/generated/resources/data/bloodmagic/recipes/path/path_wood.json new file mode 100644 index 00000000..d04415bf --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/path/path_wood.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "minecraft:planks" + }, + { + "tag": "minecraft:planks" + }, + { + "tag": "minecraft:planks" + }, + { + "tag": "minecraft:planks" + }, + { + "type": "bloodmagic:bloodorb", + "orb_tier": 2 + } + ], + "result": { + "item": "bloodmagic:woodbrickpath", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/path/path_woodtile.json b/src/generated/resources/data/bloodmagic/recipes/path/path_woodtile.json new file mode 100644 index 00000000..2d0a2641 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/path/path_woodtile.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "bloodmagic:woodbrickpath" + }, + { + "item": "bloodmagic:woodbrickpath" + }, + { + "item": "bloodmagic:woodbrickpath" + }, + { + "item": "bloodmagic:woodbrickpath" + } + ], + "result": { + "item": "bloodmagic:woodtilepath", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/path/path_wornstone.json b/src/generated/resources/data/bloodmagic/recipes/path/path_wornstone.json new file mode 100644 index 00000000..6a43f7e0 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/path/path_wornstone.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "bloodmagic:stonebrickpath" + }, + { + "item": "bloodmagic:stonebrickpath" + }, + { + "item": "bloodmagic:stonebrickpath" + }, + { + "item": "bloodmagic:stonebrickpath" + }, + { + "type": "bloodmagic:bloodorb", + "orb_tier": 4 + } + ], + "result": { + "item": "bloodmagic:wornstonebrickpath", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/path/path_wornstonetile.json b/src/generated/resources/data/bloodmagic/recipes/path/path_wornstonetile.json new file mode 100644 index 00000000..1efd2976 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/path/path_wornstonetile.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "bloodmagic:wornstonebrickpath" + }, + { + "item": "bloodmagic:wornstonebrickpath" + }, + { + "item": "bloodmagic:wornstonebrickpath" + }, + { + "item": "bloodmagic:wornstonebrickpath" + } + ], + "result": { + "item": "bloodmagic:wornstonetilepath", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/primitive_furnace_cell.json b/src/generated/resources/data/bloodmagic/recipes/primitive_furnace_cell.json new file mode 100644 index 00000000..501b146b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/primitive_furnace_cell.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "csc", + "cfc", + "coc" + ], + "key": { + "c": { + "tag": "forge:cobblestone" + }, + "f": { + "tag": "forge:storage_blocks/coal" + }, + "s": { + "item": "bloodmagic:blankslate" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 3 + } + }, + "result": { + "item": "bloodmagic:furnacecell_primitive" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/primitive_hydration_cell.json b/src/generated/resources/data/bloodmagic/recipes/primitive_hydration_cell.json new file mode 100644 index 00000000..241d455f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/primitive_hydration_cell.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "csc", + "cBc", + "coc" + ], + "key": { + "B": { + "item": "minecraft:water_bucket" + }, + "c": { + "tag": "forge:cobblestone" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 3 + }, + "s": { + "item": "bloodmagic:blankslate" + } + }, + "result": { + "item": "bloodmagic:primitive_hydration_cell" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/ritual_diviner_0.json b/src/generated/resources/data/bloodmagic/recipes/ritual_diviner_0.json new file mode 100644 index 00000000..5806cf36 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/ritual_diviner_0.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "dfd", + "ase", + "dwd" + ], + "key": { + "a": { + "item": "bloodmagic:airscribetool" + }, + "s": { + "tag": "forge:rods/wooden" + }, + "d": { + "tag": "forge:gems/diamond" + }, + "e": { + "item": "bloodmagic:earthscribetool" + }, + "f": { + "item": "bloodmagic:firescribetool" + }, + "w": { + "item": "bloodmagic:waterscribetool" + } + }, + "result": { + "item": "bloodmagic:ritualdiviner" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/ritual_diviner_1.json b/src/generated/resources/data/bloodmagic/recipes/ritual_diviner_1.json new file mode 100644 index 00000000..46a797ed --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/ritual_diviner_1.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " S ", + "tdt", + " S " + ], + "key": { + "S": { + "item": "bloodmagic:demonslate" + }, + "t": { + "item": "bloodmagic:duskscribetool" + }, + "d": { + "item": "bloodmagic:ritualdiviner" + } + }, + "result": { + "item": "bloodmagic:ritualdivinerdusk" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/ritual_reader.json b/src/generated/resources/data/bloodmagic/recipes/ritual_reader.json new file mode 100644 index 00000000..27805eff --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/ritual_reader.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "gog", + "isi", + " s " + ], + "key": { + "s": { + "item": "bloodmagic:demonslate" + }, + "g": { + "tag": "forge:glass" + }, + "i": { + "tag": "forge:ingots/gold" + }, + "o": { + "type": "bloodmagic:bloodorb", + "orb_tier": 4 + } + }, + "result": { + "item": "bloodmagic:ritualtinkerer" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/ritual_stone_blank.json b/src/generated/resources/data/bloodmagic/recipes/ritual_stone_blank.json new file mode 100644 index 00000000..aa493752 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/ritual_stone_blank.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "bcb", + "aba" + ], + "key": { + "a": { + "tag": "forge:obsidian" + }, + "b": { + "item": "bloodmagic:reinforcedslate" + }, + "c": { + "type": "bloodmagic:bloodorb", + "orb_tier": 2 + } + }, + "result": { + "item": "bloodmagic:ritualstone", + "count": 4 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/ritual_stone_master.json b/src/generated/resources/data/bloodmagic/recipes/ritual_stone_master.json new file mode 100644 index 00000000..4cdb269e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/ritual_stone_master.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "aba", + "bcb", + "aba" + ], + "key": { + "a": { + "tag": "forge:obsidian" + }, + "b": { + "item": "bloodmagic:ritualstone" + }, + "c": { + "type": "bloodmagic:bloodorb", + "orb_tier": 3 + } + }, + "result": { + "item": "bloodmagic:masterritualstone" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/sacrificial_dagger.json b/src/generated/resources/data/bloodmagic/recipes/sacrificial_dagger.json new file mode 100644 index 00000000..23a4dcab --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/sacrificial_dagger.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ggg", + " Gg", + "i g" + ], + "key": { + "g": { + "tag": "forge:glass" + }, + "G": { + "tag": "forge:ingots/gold" + }, + "i": { + "tag": "forge:ingots/iron" + } + }, + "result": { + "item": "bloodmagic:sacrificialdagger" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_gold.json b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_gold.json new file mode 100644 index 00000000..e8bbf60c --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_gold.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "tag": "forge:dusts/gold" + }, + "result": "minecraft:gold_ingot", + "experience": 0.0, + "cookingtime": 200 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_hellforged.json b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_hellforged.json new file mode 100644 index 00000000..6a06b2a3 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_hellforged.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "tag": "forge:dusts/hellforged" + }, + "result": "bloodmagic:ingot_hellforged", + "experience": 0.0, + "cookingtime": 200 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_iron.json b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_iron.json new file mode 100644 index 00000000..7ca7a664 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_iron.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "tag": "forge:dusts/iron" + }, + "result": "minecraft:iron_ingot", + "experience": 0.0, + "cookingtime": 200 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_netherite_scrap.json b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_netherite_scrap.json new file mode 100644 index 00000000..2edc11a3 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/smelting/ingot_netherite_scrap.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "tag": "forge:dusts/netherite_scrap" + }, + "result": "minecraft:netherite_scrap", + "experience": 0.0, + "cookingtime": 200 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soul_forge.json b/src/generated/resources/data/bloodmagic/recipes/soul_forge.json new file mode 100644 index 00000000..1b03fe65 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soul_forge.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "i i", + "sSs", + "sos" + ], + "key": { + "s": { + "tag": "forge:stone" + }, + "S": { + "item": "bloodmagic:blankslate" + }, + "i": { + "tag": "forge:ingots/iron" + }, + "o": { + "tag": "forge:storage_blocks/iron" + } + }, + "result": { + "item": "bloodmagic:soulforge" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/commontartaricgem.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/commontartaricgem.json new file mode 100644 index 00000000..c87b1cc0 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/commontartaricgem.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgemlesser" + }, + "input1": { + "tag": "forge:gems/diamond" + }, + "input2": { + "tag": "forge:storage_blocks/gold" + }, + "input3": { + "item": "bloodmagic:infusedslate" + }, + "output": { + "item": "bloodmagic:soulgemcommon" + }, + "minimumDrain": 240.0, + "drain": 50.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/corrosive_crystal_block.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/corrosive_crystal_block.json new file mode 100644 index 00000000..11d80db6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/corrosive_crystal_block.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:corrosivecrystal" + }, + "input1": { + "item": "bloodmagic:corrosivecrystal" + }, + "input2": { + "item": "bloodmagic:corrosivecrystal" + }, + "input3": { + "item": "bloodmagic:corrosivecrystal" + }, + "output": { + "item": "bloodmagic:corrosivedemoncrystal" + }, + "minimumDrain": 1200.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge.json new file mode 100644 index 00000000..b8478f16 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:cobblestone" + }, + "input1": { + "item": "minecraft:charcoal" + }, + "input2": { + "tag": "minecraft:logs" + }, + "input3": { + "tag": "minecraft:planks" + }, + "output": { + "item": "bloodmagic:deforester_charge", + "count": 8 + }, + "minimumDrain": 10.0, + "drain": 0.5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_fortune_1.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_fortune_1.json new file mode 100644 index 00000000..9902d84e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_fortune_1.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:deforester_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "tag": "forge:dusts/redstone" + }, + "input3": { + "tag": "forge:dusts/coal" + }, + "output": { + "item": "bloodmagic:deforester_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:fortune\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_silk_touch.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_silk_touch.json new file mode 100644 index 00000000..95be85d4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_silk_touch.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:deforester_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:cobweb" + }, + "input3": { + "tag": "forge:nuggets/gold" + }, + "output": { + "item": "bloodmagic:deforester_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:silk_touch\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_smelting.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_smelting.json new file mode 100644 index 00000000..3ed21416 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/deforester_charge_smelting.json @@ -0,0 +1,26 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:deforester_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:furnace" + }, + "input3": [ + { + "item": "minecraft:charcoal" + }, + { + "item": "minecraft:coal" + } + ], + "output": { + "item": "bloodmagic:deforester_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:smelting\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/demon_crucible.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/demon_crucible.json new file mode 100644 index 00000000..57f6fe29 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/demon_crucible.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "minecraft:cauldron" + }, + "input1": { + "tag": "forge:stone" + }, + "input2": { + "tag": "forge:gems/lapis" + }, + "input3": { + "tag": "forge:gems/diamond" + }, + "output": { + "item": "bloodmagic:demoncrucible" + }, + "minimumDrain": 400.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/demon_crystallizer.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/demon_crystallizer.json new file mode 100644 index 00000000..1283b4e1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/demon_crystallizer.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulforge" + }, + "input1": { + "tag": "forge:stone" + }, + "input2": { + "tag": "forge:gems/lapis" + }, + "input3": { + "tag": "forge:glass" + }, + "output": { + "item": "bloodmagic:demoncrystallizer" + }, + "minimumDrain": 500.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/destructive_crystal_block.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/destructive_crystal_block.json new file mode 100644 index 00000000..6423e1a6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/destructive_crystal_block.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:destructivecrystal" + }, + "input1": { + "item": "bloodmagic:destructivecrystal" + }, + "input2": { + "item": "bloodmagic:destructivecrystal" + }, + "input3": { + "item": "bloodmagic:destructivecrystal" + }, + "output": { + "item": "bloodmagic:destructivedemoncrystal" + }, + "minimumDrain": 1200.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge.json new file mode 100644 index 00000000..9a849f6d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:cobblestone" + }, + "input1": { + "item": "minecraft:charcoal" + }, + "input2": { + "tag": "minecraft:mushroom_hyphae" + }, + "input3": { + "tag": "forge:mushrooms" + }, + "output": { + "item": "bloodmagic:fungal_charge", + "count": 8 + }, + "minimumDrain": 10.0, + "drain": 0.5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_fortune_1.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_fortune_1.json new file mode 100644 index 00000000..b913ba14 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_fortune_1.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:fungal_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "tag": "forge:dusts/redstone" + }, + "input3": { + "tag": "forge:dusts/coal" + }, + "output": { + "item": "bloodmagic:fungal_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:fortune\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_silk_touch.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_silk_touch.json new file mode 100644 index 00000000..50c7537b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_silk_touch.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:fungal_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:cobweb" + }, + "input3": { + "tag": "forge:nuggets/gold" + }, + "output": { + "item": "bloodmagic:fungal_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:silk_touch\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_smelting.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_smelting.json new file mode 100644 index 00000000..a47141b1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/fungal_charge_smelting.json @@ -0,0 +1,26 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:fungal_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:furnace" + }, + "input3": [ + { + "item": "minecraft:charcoal" + }, + { + "item": "minecraft:coal" + } + ], + "output": { + "item": "bloodmagic:fungal_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:smelting\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/greatertartaricgem.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/greatertartaricgem.json new file mode 100644 index 00000000..a46a9f6d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/greatertartaricgem.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgemcommon" + }, + "input1": { + "item": "bloodmagic:demonslate" + }, + "input2": { + "item": "bloodmagic:weakbloodshard" + }, + "input3": { + "tag": "bloodmagic:crystals/demon" + }, + "output": { + "item": "bloodmagic:soulgemgreater" + }, + "minimumDrain": 1000.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/lessertartaricgem.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/lessertartaricgem.json new file mode 100644 index 00000000..cf5f5b19 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/lessertartaricgem.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgempetty" + }, + "input1": { + "tag": "forge:gems/diamond" + }, + "input2": { + "tag": "forge:storage_blocks/redstone" + }, + "input3": { + "tag": "forge:storage_blocks/lapis" + }, + "output": { + "item": "bloodmagic:soulgemlesser" + }, + "minimumDrain": 60.0, + "drain": 20.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/pettytartaricgem.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/pettytartaricgem.json new file mode 100644 index 00000000..10c7417a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/pettytartaricgem.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:dusts/redstone" + }, + "input1": { + "tag": "forge:ingots/gold" + }, + "input2": { + "tag": "forge:glass" + }, + "input3": { + "tag": "forge:gems/lapis" + }, + "output": { + "item": "bloodmagic:soulgempetty" + }, + "minimumDrain": 1.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/primitive_crystalline_resonator.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/primitive_crystalline_resonator.json new file mode 100644 index 00000000..833978f6 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/primitive_crystalline_resonator.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:stone" + }, + "input1": { + "tag": "forge:ingots" + }, + "input2": { + "item": "bloodmagic:defaultcrystal" + }, + "input3": { + "item": "bloodmagic:defaultcrystal" + }, + "output": { + "item": "bloodmagic:primitive_crystalline_resonator", + "nbt": "{Damage:0}" + }, + "minimumDrain": 1200.0, + "drain": 200.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/raw_crystal_block.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/raw_crystal_block.json new file mode 100644 index 00000000..6d9a3a3b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/raw_crystal_block.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:defaultcrystal" + }, + "input1": { + "item": "bloodmagic:defaultcrystal" + }, + "input2": { + "item": "bloodmagic:defaultcrystal" + }, + "input3": { + "item": "bloodmagic:defaultcrystal" + }, + "output": { + "item": "bloodmagic:rawdemoncrystal" + }, + "minimumDrain": 1200.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/sanguine_reverter.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/sanguine_reverter.json new file mode 100644 index 00000000..ee37a2fb --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/sanguine_reverter.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "minecraft:shears" + }, + "input1": { + "tag": "forge:stone" + }, + "input2": { + "item": "bloodmagic:infusedslate" + }, + "input3": { + "tag": "forge:ingots/iron" + }, + "output": { + "item": "bloodmagic:sanguinereverter", + "nbt": "{Damage:0}" + }, + "minimumDrain": 350.0, + "drain": 30.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientaxe.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientaxe.json new file mode 100644 index 00000000..ee04cc66 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientaxe.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgempetty" + }, + "input1": { + "item": "minecraft:iron_axe" + }, + "output": { + "item": "bloodmagic:soulaxe", + "nbt": "{Damage:0}" + }, + "minimumDrain": 0.0, + "drain": 0.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientpickaxe.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientpickaxe.json new file mode 100644 index 00000000..c553a505 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientpickaxe.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgempetty" + }, + "input1": { + "item": "minecraft:iron_pickaxe" + }, + "output": { + "item": "bloodmagic:soulpickaxe", + "nbt": "{Damage:0}" + }, + "minimumDrain": 0.0, + "drain": 0.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientscythe.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientscythe.json new file mode 100644 index 00000000..77c85c8b --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientscythe.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgempetty" + }, + "input1": { + "item": "minecraft:iron_hoe" + }, + "output": { + "item": "bloodmagic:soulscythe", + "nbt": "{Damage:0}" + }, + "minimumDrain": 0.0, + "drain": 0.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientshovel.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientshovel.json new file mode 100644 index 00000000..205d060e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientshovel.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgempetty" + }, + "input1": { + "item": "minecraft:iron_shovel" + }, + "output": { + "item": "bloodmagic:soulshovel", + "nbt": "{Damage:0}" + }, + "minimumDrain": 0.0, + "drain": 0.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientsword.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientsword.json new file mode 100644 index 00000000..ca642e55 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/sentientsword.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:soulgempetty" + }, + "input1": { + "item": "minecraft:iron_sword" + }, + "output": { + "item": "bloodmagic:soulsword", + "nbt": "{Damage:0}" + }, + "minimumDrain": 0.0, + "drain": 0.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge.json new file mode 100644 index 00000000..b7c7fa04 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:cobblestone" + }, + "input1": { + "item": "minecraft:charcoal" + }, + "input2": { + "tag": "forge:sand" + }, + "input3": { + "tag": "forge:stone" + }, + "output": { + "item": "bloodmagic:shaped_charge", + "count": 8 + }, + "minimumDrain": 10.0, + "drain": 0.5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_fortune_1.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_fortune_1.json new file mode 100644 index 00000000..d8a1c3db --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_fortune_1.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:shaped_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "tag": "forge:dusts/redstone" + }, + "input3": { + "tag": "forge:dusts/coal" + }, + "output": { + "item": "bloodmagic:shaped_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:fortune\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_silk_touch.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_silk_touch.json new file mode 100644 index 00000000..380a43ac --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_silk_touch.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:shaped_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:cobweb" + }, + "input3": { + "tag": "forge:nuggets/gold" + }, + "output": { + "item": "bloodmagic:shaped_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:silk_touch\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_smelting.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_smelting.json new file mode 100644 index 00000000..0fb26bc8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/shaped_charge_smelting.json @@ -0,0 +1,26 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:shaped_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:furnace" + }, + "input3": [ + { + "item": "minecraft:charcoal" + }, + { + "item": "minecraft:coal" + } + ], + "output": { + "item": "bloodmagic:shaped_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:smelting\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/steadfast_crystal_block.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/steadfast_crystal_block.json new file mode 100644 index 00000000..90efc02e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/steadfast_crystal_block.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:steadfastcrystal" + }, + "input1": { + "item": "bloodmagic:steadfastcrystal" + }, + "input2": { + "item": "bloodmagic:steadfastcrystal" + }, + "input3": { + "item": "bloodmagic:steadfastcrystal" + }, + "output": { + "item": "bloodmagic:steadfastdemoncrystal" + }, + "minimumDrain": 1200.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/throwing_dagger.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/throwing_dagger.json new file mode 100644 index 00000000..b173f229 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/throwing_dagger.json @@ -0,0 +1,18 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:ingots/iron" + }, + "input1": { + "tag": "forge:ingots/iron" + }, + "input2": { + "tag": "forge:string" + }, + "output": { + "item": "bloodmagic:throwing_dagger", + "count": 16 + }, + "minimumDrain": 32.0, + "drain": 5.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/throwing_dagger_syringe.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/throwing_dagger_syringe.json new file mode 100644 index 00000000..c7fadcb8 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/throwing_dagger_syringe.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:stone" + }, + "input1": { + "tag": "forge:glass" + }, + "output": { + "item": "bloodmagic:throwing_dagger_syringe", + "count": 8 + }, + "minimumDrain": 10.0, + "drain": 2.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge.json new file mode 100644 index 00000000..eadea857 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "tag": "forge:cobblestone" + }, + "input1": { + "item": "minecraft:charcoal" + }, + "input2": { + "tag": "forge:sandstone" + }, + "input3": { + "tag": "forge:sand" + }, + "output": { + "item": "bloodmagic:veinmine_charge", + "count": 8 + }, + "minimumDrain": 10.0, + "drain": 0.5 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_fortune_1.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_fortune_1.json new file mode 100644 index 00000000..4790182d --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_fortune_1.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:veinmine_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "tag": "forge:dusts/redstone" + }, + "input3": { + "tag": "forge:dusts/coal" + }, + "output": { + "item": "bloodmagic:veinmine_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:fortune\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_silk_touch.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_silk_touch.json new file mode 100644 index 00000000..ccf0709a --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_silk_touch.json @@ -0,0 +1,21 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:veinmine_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:cobweb" + }, + "input3": { + "tag": "forge:nuggets/gold" + }, + "output": { + "item": "bloodmagic:veinmine_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:silk_touch\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_smelting.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_smelting.json new file mode 100644 index 00000000..4c46a2cd --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/vein_charge_smelting.json @@ -0,0 +1,26 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:veinmine_charge" + }, + "input1": { + "tag": "forge:crops/nether_wart" + }, + "input2": { + "item": "minecraft:furnace" + }, + "input3": [ + { + "item": "minecraft:charcoal" + }, + { + "item": "minecraft:coal" + } + ], + "output": { + "item": "bloodmagic:veinmine_charge", + "nbt": "{anointment_holder:{anointments:[{damage:1,max_damage:1,level:1,key:\"bloodmagic:smelting\"}]}}" + }, + "minimumDrain": 60.0, + "drain": 1.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/soulforge/vengeful_crystal_block.json b/src/generated/resources/data/bloodmagic/recipes/soulforge/vengeful_crystal_block.json new file mode 100644 index 00000000..96fed3ca --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/soulforge/vengeful_crystal_block.json @@ -0,0 +1,20 @@ +{ + "type": "bloodmagic:soulforge", + "input0": { + "item": "bloodmagic:vengefulcrystal" + }, + "input1": { + "item": "bloodmagic:vengefulcrystal" + }, + "input2": { + "item": "bloodmagic:vengefulcrystal" + }, + "input3": { + "item": "bloodmagic:vengefulcrystal" + }, + "output": { + "item": "bloodmagic:vengefuldemoncrystal" + }, + "minimumDrain": 1200.0, + "drain": 100.0 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/weak_activation_crystal.json b/src/generated/resources/data/bloodmagic/recipes/weak_activation_crystal.json new file mode 100644 index 00000000..ba19a174 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/weak_activation_crystal.json @@ -0,0 +1,13 @@ +{ + "type": "bloodmagic:altar", + "input": { + "item": "bloodmagic:lavacrystal" + }, + "output": { + "item": "bloodmagic:activationcrystalweak" + }, + "upgradeLevel": 2, + "altarSyphon": 10000, + "consumptionRate": 20, + "drainRate": 10 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/cuttingfluid.json b/src/generated/resources/data/bloodmagic/tags/items/arc/cuttingfluid.json new file mode 100644 index 00000000..c111d035 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/cuttingfluid.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:basiccuttingfluid" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/explosive.json b/src/generated/resources/data/bloodmagic/tags/items/arc/explosive.json new file mode 100644 index 00000000..7488cf64 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/explosive.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "bloodmagic:explosivepowder", + "bloodmagic:primitive_explosive_cell" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/furnace.json b/src/generated/resources/data/bloodmagic/tags/items/arc/furnace.json new file mode 100644 index 00000000..40b104b1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/furnace.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "bloodmagic:furnacecell_primitive", + "bloodmagic:lavacrystal" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/hydrate.json b/src/generated/resources/data/bloodmagic/tags/items/arc/hydrate.json new file mode 100644 index 00000000..dba4afa1 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/hydrate.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:primitive_hydration_cell" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/resonator.json b/src/generated/resources/data/bloodmagic/tags/items/arc/resonator.json new file mode 100644 index 00000000..5ed4cd52 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/resonator.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "bloodmagic:primitive_crystalline_resonator", + "bloodmagic:crystalline_resonator" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/reverter.json b/src/generated/resources/data/bloodmagic/tags/items/arc/reverter.json new file mode 100644 index 00000000..ab081891 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/reverter.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:sanguinereverter" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/sieve.json b/src/generated/resources/data/bloodmagic/tags/items/arc/sieve.json new file mode 100644 index 00000000..7d46ac2c --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/sieve.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:airscribetool" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/arc/tool.json b/src/generated/resources/data/bloodmagic/tags/items/arc/tool.json new file mode 100644 index 00000000..46ccea84 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/arc/tool.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "#bloodmagic:arc/furnace", + "#bloodmagic:arc/reverter", + "#bloodmagic:arc/sieve", + "#bloodmagic:arc/explosive", + "#bloodmagic:arc/hydrate", + "#bloodmagic:arc/resonator", + "#bloodmagic:arc/cuttingfluid" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/crystals/demon.json b/src/generated/resources/data/bloodmagic/tags/items/crystals/demon.json new file mode 100644 index 00000000..0ad4148e --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/crystals/demon.json @@ -0,0 +1,10 @@ +{ + "replace": false, + "values": [ + "bloodmagic:defaultcrystal", + "bloodmagic:corrosivecrystal", + "bloodmagic:destructivecrystal", + "bloodmagic:vengefulcrystal", + "bloodmagic:steadfastcrystal" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/dusts/corrupted.json b/src/generated/resources/data/bloodmagic/tags/items/dusts/corrupted.json new file mode 100644 index 00000000..a84e11a0 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/dusts/corrupted.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:corrupted_dust" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/fragments/gold.json b/src/generated/resources/data/bloodmagic/tags/items/fragments/gold.json new file mode 100644 index 00000000..be036261 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/fragments/gold.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:goldfragment" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/fragments/iron.json b/src/generated/resources/data/bloodmagic/tags/items/fragments/iron.json new file mode 100644 index 00000000..9bc54fba --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/fragments/iron.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:ironfragment" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/fragments/netherite_scrap.json b/src/generated/resources/data/bloodmagic/tags/items/fragments/netherite_scrap.json new file mode 100644 index 00000000..1f0d5a35 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/fragments/netherite_scrap.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:fragment_netherite_scrap" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/gravels/gold.json b/src/generated/resources/data/bloodmagic/tags/items/gravels/gold.json new file mode 100644 index 00000000..8c75a5af --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/gravels/gold.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:goldgravel" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/gravels/iron.json b/src/generated/resources/data/bloodmagic/tags/items/gravels/iron.json new file mode 100644 index 00000000..5c317952 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/gravels/iron.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:irongravel" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/gravels/netherite_scrap.json b/src/generated/resources/data/bloodmagic/tags/items/gravels/netherite_scrap.json new file mode 100644 index 00000000..a957a0e3 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/gravels/netherite_scrap.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:gravel_netherite_scrap" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/tags/items/tiny_dusts/corrupted.json b/src/generated/resources/data/bloodmagic/tags/items/tiny_dusts/corrupted.json new file mode 100644 index 00000000..e792ed30 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/tags/items/tiny_dusts/corrupted.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:corrupted_tinydust" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/fluids/life.json b/src/generated/resources/data/forge/tags/fluids/life.json new file mode 100644 index 00000000..59895a90 --- /dev/null +++ b/src/generated/resources/data/forge/tags/fluids/life.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "bloodmagic:life_essence_fluid", + "bloodmagic:life_essence_fluid_flowing" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/coal.json b/src/generated/resources/data/forge/tags/items/dusts/coal.json new file mode 100644 index 00000000..c9d575d6 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/coal.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:coalsand" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/gold.json b/src/generated/resources/data/forge/tags/items/dusts/gold.json new file mode 100644 index 00000000..959fcf7a --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/gold.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:goldsand" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/hellforged.json b/src/generated/resources/data/forge/tags/items/dusts/hellforged.json new file mode 100644 index 00000000..129c8f3d --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/hellforged.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:sand_hellforged" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/iron.json b/src/generated/resources/data/forge/tags/items/dusts/iron.json new file mode 100644 index 00000000..d3d71370 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/iron.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:ironsand" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/netherite_scrap.json b/src/generated/resources/data/forge/tags/items/dusts/netherite_scrap.json new file mode 100644 index 00000000..3d4d11de --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/netherite_scrap.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:sand_netherite" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/saltpeter.json b/src/generated/resources/data/forge/tags/items/dusts/saltpeter.json new file mode 100644 index 00000000..5313e4e2 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/saltpeter.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:saltpeter" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/sulfur.json b/src/generated/resources/data/forge/tags/items/dusts/sulfur.json new file mode 100644 index 00000000..092ad725 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/sulfur.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:sulfur" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/hellforged.json b/src/generated/resources/data/forge/tags/items/ingots/hellforged.json new file mode 100644 index 00000000..d71afc0c --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/hellforged.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bloodmagic:ingot_hellforged" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ores/copper.json b/src/generated/resources/data/forge/tags/items/ores/copper.json new file mode 100644 index 00000000..5e8aecc9 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ores/copper.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ores/lead.json b/src/generated/resources/data/forge/tags/items/ores/lead.json new file mode 100644 index 00000000..5e8aecc9 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ores/lead.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ores/osmium.json b/src/generated/resources/data/forge/tags/items/ores/osmium.json new file mode 100644 index 00000000..5e8aecc9 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ores/osmium.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ores/silver.json b/src/generated/resources/data/forge/tags/items/ores/silver.json new file mode 100644 index 00000000..5e8aecc9 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ores/silver.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ores/tin.json b/src/generated/resources/data/forge/tags/items/ores/tin.json new file mode 100644 index 00000000..5e8aecc9 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ores/tin.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mushroom_hyphae.json b/src/generated/resources/data/minecraft/tags/blocks/mushroom_hyphae.json new file mode 100644 index 00000000..f8f96ad1 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/mushroom_hyphae.json @@ -0,0 +1,14 @@ +{ + "replace": false, + "values": [ + "minecraft:brown_mushroom_block", + "minecraft:red_mushroom_block", + "minecraft:crimson_hyphae", + "minecraft:warped_hyphae", + "minecraft:stripped_crimson_hyphae", + "minecraft:stripped_warped_hyphae", + "minecraft:nether_wart_block", + "minecraft:warped_wart_block", + "minecraft:shroomlight" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mushroom_stem.json b/src/generated/resources/data/minecraft/tags/blocks/mushroom_stem.json new file mode 100644 index 00000000..8055c89d --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/mushroom_stem.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:mushroom_stem", + "minecraft:crimson_stem", + "minecraft:warped_stem" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/walls.json b/src/generated/resources/data/minecraft/tags/blocks/walls.json new file mode 100644 index 00000000..a79e9654 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/walls.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "bloodmagic:dungeon_brick_wall", + "bloodmagic:dungeon_polished_wall" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/mushroom_hyphae.json b/src/generated/resources/data/minecraft/tags/items/mushroom_hyphae.json new file mode 100644 index 00000000..f8f96ad1 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/mushroom_hyphae.json @@ -0,0 +1,14 @@ +{ + "replace": false, + "values": [ + "minecraft:brown_mushroom_block", + "minecraft:red_mushroom_block", + "minecraft:crimson_hyphae", + "minecraft:warped_hyphae", + "minecraft:stripped_crimson_hyphae", + "minecraft:stripped_warped_hyphae", + "minecraft:nether_wart_block", + "minecraft:warped_wart_block", + "minecraft:shroomlight" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/mushroom_stem.json b/src/generated/resources/data/minecraft/tags/items/mushroom_stem.json new file mode 100644 index 00000000..8055c89d --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/mushroom_stem.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:mushroom_stem", + "minecraft:crimson_stem", + "minecraft:warped_stem" + ] +} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/BloodMagic.java b/src/main/java/WayofTime/bloodmagic/BloodMagic.java deleted file mode 100644 index 776ab881..00000000 --- a/src/main/java/WayofTime/bloodmagic/BloodMagic.java +++ /dev/null @@ -1,175 +0,0 @@ -package WayofTime.bloodmagic; - -import java.io.File; -import java.util.Map; - -import WayofTime.bloodmagic.meteor.MeteorConfigHandler; -import lombok.Getter; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.launchwrapper.Launch; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLInterModComms; -import net.minecraftforge.fml.common.event.FMLModIdMappingEvent; -import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.event.FMLServerStartingEvent; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.LogHelper; -import WayofTime.bloodmagic.client.gui.GuiHandler; -import WayofTime.bloodmagic.command.CommandBloodMagic; -import WayofTime.bloodmagic.compat.ICompatibility; -import WayofTime.bloodmagic.compat.minecraft.ICrossVersionProxy; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.proxy.CommonProxy; -import WayofTime.bloodmagic.registry.ModArmourTrackers; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModCompatibility; -import WayofTime.bloodmagic.registry.ModCorruptionBlocks; -import WayofTime.bloodmagic.registry.ModEntities; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.registry.ModRecipes; -import WayofTime.bloodmagic.registry.ModRituals; -import WayofTime.bloodmagic.registry.ModTranquilityHandlers; -import WayofTime.bloodmagic.structures.ModDungeons; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.handler.IMCHandler; - -import com.google.common.collect.ImmutableMap; - -@Mod(modid = Constants.Mod.MODID, name = Constants.Mod.NAME, version = Constants.Mod.VERSION, dependencies = Constants.Mod.DEPEND, guiFactory = "WayofTime.bloodmagic.client.gui.config.ConfigGuiFactory") -@Getter -public class BloodMagic -{ - @SidedProxy(serverSide = "WayofTime.bloodmagic.proxy.CommonProxy", clientSide = "WayofTime.bloodmagic.proxy.ClientProxy") - public static CommonProxy proxy; - - @Mod.Instance(Constants.Mod.MODID) - public static BloodMagic instance; - - public static CreativeTabs tabBloodMagic = new CreativeTabs(Constants.Mod.MODID + ".creativeTab") - { - @Override - public Item getTabIconItem() - { - return ModItems.BLOOD_ORB; - } - }; - - public static CreativeTabs tabUpgradeTome = new CreativeTabs(Constants.Mod.MODID + ".creativeTabTome") - { - @Override - public Item getTabIconItem() - { - return ModItems.UPGRADE_TOME; - } - - @Override - public boolean hasSearchBar() - { - return true; - } - }; - - @Getter - private static boolean isDev = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); - - @Getter - private static ICrossVersionProxy crossVersionProxy; - private static final Map PROXY_MAP = ImmutableMap.of("1.9.4", "WayofTime.bloodmagic.compat.minecraft.CrossVersionProxy19", "1.10", "WayofTime.bloodmagic.compat.minecraft.CrossVersionProxy110", "1.10.2", "WayofTime.bloodmagic.compat.minecraft.CrossVersionProxy110"); - - static - { - try - { - String mcVersion = (String) Loader.class.getDeclaredField("MC_VERSION").get(null); - - if (!PROXY_MAP.containsKey(mcVersion)) - throw new IllegalStateException("Blood Magic couldn't find a cross version proxy!"); - - Class proxyClass = Class.forName(PROXY_MAP.get(mcVersion)); - crossVersionProxy = (ICrossVersionProxy) proxyClass.newInstance(); - } - catch (Exception e) - { - throw new IllegalArgumentException("Blood Magic could not find a cross version proxy!", e); - } - - tabUpgradeTome.setNoTitle().setBackgroundImageName("upgrade_tomes.png"); - - FluidRegistry.enableUniversalBucket(); - } - - private LogHelper logger = new LogHelper(Constants.Mod.MODID); - private File configDir; - - @Mod.EventHandler - public void preInit(FMLPreInitializationEvent event) - { - configDir = new File(event.getModConfigurationDirectory(), "BloodMagic"); - ConfigHandler.init(new File(getConfigDir(), "BloodMagic.cfg")); - - ModBlocks.init(); - ModItems.init(); - ModPotions.init(); - ModEntities.init(); - ModCompatibility.registerModCompat(); - ModCompatibility.loadCompat(ICompatibility.InitializationPhase.PRE_INIT); - ModTranquilityHandlers.init(); - ModDungeons.init(); - - Utils.registerHandlers(event.getAsmData().getAll(Handler.class.getCanonicalName())); - proxy.preInit(); - } - - @Mod.EventHandler - public void init(FMLInitializationEvent event) - { - BloodMagicPacketHandler.init(); - - ModRecipes.init(); - ModRituals.initRituals(); - ModRituals.initImperfectRituals(); - MeteorConfigHandler.init(new File(configDir, "meteors")); - ModArmourTrackers.init(); - ModCompatibility.loadCompat(ICompatibility.InitializationPhase.INIT); - NetworkRegistry.INSTANCE.registerGuiHandler(BloodMagic.instance, new GuiHandler()); - ModCorruptionBlocks.init(); - - proxy.init(); - } - - @Mod.EventHandler - public void postInit(FMLPostInitializationEvent event) - { - ModRecipes.addCompressionHandlers(); - ModCompatibility.loadCompat(ICompatibility.InitializationPhase.POST_INIT); - - proxy.postInit(); - } - - @Mod.EventHandler - public void modMapping(FMLModIdMappingEvent event) - { - ModCompatibility.loadCompat(ICompatibility.InitializationPhase.MAPPING); - } - - @Mod.EventHandler - public void serverStarting(FMLServerStartingEvent event) - { - event.registerServerCommand(new CommandBloodMagic()); - } - - @Mod.EventHandler - public void onIMCRecieved(FMLInterModComms.IMCEvent event) - { - IMCHandler.handleIMC(event); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ConfigHandler.java b/src/main/java/WayofTime/bloodmagic/ConfigHandler.java deleted file mode 100644 index 810ddcae..00000000 --- a/src/main/java/WayofTime/bloodmagic/ConfigHandler.java +++ /dev/null @@ -1,385 +0,0 @@ -package WayofTime.bloodmagic; - -import java.io.*; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import WayofTime.bloodmagic.meteor.MeteorConfigHandler; -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.common.config.Property; -import net.minecraftforge.fml.client.event.ConfigChangedEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.util.Utils; - -@Handler -public class ConfigHandler -{ - @Getter - private static Configuration config; - - // Teleposer - public static String[] teleposerBlacklisting; - public static ArrayList teleposerBlacklist = new ArrayList(); - public static List teleposerBlacklistEntity; - - // Transposition Sigil - public static String[] transpositionBlacklisting; - public static ArrayList transpositionBlacklist = new ArrayList(); - - // Item/Block Disabling - public static List itemBlacklist; - public static List blockBlacklist; - - // Well of Suffering Blacklist - public static List wellOfSufferingBlacklist; - - // Blood Altar Sacrificial Values - public static String[] entitySacrificeValuesList; - public static Map entitySacrificeValues = new HashMap(); - - // Rituals - public static boolean ritualAnimalGrowth; - public static boolean ritualContainment; - public static boolean ritualCrushing; - public static boolean ritualExpulsion; - public static boolean ritualFeatheredKnife; - public static boolean ritualFullStomach; - public static boolean ritualGreenGrove; - public static boolean ritualHarvest; - public static boolean ritualInterdiction; - public static boolean ritualJumping; - public static boolean ritualLava; - public static boolean ritualMagnetic; - public static boolean ritualRegeneration; - public static boolean ritualSpeed; - public static boolean ritualSuppression; - public static boolean ritualWater; - public static boolean ritualWellOfSuffering; - public static boolean ritualZephyr; - public static boolean ritualUpgradeRemove; - public static boolean ritualArmourEvolve; - public static boolean ritualForsakenSoul; - public static boolean ritualCrystalHarvest; - - public static boolean cobblestoneRitual; - public static boolean placerRitual; - public static boolean fellingRitual; - public static boolean pumpRitual; - public static boolean altarBuilderRitual; - public static boolean portalRitual; - public static boolean meteorRitual; - public static boolean downgradeRitual; - - // Imperfect Rituals - public static boolean imperfectRitualNight; - public static boolean imperfectRitualRain; - public static boolean imperfectRitualResistance; - public static boolean imperfectRitualZombie; - - // Potion ID's - public static int customPotionDrowningID; - public static int customPotionBoostID; - public static int customPotionProjProtID; - public static int customPotionInhibitID; - public static int customPotionFlightID; - public static int customPotionReciprocationID; - public static int customPotionFlameCloakID; - public static int customPotionIceCloakID; - public static int customPotionHeavyHeartID; - public static int customPotionFireFuseID; - public static int customPotionPlanarBindingID; - public static int customPotionSoulFrayID; - public static int customPotionSoulHardenID; - public static int customPotionDeafID; - public static int customPotionFeatherFallID; - public static int customPotionDemonCloakID; - public static int customPotionAmphibianID; - - // Potion toggles - public static boolean customPotionDrowningEnabled; - public static boolean customPotionBoostEnabled; - public static boolean customPotionProjProtEnabled; - public static boolean customPotionInhibitEnabled; - public static boolean customPotionFlightEnabled; - public static boolean customPotionReciprocationEnabled; - public static boolean customPotionFlameCloakEnabled; - public static boolean customPotionIceCloakEnabled; - public static boolean customPotionHeavyHeartEnabled; - public static boolean customPotionFireFuseEnabled; - public static boolean customPotionPlanarBindingEnabled; - public static boolean customPotionSoulFrayEnabled; - public static boolean customPotionSoulHardenEnabled; - public static boolean customPotionDeafEnabled; - public static boolean customPotionFeatherFallEnabled; - public static boolean customPotionDemonCloakEnabled; - public static boolean customPotionAmphibianEnabled; - public static boolean vanillaPotionRegenerationEnabled; - public static boolean vanillaPotionNightVisionEnabled; - public static boolean vanillaPotionFireResistEnabled; - public static boolean vanillaPotionWaterBreathingEnabled; - public static boolean vanillaPotionSpeedEnabled; - public static boolean vanillaPotionHealthEnabled; - public static boolean vanillaPotionPoisonEnabled; - public static boolean vanillaPotionBlindnessEnabled; - public static boolean vanillaPotionWeaknessEnabled; - public static boolean vanillaPotionStrengthEnabled; - public static boolean vanillaPotionJumpBoostEnabled; - public static boolean vanillaPotionSlownessEnabled; - public static boolean vanillaPotionMiningEnabled; - public static boolean vanillaPotionInvisibilityEnabled; - public static boolean vanillaPotionResistanceEnabled; - public static boolean vanillaPotionSaturationEnabled; - public static boolean vanillaPotionHealthBoostEnabled; - public static boolean vanillaPotionAbsorptionEnabled; - - // General - public static int sacrificialPackConversion; - public static int sacrificialDaggerDamage; - public static int sacrificialDaggerConversion; - - // Client - public static boolean alwaysRenderRoutingLines; - public static boolean invisibleSpectralBlocks; - public static boolean sigilHoldingSkipsEmptySlots; - - // Compat - public static int wailaAltarDisplayMode; - public static boolean thaumcraftGogglesUpgrade; - public static boolean ignoreCompressionSpamAddedByCompression; - - public static void init(File file) - { - config = new Configuration(file); - syncConfig(); - } - - public static void syncConfig() - { - boolean configVersionChanged = false; - - String category; - - category = "Version"; - Property prop = config.get(category, "Config Version", Constants.Mod.VERSION); - if (!prop.getString().equals(Constants.Mod.VERSION)) - { - configVersionChanged = true; - prop.setValue(Constants.Mod.VERSION); - } - - category = "Item/Block Blacklisting"; - config.addCustomCategoryComment(category, "Allows disabling of specific Blocks/Items.\nNote that using this may result in crashes. Use is not supported."); - config.setCategoryRequiresMcRestart(category, true); - itemBlacklist = Arrays.asList(config.getStringList("itemBlacklist", category, new String[] {}, "Items to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); - blockBlacklist = Arrays.asList(config.getStringList("blockBlacklist", category, new String[] {}, "Blocks to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); - - category = "Teleposer Blacklist"; - config.addCustomCategoryComment(category, "Block blacklisting"); - teleposerBlacklisting = config.getStringList("teleposerBlacklist", category, new String[] { "minecraft:bedrock", "minecraft:mob_spawner" }, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); - buildBlacklist(teleposerBlacklisting, teleposerBlacklist); - teleposerBlacklistEntity = Arrays.asList(config.getStringList("teleposerBlacklistEntity", category, new String[] {}, "Entity class names listed here will not be able to be teleposed.")); - - category = "Transposition Sigil Blacklist"; - config.addCustomCategoryComment(category, "Block blacklisting"); - transpositionBlacklisting = config.getStringList("transpositionBlacklist", category, new String[] { "minecraft:bedrock", "minecraft:mob_spawner" }, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); - buildBlacklist(transpositionBlacklisting, transpositionBlacklist); - - category = "Well of Suffering Blacklist"; - config.addCustomCategoryComment(category, "Entity blacklisting from WoS"); - wellOfSufferingBlacklist = Arrays.asList(config.getStringList("wellOfSufferingBlacklist", category, new String[] { "EntityArmorStand" }, "Use the class name of the Entity to blacklist it from usage.\nIE: EntityWolf, EntityWitch, etc")); - - category = "Blood Altar Sacrificial Values"; - config.addCustomCategoryComment(category, "Entity Sacrificial Value Settings"); - entitySacrificeValuesList = config.getStringList("entitySacrificeLP:HPValues", category, new String[] { "EntityVillager;100", "EntitySlime;15", "EntityEnderman;10", "EntityCow;100", "EntityChicken;100", "EntityHorse;100", "EntitySheep;100", "EntityWolf;100", "EntityOcelot;100", "EntityPig;100", "EntityRabbit;100", "EntityArmorStand;0" }, "Used to edit the amount of LP gained per HP sacrificed for the given entity.\nSetting an entity to 0 effectively blacklists it.\nIf a mod modifies an entity via the API, it will take precedence over this config.\nSyntax: EntityClassName;LPPerHP"); - buildEntitySacrificeValues(); - - category = "Potions"; - config.addCustomCategoryComment(category, "Potion settings"); - config.addCustomCategoryComment(category + ".id", "Potion ID settings"); - customPotionDrowningID = config.getInt("customPotionDrowningID", category + ".id", 100, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Drowning potion"); - customPotionBoostID = config.getInt("customPotionBoostID", category + ".id", 101, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Boost potion"); - customPotionProjProtID = config.getInt("customPotionProjProtID", category + ".id", 102, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Projectile Protection potion"); - customPotionInhibitID = config.getInt("customPotionInhibitID", category + ".id", 103, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Inhibit potion"); - customPotionFlightID = config.getInt("customPotionFlightID", category + ".id", 104, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Flight potion"); - customPotionReciprocationID = config.getInt("customPotionReciprocationID", category + ".id", 105, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Reciprocation potion"); - customPotionFlameCloakID = config.getInt("customPotionFlameCloakID", category + ".id", 106, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Flame Cloak potion"); - customPotionIceCloakID = config.getInt("customPotionIceCloakID", category + ".id", 107, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Ice Cloak potion"); - customPotionHeavyHeartID = config.getInt("customPotionHeavyHeartID", category + ".id", 108, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Heavy Heart potion"); - customPotionFireFuseID = config.getInt("customPotionFireFuseID", category + ".id", 109, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Fire Fuse potion"); - customPotionPlanarBindingID = config.getInt("customPotionPlanarBindingID", category + ".id", 110, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Planar Binding potion"); - customPotionSoulFrayID = config.getInt("customPotionSoulFrayID", category + ".id", 111, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Soul Fray potion"); - customPotionSoulHardenID = config.getInt("customPotionSoulHardenID", category + ".id", 112, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Soul Harden potion"); - customPotionDeafID = config.getInt("customPotionDeafID", category + ".id", 113, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Deaf potion"); - customPotionFeatherFallID = config.getInt("customPotionFeatherFallID", category + ".id", 114, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Feather Fall potion"); - customPotionDemonCloakID = config.getInt("customPotionDemonCloakID", category + ".id", 115, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Demon Cloak potion"); - customPotionAmphibianID = config.getInt("customPotionAmphibianID", category + ".id", 116, 20, Constants.Misc.POTION_ARRAY_SIZE, "ID of the Amphibian potion"); - - config.addCustomCategoryComment(category + ".toggle", "Toggle potions available in Alchemy"); - customPotionDrowningEnabled = config.getBoolean("customPotionDrowningEnabled", category + ".toggle", true, "Enables the Drowning potion in Alchemy"); - customPotionBoostEnabled = config.getBoolean("customPotionBoostEnabled", category + ".toggle", true, "Enables the Boost potion in Alchemy"); - customPotionProjProtEnabled = config.getBoolean("customPotionProjProtEnabled", category + ".toggle", true, "Enables the Projectile Protection potion in Alchemy"); - customPotionInhibitEnabled = config.getBoolean("customPotionInhibitEnabled", category + ".toggle", true, "Enables the Inhibit potion in Alchemy"); - customPotionFlightEnabled = config.getBoolean("customPotionFlightEnabled", category + ".toggle", true, "Enables the Flight potion in Alchemy"); - customPotionReciprocationEnabled = config.getBoolean("customPotionReciprocationEnabled", category + ".toggle", true, "Enables the Reciprocation potion in Alchemy"); - customPotionFlameCloakEnabled = config.getBoolean("customPotionFlameCloakEnabled", category + ".toggle", true, "Enables the Flame Cloak potion in Alchemy"); - customPotionIceCloakEnabled = config.getBoolean("customPotionIceCloakEnabled", category + ".toggle", true, "Enables the Ice Cloak potion in Alchemy"); - customPotionHeavyHeartEnabled = config.getBoolean("customPotionHeavyHeartEnabled", category + ".toggle", true, "Enables the Heavy Heart potion in Alchemy"); - customPotionFireFuseEnabled = config.getBoolean("customPotionFireFuseEnabled", category + ".toggle", true, "Enables the Fire Fuse potion in Alchemy"); - customPotionPlanarBindingEnabled = config.getBoolean("customPotionPlanarBindingEnabled", category + ".toggle", true, "Enables the Planar Binding potion in Alchemy"); - customPotionSoulFrayEnabled = config.getBoolean("customPotionSoulFrayEnabled", category + ".toggle", true, "Enables the Soul Fray potion in Alchemy"); - customPotionSoulHardenEnabled = config.getBoolean("customPotionSoulHardenEnabled", category + ".toggle", true, "Enables the Soul Harden potion in Alchemy"); - customPotionDeafEnabled = config.getBoolean("customPotionDeafEnabled", category + ".toggle", true, "Enables the Deaf potion in Alchemy"); - customPotionFeatherFallEnabled = config.getBoolean("customPotionFeatherFallEnabled", category + ".toggle", true, "Enables the Feather Fall potion in Alchemy"); - customPotionDemonCloakEnabled = config.getBoolean("customPotionDemonCloakEnabled", category + ".toggle", true, "Enables the Demon Cloak potion in Alchemy"); - customPotionAmphibianEnabled = config.getBoolean("customPotionAmphibianEnabled", category + ".toggle", true, "Enables the Amphibian potion in Alchemy"); - vanillaPotionAbsorptionEnabled = config.getBoolean("vanillaPotionAbsorptionEnabled", category + ".toggle", true, "Enables the Absorption potion in Alchemy"); - vanillaPotionBlindnessEnabled = config.getBoolean("vanillaPotionBlindnessEnabled", category + ".toggle", true, "Enables the Blindness potion in Alchemy"); - vanillaPotionFireResistEnabled = config.getBoolean("vanillaPotionFireResistEnabled", category + ".toggle", true, "Enables the Fire Resistance potion in Alchemy"); - vanillaPotionHealthBoostEnabled = config.getBoolean("vanillaPotionHealthBoostEnabled", category + ".toggle", true, "Enables the Health Boost potion in Alchemy"); - vanillaPotionHealthEnabled = config.getBoolean("vanillaPotionHealthEnabled", category + ".toggle", true, "Enables the Instant Health potion in Alchemy"); - vanillaPotionInvisibilityEnabled = config.getBoolean("vanillaPotionInvisibilityEnabled", category + ".toggle", true, "Enables the Invisibility potion in Alchemy"); - vanillaPotionJumpBoostEnabled = config.getBoolean("vanillaPotionJumpBoostEnabled", category + ".toggle", true, "Enables the Jump Boost potion in Alchemy"); - vanillaPotionMiningEnabled = config.getBoolean("vanillaPotionMiningEnabled", category + ".toggle", true, "Enables the Mining potion in Alchemy"); - vanillaPotionPoisonEnabled = config.getBoolean("vanillaPotionPoisonEnabled", category + ".toggle", true, "Enables the Poison potion in Alchemy"); - vanillaPotionRegenerationEnabled = config.getBoolean("vanillaPotionRegenerationEnabled", category + ".toggle", true, "Enables the Regeneration potion in Alchemy"); - vanillaPotionNightVisionEnabled = config.getBoolean("vanillaPotionNightVisionEnabled", category + ".toggle", true, "Enables the Night Vision potion in Alchemy"); - vanillaPotionResistanceEnabled = config.getBoolean("vanillaPotionResistanceEnabled", category + ".toggle", true, "Enables the Resistance potion in Alchemy"); - vanillaPotionSaturationEnabled = config.getBoolean("vanillaPotionSaturationEnabled", category + ".toggle", true, "Enables the Saturation potion in Alchemy"); - vanillaPotionSlownessEnabled = config.getBoolean("vanillaPotionSlownessEnabled", category + ".toggle", true, "Enables the Slowness potion in Alchemy"); - vanillaPotionSpeedEnabled = config.getBoolean("vanillaPotionSpeedEnabled", category + ".toggle", true, "Enables the Speed potion in Alchemy"); - vanillaPotionStrengthEnabled = config.getBoolean("vanillaPotionStrengthEnabled", category + ".toggle", true, "Enables the Strength potion in Alchemy"); - vanillaPotionWaterBreathingEnabled = config.getBoolean("vanillaPotionWaterBreathingEnabled", category + ".toggle", true, "Enables the Water Breathing potion in Alchemy"); - vanillaPotionWeaknessEnabled = config.getBoolean("vanillaPotionWeaknessEnabled", category + ".toggle", true, "Enables the Weakness potion in Alchemy"); - - category = "Rituals"; - config.addCustomCategoryComment(category, "Ritual toggling"); - config.setCategoryRequiresMcRestart(category, true); - ritualAnimalGrowth = config.get(category, "ritualAnimalGrowth", true).getBoolean(); - ritualContainment = config.get(category, "ritualContainment", true).getBoolean(); - ritualCrushing = config.get(category, "ritualCrushing", true).getBoolean(); - ritualExpulsion = config.get(category, "ritualExpulsion", true).getBoolean(); - ritualFeatheredKnife = config.get(category, "ritualFeatheredKnife", true).getBoolean(); - ritualFullStomach = config.get(category, "ritualFullStomach", true).getBoolean(); - ritualGreenGrove = config.get(category, "ritualGreenGrove", true).getBoolean(); - ritualHarvest = config.get(category, "ritualHarvest", true).getBoolean(); - ritualInterdiction = config.get(category, "ritualInterdiction", true).getBoolean(); - ritualJumping = config.get(category, "ritualJumping", true).getBoolean(); - ritualLava = config.get(category, "ritualLava", true).getBoolean(); - ritualMagnetic = config.get(category, "ritualMagnetic", true).getBoolean(); - ritualRegeneration = config.get(category, "ritualRegeneration", true).getBoolean(); - ritualSpeed = config.get(category, "ritualSpeed", true).getBoolean(); - ritualSuppression = config.get(category, "ritualSuppression", true).getBoolean(); - ritualWater = config.get(category, "ritualWater", true).getBoolean(); - ritualWellOfSuffering = config.get(category, "ritualWellOfSuffering", true).getBoolean(); - ritualZephyr = config.get(category, "ritualZephyr", true).getBoolean(); - ritualUpgradeRemove = config.get(category, "ritualRemove", true).getBoolean(); - ritualArmourEvolve = config.get(category, "ritualArmourEvolve", true).getBoolean(); - ritualForsakenSoul = config.get(category, "ritualForsakenSoul", true).getBoolean(); - ritualCrystalHarvest = config.get(category, "ritualCrystalHarvest", true).getBoolean(); - - cobblestoneRitual = config.get(category, "ritualCobblestone", true).getBoolean(); - placerRitual = config.get(category, "ritualPlacer", true).getBoolean(); - fellingRitual = config.get(category, "ritualFelling", true).getBoolean(); - pumpRitual = config.get(category, "ritualPump", true).getBoolean(); - altarBuilderRitual = config.get(category, "ritualAltarBuilder", true).getBoolean(); - portalRitual = config.get(category, "ritualPortal", true).getBoolean(); - meteorRitual = config.get(category, "ritualMeteor", true).getBoolean(); - downgradeRitual = config.get(category, "ritualDowngrade", true).getBoolean(); - - category = "Rituals.Imperfect"; - imperfectRitualNight = config.get(category, "imperfectRitualNight", true).getBoolean(); - imperfectRitualRain = config.get(category, "imperfectRitualRain", true).getBoolean(); - imperfectRitualResistance = config.get(category, "imperfectRitualResistance", true).getBoolean(); - imperfectRitualZombie = config.get(category, "imperfectRitualZombie", true).getBoolean(); - - category = "General"; - config.addCustomCategoryComment(category, "General settings"); - BloodMagicAPI.setLoggingEnabled(config.getBoolean("enableLogging", category, true, "Allows logging information to the console. Fatal errors will bypass this")); - sacrificialPackConversion = config.getInt("sacrificialPackConversion", category, 20, 0, 100, "Base multiplier for the Coat of Arms. DamageDealt * sacrificialPackConversion"); - sacrificialDaggerDamage = config.getInt("sacrificialDaggerDamage", category, 2, 0, 10000, "Damage done from using the Sacrificial Dagger"); - sacrificialDaggerConversion = config.getInt("sacrificialDaggerConversion", category, 100, 0, 10000, "Amount of LP received per damage point (not heart!)"); - - category = "Client"; - config.addCustomCategoryComment(category, "Client only settings"); - alwaysRenderRoutingLines = config.getBoolean("alwaysRenderRoutingLines", category, false, "Always renders the beams between routing nodes. If false, only renders while a Node Router is being held."); - invisibleSpectralBlocks = config.get(category, "invisibleSpectralBlocks", true, "Spectral Blocks (Used by the Suppression Sigil to store fluids) will not render at all. If false, a see through texture will render. [default: true]").setRequiresMcRestart(true).getBoolean(); - sigilHoldingSkipsEmptySlots = config.getBoolean("sigilHoldingSkipsEmptySlots", category, false, "The Sigil of Holding will skip empty sigil slots if set to true."); - - category = "Compatibility"; - config.addCustomCategoryComment(category, "Compatibility settings"); - wailaAltarDisplayMode = config.getInt("wailaAltarDisplayMode", category + ".waila", 1, 0, 2, "The mode for the Waila display on Blood Altars.\n0 - Always display information\n1 - Only display when Divination/Seer sigil is in hand.\n2 - Only display when Divination/Seer sigil is in inventory"); - thaumcraftGogglesUpgrade = config.getBoolean("thaumcraftGogglesUpgrade", category + ".thaumcraft", true, "Allows the Living Helmet to be upgraded with Goggles of Revealing in an Anvil."); - ignoreCompressionSpamAddedByCompression = config.getBoolean("ignoreCompressionSpamAddedByCompression", category + ".compression", true, "Compression decided to add a storage recipe for every item and block in the game. This will make the Sigil of Compression ignore those recipes so your game will actually load in a decent amount of time."); - - category = "Meteors"; - config.addCustomCategoryComment(category, "Meteor settings"); - - config.save(); - } - - private static void buildBlacklist(String[] blacklisting, List blockBlacklist) - { - blockBlacklist.clear(); - - for (String blockSet : blacklisting) - { - String[] blockData = blockSet.split(":"); - - Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockData[0], blockData[1])); - int meta = 0; - - if (blockData.length == 3) - { - // Check if it's an int, if so, parse it. If not, set meta to 0 - // to avoid crashing. - if (Utils.isInteger(blockData[2])) - meta = Integer.parseInt(blockData[2]); - else if (blockData[2].equals("*")) - meta = OreDictionary.WILDCARD_VALUE; - else - meta = 0; - } - - blockBlacklist.add(new BlockStack(block, meta)); - } - } - - private static void buildEntitySacrificeValues() - { - entitySacrificeValues.clear(); - - for (String entityData : entitySacrificeValuesList) - { - String[] split = entityData.split(";"); - - int amount = 500; - if (Utils.isInteger(split[1])) - amount = Integer.parseInt(split[1]); - - if (!entitySacrificeValues.containsKey(split[0])) - entitySacrificeValues.put(split[0], amount); - } - } - - @SubscribeEvent - public void onConfigChanged(ConfigChangedEvent event) - { - if (event.getModID().equals(Constants.Mod.MODID)) - { - syncConfig(); - MeteorConfigHandler.handleMeteors(false); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectAttractor.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectAttractor.java deleted file mode 100644 index 2196231a..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectAttractor.java +++ /dev/null @@ -1,496 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.EntityAITasks; -import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry; -import net.minecraft.entity.monster.EntityBlaze; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.monster.EntitySilverfish; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.pathfinding.Path; -import net.minecraft.pathfinding.PathFinder; -import net.minecraft.pathfinding.WalkNodeProcessor; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.fakePlayer.FakePlayerBM; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -import com.mojang.authlib.GameProfile; - -/** - * Credits for the initial code go to Crazy Pants of EIO. - */ -public class AlchemyArrayEffectAttractor extends AlchemyArrayEffect -{ - private FakePlayer target; - private Set tracking = new HashSet(); - - private int counter = 0; - private int maxMobsAttracted = 10000; - - private int cooldown = 50; - - public AlchemyArrayEffectAttractor(String key) - { - super(key); - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - if (tile.getWorld().isRemote) - { - return false; - } - - BlockPos pos = tile.getPos(); - counter++; - if (counter < 10) - { - Iterator itr = tracking.iterator(); - while (itr.hasNext()) - { - EntityLiving ent = itr.next(); - onEntityTick(pos, ent); - } - - return false; - } - - counter = 0; - - World world = tile.getWorld(); - - Set trackingThisTick = new HashSet(); - List entsInBounds = world.getEntitiesWithinAABB(EntityLiving.class, getBounds(pos)); - - for (EntityLiving ent : entsInBounds) - { - if (!ent.isDead)// && isMobInFilter(ent)) - { - double x = (pos.getX() + 0.5D - ent.posX); - double y = (pos.getY() + 1D - ent.posY); - double z = (pos.getZ() + 0.5D - ent.posZ); - double distance = Math.sqrt(x * x + y * y + z * z); - - if (distance < 2 && tracking.contains(ent)) - { - setEntityCooldown(pos, ent, cooldown); - removeAssignedAITask(pos, ent); - continue; - } - - if (!canEntityBeTracked(pos, ent)) - { -// System.out.println("Cooldown: " + getEntityCooldown(pos, ent)); - decrementEntityCooldown(pos, ent); - continue; - } - - if (tracking.contains(ent)) - { - trackingThisTick.add(ent); - onEntityTick(pos, ent); - } else if (tracking.size() < maxMobsAttracted && trackMob(pos, ent)) - { - trackingThisTick.add(ent); - onTracked(ent); - } - } - } - - for (EntityLiving e : tracking) - { - if (!trackingThisTick.contains(e)) - { - onUntracked(e); - } - } - tracking.clear(); - tracking = trackingThisTick; - - return false; - } - - public boolean canEntityBeTracked(BlockPos pos, EntityLiving entity) - { - return getEntityCooldown(pos, entity) <= 0; - } - - private String getPosKey(BlockPos pos) - { - return "BMAttractor:" + pos; - } - - public int getEntityCooldown(BlockPos pos, EntityLiving entity) - { - return entity.getEntityData().getInteger(getPosKey(pos)); - } - - public void setEntityCooldown(BlockPos pos, EntityLiving entity, int cooldown) - { - entity.getEntityData().setInteger(getPosKey(pos), cooldown); - } - - public void decrementEntityCooldown(BlockPos pos, EntityLiving entity) - { - int cooldown = getEntityCooldown(pos, entity); - if (cooldown > 0) - { - setEntityCooldown(pos, entity, cooldown - 1); - } - } - - public AxisAlignedBB getBounds(BlockPos pos) - { - return new AxisAlignedBB(pos).expand(getRange(), getRange(), getRange()); - } - - public float getRange() - { - return 10; - } - - private void onUntracked(EntityLiving e) - { - if (e instanceof EntityEnderman) - { - e.getEntityData().setBoolean("BM:tracked", false); - } - } - - private void onTracked(EntityLiving e) - { - if (e instanceof EntityEnderman) - { - e.getEntityData().setBoolean("BM:tracked", true); - } - } - - private void onEntityTick(BlockPos pos, EntityLiving ent) - { - if (ent instanceof EntitySlime) - { - ent.faceEntity(getTarget(ent.worldObj, pos), 10.0F, 20.0F); - } else if (ent instanceof EntitySilverfish) - { - if (counter < 10) - { - return; - } - EntitySilverfish sf = (EntitySilverfish) ent; - Path pathentity = getPathEntityToEntity(ent, getTarget(ent.worldObj, pos), getRange()); - sf.getNavigator().setPath(pathentity, sf.getAIMoveSpeed()); - } else if (ent instanceof EntityBlaze) - { - double x = (pos.getX() + 0.5D - ent.posX); - double y = (pos.getY() + 1D - ent.posY); - double z = (pos.getZ() + 0.5D - ent.posZ); - double distance = Math.sqrt(x * x + y * y + z * z); - if (distance > 1.25) - { - double speed = 0.01; - ent.motionX += x / distance * speed; - if (y > 0) - { - ent.motionY += (0.3 - ent.motionY) * 0.3; - } - ent.motionZ += z / distance * speed; - } - } else if (ent instanceof EntityPigZombie || ent instanceof EntitySpider) - { - forceMove(pos, ent); -// ent.setAttackTarget(target); - } else if (ent instanceof EntityEnderman) - { - ((EntityEnderman) ent).setAttackTarget(getTarget(ent.worldObj, pos)); - } - } - - private void forceMove(BlockPos pos, EntityLiving ent) - { - double x = (pos.getX() + 0.5D - ent.posX); - double y = (pos.getY() + 1D - ent.posY); - double z = (pos.getZ() + 0.5D - ent.posZ); - double distance = Math.sqrt(x * x + y * y + z * z); - if (distance > 2) - { - EntityMob mod = (EntityMob) ent; - mod.faceEntity(getTarget(ent.worldObj, pos), 180, 0); - mod.moveEntityWithHeading(0, 0.3f); - if (mod.posY < pos.getY()) - { - mod.setJumping(true); - } else - { - mod.setJumping(false); - } - } - } - - public Path getPathEntityToEntity(Entity entity, Entity targetEntity, float range) - { - int targX = MathHelper.floor_double(targetEntity.posX); - int targY = MathHelper.floor_double(targetEntity.posY + 1.0D); - int targZ = MathHelper.floor_double(targetEntity.posZ); - - PathFinder pf = new PathFinder(new WalkNodeProcessor()); - return pf.findPath(targetEntity.worldObj, (EntityLiving) entity, new BlockPos(targX, targY, targZ), range); - } - - private boolean trackMob(BlockPos pos, EntityLiving ent) - { - //TODO: Figure out if this crud is needed - if (useSetTarget(ent)) - { - ((EntityMob) ent).setAttackTarget(getTarget(ent.worldObj, pos)); - return true; - } else if (useSpecialCase(ent)) - { - return applySpecialCase(pos, ent); - } else - { - return attractUsingAITask(pos, ent); - } - } - - private boolean useSetTarget(EntityLiving ent) - { - return ent instanceof EntityPigZombie || ent instanceof EntitySpider || ent instanceof EntitySilverfish; - } - - public void removeAssignedAITask(BlockPos pos, EntityLiving ent) - { - Set entries = ent.tasks.taskEntries; - EntityAIBase remove = null; - for (EntityAITaskEntry entry : entries) - { - if (entry.action instanceof AttractTask) - { - AttractTask at = (AttractTask) entry.action; - if (at.coord.equals(pos)) - { - remove = entry.action; - } else - { - continue; - } - } - } - if (remove != null) - { - ent.tasks.removeTask(remove); - } - } - - private boolean attractUsingAITask(BlockPos pos, EntityLiving ent) - { - tracking.add(ent); - Set entries = ent.tasks.taskEntries; - // boolean hasTask = false; - EntityAIBase remove = null; - // boolean isTracked; - for (EntityAITaskEntry entry : entries) - { - if (entry.action instanceof AttractTask) - { - AttractTask at = (AttractTask) entry.action; - if (at.coord.equals(pos) || !at.continueExecuting()) - { - remove = entry.action; - } else - { - return false; - } - } - } - if (remove != null) - { - ent.tasks.removeTask(remove); - } - - cancelCurrentTasks(ent); - ent.tasks.addTask(0, new AttractTask(ent, getTarget(ent.worldObj, pos), pos)); - - return true; - } - - private void cancelCurrentTasks(EntityLiving ent) - { - Iterator iterator = ent.tasks.taskEntries.iterator(); - - List currentTasks = new ArrayList(); - while (iterator.hasNext()) - { - EntityAITaskEntry entityaitaskentry = iterator.next(); - if (entityaitaskentry != null) - { - if (entityaitaskentry.action instanceof AttractTask) - { - continue; - } - - currentTasks.add(entityaitaskentry); - } - } - // Only available way to stop current execution is to remove all current - // tasks, then re-add them - for (EntityAITaskEntry task : currentTasks) - { - ent.tasks.removeTask(task.action); - ent.tasks.addTask(task.priority, task.action); - } - } - - private boolean applySpecialCase(BlockPos pos, EntityLiving ent) - { - if (ent instanceof EntitySlime) - { - ent.faceEntity(getTarget(ent.worldObj, pos), 10.0F, 20.0F); -// ent.setAttackTarget(getTarget(ent.worldObj, pos)); - return true; - } else if (ent instanceof EntitySilverfish) - { - EntitySilverfish es = (EntitySilverfish) ent; - Path pathentity = getPathEntityToEntity(ent, getTarget(ent.worldObj, pos), getRange()); - es.getNavigator().setPath(pathentity, es.getAIMoveSpeed()); - return true; - } else if (ent instanceof EntityBlaze) - { - return true; - } - return false; - } - - private boolean useSpecialCase(EntityLiving ent) - { - return ent instanceof EntitySlime || ent instanceof EntitySilverfish || ent instanceof EntityBlaze; - } - - public FakePlayer getTarget(World world, BlockPos pos) - { - if (target == null) - { -// System.out.println("...Hi? " + pos); - target = new Target(world, pos); - } - - return target; - } - - private class Target extends FakePlayerBM - { - public Target(World world, BlockPos pos) - { - super(world, pos, new GameProfile(null, Constants.Mod.MODID + "ArrayAttractor" + ":" + pos)); - posY += 1; - } - } - - private static class AttractTask extends EntityAIBase - { - private EntityLiving mob; - private BlockPos coord; - private FakePlayer target; - private int updatesSincePathing; - - private boolean started = false; - - private AttractTask(EntityLiving mob, FakePlayer target, BlockPos coord) - { - this.mob = mob; - this.coord = coord; - this.target = target; - } - - @Override - public boolean shouldExecute() - { - return continueExecuting(); - } - - @Override - public void resetTask() - { - started = false; - updatesSincePathing = 0; - } - - @Override - public boolean continueExecuting() - { - boolean res = false; - //TODO: - TileEntity te = mob.worldObj.getTileEntity(coord); - if (te instanceof TileAlchemyArray) - { - res = true; - } - - return res; - } - - @Override - public boolean isInterruptible() - { - return true; - } - - @Override - public void updateTask() - { - if (!started || updatesSincePathing > 20) - { - started = true; - int speed = 1; - // mob.getNavigator().setAvoidsWater(false); - boolean res = mob.getNavigator().tryMoveToEntityLiving(target, speed); - if (!res) - { - mob.getNavigator().tryMoveToXYZ(target.posX, target.posY + 1, target.posZ, speed); - } - updatesSincePathing = 0; - } else - { - updatesSincePathing++; - } - } - - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectAttractor(key); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectBinding.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectBinding.java deleted file mode 100644 index 8ba2057a..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectBinding.java +++ /dev/null @@ -1,84 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffectCrafting; -import WayofTime.bloodmagic.client.render.alchemyArray.BindingAlchemyCircleRenderer; - -public class AlchemyArrayEffectBinding extends AlchemyArrayEffectCrafting -{ - public AlchemyArrayEffectBinding(String key, ItemStack outputStack) - { - super(key, outputStack, 200); - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - if (ticksActive >= 50 && ticksActive <= 250) - { - // TODO: Find a way to spawn lightning from only the server side - - // does not render when just spawned on server, not client. - this.spawnLightningOnCircle(tile.getWorld(), tile.getPos(), ticksActive); - } - - if (tile.getWorld().isRemote) - { - return false; - } - - if (ticksActive >= 300) - { - BlockPos pos = tile.getPos(); - - ItemStack output = outputStack.copy(); - EntityItem outputEntity = new EntityItem(tile.getWorld(), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, output); - - tile.getWorld().spawnEntityInWorld(outputEntity); - - return true; - } - - return false; - } - - public void spawnLightningOnCircle(World world, BlockPos pos, int ticksActive) - { - if (ticksActive % 50 == 0) - { - int circle = ticksActive / 50 - 1; - float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(circle, ticksActive); - float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(circle, ticksActive); - - double dispX = distance * Math.sin(angle); - double dispZ = -distance * Math.cos(angle); - - EntityLightningBolt lightning = new EntityLightningBolt(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ, true); - world.spawnEntityInWorld(lightning); - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - //EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - //EMPTY - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectBinding(key, outputStack); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectBounce.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectBounce.java deleted file mode 100644 index 3b42eed2..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectBounce.java +++ /dev/null @@ -1,62 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.iface.IAlchemyArray; - -public class AlchemyArrayEffectBounce extends AlchemyArrayEffect -{ - public AlchemyArrayEffectBounce(String key) - { - super(key); - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - return false; - } - - @Override - public void onEntityCollidedWithBlock(IAlchemyArray array, World world, BlockPos pos, IBlockState state, Entity entity) - { - if (entity.isSneaking()) - { - return; - } else if (entity.motionY < 0.0D) - { - entity.motionY = -entity.motionY; - - if (!(entity instanceof EntityLivingBase)) - { - entity.motionY *= 0.8D; - } - - entity.fallDistance = 0; - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectBounce(key); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectMovement.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectMovement.java deleted file mode 100644 index d1d981a6..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectMovement.java +++ /dev/null @@ -1,83 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.iface.IAlchemyArray; - -public class AlchemyArrayEffectMovement extends AlchemyArrayEffect -{ - public AlchemyArrayEffectMovement(String key) - { - super(key); - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - return false; - } - - @Override - public void onEntityCollidedWithBlock(IAlchemyArray array, World world, BlockPos pos, IBlockState state, Entity entity) - { - double motionY = 0.5; - double speed = 3; - EnumFacing direction = array.getRotation(); - - entity.motionY = motionY; - entity.fallDistance = 0; - - switch (direction) - { - case NORTH: - entity.motionX = 0; - entity.motionY = motionY; - entity.motionZ = -speed; - break; - - case SOUTH: - entity.motionX = 0; - entity.motionY = motionY; - entity.motionZ = speed; - break; - - case WEST: - entity.motionX = -speed; - entity.motionY = motionY; - entity.motionZ = 0; - break; - - case EAST: - entity.motionX = speed; - entity.motionY = motionY; - entity.motionZ = 0; - break; - default: - break; - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectMovement(key); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSigil.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSigil.java deleted file mode 100644 index 20d22c40..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSigil.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.iface.ISigil; - -public class AlchemyArrayEffectSigil extends AlchemyArrayEffect -{ - private final ISigil sigil; - - public AlchemyArrayEffectSigil(String key, ISigil sigil) - { - super(key); - this.sigil = sigil; - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - //TODO: Need particles. - if (sigil.hasArrayEffect()) - { - sigil.performArrayEffect(tile.getWorld(), tile.getPos()); - } - - return false; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectSigil(key, sigil); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSkeletonTurret.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSkeletonTurret.java deleted file mode 100644 index 00b695df..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSkeletonTurret.java +++ /dev/null @@ -1,227 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAITasks; -import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -import com.google.common.base.Predicate; - -/** - * Credits for the initial code go to Crazy Pants of EIO. - */ -public class AlchemyArrayEffectSkeletonTurret extends AlchemyArrayEffect -{ - private EntitySkeleton turret; - - public static Predicate checkSkeleton = new Predicate() - { - @Override - public boolean apply(EntityMob input) - { - return !(input instanceof EntitySkeleton); - } - }; - - public AlchemyArrayEffectSkeletonTurret(String key) - { - super(key); - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { -// if (tile.getWorld().isRemote) -// { -// return false; -// } - - BlockPos pos = tile.getPos(); - - if (turret != null && !turret.isDead) - { - double x = (pos.getX() + 0.5D - turret.posX); - double y = (pos.getY() + 1D - turret.posY); - double z = (pos.getZ() + 0.5D - turret.posZ); - double distance = Math.sqrt(x * x + y * y + z * z); - - if (distance < 2) - { -// turret.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 100, 100)); - return false; - } - } - - World world = tile.getWorld(); - - List skeletonsInRange = world.getEntitiesWithinAABB(EntitySkeleton.class, getBounds(pos)); - - for (EntitySkeleton entity : skeletonsInRange) - { - if (!entity.isDead)// && isMobInFilter(ent)) - { - modifyAITargetTasks(entity); - turret = entity; - break; - } - } - - return false; - } - - public AxisAlignedBB getBounds(BlockPos pos) - { - return new AxisAlignedBB(pos).expand(getRange(), getRange(), getRange()); - } - - public float getRange() - { - return 0; - } - -// private void onUntracked(EntityLiving e) -// { -// e.getEntityData().setBoolean("BM:tracked", false); -// } -// -// private void onTracked(EntityLiving e) -// { -// e.getEntityData().setBoolean("BM:tracked", true); -// } - - private boolean modifyAITargetTasks(EntitySkeleton entity) - { - cancelCurrentTargetTasks(entity); - -// entity.setCombatTask(); - entity.targetTasks.addTask(1, new EntityAINearestAttackableTarget(entity, EntityMob.class, 10, true, false, checkSkeleton)); - entity.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0); - entity.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1); - return true; - } - - private void cancelCurrentTargetTasks(EntityLiving entity) - { - Iterator iterator = entity.targetTasks.taskEntries.iterator(); - - List currentTasks = new ArrayList(); - while (iterator.hasNext()) - { - EntityAITaskEntry entityaitaskentry = iterator.next(); - if (entityaitaskentry != null)// && entityaitaskentry.action instanceof EntityAITarget) - { - currentTasks.add(entityaitaskentry); - } - } - - for (EntityAITaskEntry task : currentTasks) - { - entity.targetTasks.removeTask(task.action); - } - } - - private static class AttractTask extends EntityAIBase - { - private EntityLiving mob; - private BlockPos coord; - private FakePlayer target; - private int updatesSincePathing; - - private boolean started = false; - - private AttractTask(EntityLiving mob, FakePlayer target, BlockPos coord) - { - this.mob = mob; - this.coord = coord; - this.target = target; - } - - @Override - public boolean shouldExecute() - { - return continueExecuting(); - } - - @Override - public void resetTask() - { - started = false; - updatesSincePathing = 0; - } - - @Override - public boolean continueExecuting() - { - boolean res = false; - //TODO: - TileEntity te = mob.worldObj.getTileEntity(coord); - if (te instanceof TileAlchemyArray) - { - res = true; - } - - return res; - } - - @Override - public boolean isInterruptible() - { - return true; - } - - @Override - public void updateTask() - { - if (!started || updatesSincePathing > 20) - { - started = true; - int speed = 1; - // mob.getNavigator().setAvoidsWater(false); - boolean res = mob.getNavigator().tryMoveToEntityLiving(target, speed); - if (!res) - { - mob.getNavigator().tryMoveToXYZ(target.posX, target.posY + 1, target.posZ, speed); - } - updatesSincePathing = 0; - } else - { - updatesSincePathing++; - } - } - - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectSkeletonTurret(key); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectUpdraft.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectUpdraft.java deleted file mode 100644 index 6579a254..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectUpdraft.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.bloodmagic.alchemyArray; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.iface.IAlchemyArray; - -public class AlchemyArrayEffectUpdraft extends AlchemyArrayEffect -{ - public AlchemyArrayEffectUpdraft(String key) - { - super(key); - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - return false; - } - - @Override - public void onEntityCollidedWithBlock(IAlchemyArray array, World world, BlockPos pos, IBlockState state, Entity entity) - { - double motionY = 1.5; - - entity.fallDistance = 0; - - entity.motionY = motionY; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectUpdraft(key); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/package-info.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/package-info.java deleted file mode 100644 index 26146be9..00000000 --- a/src/main/java/WayofTime/bloodmagic/alchemyArray/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.alchemyArray; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java b/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java deleted file mode 100644 index bd4e8efa..00000000 --- a/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java +++ /dev/null @@ -1,880 +0,0 @@ -package WayofTime.bloodmagic.altar; - -import java.util.List; - -import lombok.Getter; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.capability.FluidTankPropertiesWrapper; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.IFluidTankProperties; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.AltarComponent; -import WayofTime.bloodmagic.api.altar.AltarUpgrade; -import WayofTime.bloodmagic.api.altar.EnumAltarComponent; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.altar.IAltarComponent; -import WayofTime.bloodmagic.api.event.AltarCraftedEvent; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.block.BlockBloodRune; -import WayofTime.bloodmagic.block.BlockLifeEssence; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.util.Utils; - -import com.google.common.base.Enums; -import com.google.common.base.Strings; - -public class BloodAltar implements IFluidHandler -{ - private TileAltar tileAltar; - private int internalCounter = 0; - - public boolean isActive; - protected FluidStack fluidOutput = new FluidStack(BlockLifeEssence.getLifeEssence(), 0); - protected FluidStack fluidInput = new FluidStack(BlockLifeEssence.getLifeEssence(), 0); - private EnumAltarTier altarTier = EnumAltarTier.ONE; - private AltarUpgrade upgrade; - private int capacity = Fluid.BUCKET_VOLUME * 10; - private FluidStack fluid = new FluidStack(BloodMagicAPI.getLifeEssence(), 0); - private int liquidRequired; // mB - private boolean canBeFilled; - private int consumptionRate; - private int drainRate; - private float consumptionMultiplier; - private float efficiencyMultiplier; - private float sacrificeEfficiencyMultiplier; - private float selfSacrificeEfficiencyMultiplier; - private float capacityMultiplier = 1; - private float orbCapacityMultiplier; - private float dislocationMultiplier; - private int accelerationUpgrades; - private boolean isUpgraded; - private boolean isResultBlock; - private int bufferCapacity = Fluid.BUCKET_VOLUME; - private int progress; - private int lockdownDuration; - private int demonBloodDuration; - - private int totalCharge = 0; //TODO save - private int chargingRate = 0; - private int chargingFrequency = 0; - private int maxCharge = 0; - - private int cooldownAfterCrafting = 60; - - private AltarRecipe recipe; - private ItemStack result; - - @Getter - private EnumAltarTier currentTierDisplayed = EnumAltarTier.ONE; - - public BloodAltar(TileAltar tileAltar) - { - this.tileAltar = tileAltar; - } - - static - { - EnumAltarTier.ONE.buildComponents(); - EnumAltarTier.TWO.buildComponents(); - EnumAltarTier.THREE.buildComponents(); - EnumAltarTier.FOUR.buildComponents(); - EnumAltarTier.FIVE.buildComponents(); - EnumAltarTier.SIX.buildComponents(); - } - - public static EnumAltarTier getAltarTier(World world, BlockPos pos) - { - for (int i = EnumAltarTier.MAXTIERS - 1; i >= 1; i--) - { - if (checkAltarIsValid(world, pos, i)) - { - return EnumAltarTier.values()[i]; - } - } - - return EnumAltarTier.ONE; - } - - public static boolean checkAltarIsValid(World world, BlockPos worldPos, int altarTier) - { - for (AltarComponent altarComponent : EnumAltarTier.values()[altarTier].getAltarComponents()) - { - BlockPos componentPos = worldPos.add(altarComponent.getOffset()); - BlockStack worldBlock = new BlockStack(world.getBlockState(componentPos).getBlock(), world.getBlockState(componentPos).getBlock().getMetaFromState(world.getBlockState(componentPos))); - - if (altarComponent.getComponent() != EnumAltarComponent.NOTAIR) - { - if (worldBlock.getBlock() instanceof IAltarComponent) - { - EnumAltarComponent component = ((IAltarComponent) worldBlock.getBlock()).getType(world, worldBlock.getState(), componentPos); - if (component == null || component != altarComponent.getComponent()) - return false; - } else if (worldBlock.getBlock() != Utils.getBlockForComponent(altarComponent.getComponent())) - { - return false; - } - } else - { - if (world.isAirBlock(componentPos)) - return false; - } - } - - return true; - } - - public static Pair getAltarMissingBlock(World world, BlockPos worldPos, int altarTier) - { - if (altarTier >= EnumAltarTier.MAXTIERS) - { - return null; - } - - for (AltarComponent altarComponent : EnumAltarTier.values()[altarTier].getAltarComponents()) - { - BlockPos componentPos = worldPos.add(altarComponent.getOffset()); - BlockStack worldBlock = new BlockStack(world.getBlockState(componentPos).getBlock(), world.getBlockState(componentPos).getBlock().getMetaFromState(world.getBlockState(componentPos))); - - if (altarComponent.getComponent() != EnumAltarComponent.NOTAIR) - { - if (worldBlock.getBlock() instanceof IAltarComponent) - { - EnumAltarComponent component = ((IAltarComponent) worldBlock.getBlock()).getType(world, worldBlock.getState(), componentPos); - if (component == null || component != altarComponent.getComponent()) - { - return Pair.of(componentPos, altarComponent.getComponent()); - } - } else if (worldBlock.getBlock() != Utils.getBlockForComponent(altarComponent.getComponent())) - { - return new ImmutablePair(componentPos, altarComponent.getComponent()); - } - } else - { - if (world.isAirBlock(componentPos)) - { - return Pair.of(componentPos, altarComponent.getComponent()); - } - } - } - - return null; - } - - public static AltarUpgrade getUpgrades(World world, BlockPos pos, EnumAltarTier altarTier) - { - if (world.isRemote) - { - return null; - } - - AltarUpgrade upgrades = new AltarUpgrade(); - List list = altarTier.getAltarComponents(); - - for (AltarComponent altarComponent : list) - { - BlockPos componentPos = pos.add(altarComponent.getOffset()); - - if (altarComponent.isUpgradeSlot()) - { - BlockStack worldBlock = new BlockStack(world.getBlockState(componentPos).getBlock(), world.getBlockState(componentPos).getBlock().getMetaFromState(world.getBlockState(componentPos))); - - if (worldBlock.getBlock() instanceof BlockBloodRune) - { - switch (((BlockBloodRune) worldBlock.getBlock()).getRuneEffect(worldBlock.getMeta())) - { - case 1: - upgrades.addSpeed(); - break; - - case 2: - upgrades.addEfficiency(); - break; - - case 3: - upgrades.addSacrifice(); - break; - - case 4: - upgrades.addSelfSacrifice(); - break; - - case 5: - upgrades.addDisplacement(); - break; - - case 6: - upgrades.addCapacity(); - break; - - case 7: - upgrades.addBetterCapacity(); - break; - - case 8: - upgrades.addOrbCapacity(); - break; - - case 9: - upgrades.addAcceleration(); - break; - - case 10: - upgrades.addCharging(); - break; - } - } - } - } - - return upgrades; - } - - public void readFromNBT(NBTTagCompound tagCompound) - { - if (!tagCompound.hasKey(Constants.NBT.EMPTY)) - { - FluidStack fluid = FluidStack.loadFluidStackFromNBT(tagCompound); - - if (fluid != null) - setMainFluid(fluid); - - FluidStack fluidOut = new FluidStack(BloodMagicAPI.getLifeEssence(), tagCompound.getInteger(Constants.NBT.OUTPUT_AMOUNT)); - setOutputFluid(fluidOut); - - FluidStack fluidIn = new FluidStack(BloodMagicAPI.getLifeEssence(), tagCompound.getInteger(Constants.NBT.INPUT_AMOUNT)); - setInputFluid(fluidIn); - } - - internalCounter = tagCompound.getInteger("internalCounter"); - altarTier = Enums.getIfPresent(EnumAltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_TIER)).or(EnumAltarTier.ONE); - isActive = tagCompound.getBoolean(Constants.NBT.ALTAR_ACTIVE); - liquidRequired = tagCompound.getInteger(Constants.NBT.ALTAR_LIQUID_REQ); - canBeFilled = tagCompound.getBoolean(Constants.NBT.ALTAR_FILLABLE); - isUpgraded = tagCompound.getBoolean(Constants.NBT.ALTAR_UPGRADED); - consumptionRate = tagCompound.getInteger(Constants.NBT.ALTAR_CONSUMPTION_RATE); - drainRate = tagCompound.getInteger(Constants.NBT.ALTAR_DRAIN_RATE); - consumptionMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER); - efficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER); - selfSacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER); - sacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER); - capacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER); - orbCapacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER); - dislocationMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER); - capacity = tagCompound.getInteger(Constants.NBT.ALTAR_CAPACITY); - bufferCapacity = tagCompound.getInteger(Constants.NBT.ALTAR_BUFFER_CAPACITY); - progress = tagCompound.getInteger(Constants.NBT.ALTAR_PROGRESS); - isResultBlock = tagCompound.getBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK); - lockdownDuration = tagCompound.getInteger(Constants.NBT.ALTAR_LOCKDOWN_DURATION); - accelerationUpgrades = tagCompound.getInteger(Constants.NBT.ALTAR_ACCELERATION_UPGRADES); - demonBloodDuration = tagCompound.getInteger(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION); - cooldownAfterCrafting = tagCompound.getInteger(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING); - chargingRate = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_RATE); - chargingFrequency = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY); - totalCharge = tagCompound.getInteger(Constants.NBT.ALTAR_TOTAL_CHARGE); - maxCharge = tagCompound.getInteger(Constants.NBT.ALTAR_MAX_CHARGE); - currentTierDisplayed = Enums.getIfPresent(EnumAltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED)).or(EnumAltarTier.ONE); - } - - public void writeToNBT(NBTTagCompound tagCompound) - { - - if (fluid != null) - fluid.writeToNBT(tagCompound); - else - tagCompound.setString(Constants.NBT.EMPTY, ""); - - if (fluidOutput != null) - tagCompound.setInteger(Constants.NBT.OUTPUT_AMOUNT, fluidOutput.amount); - - if (fluidInput != null) - tagCompound.setInteger(Constants.NBT.INPUT_AMOUNT, fluidInput.amount); - - tagCompound.setInteger("internalCounter", internalCounter); - tagCompound.setString(Constants.NBT.ALTAR_TIER, altarTier.name()); - tagCompound.setBoolean(Constants.NBT.ALTAR_ACTIVE, isActive); - tagCompound.setInteger(Constants.NBT.ALTAR_LIQUID_REQ, liquidRequired); - tagCompound.setBoolean(Constants.NBT.ALTAR_FILLABLE, canBeFilled); - tagCompound.setBoolean(Constants.NBT.ALTAR_UPGRADED, isUpgraded); - tagCompound.setInteger(Constants.NBT.ALTAR_CONSUMPTION_RATE, consumptionRate); - tagCompound.setInteger(Constants.NBT.ALTAR_DRAIN_RATE, drainRate); - tagCompound.setFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER, consumptionMultiplier); - tagCompound.setFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER, efficiencyMultiplier); - tagCompound.setFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER, sacrificeEfficiencyMultiplier); - tagCompound.setFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER, selfSacrificeEfficiencyMultiplier); - tagCompound.setBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK, isResultBlock); - tagCompound.setFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER, capacityMultiplier); - tagCompound.setFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER, orbCapacityMultiplier); - tagCompound.setFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER, dislocationMultiplier); - tagCompound.setInteger(Constants.NBT.ALTAR_CAPACITY, capacity); - tagCompound.setInteger(Constants.NBT.ALTAR_PROGRESS, progress); - tagCompound.setInteger(Constants.NBT.ALTAR_BUFFER_CAPACITY, bufferCapacity); - tagCompound.setInteger(Constants.NBT.ALTAR_LOCKDOWN_DURATION, lockdownDuration); - tagCompound.setInteger(Constants.NBT.ALTAR_ACCELERATION_UPGRADES, accelerationUpgrades); - tagCompound.setInteger(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION, demonBloodDuration); - tagCompound.setInteger(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING, cooldownAfterCrafting); - tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_RATE, chargingRate); - tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency); - tagCompound.setInteger(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge); - tagCompound.setInteger(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge); - tagCompound.setString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name()); - } - - public void startCycle() - { - if (tileAltar.getWorld() != null) - tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); - - checkTier(); - - if ((fluid == null || fluid.amount <= 0) && totalCharge <= 0) - return; - - if (!isActive) - progress = 0; - - ItemStack input = tileAltar.getStackInSlot(0); - - if (input != null) - { - // Do recipes - AltarRecipe recipe = AltarRecipeRegistry.getRecipeForInput(input); - if (recipe != null) - { - if (recipe.doesRequiredItemMatch(input, altarTier)) - { - this.isActive = true; - this.recipe = recipe; - this.result = recipe.getOutput() == null ? null : new ItemStack(recipe.getOutput().getItem(), 1, recipe.getOutput().getMetadata()); - this.liquidRequired = recipe.getSyphon(); - this.canBeFilled = recipe.isFillable(); - this.consumptionRate = recipe.getConsumeRate(); - this.drainRate = recipe.getDrainRate(); - return; - } - } - } - - isActive = false; - } - - public void update() - { - World world = tileAltar.getWorld(); - BlockPos pos = tileAltar.getPos(); - - if (world.isRemote) - return; - - // Used instead of the world time for checks that do not happen every tick - internalCounter++; - - if (lockdownDuration > 0) - lockdownDuration--; - - if (internalCounter % 20 == 0) - { - for (EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState block = world.getBlockState(newPos); - block.getBlock().onNeighborChange(world, pos, newPos); - } - } - if (internalCounter % (Math.max(20 - this.accelerationUpgrades, 1)) == 0) - { - int syphonMax = (int) (20 * this.dislocationMultiplier); - int fluidInputted; - int fluidOutputted; - fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); - fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); - this.fluid.amount += fluidInputted; - this.fluidInput.amount -= fluidInputted; - fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.amount); - fluidOutputted = Math.min(this.fluid.amount, fluidOutputted); - this.fluidOutput.amount += fluidOutputted; - this.fluid.amount -= fluidOutputted; - tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); - } - - if (internalCounter % this.getChargingFrequency() == 0 && !this.isActive) - { - int chargeInputted = Math.min(chargingRate, this.fluid.amount); - chargeInputted = Math.min(chargeInputted, maxCharge - totalCharge); - totalCharge += chargeInputted; - this.fluid.amount -= chargeInputted; - tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); - } - - if (internalCounter % 100 == 0 && (this.isActive || this.cooldownAfterCrafting <= 0)) - startCycle(); - - updateAltar(); - } - - private void updateAltar() - { - if (!isActive) - { - if (cooldownAfterCrafting > 0) - cooldownAfterCrafting--; - return; - } - - ItemStack input = tileAltar.getStackInSlot(0); - - if (input == null) - return; - - World world = tileAltar.getWorld(); - BlockPos pos = tileAltar.getPos(); - - if (world.isRemote) - return; - - if (!canBeFilled) - { - boolean hasOperated = false; - int stackSize = input.stackSize; - - if (totalCharge > 0) - { - int chargeDrained = Math.min(liquidRequired * stackSize - progress, totalCharge); - - totalCharge -= chargeDrained; - progress += chargeDrained; - - hasOperated = true; - } - if (fluid != null && fluid.amount >= 1) - { - int liquidDrained = Math.min((int) (altarTier.ordinal() >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); - - if (liquidDrained > (liquidRequired * stackSize - progress)) - liquidDrained = liquidRequired * stackSize - progress; - - fluid.amount = fluid.amount - liquidDrained; - progress += liquidDrained; - - hasOperated = true; - - if (internalCounter % 4 == 0 && world instanceof WorldServer) - { - WorldServer server = (WorldServer) world; - server.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0.2, 0, 0.2, 0, new int[0]); - } - - } else if (!hasOperated && progress > 0) - { - progress -= (int) (efficiencyMultiplier * drainRate); - - if (internalCounter % 2 == 0 && world instanceof WorldServer) - { - WorldServer server = (WorldServer) world; - server.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0.1, 0, 0.1, 0, new int[0]); - } - } - - if (hasOperated) - { - if (progress >= liquidRequired * stackSize) - { - ItemStack result = this.result; - - if (result != null) - result.stackSize *= stackSize; - - MinecraftForge.EVENT_BUS.post(new AltarCraftedEvent(recipe, result)); - tileAltar.setInventorySlotContents(0, result); - progress = 0; - - if (world instanceof WorldServer) - { - WorldServer server = (WorldServer) world; - server.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 40, 0.3, 0, 0.3, 0, new int[0]); - } - - this.cooldownAfterCrafting = 30; - this.isActive = false; - } - } - } else - { - ItemStack returnedItem = tileAltar.getStackInSlot(0); - - if (returnedItem == null || !(returnedItem.getItem() instanceof IBloodOrb)) - return; - - IBloodOrb item = (IBloodOrb) (returnedItem.getItem()); - NBTTagCompound itemTag = returnedItem.getTagCompound(); - - if (itemTag == null) - return; - - String ownerUUID = itemTag.getString(Constants.NBT.OWNER_UUID); - - if (Strings.isNullOrEmpty(ownerUUID)) - return; - - if (fluid != null && fluid.amount >= 1) - { - int liquidDrained = Math.min((int) (altarTier.ordinal() >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); - - int drain = NetworkHelper.getSoulNetwork(ownerUUID).add(liquidDrained, (int) (item.getMaxEssence(returnedItem.getMetadata()) * this.orbCapacityMultiplier)); - - fluid.amount = fluid.amount - drain; - - if (drain > 0 && internalCounter % 4 == 0 && world instanceof WorldServer) - { - WorldServer server = (WorldServer) world; - server.spawnParticle(EnumParticleTypes.SPELL_WITCH, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0, 0, 0, 0.001, new int[] {}); - } - } - } - - tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); - } - - public void checkTier() - { - EnumAltarTier tier = BloodAltar.getAltarTier(tileAltar.getWorld(), tileAltar.getPos()); - this.altarTier = tier; - - upgrade = BloodAltar.getUpgrades(tileAltar.getWorld(), tileAltar.getPos(), tier); - - if (tier.equals(currentTierDisplayed)) - currentTierDisplayed = EnumAltarTier.ONE; - - if (tier.equals(EnumAltarTier.ONE)) - { - upgrade = null; - isUpgraded = false; - this.consumptionMultiplier = 0; - this.efficiencyMultiplier = 1; - this.sacrificeEfficiencyMultiplier = 0; - this.selfSacrificeEfficiencyMultiplier = 0; - this.capacityMultiplier = 1; - this.orbCapacityMultiplier = 1; - this.dislocationMultiplier = 1; - this.accelerationUpgrades = 0; - this.chargingFrequency = 20; - this.chargingRate = 0; - this.maxCharge = 0; - this.totalCharge = 0; - return; - } else if (!tier.equals(EnumAltarTier.ONE) && upgrade != null) - { - this.isUpgraded = true; - this.accelerationUpgrades = upgrade.getAccelerationCount(); - this.consumptionMultiplier = (float) (0.20 * upgrade.getSpeedCount()); - this.efficiencyMultiplier = (float) Math.pow(0.85, upgrade.getEfficiencyCount()); - this.sacrificeEfficiencyMultiplier = (float) (0.10 * upgrade.getSacrificeCount()); - this.selfSacrificeEfficiencyMultiplier = (float) (0.10 * upgrade.getSelfSacrificeCount()); - this.capacityMultiplier = (float) ((1 * Math.pow(1.10, upgrade.getBetterCapacityCount()) + 0.20 * upgrade.getCapacityCount())); - this.dislocationMultiplier = (float) (Math.pow(1.2, upgrade.getDisplacementCount())); - this.orbCapacityMultiplier = (float) (1 + 0.02 * upgrade.getOrbCapacityCount()); - this.chargingFrequency = Math.max(20 - upgrade.getAccelerationCount(), 1); - this.chargingRate = (int) (10 * upgrade.getChargingCount() * (1 + consumptionMultiplier / 2)); - this.maxCharge = (int) (Fluid.BUCKET_VOLUME * Math.max(0.5 * capacityMultiplier, 1) * upgrade.getChargingCount()); - } - - this.capacity = (int) (Fluid.BUCKET_VOLUME * 10 * capacityMultiplier); - this.bufferCapacity = (int) (Fluid.BUCKET_VOLUME * 1 * capacityMultiplier); - - if (this.fluid.amount > this.capacity) - this.fluid.amount = this.capacity; - if (this.fluidOutput.amount > this.bufferCapacity) - this.fluidOutput.amount = this.bufferCapacity; - if (this.fluidInput.amount > this.bufferCapacity) - this.fluidInput.amount = this.bufferCapacity; - if (this.totalCharge > this.maxCharge) - this.totalCharge = this.maxCharge; - - tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); - } - - public int fillMainTank(int amount) - { - int filledAmount = Math.min(capacity - fluid.amount, amount); - fluid.amount += filledAmount; - - return filledAmount; - } - - public void sacrificialDaggerCall(int amount, boolean isSacrifice) - { - if (this.lockdownDuration > 0) - { - int amt = (int) Math.min(bufferCapacity - fluidInput.amount, (isSacrifice ? 1 + sacrificeEfficiencyMultiplier : 1 + selfSacrificeEfficiencyMultiplier) * amount); - fluidInput.amount += amt; - } else - { - fluid.amount += Math.min(capacity - fluid.amount, (isSacrifice ? 1 + sacrificeEfficiencyMultiplier : 1 + selfSacrificeEfficiencyMultiplier) * amount); - } - } - - public void setMainFluid(FluidStack fluid) - { - this.fluid = fluid; - } - - public void setOutputFluid(FluidStack fluid) - { - this.fluidOutput = fluid; - } - - public void setInputFluid(FluidStack fluid) - { - this.fluidInput = fluid; - } - - public AltarUpgrade getUpgrade() - { - return upgrade; - } - - public void setUpgrade(AltarUpgrade upgrade) - { - this.upgrade = upgrade; - } - - public int getCapacity() - { - return capacity; - } - - public FluidStack getFluid() - { - return fluid; - } - - public int getFluidAmount() - { - return fluid.amount; - } - - public int getCurrentBlood() - { - return getFluidAmount(); - } - - public EnumAltarTier getTier() - { - return altarTier; - } - - public void setTier(EnumAltarTier tier) - { - this.altarTier = tier; - } - - public int getProgress() - { - return progress; - } - - public float getSacrificeMultiplier() - { - return sacrificeEfficiencyMultiplier; - } - - public float getSelfSacrificeMultiplier() - { - return selfSacrificeEfficiencyMultiplier; - } - - public float getOrbMultiplier() - { - return orbCapacityMultiplier; - } - - public float getDislocationMultiplier() - { - return dislocationMultiplier; - } - - public float getConsumptionMultiplier() - { - return consumptionMultiplier; - } - - public float getConsumptionRate() - { - return consumptionRate; - } - - public int getLiquidRequired() - { - return liquidRequired; - } - - public int getBufferCapacity() - { - return bufferCapacity; - } - - public boolean setCurrentTierDisplayed(EnumAltarTier altarTier) - { - if (currentTierDisplayed == altarTier) - return false; - else - currentTierDisplayed = altarTier; - return true; - } - - public void addToDemonBloodDuration(int dur) - { - this.demonBloodDuration += dur; - } - - public boolean hasDemonBlood() - { - return this.demonBloodDuration > 0; - } - - public void decrementDemonBlood() - { - this.demonBloodDuration = Math.max(0, this.demonBloodDuration - 1); - } - - public void setActive() - { - if (tileAltar.getStackInSlot(0) == null) - { - isActive = false; - } - } - - public boolean isActive() - { - return isActive; - } - - public void requestPauseAfterCrafting(int amount) - { - if (this.isActive) - { - this.cooldownAfterCrafting = amount; - } - } - - public int getChargingRate() - { - return chargingRate; - } - - public int getTotalCharge() - { - return totalCharge; - } - - public int getChargingFrequency() - { - return chargingFrequency == 0 ? 1 : chargingFrequency; - } - - @Override - public int fill(FluidStack resource, boolean doFill) - { - if (resource == null || resource.getFluid() != BlockLifeEssence.getLifeEssence()) - { - return 0; - } - - if (!doFill) - { - if (fluidInput == null) - { - return Math.min(bufferCapacity, resource.amount); - } - - if (!fluidInput.isFluidEqual(resource)) - { - return 0; - } - - return Math.min(bufferCapacity - fluidInput.amount, resource.amount); - } - - if (fluidInput == null) - { - fluidInput = new FluidStack(resource, Math.min(bufferCapacity, resource.amount)); - - return fluidInput.amount; - } - - if (!fluidInput.isFluidEqual(resource)) - { - return 0; - } - int filled = bufferCapacity - fluidInput.amount; - - if (resource.amount < filled) - { - fluidInput.amount += resource.amount; - filled = resource.amount; - } else - { - fluidInput.amount = bufferCapacity; - } - - return filled; - } - - @Override - public FluidStack drain(FluidStack resource, boolean doDrain) - { - if (resource == null || !resource.isFluidEqual(fluidOutput)) - { - return null; - } - return drain(resource.amount, doDrain); - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) - { - if (fluidOutput == null) - { - return null; - } - - int drained = maxDrain; - if (fluidOutput.amount < drained) - { - drained = fluidOutput.amount; - } - - FluidStack stack = new FluidStack(fluidOutput, drained); - if (doDrain) - { - fluidOutput.amount -= drained; - } - return stack; - } - - @Override - public IFluidTankProperties[] getTankProperties() - { - return new IFluidTankProperties[] { new FluidTankPropertiesWrapper(new FluidTank(fluid, capacity)) }; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/altar/package-info.java b/src/main/java/WayofTime/bloodmagic/altar/package-info.java deleted file mode 100644 index 09fb9ffc..00000000 --- a/src/main/java/WayofTime/bloodmagic/altar/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.altar; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/annot/Handler.java b/src/main/java/WayofTime/bloodmagic/annot/Handler.java deleted file mode 100644 index 7ac96732..00000000 --- a/src/main/java/WayofTime/bloodmagic/annot/Handler.java +++ /dev/null @@ -1,16 +0,0 @@ -package WayofTime.bloodmagic.annot; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Classes annotated with this will automatically be registered to the - * {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Handler -{ -} diff --git a/src/main/java/WayofTime/bloodmagic/api/BlockStack.java b/src/main/java/WayofTime/bloodmagic/api/BlockStack.java deleted file mode 100644 index fe2e9341..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/BlockStack.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.bloodmagic.api; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -@Getter -@EqualsAndHashCode(exclude = { "state" }) -public class BlockStack -{ - private final Block block; - private final int meta; - private final IBlockState state; - - public BlockStack(Block block, int meta) - { - this.block = block; - this.meta = meta; - this.state = block.getStateFromMeta(meta); - } - - public BlockStack(Block block) - { - this(block, 0); - } - - public static BlockStack getStackFromPos(World world, BlockPos pos) - { - IBlockState state = world.getBlockState(pos); - return new BlockStack(state.getBlock(), state.getBlock().getMetaFromState(state)); - } - - public ItemStack getItemStack() - { - return new ItemStack(block, 1, meta); - } - - @Override - public String toString() - { - return getBlock().getRegistryName() + ":" + getMeta(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java b/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java deleted file mode 100644 index c65e63cd..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java +++ /dev/null @@ -1,264 +0,0 @@ -package WayofTime.bloodmagic.api; - -import WayofTime.bloodmagic.api.util.helper.LogHelper; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeModContainer; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.UniversalBucket; -import net.minecraftforge.fml.common.registry.ForgeRegistries; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * The primary API class. Includes helper methods and blacklists. - * - * Some API methods can be used via IMC instead. The supported methods are: - * - *
    - *
  • {@link #addToTeleposerBlacklist(BlockStack)}
  • - *
  • {@link #blacklistFromGreenGrove(Block)}
  • - *
  • {@link #setEntitySacrificeValue(Class, int)}
  • - *
- */ -public class BloodMagicAPI -{ - @Getter - private static final List teleposerBlacklist = new ArrayList(); - @Getter - private static final List transpositionBlacklist = new ArrayList(); - @Getter - private static final Map entitySacrificeValues = new HashMap(); - @Getter - private static final ArrayList greenGroveBlacklist = new ArrayList(); - - @Getter - @Setter - private static boolean loggingEnabled; - - @Getter - private static LogHelper logger = new LogHelper("BloodMagic|API"); - - @Getter - private static DamageSource damageSource = new DamageSourceBloodMagic(); - - @Getter - @Setter - private static Fluid lifeEssence; - private static ItemStack lifeEssenceBucket; - - public static ItemStack getLifeEssenceBucket() - { - if (lifeEssenceBucket != null) - return lifeEssenceBucket; - - lifeEssenceBucket = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, getLifeEssence()); - return lifeEssenceBucket; - } - - /** - * Used to obtain Items from BloodMagic. Use - * {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get the - * registered name. - * - * @param name - * - The registered name of the item. Usually the same as the class - * name. - * @return - The requested Item - */ - public static Item getItem(String name) - { - return ForgeRegistries.ITEMS.getValue(new ResourceLocation(Constants.Mod.MODID, name)); - } - - /** - * @see #getItem(String) - * - * @param bloodMagicItem - * - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to - * get. - * @return - The requested Item - */ - public static Item getItem(Constants.BloodMagicItem bloodMagicItem) - { - return getItem(bloodMagicItem.getRegName()); - } - - /** - * Used to obtain Blocks from BloodMagic. Use - * {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get the - * registered name. - * - * @param name - * - The registered name of the block. Usually the same as the class - * name. - * @return - The requested Block - */ - public static Block getBlock(String name) - { - return ForgeRegistries.BLOCKS.getValue(new ResourceLocation(Constants.Mod.MODID, name)); - } - - /** - * @see #getBlock(String) - * - * @param bloodMagicBlock - * - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} - * to get. - * @return - The requested Block - */ - public static Block getBlock(Constants.BloodMagicBlock bloodMagicBlock) - { - return getBlock(bloodMagicBlock.getRegName()); - } - - /** - * Used to add a {@link BlockStack} to the Teleposer blacklist that cannot - * be changed via Configuration files. - * - * IMC: - * {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", ItemStack)} - * Example: - * {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", new ItemStack(Blocks.bedrock))} - * - * @param blockStack - * - The BlockStack to blacklist. - */ - public static void addToTeleposerBlacklist(BlockStack blockStack) - { - if (!teleposerBlacklist.contains(blockStack)) - teleposerBlacklist.add(blockStack); - } - - /** - * @see #addToTeleposerBlacklist(BlockStack) - * - * @param block - * - The block to blacklist - * @param meta - * - The meta of the block to blacklist - */ - public static void addToTeleposerBlacklist(Block block, int meta) - { - addToTeleposerBlacklist(new BlockStack(block, meta)); - } - - /** - * @see #addToTeleposerBlacklist(BlockStack) - * - * @param block - * - The block to blacklist - */ - public static void addToTeleposerBlacklist(Block block) - { - addToTeleposerBlacklist(block, 0); - } - - /** - * Used to add a {@link BlockStack} to the Transposition blacklist that - * cannot be changed via Configuration files. - * - * IMC: - * {@code FMLInterModComs.sendMessage("BloodMagic", "transpositionBlacklist", ItemStack)} - * Example: - * {@code FMLInterModComs.sendMessage("BloodMagic", "transpositionBlacklist", new ItemStack(Blocks.bedrock))} - * - * @param blockStack - * - The BlockStack to blacklist. - */ - public static void addToTranspositionBlacklist(BlockStack blockStack) - { - if (!transpositionBlacklist.contains(blockStack)) - transpositionBlacklist.add(blockStack); - } - - /** - * @see #addToTranspositionBlacklist(BlockStack) - * - * @param block - * - The block to blacklist - * @param meta - * - The meta of the block to blacklist - */ - public static void addToTranspositionBlacklist(Block block, int meta) - { - addToTranspositionBlacklist(new BlockStack(block, meta)); - } - - /** - * @see #addToTranspositionBlacklist(BlockStack) - * - * @param block - * - The block to blacklist - */ - public static void addToTranspositionBlacklist(Block block) - { - addToTranspositionBlacklist(block, 0); - } - - /** - * Used to set the sacrifice value of an Entity. The value provided is how - * much LP will be gained when the entity is sacrificed at a Blood Altar. - * - * Setting a sacrificeValue of 0 will effectively blacklist the entity. - * - * The default value for any unset Entity is 500 LP per sacrifice. - * - * IMC: - * {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "ClassName;Value")} - * Example: - * {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "EntityVillager;2000")} - * - * @param entityClass - * - The class of the entity to blacklist. - * @param sacrificeValue - * - The Amount of LP to provide per each HP of the entity - * sacrificed. - */ - public static void setEntitySacrificeValue(Class entityClass, int sacrificeValue) - { - if (!entitySacrificeValues.containsKey(entityClass.getSimpleName())) - entitySacrificeValues.put(entityClass.getSimpleName(), sacrificeValue); - } - - /** - * @see #setEntitySacrificeValue(Class, int) - * - * @param entityClassName - * - The name of the class of the entity to blacklist. - * @param sacrificeValue - * - The Amount of LP to provide per each HP of the entity - * sacrificed. - */ - public static void setEntitySacrificeValue(String entityClassName, int sacrificeValue) - { - if (!entitySacrificeValues.containsKey(entityClassName)) - entitySacrificeValues.put(entityClassName, sacrificeValue); - } - - /** - * Blacklists a block from the Green Grove Ritual and Sigil. - * - * IMC: - * {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "domain:name")} - * Example: - * {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "minecraft:wheat")} - * - * @param block - * - Block to blacklist - */ - public static void blacklistFromGreenGrove(Block block) - { - if (!greenGroveBlacklist.contains(block)) - greenGroveBlacklist.add(block); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/Constants.java b/src/main/java/WayofTime/bloodmagic/api/Constants.java deleted file mode 100644 index c9abbbfd..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/Constants.java +++ /dev/null @@ -1,334 +0,0 @@ -package WayofTime.bloodmagic.api; - -import java.util.Locale; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.ForgeRegistries; - -public class Constants -{ - public static class NBT - { - public static final String OWNER_UUID = "ownerUUID"; - public static final String OWNER_NAME = "ownerNAME"; - public static final String USES = "uses"; - public static final String ACTIVATED = "activated"; - public static final String UNUSABLE = "unusable"; - public static final String SACRIFICE = "sacrifice"; - public static final String DIMENSION_ID = "dimensionId"; - public static final String X_COORD = "xCoord"; - public static final String Y_COORD = "yCoord"; - public static final String Z_COORD = "zCoord"; - public static final String PORTAL_LOCATION = "portalLocation"; - public static final String ORB_TIER = "orbTier"; - public static final String CURRENT_ESSENCE = "currentEssence"; - public static final String CURRENT_RITUAL = "currentRitual"; - public static final String CURRENT_RITUAL_TAG = "currentRitualTag"; - public static final String IS_RUNNING = "isRunning"; - public static final String IS_REDSTONED = "isStoned"; - public static final String RUNTIME = "runtime"; - public static final String DIRECTION = "direction"; - public static final String REAGENT_TANKS = "reagentTanks"; - public static final String CURRENT_INCENSE = "BM:CurrentIncense"; - public static final String CURRENT_PURITY = "BM:CurrentPurity"; - public static final String EMPTY = "Empty"; - public static final String OUTPUT_AMOUNT = "outputAmount"; - public static final String INPUT_AMOUNT = "inputAmount"; - public static final String STORED_LP = "storedLP"; - public static final String RITUAL_READER = "ritualReaderState"; - public static final String ITEMS = "Items"; - public static final String SLOT = "Slot"; - - public static final String ALTAR = "bloodAltar"; - public static final String ALTAR_TIER = "upgradeLevel"; - public static final String ALTAR_ACTIVE = "isActive"; - public static final String ALTAR_LIQUID_REQ = "liquidRequired"; - public static final String ALTAR_FILLABLE = "fillable"; - public static final String ALTAR_UPGRADED = "isUpgraded"; - public static final String ALTAR_CONSUMPTION_RATE = "consumptionRate"; - public static final String ALTAR_DRAIN_RATE = "drainRate"; - public static final String ALTAR_CONSUMPTION_MULTIPLIER = "consumptionMultiplier"; - public static final String ALTAR_EFFICIENCY_MULTIPLIER = "efficiencyMultiplier"; - public static final String ALTAR_SELF_SACRIFICE_MULTIPLIER = "selfSacrificeMultiplier"; - public static final String ALTAR_SACRIFICE_MULTIPLIER = "sacrificeMultiplier"; - public static final String ALTAR_CAPACITY_MULTIPLIER = "capacityMultiplier"; - public static final String ALTAR_ORB_CAPACITY_MULTIPLIER = "orbCapacityMultiplier"; - public static final String ALTAR_DISLOCATION_MULTIPLIER = "dislocationMultiplier"; - public static final String ALTAR_CAPACITY = "capacity"; - public static final String ALTAR_BUFFER_CAPACITY = "bufferCapacity"; - public static final String ALTAR_PROGRESS = "progress"; - public static final String ALTAR_IS_RESULT_BLOCK = "isResultBlock"; - public static final String ALTAR_LOCKDOWN_DURATION = "lockdownDuration"; - public static final String ALTAR_ACCELERATION_UPGRADES = "accelerationUpgrades"; - public static final String ALTAR_DEMON_BLOOD_DURATION = "demonBloodDuration"; - public static final String ALTAR_COOLDOWN_AFTER_CRAFTING = "cooldownAfterCrafting"; - public static final String ALTAR_TOTAL_CHARGE = "totalCharge"; - public static final String ALTAR_MAX_CHARGE = "maxCharge"; - public static final String ALTAR_CHARGE_RATE = "chargeRate"; - public static final String ALTAR_CHARGE_FREQUENCY = "chargeFrequency"; - public static final String ALTAR_CURRENT_TIER_DISPLAYED = "currentTierDisplayed"; - - public static final String ALTARMAKER_CURRENT_TIER = "currentTier"; - - public static final String PROJECTILE_TICKS_IN_AIR = "projectileTicksInAir"; - public static final String PROJECTILE_MAX_TICKS_IN_AIR = "projectileMaxTicksInAir"; - - public static final String TICKS_REMAINING = "ticksRemaining"; - public static final String CONTAINED_BLOCK_NAME = "containedBlockName"; - public static final String CONTAINED_BLOCK_META = "containedBlockMeta"; - public static final String CONTAINED_TILE_ENTITY = "containedTileEntity"; - - public static final String PREVIOUS_INPUT = "previousInput"; - - public static final String LIVING_ARMOUR = "livingArmour"; - - public static final String CHARGE_TIME = "chargeTime"; - public static final String HELD_DOWN = "heldDown"; - - public static final String UPGRADE_POISON_TIMER = "poisonTimer"; - public static final String UPGRADE_FIRE_TIMER = "fireTimer"; - - public static final String SOULS = "souls"; - public static final String SOUL_SWORD_DAMAGE = "soulSwordDamage"; - public static final String SOUL_SWORD_ACTIVE_DRAIN = "soulSwordActiveDrain"; - public static final String SOUL_SWORD_DROP = "soulSwordDrop"; - public static final String SOUL_SWORD_STATIC_DROP = "soulSwordStaticDrop"; - public static final String SOUL_SWORD_HEALTH = "soulSwordHealth"; - public static final String SOUL_SWORD_ATTACK_SPEED = "soulSwordAttackSpeed"; - public static final String SOUL_SWORD_SPEED = "soulSwordSpeed"; - public static final String SOUL_SWORD_DIG_SPEED = "soulSwordDigSpeed"; - public static final String WILL_TYPE = "demonWillType"; - - public static final String SOUL_FORGE_BURN = "burnTime"; - public static final String SOUL_FORGE_CONSUMED = "consumedSouls"; - - public static final String ROUTING_MASTER = "master"; - public static final String ROUTING_CONNECTION = "connections"; - public static final String ROUTING_PRIORITY = "prioritiesPeople"; - public static final String ROUTING_MASTER_GENERAL = "generalList"; - public static final String ROUTING_MASTER_INPUT = "inputList"; - public static final String ROUTING_MASTER_OUTPUT = "outputList"; - - public static final String GHOST_STACK_SIZE = "stackSize"; - - public static final String ITEM_INVENTORY = "itemInventory"; - - public static final String BLOCKPOS_CONNECTION = "connections"; - - public static final String CURRENT_SIGIL = "currentSigil"; - public static final String MOST_SIG = "mostSig"; - public static final String LEAST_SIG = "leastSig"; - public static final String COLOR = "color"; - - public static final String POTION_AUGMENT_LENGHT = "length:"; - public static final String POTION_AUGMENT_STRENGTH = "strength:"; - public static final String POTION_IMPURITY = "impurity"; - - public static final String TANK = "tank"; - } - - public static class Mod - { - public static final String MODID = "BloodMagic"; - public static final String DOMAIN = MODID.toLowerCase(Locale.ENGLISH) + ":"; - public static final String NAME = "Blood Magic: Alchemical Wizardry"; - public static final String VERSION = "@VERSION@"; - public static final String DEPEND = "required-after:Forge@[12.16.0.1840,);after:JEI@[2.23.0,);required-after:guideapi;"; - } - - public static final class Gui - { - public static final int TELEPOSER_GUI = 0; - public static final int SOUL_FORGE_GUI = 1; - public static final int ROUTING_NODE_GUI = 2; - public static final int MASTER_ROUTING_NODE_GUI = 3; - public static final int ALCHEMY_TABLE_GUI = 4; - public static final int SIGIL_HOLDING_GUI = 5; - } - - public static class Compat - { - public static final String JEI_CATEGORY_ALTAR = Mod.MODID + ":altar"; - public static final String JEI_CATEGORY_BINDING = Mod.MODID + ":binding"; - public static final String JEI_CATEGORY_ALCHEMYARRAY = Mod.MODID + ":alchemyArray"; - public static final String JEI_CATEGORY_SOULFORGE = Mod.MODID + ":soulForge"; - public static final String JEI_CATEGORY_ALCHEMYTABLE = Mod.MODID + ":salchemyTable"; - public static final String JEI_CATEGORY_ARMOURDOWNGRADE = Mod.MODID + ":armourDowngrade"; - - public static final String WAILA_CONFIG_BYPASS_SNEAK = Mod.MODID + ".bypassSneak"; - public static final String WAILA_CONFIG_ALTAR = Mod.MODID + ".bloodAltar"; - public static final String WAILA_CONFIG_TELEPOSER = Mod.MODID + ".teleposer"; - public static final String WAILA_CONFIG_RITUAL = Mod.MODID + ".ritualController"; - public static final String WAILA_CONFIG_ARRAY = Mod.MODID + ".array"; - public static final String WAILA_CONFIG_BLOOD_TANK = Mod.MODID + ".bloodTank"; - - public static final Item THAUMCRAFT_GOGGLES = ForgeRegistries.ITEMS.getValue(new ResourceLocation("Thaumcraft", "goggles")); - } - - public static class Misc - { - public static final int POTION_ARRAY_SIZE = 256; - public static final float ALTERED_STEP_HEIGHT = 1.00314159f; - public static final int NIGHT_VISION_CONSTANT_BEGIN = 30002; - public static final int NIGHT_VISION_CONSTANT_END = 30000; - } - - public enum BloodMagicItem - { - ACTIVATION_CRYSTAL("ItemActivationCrystal"), - ALTAR_MAKER("ItemAltarMaker"), - ARCANE_ASHES("ItemArcaneAshes"), - BLOOD_ORB("ItemBloodOrb"), - BOUND_AXE("ItemBoundAxe"), - BLOOD_SHARD("ItemBloodShard"), - BOUND_PICKAXE("ItemBoundPickaxe"), - BOUND_SHOVEL("ItemBoundShovel"), - BOUND_SWORD("ItemBoundSword"), - /** - * @deprecated - Use - * {@code UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, BloodMagicAPI.getLifeEssence())} - **/ - @Deprecated - BUCKET_ESSENCE("ItemBucketEssence"), - COMPONENT("ItemComponent"), - CUTTING_FLUID("ItemCuttingFluid"), - DEMON_CRYSTAL("ItemDemonCrystal"), - DAGGER_OF_SACRIFICE("ItemDaggerOfSacrifice"), - INSCRIPTION_TOOL("ItemInscriptionTool"), - LAVA_CRYSTAL("ItemLavaCrystal"), - LIVING_ARMOR_HELMET("ItemLivingArmourHelmet"), - LIVING_ARMOR_CHEST("ItemLivingArmourChest"), - LIVING_ARMOR_LEGS("ItemLivingArmourLegs"), - LIVING_ARMOR_BOOTS("ItemLivingArmourBoots"), - MONSTER_SOUL("ItemMonsterSoul"), - NODE_ROUTER("ItemNodeRouter"), - RITUAL_DIVINER("ItemRitualDiviner"), - ROUTER_FILTER("ItemRouterFilter"), - SACRIFICIAL_DAGGER("ItemSacrificialDagger"), - SACRIFICE_PACK("ItemPackSacrifice"), - SELF_SACRIFICE_PACK("ItemPackSelfSacrifice"), - SENTIENT_ARMOR_HELMET("ItemSentientArmourHelmet"), - SENTIENT_ARMOR_CHEST("ItemSentientArmourChest"), - SENTIENT_ARMOR_LEGS("ItemSentientArmourLegs"), - SENTIENT_ARMOR_BOOTS("ItemSentientArmourBoots"), - SENTIENT_ARMOR_GEM("ItemSentientArmourGem"), - SENTIENT_AXE("ItemSentientAxe"), - SENTIENT_BOW("ItemSentientBow"), - SENTIENT_PICKAXE("ItemSentientPickaxe"), - SENTIENT_SHOVEL("ItemSentientShovel"), - SENTIENT_SWORD("ItemSentientSword"), - SOUL_GEM("ItemSoulGem"), - SOUL_SNARE("ItemSoulSnare"), - SIGIL_AIR("ItemSigilAir"), - SIGIL_BLOOD_LIGHT("ItemSigilBloodLight"), - SIGIL_COMPRESSION("ItemSigilCompression"), - SIGIL_DIVINATION("ItemSigilDivination"), - SIGIL_ELEMENTAL_AFFINITY("ItemSigilElementalAffinity"), - SIGIL_ENDER_SEVERANCE("ItemSigilEnderSeverance"), - SIGIL_FAST_MINER("ItemSigilFastMiner"), - SIGIL_GREEN_GROVE("ItemSigilGreenGrove"), - SIGIL_HASTE("ItemSigilHaste"), - SIGIL_LAVA("ItemSigilLava"), - SIGIL_MAGNETISM("ItemSigilMagnetism"), - SIGIL_PHANTOM_BRIDGE("ItemSigilPhantomBridge"), - SIGIL_SEER("ItemSigilSeer"), - SIGIL_SUPPRESION("ItemSigilSuppression"), - SIGIL_VOID("ItemSigilVoid"), - SIGIL_WATER("ItemSigilWater"), - SIGIL_WHIRLWIND("ItemSigilWhirlwind"), - SLATE("ItemSlate"), - TELEPOSITION_FOCUS("ItemTelepositionFocus"), - UPGRADE_TOME("ItemUpgradeTome"), - UPGRADE_TRAINER("ItemUpgradeTrainer"), - SIGIL_TELEPOSITION("ItemSigilTeleposition"), - EXPERIENCE_TOME("ItemExperienceBook"), - SIGIL_TRANSPOSITION("ItemSigilTransposition"), - RITUAL_READER("ItemRitualReader"), - SANGUINE_BOOK("ItemSanguineBook"), - SIGIL_HOLDING("ItemSigilHolding"), - ARMOUR_POINTS_UPGRADE("ItemLivingArmourPointsUpgrade"), - DEMON_WILL_GAUGE("ItemDemonWillGauge"), - POTION_FLASK("ItemPotionFlask"), - SIGIL_CLAW("ItemSigilClaw"), - SIGIL_BOUNCE("ItemSigilBounce"), - SIGIL_FROST("ItemSigilFrost"); - - @Getter - private final String regName; - - BloodMagicItem(String regName) - { - this.regName = regName; - } - - public Item getItem() - { - return BloodMagicAPI.getItem(getRegName()); - } - } - - public enum BloodMagicBlock - { - ALCHEMY_ARRAY("BlockAlchemyArray"), - ALTAR("BlockAltar"), - BLOOD_LIGHT("BlockBloodLight"), - BLOOD_RUNE("BlockBloodRune"), - BLOOD_STONE("BlockBloodStoneBrick"), - CRYSTAL("BlockCrystal"), - INPUT_ROUTING_NODE("BlockInputRoutingNode"), - ITEM_ROUTING_NODE("BlockItemRoutingNode"), - LIFE_ESSENCE("BlockLifeEssence"), - MASTER_ROUTING_NODE("BlockMasterRoutingNode"), - OUTPUT_ROUTING_NODE("BlockOutputRoutingNode"), - @Deprecated - PEDESTAL("BlockPedestal"), - /** No longer included in the mod. */ - PHANTOM("BlockPhantom"), - RITUAL_CONTROLLER("BlockRitualController"), - RITUAL_STONE("BlockRitualStone"), - SOUL_FORGE("BlockSoulForge"), - SPECTRAL("BlockSpectral"), - TELEPOSER("BlockTeleposer"), - INCENSE_ALTAR("BlockIncenseAltar"), - PATH("BlockPath"), - DEMON_CRUCIBLE("BlockDemonCrucible"), - DEMON_PYLON("BlockDemonPylon"), - DEMON_CRYSTALLIZER("BlockDemonCrystallizer"), - DEMON_CRYSTAL("BlockDemonCrystal"), - DIMENSIONAL_PORTAL("BlockDimensionalPortal"), - BLOOD_TANK("BlockBloodTank"), - MIMIC("BlockMimic"), - ALCHEMY_TABLE("BlockAlchemyTable"), - DEMON_BRICK_1("BlockDemonBricks1"), - DEMON_BRICK_2("BlockDemonBricks2"), - DEMON_BLOCK_EXTRA("BlockDemonExtra"), - DEMON_PILLAR_1("BlockPillar1"), - DEMON_PILLAR_2("BlockPillar2"), - DEMON_PILLAR_CAP_1("BlockPillarCap1"), - DEMON_PILLAR_CAP_2("BlockPillarCap2"), - DEMON_PILLAR_CAP_3("BlockPillarCap3"), - DEMON_WALL_1("BlockWall1"), - DEMON_STAIRS_1("BlockStairs1"), - DEMON_STAIRS_2("BlockStairs2"), - DEMON_STAIRS_3("BlockStairs3"), - DEMON_LIGHT("BlockDemonLight"), - INVERSION_PILLAR("BlockInversionPillar"), - INVERSION_PILLAR_END("BlockInversionPillarEnd"); - - @Getter - private final String regName; - - BloodMagicBlock(String regName) - { - this.regName = regName; - } - - public Block getBlock() - { - return BloodMagicAPI.getBlock(getRegName()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/DamageSourceBloodMagic.java b/src/main/java/WayofTime/bloodmagic/api/DamageSourceBloodMagic.java deleted file mode 100644 index 8dab8ad2..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/DamageSourceBloodMagic.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.api; - -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.DamageSource; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentString; - -public class DamageSourceBloodMagic extends DamageSource -{ - public DamageSourceBloodMagic() - { - super("bloodMagic"); - - setDamageBypassesArmor(); - setDamageIsAbsolute(); - } - - @Override - public ITextComponent getDeathMessage(EntityLivingBase livingBase) - { - return new TextComponentString(TextHelper.localizeEffect("chat.BloodMagic.damageSource", livingBase.getName())); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ItemStackWrapper.java b/src/main/java/WayofTime/bloodmagic/api/ItemStackWrapper.java deleted file mode 100644 index b19b4eb2..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ItemStackWrapper.java +++ /dev/null @@ -1,104 +0,0 @@ -package WayofTime.bloodmagic.api; - -import lombok.EqualsAndHashCode; -import lombok.RequiredArgsConstructor; -import lombok.Setter; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import java.util.ArrayList; -import java.util.List; - -@RequiredArgsConstructor -@EqualsAndHashCode -public class ItemStackWrapper -{ - public final Item item; - public final int stackSize; - public final int meta; - @Setter - public NBTTagCompound nbtTag; - - public ItemStackWrapper(Item item, int stackSize) - { - this(item, stackSize, 0); - } - - public ItemStackWrapper(Item item) - { - this(item, 1, 0); - } - - public ItemStackWrapper(Block block, int stackSize, int meta) - { - this(Item.getItemFromBlock(block), stackSize, meta); - } - - public ItemStackWrapper(Block block, int stackSize) - { - this(block, stackSize, 0); - } - - public ItemStackWrapper(Block block) - { - this(block, 1, 0); - } - - public ItemStackWrapper(BlockStack blockStack) - { - this(blockStack.getBlock(), 1, blockStack.getMeta()); - } - - public static ItemStackWrapper getHolder(ItemStack stack) - { - if (stack == null) - { - return null; - } - - return new ItemStackWrapper(stack.getItem(), stack.stackSize, stack.getItemDamage()); - } - - public ItemStack toStack() - { - return new ItemStack(item, stackSize, meta); - } - - public String getDisplayName() - { - return toStack().getDisplayName(); - } - - @Override - public String toString() - { - return stackSize + "x" + item.getUnlocalizedName() + "@" + this.meta; - } - - public ItemStack toStack(int count) - { - ItemStack result = new ItemStack(item, count, meta); - result.setTagCompound(nbtTag); - return result; - } - - public static List toWrapperList(List itemStackList) - { - List wrapperList = new ArrayList(); - for (ItemStack stack : itemStackList) - wrapperList.add(ItemStackWrapper.getHolder(stack)); - - return wrapperList; - } - - public static List toStackList(List wrapperList) - { - List stackList = new ArrayList(); - for (ItemStackWrapper wrapper : wrapperList) - stackList.add(wrapper.toStack()); - - return stackList; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffect.java b/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffect.java deleted file mode 100644 index 4e07a969..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffect.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.api.alchemyCrafting; - -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.iface.IAlchemyArray; - -@RequiredArgsConstructor -public abstract class AlchemyArrayEffect -{ - @Getter - public final String key; - - public abstract boolean update(TileEntity tile, int ticksActive); - - public abstract void writeToNBT(NBTTagCompound tag); - - public abstract void readFromNBT(NBTTagCompound tag); - - public abstract AlchemyArrayEffect getNewCopy(); - - public void onEntityCollidedWithBlock(IAlchemyArray array, World world, BlockPos pos, IBlockState state, Entity entity) - { - - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java b/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java deleted file mode 100644 index 41935408..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.bloodmagic.api.alchemyCrafting; - -import lombok.Getter; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; - -public class AlchemyArrayEffectCrafting extends AlchemyArrayEffect -{ - @Getter - public final ItemStack outputStack; - public int tickLimit; - - public AlchemyArrayEffectCrafting(ItemStack outputStack) - { - this(outputStack, 200); - } - - public AlchemyArrayEffectCrafting(ItemStack outputStack, int tickLimit) - { - this(outputStack.toString() + tickLimit, outputStack, tickLimit); - } - - public AlchemyArrayEffectCrafting(String key, ItemStack outputStack, int tickLimit) - { - super(key); - this.outputStack = outputStack; - this.tickLimit = tickLimit; - } - - @Override - public boolean update(TileEntity tile, int ticksActive) - { - // TODO: Add recipe rechecking to verify nothing screwy is going on. - if (tile.getWorld().isRemote) - { - return false; - } - - if (ticksActive >= tickLimit) - { - BlockPos pos = tile.getPos(); - - ItemStack output = outputStack.copy(); - - EntityItem outputEntity = new EntityItem(tile.getWorld(), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, output); - - tile.getWorld().spawnEntityInWorld(outputEntity); - - return true; - } - - return false; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public AlchemyArrayEffect getNewCopy() - { - return new AlchemyArrayEffectCrafting(key, outputStack, tickLimit); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyCircleRenderer.java deleted file mode 100644 index 6a505119..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyCircleRenderer.java +++ /dev/null @@ -1,167 +0,0 @@ -package WayofTime.bloodmagic.api.alchemyCrafting; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -public class AlchemyCircleRenderer -{ - public float offsetFromFace = -0.9f; - public final ResourceLocation arrayResource; - - public AlchemyCircleRenderer() - { - this(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SightSigil.png")); - } - - public AlchemyCircleRenderer(ResourceLocation arrayResource) - { - this.arrayResource = arrayResource; - } - - public float getRotation(float craftTime) - { - float offset = 2; - if (craftTime >= offset) - { - float modifier = (float) Math.pow(craftTime - offset, 1.5); - return modifier * 1f; - } - return 0; - } - - public float getSecondaryRotation(float craftTime) - { - float offset = 50; - if (craftTime >= offset) - { - float modifier = (float) Math.pow(craftTime - offset, 1.7); - return modifier * 0.5f; - } - return 0; - } - - public float getSizeModifier(float craftTime) - { - if (craftTime >= 150 && craftTime <= 250) - { - return (200 - craftTime) / 50f; - } - return 1.0f; - } - - public float getVerticalOffset(float craftTime) - { - if (craftTime >= 5) - { - if (craftTime <= 40) - { - return (float) ((-0.4) * Math.pow((craftTime - 5) / 35f, 3)); - } else - { - return -0.4f; - } - } - return 0; - } - - public void renderAt(TileEntity tile, double x, double y, double z, float craftTime) - { - if (!(tile instanceof TileAlchemyArray)) - { - return; - } - - TileAlchemyArray tileArray = (TileAlchemyArray) tile; - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - // float rot = (float)(this.worldObj.provider.getWorldTime() % (360 / - // this.rotationspeed) * this.rotationspeed) + this.rotationspeed * f; - float rot = getRotation(craftTime); - float secondaryRot = getSecondaryRotation(craftTime); - - float size = 1.0F * getSizeModifier(craftTime); - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - GlStateManager.translate(x, y, z); - - // Specify which face this "circle" is located on - EnumFacing sideHit = EnumFacing.UP; - EnumFacing rotation = tileArray.getRotation(); - - GlStateManager.translate(sideHit.getFrontOffsetX() * offsetFromFace, sideHit.getFrontOffsetY() * offsetFromFace, sideHit.getFrontOffsetZ() * offsetFromFace); - - switch (sideHit) - { - case DOWN: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(-90.0f, 1, 0, 0); - break; - case EAST: - GlStateManager.rotate(-90.0f, 0, 1, 0); - GlStateManager.translate(0, 0, -1); - break; - case NORTH: - break; - case SOUTH: - GlStateManager.rotate(180.0f, 0, 1, 0); - GlStateManager.translate(-1, 0, -1); - break; - case UP: - GlStateManager.translate(0, 1, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - break; - case WEST: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(90.0f, 0, 1, 0); - break; - } - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5f, 0.5f, getVerticalOffset(craftTime)); - GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1); - - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 0, 1); - GlStateManager.rotate(secondaryRot, 1, 0, 0); - GlStateManager.rotate(secondaryRot * 0.45812f, 0, 0, 1); - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - // GlStateManager.depthMask(true); - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GlStateManager.popMatrix(); - GlStateManager.popMatrix(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/package-info.java b/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/package-info.java deleted file mode 100644 index 4d8e0bce..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.alchemyCrafting; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/AltarComponent.java b/src/main/java/WayofTime/bloodmagic/api/altar/AltarComponent.java deleted file mode 100644 index 7fd90b66..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/AltarComponent.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -import lombok.Getter; -import net.minecraft.util.math.BlockPos; - -/** - * Used for building the altar structure. - */ -@Getter -public class AltarComponent -{ - private BlockPos offset; - private boolean upgradeSlot; - - private EnumAltarComponent component; - - /** - * Sets a component location for the altar. - * - * @param offset - * - Where the block should be in relation to the Altar - * @param component - * - The type of Component the location should contain - */ - public AltarComponent(BlockPos offset, EnumAltarComponent component) - { - this.offset = offset; - this.component = component; - } - - /** - * Use for setting a location at which there must be a block, but the type - * of block does not matter. - * - * @param offset - * - Where the block should be in relation to the Altar - */ - public AltarComponent(BlockPos offset) - { - this(offset, EnumAltarComponent.NOTAIR); - } - - /** - * Sets the location to an upgrade slot. - * - * @return the current instance for further use. - */ - public AltarComponent setUpgradeSlot() - { - this.upgradeSlot = true; - return this; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/AltarUpgrade.java b/src/main/java/WayofTime/bloodmagic/api/altar/AltarUpgrade.java deleted file mode 100644 index faecb757..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/AltarUpgrade.java +++ /dev/null @@ -1,84 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@Getter -@NoArgsConstructor -@AllArgsConstructor -public class AltarUpgrade -{ - private int speedCount; - private int efficiencyCount; - private int sacrificeCount; - private int selfSacrificeCount; - private int displacementCount; - private int capacityCount; - private int orbCapacityCount; - private int betterCapacityCount; - private int accelerationCount; - private int chargingCount; - - // Adders - - public AltarUpgrade addSpeed() - { - speedCount++; - return this; - } - - public AltarUpgrade addEfficiency() - { - efficiencyCount++; - return this; - } - - public AltarUpgrade addSacrifice() - { - sacrificeCount++; - return this; - } - - public AltarUpgrade addSelfSacrifice() - { - selfSacrificeCount++; - return this; - } - - public AltarUpgrade addDisplacement() - { - displacementCount++; - return this; - } - - public AltarUpgrade addCapacity() - { - capacityCount++; - return this; - } - - public AltarUpgrade addOrbCapacity() - { - orbCapacityCount++; - return this; - } - - public AltarUpgrade addBetterCapacity() - { - betterCapacityCount++; - return this; - } - - public AltarUpgrade addAcceleration() - { - accelerationCount++; - return this; - } - - public AltarUpgrade addCharging() - { - chargingCount++; - return this; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/EnumAltarComponent.java b/src/main/java/WayofTime/bloodmagic/api/altar/EnumAltarComponent.java deleted file mode 100644 index 81acdd8b..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/EnumAltarComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -import java.util.Locale; - -import lombok.Getter; - -/** - * List of different components used to construct different tiers of altars. - */ -@Getter -public enum EnumAltarComponent -{ - GLOWSTONE, - BLOODSTONE, - BEACON, - BLOODRUNE, - CRYSTAL, - NOTAIR; - - private static final String BASE = "chat.BloodMagic.altar.comp."; - private String key; - - EnumAltarComponent() - { - this.key = BASE + name().toLowerCase(Locale.ENGLISH); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/EnumAltarTier.java b/src/main/java/WayofTime/bloodmagic/api/altar/EnumAltarTier.java deleted file mode 100644 index 6d7cfcb8..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/EnumAltarTier.java +++ /dev/null @@ -1,155 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -import lombok.Getter; -import net.minecraft.util.math.BlockPos; - -import java.util.ArrayList; - -//@formatter:off -@Getter -public enum EnumAltarTier -{ - ONE(), TWO() - { - @Override - public void buildComponents() - { - altarComponents.add(new AltarComponent(new BlockPos(-1, -1, -1), EnumAltarComponent.BLOODRUNE)); - altarComponents.add(new AltarComponent(new BlockPos(0, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(1, -1, -1), EnumAltarComponent.BLOODRUNE)); - altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 0), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(1, -1, 0), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 1), EnumAltarComponent.BLOODRUNE)); - altarComponents.add(new AltarComponent(new BlockPos(0, -1, 1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(1, -1, 1), EnumAltarComponent.BLOODRUNE)); - } - }, - THREE() - { - @Override - public void buildComponents() - { - altarComponents.add(new AltarComponent(new BlockPos(-1, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(0, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(1, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 0), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(1, -1, 0), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(0, -1, 1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(1, -1, 1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-3, -1, -3))); - altarComponents.add(new AltarComponent(new BlockPos(-3, 0, -3))); - altarComponents.add(new AltarComponent(new BlockPos(3, -1, -3))); - altarComponents.add(new AltarComponent(new BlockPos(3, 0, -3))); - altarComponents.add(new AltarComponent(new BlockPos(-3, -1, 3))); - altarComponents.add(new AltarComponent(new BlockPos(-3, 0, 3))); - altarComponents.add(new AltarComponent(new BlockPos(3, -1, 3))); - altarComponents.add(new AltarComponent(new BlockPos(3, 0, 3))); - altarComponents.add(new AltarComponent(new BlockPos(-3, 1, -3), EnumAltarComponent.GLOWSTONE)); - altarComponents.add(new AltarComponent(new BlockPos(3, 1, -3), EnumAltarComponent.GLOWSTONE)); - altarComponents.add(new AltarComponent(new BlockPos(-3, 1, 3), EnumAltarComponent.GLOWSTONE)); - altarComponents.add(new AltarComponent(new BlockPos(3, 1, 3), EnumAltarComponent.GLOWSTONE)); - - for (int i = -2; i <= 2; i++) - { - altarComponents.add(new AltarComponent(new BlockPos(3, -2, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-3, -2, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -2, 3), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -2, -3), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - } - } - }, - FOUR() - { - @Override - public void buildComponents() - { - altarComponents.addAll(THREE.getAltarComponents()); - - for (int i = -3; i <= 3; i++) - { - altarComponents.add(new AltarComponent(new BlockPos(5, -3, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-5, -3, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -3, 5), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -3, -5), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - } - - for (int i = -2; i <= 1; i++) - { - altarComponents.add(new AltarComponent(new BlockPos(5, i, 5))); - altarComponents.add(new AltarComponent(new BlockPos(5, i, -5))); - altarComponents.add(new AltarComponent(new BlockPos(-5, i, -5))); - altarComponents.add(new AltarComponent(new BlockPos(-5, i, 5))); - } - - altarComponents.add(new AltarComponent(new BlockPos(5, 2, 5), EnumAltarComponent.BLOODSTONE)); - altarComponents.add(new AltarComponent(new BlockPos(5, 2, -5), EnumAltarComponent.BLOODSTONE)); - altarComponents.add(new AltarComponent(new BlockPos(-5, 2, -5), EnumAltarComponent.BLOODSTONE)); - altarComponents.add(new AltarComponent(new BlockPos(-5, 2, 5), EnumAltarComponent.BLOODSTONE)); - } - }, - FIVE() - { - @Override - public void buildComponents() - { - altarComponents.addAll(FOUR.getAltarComponents()); - altarComponents.add(new AltarComponent(new BlockPos(-8, -3, 8), EnumAltarComponent.BEACON)); - altarComponents.add(new AltarComponent(new BlockPos(-8, -3, -8), EnumAltarComponent.BEACON)); - altarComponents.add(new AltarComponent(new BlockPos(8, -3, -8), EnumAltarComponent.BEACON)); - altarComponents.add(new AltarComponent(new BlockPos(8, -3, 8), EnumAltarComponent.BEACON)); - - for (int i = -6; i <= 6; i++) - { - altarComponents.add(new AltarComponent(new BlockPos(8, -4, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-8, -4, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -4, 8), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -4, -8), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - } - } - }, - SIX() - { - @Override - public void buildComponents() - { - altarComponents.addAll(FIVE.getAltarComponents()); - - for (int i = -4; i <= 2; i++) - { - altarComponents.add(new AltarComponent(new BlockPos(11, i, 11))); - altarComponents.add(new AltarComponent(new BlockPos(-11, i, -11))); - altarComponents.add(new AltarComponent(new BlockPos(11, i, -11))); - altarComponents.add(new AltarComponent(new BlockPos(-11, i, 11))); - } - - altarComponents.add(new AltarComponent(new BlockPos(11, 3, 11), EnumAltarComponent.CRYSTAL)); - altarComponents.add(new AltarComponent(new BlockPos(-11, 3, -11), EnumAltarComponent.CRYSTAL)); - altarComponents.add(new AltarComponent(new BlockPos(11, 3, -11), EnumAltarComponent.CRYSTAL)); - altarComponents.add(new AltarComponent(new BlockPos(-11, 3, 11), EnumAltarComponent.CRYSTAL)); - - for (int i = -9; i <= 9; i++) - { - altarComponents.add(new AltarComponent(new BlockPos(11, -5, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(-11, -5, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -5, 11), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - altarComponents.add(new AltarComponent(new BlockPos(i, -5, -11), EnumAltarComponent.BLOODRUNE).setUpgradeSlot()); - } - } -//@formatter:on - }; - - public static final int MAXTIERS = values().length; - - ArrayList altarComponents = new ArrayList(); - - public void buildComponents() - { - - } - - public int toInt() - { - return ordinal() + 1; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java b/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java deleted file mode 100644 index 9e711b00..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java +++ /dev/null @@ -1,13 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import javax.annotation.Nullable; - -public interface IAltarComponent -{ - @Nullable - EnumAltarComponent getType(World world, IBlockState state, BlockPos pos); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/IAltarManipulator.java b/src/main/java/WayofTime/bloodmagic/api/altar/IAltarManipulator.java deleted file mode 100644 index 1c846da3..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/IAltarManipulator.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -/** - * Any item that implements this interface will not be pulled into the Altar on - * right click. - */ -public interface IAltarManipulator -{ -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/IBloodAltar.java b/src/main/java/WayofTime/bloodmagic/api/altar/IBloodAltar.java deleted file mode 100644 index 49749d85..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/IBloodAltar.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.api.altar; - -public interface IBloodAltar -{ - int getCapacity(); - - int getCurrentBlood(); - - EnumAltarTier getTier(); - - int getProgress(); - - float getSacrificeMultiplier(); - - float getSelfSacrificeMultiplier(); - - float getOrbMultiplier(); - - float getDislocationMultiplier(); - - float getConsumptionMultiplier(); - - float getConsumptionRate(); - - int getChargingRate(); - - int getChargingFrequency(); - - int getTotalCharge(); - - int getLiquidRequired(); - - int getBufferCapacity(); - - void sacrificialDaggerCall(int amount, boolean isSacrifice); - - void startCycle(); - - void checkTier(); - - boolean isActive(); - - void setActive(); - - int fillMainTank(int amount); - - /** - * Will set the altar to initiate a cooldown cycle after it crafts before - * starting to craft again, giving the user time to interact with the altar. - * This can only be set while the altar is not active. - * - * @param cooldown - * - How long the cooldown should last - */ - void requestPauseAfterCrafting(int cooldown); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/package-info.java b/src/main/java/WayofTime/bloodmagic/api/altar/package-info.java deleted file mode 100644 index 2da60236..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/altar/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.altar; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/compress/CompressionHandler.java b/src/main/java/WayofTime/bloodmagic/api/compress/CompressionHandler.java deleted file mode 100644 index 2e54883d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/compress/CompressionHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.bloodmagic.api.compress; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public abstract class CompressionHandler -{ - /** - * Called to look at the inventory and syphons the required stack. Returns - * resultant stack if successful, and null if not. - * - * @param inv - * The inventory iterated through - * @return The result of the compression - */ - public abstract ItemStack compressInventory(ItemStack[] inv, World world); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/compress/CompressionRegistry.java b/src/main/java/WayofTime/bloodmagic/api/compress/CompressionRegistry.java deleted file mode 100644 index 5c68f522..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/compress/CompressionRegistry.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.bloodmagic.api.compress; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.util.Utils; - -/** - * A registry aimed to help compress items in an inventory into its compressible - * form. - */ -public class CompressionRegistry -{ - public static List compressionRegistry = new ArrayList(); - public static Map thresholdMap = new HashMap(); - - public static void registerHandler(CompressionHandler handler) - { - compressionRegistry.add(handler); - } - - /** - * Registers an item so that it only compresses while above this threshold - * - * @param stack - * item/block to be compressed - * @param threshold - * amount that is to be compressed - */ - public static void registerItemThreshold(ItemStack stack, int threshold) - { - thresholdMap.put(stack, threshold); - } - - public static ItemStack compressInventory(ItemStack[] inv, World world) - { - for (CompressionHandler handler : compressionRegistry) - { - ItemStack stack = handler.compressInventory(inv, world); - if (stack != null) - { - return stack; - } - } - - return null; - } - - public static Pair compressInventory(TileEntity tile, World world) - { - if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) - { - IItemHandler itemHandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); - ItemStack[] inventory = new ItemStack[itemHandler.getSlots()]; //THIS MUST NOT BE EDITED! - ItemStack[] copyInventory = new ItemStack[itemHandler.getSlots()]; - - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - inventory[slot] = itemHandler.extractItem(slot, 64, true); - copyInventory[slot] = ItemStack.copyItemStack(inventory[slot]); - } - - for (CompressionHandler handler : compressionRegistry) - { - ItemStack stack = handler.compressInventory(copyInventory, world); - if (stack != null) - { - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - if (inventory[slot] != null && !ItemStack.areItemStacksEqual(inventory[slot], copyInventory[slot])) - { - itemHandler.extractItem(slot, inventory[slot].stackSize, false); - if (copyInventory[slot] != null) - { - itemHandler.insertItem(slot, copyInventory[slot], false); - } - } - } - - return Pair.of(Utils.insertStackIntoTile(stack, itemHandler), true); - } - } - } - - return Pair.of(null, false); - } - - public static int getItemThreshold(ItemStack stack) - { - for (Map.Entry entry : thresholdMap.entrySet()) - { - if (areItemStacksEqual(entry.getKey(), stack)) - { - return entry.getValue(); - } - } - - return 0; - } - - public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) - { - return stack.isItemEqual(compressedStack) && (stack.getTagCompound() == null ? compressedStack.getTagCompound() == null : stack.getTagCompound().equals(compressedStack.getTagCompound())); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/compress/package-info.java b/src/main/java/WayofTime/bloodmagic/api/compress/package-info.java deleted file mode 100644 index d630cf23..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/compress/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.compress; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/event/AddToNetworkEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/AddToNetworkEvent.java deleted file mode 100644 index cc47880d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/AddToNetworkEvent.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -@Cancelable -public class AddToNetworkEvent extends Event -{ - public final String ownerNetwork; - public int addedAmount; - public int maximum; - - /** - * This event is called whenever the network is added to. If cancelled, no - * LP will be drained from the source. If result is set to Result.DENY, the - * LP will still be drained but the soul network will not be added to. - * - * @param ownerNetwork - * Key used for the soul network - * @param addedAmount - * Amount added - * @param maximum - * Ceiling that the network can add to - */ - public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum) - { - this.ownerNetwork = ownerNetwork; - this.addedAmount = addedAmount; - this.maximum = maximum; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java deleted file mode 100644 index 6ea69d0e..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; -import lombok.Getter; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Event; - -/** - * Fired whenever a craft is completed in a BloodAltar. - * - * It is not cancelable, however you can modify the output stack. - */ -@Getter -public class AltarCraftedEvent extends Event -{ - - private final AltarRecipeRegistry.AltarRecipe altarRecipe; - private final ItemStack output; - - /** - * @param altarRecipe - * - The recipe that was crafted. - * @param output - * - The item obtained from the recipe - */ - public AltarCraftedEvent(AltarRecipeRegistry.AltarRecipe altarRecipe, ItemStack output) - { - this.altarRecipe = altarRecipe; - this.output = output; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/BoundToolEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/BoundToolEvent.java deleted file mode 100644 index deecdc44..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/BoundToolEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -public class BoundToolEvent extends Event -{ - public EntityPlayer player; - - public BoundToolEvent(EntityPlayer player) - { - this.player = player; - } - - /** - * This event is called when a - * {@link WayofTime.bloodmagic.item.ItemBoundTool} is being charged. - * - * If canceled, will result in the charging being canceled. - */ - - @Cancelable - public static class Charge extends BoundToolEvent - { - public ItemStack result; - - public Charge(EntityPlayer player, ItemStack result) - { - super(player); - this.result = result; - } - } - - /** - * This event is called when a - * {@link WayofTime.bloodmagic.item.ItemBoundTool}'s charge is released. - * - * If canceled, will result in the charge not being released. - */ - - @Cancelable - public static class Release extends BoundToolEvent - { - public final ItemStack boundTool; - public int charge; - - public Release(EntityPlayer player, ItemStack boundTool, int charge) - { - super(player); - this.boundTool = boundTool; - this.charge = charge; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/ItemBindEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/ItemBindEvent.java deleted file mode 100644 index 10b657ba..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/ItemBindEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -@Cancelable -public class ItemBindEvent extends Event -{ - public final EntityPlayer player; - public String key; - public ItemStack itemStack; - - /** - * This event is called whenever a player attempts to bind a - * {@link WayofTime.bloodmagic.api.iface.IBindable} item. - * - * @param player - * The player doing the binding - * @param key - * The UUID of the player doing the binding - * @param itemStack - * The {@link ItemStack} that the player is binding - * - * This event is {@link Cancelable}.
- */ - public ItemBindEvent(EntityPlayer player, String key, ItemStack itemStack) - { - super(); - this.player = player; - this.key = key; - this.itemStack = itemStack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/RitualEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/RitualEvent.java deleted file mode 100644 index 45813ab6..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/RitualEvent.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -public class RitualEvent extends Event -{ - public final IMasterRitualStone mrs; - public final String ownerName; - public final Ritual ritual; - - private RitualEvent(IMasterRitualStone mrs, String ownerName, Ritual ritual) - { - this.mrs = mrs; - this.ownerName = ownerName; - this.ritual = ritual; - } - - /** - * This event is called when a ritual is activated. If cancelled, it will - * not activate. - * - * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer, Ritual)} - */ - @Cancelable - public static class RitualActivatedEvent extends RitualEvent - { - public final EntityPlayer player; - public final ItemStack crystalStack; - public int crystalTier; - - public RitualActivatedEvent(IMasterRitualStone mrs, String owner, Ritual ritual, EntityPlayer player, ItemStack activationCrystal, int crystalTier) - { - super(mrs, owner, ritual); - - this.player = player; - this.crystalStack = activationCrystal; - this.crystalTier = crystalTier; - } - } - - /** - * This event is called when a Ritual effect is performed. If cancelled, the - * effect will not happen. - * - * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, net.minecraft.util.math.BlockPos)} - */ - @Cancelable - public static class RitualRunEvent extends RitualEvent - { - public RitualRunEvent(IMasterRitualStone mrs, String owner, Ritual ritual) - { - super(mrs, owner, ritual); - } - } - - /** - * This event is called when a Ritual is stopped by a - * {@link Ritual.BreakType}. - * - * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(Ritual.BreakType)} - * */ - public static class RitualStopEvent extends RitualEvent - { - - public final Ritual.BreakType method; - - public RitualStopEvent(IMasterRitualStone mrs, String owner, Ritual ritual, Ritual.BreakType method) - { - super(mrs, owner, ritual); - - this.method = method; - } - } - - @Cancelable - public static class ImperfectRitualActivatedEvent extends Event - { - - public final IImperfectRitualStone ims; - public final String ownerName; - public final ImperfectRitual imperfectRitual; - - public ImperfectRitualActivatedEvent(IImperfectRitualStone ims, String ownerName, ImperfectRitual imperfectRitual) - { - this.ims = ims; - this.ownerName = ownerName; - this.imperfectRitual = imperfectRitual; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/SacrificeKnifeUsedEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/SacrificeKnifeUsedEvent.java deleted file mode 100644 index f3bccfe8..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/SacrificeKnifeUsedEvent.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -@Cancelable -public class SacrificeKnifeUsedEvent extends Event -{ - public final EntityPlayer player; - public final int healthDrained; - public int lpAdded; - public boolean shouldDrainHealth; - public boolean shouldFillAltar; - - /** - * This event is called whenever a player attempts to use a - * {@link WayofTime.bloodmagic.item.ItemSacrificialDagger} to self-sacrifice - * near an altar. - * - * @param player - * The player doing the sacrificing - * @param shouldDrainHealth - * Determines whether or not health is lost - * @param shouldFillAltar - * Determines whether or not an altar should be filled - * @param hp - * Amount of health lost - * @param lpAdded - * Amount of LP added to the altar - * - * This event is {@link Cancelable}.
- */ - public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp, int lpAdded) - { - this.player = player; - this.shouldDrainHealth = shouldDrainHealth; - this.shouldFillAltar = shouldFillAltar; - this.healthDrained = hp; - this.lpAdded = lpAdded; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/event/SoulNetworkEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/SoulNetworkEvent.java deleted file mode 100644 index 7b824964..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/SoulNetworkEvent.java +++ /dev/null @@ -1,97 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -import javax.annotation.Nullable; - -/** - * Base event class for Soul Network related events. - * - * {@link #ownerUUID} contains the owner's UUID {@link #syphon} contains the - * amount of LP to be drained - */ -public class SoulNetworkEvent extends Event -{ - public final String ownerUUID; - public int syphon; - - public SoulNetworkEvent(String ownerUUID, int syphon) - { - this.ownerUUID = ownerUUID; - this.syphon = syphon; - } - - /** - * This event is called when an - * {@link WayofTime.bloodmagic.api.impl.ItemBindable} is being drained - * inside of a {@link net.minecraft.tileentity.TileEntity}. - * - * If canceled, the drain will not be executed. - */ - @Cancelable - public static class ItemDrainInContainerEvent extends SoulNetworkEvent - { - public ItemStack stack; - - public ItemDrainInContainerEvent(ItemStack stack, String ownerName, int syphon) - { - super(ownerName, syphon); - this.stack = stack; - } - } - - /** - * This event is called when a {@link EntityPlayer} drains the Soul Network - * - * If canceled, the drain will not be executed. - */ - @Cancelable - public static class PlayerDrainNetworkEvent extends SoulNetworkEvent - { - public final EntityPlayer player; - // If true, will damage regardless of if the network had enough inside it - public boolean shouldDamage; - - public PlayerDrainNetworkEvent(EntityPlayer player, String ownerNetwork, int drainAmount) - { - super(ownerNetwork, drainAmount); - this.shouldDamage = false; - this.player = player; - } - } - - @Cancelable - public static class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent - { - @Nullable - public final ItemStack itemStack; - /** - * Amount of damage that would incur if the network could not drain - * properly - */ - public float damageAmount; - - /** - * Set result to deny the action i.e. damage/drain anyways. Cancelling - * event prevents action without penalties - * - * @param player - * Player using the item - * @param ownerNetwork - * Network that the item is tied to - * @param itemStack - * Item used - * @param drainAmount - * Original drain amount - change to alter cost - */ - public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, @Nullable ItemStack itemStack, int drainAmount) - { - super(player, ownerNetwork, drainAmount); - this.itemStack = itemStack; - this.damageAmount = (float) (drainAmount) / 100.0f; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/TeleposeEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/TeleposeEvent.java deleted file mode 100644 index eb9e3833..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/TeleposeEvent.java +++ /dev/null @@ -1,88 +0,0 @@ -package WayofTime.bloodmagic.api.event; - -import WayofTime.bloodmagic.api.BlockStack; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -/** - * Fired when a teleposer attempts to transpose two blocks. Use this to perform - * special cleanup or compensation, or cancel it entirely to prevent the - * transposition. - */ -@Cancelable -public class TeleposeEvent extends Event -{ - public final World initalWorld; - public final BlockPos initialBlockPos; - public final BlockStack initialStack; - - public final World finalWorld; - public final BlockPos finalBlockPos; - public final BlockStack finalStack; - - public TeleposeEvent(World initialWorld, BlockPos initialBlockPos, World finalWorld, BlockPos finalBlockPos) - { - this.initalWorld = initialWorld; - this.initialBlockPos = initialBlockPos; - this.initialStack = BlockStack.getStackFromPos(initialWorld, initialBlockPos); - - this.finalWorld = finalWorld; - this.finalBlockPos = finalBlockPos; - this.finalStack = BlockStack.getStackFromPos(finalWorld, finalBlockPos); - } - - public TileEntity getInitialTile() - { - return initalWorld.getTileEntity(initialBlockPos); - } - - public TileEntity getFinalTile() - { - return finalWorld.getTileEntity(finalBlockPos); - } - - /** - * Fired when a Teleposer attempts to move an Entity between locations. Can - * be cancelled to stop transposition. - */ - @Cancelable - public static class Ent extends TeleposeEvent - { - public final Entity entity; - - public Ent(Entity entity, World initialWorld, BlockPos initialBlockPos, World finalWorld, BlockPos finalBlockPos) - { - super(initialWorld, initialBlockPos, finalWorld, finalBlockPos); - - this.entity = entity; - } - - @Override - public TileEntity getInitialTile() throws IllegalArgumentException - { - throw new IllegalArgumentException("Attempted to get a TileEntity from an Entity Telepose Event."); - } - - @Override - public TileEntity getFinalTile() throws IllegalArgumentException - { - throw new IllegalArgumentException("Attempted to get a TileEntity from an Entity Telepose Event."); - } - - /** - * Called after the entity has been transposed. - */ - public static class Post extends Ent - { - - public Post(Entity entity, World initialWorld, BlockPos initialBlockPos, World finalWorld, BlockPos finalBlockPos) - { - super(entity, initialWorld, initialBlockPos, finalWorld, finalBlockPos); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/event/package-info.java b/src/main/java/WayofTime/bloodmagic/api/event/package-info.java deleted file mode 100644 index 311179bc..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/event/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.event; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IActivatable.java b/src/main/java/WayofTime/bloodmagic/api/iface/IActivatable.java deleted file mode 100644 index 47cd7e6e..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IActivatable.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.item.ItemStack; - -public interface IActivatable -{ - boolean getActivated(ItemStack stack); - - ItemStack setActivatedState(ItemStack stack, boolean activated); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IAlchemyArray.java b/src/main/java/WayofTime/bloodmagic/api/iface/IAlchemyArray.java deleted file mode 100644 index 62406021..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IAlchemyArray.java +++ /dev/null @@ -1,8 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.util.EnumFacing; - -public interface IAlchemyArray -{ - public abstract EnumFacing getRotation(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java b/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java deleted file mode 100644 index b75f0530..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * Implement this interface on any Item that can be bound to a player. - */ -public interface IBindable -{ - /** - * Gets the username of the Item's owner. Usually for display, such as in - * the tooltip. - * - * If the item is not bound, this will be null. - * - * @param stack - * - The owned ItemStack - * - * @return - The username of the Item's owner - */ - String getOwnerName(ItemStack stack); - - /** - * Gets the UUID of the Item's owner. - * - * If the item is not bound, this will be null. - * - * @param stack - * - The owned ItemStack - * - * @return - The UUID of the Item's owner - */ - String getOwnerUUID(ItemStack stack); - - /** - * Called when the player attempts to bind the item. - * - * @param player - * - The Player attempting to bind the item - * @param stack - * - The ItemStack to attempt binding - * - * @return If binding was successful. - */ - boolean onBind(EntityPlayer player, ItemStack stack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/ICustomAlchemyConsumable.java b/src/main/java/WayofTime/bloodmagic/api/iface/ICustomAlchemyConsumable.java deleted file mode 100644 index 06d2af92..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/ICustomAlchemyConsumable.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.item.ItemStack; - -/** - * An interface for items that have custom drainage behaviour when used in - * certain alchemy recipes. - */ -public interface ICustomAlchemyConsumable -{ - ItemStack drainUseOnAlchemyCraft(ItemStack stack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IDemonWillViewer.java b/src/main/java/WayofTime/bloodmagic/api/iface/IDemonWillViewer.java deleted file mode 100644 index 86b6d0a8..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IDemonWillViewer.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IDemonWillViewer -{ - boolean canSeeDemonWillAura(World world, ItemStack stack, EntityPlayer player); - - int getDemonWillAuraResolution(World world, ItemStack stack, EntityPlayer player); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IDocumentedBlock.java b/src/main/java/WayofTime/bloodmagic/api/iface/IDocumentedBlock.java deleted file mode 100644 index 4c8430fe..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IDocumentedBlock.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import java.util.List; - -/** - * Marks blocks as one that is documented. - * - * This documentation can be read by an - * {@link WayofTime.bloodmagic.item.ItemSanguineBook} (or child) - */ -public interface IDocumentedBlock -{ - /** - * Provides the documentation to provide to the player. Usually a - * short'n'sweet description about basic usage. - * - * @param player - * - The EntityPlayer attempting to view the Documentation. - * @param world - * - The World interaction is happening in. - * @param pos - * - The BlockPos being interacted at. - * @param state - * - The IBlockState of the interacted Block. - * - * @return - A list of formatted ITextComponent to provide to the player. - * Provide an empty list if there is no available documentation. - */ - @Nonnull - List getDocumentation(EntityPlayer player, World world, BlockPos pos, IBlockState state); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java b/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java deleted file mode 100644 index 1ba46fd4..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java +++ /dev/null @@ -1,30 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import WayofTime.bloodmagic.api.BlockStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Used to define a HarvestHandler for the Harvest Ritual. - */ -public interface IHarvestHandler -{ - /** - * Called whenever the Harvest Ritual attempts to harvest a block.
- * Use this to break the block, plant a new one, and drop the produced - * items.
- * Make sure to do checks so you are certain the blocks being handled are - * the block types you want. - * - * @param world - * - The world the - * {@link WayofTime.bloodmagic.api.ritual.IMasterRitualStone} is in. - * @param pos - * - The position of the Block being checked - * @param blockStack - * - The Block being checked - * - * @return If the block was successfully harvested. - */ - boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IItemLPContainer.java b/src/main/java/WayofTime/bloodmagic/api/iface/IItemLPContainer.java deleted file mode 100644 index 0dedec7d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IItemLPContainer.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.item.ItemStack; - -/** - * Interface used for any item that can store LP in itself - */ -public interface IItemLPContainer -{ - int getCapacity(); - - void setStoredLP(ItemStack stack, int lp); - - int getStoredLP(ItemStack stack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IMultiWillTool.java b/src/main/java/WayofTime/bloodmagic/api/iface/IMultiWillTool.java deleted file mode 100644 index dfb2afa0..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IMultiWillTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -public interface IMultiWillTool -{ - EnumDemonWillType getCurrentType(ItemStack stack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java b/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java deleted file mode 100644 index 89701cf7..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -/** - * Held items that implement this will cause the beams between routing nodes to - * render. - */ -public interface INodeRenderer -{ -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IPurificationAsh.java b/src/main/java/WayofTime/bloodmagic/api/iface/IPurificationAsh.java deleted file mode 100644 index d96db141..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IPurificationAsh.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.item.ItemStack; - -public interface IPurificationAsh -{ - double getTotalPurity(ItemStack stack); - - double getMaxPurity(ItemStack stack); - - double getPurityRate(ItemStack stack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/ISentientSwordEffectProvider.java b/src/main/java/WayofTime/bloodmagic/api/iface/ISentientSwordEffectProvider.java deleted file mode 100644 index cedfce53..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/ISentientSwordEffectProvider.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -public interface ISentientSwordEffectProvider -{ - boolean applyOnHitEffect(EnumDemonWillType type, ItemStack swordStack, ItemStack providerStack, EntityLivingBase attacker, EntityLivingBase target); - - boolean providesEffectForWill(EnumDemonWillType type); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/ISentientTool.java b/src/main/java/WayofTime/bloodmagic/api/iface/ISentientTool.java deleted file mode 100644 index e17789ff..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/ISentientTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public interface ISentientTool -{ - boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/ISigil.java b/src/main/java/WayofTime/bloodmagic/api/iface/ISigil.java deleted file mode 100644 index ef3ad2a5..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/ISigil.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Used for all {@link WayofTime.bloodmagic.api.impl.ItemSigil} EXCEPT - * Sigils of Holdings. - */ -public interface ISigil -{ - boolean performArrayEffect(World world, BlockPos pos); - - boolean hasArrayEffect(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IUpgradeTrainer.java b/src/main/java/WayofTime/bloodmagic/api/iface/IUpgradeTrainer.java deleted file mode 100644 index 892aefad..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IUpgradeTrainer.java +++ /dev/null @@ -1,16 +0,0 @@ -package WayofTime.bloodmagic.api.iface; - -import net.minecraft.item.ItemStack; - -import java.util.List; - -/** - * This interface is used for items intended to train specific upgrades while - * held in the player's inventory. - */ -public interface IUpgradeTrainer -{ - List getTrainedUpgrades(ItemStack stack); - - boolean setTrainedUpgrades(ItemStack stack, List keys); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/package-info.java b/src/main/java/WayofTime/bloodmagic/api/iface/package-info.java deleted file mode 100644 index d1022e5d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/iface/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.iface; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/impl/ItemBindable.java b/src/main/java/WayofTime/bloodmagic/api/impl/ItemBindable.java deleted file mode 100644 index 0fd8c86e..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/impl/ItemBindable.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.api.impl; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; - -/** - * Base class for all bindable items. - */ -public class ItemBindable extends Item implements IBindable -{ - public ItemBindable() - { - super(); - - setMaxStackSize(1); - } - - // IBindable - - @Override - public boolean onBind(EntityPlayer player, ItemStack stack) - { - return true; - } - - @Override - public String getOwnerName(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_NAME) : null; - } - - @Override - public String getOwnerUUID(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_UUID) : null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/impl/ItemSigil.java b/src/main/java/WayofTime/bloodmagic/api/impl/ItemSigil.java deleted file mode 100644 index 53bb0872..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/impl/ItemSigil.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.bloodmagic.api.impl; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.ISigil; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import lombok.Getter; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Base class for all (static) sigils. - */ -public class ItemSigil extends ItemBindable implements ISigil -{ - @Getter - private int lpUsed; - - public ItemSigil(int lpUsed) - { - super(); - - this.lpUsed = lpUsed; - } - - public boolean isUnusable(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - return stack.getTagCompound().getBoolean(Constants.NBT.UNUSABLE); - } - - public ItemStack setUnusable(ItemStack stack, boolean unusable) - { - NBTHelper.checkNBT(stack); - - stack.getTagCompound().setBoolean(Constants.NBT.UNUSABLE, unusable); - return stack; - } - - @Override - public boolean performArrayEffect(World world, BlockPos pos) - { - return false; - } - - @Override - public boolean hasArrayEffect() - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/impl/ItemSigilToggleable.java b/src/main/java/WayofTime/bloodmagic/api/impl/ItemSigilToggleable.java deleted file mode 100644 index a577b9f4..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/impl/ItemSigilToggleable.java +++ /dev/null @@ -1,95 +0,0 @@ -package WayofTime.bloodmagic.api.impl; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IActivatable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Base class for all toggleable sigils. - */ -public class ItemSigilToggleable extends ItemSigil implements IActivatable -{ - public ItemSigilToggleable(int lpUsed) - { - super(lpUsed); - } - - @Override - public boolean getActivated(ItemStack stack) - { - return stack != null && NBTHelper.checkNBT(stack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); - } - - @Override - public ItemStack setActivatedState(ItemStack stack, boolean activated) - { - if (stack != null) - { - NBTHelper.checkNBT(stack).getTagCompound().setBoolean(Constants.NBT.ACTIVATED, activated); - return stack; - } - - return null; - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote && !isUnusable(stack)) - { - if (player.isSneaking()) - setActivatedState(stack, !getActivated(stack)); - if (getActivated(stack) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - return super.onItemRightClick(stack, world, player, hand); - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - return (NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && onSigilUse(stack, player, world, pos, side, hitX, hitY, hitZ)) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; - } - - public boolean onSigilUse(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) - { - return false; - } - - @Override - public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) - { - if (!worldIn.isRemote && entityIn instanceof EntityPlayerMP && getActivated(stack)) - { - if (entityIn.ticksExisted % 100 == 0) - { - if (!NetworkHelper.getSoulNetwork((EntityPlayerMP) entityIn).syphonAndDamage((EntityPlayer) entityIn, getLpUsed())) - { - setActivatedState(stack, false); - } - } - - onSigilUpdate(stack, worldIn, (EntityPlayer) entityIn, itemSlot, isSelected); - } - } - - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/impl/package-info.java b/src/main/java/WayofTime/bloodmagic/api/impl/package-info.java deleted file mode 100644 index 79e9503c..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/impl/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.impl; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/incense/EnumTranquilityType.java b/src/main/java/WayofTime/bloodmagic/api/incense/EnumTranquilityType.java deleted file mode 100644 index 70331efc..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/incense/EnumTranquilityType.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.bloodmagic.api.incense; - -public enum EnumTranquilityType -{ - PLANT(), - CROP(), - TREE(), - EARTHEN(), - WATER(), - FIRE(), - LAVA(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/incense/IIncensePath.java b/src/main/java/WayofTime/bloodmagic/api/incense/IIncensePath.java deleted file mode 100644 index 797f6a11..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/incense/IIncensePath.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.api.incense; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public interface IIncensePath -{ - /** - * Goes from 0 to however far this path block can be from the altar while - * still functioning. 0 represents a block that can work when it is two - * blocks horizontally away from the altar. - */ - int getLevelOfPath(World world, BlockPos pos, IBlockState state); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/incense/ITranquilityHandler.java b/src/main/java/WayofTime/bloodmagic/api/incense/ITranquilityHandler.java deleted file mode 100644 index 95eaa4b9..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/incense/ITranquilityHandler.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.bloodmagic.api.incense; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public interface ITranquilityHandler -{ - TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/incense/IncenseTranquilityRegistry.java b/src/main/java/WayofTime/bloodmagic/api/incense/IncenseTranquilityRegistry.java deleted file mode 100644 index 28fb4754..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/incense/IncenseTranquilityRegistry.java +++ /dev/null @@ -1,33 +0,0 @@ -package WayofTime.bloodmagic.api.incense; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class IncenseTranquilityRegistry -{ - public static List handlerList = new ArrayList(); - - public static void registerTranquilityHandler(ITranquilityHandler handler) - { - handlerList.add(handler); - } - - public static TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - for (ITranquilityHandler handler : handlerList) - { - TranquilityStack tranq = handler.getTranquilityOfBlock(world, pos, block, state); - if (tranq != null) - { - return tranq; - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/incense/TranquilityStack.java b/src/main/java/WayofTime/bloodmagic/api/incense/TranquilityStack.java deleted file mode 100644 index c2855f41..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/incense/TranquilityStack.java +++ /dev/null @@ -1,13 +0,0 @@ -package WayofTime.bloodmagic.api.incense; - -public class TranquilityStack -{ - public final EnumTranquilityType type; - public double value; - - public TranquilityStack(EnumTranquilityType type, double value) - { - this.type = type; - this.value = value; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/incense/package-info.java b/src/main/java/WayofTime/bloodmagic/api/incense/package-info.java deleted file mode 100644 index a1f33e28..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/incense/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.incense; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java b/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java deleted file mode 100644 index c47b310d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.api.livingArmour; - -import com.google.common.collect.Multimap; - -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -/** - * An interface this is used purely for internal implementation. - * - * @author WayofTime - * - */ -public interface ILivingArmour -{ - Multimap getAttributeModifiers(); - - boolean canApplyUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade); - - boolean upgradeArmour(EntityPlayer user, LivingArmourUpgrade upgrade); - - boolean removeUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade); - - void notifyPlayerOfUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade); - - /** - * Ticks the upgrades and stat trackers, passing in the world and player as - * well as the LivingArmour - * - * @param world - * - The World - * @param player - * - The player wearing the Armour - */ - void onTick(World world, EntityPlayer player); - - void readFromNBT(NBTTagCompound tag); - - void writeToNBT(NBTTagCompound tag, boolean forceWrite); - - /** - * Writes the LivingArmour to the NBTTag. This will only write the trackers - * that are dirty. - * - * @param tag - * - The NBT tag to write to - */ - void writeDirtyToNBT(NBTTagCompound tag); - - void writeToNBT(NBTTagCompound tag); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/livingArmour/LivingArmourHandler.java b/src/main/java/WayofTime/bloodmagic/api/livingArmour/LivingArmourHandler.java deleted file mode 100644 index c320559b..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/livingArmour/LivingArmourHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.api.livingArmour; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import net.minecraft.nbt.NBTTagCompound; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -public class LivingArmourHandler -{ - public static List> trackers = new ArrayList>(); - public static HashMap> upgradeMap = new HashMap>(); - public static HashMap> upgradeConstructorMap = new HashMap>(); - public static HashMap upgradeMaxLevelMap = new HashMap(); - - public static void registerStatTracker(Class tracker) - { - trackers.add(tracker); - } - - /** - * Registers a LivingArmourUpgrade using its unique identifier and class. - * This is done to more easily load upgrades - * - * @param upgrade - */ - public static void registerArmourUpgrade(LivingArmourUpgrade upgrade) - { - Class clazz = upgrade.getClass(); - upgradeMap.put(upgrade.getUniqueIdentifier(), clazz); - upgradeMaxLevelMap.put(upgrade.getUniqueIdentifier(), upgrade.getMaxTier()); - try - { - Constructor ctor = clazz.getConstructor(int.class); - if (ctor == null) - { - BloodMagicAPI.getLogger().error("Error adding living armour upgrade {} as it doesn't have a valid constructor.", upgrade.getUniqueIdentifier()); - } else - { - upgradeConstructorMap.put(upgrade.getUniqueIdentifier(), ctor); - } - } catch (Exception e) - { - e.printStackTrace(); - } - - } - - public static LivingArmourUpgrade generateUpgradeFromKey(String key, int level) - { - return generateUpgradeFromKey(key, level, null); - } - - public static LivingArmourUpgrade generateUpgradeFromKey(String key, int level, NBTTagCompound tag) - { - Constructor ctor = upgradeConstructorMap.get(key); - if (ctor != null) - { - try - { - LivingArmourUpgrade upgrade = ctor.newInstance(level); - if (upgrade != null && tag != null) - { - upgrade.readFromNBT(tag); - } - return upgrade; - } catch (Exception e) - { - e.printStackTrace(); - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/livingArmour/LivingArmourUpgrade.java b/src/main/java/WayofTime/bloodmagic/api/livingArmour/LivingArmourUpgrade.java deleted file mode 100644 index 4c14add6..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/livingArmour/LivingArmourUpgrade.java +++ /dev/null @@ -1,104 +0,0 @@ -package WayofTime.bloodmagic.api.livingArmour; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -public abstract class LivingArmourUpgrade -{ - public static String chatBase = "chat.BloodMagic.livingArmour.upgrade."; - public static String tooltipBase = "tooltip.BloodMagic.livingArmour.upgrade."; - - /** - * Upgrade level 0 is the first upgrade. Upgrade goes from 0 to getMaxTier() - * - 1. - */ - protected int level = 0; - - /** - * The LivingArmourUpgrade must have a constructor that has a single integer - * parameter. Upgrades may have other constructors, but must have one of - * these. - * - * @param level - * The level of the upgrade - */ - public LivingArmourUpgrade(int level) - { - this.level = Math.min(level, getMaxTier() - 1); - } - - public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - return 0; - } - - public double getKnockbackOnHit(EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - return 0; - } - - /** - * Percentage of damage blocked. This stacks multiplicities with other - * upgrades. - * - * @return 0 for no damage blocked, 1 for full damage blocked - */ - public double getArmourProtection(EntityLivingBase wearer, DamageSource source) - { - return 0; - } - - public int getUpgradeLevel() - { - return this.level; - } - - public abstract String getUniqueIdentifier(); - - public abstract String getUnlocalizedName(); - - public abstract int getMaxTier(); - - public abstract int getCostOfUpgrade(); - - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - } - - public Multimap getAttributeModifiers() - { - return HashMultimap.create(); - } - - public double getMiningSpeedModifier(EntityPlayer player) - { - return 1; - } - - public abstract void writeToNBT(NBTTagCompound tag); - - public abstract void readFromNBT(NBTTagCompound tag); - - public int getRunicShielding() - { - return 0; - } - - public boolean runOnClient() - { - return false; - } - - public boolean isDowngrade() - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/livingArmour/StatTracker.java b/src/main/java/WayofTime/bloodmagic/api/livingArmour/StatTracker.java deleted file mode 100644 index ee27a048..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/livingArmour/StatTracker.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.bloodmagic.api.livingArmour; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.livingArmour.LivingArmour; - -public abstract class StatTracker -{ - private boolean isDirty = false; - - public abstract String getUniqueIdentifier(); - - /** - * When called the StatTracker should reset all of its data, including - * upgrades. - */ - public abstract void resetTracker(); - - public abstract void readFromNBT(NBTTagCompound tag); - - public abstract void writeToNBT(NBTTagCompound tag); - - /** - * Called each tick to update the tracker's information. Called in - * LivingArmour - * - * @param world - * World the player is in - * @param player - * The player that has the armour equipped - * @param livingArmour - * The equipped LivingArmour - * @return True if there is a new upgrade unlocked this tick. - */ - public abstract boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour); - - public abstract void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour); - - public abstract List getUpgrades(); - - /** - * Used to obtain the progress from the current level to the next level. - * - * 0.0 being 0% - 1.0 being 100%. - * - * @param livingArmour - * The equipped LivingArmour - * @return the progress from the current level to the next level. - */ - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return 1.0D; - } - - public final boolean isDirty() - { - return isDirty; - } - - public final void markDirty() - { - this.isDirty = true; - } - - public final void resetDirty() - { - this.isDirty = false; - } - - public abstract boolean providesUpgrade(String key); - - public abstract void onArmourUpgradeAdded(LivingArmourUpgrade upgrade); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/livingArmour/package-info.java b/src/main/java/WayofTime/bloodmagic/api/livingArmour/package-info.java deleted file mode 100644 index 0c4b0d82..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/livingArmour/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.livingArmour; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java b/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java deleted file mode 100644 index a1a97ebf..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java +++ /dev/null @@ -1,206 +0,0 @@ -package WayofTime.bloodmagic.api.network; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.AddToNetworkEvent; -import WayofTime.bloodmagic.api.event.SoulNetworkEvent; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; - -import com.google.common.base.Strings; - -import lombok.Getter; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraft.world.World; -import net.minecraft.world.WorldSavedData; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.eventhandler.Event; - -import javax.annotation.Nullable; - -@Getter -@Deprecated -/** - * Deprecated in favor of new system in {@link WayofTime.bloodmagic.api.saving.BMWorldSavedData} and - * {@link WayofTime.bloodmagic.api.saving.SoulNetwork} - */ -public class SoulNetwork extends WorldSavedData -{ - @Nullable - private final EntityPlayer player; - private int currentEssence; - private int orbTier; - - public SoulNetwork(String name) - { - super(name); - - currentEssence = 0; - orbTier = 0; - player = PlayerHelper.getPlayerFromUUID(name); - } - - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) - { - currentEssence = nbttagcompound.getInteger(Constants.NBT.CURRENT_ESSENCE); - orbTier = nbttagcompound.getInteger(Constants.NBT.ORB_TIER); - } - - @Override - public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) - { - nbttagcompound.setInteger(Constants.NBT.CURRENT_ESSENCE, currentEssence); - nbttagcompound.setInteger(Constants.NBT.ORB_TIER, orbTier); - return nbttagcompound; - } - - public int addLifeEssence(int toAdd, int maximum) - { - AddToNetworkEvent event = new AddToNetworkEvent(mapName, toAdd, maximum); - - if (MinecraftForge.EVENT_BUS.post(event)) - return 0; - - if (FMLCommonHandler.instance().getMinecraftServerInstance() == null) - return 0; - - World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServers[0]; - SoulNetwork data = (SoulNetwork) world.loadItemData(SoulNetwork.class, event.ownerNetwork); - - if (data == null) - { - data = new SoulNetwork(event.ownerNetwork); - world.setItemData(event.ownerNetwork, data); - } - - int currEss = data.getCurrentEssence(); - - if (currEss >= event.maximum) - return 0; - - int newEss = Math.min(event.maximum, currEss + event.addedAmount); - if (event.getResult() != Event.Result.DENY) - data.setCurrentEssence(newEss); - - markDirty(); - - return newEss - currEss; - } - - /** - * Used to syphon LP from the network - * - * @param syphon - * - The amount of LP to syphon - * - * @return The amount of LP syphoned - */ - public int syphon(int syphon) - { - if (getCurrentEssence() >= syphon) - { - setCurrentEssence(getCurrentEssence() - syphon); - return syphon; - } - - return 0; - } - - /** - * Syphons from the network of the owner. If not enough LP is found, it will - * instead take away from the user's health. - * - * Always returns false on the client side. - * - * @param user - * - The Player to syphon from - * @param toSyphon - * - The amount of LP to syphon - * - * @return - Whether the action should be performed. - */ - public boolean syphonAndDamage(EntityPlayer user, int toSyphon) - { - if (user != null) - { - if (user.worldObj.isRemote) - return false; - - if (!Strings.isNullOrEmpty(mapName)) - { - SoulNetworkEvent.ItemDrainNetworkEvent event = new SoulNetworkEvent.ItemDrainNetworkEvent(user, mapName, null, toSyphon); - - if (MinecraftForge.EVENT_BUS.post(event)) - return false; - - int drainAmount = syphon(event.syphon); - - if (drainAmount <= 0 || event.shouldDamage) - hurtPlayer(user, event.syphon); - - return event.getResult() != Event.Result.DENY; - } - - int amount = syphon(toSyphon); - hurtPlayer(user, toSyphon - amount); - - return true; - } - - return false; - } - - public void hurtPlayer(EntityPlayer user, float syphon) - { - if (user != null) - { - if (syphon < 100 && syphon > 0) - { - if (!user.capabilities.isCreativeMode) - { - user.hurtResistantTime = 0; - user.attackEntityFrom(BloodMagicAPI.getDamageSource(), 1.0F); - } - - } else if (syphon >= 100) - { - if (!user.capabilities.isCreativeMode) - { - for (int i = 0; i < ((syphon + 99) / 100); i++) - { - user.hurtResistantTime = 0; - user.attackEntityFrom(BloodMagicAPI.getDamageSource(), 1.0F); - } - } - } - } - } - - public void causeNauseaToPlayer() - { - if (getPlayer() != null) - { - getPlayer().addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 99)); - } - } - - public SoulNetwork setCurrentEssence(int currentEssence) - { - this.currentEssence = currentEssence; - markDirty(); - return this; - } - - public SoulNetwork setOrbTier(int orbTier) - { - this.orbTier = orbTier; - markDirty(); - return this; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/network/package-info.java b/src/main/java/WayofTime/bloodmagic/api/network/package-info.java deleted file mode 100644 index 6661a13d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/network/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.network; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/orb/BloodOrb.java b/src/main/java/WayofTime/bloodmagic/api/orb/BloodOrb.java deleted file mode 100644 index fb15cdb1..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/orb/BloodOrb.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.bloodmagic.api.orb; - -import WayofTime.bloodmagic.api.registry.OrbRegistry; - -/** - * Base object for all Blood Orbs. Makes Orb creation quite a bit easier. - * - * Just create a new BloodOrb instance then register it with - * {@link OrbRegistry#registerOrb(BloodOrb)} This will allow the use of just one - * item ID for all orbs. If an addon dev needs more control over the intricacies - * of their orb (custom right clicking, renderers, etc), they can just create - * their own item as normal. - */ -public class BloodOrb -{ - private String name; - private int tier; - private int capacity; - private String owner = "BloodMagic"; - - /** - * A base object for BloodOrbs. A bit cleaner than the old way through - * EnergyItems. - * - * @param name - * - A name for the Orb. Gets put into an unlocalized name. - * @param tier - * - The tier of the Orb. - * @param capacity - * - The max amount of LP the Orb can store. - */ - public BloodOrb(String name, int tier, int capacity) - { - this.name = name; - this.tier = tier; - this.capacity = capacity; - } - - public String getName() - { - return name; - } - - public int getTier() - { - return tier; - } - - public int getCapacity() - { - return capacity; - } - - public String getOwner() - { - return owner; - } - - /** - * For setting the MODID of the mod that creates the Orb. Not required, but - * preferred. - * - * @return - The BloodOrb object for further use. - */ - public BloodOrb setOwner(String owner) - { - this.owner = owner; - return this; - } - - @Override - public String toString() - { - return "BloodOrb{" + "name='" + name + '\'' + ", tier=" + tier + ", capacity=" + capacity + ", owner=" + owner + '}'; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/orb/IBloodOrb.java b/src/main/java/WayofTime/bloodmagic/api/orb/IBloodOrb.java deleted file mode 100644 index 998a0205..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/orb/IBloodOrb.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.bloodmagic.api.orb; - -public interface IBloodOrb -{ - BloodOrb getOrb(int meta); - - int getMaxEssence(int meta); - - int getOrbLevel(int meta); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/orb/package-info.java b/src/main/java/WayofTime/bloodmagic/api/orb/package-info.java deleted file mode 100644 index 12df1f09..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/orb/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.orb; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/package-info.java b/src/main/java/WayofTime/bloodmagic/api/package-info.java deleted file mode 100644 index f516a3de..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -@API(owner = "BloodMagic", provides = "BloodMagic|API", apiVersion = "@VERSION@") -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package WayofTime.bloodmagic.api; - -import mcp.MethodsReturnNonnullByDefault; -import net.minecraftforge.fml.common.API; - -import javax.annotation.ParametersAreNonnullByDefault; - diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/AlchemyTableCustomRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/AlchemyTableCustomRecipe.java deleted file mode 100644 index 59945067..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/AlchemyTableCustomRecipe.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.api.recipe; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.iface.ICustomAlchemyConsumable; - -public class AlchemyTableCustomRecipe extends AlchemyTableRecipe -{ - public AlchemyTableCustomRecipe(Block result, int lpDrained, int ticksRequired, int tierRequired, Object... recipe) - { - this(new ItemStack(result), lpDrained, ticksRequired, tierRequired, recipe); - } - - public AlchemyTableCustomRecipe(Item result, int lpDrained, int ticksRequired, int tierRequired, Object... recipe) - { - this(new ItemStack(result), lpDrained, ticksRequired, tierRequired, recipe); - } - - public AlchemyTableCustomRecipe(ItemStack result, int lpDrained, int ticksRequired, int tierRequired, Object... recipe) - { - super(result, lpDrained, ticksRequired, tierRequired, recipe); - } - - @Override - protected ItemStack getContainerItem(ItemStack stack) - { - if (stack == null) - { - return null; - } - - ItemStack copyStack = stack.copy(); - - if (copyStack.getItem() instanceof ICustomAlchemyConsumable) - { - return ((ICustomAlchemyConsumable) copyStack.getItem()).drainUseOnAlchemyCraft(copyStack); - } - - if (copyStack.getItem().hasContainerItem(stack)) - { - return copyStack.getItem().getContainerItem(copyStack); - } - - copyStack.stackSize--; - if (copyStack.stackSize <= 0) - { - return null; - } - - return copyStack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/AlchemyTableRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/AlchemyTableRecipe.java deleted file mode 100644 index 457d180f..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/AlchemyTableRecipe.java +++ /dev/null @@ -1,189 +0,0 @@ -package WayofTime.bloodmagic.api.recipe; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -public class AlchemyTableRecipe -{ - protected ItemStack output = null; - protected ArrayList input = new ArrayList(); - @Getter - protected int lpDrained; - @Getter - protected int ticksRequired; - @Getter - protected int tierRequired; - - public AlchemyTableRecipe(Block result, int lpDrained, int ticksRequired, int tierRequired, Object... recipe) - { - this(new ItemStack(result), lpDrained, ticksRequired, tierRequired, recipe); - } - - public AlchemyTableRecipe(Item result, int lpDrained, int ticksRequired, int tierRequired, Object... recipe) - { - this(new ItemStack(result), lpDrained, ticksRequired, tierRequired, recipe); - } - - public AlchemyTableRecipe(ItemStack result, int lpDrained, int ticksRequired, int tierRequired, Object... recipe) - { - output = result.copy(); - this.lpDrained = lpDrained; - this.ticksRequired = ticksRequired; - this.tierRequired = tierRequired; - for (Object in : recipe) - { - if (in instanceof ItemStack) - { - input.add(((ItemStack) in).copy()); - } else if (in instanceof Item) - { - input.add(new ItemStack((Item) in)); - } else if (in instanceof Block) - { - input.add(new ItemStack((Block) in)); - } else if (in instanceof String) - { - input.add(OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid alchemy recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - } - - /** - * Returns the size of the recipe area - */ - public int getRecipeSize() - { - return input.size(); - } - - /** - * Returns the output of the recipe, sensitive to the input list provided. - * If the input list does not technically match, the recipe should return - * the default output. - * - * @param inputList - * @return - */ - public ItemStack getRecipeOutput(List inputList) - { - return output.copy(); - } - - /** - * Used to check if a recipe matches current crafting inventory. World and - * BlockPos are for future-proofing - */ - @SuppressWarnings("unchecked") - public boolean matches(List checkedList, World world, BlockPos pos) - { - ArrayList required = new ArrayList(input); - - for (int x = 0; x < checkedList.size(); x++) - { - ItemStack slot = checkedList.get(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack) next, slot, false); - } else if (next instanceof List) - { - Iterator itr = ((List) next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) - { - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - /** - * Returns the input for this recipe, any mod accessing this value should - * never manipulate the values in this array as it will effect the recipe - * itself. - * - * @return The recipes input vales. - */ - public ArrayList getInput() - { - return this.input; - } - - public ItemStack[] getRemainingItems(ItemStack[] inventory) - { - ItemStack[] ret = inventory.clone(); - for (int i = 0; i < ret.length; i++) - { - ret[i] = getContainerItem(inventory[i]); - } - - return ret; - } - - protected ItemStack getContainerItem(ItemStack stack) - { - if (stack == null) - { - return null; - } - - ItemStack copyStack = stack.copy(); - - if (copyStack.getItem().hasContainerItem(stack)) - { - return copyStack.getItem().getContainerItem(copyStack); - } - - copyStack.stackSize--; - if (copyStack.stackSize <= 0) - { - return null; - } - - return copyStack; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/LivingArmourDowngradeRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/LivingArmourDowngradeRecipe.java deleted file mode 100644 index 053c0baa..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/LivingArmourDowngradeRecipe.java +++ /dev/null @@ -1,185 +0,0 @@ -package WayofTime.bloodmagic.api.recipe; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourDowngradeRecipe -{ - protected LivingArmourUpgrade upgrade = null; - protected ItemStack keyStack = null; - protected ArrayList input = new ArrayList(); - - public LivingArmourDowngradeRecipe(LivingArmourUpgrade upgrade, ItemStack keyStack, Object... recipe) - { - this.upgrade = upgrade; - this.keyStack = keyStack; - for (Object in : recipe) - { - if (in instanceof ItemStack) - { - input.add(((ItemStack) in).copy()); - } else if (in instanceof Item) - { - input.add(new ItemStack((Item) in)); - } else if (in instanceof Block) - { - input.add(new ItemStack((Block) in)); - } else if (in instanceof String) - { - input.add(OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid living armour downgrade recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += upgrade.toString(); - throw new RuntimeException(ret); - } - } - } - - /** - * Returns the size of the recipe area - */ - public int getRecipeSize() - { - return input.size(); - } - - public LivingArmourUpgrade getRecipeOutput() - { - return upgrade; - } - - /** - * Used to check if a recipe matches current crafting inventory. World and - * BlockPos are for future-proofing - */ - @SuppressWarnings("unchecked") - public boolean matches(ItemStack key, List checkedList, World world, BlockPos pos) - { - if (!OreDictionary.itemMatches(keyStack, key, false)) - { - return false; - } - - ArrayList required = new ArrayList(input); - - for (int x = 0; x < checkedList.size(); x++) - { - ItemStack slot = checkedList.get(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack) next, slot, false); - } else if (next instanceof List) - { - Iterator itr = ((List) next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) - { - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - /** - * Returns the input for this recipe, any mod accessing this value should - * never manipulate the values in this array as it will effect the recipe - * itself. - * - * @return The recipes input vales. - */ - public ArrayList getInput() - { - return this.input; - } - - public ItemStack getKey() - { - return this.keyStack; - } - - public void consumeInventory(IItemHandler inv) - { - for (int i = 0; i < inv.getSlots(); i++) - { - ItemStack stack = inv.getStackInSlot(i); - if (stack == null) - { - continue; - } - - if (stack.getItem().hasContainerItem(stack)) - { - inv.extractItem(i, stack.stackSize, false); - inv.insertItem(i, stack.getItem().getContainerItem(stack), false); - } else - { - inv.extractItem(i, 1, false); - } - } - } - - protected ItemStack getContainerItem(ItemStack stack) - { - if (stack == null) - { - return null; - } - - ItemStack copyStack = stack.copy(); - - if (copyStack.getItem().hasContainerItem(stack)) - { - return copyStack.getItem().getContainerItem(copyStack); - } - - copyStack.stackSize--; - if (copyStack.stackSize <= 0) - { - return null; - } - - return copyStack; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/ShapedBloodOrbRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/ShapedBloodOrbRecipe.java deleted file mode 100644 index 36eb1f27..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/ShapedBloodOrbRecipe.java +++ /dev/null @@ -1,304 +0,0 @@ -package WayofTime.bloodmagic.api.recipe; - -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import net.minecraft.block.Block; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -/** - * Shaped Blood Orb Recipe Handler by joshie * - */ -public class ShapedBloodOrbRecipe implements IRecipe -{ - private static final int MAX_CRAFT_GRID_WIDTH = 3; - private static final int MAX_CRAFT_GRID_HEIGHT = 3; - - private ItemStack output = null; - private Object[] input = null; - public int width = 0; - public int height = 0; - private int tier; - private boolean mirrored = true; - - public ShapedBloodOrbRecipe(Block result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapedBloodOrbRecipe(Item result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapedBloodOrbRecipe(ItemStack result, Object... recipe) - { - output = result.copy(); - - String shape = ""; - int idx = 0; - - if (recipe[idx] instanceof Boolean) - { - mirrored = (Boolean) recipe[idx]; - if (recipe[idx + 1] instanceof Object[]) - { - recipe = (Object[]) recipe[idx + 1]; - } else - { - idx = 1; - } - } - - if (recipe[idx] instanceof String[]) - { - String[] parts = ((String[]) recipe[idx++]); - - for (String s : parts) - { - width = s.length(); - shape += s; - } - - height = parts.length; - } else - { - while (recipe[idx] instanceof String) - { - String s = (String) recipe[idx++]; - shape += s; - width = s.length(); - height++; - } - } - - if (width * height != shape.length()) - { - String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - - HashMap itemMap = new HashMap(); - - for (; idx < recipe.length; idx += 2) - { - Character chr = (Character) recipe[idx]; - Object in = recipe[idx + 1]; - - if (in instanceof IBloodOrb || (in instanceof ItemStack && ((ItemStack) in).getItem() instanceof IBloodOrb)) - { - // If the item is an instanceof IBloodOrb then save the level of - // the orb. - if (in instanceof ItemStack) - { - ItemStack inStack = (ItemStack) in; - tier = ((IBloodOrb) inStack.getItem()).getOrbLevel(inStack.getItemDamage()); - itemMap.put(chr, tier); - } else - { - tier = ((IBloodOrb) in).getOrbLevel(0); - itemMap.put(chr, tier); - } - } else if (in instanceof ItemStack) - { - itemMap.put(chr, ((ItemStack) in).copy()); - } else if (in instanceof Item) - { - itemMap.put(chr, new ItemStack((Item) in)); - } else if (in instanceof Block) - { - itemMap.put(chr, new ItemStack((Block) in, 1, OreDictionary.WILDCARD_VALUE)); - } else if (in instanceof String) - { - itemMap.put(chr, OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid shaped orb recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - - input = new Object[width * height]; - int x = 0; - for (char chr : shape.toCharArray()) - { - input[x++] = itemMap.get(chr); - } - } - - ShapedBloodOrbRecipe(ShapedRecipes recipe, Map replacements) - { - output = recipe.getRecipeOutput(); - width = recipe.recipeWidth; - height = recipe.recipeHeight; - - input = new Object[recipe.recipeItems.length]; - - for (int i = 0; i < input.length; i++) - { - ItemStack ingred = recipe.recipeItems[i]; - - if (ingred == null) - continue; - - input[i] = recipe.recipeItems[i]; - - for (Entry replace : replacements.entrySet()) - { - if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) - { - input[i] = OreDictionary.getOres(replace.getValue()); - break; - } - } - } - } - - @Override - public ItemStack getCraftingResult(InventoryCrafting var1) - { - return output.copy(); - } - - @Override - public int getRecipeSize() - { - return input.length; - } - - @Override - public ItemStack getRecipeOutput() - { - return output; - } - - @Override - public boolean matches(InventoryCrafting inv, World world) - { - for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) - { - for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) - { - if (checkMatch(inv, x, y, false)) - { - return true; - } - - if (mirrored && checkMatch(inv, x, y, true)) - { - return true; - } - } - } - - return false; - } - - @SuppressWarnings("unchecked") - private boolean checkMatch(InventoryCrafting inv, int startX, int startY, boolean mirror) - { - for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) - { - for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++) - { - int subX = x - startX; - int subY = y - startY; - Object target = null; - - if (subX >= 0 && subY >= 0 && subX < width && subY < height) - { - if (mirror) - { - target = input[width - subX - 1 + subY * width]; - } else - { - target = input[subX + subY * width]; - } - } - - ItemStack slot = inv.getStackInRowAndColumn(x, y); - // If target is integer, then we should be check the blood orb - // value of the item instead - if (target instanceof Integer) - { - if (slot != null && slot.getItem() instanceof IBloodOrb) - { - IBloodOrb orb = (IBloodOrb) slot.getItem(); - if (orb.getOrbLevel(slot.getItemDamage()) < (Integer) target) - { - return false; - } - } else - return false; - } else if (target instanceof ItemStack) - { - if (!OreDictionary.itemMatches((ItemStack) target, slot, false)) - { - return false; - } - } else if (target instanceof List) - { - boolean matched = false; - - Iterator itr = ((List) target).iterator(); - while (itr.hasNext() && !matched) - { - matched = OreDictionary.itemMatches(itr.next(), slot, false); - } - - if (!matched) - { - return false; - } - } else if (target == null && slot != null) - { - return false; - } - } - } - - return true; - } - - public ShapedBloodOrbRecipe setMirrored(boolean mirror) - { - mirrored = mirror; - return this; - } - - public Object[] getInput() - { - return this.input; - } - - public ItemStack[] getRemainingItems(InventoryCrafting inv) - { - return ForgeHooks.defaultRecipeGetRemainingItems(inv); - } - - public int getTier() - { - return tier; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/ShapelessBloodOrbRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/ShapelessBloodOrbRecipe.java deleted file mode 100644 index c5626e3b..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/ShapelessBloodOrbRecipe.java +++ /dev/null @@ -1,207 +0,0 @@ -package WayofTime.bloodmagic.api.recipe; - -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import net.minecraft.block.Block; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -/** - * Shapeless Blood Orb Recipe Handler by joshie * - */ -public class ShapelessBloodOrbRecipe implements IRecipe -{ - private ItemStack output = null; - private ArrayList input = new ArrayList(); - private int tier; - - public ShapelessBloodOrbRecipe(Block result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapelessBloodOrbRecipe(Item result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapelessBloodOrbRecipe(ItemStack result, Object... recipe) - { - output = result.copy(); - for (Object in : recipe) - { - if (in instanceof IBloodOrb || (in instanceof ItemStack && ((ItemStack) in).getItem() instanceof IBloodOrb)) - { - // If the item is an instanceof IBloodOrb then save the level of - // the orb. - if (in instanceof ItemStack) - { - ItemStack inStack = (ItemStack) in; - tier = ((IBloodOrb) inStack.getItem()).getOrbLevel(inStack.getItemDamage()); - input.add(tier); - } else - { - tier = ((IBloodOrb) in).getOrbLevel(0); - input.add(tier); - } - } else if (in instanceof ItemStack) - { - input.add(((ItemStack) in).copy()); - } else if (in instanceof Item) - { - input.add(new ItemStack((Item) in)); - } else if (in instanceof Block) - { - input.add(new ItemStack((Block) in)); - } else if (in instanceof String) - { - input.add(OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid shapeless ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - } - - ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map replacements) - { - output = recipe.getRecipeOutput(); - - for (ItemStack ingred : ((List) recipe.recipeItems)) - { - Object finalObj = ingred; - for (Entry replace : replacements.entrySet()) - { - if (OreDictionary.itemMatches(replace.getKey(), ingred, false)) - { - finalObj = OreDictionary.getOres(replace.getValue()); - break; - } - } - input.add(finalObj); - } - } - - @Override - public int getRecipeSize() - { - return input.size(); - } - - @Override - public ItemStack getRecipeOutput() - { - return output; - } - - @Override - public ItemStack getCraftingResult(InventoryCrafting var1) - { - return output.copy(); - } - - @SuppressWarnings("unchecked") - @Override - public boolean matches(InventoryCrafting var1, World world) - { - ArrayList required = new ArrayList(input); - - for (int x = 0; x < var1.getSizeInventory(); x++) - { - ItemStack slot = var1.getStackInSlot(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - // If target is integer, then we should be check the blood - // orb value of the item instead - if (next instanceof Integer) - { - if (slot.getItem() instanceof IBloodOrb) - { - IBloodOrb orb = (IBloodOrb) slot.getItem(); - if (orb.getOrbLevel(slot.getItemDamage()) < (Integer) next) - { - return false; - } - } else - return false; - match = true; - } else if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack) next, slot, false); - } else if (next instanceof List) - { - Iterator itr = ((List) next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) - { - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - public ArrayList getInput() - { - return this.input; - } - - @Override - public ItemStack[] getRemainingItems(InventoryCrafting inv) - { - ItemStack[] aitemstack = new ItemStack[inv.getSizeInventory()]; - - for (int i = 0; i < aitemstack.length; ++i) - { - ItemStack itemstack = inv.getStackInSlot(i); - aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack); - } - - return aitemstack; - } - - public int getTier() - { - return tier; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/TartaricForgeRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/TartaricForgeRecipe.java deleted file mode 100644 index 073ea5c5..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/TartaricForgeRecipe.java +++ /dev/null @@ -1,144 +0,0 @@ -package WayofTime.bloodmagic.api.recipe; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -public class TartaricForgeRecipe -{ - protected ItemStack output = null; - protected ArrayList input = new ArrayList(); - @Getter - protected double minimumSouls; - @Getter - protected double soulsDrained; - - public TartaricForgeRecipe(Block result, double minSouls, double drain, Object... recipe) - { - this(new ItemStack(result), minSouls, drain, recipe); - } - - public TartaricForgeRecipe(Item result, double minSouls, double drain, Object... recipe) - { - this(new ItemStack(result), minSouls, drain, recipe); - } - - public TartaricForgeRecipe(ItemStack result, double minSouls, double drain, Object... recipe) - { - output = result.copy(); - this.minimumSouls = minSouls; - this.soulsDrained = drain; - for (Object in : recipe) - { - if (in instanceof ItemStack) - { - input.add(((ItemStack) in).copy()); - } else if (in instanceof Item) - { - input.add(new ItemStack((Item) in)); - } else if (in instanceof Block) - { - input.add(new ItemStack((Block) in)); - } else if (in instanceof String) - { - input.add(OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid soul forge recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - } - - /** - * Returns the size of the recipe area - */ - public int getRecipeSize() - { - return input.size(); - } - - public ItemStack getRecipeOutput() - { - return output.copy(); - } - - /** - * Used to check if a recipe matches current crafting inventory. World and - * BlockPos are for future-proofing - */ - @SuppressWarnings("unchecked") - public boolean matches(List checkedList, World world, BlockPos pos) - { - ArrayList required = new ArrayList(input); - - for (int x = 0; x < checkedList.size(); x++) - { - ItemStack slot = checkedList.get(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack) next, slot, false); - } else if (next instanceof List) - { - Iterator itr = ((List) next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) - { - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - /** - * Returns the input for this recipe, any mod accessing this value should - * never manipulate the values in this array as it will effect the recipe - * itself. - * - * @return The recipes input vales. - */ - public ArrayList getInput() - { - return this.input; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/package-info.java b/src/main/java/WayofTime/bloodmagic/api/recipe/package-info.java deleted file mode 100644 index 0df6d474..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.recipe; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java deleted file mode 100644 index 349d315d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java +++ /dev/null @@ -1,399 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import javax.annotation.Nullable; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffectCrafting; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - -public class AlchemyArrayRecipeRegistry -{ - public static final AlchemyCircleRenderer defaultRenderer = new AlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BaseArray.png")); - - private static BiMap, AlchemyArrayRecipe> recipes = HashBiMap.create(); - private static HashMap effectMap = new HashMap(); - - /** - * General case for creating an AlchemyArrayEffect for a given input. - * - * @param input - * - Input item(s) that is used to change the Alchemy Circle into the - * circle that you are making - * @param catalystStack - * - Catalyst item that, when right-clicked onto the array, will - * cause an effect - * @param arrayEffect - * - The effect that will be activated once the array is activated - * @param circleRenderer - * - Circle rendered when the array is passive - can be substituted - * for a special renderer - */ - public static void registerRecipe(List input, @Nullable ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) - { - effectMap.put(arrayEffect.getKey(), arrayEffect); - - for (Entry, AlchemyArrayRecipe> entry : recipes.entrySet()) - { - AlchemyArrayRecipe arrayRecipe = entry.getValue(); - if (arrayRecipe.doesInputMatchRecipe(input)) - { - AlchemyArrayEffect eff = arrayRecipe.getAlchemyArrayEffectForCatalyst(catalystStack); - if (eff != null) - { - return; // Recipe already exists! - } else - { - arrayRecipe.catalystMap.put(ItemStackWrapper.getHolder(catalystStack), arrayEffect); - if (circleRenderer != null) - { - if (arrayRecipe.defaultCircleRenderer == null) - { - arrayRecipe.defaultCircleRenderer = circleRenderer; - } else - { - arrayRecipe.circleMap.put(ItemStackWrapper.getHolder(catalystStack), circleRenderer); - } - } - return; - } - } - } - - if (circleRenderer == null) - { - recipes.put(input, new AlchemyArrayRecipe(input, catalystStack, arrayEffect, defaultRenderer)); - } else - { - recipes.put(input, new AlchemyArrayRecipe(input, catalystStack, arrayEffect, circleRenderer)); - } - } - - public static AlchemyArrayEffect getAlchemyArrayEffect(String key) - { - return effectMap.get(key); - } - - /** - * - * @param key - * @return an array of two ItemStacks - first index is the input stack, - * second is the catalyst stack. Returns {null, null} if no recipe - * is valid. - */ - public static ItemStack[] getRecipeForArrayEffect(String key) - { - for (Entry, AlchemyArrayRecipe> entry : recipes.entrySet()) - { - AlchemyArrayRecipe recipe = entry.getValue(); - if (recipe != null && entry.getKey().size() > 0) - { - for (Entry effectEntry : recipe.catalystMap.entrySet()) - { - if (effectEntry.getValue() != null && effectEntry.getValue().key.equals(key)) - { - return new ItemStack[] { entry.getKey().get(0), effectEntry.getKey().toStack() }; - } - } - } - } - - return new ItemStack[] { null, null }; - } - - /** - * @param Output - * of the recipe - * @return an array of two ItemStacks - first index is the input stack, - * second is the catalyst stack. Returns {null, null} if no recipe - * is valid. - */ - public static ItemStack[] getRecipeForOutputStack(ItemStack stack) - { - for (Entry, AlchemyArrayRecipe> entry : recipes.entrySet()) - { - AlchemyArrayRecipe recipe = entry.getValue(); - if (recipe != null && entry.getKey().size() > 0) - { - for (Entry effectEntry : recipe.catalystMap.entrySet()) - { - if (effectEntry.getValue() instanceof AlchemyArrayEffectCrafting) - { - AlchemyArrayEffectCrafting craftingEffect = (AlchemyArrayEffectCrafting) effectEntry.getValue(); - ItemStack resultStack = craftingEffect.getOutputStack(); - if (resultStack != null && resultStack.getItem() != null) - { - if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage()) - { - return new ItemStack[] { entry.getKey().get(0), effectEntry.getKey().toStack() }; - } - } - } - } - } - } - - return new ItemStack[] { null, null }; - } - - public static void registerCraftingRecipe(ItemStack input, ItemStack catalystStack, ItemStack outputStack, ResourceLocation arrayResource) - { - registerRecipe(input, catalystStack, new AlchemyArrayEffectCrafting(outputStack), arrayResource); - } - - public static void registerCraftingRecipe(List inputStacks, ItemStack catalystStack, ItemStack outputStack, ResourceLocation arrayResource) - { - registerRecipe(inputStacks, catalystStack, new AlchemyArrayEffectCrafting(outputStack), arrayResource); - } - - public static void registerCraftingRecipe(String inputOreDict, ItemStack catalystStack, ItemStack outputStack, ResourceLocation arrayResource) - { - registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, new AlchemyArrayEffectCrafting(outputStack), arrayResource); - } - - public static void registerCraftingRecipe(ItemStack input, ItemStack catalystStack, ItemStack outputStack) - { - registerRecipe(input, catalystStack, new AlchemyArrayEffectCrafting(outputStack)); - } - - public static void registerCraftingRecipe(List inputStacks, ItemStack catalystStack, ItemStack outputStack) - { - registerRecipe(inputStacks, catalystStack, new AlchemyArrayEffectCrafting(outputStack)); - } - - public static void registerCraftingRecipe(String inputOreDict, ItemStack catalystStack, ItemStack outputStack) - { - registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, new AlchemyArrayEffectCrafting(outputStack)); - } - - public static void registerRecipe(ItemStack inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, ResourceLocation arrayResource) - { - AlchemyCircleRenderer circleRenderer = arrayResource == null ? defaultRenderer : new AlchemyCircleRenderer(arrayResource); - registerRecipe(Collections.singletonList(inputStacks), catalystStack, arrayEffect, circleRenderer); - } - - public static void registerRecipe(ItemStack inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) - { - registerRecipe(Collections.singletonList(inputStacks), catalystStack, arrayEffect, circleRenderer); - } - - public static void registerRecipe(List inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, ResourceLocation arrayResource) - { - AlchemyCircleRenderer circleRenderer = arrayResource == null ? defaultRenderer : new AlchemyCircleRenderer(arrayResource); - registerRecipe(inputStacks, catalystStack, arrayEffect, circleRenderer); - } - - public static void registerRecipe(String inputOreDict, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, ResourceLocation arrayResource) - { - AlchemyCircleRenderer circleRenderer = arrayResource == null ? defaultRenderer : new AlchemyCircleRenderer(arrayResource); - registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, arrayEffect, circleRenderer); - } - - public static void registerRecipe(ItemStack input, ItemStack catalystStack, AlchemyArrayEffect arrayEffect) - { - registerRecipe(Collections.singletonList(input), catalystStack, arrayEffect, (AlchemyCircleRenderer) null); - } - - public static void registerRecipe(List inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect) - { - registerRecipe(inputStacks, catalystStack, arrayEffect, (AlchemyCircleRenderer) null); - } - - public static void registerRecipe(String inputOreDict, ItemStack catalystStack, AlchemyArrayEffect arrayEffect) - { - registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, arrayEffect, (AlchemyCircleRenderer) null); - } - - public static void replaceAlchemyCircle(List input, AlchemyCircleRenderer circleRenderer) - { - if (circleRenderer == null) - return; - - for (Entry, AlchemyArrayRecipe> entry : recipes.entrySet()) - { - AlchemyArrayRecipe arrayRecipe = entry.getValue(); - if (arrayRecipe.doesInputMatchRecipe(input)) - arrayRecipe.defaultCircleRenderer = circleRenderer; - } - } - - public static AlchemyArrayRecipe getRecipeForInput(List input) - { - return recipes.get(input); - } - - public static AlchemyArrayEffect getAlchemyArrayEffect(List input, @Nullable ItemStack catalystStack) - { - for (Entry, AlchemyArrayRecipe> entry : recipes.entrySet()) - { - AlchemyArrayRecipe arrayRecipe = entry.getValue(); - if (input.size() == 1 && arrayRecipe.getInput().size() == 1) - { - if (ItemStackWrapper.getHolder(arrayRecipe.getInput().get(0)).equals(ItemStackWrapper.getHolder(input.get(0)))) - { - AlchemyArrayEffect effect = arrayRecipe.getAlchemyArrayEffectForCatalyst(catalystStack); - if (effect != null) - { - return effect.getNewCopy(); - } else - { - return null; - } - } - } else - { - if (input.equals(arrayRecipe.getInput())) - { - AlchemyArrayEffect effect = arrayRecipe.getAlchemyArrayEffectForCatalyst(catalystStack); - if (effect != null) - { - return effect.getNewCopy(); - } else - { - return null; - } - } - } - } - - return null; - } - - public static AlchemyArrayEffect getAlchemyArrayEffect(ItemStack input, @Nullable ItemStack catalystStack) - { - return getAlchemyArrayEffect(Collections.singletonList(input), catalystStack); - } - - public static AlchemyCircleRenderer getAlchemyCircleRenderer(List input, @Nullable ItemStack catalystStack) - { - for (Entry, AlchemyArrayRecipe> entry : recipes.entrySet()) - { - AlchemyArrayRecipe arrayRecipe = entry.getValue(); - if (arrayRecipe.doesInputMatchRecipe(input)) - { - return arrayRecipe.getAlchemyArrayRendererForCatalyst(catalystStack); - } - } - - return defaultRenderer; - } - - public static AlchemyCircleRenderer getAlchemyCircleRenderer(ItemStack itemStack, @Nullable ItemStack catalystStack) - { - return getAlchemyCircleRenderer(Collections.singletonList(itemStack), catalystStack); - } - - @Getter - @ToString - @EqualsAndHashCode - public static class AlchemyArrayRecipe - { - public AlchemyCircleRenderer defaultCircleRenderer; - public final List input; - public final BiMap catalystMap = HashBiMap.create(); - public final BiMap circleMap = HashBiMap.create(); - - private AlchemyArrayRecipe(List input, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer, boolean useless) - { - this.input = input; - - catalystMap.put(ItemStackWrapper.getHolder(catalystStack), arrayEffect); - - this.defaultCircleRenderer = circleRenderer; - } - - public AlchemyArrayRecipe(ItemStack inputStack, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) - { - this(Collections.singletonList(inputStack), catalystStack, arrayEffect, circleRenderer, false); - } - - public AlchemyArrayRecipe(String inputOreDict, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) - { - this(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, arrayEffect, circleRenderer, false); - } - - public AlchemyArrayRecipe(List inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) - { - this(inputStacks, catalystStack, arrayEffect, circleRenderer, false); - } - - /** - * Compares the inputed list of ItemStacks to see if it matches with the - * recipe's list. - * - * @param comparedList - * - The list to compare with - * - * @return - True if the ItemStack(s) is a compatible item - */ - public boolean doesInputMatchRecipe(List comparedList) - { - return !(comparedList == null || this.input == null) && (this.input.size() == 1 && comparedList.size() == 1 ? this.input.get(0).isItemEqual(comparedList.get(0)) : this.input.equals(comparedList)); - } - - /** - * Gets the actual AlchemyArrayEffect for the given catalyst. - * - * @param comparedStack - * The catalyst that is being checked - * - * @return - The effect - */ - public AlchemyArrayEffect getAlchemyArrayEffectForCatalyst(@Nullable ItemStack comparedStack) - { - for (Entry entry : catalystMap.entrySet()) - { - ItemStack catalystStack = entry.getKey().toStack(); - - if (comparedStack == null && catalystStack == null) - return entry.getValue(); - - if (comparedStack == null || catalystStack == null) - continue; - - if (catalystStack.isItemEqual(comparedStack)) - return entry.getValue(); - } - - return null; - } - - public AlchemyCircleRenderer getAlchemyArrayRendererForCatalyst(@Nullable ItemStack comparedStack) - { - for (Entry entry : circleMap.entrySet()) - { - ItemStack catalystStack = entry.getKey().toStack(); - - if (comparedStack == null && catalystStack == null) - return entry.getValue(); - - if (comparedStack == null || catalystStack == null) - continue; - - if (catalystStack.isItemEqual(comparedStack)) - return entry.getValue(); - } - - return defaultCircleRenderer; - } - } - - public static BiMap, AlchemyArrayRecipe> getRecipes() - { - return HashBiMap.create(recipes); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyTableRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyTableRecipeRegistry.java deleted file mode 100644 index f97025ad..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyTableRecipeRegistry.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; - -public class AlchemyTableRecipeRegistry -{ - private static List recipeList = new ArrayList(); - - public static void registerRecipe(AlchemyTableRecipe recipe) - { - recipeList.add(recipe); - } - - public static void registerRecipe(ItemStack outputStack, int lpDrained, int ticksRequired, int tierRequired, Object... objects) - { - registerRecipe(new AlchemyTableRecipe(outputStack, lpDrained, ticksRequired, tierRequired, objects)); - } - - public static AlchemyTableRecipe getMatchingRecipe(List itemList, World world, BlockPos pos) - { - for (AlchemyTableRecipe recipe : recipeList) - { - if (recipe.matches(itemList, world, pos)) - { - return recipe; - } - } - - return null; - } - - public static List getRecipeList() - { - return new ArrayList(recipeList); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java deleted file mode 100644 index c2ebc323..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java +++ /dev/null @@ -1,173 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.Collections; -import java.util.List; - -public class AltarRecipeRegistry -{ - private static BiMap, AltarRecipe> recipes = HashBiMap.create(); - - /** - * Registers an {@link AltarRecipe} for the Blood Altar. This can be a - * {@code ItemStack}, {@code List}, or {@code String} - * OreDictionary entry. - * - * If the OreDictionary entry does not exist or is empty, it will not be - * registered. - * - * @param altarRecipe - * - The AltarRecipe to register - */ - public static void registerRecipe(AltarRecipe altarRecipe) - { - if (!recipes.containsValue(altarRecipe) && altarRecipe.getInput().size() > 0) - recipes.put(altarRecipe.getInput(), altarRecipe); - else - BloodMagicAPI.getLogger().error("Error adding altar recipe for input [{}].", altarRecipe.toString()); - } - - public static void registerFillRecipe(ItemStack orbStack, EnumAltarTier tier, int maxForOrb, int consumeRate, int drainRate) - { - registerRecipe(new AltarRecipe(orbStack, orbStack, tier, maxForOrb, consumeRate, drainRate, true)); - } - - /** - * Gets the recipe that the provided input is registered to. - * - * @param input - * - The input ItemStack to get the recipe for - * @return - The recipe that the provided input is registered to. - */ - public static AltarRecipe getRecipeForInput(List input) - { - List wrapperList = ItemStackWrapper.toWrapperList(input); - if (recipes.keySet().contains(wrapperList)) - return recipes.get(wrapperList); - - return null; - } - - //TODO: Determine a more time-effective method - public static AltarRecipe getRecipeForInput(ItemStack input) - { - for (AltarRecipe recipe : recipes.values()) - { - if (recipe.doesRequiredItemMatch(input, recipe.getMinTier())) - { - return recipe; - } - } - - return null; - } - - public static AltarRecipe getRecipeForInput(String input) - { - return getRecipeForInput(OreDictionary.getOres(input)); - } - - public static BiMap, AltarRecipe> getRecipes() - { - return HashBiMap.create(recipes); - } - - @Getter - @ToString - @EqualsAndHashCode - public static class AltarRecipe - { - private final List input; - private final ItemStack output; - private final EnumAltarTier minTier; - private final int syphon, consumeRate, drainRate; - private final boolean fillable; - - /** - * Allows creation of a recipe for the - * {@link WayofTime.bloodmagic.block.BlockAltar} / - * {@link WayofTime.bloodmagic.tile.TileAltar}. The output ItemStack is - * allowed to be null as some recipes do not contain an output. (Blood - * Orbs) - * - * @param input - * - The input ItemStack - * @param output - * - The ItemStack obtained from the recipe - * @param minTier - * - The minimum tier of Altar required - * @param syphon - * - The amount of LP to syphon from the Altar - * @param consumeRate - * - The rate at which LP is consumed during crafting - * @param drainRate - * - The rate at which LP is drained during crafting - * @param fillable - * - Whether the input item can be filled with LP. IE: Orbs - */ - public AltarRecipe(List input, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable) - { - this.input = ItemStackWrapper.toWrapperList(input); - this.output = output; - this.minTier = minTier; - this.syphon = syphon < 0 ? -syphon : syphon; - this.consumeRate = consumeRate < 0 ? -consumeRate : consumeRate; - this.drainRate = drainRate < 0 ? -drainRate : drainRate; - this.fillable = fillable; - } - - public AltarRecipe(List input, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate) - { - this(input, output, minTier, syphon, consumeRate, drainRate, false); - } - - public AltarRecipe(ItemStack input, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable) - { - this(Collections.singletonList(input), output, minTier, syphon, consumeRate, drainRate, fillable); - } - - public AltarRecipe(ItemStack input, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate) - { - this(Collections.singletonList(input), output, minTier, syphon, consumeRate, drainRate, false); - } - - public AltarRecipe(String inputEntry, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable) - { - this(OreDictionary.doesOreNameExist(inputEntry) && OreDictionary.getOres(inputEntry).size() > 0 ? OreDictionary.getOres(inputEntry) : Collections.emptyList(), output, minTier, syphon, consumeRate, drainRate, fillable); - } - - public AltarRecipe(String inputEntry, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate) - { - this(OreDictionary.doesOreNameExist(inputEntry) && OreDictionary.getOres(inputEntry).size() > 0 ? OreDictionary.getOres(inputEntry) : Collections.emptyList(), output, minTier, syphon, consumeRate, drainRate, false); - } - - public boolean doesRequiredItemMatch(ItemStack comparedStack, EnumAltarTier tierCheck) - { - if (comparedStack == null || this.input == null) - return false; - - if (tierCheck.ordinal() < minTier.ordinal()) - return false; - - for (ItemStackWrapper stack : input) { - if (comparedStack.isItemEqual(stack.toStack())) - return true; - - if (comparedStack.getItem() == stack.item && stack.meta == OreDictionary.WILDCARD_VALUE) - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java deleted file mode 100644 index a12bf312..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java +++ /dev/null @@ -1,121 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.iface.IHarvestHandler; -import net.minecraft.block.Block; -import net.minecraft.block.BlockStem; - -import java.util.*; - -public class HarvestRegistry -{ - private static List handlerList = new ArrayList(); - private static Map standardCrops = new HashMap(); - private static Set tallCrops = new HashSet(); - private static Map stemCrops = new HashMap(); - private static Map amplifierMap = new HashMap(); - - /** - * Registers a handler for the Harvest Ritual to call. - * - * @param handler - * - The custom handler to register - */ - public static void registerHandler(IHarvestHandler handler) - { - if (!handlerList.contains(handler)) - handlerList.add(handler); - } - - /** - * Registers a standard crop (IE: Wheat, Carrots, Potatoes, Netherwart, etc) - * for the - * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable} - * handler to handle. - * - * @param crop - * - The crop block to handle. - * @param matureMeta - * - The meta value at which the crop is considered mature and ready - * to be harvested. - */ - public static void registerStandardCrop(Block crop, int matureMeta) - { - if (!standardCrops.containsKey(crop)) - standardCrops.put(crop, matureMeta); - } - - /** - * Registers a tall crop (Sugar Cane and Cactus) for the - * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall} handler to - * handle. - * - * @param crop - * - The crop block to handle. - */ - public static void registerTallCrop(BlockStack crop) - { - if (!tallCrops.contains(crop)) - tallCrops.add(crop); - } - - /** - * Registers a stem crop (Melon and Pumpkin) for the - * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem} handler to - * handle. - * - * Use {@link net.minecraftforge.oredict.OreDictionary#WILDCARD_VALUE} to - * accept any meta for the crop block. - * - * The Stem must be instanceof {@link BlockStem} - * - * @param crop - * - The crop block to handle. - * @param stem - * - The stem of the crop - */ - public static void registerStemCrop(BlockStack crop, BlockStack stem) - { - if (!stemCrops.containsKey(crop) && stem.getBlock() instanceof BlockStem) - stemCrops.put(stem, crop); - } - - /** - * Registers a range amplifier for the Harvest Ritual. - * - * @param blockStack - * - The block for the amplifier. - * @param range - * - The range the amplifier provides. - */ - public static void registerRangeAmplifier(BlockStack blockStack, int range) - { - if (!amplifierMap.containsKey(blockStack)) - amplifierMap.put(blockStack, range); - } - - public static List getHandlerList() - { - return new ArrayList(handlerList); - } - - public static Map getStandardCrops() - { - return new HashMap(standardCrops); - } - - public static Set getTallCrops() - { - return new HashSet(tallCrops); - } - - public static Map getStemCrops() - { - return new HashMap(stemCrops); - } - - public static Map getAmplifierMap() - { - return new HashMap(amplifierMap); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java deleted file mode 100644 index 36456448..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java +++ /dev/null @@ -1,120 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -public class ImperfectRitualRegistry -{ - public static final Map enabledRituals = new HashMap(); - private static final BiMap registry = HashBiMap.create(); - - /** - * The safe way to register a new Ritual. - * - * @param imperfectRitual - * - The imperfect ritual to register. - * @param id - * - The ID for the imperfect ritual. Cannot be duplicated. - */ - public static void registerRitual(ImperfectRitual imperfectRitual, String id, boolean enabled) - { - if (imperfectRitual != null) - { - if (registry.containsKey(id)) - BloodMagicAPI.getLogger().error("Duplicate imperfect ritual id: %s", id); - else - { - registry.put(id, imperfectRitual); - enabledRituals.put(imperfectRitual, enabled); - } - } - } - - public static void registerRitual(ImperfectRitual imperfectRitual, String id) - { - registerRitual(imperfectRitual, id, true); - } - - public static void registerRitual(ImperfectRitual imperfectRitual, boolean enabled) - { - registerRitual(imperfectRitual, imperfectRitual.getName(), enabled); - } - - public static void registerRitual(ImperfectRitual imperfectRitual) - { - registerRitual(imperfectRitual, imperfectRitual.getName()); - } - - public static ImperfectRitual getRitualForBlock(BlockStack blockStack) - { - for (ImperfectRitual imperfectRitual : getRegistry().values()) - if (imperfectRitual.getRequiredBlock().equals(blockStack)) - return imperfectRitual; - - return null; - } - - public static ImperfectRitual getRitualForId(String id) - { - return registry.get(id); - } - - public static String getIdForRitual(ImperfectRitual imperfectRitual) - { - return registry.inverse().get(imperfectRitual); - } - - public static boolean isMapEmpty() - { - return registry.isEmpty(); - } - - public static int getMapSize() - { - return registry.size(); - } - - public static boolean ritualEnabled(ImperfectRitual imperfectRitual) - { - try - { - return enabledRituals.get(imperfectRitual); - } catch (NullPointerException e) - { - BloodMagicAPI.getLogger().error("Invalid Imperfect Ritual was called"); - return false; - } - } - - public static boolean ritualEnabled(String id) - { - return ritualEnabled(getRitualForId(id)); - } - - public static BiMap getRegistry() - { - return HashBiMap.create(registry); - } - - public static BiMap getEnabledMap() - { - return HashBiMap.create(enabledRituals); - } - - public static ArrayList getIds() - { - return new ArrayList(registry.keySet()); - } - - public static ArrayList getRituals() - { - return new ArrayList(registry.values()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/LivingArmourDowngradeRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/LivingArmourDowngradeRecipeRegistry.java deleted file mode 100644 index b6de0ce8..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/LivingArmourDowngradeRecipeRegistry.java +++ /dev/null @@ -1,72 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe; - -public class LivingArmourDowngradeRecipeRegistry -{ - private static List recipeList = new ArrayList(); - private static Map>> dialogueMap = new HashMap>>(); - - public static void registerRecipe(LivingArmourDowngradeRecipe recipe) - { - recipeList.add(recipe); - } - - public static void registerDialog(ItemStack keyStack, Map> map) - { - dialogueMap.put(keyStack, map); - } - - public static List getDialogForProcessTick(ItemStack keyStack, int tick) - { - for (Entry>> entry : dialogueMap.entrySet()) - { - ItemStack key = entry.getKey(); - if (OreDictionary.itemMatches(key, keyStack, false)) - { - Map> map = entry.getValue(); - if (map.containsKey(tick)) - { - return map.get(tick); - } - } - } - - return null; - } - - public static void registerRecipe(LivingArmourUpgrade upgrade, ItemStack keyStack, Object... recipe) - { - registerRecipe(new LivingArmourDowngradeRecipe(upgrade, keyStack, recipe)); - } - - public static LivingArmourDowngradeRecipe getMatchingRecipe(ItemStack keyStack, List itemList, World world, BlockPos pos) - { - for (LivingArmourDowngradeRecipe recipe : recipeList) - { - if (recipe.matches(keyStack, itemList, world, pos)) - { - return recipe; - } - } - - return null; - } - - public static List getRecipeList() - { - return new ArrayList(recipeList); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java deleted file mode 100644 index 226626a4..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java +++ /dev/null @@ -1,120 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.orb.BloodOrb; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import com.google.common.collect.ArrayListMultimap; -import net.minecraft.client.renderer.block.model.ModelBakery; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * This is only for those who wish to add a basic {@link BloodOrb}. If you need - * custom handling, you will need your own item class. - */ -public class OrbRegistry -{ - private static List orbs = new ArrayList(); - private static ArrayListMultimap tierMap = ArrayListMultimap.create(); - - private static Item orbItem = Constants.BloodMagicItem.BLOOD_ORB.getItem(); - - public static void registerOrb(BloodOrb orb) - { - if (!orbs.contains(orb)) - { - orbs.add(orb); - registerOrbForTier(orb.getTier(), getOrbStack(orb)); - } else - BloodMagicAPI.getLogger().error("Error adding orb %s. Orb already exists!", orb.toString()); - } - - public static void registerOrbForTier(int tier, ItemStack stack) - { - if (stack.getItem() instanceof IBloodOrb) - tierMap.put(tier, stack); - } - - @SideOnly(Side.CLIENT) - public static void registerOrbTexture(BloodOrb orb, ResourceLocation resourceLocation) - { - int meta = getIndexOf(orb); - - ModelBakery.registerItemVariants(orbItem, resourceLocation); - ModelLoader.setCustomModelResourceLocation(orbItem, meta, new ModelResourceLocation(resourceLocation, "inventory")); - } - - public static BloodOrb getOrb(int index) - { - return orbs.get(index); - } - - public static int getIndexOf(BloodOrb orb) - { - return orbs.indexOf(orb); - } - - public static boolean isEmpty() - { - return orbs.isEmpty(); - } - - public static int getSize() - { - return orbs.size(); - } - - public static List getOrbsForTier(int tier) - { - if (getTierMap().containsKey(tier)) - return getTierMap().get(tier); - - return Collections.emptyList(); - } - - public static List getOrbsUpToTier(int tier) - { - List ret = new ArrayList(); - - for (int i = 1; i <= tier; i++) - ret.addAll(getOrbsForTier(i)); - - return ret; - } - - public static List getOrbsDownToTier(int tier) - { - List ret = new ArrayList(); - - for (int i = EnumAltarTier.MAXTIERS; i >= tier; i--) - ret.addAll(getOrbsForTier(i)); - - return ret; - } - - public static ItemStack getOrbStack(BloodOrb orb) - { - return new ItemStack(orbItem, 1, getIndexOf(orb)); - } - - public static List getOrbs() - { - return new ArrayList(orbs); - } - - public static ArrayListMultimap getTierMap() - { - return ArrayListMultimap.create(tierMap); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java deleted file mode 100644 index ff0c43d9..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java +++ /dev/null @@ -1,122 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.ritual.Ritual; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -public class RitualRegistry -{ - public static final Map enabledRituals = new HashMap(); - private static final BiMap registry = HashBiMap.create(); - /** - * Ordered list for actions that depend on the order that the rituals were - * registered in - */ - private static final ArrayList orderedIdList = new ArrayList(); - - /** - * The safe way to register a new Ritual. - * - * @param ritual - * - The ritual to register. - * @param id - * - The ID for the ritual. Cannot be duplicated. - */ - public static void registerRitual(Ritual ritual, String id, boolean enabled) - { - if (ritual != null) - { - if (registry.containsKey(id)) - BloodMagicAPI.getLogger().error("Duplicate ritual id: %s", id); - else - { - registry.put(id, ritual); - enabledRituals.put(ritual, enabled); - orderedIdList.add(id); - } - } - } - - public static void registerRitual(Ritual ritual, boolean enabled) - { - registerRitual(ritual, ritual.getName(), enabled); - } - - public static void registerRitual(Ritual ritual, String id) - { - registerRitual(ritual, id, true); - } - - public static void registerRitual(Ritual ritual) - { - registerRitual(ritual, ritual.getName()); - } - - public static Ritual getRitualForId(String id) - { - Ritual ritual = registry.get(id); - return ritual != null ? ritual.getNewCopy() : null; - } - - public static String getIdForRitual(Ritual ritual) - { - return registry.inverse().get(ritual); - } - - public static boolean isMapEmpty() - { - return registry.isEmpty(); - } - - public static int getMapSize() - { - return registry.size(); - } - - public static boolean ritualEnabled(Ritual ritual) - { - try - { - return enabledRituals.get(ritual); - } catch (NullPointerException e) - { - BloodMagicAPI.getLogger().error("Invalid Ritual was called"); - return false; - } - } - - public static boolean ritualEnabled(String id) - { - return ritualEnabled(getRitualForId(id)); - } - - public static BiMap getRegistry() - { - return HashBiMap.create(registry); - } - - public static Map getEnabledMap() - { - return new HashMap(enabledRituals); - } - - public static ArrayList getIds() - { - return new ArrayList(registry.keySet()); - } - - public static ArrayList getOrderedIds() - { - return orderedIdList; - } - - public static ArrayList getRituals() - { - return new ArrayList(registry.values()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java deleted file mode 100644 index 35c6edfa..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.api.registry; - -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class TartaricForgeRecipeRegistry -{ - private static List recipeList = new ArrayList(); - - public static void registerRecipe(TartaricForgeRecipe recipe) - { - recipeList.add(recipe); - } - - public static void registerRecipe(ItemStack outputStack, double minimulSouls, double drain, Object... objects) - { - registerRecipe(new TartaricForgeRecipe(outputStack, minimulSouls, drain, objects)); - } - - public static TartaricForgeRecipe getMatchingRecipe(List itemList, World world, BlockPos pos) - { - for (TartaricForgeRecipe recipe : recipeList) - { - if (recipe.matches(itemList, world, pos)) - { - return recipe; - } - } - - return null; - } - - public static List getRecipeList() - { - return new ArrayList(recipeList); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/package-info.java b/src/main/java/WayofTime/bloodmagic/api/registry/package-info.java deleted file mode 100644 index 3f16ccd3..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/registry/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.registry; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java b/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java deleted file mode 100644 index 059cf1df..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java +++ /dev/null @@ -1,577 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.gen.structure.template.PlacementSettings; -import net.minecraft.world.gen.structure.template.Template; -import WayofTime.bloodmagic.api.Constants; - -public abstract class AreaDescriptor implements Iterator -{ - public List getContainedPositions(BlockPos pos) - { - return new ArrayList(); - } - - public AxisAlignedBB getAABB(BlockPos pos) - { - return null; - } - - public abstract void resetCache(); - - public abstract boolean isWithinArea(BlockPos pos); - - public abstract void resetIterator(); - - public void readFromNBT(NBTTagCompound tag) - { - - } - - public void writeToNBT(NBTTagCompound tag) - { - - } - - public abstract int getVolumeForOffsets(BlockPos offset1, BlockPos offset2); - - public abstract boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit); - - public abstract int getVolume(); - - public abstract boolean isWithinRange(int verticalLimit, int horizontalLimit); - - /** - * This method changes the area descriptor so that its range matches the two - * blocks that are selected. When implementing this method, assume that - * these positions are the blocks that are clicked by the player. - * - * @param pos1 - * @param pos2 - */ - public abstract void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2); - - public abstract boolean intersects(AreaDescriptor descriptor); - - public abstract AreaDescriptor offset(BlockPos offset); - - public abstract AreaDescriptor rotateDescriptor(PlacementSettings settings); - - public static class Rectangle extends AreaDescriptor - { - protected BlockPos minimumOffset; - protected BlockPos maximumOffset; // Non-inclusive maximum offset. - private BlockPos currentPosition; - - private ArrayList blockPosCache; - private BlockPos cachedPosition; - - private boolean cache = true; - - /** - * This constructor takes in the minimum and maximum BlockPos. The - * maximum offset is non-inclusive, meaning if you pass in (0,0,0) and - * (1,1,1), calling getContainedPositions() will only give (0,0,0). - * - * @param minimumOffset - * - - * @param maximumOffset - * - - */ - public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset) - { - setOffsets(minimumOffset, maximumOffset); - } - - public Rectangle(BlockPos minimumOffset, int sizeX, int sizeY, int sizeZ) - { - this(minimumOffset, minimumOffset.add(sizeX, sizeY, sizeZ)); - } - - public Rectangle(BlockPos minimumOffset, int size) - { - this(minimumOffset, size, size, size); - } - - @Override - public List getContainedPositions(BlockPos pos) - { - if (!cache || !pos.equals(cachedPosition) || blockPosCache.isEmpty()) - { - ArrayList posList = new ArrayList(); - - for (int j = minimumOffset.getY(); j < maximumOffset.getY(); j++) - { - for (int i = minimumOffset.getX(); i < maximumOffset.getX(); i++) - { - for (int k = minimumOffset.getZ(); k < maximumOffset.getZ(); k++) - { - posList.add(pos.add(i, j, k)); - } - } - } - - blockPosCache = posList; - cachedPosition = pos; - } - - return Collections.unmodifiableList(blockPosCache); - } - - @Override - public AxisAlignedBB getAABB(BlockPos pos) - { - AxisAlignedBB tempAABB = new AxisAlignedBB(minimumOffset, maximumOffset); - return tempAABB.offset(pos.getX(), pos.getY(), pos.getZ()); - } - - /** - * Sets the offsets of the AreaDescriptor in a safe way that will make - * minimumOffset the lowest corner - * - * @param offset1 - * - - * @param offset2 - * - - */ - public void setOffsets(BlockPos offset1, BlockPos offset2) - { - this.minimumOffset = new BlockPos(Math.min(offset1.getX(), offset2.getX()), Math.min(offset1.getY(), offset2.getY()), Math.min(offset1.getZ(), offset2.getZ())); - this.maximumOffset = new BlockPos(Math.max(offset1.getX(), offset2.getX()), Math.max(offset1.getY(), offset2.getY()), Math.max(offset1.getZ(), offset2.getZ())); - blockPosCache = new ArrayList(); - } - - @Override - public void resetCache() - { - this.blockPosCache = new ArrayList(); - } - - @Override - public boolean isWithinArea(BlockPos pos) - { - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); - - return x >= minimumOffset.getX() && x < maximumOffset.getX() && y >= minimumOffset.getY() && y < maximumOffset.getY() && z >= minimumOffset.getZ() && z < maximumOffset.getZ(); - } - - @Override - public boolean hasNext() - { - return currentPosition == null || !(currentPosition.getX() + 1 == maximumOffset.getX() && currentPosition.getY() + 1 == maximumOffset.getY() && currentPosition.getZ() + 1 == maximumOffset.getZ()); - } - - @Override - public BlockPos next() - { - if (currentPosition != null) - { - int nextX = currentPosition.getX() + 1 >= maximumOffset.getX() ? minimumOffset.getX() : currentPosition.getX() + 1; - int nextZ = nextX != minimumOffset.getX() ? currentPosition.getZ() : (currentPosition.getZ() + 1 >= maximumOffset.getZ() ? minimumOffset.getZ() : currentPosition.getZ() + 1); - int nextY = (nextZ != minimumOffset.getZ() || nextX != minimumOffset.getX()) ? currentPosition.getY() : (currentPosition.getY() + 1); - currentPosition = new BlockPos(nextX, nextY, nextZ); - } else - { - currentPosition = minimumOffset; - } - - return currentPosition; - } - - @Override - public void remove() - { - - } - - @Override - public void resetIterator() - { - currentPosition = null; - } - - @Override - public void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2) - { - setOffsets(pos1, pos2); - maximumOffset = maximumOffset.add(1, 1, 1); - resetIterator(); - resetCache(); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - minimumOffset = new BlockPos(tag.getInteger(Constants.NBT.X_COORD + "min"), tag.getInteger(Constants.NBT.Y_COORD + "min"), tag.getInteger(Constants.NBT.Z_COORD + "min")); - maximumOffset = new BlockPos(tag.getInteger(Constants.NBT.X_COORD + "max"), tag.getInteger(Constants.NBT.Y_COORD + "max"), tag.getInteger(Constants.NBT.Z_COORD + "max")); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.NBT.X_COORD + "min", minimumOffset.getX()); - tag.setInteger(Constants.NBT.Y_COORD + "min", minimumOffset.getY()); - tag.setInteger(Constants.NBT.Z_COORD + "min", minimumOffset.getZ()); - tag.setInteger(Constants.NBT.X_COORD + "max", maximumOffset.getX()); - tag.setInteger(Constants.NBT.Y_COORD + "max", maximumOffset.getY()); - tag.setInteger(Constants.NBT.Z_COORD + "max", maximumOffset.getZ()); - } - - @Override - public int getVolumeForOffsets(BlockPos offset1, BlockPos offset2) - { - BlockPos minPos = new BlockPos(Math.min(offset1.getX(), offset2.getX()), Math.min(offset1.getY(), offset2.getY()), Math.min(offset1.getZ(), offset2.getZ())); - BlockPos maxPos = new BlockPos(Math.max(offset1.getX(), offset2.getX()), Math.max(offset1.getY(), offset2.getY()), Math.max(offset1.getZ(), offset2.getZ())); - - maxPos = maxPos.add(1, 1, 1); - - return (maxPos.getX() - minPos.getX()) * (maxPos.getY() - minPos.getY()) * (maxPos.getZ() - minPos.getZ()); - } - - @Override - public boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit) - { - BlockPos minPos = new BlockPos(Math.min(offset1.getX(), offset2.getX()), Math.min(offset1.getY(), offset2.getY()), Math.min(offset1.getZ(), offset2.getZ())); - BlockPos maxPos = new BlockPos(Math.max(offset1.getX(), offset2.getX()), Math.max(offset1.getY(), offset2.getY()), Math.max(offset1.getZ(), offset2.getZ())); - - return minPos.getY() >= -verticalLimit && maxPos.getY() <= verticalLimit && minPos.getX() >= -horizontalLimit && maxPos.getX() <= horizontalLimit && minPos.getZ() >= -horizontalLimit && maxPos.getZ() <= horizontalLimit; - } - - @Override - public int getVolume() - { - return (maximumOffset.getX() - minimumOffset.getX()) * (maximumOffset.getY() - minimumOffset.getY()) * (maximumOffset.getZ() - minimumOffset.getZ()); - } - - @Override - public boolean isWithinRange(int verticalLimit, int horizontalLimit) - { - return minimumOffset.getY() >= -verticalLimit && maximumOffset.getY() <= verticalLimit + 1 && minimumOffset.getX() >= -horizontalLimit && maximumOffset.getX() <= horizontalLimit + 1 && minimumOffset.getZ() >= -horizontalLimit && maximumOffset.getZ() <= horizontalLimit + 1; - } - - @Override - public boolean intersects(AreaDescriptor descriptor) - { - if (descriptor instanceof AreaDescriptor.Rectangle) - { - AreaDescriptor.Rectangle rectangle = (AreaDescriptor.Rectangle) descriptor; - - return !(minimumOffset.getX() >= rectangle.maximumOffset.getX() || minimumOffset.getY() >= rectangle.maximumOffset.getY() || minimumOffset.getZ() >= rectangle.maximumOffset.getZ() || rectangle.minimumOffset.getX() >= maximumOffset.getX() || rectangle.minimumOffset.getY() >= maximumOffset.getY() || rectangle.minimumOffset.getZ() >= maximumOffset.getZ()); - } - - return false; - } - - @Override - public AreaDescriptor offset(BlockPos offset) - { - return new AreaDescriptor.Rectangle(this.minimumOffset.add(offset), this.maximumOffset.add(offset)); - } - - @Override - public AreaDescriptor rotateDescriptor(PlacementSettings settings) - { - BlockPos rotatePos1 = Template.transformedBlockPos(settings, minimumOffset); - BlockPos rotatePos2 = Template.transformedBlockPos(settings, maximumOffset.add(-1, -1, -1)); //It works, shut up! - - AreaDescriptor.Rectangle rectangle = new AreaDescriptor.Rectangle(this.minimumOffset, 1); - rectangle.modifyAreaByBlockPositions(rotatePos1, rotatePos2); - - return rectangle; - } - } - - public static class HemiSphere extends AreaDescriptor - { - private BlockPos minimumOffset; - private int radius; - - private ArrayList blockPosCache; - private BlockPos cachedPosition; - - private boolean cache = true; - - public HemiSphere(BlockPos minimumOffset, int radius) - { - setRadius(minimumOffset, radius); - } - - public void setRadius(BlockPos minimumOffset, int radius) - { - this.minimumOffset = new BlockPos(Math.min(minimumOffset.getX(), minimumOffset.getX()), Math.min(minimumOffset.getY(), minimumOffset.getY()), Math.min(minimumOffset.getZ(), minimumOffset.getZ())); - this.radius = radius; - blockPosCache = new ArrayList(); - } - - @Override - public List getContainedPositions(BlockPos pos) - { - if (!cache || !pos.equals(cachedPosition) || blockPosCache.isEmpty()) - { - ArrayList posList = new ArrayList(); - - int i = -radius; - int j = minimumOffset.getY(); - int k = -radius; - - //TODO For some reason the bottom of the hemisphere is not going up with the minOffset - - while (i <= radius) - { - while (j <= radius) - { - while (k <= radius) - { - if (i * i + j * j + k * k >= (radius + 0.5F) * (radius + 0.5F)) - { - k++; - continue; - } - - posList.add(pos.add(i, j, k)); - k++; - } - - k = -radius; - j++; - } - - j = minimumOffset.getY(); - i++; - } - - blockPosCache = posList; - cachedPosition = pos; - } - - return Collections.unmodifiableList(blockPosCache); - } - - /** - * Since you can't make a box using a sphere, this returns null - */ - @Override - public AxisAlignedBB getAABB(BlockPos pos) - { - return null; - } - - @Override - public void resetCache() - { - this.blockPosCache = new ArrayList(); - } - - @Override - public boolean isWithinArea(BlockPos pos) - { - return blockPosCache.contains(pos); - } - - @Override - public boolean hasNext() - { - return false; - } - - @Override - public BlockPos next() - { - return null; - } - - @Override - public void remove() - { - - } - - @Override - public void resetIterator() - { - - } - - @Override - public void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2) - { - - } - - @Override - public int getVolumeForOffsets(BlockPos pos1, BlockPos pos2) - { - return 0; - } - - @Override - public boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit) - { - return false; - } - - @Override - public int getVolume() - { - return 0; - } - - @Override - public boolean isWithinRange(int verticalLimit, int horizontalLimit) - { - return false; - } - - @Override - public boolean intersects(AreaDescriptor descriptor) - { - return false; - } - - @Override - public AreaDescriptor offset(BlockPos offset) - { - return new AreaDescriptor.HemiSphere(minimumOffset.add(offset), radius); - } - - @Override - public AreaDescriptor rotateDescriptor(PlacementSettings settings) - { - return this; - } - } - - public static class Cross extends AreaDescriptor - { - - private ArrayList blockPosCache; - private BlockPos cachedPosition; - - private BlockPos centerPos; - private int size; - - private boolean cache = true; - - public Cross(BlockPos center, int size) - { - this.centerPos = center; - this.size = size; - this.blockPosCache = new ArrayList(); - } - - @Override - public List getContainedPositions(BlockPos pos) - { - if (!cache || !pos.equals(cachedPosition) || blockPosCache.isEmpty()) - { - resetCache(); - - blockPosCache.add(centerPos.add(pos)); - for (int i = 1; i <= size; i++) - { - blockPosCache.add(centerPos.add(pos).add(i, 0, 0)); - blockPosCache.add(centerPos.add(pos).add(0, 0, i)); - blockPosCache.add(centerPos.add(pos).add(-i, 0, 0)); - blockPosCache.add(centerPos.add(pos).add(0, 0, -i)); - } - } - - cachedPosition = pos; - - return Collections.unmodifiableList(blockPosCache); - } - - @Override - public void resetCache() - { - blockPosCache = new ArrayList(); - } - - @Override - public boolean isWithinArea(BlockPos pos) - { - return blockPosCache.contains(pos); - } - - @Override - public boolean hasNext() - { - return false; - } - - @Override - public BlockPos next() - { - return null; - } - - @Override - public void remove() - { - - } - - @Override - public void resetIterator() - { - - } - - @Override - public void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2) - { - - } - - @Override - public int getVolumeForOffsets(BlockPos pos1, BlockPos pos2) - { - return 0; - } - - @Override - public boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit) - { - return false; - } - - @Override - public int getVolume() - { - return 0; - } - - @Override - public boolean isWithinRange(int verticalLimit, int horizontalLimit) - { - return false; - } - - @Override - public boolean intersects(AreaDescriptor descriptor) - { - return false; - } - - @Override - public AreaDescriptor offset(BlockPos offset) - { - return new AreaDescriptor.Cross(centerPos.add(offset), size); - } - - @Override - public AreaDescriptor rotateDescriptor(PlacementSettings settings) - { - return this; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java b/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java deleted file mode 100644 index d166dc4d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagByte; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.common.capabilities.Capability; - -import java.util.concurrent.Callable; - -public final class CapabilityRuneType -{ - public static class RuneTypeStorage implements Capability.IStorage - { - @Override - public NBTBase writeNBT(Capability capability, IRitualStone.Tile instance, EnumFacing side) - { - return new NBTTagByte((byte) instance.getRuneType().ordinal()); - } - - @Override - public void readNBT(Capability capability, IRitualStone.Tile instance, EnumFacing side, NBTBase nbt) - { - instance.setRuneType(EnumRuneType.byMetadata(((NBTTagByte) nbt).getByte())); - } - } - - public static class RuneTypeWrapper implements IRitualStone.Tile - { - private EnumRuneType type = EnumRuneType.BLANK; - - @Override - public boolean isRuneType(EnumRuneType runeType) - { - return type == runeType; - } - - @Override - public EnumRuneType getRuneType() - { - return type; - } - - public void setRuneType(EnumRuneType runeType) - { - type = runeType; - } - } - - public static class Factory implements Callable - { - @Override - public IRitualStone.Tile call() throws Exception - { - return new RuneTypeWrapper(); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/EnumRitualReaderState.java b/src/main/java/WayofTime/bloodmagic/api/ritual/EnumRitualReaderState.java deleted file mode 100644 index 82a4f446..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/EnumRitualReaderState.java +++ /dev/null @@ -1,8 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -public enum EnumRitualReaderState -{ - SET_AREA, - INFORMATION, - SET_WILL_TYPES; -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/EnumRuneType.java b/src/main/java/WayofTime/bloodmagic/api/ritual/EnumRuneType.java deleted file mode 100644 index 9be20395..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/EnumRuneType.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.text.TextFormatting; - -import java.util.Locale; - -public enum EnumRuneType implements IStringSerializable -{ - BLANK(TextFormatting.GRAY), - WATER(TextFormatting.AQUA), - FIRE(TextFormatting.RED), - EARTH(TextFormatting.GREEN), - AIR(TextFormatting.WHITE), - DUSK(TextFormatting.DARK_GRAY), - DAWN(TextFormatting.GOLD); - - public final TextFormatting colorCode; - - EnumRuneType(TextFormatting colorCode) - { - this.colorCode = colorCode; - } - - public static EnumRuneType byMetadata(int meta) - { - if (meta < 0 || meta >= values().length) - meta = 0; - - return values()[meta]; - } - - public ItemStack getScribeStack() - { - return new ItemStack(Constants.BloodMagicItem.INSCRIPTION_TOOL.getItem(), 1, ordinal()); - } - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } - -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/IMasterRitualStone.java b/src/main/java/WayofTime/bloodmagic/api/ritual/IMasterRitualStone.java deleted file mode 100644 index 076c820d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/IMasterRitualStone.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -/** - * This interface is for internal implementation only. - * - * It is provided via the API for easy obtaining of basic data. - */ -public interface IMasterRitualStone -{ - String getOwner(); - - boolean activateRitual(ItemStack activationCrystal, EntityPlayer activator, Ritual ritual); - - void performRitual(World world, BlockPos pos); - - void stopRitual(Ritual.BreakType breakType); - - int getCooldown(); - - void setCooldown(int cooldown); - - void setActive(boolean active); - - EnumFacing getDirection(); - - boolean areTanksEmpty(); - - int getRunningTime(); - - World getWorldObj(); - - BlockPos getBlockPos(); - - String getNextBlockRange(String range); - - void provideInformationOfRitualToPlayer(EntityPlayer player); - - void provideInformationOfRangeToPlayer(EntityPlayer player, String range); - - void provideInformationOfWillConfigToPlayer(EntityPlayer player, List typeList); - - void setActiveWillConfig(EntityPlayer player, List typeList); - - boolean setBlockRangeByBounds(EntityPlayer player, String range, BlockPos offset1, BlockPos offset2); - - List getActiveWillConfig(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/IRitualStone.java b/src/main/java/WayofTime/bloodmagic/api/ritual/IRitualStone.java deleted file mode 100644 index 3c623ce2..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/IRitualStone.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * This interface is for internal implementation only. - * - * It is provided via the API for easy obtaining of basic data. - */ -public interface IRitualStone -{ - boolean isRuneType(World world, BlockPos pos, EnumRuneType runeType); - - void setRuneType(World world, BlockPos pos, EnumRuneType runeType); - - interface Tile - { - boolean isRuneType(EnumRuneType runeType); - - EnumRuneType getRuneType(); - - void setRuneType(EnumRuneType runeType); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/Ritual.java b/src/main/java/WayofTime/bloodmagic/api/ritual/Ritual.java deleted file mode 100644 index 34dd7706..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/Ritual.java +++ /dev/null @@ -1,368 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.ToString; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; - -/** - * Abstract class for creating new rituals. Rituals need be registered with - * {@link WayofTime.bloodmagic.api.registry.RitualRegistry#registerRitual(Ritual, String)} - */ -@Getter -@RequiredArgsConstructor -@EqualsAndHashCode(exclude = { "modableRangeMap", "ritualComponents", "renderer", "volumeRangeMap", "horizontalRangeMap", "verticalRangeMap" }) -@ToString -public abstract class Ritual -{ - public final ArrayList ritualComponents = new ArrayList(); - private final String name; - private final int crystalLevel; - private final int activationCost; - private final RitualRenderer renderer; - private final String unlocalizedName; - - protected final Map modableRangeMap = new HashMap(); - protected final Map volumeRangeMap = new HashMap(); - protected final Map horizontalRangeMap = new HashMap(); - protected final Map verticalRangeMap = new HashMap(); - - /** - * @param name - * - The name of the ritual - * @param crystalLevel - * - Required Activation Crystal tier - * @param activationCost - * - Base LP cost for activating the ritual - */ - public Ritual(String name, int crystalLevel, int activationCost, String unlocalizedName) - { - this(name, crystalLevel, activationCost, null, unlocalizedName); - } - - public void readFromNBT(NBTTagCompound tag) - { - NBTTagList tags = tag.getTagList("areas", 10); - if (tags.hasNoTags()) - { - return; - } - - for (int i = 0; i < tags.tagCount(); i++) - { - NBTTagCompound newTag = tags.getCompoundTagAt(i); - String rangeKey = newTag.getString("key"); - - NBTTagCompound storedTag = newTag.getCompoundTag("area"); - AreaDescriptor desc = this.getBlockRange(rangeKey); - if (desc != null) - { - desc.readFromNBT(storedTag); - } - } - } - - public void writeToNBT(NBTTagCompound tag) - { - NBTTagList tags = new NBTTagList(); - - for (Entry entry : modableRangeMap.entrySet()) - { - NBTTagCompound newTag = new NBTTagCompound(); - newTag.setString("key", entry.getKey()); - NBTTagCompound storedTag = new NBTTagCompound(); - - entry.getValue().writeToNBT(storedTag); - - newTag.setTag("area", storedTag); - - tags.appendTag(newTag); - } - - tag.setTag("areas", tags); - } - - /** - * Called when the player attempts to activate the ritual. - * - * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer, Ritual)} - * - * @param masterRitualStone - * - The {@link IMasterRitualStone} that the ritual is bound to - * @param player - * - The activating player - * @param owner - * - Owner of the crystal activating this ritual, or the current - * owner of the ritual if being reactivated. - * @return - Whether activation was successful - */ - public boolean activateRitual(IMasterRitualStone masterRitualStone, EntityPlayer player, String owner) - { - return true; - } - - /** - * Called every {@link #getRefreshTime()} ticks while active. - * - * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos)} - * - * @param masterRitualStone - * - The {@link IMasterRitualStone} that the ritual is bound to - */ - public abstract void performRitual(IMasterRitualStone masterRitualStone); - - /** - * Called when the ritual is stopped for a given {@link Ritual.BreakType}. - * - * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(Ritual.BreakType)} - * - * @param masterRitualStone - * - The {@link IMasterRitualStone} that the ritual is bound to - * @param breakType - * - The type of break that caused the stoppage. - */ - public void stopRitual(IMasterRitualStone masterRitualStone, BreakType breakType) - { - - } - - /** - * Used to set the amount of LP drained every {@link #getRefreshTime()} - * ticks. - * - * @return - The amount of LP drained per refresh - */ - public abstract int getRefreshCost(); - - /** - * Used to set the refresh rate of the ritual. (How often - * {@link #performRitual(IMasterRitualStone)} is called. - * - * @return - How often to perform the effect in ticks. - */ - public int getRefreshTime() - { - return 20; - } - - public void addBlockRange(String range, AreaDescriptor defaultRange) - { - modableRangeMap.put(range, defaultRange); - } - - /** - * Used to grab the range of a ritual for a given effect. - * - * @param range - * - Range that needs to be pulled. - * @return - - */ - public AreaDescriptor getBlockRange(String range) - { - if (modableRangeMap.containsKey(range)) - { - return modableRangeMap.get(range); - } - - return null; - } - - public List getListOfRanges() - { - return new ArrayList(modableRangeMap.keySet()); - } - - public String getNextBlockRange(String range) - { - List rangeList = getListOfRanges(); - - if (rangeList.isEmpty()) - { - return ""; - } - - if (!rangeList.contains(range)) - { - return rangeList.get(0); - } - - boolean hasMatch = false; - - for (String rangeCheck : rangeList) - { - if (hasMatch) - { - return rangeCheck; - } else if (rangeCheck.equals(range)) - { - hasMatch = true; - } - } - - return rangeList.get(0); - } - - public boolean setBlockRangeByBounds(String range, IMasterRitualStone master, BlockPos offset1, BlockPos offset2) - { - AreaDescriptor descriptor = this.getBlockRange(range); - World world = master.getWorldObj(); - BlockPos masterPos = master.getBlockPos(); - DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, masterPos); - if (canBlockRangeBeModified(range, descriptor, master, offset1, offset2, holder)) - { - descriptor.modifyAreaByBlockPositions(offset1, offset2); - return true; - } - - return false; - } - - protected boolean canBlockRangeBeModified(String range, AreaDescriptor descriptor, IMasterRitualStone master, BlockPos offset1, BlockPos offset2, DemonWillHolder holder) - { - List willConfig = master.getActiveWillConfig(); - int maxVolume = getMaxVolumeForRange(range, willConfig, holder); - int maxVertical = getMaxVerticalRadiusForRange(range, willConfig, holder); - int maxHorizontal = getMaxHorizontalRadiusForRange(range, willConfig, holder); - - return (maxVolume <= 0 || descriptor.getVolumeForOffsets(offset1, offset2) <= maxVolume) && descriptor.isWithinRange(offset1, offset2, maxVertical, maxHorizontal); - } - - protected void setMaximumVolumeAndDistanceOfRange(String range, int volume, int horizontalRadius, int verticalRadius) - { - volumeRangeMap.put(range, volume); - horizontalRangeMap.put(range, horizontalRadius); - verticalRangeMap.put(range, verticalRadius); - } - - protected boolean checkDescriptorIsWithinRange(AreaDescriptor descriptor, int maxVolume, int maxHorizontal, int maxVertical) - { - return descriptor.getVolume() <= maxVolume && descriptor.isWithinRange(maxVertical, maxHorizontal); - } - - public int getMaxVolumeForRange(String range, List activeTypes, DemonWillHolder holder) - { - return volumeRangeMap.get(range); - } - - public int getMaxVerticalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) - { - return verticalRangeMap.get(range); - } - - public int getMaxHorizontalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) - { - return horizontalRangeMap.get(range); - } - - public ITextComponent getErrorForBlockRangeOnFail(EntityPlayer player, String range, IMasterRitualStone master, BlockPos offset1, BlockPos offset2) - { - AreaDescriptor descriptor = this.getBlockRange(range); - if (descriptor == null) - { - return new TextComponentTranslation("ritual.BloodMagic.blockRange.tooBig", "?"); - } - - List willConfig = master.getActiveWillConfig(); - DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(master.getWorldObj(), master.getBlockPos()); - - int maxVolume = this.getMaxVolumeForRange(range, willConfig, holder); - int maxVertical = this.getMaxVerticalRadiusForRange(range, willConfig, holder); - int maxHorizontal = this.getMaxHorizontalRadiusForRange(range, willConfig, holder); - - if (maxVolume > 0 && descriptor.getVolumeForOffsets(offset1, offset2) > maxVolume) - { - return new TextComponentTranslation("ritual.BloodMagic.blockRange.tooBig", maxVolume); - } else - { - return new TextComponentTranslation("ritual.BloodMagic.blockRange.tooFar", maxVertical, maxHorizontal); - } - } - - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info") }; - } - - public ITextComponent provideInformationOfRangeToPlayer(EntityPlayer player, String range) - { - if (getListOfRanges().contains(range)) - { - return new TextComponentTranslation(this.getUnlocalizedName() + "." + range + ".info"); - } else - { - return new TextComponentTranslation("ritual.BloodMagic.blockRange.noRange"); - } - } - - /** - * @return a list of {@link RitualComponent} for checking the ritual. - */ - public abstract ArrayList getComponents(); - - public void addRune(ArrayList components, int offset1, int y, int offset2, EnumRuneType rune) - { - components.add(new RitualComponent(new BlockPos(offset1, y, offset2), rune)); - } - - public void addOffsetRunes(ArrayList components, int offset1, int offset2, int y, EnumRuneType rune) - { - addRune(components, offset1, y, offset2, rune); - addRune(components, offset2, y, offset1, rune); - addRune(components, offset1, y, -offset2, rune); - addRune(components, -offset2, y, offset1, rune); - addRune(components, -offset1, y, offset2, rune); - addRune(components, offset2, y, -offset1, rune); - addRune(components, -offset1, y, -offset2, rune); - addRune(components, -offset2, y, -offset1, rune); - } - - public void addCornerRunes(ArrayList components, int offset, int y, EnumRuneType rune) - { - addRune(components, offset, y, offset, rune); - addRune(components, offset, y, -offset, rune); - addRune(components, -offset, y, -offset, rune); - addRune(components, -offset, y, offset, rune); - } - - public void addParallelRunes(ArrayList components, int offset, int y, EnumRuneType rune) - { - addRune(components, offset, y, 0, rune); - addRune(components, -offset, y, 0, rune); - addRune(components, 0, y, -offset, rune); - addRune(components, 0, y, offset, rune); - } - - public enum BreakType - { - REDSTONE, - BREAK_MRS, - BREAK_STONE, - ACTIVATE, - DEACTIVATE, - EXPLOSION, - } - - public double getWillRespectingConfig(World world, BlockPos pos, EnumDemonWillType type, List willConfig) - { - return willConfig.contains(type) ? WorldDemonWillHandler.getCurrentWill(world, pos, type) : 0; - } - - public abstract Ritual getNewCopy(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/RitualComponent.java b/src/main/java/WayofTime/bloodmagic/api/ritual/RitualComponent.java deleted file mode 100644 index 2fdf3ab9..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/RitualComponent.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; - -/** - * Used to set a {@link EnumRuneType} type to a given {@link BlockPos} for usage - * in Ritual creation. - */ -@Getter -@RequiredArgsConstructor -public class RitualComponent -{ - private final BlockPos offset; - private final EnumRuneType runeType; - - public int getX(EnumFacing direction) - { - switch (direction) - { - case EAST: - return -this.getOffset().getZ(); - case SOUTH: - return -this.getOffset().getX(); - case WEST: - return this.getOffset().getZ(); - default: - return this.getOffset().getX(); - } - } - - public int getY() - { - return this.getOffset().getY(); - } - - public int getZ(EnumFacing direction) - { - switch (direction) - { - case EAST: - return this.getOffset().getX(); - case SOUTH: - return -this.getOffset().getZ(); - case WEST: - return -this.getOffset().getX(); - default: - return this.getOffset().getZ(); - } - } - - public BlockPos getOffset(EnumFacing direction) - { - return new BlockPos(getX(direction), offset.getY(), getZ(direction)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/RitualRenderer.java b/src/main/java/WayofTime/bloodmagic/api/ritual/RitualRenderer.java deleted file mode 100644 index 5c50dc52..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/RitualRenderer.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.bloodmagic.api.ritual; - -import net.minecraft.client.Minecraft; -import net.minecraft.util.ResourceLocation; - -public abstract class RitualRenderer -{ - public abstract void renderAt(IMasterRitualStone masterRitualStone, double x, double y, double z); - - protected void bindTexture(ResourceLocation resourceLocation) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/IImperfectRitualStone.java b/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/IImperfectRitualStone.java deleted file mode 100644 index fbdcd02a..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/IImperfectRitualStone.java +++ /dev/null @@ -1,20 +0,0 @@ -package WayofTime.bloodmagic.api.ritual.imperfect; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * This interface is for internal implementation only. - * - * It is provided via the API for easy obtaining of basic data. - */ -public interface IImperfectRitualStone -{ - - boolean performRitual(World world, BlockPos pos, ImperfectRitual imperfectRitual, EntityPlayer player); - - World getRitualWorld(); - - BlockPos getRitualPos(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/ImperfectRitual.java b/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/ImperfectRitual.java deleted file mode 100644 index c9ec02a6..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/ImperfectRitual.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.bloodmagic.api.ritual.imperfect; - -import WayofTime.bloodmagic.api.BlockStack; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** - * Abstract class for creating new imperfect rituals. ImperfectRituals need be - * registered with - * {@link WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry#registerRitual(ImperfectRitual)} - */ -@RequiredArgsConstructor -@Getter -@EqualsAndHashCode -public abstract class ImperfectRitual -{ - - private final String name; - private final BlockStack requiredBlock; - private final int activationCost; - private final boolean lightshow; - private final String unlocalizedName; - - /** - * @param name - * - The name of the ritual - * @param requiredBlock - * - The block required above the ImperfectRitualStone - * @param activationCost - * - Base LP cost for activating the ritual - */ - public ImperfectRitual(String name, BlockStack requiredBlock, int activationCost, String unlocalizedName) - { - this(name, requiredBlock, activationCost, false, unlocalizedName); - } - - /** - * Called when the player activates the ritual - * {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, net.minecraft.util.math.BlockPos, ImperfectRitual, EntityPlayer)} - * - * @param imperfectRitualStone - * - The {@link IImperfectRitualStone} that the ritual is bound to - * @param player - * - The player activating the ritual - * @return - Whether activation was successful - */ - public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player); - - @Override - public String toString() - { - return getName() + ":" + getRequiredBlock().toString() + "@" + getActivationCost(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/package-info.java b/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/package-info.java deleted file mode 100644 index 5740241a..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/imperfect/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.ritual.imperfect; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/package-info.java b/src/main/java/WayofTime/bloodmagic/api/ritual/package-info.java deleted file mode 100644 index b0c44863..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.ritual; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/saving/BMWorldSavedData.java b/src/main/java/WayofTime/bloodmagic/api/saving/BMWorldSavedData.java deleted file mode 100644 index 3499c82c..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/saving/BMWorldSavedData.java +++ /dev/null @@ -1,64 +0,0 @@ -package WayofTime.bloodmagic.api.saving; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.world.WorldSavedData; - -import java.util.*; - -public class BMWorldSavedData extends WorldSavedData -{ - public static final String ID = "BloodMagic-SoulNetworks"; - - private Map soulNetworks = new HashMap(); - - public BMWorldSavedData(String id) - { - super(id); - } - - public BMWorldSavedData() - { - this(ID); - } - - public SoulNetwork getNetwork(EntityPlayer player) - { - return getNetwork(PlayerHelper.getUUIDFromPlayer(player)); - } - - public SoulNetwork getNetwork(UUID playerId) - { - if (!soulNetworks.containsKey(playerId)) - soulNetworks.put(playerId, SoulNetwork.newEmpty(playerId).setParent(this)); - return soulNetworks.get(playerId); - } - - @Override - public void readFromNBT(NBTTagCompound tagCompound) - { - NBTTagList networkData = tagCompound.getTagList("networkData", 10); - - for (int i = 0; i < networkData.tagCount(); i++) - { - NBTTagCompound data = networkData.getCompoundTagAt(i); - SoulNetwork network = SoulNetwork.fromNBT(data); - network.setParent(this); - soulNetworks.put(network.getPlayerId(), network); - } - } - - @Override - public NBTTagCompound writeToNBT(NBTTagCompound tagCompound) - { - NBTTagList networkData = new NBTTagList(); - for (SoulNetwork soulNetwork : soulNetworks.values()) - networkData.appendTag(soulNetwork.serializeNBT()); - - tagCompound.setTag("networkData", networkData); - - return tagCompound; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/saving/SoulNetwork.java b/src/main/java/WayofTime/bloodmagic/api/saving/SoulNetwork.java deleted file mode 100644 index 20433b88..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/saving/SoulNetwork.java +++ /dev/null @@ -1,220 +0,0 @@ -package WayofTime.bloodmagic.api.saving; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.event.AddToNetworkEvent; -import WayofTime.bloodmagic.api.event.SoulNetworkEvent; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import com.google.common.base.Strings; -import lombok.Getter; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.INBTSerializable; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.eventhandler.Event; - -import javax.annotation.Nullable; -import java.util.UUID; - -@Getter -public class SoulNetwork implements INBTSerializable -{ - private BMWorldSavedData parent; - private EntityPlayer cachedPlayer; - private UUID playerId; - private int currentEssence; - private int orbTier; - - private SoulNetwork() - { - // No-op - For creation via NBT only - } - - public int add(int toAdd, int maximum) - { - AddToNetworkEvent event = new AddToNetworkEvent(playerId.toString(), toAdd, maximum); - - if (MinecraftForge.EVENT_BUS.post(event)) - return 0; - - if (FMLCommonHandler.instance().getMinecraftServerInstance() == null) - return 0; - - int currEss = getCurrentEssence(); - - if (currEss >= event.maximum) - return 0; - - int newEss = Math.min(event.maximum, currEss + event.addedAmount); - if (event.getResult() != Event.Result.DENY) - setCurrentEssence(newEss); - - return newEss - currEss; - } - - /** - * @deprecated - Please use {@link #add(int, int)} - */ - @Deprecated - public int addLifeEssence(int toAdd, int maximum) - { - return add(toAdd, maximum); - } - - public int syphon(int syphon) - { - if (getCurrentEssence() >= syphon) - { - setCurrentEssence(getCurrentEssence() - syphon); - return syphon; - } - - return 0; - } - - public boolean syphonAndDamage(EntityPlayer user, int toSyphon) - { - if (user != null) - { - if (user.worldObj.isRemote) - return false; - - if (!Strings.isNullOrEmpty(playerId.toString())) - { - SoulNetworkEvent.ItemDrainNetworkEvent event = new SoulNetworkEvent.ItemDrainNetworkEvent(user, playerId.toString(), null, toSyphon); - - if (MinecraftForge.EVENT_BUS.post(event)) - return false; - - int drainAmount = syphon(event.syphon); - - if (drainAmount <= 0 || event.shouldDamage) - hurtPlayer(user, event.syphon); - - return event.getResult() != Event.Result.DENY; - } - - int amount = syphon(toSyphon); - hurtPlayer(user, toSyphon - amount); - - return true; - } - - return false; - } - - public void causeNausea() - { - if (getPlayer() != null) - getPlayer().addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 99)); - } - - /** - * @deprecated - Please use {@link #causeNausea()} - */ - @Deprecated - public void causeNauseaToPlayer() - { - causeNausea(); - } - - public void hurtPlayer(EntityPlayer user, float syphon) - { - if (user != null) - { - if (syphon < 100 && syphon > 0) - { - if (!user.capabilities.isCreativeMode) - { - user.hurtResistantTime = 0; - user.attackEntityFrom(BloodMagicAPI.getDamageSource(), 1.0F); - } - - } else if (syphon >= 100) - { - if (!user.capabilities.isCreativeMode) - { - for (int i = 0; i < ((syphon + 99) / 100); i++) - { - user.hurtResistantTime = 0; - user.attackEntityFrom(BloodMagicAPI.getDamageSource(), 1.0F); - } - } - } - } - } - - private void markDirty() - { - if (getParent() != null) - getParent().markDirty(); - else - BloodMagicAPI.getLogger().error("A SoulNetwork was created, but a parent was not set to allow saving."); - } - - @Nullable - public EntityPlayer getPlayer() - { - if (cachedPlayer == null) - cachedPlayer = PlayerHelper.getPlayerFromUUID(playerId); - - return cachedPlayer; - } - - public SoulNetwork setCurrentEssence(int currentEssence) - { - this.currentEssence = currentEssence; - markDirty(); - return this; - } - - public SoulNetwork setOrbTier(int orbTier) - { - this.orbTier = orbTier; - markDirty(); - return this; - } - - public SoulNetwork setParent(BMWorldSavedData parent) - { - this.parent = parent; - markDirty(); - return this; - } - - // INBTSerializable - - @Override - public NBTTagCompound serializeNBT() - { - NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setString("playerId", getPlayerId().toString()); - tagCompound.setInteger("currentEssence", getCurrentEssence()); - tagCompound.setInteger("orbTier", getOrbTier()); - return tagCompound; - } - - @Override - public void deserializeNBT(NBTTagCompound nbt) - { - this.playerId = UUID.fromString(nbt.getString("playerId")); - this.currentEssence = nbt.getInteger("currentEssence"); - this.orbTier = nbt.getInteger("orbTier"); - } - - public static SoulNetwork fromNBT(NBTTagCompound tagCompound) - { - SoulNetwork soulNetwork = new SoulNetwork(); - soulNetwork.deserializeNBT(tagCompound); - return soulNetwork; - } - - public static SoulNetwork newEmpty(UUID uuid) - { - SoulNetwork network = new SoulNetwork(); - network.playerId = uuid; - return network; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/DemonWillHolder.java b/src/main/java/WayofTime/bloodmagic/api/soul/DemonWillHolder.java deleted file mode 100644 index 792381d6..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/DemonWillHolder.java +++ /dev/null @@ -1,99 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.nbt.NBTTagCompound; - -import java.util.HashMap; -import java.util.Map.Entry; - -public class DemonWillHolder -{ - public HashMap willMap = new HashMap(); - - public double addWill(EnumDemonWillType type, double amount, double max) - { - double current = 0; - if (willMap.containsKey(type)) - { - current = willMap.get(type); - } - - double added = Math.min(max - current, amount); - addWill(type, amount); - - return added; - } - - public void addWill(EnumDemonWillType type, double amount) - { - if (willMap.containsKey(type)) - { - willMap.put(type, amount + willMap.get(type)); - } else - { - willMap.put(type, amount); - } - } - - public double drainWill(EnumDemonWillType type, double amount) - { - if (willMap.containsKey(type)) - { - double current = willMap.get(type); - double reduced = Math.min(current, amount); - - if (reduced >= current) - { - willMap.remove(type); - } else - { - willMap.put(type, current - reduced); - } - - return reduced; - } - - return 0; - } - - public double getWill(EnumDemonWillType type) - { - if (willMap.containsKey(type)) - { - return willMap.get(type); - } - - return 0; - } - - public void readFromNBT(NBTTagCompound tag, String key) - { - NBTTagCompound willTag = tag.getCompoundTag(key); - - willMap.clear(); - - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - double amount = willTag.getDouble("EnumWill" + type.getName()); - if (amount > 0) - { - willMap.put(type, amount); - } - } - } - - public void writeToNBT(NBTTagCompound tag, String key) - { - NBTTagCompound willTag = new NBTTagCompound(); - for (Entry entry : willMap.entrySet()) - { - willTag.setDouble("EnumWill" + entry.getKey().getName(), entry.getValue()); - } - - tag.setTag(key, willTag); - } - - public void clearWill() - { - willMap.clear(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java b/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java deleted file mode 100644 index df58f660..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java +++ /dev/null @@ -1,33 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumDemonWillType implements IStringSerializable -{ - DEFAULT("default"), - CORROSIVE("corrosive"), - DESTRUCTIVE("destructive"), - VENGEFUL("vengeful"), - STEADFAST("steadfast"); - - public final String name; - - EnumDemonWillType(String name) - { - this.name = name; - } - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java deleted file mode 100644 index ea1a3717..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.item.ItemStack; - -public interface IDemonWill -{ - /** - * Obtains the amount of Will an ItemStack contains. - * - * @param willStack - * - The stack to retrieve the Will from - * - * @return - The amount of Will an ItemStack contains - */ - double getWill(EnumDemonWillType type, ItemStack willStack); - - @Deprecated - double getWill(ItemStack willStack); - - /** - * Sets the amount of Will in a given ItemStack. - * - * @param willStack - * - The ItemStack of the Will - * @param will - * - The amount of will to set the stack to - */ - void setWill(EnumDemonWillType type, ItemStack willStack, double will); - - @Deprecated - void setWill(ItemStack willStack, double will); - - /** - * Drains the demonic will from the willStack. If all of the will is - * drained, the willStack will be removed. - * - * @param willStack - * - The ItemStack of the will - * @param drainAmount - * - The amount of Will to drain - * - * @return The amount of will drained. - */ - double drainWill(EnumDemonWillType type, ItemStack willStack, double drainAmount); - - @Deprecated - double drainWill(ItemStack willStack, double drainAmount); - - /** - * Creates a new ItemStack with the specified number of will. Implementation - * should respect the number requested. - * - * @param meta - * - The meta of the ItemStack to create - * @param number - * - The amount of Will to create the Stack with. - * - * @return - An ItemStack with the set amount of Will - */ - ItemStack createWill(int meta, double number); - - EnumDemonWillType getType(ItemStack stack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillConduit.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillConduit.java deleted file mode 100644 index 3527af42..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillConduit.java +++ /dev/null @@ -1,20 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -/** - * Implement this interface on a block that can accept and store Demonic Will. - * - */ -public interface IDemonWillConduit -{ - int getWeight(); - - double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill); - - double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain); - - boolean canFill(EnumDemonWillType type); - - boolean canDrain(EnumDemonWillType type); - - double getCurrentWill(EnumDemonWillType type); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java deleted file mode 100644 index cebfe039..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.item.ItemStack; - -public interface IDemonWillGem -{ - /** - * - * @param willGemStack - * - The ItemStack for this demon will gem. - * @param willStack - * - The ItemStack for the will. Item should extend IDemonWill - * @return - The remainder willStack after the will has been absorbed into - * the gem. Return null if there is no will left in the stack. - */ - ItemStack fillDemonWillGem(ItemStack willGemStack, ItemStack willStack); - - /** - * Returns the number of souls that are left in the soul gem. Returns a - * double because souls can be fractionally drained. - * - */ - double getWill(EnumDemonWillType type, ItemStack willGemStack); - - void setWill(EnumDemonWillType type, ItemStack willGemStack, double amount); - - int getMaxWill(EnumDemonWillType type, ItemStack willGemStack); - - double drainWill(EnumDemonWillType type, ItemStack stack, double drainAmount, boolean doDrain); - - double fillWill(EnumDemonWillType type, ItemStack stack, double fillAmount, boolean doFill); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java deleted file mode 100644 index 1b3699b0..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -import java.util.List; - -public interface IDemonWillWeapon -{ - List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java deleted file mode 100644 index 7712cea6..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.item.ItemStack; - -public interface IDiscreteDemonWill -{ - /** - * Obtains the amount of Will an ItemStack contains. - * - * @param soulStack - * - The stack to retrieve the Will from - * - * @return - The amount of Will an ItemStack contains - */ - double getWill(ItemStack soulStack); - - /** - * Drains the demonic will from the willStack. If all of the will is - * drained, the willStack will be removed. Will only drain in discrete - * amounts, determined by getDiscretization. - * - * @param willStack - * - The ItemStack of the will - * @param drainAmount - * - The amount of Will to drain - * - * @return The amount of will drained. - */ - double drainWill(ItemStack willStack, double drainAmount); - - /** - * Gets the discrete number for this demonic will. - * - * @param willStack - * - The ItemStack of the will - * - * @return - The discrete number for the given stack. - */ - double getDiscretization(ItemStack willStack); - - /** - * Obtains the type of will this is. - * - * @param willStack - * - The ItemStack of the will - * - * @return - The type of will this is. - */ - EnumDemonWillType getType(ItemStack willStack); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java deleted file mode 100644 index 000a1e26..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java +++ /dev/null @@ -1,225 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * This class provides several helper methods in order to handle soul - * consumption and use for a player. This refers to the Soul System, meaning - * Monster Souls and Soul Gems, etc. The Soul Network's helper methods are found - * in {@link WayofTime.bloodmagic.api.util.helper.NetworkHelper} - */ -public class PlayerDemonWillHandler -{ - /** - * Gets the total amount of Will a player contains in their inventory - * - * @param type - * - The type of Will to check for - * @param player - * - The player to check the will of - * - * @return - The amount of will the player contains - */ - public static double getTotalDemonWill(EnumDemonWillType type, EntityPlayer player) - { - ItemStack[] inventory = player.inventory.mainInventory; - double souls = 0; - - for (ItemStack stack : inventory) - { - if (stack != null) - { - if (stack.getItem() instanceof IDemonWill && ((IDemonWill) stack.getItem()).getType(stack) == type) - { - souls += ((IDemonWill) stack.getItem()).getWill(type, stack); - } else if (stack.getItem() instanceof IDemonWillGem) - { - souls += ((IDemonWillGem) stack.getItem()).getWill(type, stack); - } - } - } - - return souls; - } - - public static EnumDemonWillType getLargestWillType(EntityPlayer player) - { - EnumDemonWillType type = EnumDemonWillType.DEFAULT; - double max = getTotalDemonWill(type, player); - - for (EnumDemonWillType testType : EnumDemonWillType.values()) - { - double value = getTotalDemonWill(testType, player); - if (value > max) - { - type = testType; - } - } - - return type; - } - - /** - * Checks if the player's Tartaric gems are completely full. - * - * @param type - * - The type of Will to check for - * @param player - * - The player to check the Will of - * - * @return - True if all Will containers are full, false if not. - */ - public static boolean isDemonWillFull(EnumDemonWillType type, EntityPlayer player) - { - ItemStack[] inventory = player.inventory.mainInventory; - - boolean hasGem = false; - for (ItemStack stack : inventory) - { - if (stack != null && stack.getItem() instanceof IDemonWillGem) - { - hasGem = true; - if (((IDemonWillGem) stack.getItem()).getWill(type, stack) < ((IDemonWillGem) stack.getItem()).getMaxWill(type, stack)) - return false; - } - } - - return hasGem; - } - - /** - * Consumes Will from the inventory of a given player - * - * @param player - * - The player to consume the will of - * @param amount - * - The amount of will to consume - * - * @return - The amount of will consumed. - */ - public static double consumeDemonWill(EnumDemonWillType type, EntityPlayer player, double amount) - { - double consumed = 0; - - ItemStack[] inventory = player.inventory.mainInventory; - - for (int i = 0; i < inventory.length; i++) - { - if (consumed >= amount) - return consumed; - - ItemStack stack = inventory[i]; - if (stack != null) - { - if (stack.getItem() instanceof IDemonWill && ((IDemonWill) stack.getItem()).getType(stack) == type) - { - consumed += ((IDemonWill) stack.getItem()).drainWill(type, stack, amount - consumed); - if (((IDemonWill) stack.getItem()).getWill(type, stack) <= 0) - inventory[i] = null; - } else if (stack.getItem() instanceof IDemonWillGem) - { - consumed += ((IDemonWillGem) stack.getItem()).drainWill(type, stack, amount - consumed, true); - } - } - } - - return consumed; - } - - /** - * Adds an IDemonWill contained in an ItemStack to one of the Soul Gems in - * the player's inventory. - * - * @param player - * - The player to add will to - * @param willStack - * - ItemStack that contains an IDemonWill to be added - * - * @return - The modified willStack - */ - public static ItemStack addDemonWill(EntityPlayer player, ItemStack willStack) - { - if (willStack == null) - return null; - - ItemStack[] inventory = player.inventory.mainInventory; - - for (ItemStack stack : inventory) - { - if (stack != null && stack.getItem() instanceof IDemonWillGem) - { - ItemStack newStack = ((IDemonWillGem) stack.getItem()).fillDemonWillGem(stack, willStack); - if (newStack == null) - return null; - } - } - - return willStack; - } - - /** - * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul - * Gems in the player's inventory. - * - * @param type - * - The type of Will to add - * @param player - * - The player to check the Will of - * @param amount - * - The amount of will to add - * - * @return - The amount of will added - */ - public static double addDemonWill(EnumDemonWillType type, EntityPlayer player, double amount) - { - ItemStack[] inventory = player.inventory.mainInventory; - double remaining = amount; - - for (ItemStack stack : inventory) - { - if (stack != null && stack.getItem() instanceof IDemonWillGem) - { - remaining -= ((IDemonWillGem) stack.getItem()).fillWill(type, stack, remaining, true); - if (remaining <= 0) - break; - } - } - - return amount - remaining; - } - - /** - * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul - * Gems in the player's inventory while ignoring a specified stack. - * - * @param type - * - The type of Will to add - * @param player - * - The player to check the Will of - * @param amount - * - The amount of will to add - * @param ignored - * - A stack to ignore - * - * @return - The amount of will added - */ - public static double addDemonWill(EnumDemonWillType type, EntityPlayer player, double amount, ItemStack ignored) - { - ItemStack[] inventory = player.inventory.mainInventory; - double remaining = amount; - - for (ItemStack stack : inventory) - { - if (stack != null && !stack.equals(ignored) && stack.getItem() instanceof IDemonWillGem) - { - remaining -= ((IDemonWillGem) stack.getItem()).fillWill(type, stack, remaining, true); - - if (remaining <= 0) - break; - } - } - - return amount - remaining; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/package-info.java b/src/main/java/WayofTime/bloodmagic/api/soul/package-info.java deleted file mode 100644 index d248248c..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.soul; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java b/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java deleted file mode 100644 index 1ff58db1..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.api.teleport; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -import net.minecraft.util.math.BlockPos; - -import java.io.Serializable; - -@ToString -@EqualsAndHashCode -@Getter -public class ChunkPairSerializable implements Serializable -{ - private int chunkXPos; - private int chunkZPos; - - public ChunkPairSerializable(int chunkXPos, int chunkZPos) - { - this.chunkXPos = chunkXPos; - this.chunkZPos = chunkZPos; - } - - public ChunkPairSerializable(BlockPos blockPos) - { - this(blockPos.getX() >> 4, blockPos.getZ() >> 4); - } - - public BlockPos getChunkCenter(int y) - { - return new BlockPos((chunkXPos << 4) + 8, y, (chunkZPos << 4) + 8); - } - - public BlockPos getChunkCenter() - { - return getChunkCenter(64); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/ITeleport.java b/src/main/java/WayofTime/bloodmagic/api/teleport/ITeleport.java deleted file mode 100644 index f9e48986..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/ITeleport.java +++ /dev/null @@ -1,8 +0,0 @@ -package WayofTime.bloodmagic.api.teleport; - -public interface ITeleport -{ - void teleport(); - - int getTeleportCost(); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java b/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java deleted file mode 100644 index 644b4ffd..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.bloodmagic.api.teleport; - -import WayofTime.bloodmagic.api.Constants; -import lombok.Getter; -import lombok.ToString; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; - -import java.io.Serializable; - -@ToString -public class PortalLocation implements Serializable -{ - @Getter - private int x; - @Getter - private int y; - @Getter - private int z; - @Getter - private int dimension; - - public PortalLocation(int x, int y, int z, int dimension) - { - this.x = x; - this.y = y; - this.z = z; - this.dimension = dimension; - } - - public PortalLocation(BlockPos blockPos, int dimension) - { - this(blockPos.getX(), blockPos.getY(), blockPos.getZ(), dimension); - } - - public static PortalLocation readFromNBT(NBTTagCompound tag) - { - if (tag.hasKey(Constants.NBT.PORTAL_LOCATION)) - { - NBTTagCompound locationTag = tag.getCompoundTag(Constants.NBT.PORTAL_LOCATION); - return new PortalLocation(locationTag.getInteger(Constants.NBT.X_COORD), locationTag.getInteger(Constants.NBT.Y_COORD), locationTag.getInteger(Constants.NBT.Z_COORD), locationTag.getInteger(Constants.NBT.DIMENSION_ID)); - } - return null; - } - - public NBTTagCompound writeToNBT(NBTTagCompound tag) - { - NBTTagCompound locationTag = new NBTTagCompound(); - - locationTag.setInteger(Constants.NBT.X_COORD, x); - locationTag.setInteger(Constants.NBT.Y_COORD, y); - locationTag.setInteger(Constants.NBT.Z_COORD, z); - locationTag.setInteger(Constants.NBT.DIMENSION_ID, dimension); - tag.setTag(Constants.NBT.PORTAL_LOCATION, locationTag); - - return tag; - } - - public BlockPos getBlockPos() - { - return new BlockPos(x, y, z); - } - - @Override - public boolean equals(Object o) - { - if (this == o) - return true; - if (o == null || getClass() != o.getClass()) - return false; - - PortalLocation that = (PortalLocation) o; - - if (x != that.x) - return false; - if (y != that.y) - return false; - return z == that.z; - - } - - @Override - public int hashCode() - { - int result = x; - result = 31 * result + y; - result = 31 * result + z; - return result; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/Teleport.java b/src/main/java/WayofTime/bloodmagic/api/teleport/Teleport.java deleted file mode 100644 index 8b0d470c..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/Teleport.java +++ /dev/null @@ -1,37 +0,0 @@ -package WayofTime.bloodmagic.api.teleport; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.BlockPos; - -@ToString -@EqualsAndHashCode -public abstract class Teleport implements ITeleport -{ - @Getter - protected int x; - @Getter - protected int y; - @Getter - protected int z; - @Getter - protected Entity entity; - @Getter - protected String networkToDrain; - - public Teleport(int x, int y, int z, Entity entity, String networkToDrain) - { - this.x = x; - this.y = y; - this.z = z; - this.entity = entity; - this.networkToDrain = networkToDrain; - } - - public Teleport(BlockPos blockPos, Entity entity, String networkToDrain) - { - this(blockPos.getX(), blockPos.getY(), blockPos.getZ(), entity, networkToDrain); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/TeleportQueue.java b/src/main/java/WayofTime/bloodmagic/api/teleport/TeleportQueue.java deleted file mode 100644 index d4a374cd..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/TeleportQueue.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.api.teleport; - -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; - -import java.util.ArrayList; -import java.util.List; - -public class TeleportQueue -{ - private static TeleportQueue INSTANCE = new TeleportQueue(); - private static List queue; - - public static TeleportQueue getInstance() - { - return INSTANCE; - } - - private TeleportQueue() - { - queue = new ArrayList(); - } - - public void addITeleport(ITeleport iTeleport) - { - queue.add(iTeleport); - } - - @SubscribeEvent - public void serverTick(TickEvent.ServerTickEvent event) - { - if (event.phase != TickEvent.Phase.END) - { - return; - } - - for (ITeleport iTeleport : queue) - { - iTeleport.teleport(); - } - - queue.clear(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java b/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java deleted file mode 100644 index 2c164ee8..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.api.teleport; - -import net.minecraft.entity.Entity; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.Teleporter; -import net.minecraft.world.WorldServer; - -public class TeleporterBloodMagic extends Teleporter -{ - public TeleporterBloodMagic(WorldServer worldServer) - { - super(worldServer); - } - - @Override - public boolean makePortal(Entity entity) - { - return true; - } - - @Override - public void removeStalePortalLocations(long worldTime) - { - ; - } - - @Override - public boolean placeInExistingPortal(Entity entityIn, float rotationYaw) - { - return true; - } - - @Override - public void placeInPortal(Entity entity, float rotationYaw) - { - entity.setLocationAndAngles(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY) + 2, MathHelper.floor_double(entity.posZ), entity.rotationYaw, entity.rotationPitch); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/package-info.java b/src/main/java/WayofTime/bloodmagic/api/teleport/package-info.java deleted file mode 100644 index 64276d1a..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.teleport; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java deleted file mode 100644 index 7ebf7eaa..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java +++ /dev/null @@ -1,179 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.ItemBindEvent; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.util.handler.event.GenericHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; - -import java.util.UUID; - -public class BindableHelper -{ - /** - * Sets the Owner Name of the item without checking if it is already bound. - * Also bypasses {@link ItemBindEvent}. - * - * @param stack - * - The ItemStack to bind - * @param ownerName - * - The username to bind the ItemStack to - */ - public static void setItemOwnerName(ItemStack stack, String ownerName) - { - stack = NBTHelper.checkNBT(stack); - - stack.getTagCompound().setString(Constants.NBT.OWNER_NAME, ownerName); - } - - /** - * Sets the Owner UUID of the item without checking if it is already bound. - * Also bypasses {@link ItemBindEvent}. - * - * @param stack - * - The ItemStack to bind - * @param ownerUUID - * - The UUID to bind the ItemStack to - */ - public static void setItemOwnerUUID(ItemStack stack, String ownerUUID) - { - stack = NBTHelper.checkNBT(stack); - - stack.getTagCompound().setString(Constants.NBT.OWNER_UUID, ownerUUID); - } - - // Everything below is to be removed. - - /** - * Deprecated. - * - * Built into {@link IBindable} now. - * - * @param stack - * - The ItemStack to check the owner of - * - * @return - The username of the ItemStack's owner - */ - @Deprecated - public static String getOwnerName(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - - return PlayerHelper.getUsernameFromStack(stack); - } - - /** - * Deprecated. - * - * Built into {@link IBindable} now. - * - * @param stack - * - The ItemStack to check the owner of - * - * @return - The UUID of the ItemStack's owner - */ - @Deprecated - public static String getOwnerUUID(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - - return stack.getTagCompound().getString(Constants.NBT.OWNER_UUID); - } - - /** - * Deprecated. - * - * Now handled automatically with - * {@link GenericHandler#onInteract(PlayerInteractEvent.RightClickItem)} - * - * @param stack - * - The ItemStack to bind - * @param player - * - The Player to bind the ItemStack to - * - * @return - Whether binding was successful - */ - @Deprecated - public static boolean checkAndSetItemOwner(ItemStack stack, EntityPlayer player) - { - return !PlayerHelper.isFakePlayer(player) && checkAndSetItemOwner(stack, PlayerHelper.getUUIDFromPlayer(player), player.getName()); - } - - /** - * Deprecated. - * - * Now handled automatically with - * {@link GenericHandler#onInteract(PlayerInteractEvent.RightClickItem)} - * - * @param stack - * - The ItemStack to bind - * @param uuid - * - The username to bind the ItemStack to - * @param currentUsername - * - The current name of the player. - * - * @return - Whether the binding was successful - */ - @Deprecated - public static boolean checkAndSetItemOwner(ItemStack stack, String uuid, String currentUsername) - { - stack = NBTHelper.checkNBT(stack); - - if (!(stack.getItem() instanceof IBindable)) - return false; - - String currentOwner = stack.getTagCompound().getString(Constants.NBT.OWNER_UUID); - - if (currentOwner == "") //The player has not been set yet, so set everything. - { - MinecraftForge.EVENT_BUS.post(new ItemBindEvent(PlayerHelper.getPlayerFromUUID(uuid), uuid, stack)); - ((IBindable) stack.getItem()).onBind(PlayerHelper.getPlayerFromUUID(uuid), stack); - stack.getTagCompound().setString(Constants.NBT.OWNER_UUID, uuid); - stack.getTagCompound().setString(Constants.NBT.OWNER_NAME, currentUsername); - return true; - } else if (currentOwner.equals(uuid)) //The player has been set, so this will simply update the display name - { - stack.getTagCompound().setString(Constants.NBT.OWNER_NAME, currentUsername); - } - - return true; - } - - /** - * Deprecated. - * - * Now handled automatically with - * {@link GenericHandler#onInteract(PlayerInteractEvent.RightClickItem)} - * - * @param stack - * - ItemStack to check - * @param uuid - * - UUID of the Player - * @param currentUsername - * - The current name of the player. - */ - @Deprecated - public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid, String currentUsername) - { - return checkAndSetItemOwner(stack, uuid.toString(), currentUsername); - } - - /** - * Deprecated. - * - * @see #setItemOwnerName(ItemStack, String) - * - * @param stack - * - The ItemStack to bind - * @param ownerName - * - The username to bind the ItemStack to - */ - @Deprecated - public static void setItemOwner(ItemStack stack, String ownerName) - { - setItemOwnerName(stack, ownerName); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/IncenseHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/IncenseHelper.java deleted file mode 100644 index 4fd64661..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/IncenseHelper.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; - -public class IncenseHelper -{ - public static double getCurrentIncense(EntityPlayer player) - { - NBTTagCompound data = player.getEntityData(); - if (data.hasKey(Constants.NBT.CURRENT_INCENSE)) - { - return data.getDouble(Constants.NBT.CURRENT_INCENSE); - } - - return 0; - } - - public static void setCurrentIncense(EntityPlayer player, double amount) - { - NBTTagCompound data = player.getEntityData(); - data.setDouble(Constants.NBT.CURRENT_INCENSE, amount); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/ItemHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/ItemHelper.java deleted file mode 100644 index 9657a11f..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/ItemHelper.java +++ /dev/null @@ -1,161 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.iface.IItemLPContainer; -import WayofTime.bloodmagic.api.iface.IUpgradeTrainer; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.item.ItemUpgradeTome; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class ItemHelper -{ - // IItemLPContainer - public static class LPContainer - { - /** - * Attempts to fill an altar with the contained LP - * - * @param altar - * - The altar in question - * @param itemStack - * - The {@link IItemLPContainer} ItemStack filling the altar - * @param world - * - The world - * @param altarPos - * - The position of the altar - * - * @return Whether or not the altar was filled (or at least attempted) - */ - public static boolean tryAndFillAltar(IBloodAltar altar, ItemStack itemStack, World world, BlockPos altarPos) - { - if (itemStack.getItem() instanceof IItemLPContainer) - { - if (!altar.isActive()) - { - IItemLPContainer fillable = (IItemLPContainer) itemStack.getItem(); - int amount = fillable.getStoredLP(itemStack); - - if (amount > 0) - { - int filledAmount = altar.fillMainTank(amount); - amount -= filledAmount; - fillable.setStoredLP(itemStack, amount); - world.notifyBlockUpdate(altarPos, world.getBlockState(altarPos), world.getBlockState(altarPos), 3); - return true; - } - } - } - - return false; - } - - /** - * Adds the given LP into the {@link IItemLPContainer}'s storage - * - * @param stack - * - The item in question - * @param toAdd - * - How much LP should be added to the item - * @param maxCapacity - * - The item's maximum holding capacity - * - * @return Whether or not LP was added to the item - */ - public static boolean addLPToItem(ItemStack stack, int toAdd, int maxCapacity) - { - if (stack.getItem() instanceof IItemLPContainer) - { - IItemLPContainer fillable = (IItemLPContainer) stack.getItem(); - stack = NBTHelper.checkNBT(stack); - - if (toAdd < 0) - toAdd = 0; - - if (toAdd > maxCapacity) - toAdd = maxCapacity; - - fillable.setStoredLP(stack, Math.min(fillable.getStoredLP(stack) + toAdd, maxCapacity)); - return true; - } - - return false; - } - } - - public static class LivingUpgrades - { - public static LivingArmourUpgrade getUpgrade(ItemStack stack) - { - if (stack.getItem() instanceof ItemUpgradeTome || stack.getItem() instanceof IUpgradeTrainer) - { - String key = getKey(stack); - int level = getLevel(stack); - - return LivingArmourHandler.generateUpgradeFromKey(key, level); - } - - return null; - } - - public static void setUpgrade(ItemStack stack, LivingArmourUpgrade upgrade) - { - if (stack.getItem() instanceof ItemUpgradeTome || stack.getItem() instanceof IUpgradeTrainer) - { - setKey(stack, upgrade.getUniqueIdentifier()); - setLevel(stack, upgrade.getUpgradeLevel()); - } - } - - public static void setKey(ItemStack stack, String key) - { - if (stack.getItem() instanceof ItemUpgradeTome || stack.getItem() instanceof IUpgradeTrainer) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString("key", key); - } - } - - public static String getKey(ItemStack stack) - { - if (stack.getItem() instanceof ItemUpgradeTome || stack.getItem() instanceof IUpgradeTrainer) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getString("key"); - } - - return ""; - } - - public static void setLevel(ItemStack stack, int level) - { - if (stack.getItem() instanceof ItemUpgradeTome || stack.getItem() instanceof IUpgradeTrainer) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - tag.setInteger("level", level); - } - } - - public static int getLevel(ItemStack stack) - { - if (stack.getItem() instanceof ItemUpgradeTome || stack.getItem() instanceof IUpgradeTrainer) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getInteger("level"); - } - - return 0; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/LogHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/LogHelper.java deleted file mode 100644 index ca72d76e..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/LogHelper.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -public class LogHelper -{ - private Logger logger; - - public LogHelper(String logger) - { - this.logger = LogManager.getLogger(logger); - } - - public void info(String info, Object... format) - { - if (BloodMagicAPI.isLoggingEnabled()) - logger.info(info, format); - } - - public void error(String error, Object... format) - { - if (BloodMagicAPI.isLoggingEnabled()) - logger.error(error, format); - } - - public void debug(String debug, Object... format) - { - if (BloodMagicAPI.isLoggingEnabled()) - logger.debug(debug, format); - } - - public void fatal(String fatal, Object... format) - { - logger.error(fatal, format); - } - - public Logger getLogger() - { - return logger; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/NBTHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/NBTHelper.java deleted file mode 100644 index f189483b..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/NBTHelper.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class NBTHelper -{ - public static ItemStack checkNBT(ItemStack stack) - { - if (stack.getTagCompound() == null) - stack.setTagCompound(new NBTTagCompound()); - - return stack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java deleted file mode 100644 index 8a8540b5..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java +++ /dev/null @@ -1,188 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.SoulNetworkEvent; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.api.saving.BMWorldSavedData; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import com.google.common.base.Strings; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; - -import java.util.UUID; - -public class NetworkHelper -{ - // Get - - /** - * Gets the SoulNetwork for the player. - * - * @param uuid - * - The UUID of the SoulNetwork owner - this is UUID.toString(). - * - * @return - The SoulNetwork for the given name. - */ - public static SoulNetwork getSoulNetwork(String uuid) - { - World world = DimensionManager.getWorld(0); - if (world == null || world.getMapStorage() == null) //Hack-ish way to fix the lava crystal. - return new BMWorldSavedData().getNetwork(UUID.fromString(uuid)); - - BMWorldSavedData saveData = (BMWorldSavedData) world.getMapStorage().getOrLoadData(BMWorldSavedData.class, BMWorldSavedData.ID); - - if (saveData == null) - { - saveData = new BMWorldSavedData(); - world.getMapStorage().setData(BMWorldSavedData.ID, saveData); - } - - return saveData.getNetwork(UUID.fromString(uuid)); - } - - /** - * @see NetworkHelper#getSoulNetwork(String) - * - * @param uuid - * - The Player's Mojang UUID - */ - public static SoulNetwork getSoulNetwork(UUID uuid) - { - return getSoulNetwork(uuid.toString()); - } - - /** - * @see NetworkHelper#getSoulNetwork(String) - * - * @param player - * - The Player - */ - public static SoulNetwork getSoulNetwork(EntityPlayer player) - { - return getSoulNetwork(PlayerHelper.getUUIDFromPlayer(player)); - } - - /** - * Gets the current orb tier of the SoulNetwork. - * - * @param soulNetwork - * - SoulNetwork to get the tier of. - * - * @return - The Orb tier of the given SoulNetwork - */ - public static int getCurrentMaxOrb(SoulNetwork soulNetwork) - { - return soulNetwork.getOrbTier(); - } - - public static int getMaximumForTier(int tier) - { - int ret = 0; - - if (tier > OrbRegistry.getTierMap().size() || tier < 0) - return ret; - - for (ItemStack orbStack : OrbRegistry.getOrbsForTier(tier)) - if (((IBloodOrb) orbStack.getItem()).getMaxEssence(orbStack.getItemDamage()) > ret) - ret = ((IBloodOrb) orbStack.getItem()).getMaxEssence(orbStack.getItemDamage()); - - return ret; - } - - // Syphon - - /** - * Syphons from the player and damages them if there was not enough stored - * LP. - * - * Handles null-checking the player for you. - * - * @param soulNetwork - * - SoulNetwork to syphon from - * @param user - * - User of the item. - * @param toSyphon - * - Amount of LP to syphon - * - * @return - Whether the action should be performed. - */ - public static boolean syphonAndDamage(SoulNetwork soulNetwork, EntityPlayer user, int toSyphon) - { - -// if (soulNetwork.getPlayer() == null) -// { -// soulNetwork.syphon(toSyphon); -// return true; -// } - - return soulNetwork.syphonAndDamage(user, toSyphon); - } - - /** - * Syphons a player from within a container. - * - * @param stack - * - ItemStack in the Container. - * @param toSyphon - * - Amount of LP to syphon - * - * @return - If the syphon was successful. - */ - public static boolean syphonFromContainer(ItemStack stack, int toSyphon) //TODO: Change to a String, int? - { - stack = NBTHelper.checkNBT(stack); - String ownerName = stack.getTagCompound().getString(Constants.NBT.OWNER_UUID); - - if (Strings.isNullOrEmpty(ownerName)) - return false; - - SoulNetwork network = getSoulNetwork(ownerName); - - SoulNetworkEvent.ItemDrainInContainerEvent event = new SoulNetworkEvent.ItemDrainInContainerEvent(stack, ownerName, toSyphon); - - return !(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) && network.syphon(event.syphon) >= toSyphon; - } - - /** - * Checks if the ItemStack has a user to be syphoned from. - * - * @param stack - * - ItemStack to check - * @param toSyphon - * - Amount of LP to syphon - * - * @return - If syphoning is possible - */ - public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon) - { - stack = NBTHelper.checkNBT(stack); - String ownerName = stack.getTagCompound().getString(Constants.NBT.OWNER_UUID); - - if (Strings.isNullOrEmpty(ownerName)) - return false; - - SoulNetwork network = getSoulNetwork(ownerName); - return network.getCurrentEssence() >= toSyphon; - } - - // Set - - /** - * Sets the orb tier of the SoulNetwork to the given orb. Will not set if - * the given tier is lower than the current tier. - * - * @param soulNetwork - * - SoulNetwork to set the orb tier of - * @param maxOrb - * - Tier of orb to set to - */ - public static void setMaxOrb(SoulNetwork soulNetwork, int maxOrb) - { - soulNetwork.setOrbTier(Math.max(maxOrb, soulNetwork.getOrbTier())); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java deleted file mode 100644 index 0b4a1163..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java +++ /dev/null @@ -1,105 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.Constants; -import com.google.common.base.Strings; -import com.google.common.collect.Lists; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraftforge.common.UsernameCache; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.relauncher.Side; - -import java.util.ArrayList; -import java.util.UUID; - -public class PlayerHelper -{ - /** - * A list of all known fake players that do not extend FakePlayer. - * - * Will be added to as needed. - */ - private static final ArrayList knownFakePlayers = Lists.newArrayList(); - - public static String getUsernameFromPlayer(EntityPlayer player) - { - return player.worldObj.isRemote ? "" : UsernameCache.getLastKnownUsername(getUUIDFromPlayer(player)); - } - - public static EntityPlayer getPlayerFromUsername(String username) - { - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) - return null; - - return FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerByUsername(username); - } - - public static EntityPlayer getPlayerFromUUID(String uuid) - { - return getPlayerFromUsername(getUsernameFromUUID(uuid)); - } - - public static EntityPlayer getPlayerFromUUID(UUID uuid) - { - return getPlayerFromUsername(getUsernameFromUUID(uuid)); - } - - public static UUID getUUIDFromPlayer(EntityPlayer player) - { - return player.getGameProfile().getId(); - } - - public static String getUsernameFromUUID(String uuid) - { - return UsernameCache.getLastKnownUsername(UUID.fromString(uuid)); - } - - public static String getUsernameFromUUID(UUID uuid) - { - return UsernameCache.getLastKnownUsername(uuid); - } - - public static String getUsernameFromStack(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - - return stack.getTagCompound().getString(Constants.NBT.OWNER_NAME); - } - - /** - * Checks whether or not the given player is an "actual" player - * - * @param player - * - The player in question - * - * @return If the player is fake or not - */ - public static boolean isFakePlayer(EntityPlayer player) - { - return player != null && (player instanceof FakePlayer || knownFakePlayers.contains(player.getClass().getCanonicalName())); - } - - public static void causeNauseaToPlayer(ItemStack stack) - { - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) - return; - - stack = NBTHelper.checkNBT(stack); - - if (!Strings.isNullOrEmpty(stack.getTagCompound().getString(Constants.NBT.OWNER_UUID))) - causeNauseaToPlayer(stack.getTagCompound().getString(Constants.NBT.OWNER_UUID)); - } - - public static void causeNauseaToPlayer(String ownerName) - { - EntityPlayer player = getPlayerFromUsername(ownerName); - - if (player == null) - return; - - player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 80)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerSacrificeHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerSacrificeHelper.java deleted file mode 100644 index 8b7b5b5e..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerSacrificeHelper.java +++ /dev/null @@ -1,155 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.registry.ModPotions; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class PlayerSacrificeHelper -{ - public static float scalingOfSacrifice = 1f; - public static int soulFrayDuration = 400; - public static Potion soulFrayId; - - public static double getPlayerIncense(EntityPlayer player) - { - return IncenseHelper.getCurrentIncense(player); - } - - public static void setPlayerIncense(EntityPlayer player, double amount) - { - IncenseHelper.setCurrentIncense(player, amount); - } - - public static boolean incrementIncense(EntityPlayer player, double min, double incenseAddition, double increment) - { - double amount = getPlayerIncense(player); - if (amount < min || amount >= incenseAddition) - { - return false; - } - - amount = amount + Math.min(increment, incenseAddition - amount); - setPlayerIncense(player, amount); - - // System.out.println("Amount of incense: " + amount + ", Increment: " + - // increment); - - return true; - } - - /** - * Sacrifices a player's health while the player is under the influence of - * incense - * - * @param player - * - The player sacrificing - * - * @return Whether or not the health sacrificing succeeded - */ - public static boolean sacrificePlayerHealth(EntityPlayer player) - { - if (player.isPotionActive(soulFrayId)) - { - return false; - } - - double amount = getPlayerIncense(player); - - if (amount >= 0) - { - float health = player.getHealth(); - float maxHealth = player.getMaxHealth(); - - if (health > maxHealth / 10.0) - { - float sacrificedHealth = health - maxHealth / 10.0f; - - if (findAndFillAltar(player.getEntityWorld(), player, (int) (sacrificedHealth * ConfigHandler.sacrificialDaggerConversion * getModifier(amount)), false)) - { - player.setHealth(maxHealth / 10.0f); - setPlayerIncense(player, 0); - player.addPotionEffect(new PotionEffect(ModPotions.soulFray, soulFrayDuration)); - - return true; - } - } - } - - return false; - } - - public static double getModifier(double amount) - { - return 1 + amount * scalingOfSacrifice; - } - - /** - * Finds the nearest {@link IBloodAltar} and attempts to fill it - * - * @param world - * - The world - * @param sacrificingEntity - * - The entity having the sacrifice done on (can be - * {@link EntityPlayer} for self-sacrifice) - * @param amount - * - The amount of which the altar should be filled - * @param isSacrifice - * - Whether this is a Sacrifice or a Self-Sacrifice - * - * @return Whether the altar is found and (attempted) filled - */ - public static boolean findAndFillAltar(World world, EntityLivingBase sacrificingEntity, int amount, boolean isSacrifice) - { - IBloodAltar altarEntity = getAltar(world, sacrificingEntity.getPosition()); - - if (altarEntity == null) - return false; - - altarEntity.sacrificialDaggerCall(amount, isSacrifice); - altarEntity.startCycle(); - - return true; - } - - /** - * Gets the nearest {@link IBloodAltar} - * - * @param world - * - The world - * @param blockPos - * - The position of where the check should be in (in a 2 block - * radius from this) - * - * @return The nearest altar, if no altar is found, then this will return - * null - */ - public static IBloodAltar getAltar(World world, BlockPos blockPos) - { - TileEntity tileEntity; - - for (int x = -2; x <= 2; x++) - { - for (int y = -2; y <= 1; y++) - { - for (int z = -2; z <= 2; z++) - { - tileEntity = world.getTileEntity(blockPos.add(x, y, z)); - - if (tileEntity instanceof IBloodAltar) - { - return (IBloodAltar) tileEntity; - } - } - } - } - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/PurificationHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/PurificationHelper.java deleted file mode 100644 index 4bf13551..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/PurificationHelper.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.nbt.NBTTagCompound; -import WayofTime.bloodmagic.api.Constants; - -public class PurificationHelper -{ - public static double getCurrentPurity(EntityAnimal animal) - { - NBTTagCompound data = animal.getEntityData(); - if (data.hasKey(Constants.NBT.CURRENT_PURITY)) - { - return data.getDouble(Constants.NBT.CURRENT_PURITY); - } - - return 0; - } - - public static void setCurrentPurity(EntityAnimal animal, double amount) - { - NBTTagCompound data = animal.getEntityData(); - data.setDouble(Constants.NBT.CURRENT_PURITY, amount); - } - - public static double addPurity(EntityAnimal animal, double added, double max) - { - double currentPurity = getCurrentPurity(animal); - double newAmount = Math.min(max, currentPurity + added); - - if (newAmount < max) - { - setCurrentPurity(animal, newAmount); - return newAmount - currentPurity; - } - - return 0; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java deleted file mode 100644 index 2d98b0a6..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java +++ /dev/null @@ -1,165 +0,0 @@ -package WayofTime.bloodmagic.api.util.helper; - -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.CapabilityInject; - -import java.util.ArrayList; - -public class RitualHelper -{ - @CapabilityInject(IRitualStone.Tile.class) - static Capability RUNE_CAPABILITY = null; - - public static boolean canCrystalActivate(Ritual ritual, int crystalLevel) - { - return ritual.getCrystalLevel() <= crystalLevel && RitualRegistry.ritualEnabled(ritual); - } - - public static String getNextRitualKey(String currentKey) - { - int currentIndex = RitualRegistry.getIds().indexOf(currentKey); - int nextIndex = RitualRegistry.getRituals().listIterator(currentIndex).nextIndex(); - - return RitualRegistry.getIds().get(nextIndex); - } - - public static String getPrevRitualKey(String currentKey) - { - int currentIndex = RitualRegistry.getIds().indexOf(currentKey); - int previousIndex = RitualRegistry.getIds().listIterator(currentIndex).previousIndex(); - - return RitualRegistry.getIds().get(previousIndex); - } - - /** - * Checks the RitualRegistry to see if the configuration of the ritual - * stones in the world is valid for the given EnumFacing. - * - * @param world - * - The world - * @param pos - * - Location of the MasterRitualStone - * - * @return The ID of the valid ritual - */ - public static String getValidRitual(World world, BlockPos pos) - { - for (String key : RitualRegistry.getIds()) - { - for (EnumFacing direction : EnumFacing.HORIZONTALS) - { - boolean test = checkValidRitual(world, pos, key, direction); - if (test) - { - return key; - } - } - } - - return ""; - } - - public static EnumFacing getDirectionOfRitual(World world, BlockPos pos, String key) - { - for (EnumFacing direction : EnumFacing.HORIZONTALS) - { - boolean test = checkValidRitual(world, pos, key, direction); - if (test) - { - return direction; - } - } - - return null; - } - - public static boolean checkValidRitual(World world, BlockPos pos, String ritualId, EnumFacing direction) - { - Ritual ritual = RitualRegistry.getRitualForId(ritualId); - if (ritual == null) - { - return false; - } - - ArrayList components = ritual.getComponents(); - - if (components == null) - return false; - - for (RitualComponent component : components) - { - BlockPos newPos = pos.add(component.getOffset(direction)); - if (isRuneType(world, newPos, component.getRuneType())) - { - continue; - } else - { - return false; - } - } - - return true; - } - - public static boolean isRuneType(World world, BlockPos pos, EnumRuneType type) - { - if (world == null) - return false; - Block block = world.getBlockState(pos).getBlock(); - TileEntity tile = world.getTileEntity(pos); - - if (block instanceof IRitualStone) - return ((IRitualStone) block).isRuneType(world, pos, type); - else if (tile instanceof IRitualStone.Tile) - return ((IRitualStone.Tile) tile).isRuneType(type); - else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null)) - return tile.getCapability(RUNE_CAPABILITY, null).isRuneType(type); - - return false; - } - - public static boolean isRune(World world, BlockPos pos) - { - if (world == null) - return false; - Block block = world.getBlockState(pos).getBlock(); - TileEntity tile = world.getTileEntity(pos); - - if (block instanceof IRitualStone) - return true; - else if (tile instanceof IRitualStone.Tile) - return true; - else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null)) - return true; - - return false; - } - - public static void setRuneType(World world, BlockPos pos, EnumRuneType type) - { - if (world == null) - return; - Block block = world.getBlockState(pos).getBlock(); - TileEntity tile = world.getTileEntity(pos); - - if (block instanceof IRitualStone) - ((IRitualStone) block).setRuneType(world, pos, type); - else if (tile instanceof IRitualStone.Tile) - ((IRitualStone.Tile) tile).setRuneType(type); - else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null)) - { - tile.getCapability(RUNE_CAPABILITY, null).setRuneType(type); - world.notifyBlockOfStateChange(pos, block); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/package-info.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/package-info.java deleted file mode 100644 index 6e2b5bcb..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.api.util.helper; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockAlchemyArray.java b/src/main/java/WayofTime/bloodmagic/block/BlockAlchemyArray.java deleted file mode 100644 index 29a03a07..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockAlchemyArray.java +++ /dev/null @@ -1,158 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.tile.TileAlchemyArray; -import WayofTime.bloodmagic.util.Utils; - -public class BlockAlchemyArray extends BlockContainer -{ - protected static final AxisAlignedBB ARRAY_AABB = new AxisAlignedBB(0, 0, 0, 1, 0.1, 1); - - public BlockAlchemyArray() - { - super(Material.CLOTH); - - setUnlocalizedName(Constants.Mod.MODID + ".alchemyArray"); - setHardness(0.1f); - } - - @Override - public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB mask, List list, Entity collidingEntity) - { - // No-op - } - - @Override - public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileAlchemyArray) - { - ((TileAlchemyArray) tile).onEntityCollidedWithBlock(state, entity); - } - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - return ARRAY_AABB; - } - - @Override - @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.CUTOUT; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.INVISIBLE; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - //TODO: Right click should rotate it - TileAlchemyArray array = (TileAlchemyArray) world.getTileEntity(pos); - - if (array == null || player.isSneaking()) - return false; - - ItemStack playerItem = player.getHeldItem(hand); - - if (playerItem != null) - { - if (array.getStackInSlot(0) == null) - { - Utils.insertItemToTile(array, player, 0); - } else if (array.getStackInSlot(0) != null) - { - Utils.insertItemToTile(array, player, 1); - array.attemptCraft(); - } else - { - return true; - } - } - - world.notifyBlockUpdate(pos, state, state, 3); - return true; - } - - @Override - public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) - { - return new ItemStack(ModItems.ARCANE_ASHES); - } - - @Override - public int quantityDropped(Random random) - { - return 0; - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileAlchemyArray(); - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileAlchemyArray alchemyArray = (TileAlchemyArray) world.getTileEntity(blockPos); - if (alchemyArray != null) - alchemyArray.dropItems(); - - super.breakBlock(world, blockPos, blockState); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockAlchemyTable.java b/src/main/java/WayofTime/bloodmagic/block/BlockAlchemyTable.java deleted file mode 100644 index 2674b21b..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockAlchemyTable.java +++ /dev/null @@ -1,169 +0,0 @@ -package WayofTime.bloodmagic.block; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.TileAlchemyTable; - -public class BlockAlchemyTable extends BlockContainer -{ - public static final PropertyBool INVISIBLE = PropertyBool.create("invisible"); - public static final PropertyEnum DIRECTION = PropertyEnum.create("direction", EnumFacing.class); - - public BlockAlchemyTable() - { - super(Material.ROCK); -// this.setDefaultState(this.blockState.getBaseState().withProperty(DIRECTION, EnumFacing.DOWN).withProperty(INVISIBLE, false)); - - setUnlocalizedName(Constants.Mod.MODID + ".alchemyTable"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 0); - -// setBlockBounds(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F); - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) - { - return layer == BlockRenderLayer.CUTOUT_MIPPED || layer == BlockRenderLayer.TRANSLUCENT; - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState(); - } - - /** - * Convert the BlockState into the correct metadata value - */ - @Override - public int getMetaFromState(IBlockState state) - { - return 0; - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileAlchemyTable) - { - return state.withProperty(INVISIBLE, ((TileAlchemyTable) tile).isInvisible()).withProperty(DIRECTION, ((TileAlchemyTable) tile).getDirection()); - } - - return state.withProperty(INVISIBLE, false); - } - - @Override - protected BlockStateContainer createBlockState() - { - return new BlockStateContainer(this, new IProperty[] { DIRECTION, INVISIBLE }); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileAlchemyTable(); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - BlockPos position = pos; - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileAlchemyTable) - { - if (((TileAlchemyTable) tile).isSlave()) - { - position = ((TileAlchemyTable) tile).getConnectedPos(); - tile = world.getTileEntity(position); - if (!(tile instanceof TileAlchemyTable)) - { - return false; - } - } - } - - player.openGui(BloodMagic.instance, Constants.Gui.ALCHEMY_TABLE_GUI, world, position.getX(), position.getY(), position.getZ()); - - return true; - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState blockState) - { - TileAlchemyTable tile = (TileAlchemyTable) world.getTileEntity(pos); - if (tile != null && !tile.isSlave()) - { - tile.dropItems(); - } - - super.breakBlock(world, pos, blockState); - } - - @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock) - { - TileAlchemyTable tile = (TileAlchemyTable) world.getTileEntity(pos); - if (tile != null) - { - BlockPos connectedPos = tile.getConnectedPos(); - TileEntity connectedTile = world.getTileEntity(connectedPos); - if (!(connectedTile instanceof TileAlchemyTable && ((TileAlchemyTable) connectedTile).getConnectedPos().equals(pos))) - { - this.breakBlock(world, pos, state); - world.setBlockToAir(pos); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java b/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java deleted file mode 100644 index 2e01b83c..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java +++ /dev/null @@ -1,204 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import WayofTime.bloodmagic.altar.BloodAltar; -import WayofTime.bloodmagic.api.altar.EnumAltarComponent; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.iface.IDocumentedBlock; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.IAltarManipulator; -import WayofTime.bloodmagic.api.iface.IAltarReader; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.util.Utils; - -import com.google.common.base.Strings; - -public class BlockAltar extends BlockContainer implements IVariantProvider, IDocumentedBlock -{ - public BlockAltar() - { - super(Material.ROCK); - - setUnlocalizedName(Constants.Mod.MODID + ".altar"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 1); - } - - @Override - public boolean hasComparatorInputOverride(IBlockState state) - { - return true; - } - - @Override - public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) - { - if (world.isRemote) - return 0; - - TileEntity tile = world.getTileEntity(pos); - - if (tile != null && tile instanceof TileAltar) - { - TileAltar altar = (TileAltar) tile; - ItemStack orbStack = altar.getStackInSlot(0); - - if (world.getBlockState(pos.down()).getBlock() instanceof BlockBloodStoneBrick) - { - if (orbStack != null && orbStack.getItem() instanceof IBloodOrb && orbStack.getItem() instanceof IBindable) - { - IBloodOrb bloodOrb = (IBloodOrb) orbStack.getItem(); - IBindable bindable = (IBindable) orbStack.getItem(); - if (!Strings.isNullOrEmpty(bindable.getOwnerUUID(orbStack))) - { - SoulNetwork soulNetwork = NetworkHelper.getSoulNetwork(bindable.getOwnerUUID(orbStack)); - - int maxEssence = bloodOrb.getMaxEssence(orbStack.getItemDamage()); - int currentEssence = soulNetwork.getCurrentEssence(); - int level = currentEssence * 15 / maxEssence; - return Math.min(15, level) % 16; - } - } - } else - { - int maxEssence = altar.getCapacity(); - int currentEssence = altar.getCurrentBlood(); - int level = currentEssence * 15 / maxEssence; - return Math.min(15, level) % 16; - } - } - - return 0; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileAltar(); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - TileAltar altar = (TileAltar) world.getTileEntity(pos); - - if (altar == null || player.isSneaking()) - return false; - - ItemStack playerItem = player.inventory.getCurrentItem(); - - if (playerItem != null) - { - if (playerItem.getItem() instanceof IAltarReader || playerItem.getItem() instanceof IAltarManipulator) - { - playerItem.getItem().onItemRightClick(playerItem, world, player, hand); - return true; - } - } - - if (Utils.insertItemToTile(altar, player)) - altar.startCycle(); - else - altar.setActive(); - - world.notifyBlockUpdate(pos, state, state, 3); - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TileAltar) - { - TileAltar tileAltar = (TileAltar) world.getTileEntity(blockPos); - if (tileAltar != null) - tileAltar.dropItems(); - } - - super.breakBlock(world, blockPos, blockState); - } - - // IVariantProvider - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } - - // IDocumentedBlock - - @Override - public List getDocumentation(EntityPlayer player, World world, BlockPos pos, IBlockState state) - { - List docs = new ArrayList(); - IBloodAltar altar = ((IBloodAltar) world.getTileEntity(pos)); - Pair missingBlock = BloodAltar.getAltarMissingBlock(world, pos, altar.getTier().toInt()); - if (missingBlock != null) - docs.add(new TextComponentTranslation("chat.BloodMagic.altar.nextTier", new TextComponentTranslation(missingBlock.getRight().getKey()), Utils.prettifyBlockPosString(missingBlock.getLeft()))); - - return docs; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java deleted file mode 100644 index cbca3d2e..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java +++ /dev/null @@ -1,125 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.particle.ParticleManager; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.registry.ModItems; - -public class BlockBloodLight extends Block -{ - protected static final AxisAlignedBB AABB = new AxisAlignedBB(0.4, 0.4, 0.4, 0.6, 0.6, 0.6); - - public BlockBloodLight() - { - super(Material.CLOTH); - - setUnlocalizedName(Constants.Mod.MODID + ".bloodLight"); - } - - @Override - public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB mask, List list, Entity collidingEntity) - { - - } - - @Override - public boolean isReplaceable(IBlockAccess world, BlockPos pos) - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.CUTOUT; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public int getLightValue(IBlockState state) - { - return 15; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean addDestroyEffects(World world, BlockPos pos, ParticleManager particleManager) - { - if (world.getBlockState(pos).getBlock() == this) - { - Random random = new Random(); - particleManager.spawnEffectParticle(EnumParticleTypes.REDSTONE.getParticleID(), pos.getX() + 0.5D + random.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + random.nextGaussian() / 8, 0, 0, 0); - } - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) - { - EntityPlayerSP playerSP = Minecraft.getMinecraft().thePlayer; - - if (rand.nextInt(3) != 0) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); - if (playerSP.getActiveItemStack() != null && playerSP.getActiveItemStack().getItem() == ModItems.SIGIL_BLOOD_LIGHT) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); - } - } - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - return AABB; - } - - @Override - public int quantityDropped(Random par1Random) - { - return 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java deleted file mode 100644 index aaffd0ed..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.block.enums.EnumBloodRune; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class BlockBloodRune extends BlockEnum implements IVariantProvider -{ - public BlockBloodRune() - { - super(Material.ROCK, EnumBloodRune.class); - - setUnlocalizedName(Constants.Mod.MODID + ".rune."); - setCreativeTab(BloodMagic.tabBloodMagic); - setSoundType(SoundType.STONE); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - } - - public int getRuneEffect(int meta) - { - return meta; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe")); - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java deleted file mode 100644 index 2dfd0095..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.block.enums.EnumBrickSize; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockBloodStoneBrick extends BlockEnum implements IVariantProvider -{ - public BlockBloodStoneBrick() - { - super(Material.ROCK, EnumBrickSize.class); - - setUnlocalizedName(Constants.Mod.MODID + ".bloodstonebrick."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java deleted file mode 100644 index 4b6ab6f4..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java +++ /dev/null @@ -1,210 +0,0 @@ -package WayofTime.bloodmagic.block; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockInteger; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileBloodTank; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; - -public class BlockBloodTank extends BlockInteger implements IVariantProvider -{ - public static final AxisAlignedBB BOX = new AxisAlignedBB(0.25, 0, 0.25, 0.75, 0.8, 0.75); - - public BlockBloodTank() - { - super(Material.IRON, TileBloodTank.CAPACITIES.length - 1, "tier"); - - setUnlocalizedName(Constants.Mod.MODID + ".bloodTank"); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.GLASS); - setHarvestLevel("pickaxe", 1); - setCreativeTab(BloodMagic.tabBloodMagic); - setLightOpacity(0); - } - - @Nullable - @Override - public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) - { - return BOX; - } - - @Override - public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World worldIn, BlockPos pos) - { - return BOX; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.CUTOUT_MIPPED; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - TileBloodTank fluidHandler = (TileBloodTank) world.getTileEntity(blockPos); - if (FluidUtil.interactWithFluidHandler(heldItem, fluidHandler.getTank(), player)) - { - world.checkLight(blockPos); - world.updateComparatorOutputLevel(blockPos, this); - world.markAndNotifyBlock(blockPos, world.getChunkFromBlockCoords(blockPos), state, state, 3); - return true; - } - - return true; - } - - @Override - public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player) - { - if (!player.capabilities.isCreativeMode) - this.dropBlockAsItem(worldIn, pos, state, 0); - super.onBlockHarvested(worldIn, pos, state, player); - } - - @Override - public List getDrops(IBlockAccess world, BlockPos pos, IBlockState blockState, int fortune) - { - ArrayList list = new ArrayList(); - - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileBloodTank) - { - TileBloodTank bloodTank = (TileBloodTank) tile; - ItemStack drop = new ItemStack(this); - NBTTagCompound tag = new NBTTagCompound(); - bloodTank.serialize(tag); - drop.setTagCompound(tag); - drop.setItemDamage(getMetaFromState(blockState)); - list.add(drop); - } - - return list; - } - - @Override - public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase placer, ItemStack stack) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileBloodTank) - { - NBTTagCompound tag = stack.getTagCompound(); - if (tag != null) - { - ((TileBloodTank) tile).deserialize(tag); - blockState.withProperty(getProperty(), stack.getMetadata()); - } - } - - world.checkLight(pos); - world.updateComparatorOutputLevel(pos, this); - world.markAndNotifyBlock(pos, world.getChunkFromBlockCoords(pos), blockState, blockState, 3); - } - - @Override - public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileBloodTank) - { - FluidStack fluidStack = ((TileBloodTank) tile).getTank().getFluid(); - return fluidStack == null || fluidStack.amount <= 0 ? 0 : fluidStack.getFluid().getLuminosity(fluidStack); - } - - return super.getLightValue(state, world, pos); - } - - @Override - public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) - { - return new ItemStack(this, 1, getMetaFromState(state)); - } - - @Override - public boolean hasComparatorInputOverride(IBlockState state) - { - return true; - } - - @Override - public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileBloodTank) - return ((TileBloodTank) tile).getComparatorOutput(); - return 0; - } - - @Override - public TileEntity createTileEntity(World worldIn, IBlockState blockState) - { - return new TileBloodTank(getMetaFromState(blockState)); - } - - @Override - public boolean hasTileEntity(IBlockState state) - { - return true; - } - - // IVariantProvider - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < TileBloodTank.CAPACITIES.length; i++) - ret.add(new ImmutablePair(i, "inventory")); - - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java b/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java deleted file mode 100644 index 0ee11fa4..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.block.enums.EnumBrickSize; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockCrystal extends BlockEnum implements IVariantProvider -{ - public BlockCrystal() - { - super(Material.ROCK, EnumBrickSize.class); - - setUnlocalizedName(Constants.Mod.MODID + ".crystal."); - setCreativeTab(BloodMagic.tabBloodMagic); - setSoundType(SoundType.STONE); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonBase.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonBase.java deleted file mode 100644 index ab665f5b..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonBase.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.util.IStringSerializable; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockDemonBase & IStringSerializable> extends BlockEnum implements IVariantProvider -{ - public BlockDemonBase(String baseName, Class enumClass) - { - super(Material.ROCK, enumClass); - - setUnlocalizedName(Constants.Mod.MODID + "." + baseName + "."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java deleted file mode 100644 index ef3faa04..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java +++ /dev/null @@ -1,114 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.IDemonWillGem; -import WayofTime.bloodmagic.api.soul.IDiscreteDemonWill; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileDemonCrucible; -import WayofTime.bloodmagic.util.Utils; - -public class BlockDemonCrucible extends BlockContainer implements IVariantProvider -{ - public BlockDemonCrucible() - { - super(Material.ROCK); - - setUnlocalizedName(Constants.Mod.MODID + ".demonCrucible"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 0); - -// setBlockBounds(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F); - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileDemonCrucible(); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - TileDemonCrucible crucible = (TileDemonCrucible) world.getTileEntity(pos); - - if (crucible == null || player.isSneaking()) - return false; - - if (heldItem != null) - { - if (!(heldItem.getItem() instanceof IDiscreteDemonWill) && !(heldItem.getItem() instanceof IDemonWillGem)) - { - return true; - } - } - - Utils.insertItemToTile(crucible, player); - - world.notifyBlockUpdate(pos, state, state, 3); - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileDemonCrucible tile = (TileDemonCrucible) world.getTileEntity(blockPos); - if (tile != null) - tile.dropItems(); - - super.breakBlock(world, blockPos, blockState); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystal.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystal.java deleted file mode 100644 index 44e5b325..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystal.java +++ /dev/null @@ -1,245 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.item.ItemDemonCrystal; -import WayofTime.bloodmagic.tile.TileDemonCrystal; - -public class BlockDemonCrystal extends BlockContainer -{ - public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 6); - public static final PropertyEnum TYPE = PropertyEnum.create("type", EnumDemonWillType.class); - public static final PropertyEnum ATTACHED = PropertyEnum.create("attached", EnumFacing.class); - - public BlockDemonCrystal() - { - super(Material.ROCK); - this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, EnumDemonWillType.DEFAULT).withProperty(ATTACHED, EnumFacing.UP)); - - setUnlocalizedName(Constants.Mod.MODID + ".demonCrystal."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - } - - @Override - public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side) - { - BlockPos offsetPos = pos.offset(side.getOpposite()); - IBlockState offsetState = world.getBlockState(offsetPos); - Block offsetBlock = offsetState.getBlock(); - - return offsetBlock.isSideSolid(offsetState, world, offsetPos, side) && this.canPlaceBlockAt(world, pos); - } - - @Override - public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock) - { - TileDemonCrystal tile = (TileDemonCrystal) world.getTileEntity(pos); - EnumFacing placement = tile.getPlacement(); - BlockPos offsetPos = pos.offset(placement.getOpposite()); - IBlockState offsetState = world.getBlockState(offsetPos); - Block offsetBlock = offsetState.getBlock(); - - if (!offsetBlock.isSideSolid(offsetState, world, offsetPos, placement)) - { - world.setBlockToAir(pos); - } - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) - { - if (world.getTileEntity(pos) == null) - { - return state; - } - TileDemonCrystal tile = (TileDemonCrystal) world.getTileEntity(pos); - return state.withProperty(AGE, tile.getCrystalCountForRender()).withProperty(ATTACHED, tile.getPlacement()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) - { - for (int i = 0; i < EnumDemonWillType.values().length; i++) - list.add(new ItemStack(this, 1, i)); - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - -// public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) -// { -// return (worldIn.getLight(pos) >= 8 || worldIn.canSeeSky(pos)) && worldIn.getBlockState(pos.down()).getBlock().canSustainPlant(worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this); -// } - - /** - * Convert the given metadata into a BlockState for this Block - */ - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState().withProperty(TYPE, EnumDemonWillType.values()[meta]); - } - - /** - * Convert the BlockState into the correct metadata value - */ - @Override - public int getMetaFromState(IBlockState state) - { - return ((EnumDemonWillType) state.getValue(TYPE)).ordinal(); - } - - @Override - protected BlockStateContainer createBlockState() - { - return new BlockStateContainer(this, new IProperty[] { TYPE, AGE, ATTACHED }); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileDemonCrystal(); - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - TileDemonCrystal tile = (TileDemonCrystal) world.getTileEntity(pos); - EnumDemonWillType type = state.getValue(TYPE); - int number = tile.getCrystalCount(); - - spawnAsEntity(world, pos, getItemStackDropped(type, number)); - world.removeTileEntity(pos); - } - - public static ItemStack getItemStackDropped(EnumDemonWillType type, int crystalNumber) - { - ItemStack stack = null; - switch (type) - { - case CORROSIVE: - stack = ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_CORROSIVE); - break; - case DEFAULT: - stack = ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT); - break; - case DESTRUCTIVE: - stack = ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE); - break; - case STEADFAST: - stack = ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST); - break; - case VENGEFUL: - stack = ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_VENGEFUL); - break; - } - - stack.stackSize = crystalNumber; - return stack; - } - - @Override - public int quantityDropped(Random random) - { - return 0; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - { - return true; - } - - TileDemonCrystal crystal = (TileDemonCrystal) world.getTileEntity(pos); - - if (PlayerDemonWillHandler.getTotalDemonWill(EnumDemonWillType.DEFAULT, player) > 1024) - { - crystal.dropSingleCrystal(); - - world.notifyBlockUpdate(pos, state, state, 3); - } - - return true; - } - -// @Override -// public java.util.List getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune) -// { -// java.util.List ret = super.getDrops(world, pos, state, fortune); -// int age = ((Integer) state.getValue(AGE)).intValue(); -// Random rand = world instanceof World ? ((World) world).rand : new Random(); -// -// if (age >= 7) -// { -// int k = 3 + fortune; -// -// for (int i = 0; i < 3 + fortune; ++i) -// { -// if (rand.nextInt(15) <= age) -// { -// ret.add(new ItemStack(this.getSeed(), 1, 0)); -// } -// } -// } -// return ret; -// } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java deleted file mode 100644 index f10a2fde..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java +++ /dev/null @@ -1,88 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileDemonCrystallizer; - -public class BlockDemonCrystallizer extends BlockContainer implements IVariantProvider -{ - public BlockDemonCrystallizer() - { - super(Material.ROCK); - - setUnlocalizedName(Constants.Mod.MODID + ".demonCrystallizer"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 0); - -// setBlockBounds(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F); - } - - @Override - public boolean isSideSolid(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) - { - return side == EnumFacing.UP; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileDemonCrystallizer(); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonLight.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonLight.java deleted file mode 100644 index 71bc8c46..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonLight.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.block.enums.EnumSubWillType; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockDemonLight extends BlockEnum implements IVariantProvider -{ - public BlockDemonLight() - { - super(Material.ROCK, EnumSubWillType.class); - - setUnlocalizedName(Constants.Mod.MODID + ".demonlight."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - setLightLevel(1); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPillarBase.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonPillarBase.java deleted file mode 100644 index 8fd5c2a0..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPillarBase.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnumPillar; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockDemonPillarBase & IStringSerializable> extends BlockEnumPillar implements IVariantProvider -{ - public BlockDemonPillarBase(String baseName, Material materialIn, Class enumClass) - { - super(materialIn, enumClass); - - setUnlocalizedName(Constants.Mod.MODID + "." + baseName + "."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - - //This is done to make the ItemBlocks have the proper model - EnumFacing.Axis[] axis = new EnumFacing.Axis[] { EnumFacing.Axis.Y, EnumFacing.Axis.X, EnumFacing.Axis.Z }; - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < this.getTypes().length; j++) - { - ret.add(new ImmutablePair(i * 5 + j, "axis=" + axis[i] + ",type=" + this.getTypes()[j])); - } - } - - return ret; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPillarCapBase.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonPillarCapBase.java deleted file mode 100644 index b2729cfa..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPillarCapBase.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnumPillarCap; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockDemonPillarCapBase & IStringSerializable> extends BlockEnumPillarCap implements IVariantProvider -{ - public BlockDemonPillarCapBase(String baseName, Material materialIn, Class enumClass) - { - super(materialIn, enumClass); - - setUnlocalizedName(Constants.Mod.MODID + "." + baseName + "."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - - //This is done to make the ItemBlocks have the proper model - - for (int i = 0; i < EnumFacing.values().length; i++) - { - for (int j = 0; j < this.getTypes().length; j++) - { - ret.add(new ImmutablePair(i * 2 + j, "facing=" + EnumFacing.values()[i] + ",type=" + this.getTypes()[j])); - } - } - - return ret; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java deleted file mode 100644 index c0ff3c2e..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileDemonPylon; - -public class BlockDemonPylon extends BlockContainer implements IVariantProvider -{ - public BlockDemonPylon() - { - super(Material.ROCK); - - setUnlocalizedName(Constants.Mod.MODID + ".demonPylon"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 0); - -// setBlockBounds(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F); - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileDemonPylon(); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonStairsBase.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonStairsBase.java deleted file mode 100644 index 084c90ed..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonStairsBase.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.util.IStringSerializable; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnumStairs; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockDemonStairsBase & IStringSerializable> extends BlockEnumStairs implements IVariantProvider -{ - public BlockDemonStairsBase(String baseName, Material materialIn, Class enumClass) - { - super(materialIn, enumClass); - - setUnlocalizedName(Constants.Mod.MODID + "." + baseName + "."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - - for (int i = 0; i < this.getTypes().length; i++) - { - ret.add(new ImmutablePair(i, "facing=south,half=bottom,shape=straight,type=" + this.getTypes()[i])); - } - - return ret; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonWallBase.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonWallBase.java deleted file mode 100644 index 08fd0e72..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonWallBase.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.util.IStringSerializable; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnumWall; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockDemonWallBase & IStringSerializable> extends BlockEnumWall implements IVariantProvider -{ - public BlockDemonWallBase(String baseName, Material materialIn, Class enumClass) - { - super(materialIn, enumClass); - - setUnlocalizedName(Constants.Mod.MODID + "." + baseName + "."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - - for (int i = 0; i < this.getTypes().length; i++) - ret.add(Pair.of(i, "east=true,north=false,south=false,type=" + this.getTypes()[i] + ",up=true,west=true")); - - return ret; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDimensionalPortal.java b/src/main/java/WayofTime/bloodmagic/block/BlockDimensionalPortal.java deleted file mode 100644 index ccf6dcbb..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDimensionalPortal.java +++ /dev/null @@ -1,213 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.Random; - -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.teleport.PortalLocation; -import WayofTime.bloodmagic.api.teleport.TeleportQueue; -import WayofTime.bloodmagic.block.base.BlockIntegerContainer; -import WayofTime.bloodmagic.ritual.portal.LocationsHandler; -import WayofTime.bloodmagic.ritual.portal.Teleports; -import WayofTime.bloodmagic.tile.TileDimensionalPortal; - -public class BlockDimensionalPortal extends BlockIntegerContainer -{ - protected static final AxisAlignedBB AABB_0 = new AxisAlignedBB(0.0D, 0.0D, 0.375D, 1.0D, 1.0D, 0.625D); - protected static final AxisAlignedBB AABB_1 = new AxisAlignedBB(0.375D, 0.0D, 0.0D, 0.625D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_DEFAULT = new AxisAlignedBB(0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D); - - public BlockDimensionalPortal() - { - super(Material.PORTAL, 2); - setUnlocalizedName(Constants.Mod.MODID + ".dimensionalPortal"); - setBlockUnbreakable(); - setResistance(2000); - setLightOpacity(0); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileDimensionalPortal(); - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos) - { - return null; - } - - public boolean isOpaqueCube() - { - return false; - } - - public boolean isFullCube() - { - return false; - } - - @Override - public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) - { - return 12; - } - - @Override - public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState blockState, Entity entity) - { - if (!world.isRemote && world.getTileEntity(pos) instanceof TileDimensionalPortal) - { - TileDimensionalPortal tile = (TileDimensionalPortal) world.getTileEntity(pos); - - if (LocationsHandler.getLocationsHandler() != null) - { - ArrayList linkedLocations = LocationsHandler.getLocationsHandler().getLinkedLocations(tile.portalID); - - if (linkedLocations != null && !linkedLocations.isEmpty() && linkedLocations.size() > 1) - { - if (world.getTileEntity(tile.getMasterStonePos()) != null && world.getTileEntity(tile.getMasterStonePos()) instanceof IMasterRitualStone) - { - IMasterRitualStone masterRitualStone = (IMasterRitualStone) world.getTileEntity(tile.getMasterStonePos()); - if (linkedLocations.get(0).equals(new PortalLocation(masterRitualStone.getBlockPos().up(), world.provider.getDimension()))) - { - PortalLocation portal = linkedLocations.get(1); - if (portal.getDimension() == world.provider.getDimension()) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(portal.getX(), portal.getY(), portal.getZ(), entity, masterRitualStone.getOwner(), false)); - } else - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(portal.getX(), portal.getY(), portal.getZ(), entity, masterRitualStone.getOwner(), world, portal.getDimension(), false)); - } - } else if (linkedLocations.get(1).equals(new PortalLocation(masterRitualStone.getBlockPos().up(), world.provider.getDimension()))) - { - PortalLocation portal = linkedLocations.get(0); - if (portal.getDimension() == world.provider.getDimension()) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(portal.getX(), portal.getY(), portal.getZ(), entity, masterRitualStone.getOwner(), false)); - } else - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(portal.getX(), portal.getY(), portal.getZ(), entity, masterRitualStone.getOwner(), world, portal.getDimension(), false)); - } - } - } - } - } - } - } - - @Override - public int quantityDropped(Random par1Random) - { - return 0; - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) - { - int meta = state.getBlock().getMetaFromState(state); - if (meta == 0) - { - return AABB_0; - } else if (meta == 1) - { - return AABB_1; - } else - { - return AABB_DEFAULT; - } - } - -// -// @Override -// public void setBlockBoundsForItemRender() -// { -// setBlockBounds(0f, 0f, 0.375f, 1f, 1f, 0.625f); -// } - - @Override - @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.TRANSLUCENT; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) - { - this.spawnParticles(world, pos.getX(), pos.getY(), pos.getZ()); - } - - private void spawnParticles(World world, int x, int y, int z) - { - Random random = world.rand; - double d0 = 0.0625D; - for (int i = 0; i < 6; ++i) - { - double particleX = (double) ((float) x + random.nextFloat()); - double particleY = (double) ((float) y + random.nextFloat()); - double particleZ = (double) ((float) z + random.nextFloat()); - if (i == 0 && !world.getBlockState(new BlockPos(x, y + 1, z)).isOpaqueCube()) - { - particleY = (double) (y + 1) + d0; - } - if (i == 1 && !world.getBlockState(new BlockPos(x, y - 1, z)).isOpaqueCube()) - { - particleY = (double) y - d0; - } - if (i == 2 && !world.getBlockState(new BlockPos(x, y, z + 1)).isOpaqueCube()) - { - particleZ = (double) (z + 1) + d0; - } - if (i == 3 && !world.getBlockState(new BlockPos(x, y, z - 1)).isOpaqueCube()) - { - particleZ = (double) z - d0; - } - if (i == 4 && !world.getBlockState(new BlockPos(x + 1, y, z)).isOpaqueCube()) - { - particleX = (double) (x + 1) + d0; - } - if (i == 5 && !world.getBlockState(new BlockPos(x - 1, y, z)).isOpaqueCube()) - { - particleX = (double) x - d0; - } - if (particleX < (double) x || particleX > (double) (x + 1) || particleY < 0.0D || particleY > (double) (y + 1) || particleZ < (double) z || particleZ > (double) (z + 1)) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, particleX, particleY, particleZ, 0.0D, 0.0D, 0.0D); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java b/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java deleted file mode 100644 index 9e9b5772..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileIncenseAltar; - -public class BlockIncenseAltar extends BlockContainer implements IVariantProvider -{ - protected static final AxisAlignedBB AABB = new AxisAlignedBB(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F); - - public BlockIncenseAltar() - { - super(Material.ROCK); - - setUnlocalizedName(Constants.Mod.MODID + ".incenseAltar"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 0); - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - return AABB; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileIncenseAltar(); - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileIncenseAltar TileIncenseAltar = (TileIncenseAltar) world.getTileEntity(blockPos); - if (TileIncenseAltar != null) - TileIncenseAltar.dropItems(); - - super.breakBlock(world, blockPos, blockState); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockInputRoutingNode.java b/src/main/java/WayofTime/bloodmagic/block/BlockInputRoutingNode.java deleted file mode 100644 index 376975be..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockInputRoutingNode.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.block; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.routing.TileInputRoutingNode; - -public class BlockInputRoutingNode extends BlockRoutingNode -{ - public BlockInputRoutingNode() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".inputRouting"); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileInputRoutingNode(); - } - - @Override - //TODO: Combine BlockInputRoutingNode and BlockInputRoutingNode so they have the same superclass - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileInputRoutingNode) - { - ((TileInputRoutingNode) tile).removeAllConnections(); - ((TileInputRoutingNode) tile).dropItems(); - } - super.breakBlock(world, pos, state); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.getTileEntity(pos) instanceof TileInputRoutingNode) - { - player.openGui(BloodMagic.instance, Constants.Gui.ROUTING_NODE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); - } - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockInversionPillar.java b/src/main/java/WayofTime/bloodmagic/block/BlockInversionPillar.java deleted file mode 100644 index 0e430ba3..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockInversionPillar.java +++ /dev/null @@ -1,114 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.property.Properties; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.block.base.BlockEnumContainer; -import WayofTime.bloodmagic.block.enums.EnumSubWillType; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileInversionPillar; - -public class BlockInversionPillar extends BlockEnumContainer implements IVariantProvider -{ - public BlockInversionPillar() - { - super(Material.ROCK, EnumSubWillType.class); - - setUnlocalizedName(Constants.Mod.MODID + ".inversionpillar."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TileInversionPillar) - { - TileInversionPillar tilePillar = (TileInversionPillar) world.getTileEntity(blockPos); - tilePillar.removePillarFromMap(); - } - - super.breakBlock(world, blockPos, blockState); - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) - { - return super.getActualState(state, world, pos).withProperty(Properties.StaticProperty, true); - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "static=false,type=" + this.getTypes()[i])); - return ret; - } - - @Override - public boolean hasTileEntity(IBlockState state) { - return true; - } - - @Override - public TileEntity createTileEntity(World world, IBlockState state) { - return new TileInversionPillar(state.getValue(getProperty()).getType()); - } - - protected BlockStateContainer createStateContainer() - { - return new BlockStateContainer.Builder(this).add(getProperty(), Properties.StaticProperty).add(Properties.AnimationProperty).build(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockInversionPillarEnd.java b/src/main/java/WayofTime/bloodmagic/block/BlockInversionPillarEnd.java deleted file mode 100644 index 5df6bfc9..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockInversionPillarEnd.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.block.enums.EnumInversionCap; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class BlockInversionPillarEnd extends BlockEnum implements IVariantProvider -{ - public BlockInversionPillarEnd() - { - super(Material.ROCK, EnumInversionCap.class); - - setUnlocalizedName(Constants.Mod.MODID + ".inversionpillarend."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 2); - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/block/BlockItemRoutingNode.java deleted file mode 100644 index 6f15f7b6..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockItemRoutingNode.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.bloodmagic.block; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.routing.TileItemRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileRoutingNode; - -public class BlockItemRoutingNode extends BlockRoutingNode -{ - public BlockItemRoutingNode() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".itemRouting"); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileItemRoutingNode(); - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileRoutingNode) - { - ((TileRoutingNode) tile).removeAllConnections(); - } - super.breakBlock(world, pos, state); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockLifeEssence.java b/src/main/java/WayofTime/bloodmagic/block/BlockLifeEssence.java deleted file mode 100644 index 4897b454..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockLifeEssence.java +++ /dev/null @@ -1,83 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.awt.Color; - -import lombok.Getter; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class BlockLifeEssence extends BlockFluidClassic -{ - @Getter - private static Fluid lifeEssence = new FluidLifeEssence(); - - public BlockLifeEssence() - { - super(lifeEssence, Material.WATER); - - setUnlocalizedName(Constants.Mod.MODID + ".fluid.lifeEssence"); - getLifeEssence().setBlock(this); - BloodMagicAPI.setLifeEssence(getLifeEssence()); - } - - // TODO - Remove after Forge fixes - // Fix for BlockFluidBase not overriding this - @Override - public IBlockState getStateFromMeta(int meta) - { - return getBlockState().getBaseState().withProperty(LEVEL, meta); - } - - @Override - public boolean canDisplace(IBlockAccess world, BlockPos blockPos) - { - return !world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isLiquid() && super.canDisplace(world, blockPos); - } - - @Override - public boolean displaceIfPossible(World world, BlockPos blockPos) - { - return !world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isLiquid() && super.displaceIfPossible(world, blockPos); - } - - @Override - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.SOLID; - } - - public static class FluidLifeEssence extends Fluid - { - - public FluidLifeEssence() - { - super("lifeEssence", new ResourceLocation(Constants.Mod.DOMAIN + "blocks/lifeEssenceStill"), new ResourceLocation(Constants.Mod.DOMAIN + "blocks/lifeEssenceFlowing")); - - setDensity(2000); - setViscosity(2000); - } - - @Override - public int getColor() - { - return Color.RED.getRGB(); - } - - @Override - public String getLocalizedName(FluidStack fluidStack) - { - return TextHelper.localize("tile.BloodMagic.fluid.lifeEssence.name"); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockMasterRoutingNode.java b/src/main/java/WayofTime/bloodmagic/block/BlockMasterRoutingNode.java deleted file mode 100644 index a2f34189..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockMasterRoutingNode.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.block; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode; - -public class BlockMasterRoutingNode extends BlockRoutingNode -{ - public BlockMasterRoutingNode() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".masterRouting"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileMasterRoutingNode(); - } - -// @Override -// public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) -// { -// if (world.getTileEntity(pos) instanceof TileMasterRoutingNode) -// { -// player.openGui(BloodMagic.instance, Constants.Gui.MASTER_ROUTING_NODE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); -// } -// -// return true; -// } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockMimic.java b/src/main/java/WayofTime/bloodmagic/block/BlockMimic.java deleted file mode 100644 index 18121f5c..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockMimic.java +++ /dev/null @@ -1,276 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nullable; - -import net.minecraft.block.Block; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.EnumAltarComponent; -import WayofTime.bloodmagic.api.altar.IAltarComponent; -import WayofTime.bloodmagic.block.base.BlockEnumContainer; -import WayofTime.bloodmagic.block.enums.EnumMimic; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.TileMimic; -import WayofTime.bloodmagic.util.Utils; - -public class BlockMimic extends BlockEnumContainer implements IVariantProvider, IAltarComponent -{ - public static final int sentientMimicMeta = 4; - - public BlockMimic() - { - super(Material.ROCK, EnumMimic.class); - - setUnlocalizedName(Constants.Mod.MODID + ".mimic."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - setHarvestLevel("pickaxe", 0); - setLightOpacity(15); - } - - @Nullable - public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos) - { - switch (this.getMetaFromState(state)) - { - case 1: - case 2: - case 3: - case 4: - TileMimic tileMimic = (TileMimic) world.getTileEntity(pos); - if (tileMimic != null && tileMimic.getStackInSlot(0) != null) - { - Block mimicBlock = Block.getBlockFromItem(tileMimic.getStackInSlot(0).getItem()); - if (mimicBlock == null) - { - return FULL_BLOCK_AABB; - } - IBlockState mimicState = mimicBlock.getStateFromMeta(tileMimic.metaOfReplacedBlock); - if (mimicBlock != this) - { - return mimicState.getCollisionBoundingBox(world, pos); - } - } else - { - return FULL_BLOCK_AABB; - } - case 0: - default: - return NULL_AABB; - } - - } - - @Override - @SideOnly(Side.CLIENT) - public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World world, BlockPos pos) - { - TileMimic tileMimic = (TileMimic) world.getTileEntity(pos); - if (tileMimic != null && tileMimic.getStackInSlot(0) != null) - { - Block mimicBlock = Block.getBlockFromItem(tileMimic.getStackInSlot(0).getItem()); - if (mimicBlock == null) - { - return FULL_BLOCK_AABB; - } - IBlockState mimicState = mimicBlock.getStateFromMeta(tileMimic.getStackInSlot(0).getItemDamage()); - if (mimicBlock != this) - { - return mimicState.getSelectedBoundingBox(world, pos); - } - } - - return FULL_BLOCK_AABB; - } - - @Override - public int getLightOpacity(IBlockState state) - { - switch (this.getMetaFromState(state)) - { - case 2: - case 4: - return 0; - default: - return this.lightOpacity; - } - } - - @Override - public int getLightValue(IBlockState state) - { - switch (this.getMetaFromState(state)) - { - case 3: - return 15; - default: - return this.lightValue; - } - } - - @Override - public int getMetaFromState(IBlockState state) - { - if (state.getBlock() == this) - { - return super.getMetaFromState(state); - } - - return state.getBlock().getMetaFromState(state); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - TileMimic mimic = (TileMimic) world.getTileEntity(pos); - - if (mimic == null) - return false; - - return mimic.onBlockActivated(world, pos, state, player, hand, heldItem, side); - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileMimic) - { - TileMimic mimic = (TileMimic) tile; - ItemStack stack = mimic.getStackInSlot(0); - if (stack != null && stack.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) stack.getItem()).getBlock(); - IBlockState mimicState = block.getStateFromMeta(stack.getItemDamage()); - if (block != this) - { - if (block.getRenderType(mimicState) == EnumBlockRenderType.ENTITYBLOCK_ANIMATED) - { - return ModBlocks.BLOOD_LIGHT.getDefaultState(); //Small and invisible-ish, basically this is returned in order to not render over the animated block (TESR) - } - - return block.getActualState(mimicState, world, pos); - } - } - } - return state; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) - { - return layer == BlockRenderLayer.CUTOUT_MIPPED || layer == BlockRenderLayer.CUTOUT; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TileMimic) - { - TileMimic TileMimic = (TileMimic) world.getTileEntity(blockPos); - if (TileMimic != null) - TileMimic.dropItems(); - } - - super.breakBlock(world, blockPos, blockState); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } - - @Override - public boolean hasTileEntity(IBlockState state) { - return true; - } - - @Override - public TileEntity createTileEntity(World world, IBlockState state) { - return new TileMimic(); - } - - // IAltarComponent - - @Nullable - @Override - public EnumAltarComponent getType(World world, IBlockState state, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileMimic) - { - TileMimic mimic = (TileMimic) tile; - ItemStack stack = mimic.getStackInSlot(0); - if (stack != null && stack.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) stack.getItem()).getBlock(); - if (block instanceof IAltarComponent) - { - return ((IAltarComponent) block).getType(world, block.getStateFromMeta(mimic.metaOfReplacedBlock), pos); - } else - { - for (EnumAltarComponent altarComponent : EnumAltarComponent.values()) - if (block == Utils.getBlockForComponent(altarComponent)) - return altarComponent; - } - } - } - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockOutputRoutingNode.java b/src/main/java/WayofTime/bloodmagic/block/BlockOutputRoutingNode.java deleted file mode 100644 index e9122df9..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockOutputRoutingNode.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.block; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.routing.TileOutputRoutingNode; - -public class BlockOutputRoutingNode extends BlockRoutingNode -{ - public BlockOutputRoutingNode() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".outputRouting"); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileOutputRoutingNode(); - } - - @Override - //TODO: Combine BlockOutputRoutingNode and BlockInputRoutingNode so they have the same superclass - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileOutputRoutingNode) - { - ((TileOutputRoutingNode) tile).removeAllConnections(); - ((TileOutputRoutingNode) tile).dropItems(); - } - super.breakBlock(world, pos, state); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.getTileEntity(pos) instanceof TileOutputRoutingNode) - { - player.openGui(BloodMagic.instance, Constants.Gui.ROUTING_NODE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); - } - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockPath.java b/src/main/java/WayofTime/bloodmagic/block/BlockPath.java deleted file mode 100644 index 1bfaaa76..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockPath.java +++ /dev/null @@ -1,85 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.incense.IIncensePath; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.block.enums.EnumPath; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class BlockPath extends BlockEnum implements IIncensePath, IVariantProvider -{ - - public BlockPath() - { - super(Material.ROCK, EnumPath.class); - - setUnlocalizedName(Constants.Mod.MODID + ".path."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.STONE); - - setHarvestLevel("axe", 0, getStateFromMeta(0)); - setHarvestLevel("axe", 0, getStateFromMeta(1)); - setHarvestLevel("pickaxe", 0, getStateFromMeta(2)); - setHarvestLevel("pickaxe", 0, getStateFromMeta(3)); - setHarvestLevel("pickaxe", 0, getStateFromMeta(4)); - setHarvestLevel("pickaxe", 0, getStateFromMeta(5)); - setHarvestLevel("pickaxe", 3, getStateFromMeta(6)); - setHarvestLevel("pickaxe", 3, getStateFromMeta(7)); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe")); - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public int getLevelOfPath(World world, BlockPos pos, IBlockState state) - { - switch (this.getMetaFromState(state)) - { - case 0: - case 1: - return 2; - case 2: - case 3: - return 4; - case 4: - case 5: - return 6; - case 6: - case 7: - return 8; - default: - return 0; - } - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java b/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java deleted file mode 100644 index 3dde1786..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java +++ /dev/null @@ -1,101 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TilePhantomBlock; - -public class BlockPhantom extends BlockContainer implements IVariantProvider -{ - public BlockPhantom() - { - super(Material.CLOTH); - - setUnlocalizedName(Constants.Mod.MODID + ".phantom"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.TRANSLUCENT; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) - { - return world.getBlockState(pos.offset(side)) != state || state.getBlock() != this && super.shouldSideBeRendered(state, world, pos, side); - } - - @Override - public int quantityDropped(Random par1Random) - { - return 0; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TilePhantomBlock(100); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java b/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java deleted file mode 100644 index 86509cd7..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java +++ /dev/null @@ -1,154 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nullable; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.Optional; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry; -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import WayofTime.bloodmagic.api.util.helper.RitualHelper; -import WayofTime.bloodmagic.block.base.BlockEnumContainer; -import WayofTime.bloodmagic.block.enums.EnumRitualController; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.tile.TileImperfectRitualStone; -import WayofTime.bloodmagic.tile.TileMasterRitualStone; -import WayofTime.bloodmagic.util.ChatUtil; -import amerifrance.guideapi.api.IGuideLinked; - -@Optional.Interface(modid = "guideapi", iface = "amerifrance.guideapi.api.IGuideLinked") -public class BlockRitualController extends BlockEnumContainer implements IVariantProvider, IGuideLinked -{ - public BlockRitualController() - { - super(Material.ROCK, EnumRitualController.class); - - setUnlocalizedName(Constants.Mod.MODID + ".stone.ritual."); - setCreativeTab(BloodMagic.tabBloodMagic); - setSoundType(SoundType.STONE); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - TileEntity tile = world.getTileEntity(pos); - - if (getMetaFromState(state) == 0 && tile instanceof TileMasterRitualStone) - { - if (heldItem != null && heldItem.getItem() == ModItems.ACTIVATION_CRYSTAL) - { - String key = RitualHelper.getValidRitual(world, pos); - EnumFacing direction = RitualHelper.getDirectionOfRitual(world, pos, key); - // TODO: Give a message stating that this ritual is not a valid - // ritual. - if (!key.isEmpty() && direction != null && RitualHelper.checkValidRitual(world, pos, key, direction)) - { - if (((TileMasterRitualStone) tile).activateRitual(heldItem, player, RitualRegistry.getRitualForId(key))) - { - ((TileMasterRitualStone) tile).setDirection(direction); - } - } else - { - ChatUtil.sendNoSpamUnloc(player, "chat.BloodMagic.ritual.notValid"); - } - } - } else if (getMetaFromState(state) == 1 && tile instanceof TileImperfectRitualStone) - { - - IBlockState determinerState = world.getBlockState(pos.up()); - BlockStack determiner = new BlockStack(determinerState.getBlock(), determinerState.getBlock().getMetaFromState(determinerState)); - - return ((TileImperfectRitualStone) tile).performRitual(world, pos, ImperfectRitualRegistry.getRitualForBlock(determiner), player); - } - - return false; - } - - @Override - public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) - { - TileEntity tile = world.getTileEntity(pos); - - if (getMetaFromState(state) == 0 && tile instanceof TileMasterRitualStone) - ((TileMasterRitualStone) tile).stopRitual(Ritual.BreakType.BREAK_MRS); - } - - @Override - public void onBlockDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) - { - TileEntity tile = world.getTileEntity(pos); - - if (tile instanceof TileMasterRitualStone) - ((TileMasterRitualStone) tile).stopRitual(Ritual.BreakType.EXPLOSION); - } - - @Override - public boolean hasTileEntity(IBlockState state) { - return true; - } - - @Override - public TileEntity createTileEntity(World world, IBlockState state) { - return state.getValue(getProperty()) == EnumRitualController.MASTER ? new TileMasterRitualStone() : new TileImperfectRitualStone(); - } - - // IVariantProvider - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } - - // IGuideLinked - - @Override - @Nullable - public ResourceLocation getLinkedEntry(World world, BlockPos pos, EntityPlayer player, ItemStack stack) - { - IBlockState state = world.getBlockState(pos); - if (state.getValue(getProperty()).equals(EnumRitualController.MASTER)) - { - TileMasterRitualStone mrs = (TileMasterRitualStone) world.getTileEntity(pos); - if (mrs == null || mrs.getCurrentRitual() == null) - return null; - else - return new ResourceLocation("bloodmagic", "ritual_" + mrs.getCurrentRitual().getName()); - } else if (state.getValue(getProperty()).equals(EnumRitualController.IMPERFECT)) - { - ImperfectRitual imperfectRitual = ImperfectRitualRegistry.getRitualForBlock(BlockStack.getStackFromPos(world, pos.up())); - if (imperfectRitual != null) - return new ResourceLocation("bloodmagic", "ritual_" + imperfectRitual.getName()); - } - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java b/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java deleted file mode 100644 index 8afa09ef..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IRitualStone; -import WayofTime.bloodmagic.block.base.BlockEnum; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class BlockRitualStone extends BlockEnum implements IRitualStone, IVariantProvider -{ - public BlockRitualStone() - { - super(Material.IRON, EnumRuneType.class); - - setUnlocalizedName(Constants.Mod.MODID + ".ritualStone."); - setCreativeTab(BloodMagic.tabBloodMagic); - setSoundType(SoundType.STONE); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe")); - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public int damageDropped(IBlockState state) - { - return 0; - } - - @Override - public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player) - { - return false; - } - - @Override - public boolean isRuneType(World world, BlockPos pos, EnumRuneType runeType) - { - return runeType == this.getTypes()[getMetaFromState(world.getBlockState(pos))]; - } - - @Override - public void setRuneType(World world, BlockPos pos, EnumRuneType runeType) - { - int meta = runeType.ordinal(); - IBlockState newState = ModBlocks.RITUAL_STONE.getStateFromMeta(meta); - world.setBlockState(pos, newState); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < this.getTypes().length; i++) - ret.add(new ImmutablePair(i, "type=" + this.getTypes()[i])); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockRoutingNode.java b/src/main/java/WayofTime/bloodmagic/block/BlockRoutingNode.java deleted file mode 100644 index ef4ac201..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockRoutingNode.java +++ /dev/null @@ -1,143 +0,0 @@ -package WayofTime.bloodmagic.block; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileRoutingNode; - -public abstract class BlockRoutingNode extends BlockContainer -{ - protected static final AxisAlignedBB AABB = new AxisAlignedBB(0.378F, 0.378F, 0.378F, 0.625F, 0.625F, 0.625F); - - public static final PropertyBool UP = PropertyBool.create("up"); - public static final PropertyBool DOWN = PropertyBool.create("down"); - public static final PropertyBool NORTH = PropertyBool.create("north"); - public static final PropertyBool EAST = PropertyBool.create("east"); - public static final PropertyBool SOUTH = PropertyBool.create("south"); - public static final PropertyBool WEST = PropertyBool.create("west"); - - public BlockRoutingNode() - { - super(Material.ROCK); - - setCreativeTab(BloodMagic.tabBloodMagic); - setHardness(2.0F); - setResistance(5.0F); - setHarvestLevel("pickaxe", 2); - - this.setDefaultState(this.blockState.getBaseState().withProperty(DOWN, false).withProperty(UP, false).withProperty(NORTH, false).withProperty(EAST, false).withProperty(SOUTH, false).withProperty(WEST, false)); - } - - @Override - public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) - { - return true; - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - return AABB; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) - { - return layer == BlockRenderLayer.CUTOUT_MIPPED || layer == BlockRenderLayer.TRANSLUCENT; - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState(); - } - - /** - * Convert the BlockState into the correct metadata value - */ - @Override - public int getMetaFromState(IBlockState state) - { - return 0; - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) - { - return state.withProperty(UP, this.shouldConnect(state, worldIn, pos.up(), EnumFacing.DOWN)).withProperty(DOWN, this.shouldConnect(state, worldIn, pos.down(), EnumFacing.UP)).withProperty(NORTH, this.shouldConnect(state, worldIn, pos.north(), EnumFacing.SOUTH)).withProperty(EAST, this.shouldConnect(state, worldIn, pos.east(), EnumFacing.WEST)).withProperty(SOUTH, this.shouldConnect(state, worldIn, pos.south(), EnumFacing.NORTH)).withProperty(WEST, this.shouldConnect(state, worldIn, pos.west(), EnumFacing.EAST)); - } - - @Override - protected BlockStateContainer createBlockState() - { - return new BlockStateContainer(this, UP, DOWN, NORTH, EAST, WEST, SOUTH); - } - - public boolean shouldConnect(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing attachedSide) - { - IBlockState blockState = world.getBlockState(pos); - Block block = blockState.getBlock(); - return block.getMaterial(blockState).isOpaque() && blockState.isFullCube(); - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState blockState) - { - if (!world.isRemote) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileRoutingNode) - { - ((TileRoutingNode) tile).removeAllConnections(); - } else if (tile instanceof TileMasterRoutingNode) - { - ((TileMasterRoutingNode) tile).removeAllConnections(); - } - } - - super.breakBlock(world, pos, blockState); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java b/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java deleted file mode 100644 index 0750c130..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java +++ /dev/null @@ -1,113 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileSoulForge; - -public class BlockSoulForge extends BlockContainer implements IVariantProvider -{ - protected static final AxisAlignedBB AABB = new AxisAlignedBB(0.06F, 0.0F, 0.06F, 0.94F, 0.75F, 0.94F); - - public BlockSoulForge() - { - super(Material.IRON); - - setUnlocalizedName(Constants.Mod.MODID + ".soulForge"); - setHardness(2.0F); - setResistance(5.0F); - setSoundType(SoundType.METAL); - setHarvestLevel("pickaxe", 1); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - return AABB; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.getTileEntity(pos) instanceof TileSoulForge) - player.openGui(BloodMagic.instance, Constants.Gui.SOUL_FORGE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); - - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileSoulForge tileSoulForge = (TileSoulForge) world.getTileEntity(blockPos); - if (tileSoulForge != null) - tileSoulForge.dropItems(); - - super.breakBlock(world, blockPos, blockState); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileSoulForge(); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java b/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java deleted file mode 100644 index 357c1a99..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import WayofTime.bloodmagic.ConfigHandler; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileSpectralBlock; - -public class BlockSpectral extends BlockContainer implements IVariantProvider -{ - protected static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 0, 0, 0); - - public BlockSpectral() - { - super(Material.CLOTH); - - setUnlocalizedName(Constants.Mod.MODID + ".spectral"); - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - return AABB; - } - - @Override - public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isVisuallyOpaque() - { - return false; - } - - @SideOnly(Side.CLIENT) - @Override - public BlockRenderLayer getBlockLayer() - { - return BlockRenderLayer.TRANSLUCENT; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return ConfigHandler.invisibleSpectralBlocks ? EnumBlockRenderType.INVISIBLE : EnumBlockRenderType.MODEL; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) - { - return world.getBlockState(pos.offset(side)) != state || state.getBlock() != this && super.shouldSideBeRendered(state, world, pos, side); - } - - @Override - public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB mask, List list, Entity collidingEntity) - { - } - - @Override - public int quantityDropped(Random par1Random) - { - return 0; - } - - @Override - public boolean isReplaceable(IBlockAccess worldIn, BlockPos pos) - { - return true; - } - - @Override - public boolean isAir(IBlockState state, IBlockAccess world, BlockPos blockPos) - { - return true; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileSpectralBlock(); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java b/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java deleted file mode 100644 index f3472a56..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.bloodmagic.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.item.ItemTelepositionFocus; -import WayofTime.bloodmagic.tile.TileTeleposer; - -public class BlockTeleposer extends BlockContainer implements IVariantProvider -{ - public BlockTeleposer() - { - super(Material.ROCK); - - setCreativeTab(BloodMagic.tabBloodMagic); - setUnlocalizedName(Constants.Mod.MODID + ".teleposer"); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) - { - ItemStack playerItem = heldItem; - - if (playerItem != null && playerItem.getItem() instanceof ItemTelepositionFocus) - ((ItemTelepositionFocus) playerItem.getItem()).setBlockPos(playerItem, world, pos); - else if (world.getTileEntity(pos) instanceof TileTeleposer) - player.openGui(BloodMagic.instance, Constants.Gui.TELEPOSER_GUI, world, pos.getX(), pos.getY(), pos.getZ()); - - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - TileTeleposer tileTeleposer = (TileTeleposer) world.getTileEntity(blockPos); - if (tileTeleposer != null) - tileTeleposer.dropItems(); - - super.breakBlock(world, blockPos, blockState); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileTeleposer(); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnum.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockEnum.java deleted file mode 100644 index ce7f0e65..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnum.java +++ /dev/null @@ -1,82 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IStringSerializable; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -@Getter -public class BlockEnum & IStringSerializable> extends Block -{ - private final E[] types; - private final PropertyEnum property; - private final BlockStateContainer realStateContainer; - - public BlockEnum(Material material, Class enumClass, String propName) - { - super(material); - - this.types = enumClass.getEnumConstants(); - this.property = PropertyEnum.create(propName, enumClass); - this.realStateContainer = createStateContainer(); - setDefaultState(getBlockState().getBaseState()); - } - - public BlockEnum(Material material, Class enumClass) - { - this(material, enumClass, "type"); - } - - @Override - protected final BlockStateContainer createBlockState() - { - return new BlockStateContainer.Builder(this).build(); // Blank to avoid crashes - } - - @Override - public final BlockStateContainer getBlockState() - { - return realStateContainer; - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return getDefaultState().withProperty(property, types[meta]); - } - - @Override - public int getMetaFromState(IBlockState state) - { - return state.getValue(property).ordinal(); - } - - @Override - public int damageDropped(IBlockState state) - { - return getMetaFromState(state); - } - - @SideOnly(Side.CLIENT) - @Override - public void getSubBlocks(Item item, CreativeTabs tab, List subBlocks) - { - for (E type : types) - subBlocks.add(new ItemStack(item, 1, type.ordinal())); - } - - protected BlockStateContainer createStateContainer() - { - return new BlockStateContainer.Builder(this).add(property).build(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumContainer.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumContainer.java deleted file mode 100644 index c7144317..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumContainer.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public abstract class BlockEnumContainer & IStringSerializable> extends BlockEnum -{ - public BlockEnumContainer(Material material, Class enumClass, String propName) - { - super(material, enumClass, propName); - } - - public BlockEnumContainer(Material material, Class enumClass) - { - this(material, enumClass, "type"); - } - - @Override - public abstract boolean hasTileEntity(IBlockState state); - - @Override - public abstract TileEntity createTileEntity(World world, IBlockState state); - - @Override - public void breakBlock(World worldIn, BlockPos pos, IBlockState state) - { - super.breakBlock(worldIn, pos, state); - worldIn.removeTileEntity(pos); - } - - @Override - public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int eventID, int eventParam) - { - super.eventReceived(state, worldIn, pos, eventID, eventParam); - TileEntity tileentity = worldIn.getTileEntity(pos); - return tileentity != null && tileentity.receiveClientEvent(eventID, eventParam); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumPillar.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumPillar.java deleted file mode 100644 index 70772f8a..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumPillar.java +++ /dev/null @@ -1,141 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import net.minecraft.block.BlockRotatedPillar; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; - -import org.apache.commons.lang3.ArrayUtils; - -public class BlockEnumPillar & IStringSerializable> extends BlockEnum -{ - public BlockEnumPillar(Material material, Class enumClass, String propName) - { - super(material, enumClass, propName); - } - - public BlockEnumPillar(Material material, Class enumClass) - { - this(material, enumClass, "type"); - } - - @Override - protected BlockStateContainer createStateContainer() - { - return new BlockStateContainer.Builder(this).add(getProperty(), BlockRotatedPillar.AXIS).build(); - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - IBlockState state = getBlockState().getBaseState().withProperty(this.getProperty(), getTypes()[meta % 5]); - - switch (meta / 5) - { - case 0: - state = state.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.Y); - break; - case 1: - state = state.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.X); - break; - case 2: - state = state.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.Z); - break; - default: - state.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.Y); - break; - } - - return state; - } - - @Override - public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @SuppressWarnings("incomplete-switch") - @Override - public int getMetaFromState(IBlockState state) - { - int i = ArrayUtils.indexOf(getTypes(), state.getValue(getProperty())); - - switch (state.getValue(BlockRotatedPillar.AXIS)) - { - case X: - i = i + 5; - break; - case Z: - i = i + 10; - break; - } - - return i; - } - - @Override - public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) - { - IBlockState state = world.getBlockState(pos); - for (IProperty prop : state.getProperties().keySet()) - { - if (prop == BlockRotatedPillar.AXIS) - { - world.setBlockState(pos, state.cycleProperty(prop)); - return true; - } - } - return false; - } - - @Override - public IBlockState withRotation(IBlockState state, Rotation rot) - { - switch (rot) - { - case COUNTERCLOCKWISE_90: - case CLOCKWISE_90: - switch (state.getValue(BlockRotatedPillar.AXIS)) - { - case X: - return state.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.Z); - case Z: - return state.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.X); - default: - return state; - } - - default: - return state; - } - } - - @Override - protected ItemStack createStackedBlock(IBlockState state) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @Override - public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) - { - return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(BlockRotatedPillar.AXIS, facing.getAxis()); - } - - @Override - public int damageDropped(IBlockState state) - { - return super.getMetaFromState(state); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumPillarCap.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumPillarCap.java deleted file mode 100644 index e4f3df8d..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumPillarCap.java +++ /dev/null @@ -1,89 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyDirection; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; - -import org.apache.commons.lang3.ArrayUtils; - -public class BlockEnumPillarCap & IStringSerializable> extends BlockEnum -{ - public static final PropertyDirection FACING = PropertyDirection.create("facing"); - - public BlockEnumPillarCap(Material material, Class enumClass, String propName) - { - super(material, enumClass, propName); - } - - public BlockEnumPillarCap(Material material, Class enumClass) - { - this(material, enumClass, "type"); - } - - @Override - protected BlockStateContainer createStateContainer() - { - return new BlockStateContainer.Builder(this).add(getProperty(), FACING).build(); - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - IBlockState state = getBlockState().getBaseState().withProperty(this.getProperty(), getTypes()[meta % 2]); - return state.withProperty(FACING, EnumFacing.getFront(meta / 2)); - } - - @Override - public int getMetaFromState(IBlockState state) - { - int i = ArrayUtils.indexOf(getTypes(), state.getValue(getProperty())); - return i + 2 * state.getValue(FACING).getIndex(); - } - - @Override - public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @Override - public IBlockState withRotation(IBlockState state, Rotation rot) - { - return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); - } - - @Override - public IBlockState withMirror(IBlockState state, Mirror mirrorIn) - { - return state.withRotation(mirrorIn.toRotation(state.getValue(FACING))); - } - - @Override - protected ItemStack createStackedBlock(IBlockState state) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @Override - public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) - { - return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(FACING, facing); - } - - @Override - public int damageDropped(IBlockState state) - { - return super.getMetaFromState(state); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumStairs.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumStairs.java deleted file mode 100644 index a1d62f6a..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumStairs.java +++ /dev/null @@ -1,396 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import java.util.List; - -import javax.annotation.Nullable; - -import net.minecraft.block.BlockHorizontal; -import net.minecraft.block.BlockStairs; -import net.minecraft.block.BlockStairs.EnumHalf; -import net.minecraft.block.BlockStairs.EnumShape; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyDirection; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import org.apache.commons.lang3.ArrayUtils; - -import WayofTime.bloodmagic.BloodMagic; - -import com.google.common.collect.Lists; - -public class BlockEnumStairs & IStringSerializable> extends BlockEnum -{ - public static final PropertyDirection FACING = BlockHorizontal.FACING; - - protected static final AxisAlignedBB AABB_SLAB_TOP = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_QTR_TOP_WEST = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 0.5D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_QTR_TOP_EAST = new AxisAlignedBB(0.5D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_QTR_TOP_NORTH = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 0.5D); - protected static final AxisAlignedBB AABB_QTR_TOP_SOUTH = new AxisAlignedBB(0.0D, 0.5D, 0.5D, 1.0D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_OCT_TOP_NW = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 0.5D, 1.0D, 0.5D); - protected static final AxisAlignedBB AABB_OCT_TOP_NE = new AxisAlignedBB(0.5D, 0.5D, 0.0D, 1.0D, 1.0D, 0.5D); - protected static final AxisAlignedBB AABB_OCT_TOP_SW = new AxisAlignedBB(0.0D, 0.5D, 0.5D, 0.5D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_OCT_TOP_SE = new AxisAlignedBB(0.5D, 0.5D, 0.5D, 1.0D, 1.0D, 1.0D); - protected static final AxisAlignedBB AABB_SLAB_BOTTOM = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); - protected static final AxisAlignedBB AABB_QTR_BOT_WEST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.5D, 0.5D, 1.0D); - protected static final AxisAlignedBB AABB_QTR_BOT_EAST = new AxisAlignedBB(0.5D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); - protected static final AxisAlignedBB AABB_QTR_BOT_NORTH = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 0.5D); - protected static final AxisAlignedBB AABB_QTR_BOT_SOUTH = new AxisAlignedBB(0.0D, 0.0D, 0.5D, 1.0D, 0.5D, 1.0D); - protected static final AxisAlignedBB AABB_OCT_BOT_NW = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.5D, 0.5D, 0.5D); - protected static final AxisAlignedBB AABB_OCT_BOT_NE = new AxisAlignedBB(0.5D, 0.0D, 0.0D, 1.0D, 0.5D, 0.5D); - protected static final AxisAlignedBB AABB_OCT_BOT_SW = new AxisAlignedBB(0.0D, 0.0D, 0.5D, 0.5D, 0.5D, 1.0D); - protected static final AxisAlignedBB AABB_OCT_BOT_SE = new AxisAlignedBB(0.5D, 0.0D, 0.5D, 1.0D, 0.5D, 1.0D); - - public BlockEnumStairs(Material material, Class enumClass, String propName) - { - super(material, enumClass, propName); - } - - public BlockEnumStairs(Material material, Class enumClass) - { - this(material, enumClass, "type"); - } - - @Override - protected BlockStateContainer createStateContainer() - { - return new BlockStateContainer.Builder(this).add(getProperty(), FACING, BlockStairs.HALF, BlockStairs.SHAPE).build(); - } - - @Override - public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, @Nullable Entity entityIn) - { - state = this.getActualState(state, worldIn, pos); - - for (AxisAlignedBB axisalignedbb : getCollisionBoxList(state)) - { - addCollisionBoxToList(pos, entityBox, collidingBoxes, axisalignedbb); - } - } - - private static List getCollisionBoxList(IBlockState state) - { - List list = Lists.newArrayList(); - boolean flag = state.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP; - list.add(flag ? AABB_SLAB_TOP : AABB_SLAB_BOTTOM); - BlockStairs.EnumShape stairShape = state.getValue(BlockStairs.SHAPE); - - if (stairShape == BlockStairs.EnumShape.STRAIGHT || stairShape == BlockStairs.EnumShape.INNER_LEFT || stairShape == BlockStairs.EnumShape.INNER_RIGHT) - { - list.add(getCollQuarterBlock(state)); - } - - if (stairShape != BlockStairs.EnumShape.STRAIGHT) - { - list.add(getCollEighthBlock(state)); - } - - return list; - } - - private static AxisAlignedBB getCollQuarterBlock(IBlockState state) - { - boolean flag = state.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP; - - switch (state.getValue(FACING)) - { - case NORTH: - default: - return flag ? AABB_QTR_BOT_NORTH : AABB_QTR_TOP_NORTH; - case SOUTH: - return flag ? AABB_QTR_BOT_SOUTH : AABB_QTR_TOP_SOUTH; - case WEST: - return flag ? AABB_QTR_BOT_WEST : AABB_QTR_TOP_WEST; - case EAST: - return flag ? AABB_QTR_BOT_EAST : AABB_QTR_TOP_EAST; - } - } - - private static AxisAlignedBB getCollEighthBlock(IBlockState state) - { - EnumFacing facing = state.getValue(FACING); - EnumFacing newFacing; - - switch (state.getValue(BlockStairs.SHAPE)) - { - case OUTER_LEFT: - default: - newFacing = facing; - break; - case OUTER_RIGHT: - newFacing = facing.rotateY(); - break; - case INNER_RIGHT: - newFacing = facing.getOpposite(); - break; - case INNER_LEFT: - newFacing = facing.rotateYCCW(); - } - - boolean isTop = state.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP; - - switch (newFacing) - { - case NORTH: - default: - return isTop ? AABB_OCT_BOT_NW : AABB_OCT_TOP_NW; - case SOUTH: - return isTop ? AABB_OCT_BOT_SE : AABB_OCT_TOP_SE; - case WEST: - return isTop ? AABB_OCT_BOT_SW : AABB_OCT_TOP_SW; - case EAST: - return isTop ? AABB_OCT_BOT_NE : AABB_OCT_TOP_NE; - } - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) - { - IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer); - state = state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.STRAIGHT); - return facing != EnumFacing.DOWN && (facing == EnumFacing.UP || (double) hitY <= 0.5D) ? state.withProperty(BlockStairs.HALF, BlockStairs.EnumHalf.BOTTOM) : state.withProperty(BlockStairs.HALF, BlockStairs.EnumHalf.TOP); - } - - @Override - public RayTraceResult collisionRayTrace(IBlockState blockState, World worldIn, BlockPos pos, Vec3d start, Vec3d end) - { - List list = Lists.newArrayList(); - - for (AxisAlignedBB axisalignedbb : getCollisionBoxList(this.getActualState(blockState, worldIn, pos))) - { - list.add(this.rayTrace(pos, start, end, axisalignedbb)); - } - - RayTraceResult rayTrace = null; - double d1 = 0.0D; - - for (RayTraceResult raytraceresult : list) - { - if (raytraceresult != null) - { - double d0 = raytraceresult.hitVec.squareDistanceTo(end); - - if (d0 > d1) - { - rayTrace = raytraceresult; - d1 = d0; - } - } - } - - return rayTrace; - } - - // Meta looks like: {1|11|1} = {HALF|FACING|TYPE} - @Override - public IBlockState getStateFromMeta(int meta) - { - IBlockState state = getBlockState().getBaseState().withProperty(BlockStairs.HALF, (meta & 8) > 0 ? BlockStairs.EnumHalf.TOP : BlockStairs.EnumHalf.BOTTOM); - state = state.withProperty(FACING, EnumFacing.getFront(5 - (meta & 6) / 2)).withProperty(this.getProperty(), getTypes()[meta % 2]); - return state; - } - - // Meta looks like: {1|11|1} = {HALF|FACING|TYPE} - @Override - public int getMetaFromState(IBlockState state) - { - int i = 0; - - if (state.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP) - { - i |= 4; - } - - i = i | 5 - state.getValue(FACING).getIndex(); - return i * 2 + ArrayUtils.indexOf(getTypes(), state.getValue(getProperty())); - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) - { - return state.withProperty(BlockStairs.SHAPE, getStairsShape(state, worldIn, pos)); - } - - private static BlockStairs.EnumShape getStairsShape(IBlockState state, IBlockAccess world, BlockPos pos) - { - EnumFacing facing = state.getValue(FACING); - IBlockState offsetState = world.getBlockState(pos.offset(facing)); - - if (isBlockStairs(offsetState) && state.getValue(BlockStairs.HALF) == offsetState.getValue(BlockStairs.HALF)) - { - EnumFacing offsetFacing = offsetState.getValue(FACING); - - if (offsetFacing.getAxis() != state.getValue(FACING).getAxis() && isDifferentStairs(state, world, pos, offsetFacing.getOpposite())) - { - if (offsetFacing == facing.rotateYCCW()) - { - return BlockStairs.EnumShape.OUTER_LEFT; - } - - return BlockStairs.EnumShape.OUTER_RIGHT; - } - } - - IBlockState oppositeOffsetState = world.getBlockState(pos.offset(facing.getOpposite())); - - if (isBlockStairs(oppositeOffsetState) && state.getValue(BlockStairs.HALF) == oppositeOffsetState.getValue(BlockStairs.HALF)) - { - EnumFacing oppositeOffsetFacing = oppositeOffsetState.getValue(FACING); - - if (oppositeOffsetFacing.getAxis() != (state.getValue(FACING)).getAxis() && isDifferentStairs(state, world, pos, oppositeOffsetFacing)) - { - if (oppositeOffsetFacing == facing.rotateYCCW()) - { - return BlockStairs.EnumShape.INNER_LEFT; - } - - return BlockStairs.EnumShape.INNER_RIGHT; - } - } - - return BlockStairs.EnumShape.STRAIGHT; - } - - private static boolean isDifferentStairs(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing facing) - { - IBlockState offsetState = world.getBlockState(pos.offset(facing)); - return !isBlockStairs(offsetState) || offsetState.getValue(FACING) != state.getValue(FACING) || offsetState.getValue(BlockStairs.HALF) != state.getValue(BlockStairs.HALF); - } - - public static boolean isBlockStairs(IBlockState state) - { - return state.getBlock() instanceof BlockStairs || state.getBlock() instanceof BlockEnumStairs; - } - - @Override - public IBlockState withRotation(IBlockState state, Rotation rot) - { - return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); - } - - @SuppressWarnings("incomplete-switch") - @Override - public IBlockState withMirror(IBlockState state, Mirror mirrorIn) - { - EnumFacing facing = state.getValue(FACING); - BlockStairs.EnumShape stairShape = state.getValue(BlockStairs.SHAPE); - - switch (mirrorIn) - { - case LEFT_RIGHT: - - if (facing.getAxis() == EnumFacing.Axis.Z) - { - switch (stairShape) - { - case OUTER_LEFT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.OUTER_RIGHT); - case OUTER_RIGHT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.OUTER_LEFT); - case INNER_RIGHT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.INNER_LEFT); - case INNER_LEFT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.INNER_RIGHT); - default: - return state.withRotation(Rotation.CLOCKWISE_180); - } - } - - break; - case FRONT_BACK: - - if (facing.getAxis() == EnumFacing.Axis.X) - { - switch (stairShape) - { - case OUTER_LEFT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.OUTER_RIGHT); - case OUTER_RIGHT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.OUTER_LEFT); - case INNER_RIGHT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.INNER_RIGHT); - case INNER_LEFT: - return state.withRotation(Rotation.CLOCKWISE_180).withProperty(BlockStairs.SHAPE, BlockStairs.EnumShape.INNER_LEFT); - case STRAIGHT: - return state.withRotation(Rotation.CLOCKWISE_180); - } - } - } - - return super.withMirror(state, mirrorIn); - } - - @Override - protected ItemStack createStackedBlock(IBlockState state) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @Override - public int damageDropped(IBlockState state) - { - return super.getMetaFromState(state); - } - - @Override - public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @Override - public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face) - { - if (BloodMagic.getCrossVersionProxy().disableStairSlabCulling()) - return super.doesSideBlockRendering(state, world, pos, face); - - if (state.isOpaqueCube()) - return true; - - state = this.getActualState(state, world, pos); - - EnumHalf half = state.getValue(BlockStairs.HALF); - EnumFacing side = state.getValue(FACING); - EnumShape shape = state.getValue(BlockStairs.SHAPE); - if (face == EnumFacing.UP) - return half == EnumHalf.TOP; - if (face == EnumFacing.DOWN) - return half == EnumHalf.BOTTOM; - if (shape == EnumShape.OUTER_LEFT || shape == EnumShape.OUTER_RIGHT) - return false; - if (face == side) - return true; - if (shape == EnumShape.INNER_LEFT && face.rotateY() == side) - return true; - if (shape == EnumShape.INNER_RIGHT && face.rotateYCCW() == side) - return true; - return false; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumWall.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumWall.java deleted file mode 100644 index a4a06261..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockEnumWall.java +++ /dev/null @@ -1,142 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockFenceGate; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class BlockEnumWall & IStringSerializable> extends BlockEnum -{ - public static final PropertyBool UP = PropertyBool.create("up"); - public static final PropertyBool NORTH = PropertyBool.create("north"); - public static final PropertyBool EAST = PropertyBool.create("east"); - public static final PropertyBool SOUTH = PropertyBool.create("south"); - public static final PropertyBool WEST = PropertyBool.create("west"); - protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[] { new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.3125D, 0.0D, 0.0D, 0.6875D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 1.0D), - new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.3125D, 1.0D, 0.875D, 0.6875D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D) }; - protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[] { AABB_BY_INDEX[0].setMaxY(1.5D), AABB_BY_INDEX[1].setMaxY(1.5D), AABB_BY_INDEX[2].setMaxY(1.5D), AABB_BY_INDEX[3].setMaxY(1.5D), AABB_BY_INDEX[4].setMaxY(1.5D), AABB_BY_INDEX[5].setMaxY(1.5D), AABB_BY_INDEX[6].setMaxY(1.5D), AABB_BY_INDEX[7].setMaxY(1.5D), AABB_BY_INDEX[8].setMaxY(1.5D), AABB_BY_INDEX[9].setMaxY(1.5D), AABB_BY_INDEX[10].setMaxY(1.5D), AABB_BY_INDEX[11].setMaxY(1.5D), AABB_BY_INDEX[12].setMaxY(1.5D), AABB_BY_INDEX[13].setMaxY(1.5D), AABB_BY_INDEX[14].setMaxY(1.5D), - AABB_BY_INDEX[15].setMaxY(1.5D) }; - - // Most of this is copied from BlockWall - if there is an issue when porting, look there first. - public BlockEnumWall(Material material, Class enumClass, String propName) - { - super(material, enumClass, propName); - } - - public BlockEnumWall(Material material, Class enumClass) - { - this(material, enumClass, "type"); - } - - @Override - protected BlockStateContainer createStateContainer() - { - return new BlockStateContainer.Builder(this).add(getProperty(), UP, NORTH, EAST, SOUTH, WEST).build(); - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { - state = state.getActualState(source, pos); - return AABB_BY_INDEX[getAABBIndex(state)]; - } - - @Override - public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) - { - blockState = blockState.getActualState(worldIn, pos); - return CLIP_AABB_BY_INDEX[getAABBIndex(blockState)]; - } - - private static int getAABBIndex(IBlockState state) - { - int i = 0; - - if (state.getValue(NORTH)) - { - i |= 1 << EnumFacing.NORTH.getHorizontalIndex(); - } - - if (state.getValue(EAST)) - { - i |= 1 << EnumFacing.EAST.getHorizontalIndex(); - } - - if (state.getValue(SOUTH)) - { - i |= 1 << EnumFacing.SOUTH.getHorizontalIndex(); - } - - if (state.getValue(WEST)) - { - i |= 1 << EnumFacing.WEST.getHorizontalIndex(); - } - - return i; - } - - public boolean isFullCube(IBlockState state) - { - return false; - } - - public boolean isPassable(IBlockAccess worldIn, BlockPos pos) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) - { - IBlockState worldState = worldIn.getBlockState(pos); - Block block = worldState.getBlock(); - return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || ((worldState.getMaterial().isOpaque() && worldState.isFullCube()) && worldState.getMaterial() != Material.GOURD)); - } - - @SideOnly(Side.CLIENT) - @Override - public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) - { - return side != EnumFacing.DOWN || super.shouldSideBeRendered(blockState, blockAccess, pos, side); - } - - @Override - public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) - { - boolean canNorth = this.canConnectTo(worldIn, pos.north()); - boolean canEast = this.canConnectTo(worldIn, pos.east()); - boolean canSouth = this.canConnectTo(worldIn, pos.south()); - boolean canWest = this.canConnectTo(worldIn, pos.west()); - boolean flag4 = canNorth && !canEast && canSouth && !canWest || !canNorth && canEast && !canSouth && canWest; - return state.withProperty(UP, !flag4 || !worldIn.isAirBlock(pos.up())).withProperty(NORTH, canNorth).withProperty(EAST, canEast).withProperty(SOUTH, canSouth).withProperty(WEST, canWest); - } - - @Override - protected ItemStack createStackedBlock(IBlockState state) - { - return new ItemStack(this, 1, damageDropped(state)); - } - - @Override - public int damageDropped(IBlockState state) - { - return super.getMetaFromState(state); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockInteger.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockInteger.java deleted file mode 100644 index bac679b4..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockInteger.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -/** - * Creates a block that has multiple meta-based states. - * - * These states will be numbered 0 through {@code maxMeta}. - */ -@Getter -public class BlockInteger extends Block -{ - private final int maxMeta; - private final PropertyInteger property; - private final BlockStateContainer realStateContainer; - - public BlockInteger(Material material, int maxMeta, String propName) - { - super(material); - - this.maxMeta = maxMeta; - this.property = PropertyInteger.create(propName, 0, maxMeta); - this.realStateContainer = createStateContainer(); - setDefaultState(getBlockState().getBaseState()); - } - - public BlockInteger(Material material, int maxMeta) - { - this(material, maxMeta, "meta"); - } - - @Override - protected final BlockStateContainer createBlockState() { - return new BlockStateContainer.Builder(this).build(); // Blank to avoid crashes - } - - @Override - public final BlockStateContainer getBlockState() { - return realStateContainer; - } - - @Override - public IBlockState getStateFromMeta(int meta) { - return getDefaultState().withProperty(property, meta); - } - - @Override - public int getMetaFromState(IBlockState state) { - return state.getValue(property); - } - - @Override - public int damageDropped(IBlockState state) { - return getMetaFromState(state); - } - - @SideOnly(Side.CLIENT) - @Override - public void getSubBlocks(Item item, CreativeTabs tab, List subBlocks) { - for (int i = 0; i < maxMeta; i++) - subBlocks.add(new ItemStack(item, 1, i)); - } - - protected BlockStateContainer createStateContainer() { - return new BlockStateContainer.Builder(this).add(property).build(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockIntegerContainer.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockIntegerContainer.java deleted file mode 100644 index 4873a082..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockIntegerContainer.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public abstract class BlockIntegerContainer extends BlockInteger implements ITileEntityProvider -{ - public BlockIntegerContainer(Material material, int maxMeta, String propName) - { - super(material, maxMeta, propName); - - this.isBlockContainer = true; - } - - public BlockIntegerContainer(Material material, int maxMeta) - { - this(material, maxMeta, "meta"); - } - - @Override - public void breakBlock(World worldIn, BlockPos pos, IBlockState state) - { - super.breakBlock(worldIn, pos, state); - worldIn.removeTileEntity(pos); - } - - @Override - public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int eventID, int eventParam) - { - super.eventReceived(state, worldIn, pos, eventID, eventParam); - TileEntity tileentity = worldIn.getTileEntity(pos); - return tileentity != null && tileentity.receiveClientEvent(eventID, eventParam); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockString.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockString.java deleted file mode 100644 index ff41d2b1..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockString.java +++ /dev/null @@ -1,95 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import java.util.List; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.block.property.PropertyString; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.ArrayUtils; - -/** - * Creates a block that has multiple meta-based states. - * - * These states will be named after the given string array. Somewhere along the - * way, each value is {@code toLowerCase()}'ed, so the blockstate JSON needs all - * values to be lowercase. - */ -@Getter -public class BlockString extends Block -{ - private final int maxMeta; - private final String[] types; - private final PropertyString property; - private final BlockStateContainer realStateContainer; - - public BlockString(Material material, String[] values, String propName) - { - super(material); - - this.maxMeta = values.length; - this.types = values; - - this.property = PropertyString.create(propName, values); - this.realStateContainer = createStateContainer(); - setDefaultState(getBlockState().getBaseState()); - } - - public BlockString(Material material, String[] values) - { - this(material, values, "type"); - } - - @Override - protected final BlockStateContainer createBlockState() - { - return new BlockStateContainer.Builder(this).build(); // Blank to avoid crashes - } - - @Override - public final BlockStateContainer getBlockState() - { - return realStateContainer; - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return getDefaultState().withProperty(property, types[meta]); - } - - @Override - public int getMetaFromState(IBlockState state) - { - return ArrayUtils.indexOf(types, state.getValue(property)); - } - - @Override - public int damageDropped(IBlockState state) - { - return getMetaFromState(state); - } - - @SideOnly(Side.CLIENT) - @Override - public void getSubBlocks(Item item, CreativeTabs tab, List subBlocks) - { - for (int i = 0; i < maxMeta; i++) - subBlocks.add(new ItemStack(item, 1, i)); - } - - protected BlockStateContainer createStateContainer() - { - System.out.println(""); - BlockStateContainer ctn = new BlockStateContainer.Builder(this).add(property).build(); - System.out.println("Number of states: " + ctn.getValidStates().size()); - return ctn; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/BlockStringContainer.java b/src/main/java/WayofTime/bloodmagic/block/base/BlockStringContainer.java deleted file mode 100644 index a397e96b..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/BlockStringContainer.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.block.base; - -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public abstract class BlockStringContainer extends BlockString implements ITileEntityProvider -{ - public BlockStringContainer(Material material, String[] values, String propName) - { - super(material, values, propName); - - this.isBlockContainer = true; - } - - public BlockStringContainer(Material material, String[] values) - { - this(material, values, "type"); - } - - @Override - public void breakBlock(World worldIn, BlockPos pos, IBlockState state) - { - super.breakBlock(worldIn, pos, state); - worldIn.removeTileEntity(pos); - } - - @Override - public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int eventID, int eventParam) - { - super.eventReceived(state, worldIn, pos, eventID, eventParam); - TileEntity tileentity = worldIn.getTileEntity(pos); - return tileentity != null && tileentity.receiveClientEvent(eventID, eventParam); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/base/package-info.java b/src/main/java/WayofTime/bloodmagic/block/base/package-info.java deleted file mode 100644 index 21c18a65..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/base/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.block.base; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumBloodRune.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumBloodRune.java deleted file mode 100644 index 41221936..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumBloodRune.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumBloodRune implements IStringSerializable -{ - BLANK, - SPEED, - EFFICIENCY, - SACRIFICE, - SELFSACRIFICE, - DISPLACEMENT, - CAPACITY, - AUGCAPACITY, - ORB, - ACCELERATION, - CHARGING; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumBrickSize.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumBrickSize.java deleted file mode 100644 index b76396e1..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumBrickSize.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumBrickSize implements IStringSerializable -{ - LARGE, - BRICK; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock1.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock1.java deleted file mode 100644 index 5d532c2c..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock1.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumDemonBlock1 implements IStringSerializable -{ - BRICK1_RAW, - BRICK1_CORROSIVE, - BRICK1_DESTRUCTIVE, - BRICK1_VENGEFUL, - BRICK1_STEADFAST; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock2.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock2.java deleted file mode 100644 index bd3407dc..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock2.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumDemonBlock2 implements IStringSerializable -{ - SMALLBRICK_RAW, - SMALLBRICK_CORROSIVE, - SMALLBRICK_DESTRUCTIVE, - SMALLBRICK_VENGEFUL, - SMALLBRICK_STEADFAST, - TILE_RAW, - TILE_CORROSIVE, - TILE_DESTRUCTIVE, - TILE_VENGEFUL, - TILE_STEADFAST, - TILESPECIAL_RAW, - TILESPECIAL_CORROSIVE, - TILESPECIAL_DESTRUCTIVE, - TILESPECIAL_VENGEFUL, - TILESPECIAL_STEADFAST; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock3.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock3.java deleted file mode 100644 index b76c9363..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumDemonBlock3.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumDemonBlock3 implements IStringSerializable -{ - STONE_RAW, - STONE_CORROSIVE, - STONE_DESTRUCTIVE, - STONE_VENGEFUL, - STONE_STEADFAST, - POLISHED_RAW, - POLISHED_CORROSIVE, - POLISHED_DESTRUCTIVE, - POLISHED_VENGEFUL, - POLISHED_STEADFAST, - METAL_RAW, - METAL_CORROSIVE, - METAL_DESTRUCTIVE, - METAL_VENGEFUL, - METAL_STEADFAST; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumInversionCap.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumInversionCap.java deleted file mode 100644 index 3f13bf45..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumInversionCap.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumInversionCap implements IStringSerializable -{ - RAW_BOTTOM, - RAW_TOP, - CORROSIVE_BOTTOM, - CORROSIVE_TOP, - DESTRUCTIVE_BOTTOM, - DESTRUCTIVE_TOP, - VENGEFUL_BOTTOM, - VENGEFUL_TOP, - STEADFAST_BOTTOM, - STEADFAST_TOP; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumMimic.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumMimic.java deleted file mode 100644 index b933ff88..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumMimic.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumMimic implements IStringSerializable -{ - NOHITBOX, - SOLIDOPAQUE, - SOLIDCLEAR, - SOLIDLIGHT, - SENTIENT; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumPath.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumPath.java deleted file mode 100644 index 787bfc42..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumPath.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumPath implements IStringSerializable -{ - WOOD, - WOODTILE, - STONE, - STONETILE, - WORNSTONE, - WORNSTONETILE, - OBSIDIAN, - OBSIDIANTILE; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumRitualController.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumRitualController.java deleted file mode 100644 index 45b22b24..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumRitualController.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumRitualController implements IStringSerializable -{ - MASTER, - IMPERFECT; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType.java deleted file mode 100644 index f61e5366..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import net.minecraft.util.IStringSerializable; - -public enum EnumSubWillType implements IStringSerializable -{ - RAW, - CORROSIVE, - DESTRUCTIVE, - VENGEFUL, - STEADFAST; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } - - public EnumDemonWillType getType() { - return EnumDemonWillType.valueOf(name()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType1.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType1.java deleted file mode 100644 index ede1ec40..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType1.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumSubWillType1 implements IStringSerializable -{ - RAW, - CORROSIVE; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType2.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType2.java deleted file mode 100644 index ab1e7d10..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType2.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumSubWillType2 implements IStringSerializable -{ - DESTRUCTIVE, - VENGEFUL; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType3.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType3.java deleted file mode 100644 index 63c17562..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumSubWillType3.java +++ /dev/null @@ -1,22 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumSubWillType3 implements IStringSerializable -{ - STEADFAST; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/enums/EnumWillWall.java b/src/main/java/WayofTime/bloodmagic/block/enums/EnumWillWall.java deleted file mode 100644 index 7d20db59..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/enums/EnumWillWall.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.bloodmagic.block.enums; - -import java.util.Locale; - -import net.minecraft.util.IStringSerializable; - -public enum EnumWillWall implements IStringSerializable -{ - BRICK_RAW, - BRICK_CORROSIVE, - BRICK_DESTRUCTIVE, - BRICK_VENGEFUL, - BRICK_STEADFAST, - SMALLBRICK_RAW, - SMALLBRICK_CORROSIVE, - SMALLBRICK_DESTRUCTIVE, - SMALLBRICK_VENGEFUL, - SMALLBRICK_STEADFAST, - LARGE_RAW, - LARGE_CORROSIVE, - LARGE_DESTRUCTIVE, - LARGE_VENGEFUL, - LARGE_STEADFAST; - - @Override - public String toString() - { - return name().toLowerCase(Locale.ENGLISH); - } - - @Override - public String getName() - { - return this.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/package-info.java b/src/main/java/WayofTime/bloodmagic/block/package-info.java deleted file mode 100644 index 1043d727..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.block; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/block/property/PropertyString.java b/src/main/java/WayofTime/bloodmagic/block/property/PropertyString.java deleted file mode 100644 index 1fa570bc..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/property/PropertyString.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.bloodmagic.block.property; - -import com.google.common.base.Optional; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; -import net.minecraft.block.properties.PropertyHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; - -public class PropertyString extends PropertyHelper -{ - private final ImmutableSet allowedValues; - - protected PropertyString(String name, String[] values) - { - super(name, String.class); - allowedValues = ImmutableSet.copyOf(values); - } - - @SideOnly(Side.CLIENT) - public Optional parseValue(String value) - { - return allowedValues.contains(value) ? Optional.of(value) : Optional.absent(); - } - - public static PropertyString create(String name, String[] values) - { - return new PropertyString(name, values); - } - - @Override - public Collection getAllowedValues() - { - return allowedValues; - } - - public String getName0(String value) - { - return value; - } - - @Override - public String getName(String value) - { - return this.getName0(value); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/property/UnlistedPropertyInteger.java b/src/main/java/WayofTime/bloodmagic/block/property/UnlistedPropertyInteger.java deleted file mode 100644 index 177f0067..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/property/UnlistedPropertyInteger.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.bloodmagic.block.property; - -import net.minecraftforge.common.property.IUnlistedProperty; - -public class UnlistedPropertyInteger implements IUnlistedProperty -{ - private int maxMeta; - private String propName; - - public UnlistedPropertyInteger(int maxMeta, String propName) - { - this.maxMeta = maxMeta; - this.propName = propName; - } - - @Override - public String getName() - { - return propName; - } - - @Override - public boolean isValid(Integer value) - { - return value <= maxMeta; - } - - @Override - public Class getType() - { - return Integer.class; - } - - @Override - public String valueToString(Integer value) - { - return value.toString(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/property/UnlistedPropertyString.java b/src/main/java/WayofTime/bloodmagic/block/property/UnlistedPropertyString.java deleted file mode 100644 index 01f20774..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/property/UnlistedPropertyString.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.block.property; - -import net.minecraftforge.common.property.IUnlistedProperty; - -import java.util.Arrays; -import java.util.List; - -public class UnlistedPropertyString implements IUnlistedProperty -{ - private List values; - private String propName; - - public UnlistedPropertyString(String[] values, String propName) - { - this.values = Arrays.asList(values); - this.propName = propName; - } - - @Override - public String getName() - { - return propName; - } - - @Override - public boolean isValid(String value) - { - return values.contains(value); - } - - @Override - public Class getType() - { - return String.class; - } - - @Override - public String valueToString(String value) - { - return value; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/block/property/package-info.java b/src/main/java/WayofTime/bloodmagic/block/property/package-info.java deleted file mode 100644 index ace8db97..00000000 --- a/src/main/java/WayofTime/bloodmagic/block/property/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.block.property; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java b/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java deleted file mode 100644 index ac10d288..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.client; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import javax.annotation.Nullable; -import java.util.List; - -/** - * Provides a custom {@link ItemMeshDefinition} for automatic registration of - * renders. - */ -public interface IMeshProvider -{ - /** - * Gets the custom ItemMeshDefinition to use for the item. - * - * @return - the custom ItemMeshDefinition to use for the item. - */ - @SideOnly(Side.CLIENT) - ItemMeshDefinition getMeshDefinition(); - - /** - * Gets all possible variants for this item - * - * @return - All possible variants for this item - */ - List getVariants(); - - /** - * If a custom ResourceLocation is required, return it here. - * - * Can be null if unneeded. - * - * @return - The custom ResourceLocation - */ - @Nullable - ResourceLocation getCustomLocation(); -} diff --git a/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java b/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java deleted file mode 100644 index 18ba5fd0..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.bloodmagic.client; - -import org.apache.commons.lang3.tuple.Pair; - -import java.util.List; - -public interface IVariantProvider -{ - List> getVariants(); -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiAlchemyTable.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiAlchemyTable.java deleted file mode 100644 index 9e85c77f..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiAlchemyTable.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.TileAlchemyTable; -import WayofTime.bloodmagic.tile.container.ContainerAlchemyTable; -import WayofTime.bloodmagic.util.helper.TextHelper; - -@SideOnly(Side.CLIENT) -public class GuiAlchemyTable extends GuiContainer -{ - public IInventory tileTable; - - public GuiAlchemyTable(InventoryPlayer playerInventory, IInventory tileTable) - { - super(new ContainerAlchemyTable(playerInventory, tileTable)); - this.tileTable = tileTable; - this.xSize = 176; - this.ySize = 205; - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - this.fontRendererObj.drawString(TextHelper.localize("tile.BloodMagic.alchemyTable.name"), 8, 5, 4210752); - this.fontRendererObj.drawString(TextHelper.localize("container.inventory"), 8, 111, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - ResourceLocation soulForgeGuiTextures = new ResourceLocation(Constants.Mod.MODID + ":textures/gui/alchemyTable.png"); - this.mc.getTextureManager().bindTexture(soulForgeGuiTextures); - int i = (this.width - this.xSize) / 2; - int j = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); - - int l = this.getCookProgressScaled(90); - this.drawTexturedModalRect(i + 115, j + 14 + 90 - l, 176, 90 - l, 18, l); - - for (int slotId = 0; slotId < 6; slotId++) - { - if (!((TileAlchemyTable) tileTable).isInputSlotAccessible(slotId)) - { - Slot slot = this.inventorySlots.getSlot(slotId); - - this.drawTexturedModalRect(i + slot.xDisplayPosition, j + slot.yDisplayPosition, 195, 1, 16, 16); - } - } - } - - public int getCookProgressScaled(int scale) - { - double progress = ((TileAlchemyTable) tileTable).getProgressForGui(); - return (int) (progress * scale); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiHandler.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiHandler.java deleted file mode 100644 index e2ed6ef1..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiHandler.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import WayofTime.bloodmagic.item.inventory.ContainerHolding; -import WayofTime.bloodmagic.item.inventory.InventoryHolding; -import net.minecraft.client.multiplayer.WorldClient; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.network.IGuiHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.TileAlchemyTable; -import WayofTime.bloodmagic.tile.TileSoulForge; -import WayofTime.bloodmagic.tile.TileTeleposer; -import WayofTime.bloodmagic.tile.container.ContainerAlchemyTable; -import WayofTime.bloodmagic.tile.container.ContainerItemRoutingNode; -import WayofTime.bloodmagic.tile.container.ContainerMasterRoutingNode; -import WayofTime.bloodmagic.tile.container.ContainerSoulForge; -import WayofTime.bloodmagic.tile.container.ContainerTeleposer; -import WayofTime.bloodmagic.tile.routing.TileFilteredRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode; - -public class GuiHandler implements IGuiHandler -{ - @Override - public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) - { - BlockPos pos = new BlockPos(x, y, z); - - switch (id) - { - case Constants.Gui.TELEPOSER_GUI: - return new ContainerTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos)); - case Constants.Gui.SOUL_FORGE_GUI: - return new ContainerSoulForge(player.inventory, (TileSoulForge) world.getTileEntity(pos)); - case Constants.Gui.ROUTING_NODE_GUI: - return new ContainerItemRoutingNode(player.inventory, (TileFilteredRoutingNode) world.getTileEntity(pos)); - case Constants.Gui.MASTER_ROUTING_NODE_GUI: - return new ContainerMasterRoutingNode(player.inventory, (TileMasterRoutingNode) world.getTileEntity(pos)); - case Constants.Gui.ALCHEMY_TABLE_GUI: - return new ContainerAlchemyTable(player.inventory, (TileAlchemyTable) world.getTileEntity(pos)); - case Constants.Gui.SIGIL_HOLDING_GUI: - return new ContainerHolding(player, new InventoryHolding(player.getHeldItemMainhand())); - } - - return null; - } - - @Override - public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) - { - if (world instanceof WorldClient) - { - BlockPos pos = new BlockPos(x, y, z); - - switch (id) - { - case Constants.Gui.TELEPOSER_GUI: - return new GuiTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos)); - case Constants.Gui.SOUL_FORGE_GUI: - return new GuiSoulForge(player.inventory, (TileSoulForge) world.getTileEntity(pos)); - case Constants.Gui.ROUTING_NODE_GUI: - return new GuiItemRoutingNode(player.inventory, (TileFilteredRoutingNode) world.getTileEntity(pos)); - case Constants.Gui.MASTER_ROUTING_NODE_GUI: - return new GuiMasterRoutingNode(player.inventory, (TileMasterRoutingNode) world.getTileEntity(pos)); - case Constants.Gui.ALCHEMY_TABLE_GUI: - return new GuiAlchemyTable(player.inventory, (TileAlchemyTable) world.getTileEntity(pos)); - case Constants.Gui.SIGIL_HOLDING_GUI: - return new GuiHolding(player, new InventoryHolding(player.getHeldItemMainhand())); - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiHolding.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiHolding.java deleted file mode 100644 index 91c6bf96..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiHolding.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.item.inventory.ContainerHolding; -import WayofTime.bloodmagic.item.inventory.InventoryHolding; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class GuiHolding extends GuiContainer -{ - private ResourceLocation texture = new ResourceLocation(Constants.Mod.MODID, "gui/SigilHolding.png"); - private EntityPlayer player; - - public GuiHolding(EntityPlayer player, InventoryHolding inventoryHolding) - { - super(new ContainerHolding(player, inventoryHolding)); - xSize = 176; - ySize = 121; - this.player = player; - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - //the parameters for drawString are: string, x, y, color - fontRendererObj.drawString(TextHelper.localize("item.BloodMagic.sigil.holding.name"), 53, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouse) - { - //draw your Gui here, only thing you need to change is the path - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(texture); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() == ModItems.SIGIL_HOLDING) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - this.drawTexturedModalRect(4 + x + 36 * ItemSigilHolding.getCurrentItemOrdinal(player.getHeldItemMainhand()), y + 13, 0, 123, 24, 24); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiItemRoutingNode.java deleted file mode 100644 index ddb5a2b8..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiItemRoutingNode.java +++ /dev/null @@ -1,236 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import java.io.IOException; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.network.ItemRouterAmountPacketProcessor; -import WayofTime.bloodmagic.network.ItemRouterButtonPacketProcessor; -import WayofTime.bloodmagic.tile.container.ContainerItemRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileFilteredRoutingNode; -import WayofTime.bloodmagic.util.GhostItemHelper; - -@SideOnly(Side.CLIENT) -public class GuiItemRoutingNode extends GuiContainer -{ - private GuiButton downButton; - private GuiButton upButton; - private GuiButton northButton; - private GuiButton southButton; - private GuiButton westButton; - private GuiButton eastButton; - private GuiButton incrementButton; - private GuiButton decrementButton; - - private GuiTextField textBox; - - private TileFilteredRoutingNode inventory; - private ContainerItemRoutingNode container; - - private int left, top; - - public GuiItemRoutingNode(InventoryPlayer playerInventory, IInventory tileRoutingNode) - { - super(new ContainerItemRoutingNode(playerInventory, tileRoutingNode)); - this.xSize = 201; - this.ySize = 169; - inventory = (TileFilteredRoutingNode) tileRoutingNode; - container = (ContainerItemRoutingNode) this.inventorySlots; - } - - private int getCurrentActiveSlotPriority() - { - EnumFacing direction = EnumFacing.getFront(inventory.currentActiveSlot); - if (direction != null) - { - return inventory.getPriority(direction); - } - - return 0; - } - - @Override - public void initGui() - { - super.initGui(); - left = (this.width - this.xSize) / 2; - top = (this.height - this.ySize) / 2; - - this.buttonList.clear(); - this.buttonList.add(this.downButton = new GuiButton(0, left + 176, top + 14, 18, 18, "D")); - this.buttonList.add(this.upButton = new GuiButton(1, left + 176, top + 32, 18, 18, "U")); - this.buttonList.add(this.northButton = new GuiButton(2, left + 176, top + 50, 18, 18, "N")); - this.buttonList.add(this.southButton = new GuiButton(3, left + 176, top + 68, 18, 18, "S")); - this.buttonList.add(this.westButton = new GuiButton(4, left + 176, top + 86, 18, 18, "W")); - this.buttonList.add(this.eastButton = new GuiButton(5, left + 176, top + 104, 18, 18, "E")); - this.buttonList.add(this.incrementButton = new GuiButton(6, left + 160, top + 50, 10, 18, ">")); - this.buttonList.add(this.decrementButton = new GuiButton(7, left + 132, top + 50, 10, 18, "<")); - disableDirectionalButton(inventory.currentActiveSlot); - - this.textBox = new GuiTextField(0, this.fontRendererObj, left + 94, top + 37, 70, 12); - this.textBox.setEnableBackgroundDrawing(false); - this.textBox.setText(""); - } - - @Override - protected void keyTyped(char typedChar, int keyCode) throws IOException - { - if (this.textBox.textboxKeyTyped(typedChar, keyCode)) - { - if (container.lastGhostSlotClicked != -1) - { -// this.renameItem(); - String str = this.textBox.getText(); - int amount = 0; - - if (!str.isEmpty()) - { - try - { - Integer testVal = Integer.decode(str); - if (testVal != null) - { - amount = testVal.intValue(); - } - } catch (NumberFormatException d) - { - } - } - -// inventory.setGhostItemAmount(container.lastGhostSlotClicked, amount); - setValueOfGhostItemInSlot(container.lastGhostSlotClicked, amount); - } - } else - { - super.keyTyped(typedChar, keyCode); - } - } - - private void setValueOfGhostItemInSlot(int ghostItemSlot, int amount) - { - BloodMagicPacketHandler.INSTANCE.sendToServer(new ItemRouterAmountPacketProcessor(ghostItemSlot, amount, inventory.getPos(), inventory.getWorld())); - } - - /** - * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton - */ - @Override - protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException - { - super.mouseClicked(mouseX, mouseY, mouseButton); - this.textBox.mouseClicked(mouseX, mouseY, mouseButton); - if (container.lastGhostSlotClicked != -1) - { - Slot slot = container.getSlot(container.lastGhostSlotClicked + 1); - ItemStack stack = slot.getStack(); - if (stack != null) - { - int amount = GhostItemHelper.getItemGhostAmount(stack); - this.textBox.setText("" + amount); - } else - { - this.textBox.setText(""); - } - } - } - - /** - * Draws the screen and all the components in it. - */ - @Override - public void drawScreen(int mouseX, int mouseY, float partialTicks) - { - super.drawScreen(mouseX, mouseY, partialTicks); - - Minecraft.getMinecraft().fontRendererObj.drawString(inventory.getName(), xSize, ySize / 4, 4210752); - } - - /** - * Called by the controls from the buttonList when activated. (Mouse pressed - * for buttons) - */ - @Override - protected void actionPerformed(GuiButton button) throws IOException - { - if (button.enabled) - { - BloodMagicPacketHandler.INSTANCE.sendToServer(new ItemRouterButtonPacketProcessor(button.id, inventory.getPos(), inventory.getWorld())); - if (button.id < 6) - { - inventory.currentActiveSlot = button.id; - enableAllDirectionalButtons(); - button.enabled = false; - } - } - } - - private void enableAllDirectionalButtons() - { - for (GuiButton button : this.buttonList) - { - button.enabled = true; - } - } - - private void disableDirectionalButton(int id) - { - this.buttonList.get(id).enabled = false; - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - this.fontRendererObj.drawString("" + getCurrentActiveSlotPriority(), 143 + 5, 51 + 4, 0xFFFFFF); - String s = ""; - if (container.lastGhostSlotClicked != -1) - { - ItemStack clickedStack = inventorySlots.getSlot(1 + container.lastGhostSlotClicked).getStack(); - if (clickedStack != null) - { - s = clickedStack.getDisplayName(); - } - } - - this.fontRendererObj.drawStringWithShadow(s.substring(0, Math.min(16, s.length())), 81, 19, 0xFFFFFF); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - ResourceLocation soulForgeGuiTextures = new ResourceLocation(Constants.Mod.MODID + ":textures/gui/routingNode.png"); - this.mc.getTextureManager().bindTexture(soulForgeGuiTextures); - this.drawTexturedModalRect(left, top, 0, 0, this.xSize, this.ySize); - GlStateManager.disableLighting(); - GlStateManager.disableBlend(); - this.textBox.drawTextBox(); - } - -// @Override -// public void sendSlotContents(Container containerToSend, int slotInd, ItemStack stack) -// { -// if (slotInd == 0) -// { -// this.nameField.setText(stack == null ? "" : stack.getDisplayName()); -// this.nameField.setEnabled(stack != null); -// -// if (stack != null) -// { -// this.renameItem(); -// } -// } -// } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiMasterRoutingNode.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiMasterRoutingNode.java deleted file mode 100644 index ec110458..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiMasterRoutingNode.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.container.ContainerMasterRoutingNode; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class GuiMasterRoutingNode extends GuiContainer -{ - private TileEntity inventory; - - public GuiMasterRoutingNode(InventoryPlayer playerInventory, IInventory tileRoutingNode) - { - super(new ContainerMasterRoutingNode(playerInventory, tileRoutingNode)); - this.xSize = 216; - this.ySize = 216; - inventory = (TileEntity) tileRoutingNode; - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { -// this.fontRendererObj.drawString(TextHelper.localize("tile.BloodMagic.soulForge.name"), 8, 5, 4210752); -// this.fontRendererObj.drawString(TextHelper.localize("container.inventory"), 8, 111, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - ResourceLocation soulForgeGuiTextures = new ResourceLocation(Constants.Mod.MODID + ":textures/gui/masterRoutingNode.png"); - this.mc.getTextureManager().bindTexture(soulForgeGuiTextures); - int i = (this.width - this.xSize) / 2; - int j = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiSoulForge.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiSoulForge.java deleted file mode 100644 index 55e7bb42..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiSoulForge.java +++ /dev/null @@ -1,54 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.TileSoulForge; -import WayofTime.bloodmagic.tile.container.ContainerSoulForge; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class GuiSoulForge extends GuiContainer -{ - public IInventory tileSoulForge; - - public GuiSoulForge(InventoryPlayer playerInventory, IInventory tileSoulForge) - { - super(new ContainerSoulForge(playerInventory, tileSoulForge)); - this.tileSoulForge = tileSoulForge; - this.xSize = 176; - this.ySize = 205; - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - this.fontRendererObj.drawString(TextHelper.localize("tile.BloodMagic.soulForge.name"), 8, 5, 4210752); - this.fontRendererObj.drawString(TextHelper.localize("container.inventory"), 8, 111, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - ResourceLocation soulForgeGuiTextures = new ResourceLocation(Constants.Mod.MODID + ":textures/gui/soulForge.png"); - this.mc.getTextureManager().bindTexture(soulForgeGuiTextures); - int i = (this.width - this.xSize) / 2; - int j = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); - - int l = this.getCookProgressScaled(90); - this.drawTexturedModalRect(i + 115, j + 14 + 90 - l, 176, 90 - l, 18, l); - } - - public int getCookProgressScaled(int scale) - { - double progress = ((TileSoulForge) tileSoulForge).getProgressForGui(); - return (int) (progress * scale); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/GuiTeleposer.java b/src/main/java/WayofTime/bloodmagic/client/gui/GuiTeleposer.java deleted file mode 100644 index bb2ecd56..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/GuiTeleposer.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.bloodmagic.client.gui; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.container.ContainerTeleposer; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class GuiTeleposer extends GuiContainer -{ - public GuiTeleposer(InventoryPlayer playerInventory, IInventory tileTeleposer) - { - super(new ContainerTeleposer(playerInventory, tileTeleposer)); - } - - @Override - protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) - { - this.fontRendererObj.drawString(TextHelper.localize("tile.BloodMagic.teleposer.name"), 64, 23, 4210752); - this.fontRendererObj.drawString(TextHelper.localize("container.inventory"), 8, 47, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - ResourceLocation teleposerGuiTextures = new ResourceLocation(Constants.Mod.MODID + ":textures/gui/teleposer.png"); - this.mc.getTextureManager().bindTexture(teleposerGuiTextures); - int i = (this.width - this.xSize) / 2; - int j = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(i, j + 18, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/config/ConfigGui.java b/src/main/java/WayofTime/bloodmagic/client/gui/config/ConfigGui.java deleted file mode 100644 index 9daa85d1..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/config/ConfigGui.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.bloodmagic.client.gui.config; - -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.common.config.ConfigElement; -import net.minecraftforge.fml.client.config.GuiConfig; -import net.minecraftforge.fml.client.config.IConfigElement; - -import java.util.ArrayList; -import java.util.List; - -public class ConfigGui extends GuiConfig -{ - - public ConfigGui(GuiScreen parentScreen) - { - super(parentScreen, getConfigElements(parentScreen), Constants.Mod.MODID, false, false, "BloodMagic Configuration"); - } - - @SuppressWarnings("rawtypes") - private static List getConfigElements(GuiScreen parent) - { - List list = new ArrayList(); - - // adds sections declared in ConfigHandler. toLowerCase() is used - // because the configuration class automatically does this, so must we. - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Potions".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Client".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Compatibility".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Teleposer Blacklist".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Well of Suffering Blacklist".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Item/Block Blacklisting".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("General".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Rituals".toLowerCase()))); - list.add(new ConfigElement(ConfigHandler.getConfig().getCategory("Blood Altar Sacrificial Values".toLowerCase()))); - - return list; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/config/ConfigGuiFactory.java b/src/main/java/WayofTime/bloodmagic/client/gui/config/ConfigGuiFactory.java deleted file mode 100644 index 05c72094..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/config/ConfigGuiFactory.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.client.gui.config; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.fml.client.IModGuiFactory; - -import java.util.Set; - -public class ConfigGuiFactory implements IModGuiFactory -{ - - @Override - public void initialize(Minecraft minecraftInstance) - { - - } - - @Override - public Class mainConfigGuiClass() - { - return ConfigGui.class; - } - - @Override - public Set runtimeGuiCategories() - { - return null; - } - - @Override - public RuntimeOptionGuiHandler getHandlerFor(IModGuiFactory.RuntimeOptionCategoryElement element) - { - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/config/package-info.java b/src/main/java/WayofTime/bloodmagic/client/gui/config/package-info.java deleted file mode 100644 index 31a6c581..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/config/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.gui.config; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/gui/package-info.java b/src/main/java/WayofTime/bloodmagic/client/gui/package-info.java deleted file mode 100644 index 7ba8bbd0..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/gui/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.gui; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/helper/ShaderHelper.java b/src/main/java/WayofTime/bloodmagic/client/helper/ShaderHelper.java deleted file mode 100644 index 501958a6..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/helper/ShaderHelper.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Apr 9, 2014, 11:20:26 PM (GMT)] - */ -package WayofTime.bloodmagic.client.helper; - -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraftforge.fml.common.FMLLog; -import org.apache.logging.log4j.Level; -import org.lwjgl.opengl.ARBFragmentShader; -import org.lwjgl.opengl.ARBShaderObjects; -import org.lwjgl.opengl.ARBVertexShader; -import org.lwjgl.opengl.GL11; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; - -public final class ShaderHelper -{ - private static final int VERT_ST = ARBVertexShader.GL_VERTEX_SHADER_ARB; - private static final int FRAG_ST = ARBFragmentShader.GL_FRAGMENT_SHADER_ARB; - - private static final int VERT = 1; - private static final int FRAG = 2; - - private static final String VERT_EXTENSION = ".vsh"; - private static final String FRAG_EXTENSION = ".frag"; - - public static int psiBar; - - public static void init() - { - if (!useShaders()) - return; - - psiBar = createProgram("/assets/bloodmagic/shaders/beam", FRAG); - } - - public static void useShader(int shader, int ticks) - { - if (!useShaders()) - return; - - ARBShaderObjects.glUseProgramObjectARB(shader); - - if (shader != 0) - { - int time = ARBShaderObjects.glGetUniformLocationARB(shader, "time"); - ARBShaderObjects.glUniform1iARB(time, ticks); - } - } - - public static void releaseShader() - { - useShader(0, 0); - } - - public static boolean useShaders() - { - return OpenGlHelper.shadersSupported; - } - - private static int createProgram(String s, int sides) - { - boolean vert = (sides & VERT) != 0; - boolean frag = (sides & FRAG) != 0; - - return createProgram(vert ? (s + VERT_EXTENSION) : null, frag ? (s + FRAG_EXTENSION) : null); - } - - // Most of the code taken from the LWJGL wiki - // http://lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL - - private static int createProgram(String vert, String frag) - { - int vertId = 0, fragId = 0, program = 0; - if (vert != null) - vertId = createShader(vert, VERT_ST); - if (frag != null) - fragId = createShader(frag, FRAG_ST); - - program = ARBShaderObjects.glCreateProgramObjectARB(); - if (program == 0) - return 0; - - if (vert != null) - ARBShaderObjects.glAttachObjectARB(program, vertId); - if (frag != null) - ARBShaderObjects.glAttachObjectARB(program, fragId); - - ARBShaderObjects.glLinkProgramARB(program); - if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE) - { - FMLLog.log(Level.ERROR, getLogInfo(program)); - return 0; - } - - ARBShaderObjects.glValidateProgramARB(program); - if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_VALIDATE_STATUS_ARB) == GL11.GL_FALSE) - { - FMLLog.log(Level.ERROR, getLogInfo(program)); - return 0; - } - - return program; - } - - private static int createShader(String filename, int shaderType) - { - int shader = 0; - try - { - shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType); - - if (shader == 0) - return 0; - - ARBShaderObjects.glShaderSourceARB(shader, readFileAsString(filename)); - ARBShaderObjects.glCompileShaderARB(shader); - - if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE) - throw new RuntimeException("Error creating shader: " + getLogInfo(shader)); - - return shader; - } catch (Exception e) - { - ARBShaderObjects.glDeleteObjectARB(shader); - e.printStackTrace(); - return -1; - } - } - - private static String getLogInfo(int obj) - { - return ARBShaderObjects.glGetInfoLogARB(obj, ARBShaderObjects.glGetObjectParameteriARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB)); - } - - private static String readFileAsString(String filename) throws Exception - { - StringBuilder source = new StringBuilder(); - InputStream in = ShaderHelper.class.getResourceAsStream(filename); - Exception exception = null; - BufferedReader reader; - - if (in == null) - return ""; - - try - { - reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); - - Exception innerExc = null; - try - { - String line; - while ((line = reader.readLine()) != null) - source.append(line).append('\n'); - } catch (Exception exc) - { - exception = exc; - } finally - { - try - { - reader.close(); - } catch (Exception exc) - { - if (innerExc == null) - innerExc = exc; - else - exc.printStackTrace(); - } - } - - if (innerExc != null) - throw innerExc; - } catch (Exception exc) - { - exception = exc; - } finally - { - try - { - in.close(); - } catch (Exception exc) - { - if (exception == null) - exception = exc; - else - exc.printStackTrace(); - } - - if (exception != null) - throw exception; - } - - return source.toString(); - } - -} diff --git a/src/main/java/WayofTime/bloodmagic/client/helper/package-info.java b/src/main/java/WayofTime/bloodmagic/client/helper/package-info.java deleted file mode 100644 index 798e55d3..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/helper/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.helper; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/hud/HUDElement.java b/src/main/java/WayofTime/bloodmagic/client/hud/HUDElement.java deleted file mode 100644 index 3bb369d7..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/hud/HUDElement.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.client.hud; - -import WayofTime.bloodmagic.util.handler.event.ClientHandler; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraftforge.client.event.RenderGameOverlayEvent; - -@Getter -@Setter -public abstract class HUDElement -{ - - private int xOffset; - private int yOffset; - private final int xOffsetDefault; - private final int yOffsetDefault; - private final RenderGameOverlayEvent.ElementType elementType; - - public HUDElement(int xOffset, int yOffset, RenderGameOverlayEvent.ElementType elementType) - { - this.xOffset = xOffset; - this.xOffsetDefault = xOffset; - this.yOffset = yOffset; - this.yOffsetDefault = yOffset; - this.elementType = elementType; - - ClientHandler.hudElements.add(this); - } - - public abstract void render(Minecraft minecraft, ScaledResolution resolution, float partialTicks); - - public abstract boolean shouldRender(Minecraft minecraft); - - public void onPositionChanged() - { - - } - - public void resetToDefault() - { - this.xOffset = xOffsetDefault; - this.yOffset = yOffsetDefault; - } - - public void drawTexturedModalRect(double x, double y, double textureX, double textureY, double width, double height) - { - float f = 0.00390625F; - float f1 = 0.00390625F; - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer vertexbuffer = tessellator.getBuffer(); - vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX); - vertexbuffer.pos((double) (x + 0), (double) (y + height), 0).tex((double) ((float) (textureX + 0) * f), (double) ((float) (textureY + height) * f1)).endVertex(); - vertexbuffer.pos((double) (x + width), (double) (y + height), 0).tex((double) ((float) (textureX + width) * f), (double) ((float) (textureY + height) * f1)).endVertex(); - vertexbuffer.pos((double) (x + width), (double) (y + 0), 0).tex((double) ((float) (textureX + width) * f), (double) ((float) (textureY + 0) * f1)).endVertex(); - vertexbuffer.pos((double) (x + 0), (double) (y + 0), 0).tex((double) ((float) (textureX + 0) * f), (double) ((float) (textureY + 0) * f1)).endVertex(); - tessellator.draw(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/hud/HUDElementDemonWillAura.java b/src/main/java/WayofTime/bloodmagic/client/hud/HUDElementDemonWillAura.java deleted file mode 100644 index f8fba873..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/hud/HUDElementDemonWillAura.java +++ /dev/null @@ -1,89 +0,0 @@ -package WayofTime.bloodmagic.client.hud; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.event.RenderGameOverlayEvent; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.proxy.ClientProxy; -import WayofTime.bloodmagic.util.Utils; - -public class HUDElementDemonWillAura extends HUDElement -{ - protected List barOrder = new ArrayList(); - - public HUDElementDemonWillAura() - { - super(5, 5, RenderGameOverlayEvent.ElementType.HOTBAR); - - barOrder.add(EnumDemonWillType.DEFAULT); - barOrder.add(EnumDemonWillType.CORROSIVE); - barOrder.add(EnumDemonWillType.STEADFAST); - barOrder.add(EnumDemonWillType.DESTRUCTIVE); - barOrder.add(EnumDemonWillType.VENGEFUL); - } - - @Override - public void render(Minecraft minecraft, ScaledResolution resolution, float partialTicks) - { - EntityPlayer player = minecraft.thePlayer; - - if (!Utils.canPlayerSeeDemonWill(player)) - { - return; - } - - minecraft.getTextureManager().bindTexture(new ResourceLocation(Constants.Mod.MODID, "textures/hud/bars.png")); - GlStateManager.color(1.0F, 1.0F, 1.0F); - this.drawTexturedModalRect(getXOffset(), getYOffset(), 0, 105 * 2, 80, 46); - - double maxAmount = Utils.getDemonWillResolution(player); - - int i = 0; - for (EnumDemonWillType type : barOrder) - { - i++; - GlStateManager.color(1.0F, 1.0F, 1.0F); - minecraft.getTextureManager().bindTexture(new ResourceLocation(Constants.Mod.MODID, "textures/hud/bars.png")); - int textureXOffset = (i > 3) ? (i - 3) : (3 - i); - int maxBarSize = 30 - 2 * textureXOffset; - - double amount = ClientProxy.currentAura == null ? 0 : ClientProxy.currentAura.getWill(type); - double ratio = Math.max(Math.min(amount / maxAmount, 1), 0); - - double width = maxBarSize * ratio * 2; - double height = 2; - double x = getXOffset() + 2 * textureXOffset + 10; - double y = getYOffset() + 4 * i + 10; - - double textureX = 2 * textureXOffset + 2 * 42; - double textureY = 4 * i + 220; - - this.drawTexturedModalRect(x, y, textureX, textureY, width, height); - - if (player.isSneaking()) - { - GlStateManager.pushMatrix(); - String value = "" + (int) amount; - GlStateManager.translate(x - 2 * textureXOffset - value.length() * 0 + 70, (y - 1), 0); - GlStateManager.scale(0.5, 0.5, 1); - minecraft.fontRendererObj.drawStringWithShadow("" + (int) amount, 0, 2, 0xffffff); - GlStateManager.popMatrix(); - } - } - } - - @Override - public boolean shouldRender(Minecraft minecraft) - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/hud/HUDElementHolding.java b/src/main/java/WayofTime/bloodmagic/client/hud/HUDElementHolding.java deleted file mode 100644 index 113a7a60..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/hud/HUDElementHolding.java +++ /dev/null @@ -1,94 +0,0 @@ -package WayofTime.bloodmagic.client.hud; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import WayofTime.bloodmagic.registry.ModItems; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.event.RenderGameOverlayEvent; - -import javax.annotation.Nullable; - -public class HUDElementHolding extends HUDElement -{ - - public HUDElementHolding() - { - super(0, 0, RenderGameOverlayEvent.ElementType.HOTBAR); - } - - @Override - public void render(Minecraft minecraft, ScaledResolution resolution, float partialTicks) - { - ItemStack sigilHolding = minecraft.thePlayer.getHeldItemMainhand(); - // TODO - Clean this mess - // Check mainhand for Sigil of Holding - if (sigilHolding == null) - return; - if (!(sigilHolding.getItem() == ModItems.SIGIL_HOLDING)) - sigilHolding = minecraft.thePlayer.getHeldItemOffhand(); - // Check offhand for Sigil of Holding - if (sigilHolding == null) - return; - if (!(sigilHolding.getItem() == ModItems.SIGIL_HOLDING)) - return; - - Gui ingameGui = minecraft.ingameGUI; - - minecraft.getTextureManager().bindTexture(new ResourceLocation(Constants.Mod.MODID, "textures/gui/widgets.png")); - GlStateManager.color(1.0F, 1.0F, 1.0F); - ingameGui.drawTexturedModalRect(resolution.getScaledWidth() / 2 + 100 + getXOffset(), resolution.getScaledHeight() - 22 + getYOffset(), 0, 0, 102, 22); - int currentSlot = ItemSigilHolding.getCurrentItemOrdinal(sigilHolding); - ingameGui.drawTexturedModalRect(resolution.getScaledWidth() / 2 + 99 + (currentSlot * 20) + getXOffset(), resolution.getScaledHeight() - 23 + getYOffset(), 0, 22, 24, 24); - - RenderHelper.enableGUIStandardItemLighting(); - ItemStack[] holdingInv = ItemSigilHolding.getInternalInventory(sigilHolding); - int xOffset = 0; - if (holdingInv != null) - { - for (ItemStack sigil : holdingInv) - { - renderHotbarItem(resolution.getScaledWidth() / 2 + 103 + xOffset + getXOffset(), resolution.getScaledHeight() - 18 + getYOffset(), partialTicks, minecraft.thePlayer, sigil); - xOffset += 20; - } - } - - RenderHelper.disableStandardItemLighting(); - } - - @Override - public boolean shouldRender(Minecraft minecraft) - { - return true; - } - - protected void renderHotbarItem(int x, int y, float partialTicks, EntityPlayer player, @Nullable ItemStack stack) - { - if (stack != null) - { - float animation = (float) stack.animationsToGo - partialTicks; - - if (animation > 0.0F) - { - GlStateManager.pushMatrix(); - float f1 = 1.0F + animation / 5.0F; - GlStateManager.translate((float) (x + 8), (float) (y + 12), 0.0F); - GlStateManager.scale(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F); - GlStateManager.translate((float) (-(x + 8)), (float) (-(y + 12)), 0.0F); - } - - Minecraft.getMinecraft().getRenderItem().renderItemAndEffectIntoGUI(player, stack, x, y); - - if (animation > 0.0F) - GlStateManager.popMatrix(); - - Minecraft.getMinecraft().getRenderItem().renderItemOverlays(Minecraft.getMinecraft().fontRendererObj, stack, x, y); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/key/IKeybindable.java b/src/main/java/WayofTime/bloodmagic/client/key/IKeybindable.java deleted file mode 100644 index f2b99fbc..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/key/IKeybindable.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.client.key; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public interface IKeybindable -{ - void onKeyPressed(ItemStack stack, EntityPlayer player, KeyBindings key, boolean showInChat); -} diff --git a/src/main/java/WayofTime/bloodmagic/client/key/KeyBindingBloodMagic.java b/src/main/java/WayofTime/bloodmagic/client/key/KeyBindingBloodMagic.java deleted file mode 100644 index 32f65613..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/key/KeyBindingBloodMagic.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.bloodmagic.client.key; - -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.client.settings.KeyBinding; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class KeyBindingBloodMagic extends KeyBinding -{ - public KeyBindingBloodMagic(KeyBindings key) - { - super(key.getDescription(), key.getKeyConflictContext(), key.getKeyModifier(), key.getKeyCode(), Constants.Mod.NAME); - - ClientRegistry.registerKeyBinding(this); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/key/KeyBindings.java b/src/main/java/WayofTime/bloodmagic/client/key/KeyBindings.java deleted file mode 100644 index 3b4d12d2..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/key/KeyBindings.java +++ /dev/null @@ -1,111 +0,0 @@ -package WayofTime.bloodmagic.client.key; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.network.KeyProcessor; -import WayofTime.bloodmagic.util.handler.event.ClientHandler; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.settings.KeyBinding; -import net.minecraft.item.ItemStack; -import net.minecraftforge.client.settings.IKeyConflictContext; -import net.minecraftforge.client.settings.KeyConflictContext; -import net.minecraftforge.client.settings.KeyModifier; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.input.Keyboard; - -import java.util.Locale; - -public enum KeyBindings -{ - // @formatter:off - OPEN_HOLDING(KeyConflictContext.IN_GAME, KeyModifier.NONE, Keyboard.KEY_H) - { - @SideOnly(Side.CLIENT) - @Override - public void handleKeybind() - { - ItemStack itemStack = ClientHandler.minecraft.thePlayer.getHeldItemMainhand(); - if (itemStack != null && itemStack.getItem() instanceof IKeybindable) - BloodMagicPacketHandler.INSTANCE.sendToServer(new KeyProcessor(this, false)); - } - }, - CYCLE_HOLDING_POS(KeyConflictContext.IN_GAME, KeyModifier.SHIFT, Keyboard.KEY_EQUALS) - { - @SideOnly(Side.CLIENT) - @Override - public void handleKeybind() - { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding) - ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, -1); - } - }, - CYCLE_HOLDING_NEG(KeyConflictContext.IN_GAME, KeyModifier.SHIFT, Keyboard.KEY_MINUS) - { - @SideOnly(Side.CLIENT) - @Override - public void handleKeybind() - { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding) - ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, 1); - } - }, - ; - // @formatter:on - - private final IKeyConflictContext keyConflictContext; - private final KeyModifier keyModifier; - private final int keyCode; - - @SideOnly(Side.CLIENT) - private KeyBinding key; - - KeyBindings(IKeyConflictContext keyConflictContext, KeyModifier keyModifier, int keyCode) - { - this.keyConflictContext = keyConflictContext; - this.keyModifier = keyModifier; - this.keyCode = keyCode; - } - - @SideOnly(Side.CLIENT) - public abstract void handleKeybind(); - - public IKeyConflictContext getKeyConflictContext() - { - return keyConflictContext; - } - - public KeyModifier getKeyModifier() - { - return keyModifier; - } - - public int getKeyCode() - { - return keyCode; - } - - @SideOnly(Side.CLIENT) - public KeyBinding getKey() - { - if (key == null) - key = new KeyBindingBloodMagic(this); - - return key; - } - - @SideOnly(Side.CLIENT) - public void setKey(KeyBinding key) - { - this.key = key; - } - - public String getDescription() - { - return Constants.Mod.MODID + ".keybind." + name().toLowerCase(Locale.ENGLISH); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java b/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java deleted file mode 100644 index 934600ff..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.bloodmagic.client.mesh; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IActivatable; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public class CustomMeshDefinitionActivatable implements ItemMeshDefinition -{ - private final String name; - - public CustomMeshDefinitionActivatable(String name) - { - this.name = name; - } - - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - if (stack != null && stack.getItem() instanceof IActivatable) - if (((IActivatable) stack.getItem()).getActivated(stack)) - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "active=true"); - - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "active=false"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionMultiWill.java b/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionMultiWill.java deleted file mode 100644 index ed901323..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionMultiWill.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.client.mesh; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -public class CustomMeshDefinitionMultiWill implements ItemMeshDefinition -{ - private final String name; - - public CustomMeshDefinitionMultiWill(String name) - { - this.name = name; - } - - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - if (stack != null && stack.getItem() instanceof IMultiWillTool) - { - EnumDemonWillType type = ((IMultiWillTool) stack.getItem()).getCurrentType(stack); - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "type=" + type.getName().toLowerCase()); - } - - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "type=default"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionWillGem.java b/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionWillGem.java deleted file mode 100644 index ed3383c2..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionWillGem.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.client.mesh; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.item.soul.ItemSoulGem; -import WayofTime.bloodmagic.registry.ModItems; - -public class CustomMeshDefinitionWillGem implements ItemMeshDefinition -{ - private final String name; - - public CustomMeshDefinitionWillGem(String name) - { - this.name = name; - } - - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - if (stack != null && stack.getItem() == ModItems.SOUL_GEM) - { - EnumDemonWillType type = ((ItemSoulGem) stack.getItem()).getCurrentType(stack); - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "type=" + ItemSoulGem.names[stack.getItemDamage()] + "_" + type.getName().toLowerCase()); - } - - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "type=petty_default"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/mesh/package-info.java b/src/main/java/WayofTime/bloodmagic/client/mesh/package-info.java deleted file mode 100644 index 8e65a180..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/mesh/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.mesh; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/package-info.java b/src/main/java/WayofTime/bloodmagic/client/package-info.java deleted file mode 100644 index eb0fbfaa..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/LayerBloodElytra.java b/src/main/java/WayofTime/bloodmagic/client/render/LayerBloodElytra.java deleted file mode 100644 index a6c6ab6f..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/LayerBloodElytra.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.bloodmagic.client.render; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import net.minecraft.client.entity.AbstractClientPlayer; -import net.minecraft.client.model.ModelElytra; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderPlayer; -import net.minecraft.client.renderer.entity.layers.LayerArmorBase; -import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public class LayerBloodElytra implements LayerRenderer -{ - - private static final ResourceLocation TEXTURE_BLOOD_ELYTRA = new ResourceLocation("bloodmagic", "textures/entities/bloodElytra.png"); - private final RenderPlayer renderPlayer; - private final ModelElytra modelElytra = new ModelElytra(); - - public LayerBloodElytra(RenderPlayer renderPlayer) - { - this.renderPlayer = renderPlayer; - } - - @Override - public void doRenderLayer(AbstractClientPlayer clientPlayer, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - if (LivingArmour.hasFullSet(clientPlayer)) - { - ItemStack chestStack = clientPlayer.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - if (ItemLivingArmour.hasUpgrade(Constants.Mod.MODID + ".upgrade.elytra", chestStack)) - { - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - GlStateManager.enableBlend(); - - renderPlayer.bindTexture(TEXTURE_BLOOD_ELYTRA); - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.0F, 0.0F, 0.125F); - modelElytra.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, clientPlayer); - modelElytra.render(clientPlayer, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); - - if (chestStack.isItemEnchanted()) - LayerArmorBase.renderEnchantedGlint(this.renderPlayer, clientPlayer, this.modelElytra, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale); - - GlStateManager.popMatrix(); - } - } - } - - @Override - public boolean shouldCombineTextures() - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/AttractorAlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/AttractorAlchemyCircleRenderer.java deleted file mode 100644 index 09e0c193..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/AttractorAlchemyCircleRenderer.java +++ /dev/null @@ -1,155 +0,0 @@ -package WayofTime.bloodmagic.client.render.alchemyArray; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -public class AttractorAlchemyCircleRenderer extends AlchemyCircleRenderer -{ - public AttractorAlchemyCircleRenderer() - { - this(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/ZombieBeacon.png")); - } - - public AttractorAlchemyCircleRenderer(ResourceLocation resourceLocation) - { - super(resourceLocation); - } - - @Override - public float getSizeModifier(float craftTime) - { - return 1; - } - - @Override - public float getRotation(float craftTime) - { - float offset = 2; - if (craftTime >= offset) - { - float modifier = (craftTime - offset) * 5f; - return modifier * 1f; - } - return 0; - } - - @Override - public float getSecondaryRotation(float craftTime) - { - float offset = 50; - float secondaryOffset = 150; - if (craftTime >= offset) - { - if (craftTime < secondaryOffset) - { - float modifier = 90 * (craftTime - offset) / (float) (secondaryOffset - offset); - return modifier; - } else - { - return 90; - } - } - return 0; - } - - @Override - public void renderAt(TileEntity tile, double x, double y, double z, float craftTime) - { - if (!(tile instanceof TileAlchemyArray)) - { - return; - } - - TileAlchemyArray tileArray = (TileAlchemyArray) tile; - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - - float rot = getRotation(craftTime); - float secondaryRot = getSecondaryRotation(craftTime); - - float size = 1.0F * getSizeModifier(craftTime); - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - GlStateManager.translate(x, y, z); - - // Specify which face this "circle" is located on - EnumFacing sideHit = EnumFacing.UP; - EnumFacing rotation = tileArray.getRotation(); - - GlStateManager.translate(sideHit.getFrontOffsetX() * offsetFromFace, sideHit.getFrontOffsetY() * offsetFromFace, sideHit.getFrontOffsetZ() * offsetFromFace); - - switch (sideHit) - { - case DOWN: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(-90.0f, 1, 0, 0); - break; - case EAST: - GlStateManager.rotate(-90.0f, 0, 1, 0); - GlStateManager.translate(0, 0, -1); - break; - case NORTH: - break; - case SOUTH: - GlStateManager.rotate(180.0f, 0, 1, 0); - GlStateManager.translate(-1, 0, -1); - break; - case UP: - GlStateManager.translate(0, 1, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - break; - case WEST: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(90.0f, 0, 1, 0); - break; - } - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5f, 0.5f, getVerticalOffset(craftTime)); - GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1); - - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 0, 1); - GlStateManager.rotate(secondaryRot, 1, 0, 0); - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - // GlStateManager.depthMask(true); - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GlStateManager.popMatrix(); - GlStateManager.popMatrix(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/BindingAlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/BindingAlchemyCircleRenderer.java deleted file mode 100644 index be708860..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/BindingAlchemyCircleRenderer.java +++ /dev/null @@ -1,271 +0,0 @@ -package WayofTime.bloodmagic.client.render.alchemyArray; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; - -public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer -{ - public float offsetFromFace = -0.9f; - public final ResourceLocation[] arraysResources; - - public static final int numberOfSweeps = 5; - public static final int startTime = 50; - public static final int sweepTime = 40; - - public static final int inwardRotationTime = 50; - - public static final float arcLength = (float) Math.sqrt(2 * (2 * 2) - 2 * 2 * 2 * Math.cos(2 * Math.PI * 2 / 5)); - public static final float theta2 = (float) (18f * Math.PI / 180f); - - public static final int endTime = 300; - - public BindingAlchemyCircleRenderer() - { - super(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BindingArray.png")); - arraysResources = new ResourceLocation[5]; - arraysResources[0] = new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BindingLightningArray.png"); - arraysResources[1] = new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BindingLightningArray.png"); - arraysResources[2] = new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BindingLightningArray.png"); - arraysResources[3] = new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BindingLightningArray.png"); - arraysResources[4] = new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BindingLightningArray.png"); - } - - public static float getAngleOfCircle(int circle, float craftTime) - { - if (circle >= 0 && circle <= 4) - { - float originalAngle = (float) (circle * 2 * Math.PI / 5d); - - double sweep = (craftTime - startTime) / sweepTime; - if (sweep >= 0 && sweep < numberOfSweeps) - { - float offset = ((int) sweep) * sweepTime + startTime; - originalAngle += 2 * Math.PI * 2 / 5 * (int) sweep + getAngle(craftTime - offset, (int) sweep); - } else if (sweep >= numberOfSweeps) - { - originalAngle += 2 * Math.PI * 2 / 5 * numberOfSweeps + (craftTime - 5 * sweepTime - startTime) * 2 * Math.PI * 2 / 5 / sweepTime; - } - - return originalAngle; - } - - return 0; - } - - public static float getAngle(float craftTime, int sweep) - { - float rDP = craftTime / sweepTime * arcLength; - float rEnd = (float) Math.sqrt(rDP * rDP + 2 * 2 - 2 * rDP * 2 * Math.cos(theta2)); - return (float) (Math.acos((2 * 2 + rEnd * rEnd - rDP * rDP) / (2 * rEnd * 2))); - } - - /** - * Returns the center-to-center distance of this circle. - */ - public static float getDistanceOfCircle(int circle, float craftTime) - { // TODO Change this so it doesn't use angle, since it is a constant speed. - double sweep = (craftTime - startTime) / sweepTime; - if (sweep >= 0 && sweep < numberOfSweeps) - { - float offset = ((int) sweep) * sweepTime + startTime; - float angle = getAngle(craftTime - offset, (int) sweep); - float thetaPrime = (float) (Math.PI - theta2 - angle); - // if(thetaPrime > 0 && thetaPrime < Math.PI) { - return (float) (2 * Math.sin(theta2) / Math.sin(thetaPrime)); - // } - } else if (sweep >= numberOfSweeps && craftTime < endTime) - { - return 2 - 2 * (craftTime - startTime - numberOfSweeps * sweepTime) / (endTime - startTime - numberOfSweeps * sweepTime); - } else if (craftTime >= endTime) - { - return 0; - } - - return 2; - } - - public float getRotation(int circle, float craftTime) - { - float offset = 2; - if (circle == -1) - { - return (float) (craftTime * 360 * 2 / 5 / sweepTime); - } - if (craftTime >= offset) - { - float modifier = (float) Math.pow(craftTime - offset, 1.5); - return modifier * 0.5f; - } - return 0; - } - - public float getSecondaryRotation(int circle, float craftTime) - { - float offset = 50; - if (craftTime >= offset) - { - float modifier = (float) Math.pow(craftTime - offset, 1.7); - return modifier * 0.5f; - } - return 0; - } - - public float getVerticalOffset(int circle, float craftTime) - { - if (circle >= 0 && circle <= 4) - { - if (craftTime >= 5) - { - if (craftTime <= 40) - { - return (float) ((-0.4) * Math.pow((craftTime - 5) / 35f, 3)); - } else - { - return -0.4f; - } - } - - return 0; - } - - if (craftTime >= 5) - { - if (craftTime <= 40) - { - return (float) ((-0.4) * Math.pow((craftTime - 5) / 35f, 3)); - } else - { - return -0.4f; - } - } - return 0; - } - - public float getInwardRotation(int circle, float craftTime) - { - float offset = startTime + numberOfSweeps * sweepTime; - if (craftTime >= offset) - { - if (craftTime <= offset + inwardRotationTime) - { - return 90f / inwardRotationTime * (craftTime - offset); - } else - { - return 90; - } - } - - return 0; - } - - public void renderAt(TileEntity tile, double x, double y, double z, float craftTime) - { - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - - float rot = getRotation(-1, craftTime); - - float size = 3.0F; - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - GlStateManager.translate(x, y, z); - - // Specify which face this "circle" is located on - EnumFacing sideHit = EnumFacing.UP; - GlStateManager.translate(sideHit.getFrontOffsetX() * offsetFromFace, sideHit.getFrontOffsetY() * offsetFromFace, sideHit.getFrontOffsetZ() * offsetFromFace); - - switch (sideHit) - { - case DOWN: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(-90.0f, 1, 0, 0); - break; - case EAST: - GlStateManager.rotate(-90.0f, 0, 1, 0); - GlStateManager.translate(0, 0, -1); - break; - case NORTH: - break; - case SOUTH: - GlStateManager.rotate(180.0f, 0, 1, 0); - GlStateManager.translate(-1, 0, -1); - break; - case UP: - GlStateManager.translate(0, 1, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - break; - case WEST: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(90.0f, 0, 1, 0); - break; - } - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5f, 0.5f, getVerticalOffset(craftTime)); - - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - // GlStateManager.color(0.5f, 1f, 1f, 1f); - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 0, 1); - - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - GlStateManager.popMatrix(); - - for (int i = 0; i < 5; i++) - { - GlStateManager.pushMatrix(); - Minecraft.getMinecraft().renderEngine.bindTexture(arraysResources[i]); - float newSize = 1; - float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(i, craftTime); - float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(i, craftTime); - float rotation = this.getRotation(i, craftTime); - - GlStateManager.translate(distance * Math.sin(angle), -distance * Math.cos(angle), this.getVerticalOffset(i, craftTime)); - GlStateManager.rotate(i * 360 / 5, 0, 0, 1); - GlStateManager.rotate(getInwardRotation(i, craftTime), 1, 0, 0); - GlStateManager.rotate(rotation, 0, 0, 1); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - wr.pos(newSize / 2f, newSize / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(newSize / 2f, -newSize / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-newSize / 2f, -newSize / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-newSize / 2f, newSize / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - } - - GlStateManager.popMatrix(); - - // GlStateManager.depthMask(true); - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GlStateManager.popMatrix(); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/DualAlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/DualAlchemyCircleRenderer.java deleted file mode 100644 index bb7248da..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/DualAlchemyCircleRenderer.java +++ /dev/null @@ -1,154 +0,0 @@ -package WayofTime.bloodmagic.client.render.alchemyArray; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer -{ - public float offsetFromFace = -0.9f; - public final ResourceLocation secondaryArrayResource; - - public DualAlchemyCircleRenderer() - { - this(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret1.png"), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret2.png")); - } - - public DualAlchemyCircleRenderer(ResourceLocation arrayResource, ResourceLocation secondaryArrayResource) - { - super(arrayResource); - this.secondaryArrayResource = secondaryArrayResource; - } - - @Override - public float getSizeModifier(float craftTime) - { - return 1; - } - - @Override - public float getRotation(float craftTime) - { - float offset = 2; - if (craftTime >= offset) - { - float modifier = (craftTime - offset) * 2f; - return modifier * 1f; - } - return 0; - } - - @Override - public void renderAt(TileEntity tile, double x, double y, double z, float craftTime) - { - if (!(tile instanceof TileAlchemyArray)) - { - return; - } - - TileAlchemyArray tileArray = (TileAlchemyArray) tile; - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - // float rot = (float)(this.worldObj.provider.getWorldTime() % (360 / - // this.rotationspeed) * this.rotationspeed) + this.rotationspeed * f; - float rot = getRotation(craftTime); - - float size = 1.0F * getSizeModifier(craftTime); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - GlStateManager.translate(x, y, z); - - // Specify which face this "circle" is located on - EnumFacing sideHit = EnumFacing.UP; - EnumFacing rotation = tileArray.getRotation(); - - GlStateManager.translate(sideHit.getFrontOffsetX() * offsetFromFace, sideHit.getFrontOffsetY() * offsetFromFace, sideHit.getFrontOffsetZ() * offsetFromFace); - - switch (sideHit) - { - case DOWN: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(-90.0f, 1, 0, 0); - break; - case EAST: - GlStateManager.rotate(-90.0f, 0, 1, 0); - GlStateManager.translate(0, 0, -1); - break; - case NORTH: - break; - case SOUTH: - GlStateManager.rotate(180.0f, 0, 1, 0); - GlStateManager.translate(-1, 0, -1); - break; - case UP: - GlStateManager.translate(0, 1, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - break; - case WEST: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(90.0f, 0, 1, 0); - break; - } - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5f, 0.5f, getVerticalOffset(craftTime)); - GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1); - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource); - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 0, 1); - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - // Bind the second texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(secondaryArrayResource); - GlStateManager.pushMatrix(); - GlStateManager.rotate(-rot, 0, 0, 1); - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - // GlStateManager.depthMask(true); - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GlStateManager.popMatrix(); - GlStateManager.popMatrix(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/SingleAlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/SingleAlchemyCircleRenderer.java deleted file mode 100644 index fe71a314..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/SingleAlchemyCircleRenderer.java +++ /dev/null @@ -1,136 +0,0 @@ -package WayofTime.bloodmagic.client.render.alchemyArray; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -public class SingleAlchemyCircleRenderer extends AlchemyCircleRenderer -{ - public float offsetFromFace = -0.9f; - - public SingleAlchemyCircleRenderer() - { - this(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret1.png")); - } - - public SingleAlchemyCircleRenderer(ResourceLocation arrayResource) - { - super(arrayResource); - } - - @Override - public float getSizeModifier(float craftTime) - { - return 1; - } - - @Override - public float getRotation(float craftTime) - { - float offset = 2; - if (craftTime >= offset) - { - float modifier = (craftTime - offset) * 2f; - return modifier * 1f; - } - return 0; - } - - @Override - public void renderAt(TileEntity tile, double x, double y, double z, float craftTime) - { - if (!(tile instanceof TileAlchemyArray)) - { - return; - } - - TileAlchemyArray tileArray = (TileAlchemyArray) tile; - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - // float rot = (float)(this.worldObj.provider.getWorldTime() % (360 / - // this.rotationspeed) * this.rotationspeed) + this.rotationspeed * f; - float rot = getRotation(craftTime); - - float size = 1.0F * getSizeModifier(craftTime); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - GlStateManager.translate(x, y, z); - - // Specify which face this "circle" is located on - EnumFacing sideHit = EnumFacing.UP; - EnumFacing rotation = tileArray.getRotation(); - - GlStateManager.translate(sideHit.getFrontOffsetX() * offsetFromFace, sideHit.getFrontOffsetY() * offsetFromFace, sideHit.getFrontOffsetZ() * offsetFromFace); - - switch (sideHit) - { - case DOWN: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(-90.0f, 1, 0, 0); - break; - case EAST: - GlStateManager.rotate(-90.0f, 0, 1, 0); - GlStateManager.translate(0, 0, -1); - break; - case NORTH: - break; - case SOUTH: - GlStateManager.rotate(180.0f, 0, 1, 0); - GlStateManager.translate(-1, 0, -1); - break; - case UP: - GlStateManager.translate(0, 1, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - break; - case WEST: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(90.0f, 0, 1, 0); - break; - } - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5f, 0.5f, getVerticalOffset(craftTime)); - GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1); - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource); - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 0, 1); - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - // GlStateManager.depthMask(true); - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GlStateManager.popMatrix(); - GlStateManager.popMatrix(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/StaticAlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/StaticAlchemyCircleRenderer.java deleted file mode 100644 index 3de40f39..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/StaticAlchemyCircleRenderer.java +++ /dev/null @@ -1,141 +0,0 @@ -package WayofTime.bloodmagic.client.render.alchemyArray; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; -import WayofTime.bloodmagic.tile.TileAlchemyArray; - -public class StaticAlchemyCircleRenderer extends AlchemyCircleRenderer -{ - public StaticAlchemyCircleRenderer(ResourceLocation location) - { - super(location); - } - - public StaticAlchemyCircleRenderer() - { - this(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/MovementArray.png")); - } - - @Override - public float getSizeModifier(float craftTime) - { - return 1; - } - - @Override - public float getRotation(float craftTime) - { - float offset = 50; - if (craftTime >= offset) - { - float modifier = (craftTime - offset) * 5f; - return modifier * 1f; - } - return 0; - } - - @Override - public float getSecondaryRotation(float craftTime) - { - return 0; - } - - @Override - public void renderAt(TileEntity tile, double x, double y, double z, float craftTime) - { - if (!(tile instanceof TileAlchemyArray)) - { - return; - } - - TileAlchemyArray tileArray = (TileAlchemyArray) tile; - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - - float rot = getRotation(craftTime); - - float size = 1.0F * getSizeModifier(craftTime); - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - GlStateManager.translate(x, y, z); - - // Specify which face this "circle" is located on - EnumFacing sideHit = EnumFacing.UP; - EnumFacing rotation = tileArray.getRotation(); - - GlStateManager.translate(sideHit.getFrontOffsetX() * offsetFromFace, sideHit.getFrontOffsetY() * offsetFromFace, sideHit.getFrontOffsetZ() * offsetFromFace); - - switch (sideHit) - { - case DOWN: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(-90.0f, 1, 0, 0); - break; - case EAST: - GlStateManager.rotate(-90.0f, 0, 1, 0); - GlStateManager.translate(0, 0, -1); - break; - case NORTH: - break; - case SOUTH: - GlStateManager.rotate(180.0f, 0, 1, 0); - GlStateManager.translate(-1, 0, -1); - break; - case UP: - GlStateManager.translate(0, 1, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - break; - case WEST: - GlStateManager.translate(0, 0, 1); - GlStateManager.rotate(90.0f, 0, 1, 0); - break; - } - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5f, 0.5f, getVerticalOffset(craftTime)); - GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1); - - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 1, 0); - - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - // GlStateManager.depthMask(true); - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GlStateManager.popMatrix(); - GlStateManager.popMatrix(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/package-info.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/package-info.java deleted file mode 100644 index 39585689..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.render.alchemyArray; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderAlchemyArray.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderAlchemyArray.java deleted file mode 100644 index bd8913c3..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderAlchemyArray.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; -import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; -import WayofTime.bloodmagic.tile.TileAlchemyArray; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.item.ItemStack; - -public class RenderAlchemyArray extends TileEntitySpecialRenderer -{ - @Override - public void renderTileEntityAt(TileAlchemyArray alchemyArray, double x, double y, double z, float partialTicks, int destroyStage) - { - ItemStack inputStack = alchemyArray.getStackInSlot(0); - ItemStack catalystStack = alchemyArray.getStackInSlot(1); - int craftTime = alchemyArray.activeCounter; - AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack); - - renderer.renderAt(alchemyArray, x, y, z, (craftTime > 0 ? craftTime + partialTicks : 0)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderAltar.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderAltar.java deleted file mode 100644 index 4fdf0161..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderAltar.java +++ /dev/null @@ -1,183 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import WayofTime.bloodmagic.api.altar.AltarComponent; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.block.BlockLifeEssence; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.util.handler.event.ClientHandler; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.renderer.*; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; - -public class RenderAltar extends TileEntitySpecialRenderer -{ - public static Minecraft mc = Minecraft.getMinecraft(); - public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png"); - public static float minHeight = 0.499f; - public static float maxHeight = 0.745f; - - @Override - public void renderTileEntityAt(TileAltar tileAltar, double x, double y, double z, float partialTicks, int destroyStage) - { - ItemStack inputStack = tileAltar.getStackInSlot(0); - - float level = ((float) tileAltar.getCurrentBlood()) / (float) tileAltar.getCapacity(); - - GlStateManager.pushMatrix(); - GlStateManager.translate(x, y, z); - if (level > 0) - this.renderFluid(getWorld(), level); - this.renderItem(tileAltar.getWorld(), inputStack, partialTicks); - GlStateManager.popMatrix(); - - if (tileAltar.getCurrentTierDisplayed() != EnumAltarTier.ONE) - { - renderHologram(tileAltar, tileAltar.getCurrentTierDisplayed(), partialTicks); - } - } - - private void renderFluid(World world, float fluidLevel) - { - GlStateManager.pushMatrix(); - - Fluid fluid = BlockLifeEssence.getLifeEssence(); - FluidStack fluidStack = new FluidStack(fluid, 1000); - - GlStateManager.translate(0.5, minHeight + (fluidLevel) * (maxHeight - minHeight), 0.5); - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - float size = 0.8f; - - TextureAtlasSprite fluidStillSprite = Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(fluid.getStill().toString()); - - int fluidColor = fluid.getColor(fluidStack); - - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - setGLColorFromInt(fluidColor); - - double uMin = (double) fluidStillSprite.getMinU(); - double uMax = (double) fluidStillSprite.getMaxU(); - double vMin = (double) fluidStillSprite.getMinV(); - double vMax = (double) fluidStillSprite.getMaxV(); - - wr.begin(7, DefaultVertexFormats.POSITION_TEX); -// wr.setBrightness(200); - wr.pos(size / 2f, 0, size / 2f).tex(uMax, vMax).endVertex(); - wr.pos(size / 2f, 0, -size / 2f).tex(uMax, vMin).endVertex(); - wr.pos(-size / 2f, 0, -size / 2f).tex(uMin, vMin).endVertex(); - wr.pos(-size / 2f, 0, size / 2f).tex(uMin, vMax).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - } - - private static void setGLColorFromInt(int color) - { - float red = (color >> 16 & 0xFF) / 255.0F; - float green = (color >> 8 & 0xFF) / 255.0F; - float blue = (color & 0xFF) / 255.0F; - - GlStateManager.color(red, green, blue, 1.0F); - } - - private void renderItem(World world, ItemStack stack, float partialTicks) - { - RenderItem itemRenderer = mc.getRenderItem(); - if (stack != null) - { - GlStateManager.translate(0.5, 1, 0.5); - EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, stack); - entityitem.getEntityItem().stackSize = 1; - entityitem.hoverStart = 0.0F; - GlStateManager.pushMatrix(); - GlStateManager.disableLighting(); - - float rotation = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); - - GlStateManager.rotate(rotation, 0.0F, 1.0F, 0); - GlStateManager.scale(0.5F, 0.5F, 0.5F); - GlStateManager.pushAttrib(); - RenderHelper.enableStandardItemLighting(); - itemRenderer.renderItem(entityitem.getEntityItem(), ItemCameraTransforms.TransformType.FIXED); - RenderHelper.disableStandardItemLighting(); - GlStateManager.popAttrib(); - - GlStateManager.enableLighting(); - GlStateManager.popMatrix(); - } - } - - private void renderHologram(TileAltar altar, EnumAltarTier tier, float partialTicks) - { - EntityPlayerSP player = mc.thePlayer; - World world = player.worldObj; - - if (tier == EnumAltarTier.ONE) - return; - - GlStateManager.pushMatrix(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GlStateManager.color(1F, 1F, 1F, 0.6125F); - - BlockPos vec3, vX; - vec3 = altar.getPos(); - double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks; - double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks; - double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks; - - for (AltarComponent altarComponent : tier.getAltarComponents()) - { - vX = vec3.add(altarComponent.getOffset()); - double minX = vX.getX() - posX; - double minY = vX.getY() - posY; - double minZ = vX.getZ() - posZ; - - if (!world.getBlockState(vX).isOpaqueCube()) - { - TextureAtlasSprite texture = null; - - switch (altarComponent.getComponent()) - { - case BLOODRUNE: - texture = ClientHandler.blankBloodRune; - break; - case NOTAIR: - texture = ClientHandler.stoneBrick; - break; - case GLOWSTONE: - texture = ClientHandler.glowstone; - break; - case BLOODSTONE: - texture = ClientHandler.bloodStoneBrick; - break; - case BEACON: - texture = ClientHandler.beacon; - break; - case CRYSTAL: - texture = ClientHandler.crystalCluster; - break; - } - - RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ); - } - } - - GlStateManager.popMatrix(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderBloodTank.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderBloodTank.java deleted file mode 100644 index 73da5b03..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderBloodTank.java +++ /dev/null @@ -1,112 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import WayofTime.bloodmagic.tile.TileBloodTank; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class RenderBloodTank extends TileEntitySpecialRenderer -{ - private static final Minecraft mc = Minecraft.getMinecraft(); - - @Override - public void renderTileEntityAt(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage) - { - if (bloodTank == null) - return; - - Fluid renderFluid = bloodTank.getClientRenderFluid(); - if (bloodTank.getRenderHeight() == 0 || renderFluid == null) - return; - - GlStateManager.pushMatrix(); - - bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - - renderFluid(bloodTank.getRenderHeight(), renderFluid, x, y, z); - - GlStateManager.popMatrix(); - } - - public void renderFluid(float maxHeight, Fluid renderFluid, double x, double y, double z) - { - maxHeight = maxHeight * 0.575F; - - GlStateManager.translate(x, y, z); - RenderHelper.disableStandardItemLighting(); - - GlStateManager.disableRescaleNormal(); - GlStateManager.disableBlend(); - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer buffer = tessellator.getBuffer(); - - TextureAtlasSprite fluid = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(renderFluid.getStill().toString()); - fluid = fluid == null ? mc.getTextureMapBlocks().getMissingSprite() : fluid; - - buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); - - final int rgbaColor = renderFluid.getColor(); - final int rColor = rgbaColor >> 16 & 0xFF; - final int gColor = rgbaColor >> 8 & 0xFF; - final int bColor = rgbaColor & 0xFF; - final int aColor = rgbaColor >> 24 & 0xFF; - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GlStateManager.color(rColor, gColor, bColor, aColor); - - float u1 = fluid.getMinU(); - float v1 = fluid.getMinV(); - float u2 = fluid.getMaxU(); - float v2 = fluid.getMaxV(); - - if (maxHeight > 0) { - float texWidth = u2 - u1; - - // TOP - buffer.pos(0.25, maxHeight + 0.05, 0.25).tex(u1 + 0.75 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, maxHeight + 0.05, 0.75).tex(u1 + 0.75 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, maxHeight + 0.05, 0.75).tex(u1 + 0.25 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, maxHeight + 0.05, 0.25).tex(u1 + 0.25 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - - // NORTH - buffer.pos(0.75, maxHeight + 0.05, 0.25).tex(u1 + 0.75 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, 0, 0.25).tex(u1 + 0.75 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, 0, 0.25).tex(u1 + 0.25 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, maxHeight + 0.05, 0.25).tex(u1 + 0.25 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - - // EAST - buffer.pos(0.25, 0, 0.75).tex(u1 + 0.75 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, maxHeight + 0.05, 0.75).tex(u1 + 0.75 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, maxHeight + 0.05, 0.25).tex(u1 + 0.25 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, 0, 0.25).tex(u1 + 0.25 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - - // SOUTH - buffer.pos(0.75, 0, 0.75).tex(u1 + 0.75 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, maxHeight + 0.05, 0.75).tex(u1 + 0.75 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, maxHeight + 0.05, 0.75).tex(u1 + 0.25 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.25, 0, 0.75).tex(u1 + 0.25 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - - // WEST - buffer.pos(0.75, maxHeight + 0.05, 0.75).tex(u1 + 0.75 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, 0, 0.75).tex(u1 + 0.75 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, 0, 0.25).tex(u1 + 0.25 * texWidth, v1).color(rColor, gColor, bColor, aColor).endVertex(); - buffer.pos(0.75, maxHeight + 0.05, 0.25).tex(u1 + 0.25 * texWidth, v1 + (maxHeight + 0.05) * texWidth).color(rColor, gColor, bColor, aColor).endVertex(); - } - - tessellator.draw(); - - RenderHelper.enableStandardItemLighting(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderDemonCrucible.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderDemonCrucible.java deleted file mode 100644 index 719b0ce5..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderDemonCrucible.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import WayofTime.bloodmagic.tile.TileDemonCrucible; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.RenderItem; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; - -public class RenderDemonCrucible extends TileEntitySpecialRenderer -{ - public static Minecraft mc = Minecraft.getMinecraft(); - public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png"); - public static float minHeight = 0.6497f; - public static float maxHeight = 0.79f; - - @Override - public void renderTileEntityAt(TileDemonCrucible tile, double x, double y, double z, float partialTicks, int destroyStage) - { - ItemStack inputStack = tile.getStackInSlot(0); - - GlStateManager.pushMatrix(); - GlStateManager.translate(x, y, z); - this.renderItem(tile.getWorld(), inputStack, partialTicks); - GlStateManager.popMatrix(); - } - - private void renderItem(World world, ItemStack stack, float partialTicks) - { - RenderItem itemRenderer = mc.getRenderItem(); - if (stack != null) - { - GlStateManager.translate(0.5, 1.5, 0.5); - EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, stack); - entityitem.getEntityItem().stackSize = 1; - entityitem.hoverStart = 0.0F; - GlStateManager.pushMatrix(); - GlStateManager.disableLighting(); - - float rotation = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); - - GlStateManager.rotate(rotation, 0.0F, 1.0F, 0); - GlStateManager.scale(0.5F, 0.5F, 0.5F); - GlStateManager.pushAttrib(); - RenderHelper.enableStandardItemLighting(); - itemRenderer.renderItem(entityitem.getEntityItem(), ItemCameraTransforms.TransformType.FIXED); - RenderHelper.disableStandardItemLighting(); - GlStateManager.popAttrib(); - - GlStateManager.enableLighting(); - GlStateManager.popMatrix(); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderFakeBlocks.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderFakeBlocks.java deleted file mode 100644 index 68782314..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderFakeBlocks.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.world.World; -import org.lwjgl.opengl.GL11; - -public class RenderFakeBlocks -{ - public static void drawFakeBlock(TextureAtlasSprite texture, double minX, double minY, double minZ) - { - if (texture == null) - return; - - double maxX = minX + 1; - double maxY = minY + 1; - double maxZ = minZ + 1; - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - - wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); - - float texMinU = texture.getMinU(); - float texMinV = texture.getMinV(); - float texMaxU = texture.getMaxU(); - float texMaxV = texture.getMaxV(); - - wr.pos(minX, minY, minZ).tex(texMinU, texMinV).endVertex(); - wr.pos(maxX, minY, minZ).tex(texMaxU, texMinV).endVertex(); - wr.pos(maxX, minY, maxZ).tex(texMaxU, texMaxV).endVertex(); - wr.pos(minX, minY, maxZ).tex(texMinU, texMaxV).endVertex(); - - wr.pos(minX, maxY, maxZ).tex(texMinU, texMaxV).endVertex(); - wr.pos(maxX, maxY, maxZ).tex(texMaxU, texMaxV).endVertex(); - wr.pos(maxX, maxY, minZ).tex(texMaxU, texMinV).endVertex(); - wr.pos(minX, maxY, minZ).tex(texMinU, texMinV).endVertex(); - - wr.pos(maxX, minY, minZ).tex(texMinU, texMaxV).endVertex(); - wr.pos(minX, minY, minZ).tex(texMaxU, texMaxV).endVertex(); - wr.pos(minX, maxY, minZ).tex(texMaxU, texMinV).endVertex(); - wr.pos(maxX, maxY, minZ).tex(texMinU, texMinV).endVertex(); - - wr.pos(minX, minY, maxZ).tex(texMinU, texMaxV).endVertex(); - wr.pos(maxX, minY, maxZ).tex(texMaxU, texMaxV).endVertex(); - wr.pos(maxX, maxY, maxZ).tex(texMaxU, texMinV).endVertex(); - wr.pos(minX, maxY, maxZ).tex(texMinU, texMinV).endVertex(); - - wr.pos(minX, minY, minZ).tex(texMinU, texMaxV).endVertex(); - wr.pos(minX, minY, maxZ).tex(texMaxU, texMaxV).endVertex(); - wr.pos(minX, maxY, maxZ).tex(texMaxU, texMinV).endVertex(); - wr.pos(minX, maxY, minZ).tex(texMinU, texMinV).endVertex(); - - wr.pos(maxX, minY, maxZ).tex(texMinU, texMaxV).endVertex(); - wr.pos(maxX, minY, minZ).tex(texMaxU, texMaxV).endVertex(); - wr.pos(maxX, maxY, minZ).tex(texMaxU, texMinV).endVertex(); - wr.pos(maxX, maxY, maxZ).tex(texMinU, texMinV).endVertex(); - - tessellator.draw(); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderItemRoutingNode.java deleted file mode 100644 index 2aab5c5c..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderItemRoutingNode.java +++ /dev/null @@ -1,116 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.INodeRenderer; -import WayofTime.bloodmagic.client.helper.ShaderHelper; -import WayofTime.bloodmagic.tile.routing.TileRoutingNode; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import org.lwjgl.opengl.GL11; - -import java.util.List; - -public class RenderItemRoutingNode extends TileEntitySpecialRenderer -{ - private static final ResourceLocation beamTexture = new ResourceLocation(Constants.Mod.MODID, "textures/entities/nodeBeam.png"); - private static final Minecraft mc = Minecraft.getMinecraft(); - -// private static final ResourceLocation test = new ResourceLocation("luminescence:textures/models/InputMirror.png"); - - @Override - public void renderTileEntityAt(TileRoutingNode tileNode, double x, double y, double z, float partialTicks, int destroyStage) - { - if ((mc.thePlayer.getHeldItemMainhand() != null && mc.thePlayer.getHeldItemMainhand().getItem() instanceof INodeRenderer) || ConfigHandler.alwaysRenderRoutingLines) - { - List connectionList = tileNode.getConnected(); - for (BlockPos wantedPos : connectionList) - { - BlockPos offsetPos = wantedPos.subtract(tileNode.getPos()); - - //The beam renders towards the east by default. - - int xd = offsetPos.getX(); - int yd = offsetPos.getY(); - int zd = offsetPos.getZ(); - double distance = Math.sqrt(xd * xd + yd * yd + zd * zd); - double subLength = MathHelper.sqrt_double(xd * xd + zd * zd); - float rotYaw = -((float) (Math.atan2(zd, xd) * 180.0D / Math.PI)); - float rotPitch = ((float) (Math.atan2(yd, subLength) * 180.0D / Math.PI)); - - GlStateManager.pushMatrix(); - float f1 = 1.0f; - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - this.bindTexture(beamTexture); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GlStateManager.disableLighting(); - GlStateManager.disableCull(); - float f2 = 0; - float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - double width = 0.06; - - float test = (tileNode.getWorld().getTotalWorldTime() + partialTicks) / 5f; - - double d18 = -width / 2; - double d19 = -width / 2; - double d20 = width / 2; - double d21 = -width / 2; - double d22 = -width / 2; - double d23 = width / 2; - double d24 = width / 2; - double d25 = width / 2; - double d26 = (double) (distance * f1); - double d27 = 0.0D; - double d28 = 1.0D; - double d29 = (double) (f3) + test; - double d30 = (double) (distance * f1) + d29; - - GlStateManager.translate(x + 0.5, y + 0.5, z + 0.5); - - GlStateManager.rotate(rotYaw, 0, 1, 0); - GlStateManager.rotate(rotPitch, 0, 0, 1); - -// tessellator.setBrightness(240); -// float s = 1F / 16F; - wr.begin(7, DefaultVertexFormats.POSITION_TEX); -// tessellator.setColorRGBA(255, 255, 255, 100); - wr.pos(d26, d18, d19).tex(d28, d30).endVertex(); - wr.pos(0, d18, d19).tex(d28, d29).endVertex(); - wr.pos(0, d20, d21).tex(d27, d29).endVertex(); - wr.pos(d26, d20, d21).tex(d27, d30).endVertex(); - wr.pos(d26, d24, d25).tex(d28, d30).endVertex(); - wr.pos(0, d24, d25).tex(d28, d29).endVertex(); - wr.pos(0, d22, d23).tex(d27, d29).endVertex(); - wr.pos(d26, d22, d23).tex(d27, d30).endVertex(); - wr.pos(d26, d20, d21).tex(d28, d30).endVertex(); - wr.pos(0, d20, d21).tex(d28, d29).endVertex(); - wr.pos(0, d24, d25).tex(d27, d29).endVertex(); - wr.pos(d26, d24, d25).tex(d27, d30).endVertex(); - wr.pos(d26, d22, d23).tex(d28, d30).endVertex(); - wr.pos(0, d22, d23).tex(d28, d29).endVertex(); - wr.pos(0, d18, d19).tex(d27, d29).endVertex(); - wr.pos(d26, d18, d19).tex(d27, d30).endVertex(); - - ShaderHelper.useShader(ShaderHelper.psiBar, (int) tileNode.getWorld().getTotalWorldTime()); - tessellator.draw(); - ShaderHelper.releaseShader(); - - GlStateManager.enableLighting(); - GlStateManager.enableTexture2D(); - GlStateManager.popMatrix(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderMimic.java b/src/main/java/WayofTime/bloodmagic/client/render/block/RenderMimic.java deleted file mode 100644 index e60a5e1d..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/RenderMimic.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.client.render.block; - -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.tile.TileMimic; - -@SideOnly(Side.CLIENT) -public class RenderMimic extends TileEntitySpecialRenderer -{ - public void renderTileEntityAt(TileMimic mimic, double x, double y, double z, float partialTicks, int destroyStage) - { - if (mimic.getStackInSlot(0) != null) - { - TileEntity testTile = mimic.mimicedTile; - if (mimic != null) - { - TileEntityRendererDispatcher.instance.renderTileEntityAt(testTile, x, y, z, partialTicks, destroyStage); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/block/package-info.java b/src/main/java/WayofTime/bloodmagic/client/render/block/package-info.java deleted file mode 100644 index 75b9947e..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/block/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.render.block; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/BloodLightRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/BloodLightRenderFactory.java deleted file mode 100644 index 3c064e44..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/BloodLightRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import WayofTime.bloodmagic.entity.projectile.EntityBloodLight; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; - -public class BloodLightRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderEntityBloodLight(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedChickenRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedChickenRenderFactory.java deleted file mode 100644 index 0705375f..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedChickenRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; - -public class CorruptedChickenRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderCorruptedChicken(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedSheepRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedSheepRenderFactory.java deleted file mode 100644 index 42986d10..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedSheepRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -public class CorruptedSheepRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderCorruptedSheep(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedSpiderRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedSpiderRenderFactory.java deleted file mode 100644 index eb0d211f..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedSpiderRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider; - -public class CorruptedSpiderRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderCorruptedSpider(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedZombieRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedZombieRenderFactory.java deleted file mode 100644 index 9626ee9a..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/CorruptedZombieRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedZombie; - -public class CorruptedZombieRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderCorruptedZombie(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/MeteorRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/MeteorRenderFactory.java deleted file mode 100644 index a55f4559..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/MeteorRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.projectile.EntityMeteor; - -public class MeteorRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderEntityMeteor(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/MimicRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/MimicRenderFactory.java deleted file mode 100644 index 00d5f642..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/MimicRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntityMimic; - -public class MimicRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderEntityMimic(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedChicken.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedChicken.java deleted file mode 100644 index e919f5cc..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedChicken.java +++ /dev/null @@ -1,37 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.entity.layer.LayerWill; -import WayofTime.bloodmagic.client.render.model.ModelCorruptedChicken; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; - -@SideOnly(Side.CLIENT) -public class RenderCorruptedChicken extends RenderLiving -{ - private static final ResourceLocation CHICKEN_TEXTURES = new ResourceLocation("textures/entity/chicken.png"); - - public RenderCorruptedChicken(RenderManager renderManagerIn) - { - super(renderManagerIn, new ModelCorruptedChicken(0), 0.3f); - this.addLayer(new LayerWill(this, new ModelCorruptedChicken(1.1f))); - } - - @Override - protected ResourceLocation getEntityTexture(EntityCorruptedChicken entity) - { - return CHICKEN_TEXTURES; - } - - @Override - protected float handleRotationFloat(EntityCorruptedChicken livingBase, float partialTicks) - { - float f = livingBase.oFlap + (livingBase.wingRotation - livingBase.oFlap) * partialTicks; - float f1 = livingBase.oFlapSpeed + (livingBase.destPos - livingBase.oFlapSpeed) * partialTicks; - return (MathHelper.sin(f) + 1.0F) * f1; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedSheep.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedSheep.java deleted file mode 100644 index 111d222b..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedSheep.java +++ /dev/null @@ -1,34 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.entity.layer.LayerAlchemyCircle; -import WayofTime.bloodmagic.client.render.entity.layer.LayerCorruptedSheepWool; -import WayofTime.bloodmagic.client.render.entity.layer.LayerWill; -import WayofTime.bloodmagic.client.render.model.ModelCorruptedSheep; -import WayofTime.bloodmagic.client.render.model.ModelCorruptedSheep2; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -@SideOnly(Side.CLIENT) -public class RenderCorruptedSheep extends RenderLiving -{ - private static final ResourceLocation SHEARED_SHEEP_TEXTURES = new ResourceLocation("textures/entity/sheep/sheep.png"); - - public RenderCorruptedSheep(RenderManager renderManagerIn) - { - super(renderManagerIn, new ModelCorruptedSheep2(0), 0.7F); - this.addLayer(new LayerCorruptedSheepWool(this)); - this.addLayer(new LayerWill(this, new ModelCorruptedSheep(1.1f))); - this.addLayer(new LayerWill(this, new ModelCorruptedSheep2(1.1f))); - this.addLayer(new LayerAlchemyCircle()); - } - - @Override - protected ResourceLocation getEntityTexture(EntityCorruptedSheep entity) - { - return SHEARED_SHEEP_TEXTURES; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedSpider.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedSpider.java deleted file mode 100644 index e118403b..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedSpider.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.model.ModelSpider; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.entity.layer.LayerCorruptedSpiderEyes; -import WayofTime.bloodmagic.client.render.entity.layer.LayerWill; -import WayofTime.bloodmagic.client.render.model.ModelCorruptedSpider; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider; - -@SideOnly(Side.CLIENT) -public class RenderCorruptedSpider extends RenderLiving -{ - private static final ResourceLocation SPIDER_TEXTURES = new ResourceLocation("textures/entity/spider/spider.png"); - - public RenderCorruptedSpider(RenderManager renderManagerIn) - { - super(renderManagerIn, new ModelSpider(), 1.0F); - this.addLayer(new LayerCorruptedSpiderEyes(this)); - this.addLayer(new LayerWill(this, new ModelCorruptedSpider(1.1f))); - } - - protected float getDeathMaxRotation(EntityCorruptedSpider entityLivingBaseIn) - { - return 180.0F; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityCorruptedSpider entity) - { - return SPIDER_TEXTURES; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedZombie.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedZombie.java deleted file mode 100644 index ab9c273a..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderCorruptedZombie.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.model.ModelZombie; -import net.minecraft.client.model.ModelZombieVillager; -import net.minecraft.client.renderer.entity.RenderBiped; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.entity.layers.LayerBipedArmor; -import net.minecraft.client.renderer.entity.layers.LayerCustomHead; -import net.minecraft.client.renderer.entity.layers.LayerHeldItem; -import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.entity.layer.LayerWill; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedZombie; - -@SideOnly(Side.CLIENT) -public class RenderCorruptedZombie extends RenderBiped -{ - private static final ResourceLocation ZOMBIE_TEXTURES = new ResourceLocation("textures/entity/zombie/zombie.png"); - private final ModelZombieVillager zombieVillagerModel; - - public RenderCorruptedZombie(RenderManager renderManagerIn) - { - super(renderManagerIn, new ModelZombie(), 0.5F, 1.0F); - LayerRenderer layerrenderer = (LayerRenderer) this.layerRenderers.get(0); - this.zombieVillagerModel = new ModelZombieVillager(); - this.addLayer(new LayerHeldItem(this)); - LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) - { - protected void initArmor() - { - this.modelLeggings = new ModelZombie(0.5F, true); - this.modelArmor = new ModelZombie(1.0F, true); - } - }; - this.addLayer(layerbipedarmor); - - if (layerrenderer instanceof LayerCustomHead) - { - this.removeLayer(layerrenderer); - this.addLayer(new LayerCustomHead(this.zombieVillagerModel.bipedHead)); - } - - this.removeLayer(layerbipedarmor); - this.addLayer(new LayerWill(this, new ModelZombie(1.2f, false))); - } - - /** - * Allows the render to do state modifications necessary before the model is - * rendered. - */ - protected void preRenderCallback(EntityCorruptedZombie entitylivingbaseIn, float partialTickTime) - { - super.preRenderCallback(entitylivingbaseIn, partialTickTime); - } - - /** - * Renders the desired {@code T} type Entity. - */ - public void doRender(EntityCorruptedZombie entity, double x, double y, double z, float entityYaw, float partialTicks) - { - super.doRender(entity, x, y, z, entityYaw, partialTicks); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityCorruptedZombie entity) - { - return ZOMBIE_TEXTURES; - } - - protected void rotateCorpse(EntityCorruptedZombie entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks) - { - super.rotateCorpse(entityLiving, p_77043_2_, p_77043_3_, partialTicks); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityBloodLight.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityBloodLight.java deleted file mode 100644 index ba8f3131..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityBloodLight.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import WayofTime.bloodmagic.entity.projectile.EntityBloodLight; -import WayofTime.bloodmagic.item.ItemComponent; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderItem; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.ResourceLocation; - -public class RenderEntityBloodLight extends Render -{ - private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); - - public RenderEntityBloodLight(RenderManager renderManagerIn) - { - super(renderManagerIn); - } - - public void doRender(EntityBloodLight entity, double x, double y, double z, float entityYaw, float partialTicks) - { - GlStateManager.pushMatrix(); - GlStateManager.translate((float) x, (float) y, (float) z); - GlStateManager.enableRescaleNormal(); - GlStateManager.scale(0.5F, 0.5F, 0.5F); - GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - this.renderItem.renderItem(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), ItemCameraTransforms.TransformType.GROUND); - GlStateManager.disableRescaleNormal(); - GlStateManager.popMatrix(); - super.doRender(entity, x, y, z, entityYaw, partialTicks); - } - - protected ResourceLocation getEntityTexture(EntityBloodLight entity) - { - return TextureMap.LOCATION_BLOCKS_TEXTURE; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityMeteor.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityMeteor.java deleted file mode 100644 index f1425847..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityMeteor.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.render.model.ModelMeteor; -import WayofTime.bloodmagic.entity.projectile.EntityMeteor; - -public class RenderEntityMeteor extends Render -{ - public ModelBase model = new ModelMeteor(); - private float scale = 1; - private static final ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "textures/models/Meteor.png"); - - public RenderEntityMeteor(RenderManager renderManagerIn) - { - super(renderManagerIn); - } - - @Override - public void doRender(EntityMeteor entity, double x, double y, double z, float entityYaw, float partialTicks) - { -// GlStateManager.pushMatrix(); -// GlStateManager.translate((float) x, (float) y, (float) z); -// GlStateManager.enableRescaleNormal(); -// GlStateManager.scale(0.5F, 0.5F, 0.5F); -// GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); -// GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); -// this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); -// this.renderItem.renderItem(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), ItemCameraTransforms.TransformType.GROUND); -// GlStateManager.disableRescaleNormal(); -// GlStateManager.popMatrix(); - - GlStateManager.pushMatrix(); - GlStateManager.translate((float) x, (float) y, (float) z); - GlStateManager.enableRescaleNormal(); - GlStateManager.scale(scale, scale, scale); - this.bindTexture(this.getEntityTexture(entity)); -// GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F); -// GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f); - model.render(entity, 0, (float) x, (float) y, (float) z, entityYaw, partialTicks); - GlStateManager.disableRescaleNormal(); - GlStateManager.popMatrix(); - - super.doRender(entity, x, y, z, entityYaw, partialTicks); - } - - @Override - protected ResourceLocation getEntityTexture(EntityMeteor entity) - { - return resource; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityMimic.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityMimic.java deleted file mode 100644 index 9d2c755c..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntityMimic.java +++ /dev/null @@ -1,135 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import java.util.UUID; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySkullRenderer; -import net.minecraft.init.Items; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTUtil; -import net.minecraft.tileentity.TileEntitySkull; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StringUtils; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.model.ModelMimic; -import WayofTime.bloodmagic.entity.mob.EntityMimic; - -import com.mojang.authlib.GameProfile; - -@SideOnly(Side.CLIENT) -public class RenderEntityMimic extends RenderLiving -{ - private static final ResourceLocation SPIDER_TEXTURES = new ResourceLocation("textures/entity/spider/spider.png"); - Minecraft minecraft = Minecraft.getMinecraft(); - - public RenderEntityMimic(RenderManager renderManagerIn) - { - super(renderManagerIn, new ModelMimic(), 1.0F); - } - - @Override - public void doRender(EntityMimic mimic, double x, double y, double z, float entityYaw, float partialTicks) - { - super.doRender(mimic, x, y, z, entityYaw, partialTicks); - - GlStateManager.pushMatrix(); - if (mimic.getMimicItemStack() != null) - { - GlStateManager.pushMatrix(); - - if (this.renderOutlines) - { - GlStateManager.enableColorMaterial(); - GlStateManager.enableOutlineMode(this.getTeamColor(mimic)); - } - - GlStateManager.translate(x, y, z); - - ItemStack itemstack = mimic.getMimicItemStack(); - Item item = itemstack.getItem(); - Minecraft minecraft = Minecraft.getMinecraft(); - GlStateManager.pushMatrix(); - - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - - if (item == Items.SKULL) - { - float f2 = 1.1875F; - GlStateManager.scale(1.1875F, -1.1875F, -1.1875F); - - GameProfile gameprofile = null; - - if (itemstack.hasTagCompound()) - { - NBTTagCompound nbttagcompound = itemstack.getTagCompound(); - - if (nbttagcompound.hasKey("SkullOwner", 10)) - { - gameprofile = NBTUtil.readGameProfileFromNBT(nbttagcompound.getCompoundTag("SkullOwner")); - } else if (nbttagcompound.hasKey("SkullOwner", 8)) - { - String s = nbttagcompound.getString("SkullOwner"); - - if (!StringUtils.isNullOrEmpty(s)) - { - gameprofile = TileEntitySkull.updateGameprofile(new GameProfile((UUID) null, s)); - nbttagcompound.setTag("SkullOwner", NBTUtil.writeGameProfile(new NBTTagCompound(), gameprofile)); - } - } - } - - TileEntitySkullRenderer.instance.renderSkull(-0.5F, 0.0F, -0.5F, EnumFacing.UP, 180.0F, itemstack.getMetadata(), gameprofile, -1, 0); - } else if (!(item instanceof ItemArmor) || ((ItemArmor) item).getEquipmentSlot() != EntityEquipmentSlot.HEAD) - { - GlStateManager.translate(0, 0.5f, 0); - GlStateManager.rotate(-(mimic.prevRotationYawHead + partialTicks * (mimic.rotationYawHead - mimic.prevRotationYawHead)) - 180, 0, 1, 0); - - minecraft.getItemRenderer().renderItem(mimic, itemstack, ItemCameraTransforms.TransformType.HEAD); - } - - GlStateManager.popMatrix(); - - if (this.renderOutlines) - { - GlStateManager.disableOutlineMode(); - GlStateManager.disableColorMaterial(); - } - - GlStateManager.popMatrix(); - super.doRender(mimic, x, y, z, entityYaw, partialTicks); - - } - GlStateManager.popMatrix(); - - if (!this.renderOutlines) - { - this.renderLeash(mimic, x, y, z, entityYaw, partialTicks); - } - } - - @Override - protected float getDeathMaxRotation(EntityMimic mimic) - { - return 180.0F; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(EntityMimic mimic) - { - return SPIDER_TEXTURES; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySentientArrow.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySentientArrow.java deleted file mode 100644 index ee35fc89..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySentientArrow.java +++ /dev/null @@ -1,117 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.opengl.GL11; - -import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; - -@SideOnly(Side.CLIENT) -public class RenderEntitySentientArrow extends Render -{ - private static final ResourceLocation defaultTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow.png"); - private static final ResourceLocation corrosiveTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_corrosive.png"); - private static final ResourceLocation vengefulTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_vengeful.png"); - private static final ResourceLocation destructiveTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_destructive.png"); - private static final ResourceLocation steadfastTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_steadfast.png"); - - public RenderEntitySentientArrow(RenderManager renderManagerIn) - { - super(renderManagerIn); - } - - public void doRender(EntitySentientArrow entity, double x, double y, double z, float entityYaw, float partialTicks) - { - this.bindEntityTexture(entity); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - GlStateManager.pushMatrix(); - GlStateManager.translate((float) x, (float) y, (float) z); - GlStateManager.rotate(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F); - GlStateManager.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks, 0.0F, 0.0F, 1.0F); - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer worldrenderer = tessellator.getBuffer(); - int i = 0; - float f = 0.0F; - float f1 = 0.5F; - float f2 = (float) (0 + i * 10) / 32.0F; - float f3 = (float) (5 + i * 10) / 32.0F; - float f4 = 0.0F; - float f5 = 0.15625F; - float f6 = (float) (5 + i * 10) / 32.0F; - float f7 = (float) (10 + i * 10) / 32.0F; - float f8 = 0.05625F; - GlStateManager.enableRescaleNormal(); - float f9 = (float) entity.arrowShake - partialTicks; - - if (f9 > 0.0F) - { - float f10 = -MathHelper.sin(f9 * 3.0F) * f9; - GlStateManager.rotate(f10, 0.0F, 0.0F, 1.0F); - } - - GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F); - GlStateManager.scale(f8, f8, f8); - GlStateManager.translate(-4.0F, 0.0F, 0.0F); - GL11.glNormal3f(f8, 0.0F, 0.0F); - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double) f4, (double) f6).endVertex(); - worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double) f5, (double) f6).endVertex(); - worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double) f5, (double) f7).endVertex(); - worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double) f4, (double) f7).endVertex(); - tessellator.draw(); - GL11.glNormal3f(-f8, 0.0F, 0.0F); - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double) f4, (double) f6).endVertex(); - worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double) f5, (double) f6).endVertex(); - worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double) f5, (double) f7).endVertex(); - worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double) f4, (double) f7).endVertex(); - tessellator.draw(); - - for (int j = 0; j < 4; ++j) - { - GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F); - GL11.glNormal3f(0.0F, 0.0F, f8); - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double) f, (double) f2).endVertex(); - worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double) f1, (double) f2).endVertex(); - worldrenderer.pos(8.0D, 2.0D, 0.0D).tex((double) f1, (double) f3).endVertex(); - worldrenderer.pos(-8.0D, 2.0D, 0.0D).tex((double) f, (double) f3).endVertex(); - tessellator.draw(); - } - - GlStateManager.disableRescaleNormal(); - GlStateManager.popMatrix(); - super.doRender(entity, x, y, z, entityYaw, partialTicks); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntitySentientArrow entity) - { - switch (entity.type) - { - case CORROSIVE: - return corrosiveTexture; - case DESTRUCTIVE: - return destructiveTexture; - case STEADFAST: - return steadfastTexture; - case VENGEFUL: - return vengefulTexture; - case DEFAULT: - default: - return defaultTexture; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySoulSnare.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySoulSnare.java deleted file mode 100644 index 788f0616..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySoulSnare.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; -import WayofTime.bloodmagic.registry.ModItems; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderItem; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public class RenderEntitySoulSnare extends Render -{ - private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); - - public RenderEntitySoulSnare(RenderManager renderManagerIn) - { - super(renderManagerIn); - } - - public void doRender(EntitySoulSnare entity, double x, double y, double z, float entityYaw, float partialTicks) - { - GlStateManager.pushMatrix(); - GlStateManager.translate((float) x, (float) y, (float) z); - GlStateManager.enableRescaleNormal(); - GlStateManager.scale(0.5F, 0.5F, 0.5F); - GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - this.renderItem.renderItem(new ItemStack(ModItems.SOUL_SNARE), ItemCameraTransforms.TransformType.GROUND); - GlStateManager.disableRescaleNormal(); - GlStateManager.popMatrix(); - super.doRender(entity, x, y, z, entityYaw, partialTicks); - } - - protected ResourceLocation getEntityTexture(EntitySoulSnare entity) - { - return TextureMap.LOCATION_BLOCKS_TEXTURE; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderSentientSpecter.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderSentientSpecter.java deleted file mode 100644 index 38416f92..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderSentientSpecter.java +++ /dev/null @@ -1,173 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderBiped; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.entity.layers.LayerArrow; -import net.minecraft.client.renderer.entity.layers.LayerBipedArmor; -import net.minecraft.client.renderer.entity.layers.LayerCustomHead; -import net.minecraft.client.renderer.entity.layers.LayerHeldItem; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumHandSide; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; - -@SideOnly(Side.CLIENT) -public class RenderSentientSpecter extends RenderBiped -{ - public static final ResourceLocation texture = new ResourceLocation("bloodmagic", "textures/entities/specter.png"); - - public RenderSentientSpecter(RenderManager renderManager) - { - super(renderManager, new ModelBiped(0.0F), 0); - this.addLayer(new LayerBipedArmor(this)); - this.addLayer(new LayerHeldItem(this)); - this.addLayer(new LayerArrow(this)); - this.addLayer(new LayerCustomHead(this.getMainModel().bipedHead)); - } - - public ModelBiped getMainModel() - { - return (ModelBiped) super.getMainModel(); - } - - /** - * Renders the desired {@code T} type Entity. - */ - public void doRender(EntitySentientSpecter entity, double x, double y, double z, float entityYaw, float partialTicks) - { -// if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(entity, this, partialTicks, x, y, z))) -// return; -// if (!entity.isUser() || this.renderManager.renderViewEntity == entity) - { - double d0 = y; - - this.setModelVisibilities(entity); -// GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN); - super.doRender(entity, x, d0, z, entityYaw, partialTicks); -// GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN); - } -// net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(entity, this, partialTicks, x, y, z)); - } - - private void setModelVisibilities(EntitySentientSpecter clientPlayer) - { - ModelBiped modelplayer = this.getMainModel(); - - ItemStack itemstack = clientPlayer.getHeldItemMainhand(); - ItemStack itemstack1 = clientPlayer.getHeldItemOffhand(); - modelplayer.setInvisible(true); - - modelplayer.isSneak = clientPlayer.isSneaking(); - ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY; - ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY; - - if (itemstack != null) - { - modelbiped$armpose = ModelBiped.ArmPose.ITEM; - - if (clientPlayer.getItemInUseCount() > 0) - { - EnumAction enumaction = itemstack.getItemUseAction(); - - if (enumaction == EnumAction.BLOCK) - { - modelbiped$armpose = ModelBiped.ArmPose.BLOCK; - } else if (enumaction == EnumAction.BOW) - { - modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW; - } - } - } - - if (itemstack1 != null) - { - modelbiped$armpose1 = ModelBiped.ArmPose.ITEM; - - if (clientPlayer.getItemInUseCount() > 0) - { - EnumAction enumaction1 = itemstack1.getItemUseAction(); - - if (enumaction1 == EnumAction.BLOCK) - { - modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK; - } - } - } - - if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT) - { - modelplayer.rightArmPose = modelbiped$armpose; - modelplayer.leftArmPose = modelbiped$armpose1; - } else - { - modelplayer.rightArmPose = modelbiped$armpose1; - modelplayer.leftArmPose = modelbiped$armpose; - } - - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntitySentientSpecter entity) - { - return texture; - } - - public void transformHeldFull3DItemLayer() - { - GlStateManager.translate(0.0F, 0.1875F, 0.0F); - } - - /** - * Allows the render to do state modifications necessary before the model is - * rendered. - */ - protected void preRenderCallback(EntitySentientSpecter entitylivingbaseIn, float partialTickTime) - { - float f = 0.9375F; - GlStateManager.scale(0.9375F, 0.9375F, 0.9375F); - } - -// public void renderRightArm(EntitySentientSpecter clientPlayer) -// { -// float f = 1.0F; -// GlStateManager.color(1.0F, 1.0F, 1.0F); -// float f1 = 0.0625F; -// ModelBiped modelplayer = this.getMainModel(); -// this.setModelVisibilities(clientPlayer); -// GlStateManager.enableBlend(); -// modelplayer.swingProgress = 0.0F; -// modelplayer.isSneak = false; -// modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); -// modelplayer.bipedRightArm.rotateAngleX = 0.0F; -// modelplayer.bipedRightArm.render(0.0625F); -// modelplayer.bipedRightArmwear.rotateAngleX = 0.0F; -// modelplayer.bipedRightArmwear.render(0.0625F); -// GlStateManager.disableBlend(); -// } -// -// public void renderLeftArm(EntitySentientSpecter clientPlayer) -// { -// float f = 1.0F; -// GlStateManager.color(1.0F, 1.0F, 1.0F); -// float f1 = 0.0625F; -// ModelBiped modelplayer = this.getMainModel(); -// this.setModelVisibilities(clientPlayer); -// GlStateManager.enableBlend(); -// modelplayer.isSneak = false; -// modelplayer.swingProgress = 0.0F; -// modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); -// modelplayer.bipedLeftArm.rotateAngleX = 0.0F; -// modelplayer.bipedLeftArm.render(0.0625F); -// modelplayer.bipedLeftArmwear.rotateAngleX = 0.0F; -// modelplayer.bipedLeftArmwear.render(0.0625F); -// GlStateManager.disableBlend(); -// } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java deleted file mode 100644 index 1d821634..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; - -public class SentientArrowRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderEntitySentientArrow(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientSpecterRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientSpecterRenderFactory.java deleted file mode 100644 index e06af0c2..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientSpecterRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; - -public class SentientSpecterRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderSentientSpecter(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/SoulSnareRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/SoulSnareRenderFactory.java deleted file mode 100644 index cb755a27..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/SoulSnareRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; - -public class SoulSnareRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderEntitySoulSnare(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerAlchemyCircle.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerAlchemyCircle.java deleted file mode 100644 index f2148ee2..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerAlchemyCircle.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity.layer; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -@SideOnly(Side.CLIENT) -public class LayerAlchemyCircle implements LayerRenderer -{ - private static final ResourceLocation ARRAY_TEXTURE = new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/FastMinerSigil.png"); - - float rotationspeed = 10; - - public LayerAlchemyCircle() - { - - } - - @Override - public void doRenderLayer(EntityCorruptedSheep demon, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - if (demon.getCastTimer() <= 0) - { - return; - } - - Tessellator tessellator = Tessellator.getInstance(); - VertexBuffer wr = tessellator.getBuffer(); - - GlStateManager.pushMatrix(); - float rot = (float) this.rotationspeed * (partialTicks + demon.ticksExisted); - float secondaryRot = 0; - - float size = 3.0F; - - // Bind the texture to the circle - Minecraft.getMinecraft().renderEngine.bindTexture(ARRAY_TEXTURE); - - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - GlStateManager.translate(0, 1.5, 0); - GlStateManager.rotate(90.0f, 1, 0, 0); - - GlStateManager.pushMatrix(); -// GlStateManager.translate(0, 0.5f, 0); - - GlStateManager.pushMatrix(); - GlStateManager.rotate(rot, 0, 0, 1); - GlStateManager.rotate(secondaryRot, 1, 0, 0); - GlStateManager.rotate(secondaryRot * 0.45812f, 0, 0, 1); - double var31 = 0.0D; - double var33 = 1.0D; - double var35 = 0; - double var37 = 1; - - GlStateManager.color(1f, 1f, 1f, 1f); - wr.begin(7, DefaultVertexFormats.POSITION_TEX); - // wr.setBrightness(200); - wr.pos(size / 2f, size / 2f, 0.0D).tex(var33, var37).endVertex(); - wr.pos(size / 2f, -size / 2f, 0.0D).tex(var33, var35).endVertex(); - wr.pos(-size / 2f, -size / 2f, 0.0D).tex(var31, var35).endVertex(); - wr.pos(-size / 2f, size / 2f, 0.0D).tex(var31, var37).endVertex(); - tessellator.draw(); - - GlStateManager.popMatrix(); - - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - - GlStateManager.popMatrix(); - GlStateManager.popMatrix(); - } - - @Override - public boolean shouldCombineTextures() - { - return false; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerCorruptedSheepWool.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerCorruptedSheepWool.java deleted file mode 100644 index d66c2ea3..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerCorruptedSheepWool.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity.layer; - -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.item.EnumDyeColor; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.entity.RenderCorruptedSheep; -import WayofTime.bloodmagic.client.render.model.ModelCorruptedSheep; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -@SideOnly(Side.CLIENT) -public class LayerCorruptedSheepWool implements LayerRenderer -{ - private static final ResourceLocation TEXTURE = new ResourceLocation("textures/entity/sheep/sheep_fur.png"); - private final RenderCorruptedSheep sheepRenderer; - private final ModelCorruptedSheep sheepModel = new ModelCorruptedSheep(1); - - public LayerCorruptedSheepWool(RenderCorruptedSheep renderCorruptedSheep) - { - this.sheepRenderer = renderCorruptedSheep; - } - - public void doRenderLayer(EntityCorruptedSheep entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - if (!entitylivingbaseIn.getSheared() && !entitylivingbaseIn.isInvisible()) - { - this.sheepRenderer.bindTexture(TEXTURE); - - if (entitylivingbaseIn.hasCustomName() && "jeb_".equals(entitylivingbaseIn.getCustomNameTag())) - { - int i1 = 25; - int i = entitylivingbaseIn.ticksExisted / 25 + entitylivingbaseIn.getEntityId(); - int j = EnumDyeColor.values().length; - int k = i % j; - int l = (i + 1) % j; - float f = ((float) (entitylivingbaseIn.ticksExisted % 25) + partialTicks) / 25.0F; - float[] afloat1 = EntityCorruptedSheep.getDyeRgb(EnumDyeColor.byMetadata(k)); - float[] afloat2 = EntityCorruptedSheep.getDyeRgb(EnumDyeColor.byMetadata(l)); - GlStateManager.color(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f); - } else - { - float[] afloat = EntityCorruptedSheep.getDyeRgb(entitylivingbaseIn.getFleeceColor()); - GlStateManager.color(afloat[0], afloat[1], afloat[2]); - } - - this.sheepModel.setModelAttributes(this.sheepRenderer.getMainModel()); - this.sheepModel.setLivingAnimations(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks); - this.sheepModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); - } - } - - public boolean shouldCombineTextures() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerCorruptedSpiderEyes.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerCorruptedSpiderEyes.java deleted file mode 100644 index 2101fae7..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerCorruptedSpiderEyes.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity.layer; - -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.client.render.entity.RenderCorruptedSpider; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider; - -@SideOnly(Side.CLIENT) -public class LayerCorruptedSpiderEyes implements LayerRenderer -{ - private static final ResourceLocation SPIDER_EYES = new ResourceLocation("textures/entity/spider_eyes.png"); - private final RenderCorruptedSpider spiderRenderer; - - public LayerCorruptedSpiderEyes(RenderCorruptedSpider spiderRendererIn) - { - this.spiderRenderer = spiderRendererIn; - } - - public void doRenderLayer(EntityCorruptedSpider entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - this.spiderRenderer.bindTexture(SPIDER_EYES); - GlStateManager.enableBlend(); - GlStateManager.disableAlpha(); - GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE); - - if (entitylivingbaseIn.isInvisible()) - { - GlStateManager.depthMask(false); - } else - { - GlStateManager.depthMask(true); - } - - int i = 61680; - int j = i % 65536; - int k = i / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j, (float) k); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - this.spiderRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); - i = entitylivingbaseIn.getBrightnessForRender(partialTicks); - j = i % 65536; - k = i / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j, (float) k); - this.spiderRenderer.setLightmap(entitylivingbaseIn, partialTicks); - GlStateManager.disableBlend(); - GlStateManager.enableAlpha(); - } - - public boolean shouldCombineTextures() - { - return false; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerWill.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerWill.java deleted file mode 100644 index 25d0913d..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/layer/LayerWill.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity.layer; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.entity.mob.EntityDemonBase; - -@SideOnly(Side.CLIENT) -public class LayerWill implements LayerRenderer -{ - private static final ResourceLocation RAW_TEXTURE = new ResourceLocation("bloodmagic", "textures/entities/overlay/overlay_raw.png"); - private final RenderLiving renderer; - private final ModelBase model; - - public LayerWill(RenderLiving rendererIn, ModelBase model) - { - this.renderer = rendererIn; - this.model = model; - } - - @Override - public void doRenderLayer(EntityDemonBase demon, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { -// if (demon.getPowered()) - - if (demon.isInvisible()) - { - return; //TODO: Make this also check if the demon wants the Will layer - } - - boolean flag = demon.isInvisible(); - GlStateManager.depthMask(!flag); - this.renderer.bindTexture(RAW_TEXTURE); - GlStateManager.matrixMode(5890); - GlStateManager.loadIdentity(); - float f = (float) demon.ticksExisted + partialTicks; - GlStateManager.translate(f * 0.01F, f * 0.01F, 0.0F); - GlStateManager.matrixMode(5888); - GlStateManager.enableBlend(); - float f1 = 0.5F; - GlStateManager.color(f1, f1, f1, 1.0F); - GlStateManager.disableLighting(); - GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE); - this.model.setModelAttributes(this.renderer.getMainModel()); - this.model.render(demon, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); - GlStateManager.matrixMode(5890); - GlStateManager.loadIdentity(); - GlStateManager.matrixMode(5888); - GlStateManager.enableLighting(); - GlStateManager.disableBlend(); - GlStateManager.depthMask(flag); - } - - @Override - public boolean shouldCombineTextures() - { - return false; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/package-info.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/package-info.java deleted file mode 100644 index fdf48817..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.render.entity; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/BakedCustomItemModel.java b/src/main/java/WayofTime/bloodmagic/client/render/model/BakedCustomItemModel.java deleted file mode 100644 index 4529d6f7..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/BakedCustomItemModel.java +++ /dev/null @@ -1,205 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.BlockBloodTank; -import WayofTime.bloodmagic.client.render.block.RenderBloodTank; -import WayofTime.bloodmagic.tile.TileBloodTank; -import com.google.common.collect.ImmutableMap; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; -import net.minecraft.client.renderer.block.model.ItemOverrideList; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.client.renderer.vertex.VertexFormat; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.client.model.IPerspectiveAwareModel; -import net.minecraftforge.common.model.TRSRTransformation; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fml.relauncher.ReflectionHelper; -import org.apache.commons.lang3.tuple.Pair; - -import javax.vecmath.Matrix4f; -import javax.vecmath.Vector3f; -import java.util.List; -import java.util.Map; - -/** - * Shamelessly taken off of the Mekanism repository written by {@author aidancbrady} - * https://github.com/aidancbrady/Mekanism - */ -public class BakedCustomItemModel implements IPerspectiveAwareModel -{ - private IBakedModel baseModel; - private ItemStack stack; - - private TransformType prevTransform; - - private static VertexFormat prevFormat = null; - private static int prevMode = -1; - - private static final RenderBloodTank tankRenderer = (RenderBloodTank) TileEntityRendererDispatcher.instance.mapSpecialRenderers.get(TileBloodTank.class); - - public BakedCustomItemModel(IBakedModel model, ItemStack stack) - { - this.baseModel = model; - this.stack = stack; - } - - private void doRender(TransformType transformType) - { - Block block = Block.getBlockFromItem(stack.getItem()); - - if (transformType == TransformType.GUI) - { - GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F); - } - - if (block instanceof BlockBloodTank) - { - GlStateManager.pushMatrix(); - - FluidStack fluid = null; - float capacity = TileBloodTank.CAPACITIES[stack.getItemDamage()] * Fluid.BUCKET_VOLUME; - int amount = 0; - if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.TANK)) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK); - fluid = FluidStack.loadFluidStackFromNBT(tag); - if (fluid != null) - amount = tag.getInteger("Amount"); - } - - if (fluid != null && amount > 0) - tankRenderer.renderFluid(amount / capacity, fluid.getFluid(), -0.498, -0.49, -0.498); - - GlStateManager.popMatrix(); - } - } - - @Override - public List getQuads(IBlockState state, EnumFacing side, long rand) - { - Tessellator tessellator = Tessellator.getInstance(); - pauseRenderer(tessellator); - - GlStateManager.pushMatrix(); - GlStateManager.translate(0.5F, 0.5F, 0.5F); - GlStateManager.rotate(180, 0.0F, 1.0F, 0.0F); - Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - doRender(prevTransform); - GlStateManager.enableLighting(); - GlStateManager.enableLight(0); - GlStateManager.enableLight(1); - GlStateManager.enableColorMaterial(); - GlStateManager.colorMaterial(1032, 5634); - GlStateManager.enableCull(); - GlStateManager.popMatrix(); - - resumeRenderer(tessellator); - - return baseModel.getQuads(state, side, rand); - } - - @Override - public boolean isAmbientOcclusion() - { - return baseModel.isAmbientOcclusion(); - } - - @Override - public boolean isGui3d() - { - return baseModel.isGui3d(); - } - - @Override - public boolean isBuiltInRenderer() - { - return baseModel.isBuiltInRenderer(); - } - - @Override - public TextureAtlasSprite getParticleTexture() - { - return baseModel.getParticleTexture(); - } - - @Override - public ItemCameraTransforms getItemCameraTransforms() - { - return baseModel.getItemCameraTransforms(); - } - - private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s) - { - return new TRSRTransformation(new Vector3f(tx / 16, ty / 16, tz / 16), TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), new Vector3f(s, s, s), null); - } - - public static Map transforms = ImmutableMap.builder() - .put(TransformType.GUI, get(0, 0, 0, 30F, 225F, 0, 0.625F)) - .put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5F, 0, 75F, 45F, 0, 0.375F)) - .put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5F, 0, 75F, 45F, 0, 0.375F)) - .put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45F, 0, 0.4f)) - .put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225F, 0, 0.4F)) - .put(TransformType.GROUND, get(0, 2F, 0, 0, 0, 0, 0.25F)) - .put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1F)) - .put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1F)) - .put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0)) - .build(); - - @Override - public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) - { - prevTransform = cameraTransformType; - return Pair.of(this, transforms.get(cameraTransformType).getMatrix()); - } - - @Override - public ItemOverrideList getOverrides() - { - return ItemOverrideList.NONE; - } - - public static void pauseRenderer(Tessellator tess) - { - if (isDrawing(tess)) - { - prevFormat = tess.getBuffer().getVertexFormat(); - prevMode = tess.getBuffer().getDrawMode(); - tess.draw(); - } - } - - public static void resumeRenderer(Tessellator tess) - { - if (prevFormat != null) - { - tess.getBuffer().begin(prevMode, prevFormat); - } - - prevFormat = null; - prevMode = -1; - } - - public static boolean isDrawing(Tessellator tess) - { - return isDrawing(tess.getBuffer()); - } - - public static boolean isDrawing(VertexBuffer buffer) - { - return (Boolean) ReflectionHelper.getPrivateValue(VertexBuffer.class, buffer, "isDrawing", "field_179010_r"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/CustomModelFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/model/CustomModelFactory.java deleted file mode 100644 index cddd3773..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/CustomModelFactory.java +++ /dev/null @@ -1,80 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.*; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class CustomModelFactory implements IBakedModel -{ - private IBakedModel baseModel; - - private BlockOverrideList override = new BlockOverrideList(); - - public CustomModelFactory(IBakedModel base) - { - baseModel = base; - } - - @Override - public ItemOverrideList getOverrides() - { - return override; - } - - @Override - public List getQuads(IBlockState state, EnumFacing facing, long rand) - { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isAmbientOcclusion() - { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isGui3d() - { - return baseModel.isGui3d(); - } - - @Override - public boolean isBuiltInRenderer() - { - throw new UnsupportedOperationException(); - } - - @Override - public TextureAtlasSprite getParticleTexture() - { - throw new UnsupportedOperationException(); - } - - @Override - public ItemCameraTransforms getItemCameraTransforms() - { - throw new UnsupportedOperationException(); - } - - private class BlockOverrideList extends ItemOverrideList - { - public BlockOverrideList() - { - super(new ArrayList()); - } - - @Override - public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity) - { - return new BakedCustomItemModel(baseModel, stack); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedChicken.java b/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedChicken.java deleted file mode 100644 index 8b498781..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedChicken.java +++ /dev/null @@ -1,108 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelCorruptedChicken extends ModelBase -{ - public ModelRenderer head; - public ModelRenderer body; - public ModelRenderer rightLeg; - public ModelRenderer leftLeg; - public ModelRenderer rightWing; - public ModelRenderer leftWing; - public ModelRenderer bill; - public ModelRenderer chin; - - public ModelCorruptedChicken(float scale) - { - this.head = new ModelRenderer(this, 0, 0); - this.head.addBox(-2.0F, -6.0F, -2.0F, 4, 6, 3, scale); - this.head.setRotationPoint(0.0F, 15.0F, -4.0F); - this.bill = new ModelRenderer(this, 14, 0); - this.bill.addBox(-2.0F, -4.0F, -4.0F, 4, 2, 2, scale); - this.bill.setRotationPoint(0.0F, 15.0F, -4.0F); - this.chin = new ModelRenderer(this, 14, 4); - this.chin.addBox(-1.0F, -2.0F, -3.0F, 2, 2, 2, scale); - this.chin.setRotationPoint(0.0F, 15.0F, -4.0F); - this.body = new ModelRenderer(this, 0, 9); - this.body.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, scale); - this.body.setRotationPoint(0.0F, 16.0F, 0.0F); - this.rightLeg = new ModelRenderer(this, 26, 0); - this.rightLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3, scale); - this.rightLeg.setRotationPoint(-2.0F, 19.0F, 1.0F); - this.leftLeg = new ModelRenderer(this, 26, 0); - this.leftLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3, scale); - this.leftLeg.setRotationPoint(1.0F, 19.0F, 1.0F); - this.rightWing = new ModelRenderer(this, 24, 13); - this.rightWing.addBox(0.0F, 0.0F, -3.0F, 1, 4, 6, scale); - this.rightWing.setRotationPoint(-4.0F, 13.0F, 0.0F); - this.leftWing = new ModelRenderer(this, 24, 13); - this.leftWing.addBox(-1.0F, 0.0F, -3.0F, 1, 4, 6, scale); - this.leftWing.setRotationPoint(4.0F, 13.0F, 0.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn); - - if (this.isChild) - { - GlStateManager.pushMatrix(); - GlStateManager.translate(0.0F, 5.0F * scale, 2.0F * scale); - this.head.render(scale); - this.bill.render(scale); - this.chin.render(scale); - GlStateManager.popMatrix(); - GlStateManager.pushMatrix(); - GlStateManager.scale(0.5F, 0.5F, 0.5F); - GlStateManager.translate(0.0F, 24.0F * scale, 0.0F); - this.body.render(scale); - this.rightLeg.render(scale); - this.leftLeg.render(scale); - this.rightWing.render(scale); - this.leftWing.render(scale); - GlStateManager.popMatrix(); - } else - { - this.head.render(scale); - this.bill.render(scale); - this.chin.render(scale); - this.body.render(scale); - this.rightLeg.render(scale); - this.leftLeg.render(scale); - this.rightWing.render(scale); - this.leftWing.render(scale); - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are - * used for animating the movement of arms and legs, where par1 represents - * the time(so that arms and legs swing back and forth) and par2 represents - * how "far" arms and legs can swing at most. - */ - public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) - { - this.head.rotateAngleX = headPitch * 0.017453292F; - this.head.rotateAngleY = netHeadYaw * 0.017453292F; - this.bill.rotateAngleX = this.head.rotateAngleX; - this.bill.rotateAngleY = this.head.rotateAngleY; - this.chin.rotateAngleX = this.head.rotateAngleX; - this.chin.rotateAngleY = this.head.rotateAngleY; - this.body.rotateAngleX = ((float) Math.PI / 2F); - this.rightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount; - this.leftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float) Math.PI) * 1.4F * limbSwingAmount; - this.rightWing.rotateAngleZ = ageInTicks; - this.leftWing.rotateAngleZ = -ageInTicks; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSheep.java b/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSheep.java deleted file mode 100644 index 6e631c50..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSheep.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.client.model.ModelQuadruped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -@SideOnly(Side.CLIENT) -public class ModelCorruptedSheep extends ModelQuadruped -{ - private float headRotationAngleX; - - public ModelCorruptedSheep(float scale) - { - super(12, scale); - this.head = new ModelRenderer(this, 0, 0); - this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F * scale); - this.head.setRotationPoint(0.0F, 6.0F, -8.0F); - this.body = new ModelRenderer(this, 28, 8); - this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 1.75F * scale); - this.body.setRotationPoint(0.0F, 5.0F, 2.0F); - float f = 0.5F; - this.leg1 = new ModelRenderer(this, 0, 16); - this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F * scale); - this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F); - this.leg2 = new ModelRenderer(this, 0, 16); - this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F * scale); - this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F); - this.leg3 = new ModelRenderer(this, 0, 16); - this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F * scale); - this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F); - this.leg4 = new ModelRenderer(this, 0, 16); - this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F * scale); - this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F); - } - - /** - * Used for easily adding entity-dependent animations. The second and third - * float params here are the same second and third as in the - * setRotationAngles method. - */ - public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime) - { - super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime); - this.head.rotationPointY = 6.0F + ((EntityCorruptedSheep) entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F; - this.headRotationAngleX = ((EntityCorruptedSheep) entitylivingbaseIn).getHeadRotationAngleX(partialTickTime); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are - * used for animating the movement of arms and legs, where par1 represents - * the time(so that arms and legs swing back and forth) and par2 represents - * how "far" arms and legs can swing at most. - */ - public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) - { - super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn); - this.head.rotateAngleX = this.headRotationAngleX; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSheep2.java b/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSheep2.java deleted file mode 100644 index f9f5ec19..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSheep2.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.client.model.ModelQuadruped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -@SideOnly(Side.CLIENT) -public class ModelCorruptedSheep2 extends ModelQuadruped -{ - private float headRotationAngleX; - - public ModelCorruptedSheep2(float scale) - { - super(12, scale); - this.head = new ModelRenderer(this, 0, 0); - this.head.addBox(-3.0F, -4.0F, -6.0F, 6, 6, 8, scale); - this.head.setRotationPoint(0.0F, 6.0F, -8.0F); - this.body = new ModelRenderer(this, 28, 8); - this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, scale); - this.body.setRotationPoint(0.0F, 5.0F, 2.0F); - } - - /** - * Used for easily adding entity-dependent animations. The second and third - * float params here are the same second and third as in the - * setRotationAngles method. - */ - public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime) - { - super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime); - this.head.rotationPointY = 6.0F + ((EntityCorruptedSheep) entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F; - this.headRotationAngleX = ((EntityCorruptedSheep) entitylivingbaseIn).getHeadRotationAngleX(partialTickTime); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are - * used for animating the movement of arms and legs, where par1 represents - * the time(so that arms and legs swing back and forth) and par2 represents - * how "far" arms and legs can swing at most. - */ - public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) - { - super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn); - this.head.rotateAngleX = this.headRotationAngleX; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSpider.java b/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSpider.java deleted file mode 100644 index 4c000ba8..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelCorruptedSpider.java +++ /dev/null @@ -1,148 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelCorruptedSpider extends ModelBase -{ - /** The spider's head box */ - public ModelRenderer spiderHead; - /** The spider's neck box */ - public ModelRenderer spiderNeck; - /** The spider's body box */ - public ModelRenderer spiderBody; - /** Spider's first leg */ - public ModelRenderer spiderLeg1; - /** Spider's second leg */ - public ModelRenderer spiderLeg2; - /** Spider's third leg */ - public ModelRenderer spiderLeg3; - /** Spider's fourth leg */ - public ModelRenderer spiderLeg4; - /** Spider's fifth leg */ - public ModelRenderer spiderLeg5; - /** Spider's sixth leg */ - public ModelRenderer spiderLeg6; - /** Spider's seventh leg */ - public ModelRenderer spiderLeg7; - /** Spider's eight leg */ - public ModelRenderer spiderLeg8; - - public ModelCorruptedSpider(float scale) - { - float f = 0.0F; - int i = 15; - this.spiderHead = new ModelRenderer(this, 32, 4); - this.spiderHead.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 8, scale); - this.spiderHead.setRotationPoint(0.0F, 15.0F, -3.0F); - this.spiderNeck = new ModelRenderer(this, 0, 0); - this.spiderNeck.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, scale); - this.spiderNeck.setRotationPoint(0.0F, 15.0F, 0.0F); - this.spiderBody = new ModelRenderer(this, 0, 12); - this.spiderBody.addBox(-5.0F, -4.0F, -6.0F, 10, 8, 12, scale); - this.spiderBody.setRotationPoint(0.0F, 15.0F, 9.0F); - this.spiderLeg1 = new ModelRenderer(this, 18, 0); - this.spiderLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg1.setRotationPoint(-4.0F, 15.0F, 2.0F); - this.spiderLeg2 = new ModelRenderer(this, 18, 0); - this.spiderLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg2.setRotationPoint(4.0F, 15.0F, 2.0F); - this.spiderLeg3 = new ModelRenderer(this, 18, 0); - this.spiderLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg3.setRotationPoint(-4.0F, 15.0F, 1.0F); - this.spiderLeg4 = new ModelRenderer(this, 18, 0); - this.spiderLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg4.setRotationPoint(4.0F, 15.0F, 1.0F); - this.spiderLeg5 = new ModelRenderer(this, 18, 0); - this.spiderLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg5.setRotationPoint(-4.0F, 15.0F, 0.0F); - this.spiderLeg6 = new ModelRenderer(this, 18, 0); - this.spiderLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg6.setRotationPoint(4.0F, 15.0F, 0.0F); - this.spiderLeg7 = new ModelRenderer(this, 18, 0); - this.spiderLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg7.setRotationPoint(-4.0F, 15.0F, -1.0F); - this.spiderLeg8 = new ModelRenderer(this, 18, 0); - this.spiderLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, scale); - this.spiderLeg8.setRotationPoint(4.0F, 15.0F, -1.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn); - this.spiderHead.render(scale); - this.spiderNeck.render(scale); - this.spiderBody.render(scale); - this.spiderLeg1.render(scale); - this.spiderLeg2.render(scale); - this.spiderLeg3.render(scale); - this.spiderLeg4.render(scale); - this.spiderLeg5.render(scale); - this.spiderLeg6.render(scale); - this.spiderLeg7.render(scale); - this.spiderLeg8.render(scale); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are - * used for animating the movement of arms and legs, where par1 represents - * the time(so that arms and legs swing back and forth) and par2 represents - * how "far" arms and legs can swing at most. - */ - public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) - { - this.spiderHead.rotateAngleY = netHeadYaw * 0.017453292F; - this.spiderHead.rotateAngleX = headPitch * 0.017453292F; - float f = ((float) Math.PI / 4F); - this.spiderLeg1.rotateAngleZ = -((float) Math.PI / 4F); - this.spiderLeg2.rotateAngleZ = ((float) Math.PI / 4F); - this.spiderLeg3.rotateAngleZ = -0.58119464F; - this.spiderLeg4.rotateAngleZ = 0.58119464F; - this.spiderLeg5.rotateAngleZ = -0.58119464F; - this.spiderLeg6.rotateAngleZ = 0.58119464F; - this.spiderLeg7.rotateAngleZ = -((float) Math.PI / 4F); - this.spiderLeg8.rotateAngleZ = ((float) Math.PI / 4F); - float f1 = -0.0F; - float f2 = 0.3926991F; - this.spiderLeg1.rotateAngleY = ((float) Math.PI / 4F); - this.spiderLeg2.rotateAngleY = -((float) Math.PI / 4F); - this.spiderLeg3.rotateAngleY = 0.3926991F; - this.spiderLeg4.rotateAngleY = -0.3926991F; - this.spiderLeg5.rotateAngleY = -0.3926991F; - this.spiderLeg6.rotateAngleY = 0.3926991F; - this.spiderLeg7.rotateAngleY = -((float) Math.PI / 4F); - this.spiderLeg8.rotateAngleY = ((float) Math.PI / 4F); - float f3 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount; - float f4 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + (float) Math.PI) * 0.4F) * limbSwingAmount; - float f5 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float) Math.PI / 2F)) * 0.4F) * limbSwingAmount; - float f6 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float) Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount; - float f7 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + 0.0F) * 0.4F) * limbSwingAmount; - float f8 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + (float) Math.PI) * 0.4F) * limbSwingAmount; - float f9 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float) Math.PI / 2F)) * 0.4F) * limbSwingAmount; - float f10 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float) Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount; - this.spiderLeg1.rotateAngleY += f3; - this.spiderLeg2.rotateAngleY += -f3; - this.spiderLeg3.rotateAngleY += f4; - this.spiderLeg4.rotateAngleY += -f4; - this.spiderLeg5.rotateAngleY += f5; - this.spiderLeg6.rotateAngleY += -f5; - this.spiderLeg7.rotateAngleY += f6; - this.spiderLeg8.rotateAngleY += -f6; - this.spiderLeg1.rotateAngleZ += f7; - this.spiderLeg2.rotateAngleZ += -f7; - this.spiderLeg3.rotateAngleZ += f8; - this.spiderLeg4.rotateAngleZ += -f8; - this.spiderLeg5.rotateAngleZ += f9; - this.spiderLeg6.rotateAngleZ += -f9; - this.spiderLeg7.rotateAngleZ += f10; - this.spiderLeg8.rotateAngleZ += -f10; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelMeteor.java b/src/main/java/WayofTime/bloodmagic/client/render/model/ModelMeteor.java deleted file mode 100644 index 3e62353c..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelMeteor.java +++ /dev/null @@ -1,95 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * This is a direct copy of the meteor model from 1.7.10. As such it probably - * needs to be... better. - * - */ -public class ModelMeteor extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - - public ModelMeteor() - { - textureWidth = 64; - textureHeight = 64; - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(-8F, -8F, -8F, 16, 16, 16); - Shape1.setRotationPoint(0F, 0F, 0F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 32); - Shape2.addBox(3F, -10F, -1F, 12, 12, 12); - Shape2.setRotationPoint(0F, 0F, 0F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 32); - Shape3.addBox(0F, 0F, -10F, 12, 12, 12); - Shape3.setRotationPoint(0F, 0F, 0F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 32); - Shape4.addBox(1F, 2F, 2F, 12, 12, 12); - Shape4.setRotationPoint(0F, 0F, 0F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 32); - Shape5.addBox(-12F, -5F, 0F, 12, 12, 12); - Shape5.setRotationPoint(0F, 0F, 0F); - Shape5.setTextureSize(64, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 32); - Shape6.addBox(-13F, -2F, -11F, 12, 12, 12); - Shape6.setRotationPoint(0F, 0F, 0F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 32); - Shape7.addBox(-6F, -14F, -9F, 12, 12, 12); - Shape7.setRotationPoint(0F, 0F, 0F); - Shape7.setTextureSize(64, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelMimic.java b/src/main/java/WayofTime/bloodmagic/client/render/model/ModelMimic.java deleted file mode 100644 index cc1d3914..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/model/ModelMimic.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.client.render.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelMimic extends ModelBase -{ - /** Spider's first leg */ - public ModelRenderer mimicLeg1; - /** Spider's second leg */ - public ModelRenderer mimicLeg2; - /** Spider's third leg */ - public ModelRenderer mimicLeg3; - /** Spider's fourth leg */ - public ModelRenderer mimicLeg4; - /** Spider's fifth leg */ - public ModelRenderer mimicLeg5; - /** Spider's sixth leg */ - public ModelRenderer mimicLeg6; - /** Spider's seventh leg */ - public ModelRenderer mimicLeg7; - /** Spider's eight leg */ - public ModelRenderer mimicLeg8; - - public ModelMimic() - { - this.mimicLeg1 = new ModelRenderer(this, 18, 0); - this.mimicLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg1.setRotationPoint(-4.0F, 15.0F, 2.0F); - this.mimicLeg2 = new ModelRenderer(this, 18, 0); - this.mimicLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg2.setRotationPoint(4.0F, 15.0F, 2.0F); - this.mimicLeg3 = new ModelRenderer(this, 18, 0); - this.mimicLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg3.setRotationPoint(-4.0F, 15.0F, 1.0F); - this.mimicLeg4 = new ModelRenderer(this, 18, 0); - this.mimicLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg4.setRotationPoint(4.0F, 15.0F, 1.0F); - this.mimicLeg5 = new ModelRenderer(this, 18, 0); - this.mimicLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg5.setRotationPoint(-4.0F, 15.0F, 0.0F); - this.mimicLeg6 = new ModelRenderer(this, 18, 0); - this.mimicLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg6.setRotationPoint(4.0F, 15.0F, 0.0F); - this.mimicLeg7 = new ModelRenderer(this, 18, 0); - this.mimicLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg7.setRotationPoint(-4.0F, 15.0F, -1.0F); - this.mimicLeg8 = new ModelRenderer(this, 18, 0); - this.mimicLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F); - this.mimicLeg8.setRotationPoint(4.0F, 15.0F, -1.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) - { - this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn); - this.mimicLeg1.render(scale); - this.mimicLeg2.render(scale); - this.mimicLeg3.render(scale); - this.mimicLeg4.render(scale); - this.mimicLeg5.render(scale); - this.mimicLeg6.render(scale); - this.mimicLeg7.render(scale); - this.mimicLeg8.render(scale); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are - * used for animating the movement of arms and legs, where par1 represents - * the time(so that arms and legs swing back and forth) and par2 represents - * how "far" arms and legs can swing at most. - */ - public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) - { - this.mimicLeg1.rotateAngleZ = -((float) Math.PI / 4F); - this.mimicLeg2.rotateAngleZ = ((float) Math.PI / 4F); - this.mimicLeg3.rotateAngleZ = -0.58119464F; - this.mimicLeg4.rotateAngleZ = 0.58119464F; - this.mimicLeg5.rotateAngleZ = -0.58119464F; - this.mimicLeg6.rotateAngleZ = 0.58119464F; - this.mimicLeg7.rotateAngleZ = -((float) Math.PI / 4F); - this.mimicLeg8.rotateAngleZ = ((float) Math.PI / 4F); - - this.mimicLeg1.rotateAngleY = ((float) Math.PI / 4F); - this.mimicLeg2.rotateAngleY = -((float) Math.PI / 4F); - this.mimicLeg3.rotateAngleY = 0.3926991F; - this.mimicLeg4.rotateAngleY = -0.3926991F; - this.mimicLeg5.rotateAngleY = -0.3926991F; - this.mimicLeg6.rotateAngleY = 0.3926991F; - this.mimicLeg7.rotateAngleY = -((float) Math.PI / 4F); - this.mimicLeg8.rotateAngleY = ((float) Math.PI / 4F); - float f3 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount; - float f4 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + (float) Math.PI) * 0.4F) * limbSwingAmount; - float f5 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float) Math.PI / 2F)) * 0.4F) * limbSwingAmount; - float f6 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float) Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount; - float f7 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + 0.0F) * 0.4F) * limbSwingAmount; - float f8 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + (float) Math.PI) * 0.4F) * limbSwingAmount; - float f9 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float) Math.PI / 2F)) * 0.4F) * limbSwingAmount; - float f10 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float) Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount; - this.mimicLeg1.rotateAngleY += f3; - this.mimicLeg2.rotateAngleY += -f3; - this.mimicLeg3.rotateAngleY += f4; - this.mimicLeg4.rotateAngleY += -f4; - this.mimicLeg5.rotateAngleY += f5; - this.mimicLeg6.rotateAngleY += -f5; - this.mimicLeg7.rotateAngleY += f6; - this.mimicLeg8.rotateAngleY += -f6; - this.mimicLeg1.rotateAngleZ += f7; - this.mimicLeg2.rotateAngleZ += -f7; - this.mimicLeg3.rotateAngleZ += f8; - this.mimicLeg4.rotateAngleZ += -f8; - this.mimicLeg5.rotateAngleZ += f9; - this.mimicLeg6.rotateAngleZ += -f9; - this.mimicLeg7.rotateAngleZ += f10; - this.mimicLeg8.rotateAngleZ += -f10; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/package-info.java b/src/main/java/WayofTime/bloodmagic/client/render/package-info.java deleted file mode 100644 index e465b881..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.client.render; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java b/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java deleted file mode 100644 index a8e5b6a5..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.command; - -import WayofTime.bloodmagic.command.sub.SubCommandBind; -import WayofTime.bloodmagic.command.sub.SubCommandHelp; -import WayofTime.bloodmagic.command.sub.SubCommandNetwork; -import WayofTime.bloodmagic.command.sub.SubCommandOrb; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommandSender; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; - -import java.util.*; - -public class CommandBloodMagic extends CommandBase -{ - // TODO - Move this and sub commands to CommandTreeBase in 1.11. Much cleaner impl - private final List aliases = new ArrayList(); - private final Map subCommands = new HashMap(); - - public CommandBloodMagic() - { - aliases.add("BloodMagic"); - aliases.add("bloodmagic"); - aliases.add("bloodMagic"); - aliases.add("bm"); - - subCommands.put("help", new SubCommandHelp(this)); - subCommands.put("network", new SubCommandNetwork(this)); - subCommands.put("bind", new SubCommandBind(this)); - subCommands.put("orb", new SubCommandOrb(this)); - } - - @Override - public String getCommandName() - { - return "/bloodmagic"; - } - - @Override - public int getRequiredPermissionLevel() - { - return 2; - } - - @Override - public String getCommandUsage(ICommandSender commandSender) - { - return getCommandName() + " help"; - } - - @Override - public List getCommandAliases() - { - return aliases; - } - - @Override - public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) - { - if (args.length > 0 && subCommands.containsKey(args[0])) - { - - ISubCommand subCommand = subCommands.get(args[0]); - String[] subArgs = Arrays.copyOfRange(args, 1, args.length); - subCommand.processSubCommand(server, commandSender, subArgs); - } else - { - commandSender.addChatMessage(new TextComponentString(TextHelper.localizeEffect("commands.error.unknown"))); - } - } - - public Map getSubCommands() - { - return subCommands; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java b/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java deleted file mode 100644 index e8d95798..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.bloodmagic.command; - -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.server.MinecraftServer; - -public interface ISubCommand -{ - - String getSubCommandName(); - - ICommand getParentCommand(); - - String getArgUsage(ICommandSender commandSender); - - String getHelpText(); - - void processSubCommand(MinecraftServer server, ICommandSender commandSender, String[] args); -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java b/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java deleted file mode 100644 index 0130f955..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java +++ /dev/null @@ -1,70 +0,0 @@ -package WayofTime.bloodmagic.command; - -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; - -import java.util.Locale; - -public abstract class SubCommandBase implements ISubCommand -{ - - private ICommand parent; - private String name; - - public SubCommandBase(ICommand parent, String name) - { - this.parent = parent; - this.name = name; - } - - @Override - public String getSubCommandName() - { - return name; - } - - @Override - public ICommand getParentCommand() - { - return parent; - } - - @Override - public void processSubCommand(MinecraftServer server, ICommandSender commandSender, String[] args) - { - - if (args.length == 0 && !getSubCommandName().equals("help")) - displayErrorString(commandSender, String.format(TextHelper.localizeEffect("commands.format.error"), capitalizeFirstLetter(getSubCommandName()), getArgUsage(commandSender))); - - if (isBounded(0, 2, args.length) && args[0].equals("help")) - displayHelpString(commandSender, String.format(TextHelper.localizeEffect("commands.format.help"), capitalizeFirstLetter(getSubCommandName()), getHelpText())); - } - - protected String capitalizeFirstLetter(String toCapital) - { - return String.valueOf(toCapital.charAt(0)).toUpperCase(Locale.ENGLISH) + toCapital.substring(1); - } - - protected boolean isBounded(int low, int high, int given) - { - return given > low && given < high; - } - - public static void displayHelpString(ICommandSender commandSender, String display, Object... info) - { - commandSender.addChatMessage(new TextComponentString(TextHelper.localizeEffect(display, info))); - } - - public static void displayErrorString(ICommandSender commandSender, String display, Object... info) - { - commandSender.addChatMessage(new TextComponentString(TextHelper.localizeEffect(display, info))); - } - - public static void displaySuccessString(ICommandSender commandSender, String display, Object... info) - { - commandSender.addChatMessage(new TextComponentString(TextHelper.localizeEffect(display, info))); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/command/package-info.java b/src/main/java/WayofTime/bloodmagic/command/package-info.java deleted file mode 100644 index bdfb59bd..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.command; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java deleted file mode 100644 index 755bea76..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java +++ /dev/null @@ -1,101 +0,0 @@ -package WayofTime.bloodmagic.command.sub; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.util.helper.BindableHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.command.SubCommandBase; -import WayofTime.bloodmagic.util.helper.TextHelper; -import com.google.common.base.Strings; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.command.PlayerNotFoundException; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentTranslation; - -public class SubCommandBind extends SubCommandBase -{ - - public SubCommandBind(ICommand parent) - { - super(parent, "bind"); - } - - @Override - public String getArgUsage(ICommandSender commandSender) - { - return TextHelper.localizeEffect("commands.bind.usage"); - } - - @Override - public String getHelpText() - { - return TextHelper.localizeEffect("commands.bind.help"); - } - - @Override - public void processSubCommand(MinecraftServer server, ICommandSender commandSender, String[] args) - { - super.processSubCommand(server, commandSender, args); - - if (commandSender.getEntityWorld().isRemote) - return; - - try - { - EntityPlayer player = CommandBase.getCommandSenderAsPlayer(commandSender); - String playerName = player.getName(); - String uuid = PlayerHelper.getUUIDFromPlayer(player).toString(); - ItemStack held = player.getHeldItemMainhand(); - boolean bind = true; - - if (held != null && held.getItem() instanceof IBindable) - { - if (args.length > 0) - { - - if (args[0].equalsIgnoreCase("help")) - return; - - if (isBoolean(args[0])) - { - bind = Boolean.parseBoolean(args[0]); - - if (args.length > 2) - playerName = args[1]; - } else - { - playerName = args[0]; - uuid = PlayerHelper.getUUIDFromPlayer(CommandBase.getPlayer(server, commandSender, playerName)).toString(); - } - } - - if (bind) - { - BindableHelper.setItemOwnerName(held, playerName); - BindableHelper.setItemOwnerUUID(held, uuid); - commandSender.addChatMessage(new TextComponentTranslation("commands.bind.success")); - } else - { - if (!Strings.isNullOrEmpty(((IBindable) held.getItem()).getOwnerUUID(held))) - { - held.getTagCompound().removeTag(Constants.NBT.OWNER_UUID); - held.getTagCompound().removeTag(Constants.NBT.OWNER_NAME); - commandSender.addChatMessage(new TextComponentTranslation("commands.bind.remove.success")); - } - } - } - } catch (PlayerNotFoundException e) - { - commandSender.addChatMessage(new TextComponentTranslation(TextHelper.localizeEffect("commands.error.404"))); - } - } - - private boolean isBoolean(String string) - { - return string.equalsIgnoreCase("true") || string.equalsIgnoreCase("false"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java deleted file mode 100644 index 22dfd1d6..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.bloodmagic.command.sub; - -import WayofTime.bloodmagic.command.CommandBloodMagic; -import WayofTime.bloodmagic.command.ISubCommand; -import WayofTime.bloodmagic.command.SubCommandBase; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; - -public class SubCommandHelp extends SubCommandBase -{ - - public SubCommandHelp(ICommand parent) - { - super(parent, "help"); - } - - @Override - public String getArgUsage(ICommandSender commandSender) - { - return TextHelper.localize("commands.help.usage"); - } - - @Override - public String getHelpText() - { - return TextHelper.localizeEffect("commands.help.help"); - } - - @Override - public void processSubCommand(MinecraftServer server, ICommandSender commandSender, String[] args) - { - super.processSubCommand(server, commandSender, args); - - if (args.length > 0) - return; - - for (ISubCommand subCommand : ((CommandBloodMagic) getParentCommand()).getSubCommands().values()) - commandSender.addChatMessage(new TextComponentString(TextHelper.localizeEffect("commands.format.help", capitalizeFirstLetter(subCommand.getSubCommandName()), subCommand.getArgUsage(commandSender)))); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java deleted file mode 100644 index 0cee7b82..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java +++ /dev/null @@ -1,231 +0,0 @@ -package WayofTime.bloodmagic.command.sub; - -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.command.SubCommandBase; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.command.PlayerNotFoundException; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; - -import java.util.Locale; - -public class SubCommandNetwork extends SubCommandBase -{ - - public SubCommandNetwork(ICommand parent) - { - super(parent, "network"); - } - - @Override - public String getArgUsage(ICommandSender commandSender) - { - return TextHelper.localizeEffect("commands.network.usage"); - } - - @Override - public String getHelpText() - { - return TextHelper.localizeEffect("commands.network.help"); - } - - @Override - public void processSubCommand(MinecraftServer server, ICommandSender commandSender, String[] args) - { - super.processSubCommand(server, commandSender, args); - - if (args.length > 1) - { - if (args[0].equalsIgnoreCase("help")) - return; - - try - { - EntityPlayer player = CommandBase.getPlayer(server, commandSender, args[1]); - - try - { - ValidCommands command = ValidCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH)); - command.run(player, commandSender, isBounded(0, 2, args.length), args); - } catch (IllegalArgumentException e) - { - - } - } catch (PlayerNotFoundException e) - { - displayErrorString(commandSender, e.getLocalizedMessage()); - } - } else - { - displayErrorString(commandSender, "commands.error.arg.missing"); - } - } - - private enum ValidCommands - { - SYPHON("commands.network.syphon.help") - { - @Override - public void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args) - { - if (displayHelp) - { - displayHelpString(sender, this.help); - return; - } - - if (args.length == 3) - { - if (Utils.isInteger(args[2])) - { - int amount = Integer.parseInt(args[2]); - NetworkHelper.syphonAndDamage(NetworkHelper.getSoulNetwork(player), player, amount); - displaySuccessString(sender, "commands.network.syphon.success", amount, player.getDisplayName().getFormattedText()); - } else - { - displayErrorString(sender, "commands.error.arg.invalid"); - } - } else - { - displayErrorString(sender, "commands.error.arg.missing"); - } - } - }, - ADD("commands.network.add.help") - { - @Override - public void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args) - { - if (displayHelp) - { - displayHelpString(sender, this.help); - return; - } - - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - - if (args.length == 3) - { - if (Utils.isInteger(args[2])) - { - int amount = Integer.parseInt(args[2]); - int maxOrb = NetworkHelper.getMaximumForTier(network.getOrbTier()); - displaySuccessString(sender, "commands.network.add.success", network.add(amount, maxOrb), player.getDisplayName().getFormattedText()); - } else - { - displayErrorString(sender, "commands.error.arg.invalid"); - } - } else - { - displayErrorString(sender, "commands.error.arg.missing"); - } - } - }, - SET("commands.network.set.help") - { - @Override - public void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args) - { - if (displayHelp) - { - displayHelpString(sender, this.help); - return; - } - - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - - if (args.length == 3) - { - if (Utils.isInteger(args[2])) - { - int amount = Integer.parseInt(args[2]); - network.setCurrentEssence(amount); - displaySuccessString(sender, "commands.network.set.success", player.getDisplayName().getFormattedText(), amount); - } else - { - displayErrorString(sender, "commands.error.arg.invalid"); - } - } else - { - displayErrorString(sender, "commands.error.arg.missing"); - } - } - }, - GET("commands.network.get.help") - { - @Override - public void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args) - { - if (displayHelp) - { - displayHelpString(sender, this.help); - return; - } - - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - - if (args.length > 1) - sender.addChatMessage(new TextComponentString(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.divination.currentEssence", network.getCurrentEssence()))); - - } - }, - FILL("commands.network.fill.help") - { - @Override - public void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args) - { - if (displayHelp) - { - displayHelpString(sender, this.help, Integer.MAX_VALUE); - return; - } - - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - - if (args.length > 1) - { - network.setCurrentEssence(Integer.MAX_VALUE); - displaySuccessString(sender, "commands.network.fill.success", player.getDisplayName().getFormattedText()); - } - } - }, - CAP("commands.network.cap.help") - { - @Override - public void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args) - { - if (displayHelp) - { - displayHelpString(sender, this.help); - return; - } - - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - - if (args.length > 1) - { - int maxOrb = NetworkHelper.getMaximumForTier(network.getOrbTier()); - network.setCurrentEssence(maxOrb); - displaySuccessString(sender, "commands.network.cap.success", player.getDisplayName().getFormattedText()); - } - } - }, - ; - - public String help; - - ValidCommands(String help) - { - this.help = help; - } - - public abstract void run(EntityPlayer player, ICommandSender sender, boolean displayHelp, String... args); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java deleted file mode 100644 index e66fbdb7..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java +++ /dev/null @@ -1,130 +0,0 @@ -package WayofTime.bloodmagic.command.sub; - -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.command.SubCommandBase; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.command.PlayerNotFoundException; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; - -import java.util.Locale; - -public class SubCommandOrb extends SubCommandBase -{ - - public SubCommandOrb(ICommand parent) - { - super(parent, "orb"); - } - - @Override - public String getArgUsage(ICommandSender commandSender) - { - return TextHelper.localizeEffect("commands.orb.usage"); - } - - @Override - public String getHelpText() - { - return TextHelper.localizeEffect("commands.orb.help"); - } - - @Override - public void processSubCommand(MinecraftServer server, ICommandSender commandSender, String[] args) - { - super.processSubCommand(server, commandSender, args); - - if (args.length > 0) - { - - if (args[0].equalsIgnoreCase("help")) - return; - - try - { - String givenName = commandSender.getName(); - - if (args.length > 1) - givenName = args[1]; - - EntityPlayer player = CommandBase.getPlayer(server, commandSender, givenName); - String uuid = PlayerHelper.getUUIDFromPlayer(player).toString(); - SoulNetwork network = NetworkHelper.getSoulNetwork(uuid); - - boolean displayHelp = isBounded(0, 2, args.length); - - try - { - switch (ValidCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH))) - { - case SET: - { - if (displayHelp) - { - displayHelpString(commandSender, ValidCommands.SET.help); - break; - } - - if (args.length == 3) - { - if (Utils.isInteger(args[2])) - { - int amount = Integer.parseInt(args[2]); - network.setOrbTier(amount); - displaySuccessString(commandSender, "commands.success"); - } else - { - displayErrorString(commandSender, "commands.error.arg.invalid"); - } - } else - { - displayErrorString(commandSender, "commands.error.arg.missing"); - } - - break; - } - case GET: - { - if (displayHelp) - { - displayHelpString(commandSender, ValidCommands.GET.help); - break; - } - - if (args.length > 1) - commandSender.addChatMessage(new TextComponentString(TextHelper.localizeEffect("message.orb.currenttier", network.getOrbTier()))); - - break; - } - } - } catch (IllegalArgumentException e) - { - displayErrorString(commandSender, "commands.error.404"); - } - } catch (PlayerNotFoundException e) - { - displayErrorString(commandSender, "commands.error.404"); - } - } - } - - private enum ValidCommands - { - SET("commands.orb.set.help"), - GET("commands.orb.get.help"); - - public String help; - - ValidCommands(String help) - { - this.help = help; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/package-info.java b/src/main/java/WayofTime/bloodmagic/command/sub/package-info.java deleted file mode 100644 index 04788ab8..00000000 --- a/src/main/java/WayofTime/bloodmagic/command/sub/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.command.sub; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java b/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java deleted file mode 100644 index c1c75352..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.bloodmagic.compat; - -/** - * Implement on all primary compatibility classes. - */ -public interface ICompatibility -{ - /** - * Called during each initialization phase after the given - * {@link #getModId()} has been verified as loaded. - * - * @param phase - * - The load phase at which this method is being called. - */ - void loadCompatibility(InitializationPhase phase); - - /** - * @return The {@code modid} of the mod we are adding compatibility for. - */ - String getModId(); - - /** - * Whether or not compatibility should be loaded even if the mod were to be - * found. - * - * Generally a determined by a config option. - * - * @return If Compatibility should load. - */ - boolean enableCompat(); - - /** - * Represents a given mod initialization state. - */ - enum InitializationPhase - { - /** - * Represents - * {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent} - */ - PRE_INIT, - /** - * Represents - * {@link net.minecraftforge.fml.common.event.FMLInitializationEvent} - */ - INIT, - /** - * Represents - * {@link net.minecraftforge.fml.common.event.FMLPostInitializationEvent} - */ - POST_INIT, - /** - * Represents - * {@link net.minecraftforge.fml.common.event.FMLModIdMappingEvent} - */ - MAPPING, - ; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/buttons/BloodMagicPlugin.java b/src/main/java/WayofTime/bloodmagic/compat/buttons/BloodMagicPlugin.java deleted file mode 100644 index ae82e9c0..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/buttons/BloodMagicPlugin.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.bloodmagic.compat.buttons; - -import WayofTime.bloodmagic.compat.buttons.button.ButtonFillNetwork; -import net.minecraft.util.ResourceLocation; -import tehnut.buttons.api.ButtonsPlugin; -import tehnut.buttons.api.IWidgetPlugin; -import tehnut.buttons.api.IWidgetRegistry; -import tehnut.buttons.api.WidgetTexture; - -@ButtonsPlugin -public class BloodMagicPlugin extends IWidgetPlugin.Base { - - public static final WidgetTexture FILL_BUTTON = new WidgetTexture( - new ResourceLocation("bloodmagic", "textures/gui/buttons_compat.png"), - 0, - 0, - 20, - 20 - ); - - @Override - public void register(IWidgetRegistry widgetRegistry) { - widgetRegistry.addUtilityButton(new ButtonFillNetwork()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/buttons/button/ButtonFillNetwork.java b/src/main/java/WayofTime/bloodmagic/compat/buttons/button/ButtonFillNetwork.java deleted file mode 100644 index c058ce03..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/buttons/button/ButtonFillNetwork.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.compat.buttons.button; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.compat.buttons.BloodMagicPlugin; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import tehnut.buttons.api.button.utility.Button; - -import javax.annotation.Nullable; -import java.util.Collections; -import java.util.List; - -public class ButtonFillNetwork extends Button { - - public ButtonFillNetwork() { - super(BloodMagicPlugin.FILL_BUTTON); - - setServerRequired(); - } - - @Nullable - @Override - public List getTooltip() { - return Collections.singletonList(new TextComponentTranslation("button.bloodmagic.tooltip.fill")); - } - - @Override - public void onServerClick(EntityPlayerMP player) { - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - network.setCurrentEssence(Integer.MAX_VALUE); - } - - @Override - public ResourceLocation getButtonId() { - return new ResourceLocation(Constants.Mod.MODID, "button_fillnetwork"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/BookUtils.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/BookUtils.java deleted file mode 100644 index ac727c6c..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/BookUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer; -import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe; -import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe; -import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; -import WayofTime.bloodmagic.client.render.alchemyArray.DualAlchemyCircleRenderer; -import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray; -import WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer.ShapedBloodOrbRecipeRenderer; -import WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer.ShapelessBloodOrbRecipeRenderer; -import amerifrance.guideapi.page.PageIRecipe; - -public class BookUtils -{ - - public static PageAlchemyArray getAlchemyPage(String key) - { - ItemStack[] recipe = AlchemyArrayRecipeRegistry.getRecipeForArrayEffect(key); - if (recipe[0] != null) - { - ItemStack inputStack = recipe[0]; - ItemStack catalystStack = recipe[1]; - - AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack); - if (renderer instanceof DualAlchemyCircleRenderer) - { - List resources = new ArrayList(); - resources.add(((DualAlchemyCircleRenderer) renderer).arrayResource); - resources.add(((DualAlchemyCircleRenderer) renderer).secondaryArrayResource); - return new PageAlchemyArray(resources, inputStack, catalystStack); - } else - { - return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack); - } - } - - return null; - } - - public static PageAlchemyArray getAlchemyPage(ItemStack outputStack) - { - ItemStack[] recipe = AlchemyArrayRecipeRegistry.getRecipeForOutputStack(outputStack); - if (recipe[0] != null) - { - ItemStack inputStack = recipe[0]; - ItemStack catalystStack = recipe[1]; - - AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack); - if (renderer != null) - { - if (renderer instanceof DualAlchemyCircleRenderer) - { - List resources = new ArrayList(); - resources.add(((DualAlchemyCircleRenderer) renderer).arrayResource); - resources.add(((DualAlchemyCircleRenderer) renderer).secondaryArrayResource); - return new PageAlchemyArray(resources, inputStack, catalystStack, outputStack); - } else - { - return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack, outputStack); - } - } - } - - return null; - } - - public static PageIRecipe getPageForRecipe(IRecipe recipe) - { - if (recipe instanceof ShapedBloodOrbRecipe) - { - return new PageIRecipe(recipe, new ShapedBloodOrbRecipeRenderer((ShapedBloodOrbRecipe) recipe)); - } else if (recipe instanceof ShapelessBloodOrbRecipe) - { - return new PageIRecipe(recipe, new ShapelessBloodOrbRecipeRenderer((ShapelessBloodOrbRecipe) recipe)); - } - - return new PageIRecipe(recipe); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/CompatibilityGuideAPI.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/CompatibilityGuideAPI.java deleted file mode 100644 index 138544cf..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/CompatibilityGuideAPI.java +++ /dev/null @@ -1,70 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi; - -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import WayofTime.bloodmagic.compat.ICompatibility; -import amerifrance.guideapi.api.GuideAPI; -import net.minecraftforge.oredict.ShapelessOreRecipe; - -public class CompatibilityGuideAPI implements ICompatibility -{ - private static IRecipe guideRecipe = null; - private static boolean worldFlag; - - @Override - public void loadCompatibility(InitializationPhase phase) - { - switch (phase) - { - case PRE_INIT: - { - GuideBloodMagic.initBook(); - GameRegistry.register(GuideBloodMagic.guideBook); - if (FMLCommonHandler.instance().getSide() == Side.CLIENT) - GuideAPI.setModel(GuideBloodMagic.guideBook); - - break; - } - case INIT: - { - guideRecipe = new ShapelessOreRecipe(GuideAPI.getStackFromBook(GuideBloodMagic.guideBook), new ItemStack(Items.BOOK), Blocks.GLASS, Items.FEATHER); - break; - } - case POST_INIT: - { - if (FMLCommonHandler.instance().getSide() == Side.CLIENT) - GuideBloodMagic.initCategories(); - break; - } - case MAPPING: - { - if (!worldFlag) { - GameRegistry.addRecipe(guideRecipe); - worldFlag = true; - } else { - CraftingManager.getInstance().getRecipeList().remove(guideRecipe); - worldFlag = false; - } - break; - } - } - } - - @Override - public String getModId() - { - return "guideapi"; - } - - @Override - public boolean enableCompat() - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/GuideBloodMagic.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/GuideBloodMagic.java deleted file mode 100644 index dc06383b..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/GuideBloodMagic.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi; - -import WayofTime.bloodmagic.compat.guideapi.book.*; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import amerifrance.guideapi.api.GuideAPI; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.util.NBTBookTags; -import amerifrance.guideapi.category.CategoryItemStack; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.relauncher.Side; - -import java.awt.Color; - -public class GuideBloodMagic -{ - public static Book guideBook; - - public static void initBook() - { - guideBook = new Book(); - guideBook.setTitle("guide.BloodMagic.title"); - guideBook.setDisplayName("guide.BloodMagic.display"); - guideBook.setWelcomeMessage("guide.BloodMagic.welcome"); - guideBook.setAuthor("guide.BloodMagic.author"); - guideBook.setRegistryName("BloodMagic"); - guideBook.setColor(Color.RED); - - if (FMLCommonHandler.instance().getSide() == Side.CLIENT) - GuideAPI.setModel(guideBook); - } - - public static void initCategories() - { - guideBook.addCategory(new CategoryItemStack(CategoryAlchemy.buildCategory(), "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.ARCANE_ASHES))); - guideBook.addCategory(new CategoryItemStack(CategoryArchitect.buildCategory(), "guide.BloodMagic.category.architect", new ItemStack(ModItems.SIGIL_DIVINATION))); - guideBook.addCategory(new CategoryItemStack(CategoryDemon.buildCategory(), "guide.BloodMagic.category.demon", new ItemStack(ModItems.BLOOD_SHARD))); - guideBook.addCategory(new CategoryItemStack(CategoryRitual.buildCategory(), "guide.BloodMagic.category.ritual", new ItemStack(ModBlocks.RITUAL_CONTROLLER))); -// guideBook.addCategory(new CategoryItemStack(CategorySpell.buildCategory(), "guide.BloodMagic.category.spell", new ItemStack(ModItems.ritualDiviner))); - } - - public static void initJEIBlacklist() - { - if (Loader.isModLoaded("JEI")) - BloodMagicPlugin.jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(GuideAPI.guideBook, NBTBookTags.BOOK_TAG, NBTBookTags.CATEGORY_PAGE_TAG, NBTBookTags.CATEGORY_TAG, NBTBookTags.ENTRY_PAGE_TAG, NBTBookTags.ENTRY_TAG, NBTBookTags.KEY_TAG, NBTBookTags.PAGE_TAG); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryAlchemy.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryAlchemy.java deleted file mode 100644 index e6d0a5ce..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryAlchemy.java +++ /dev/null @@ -1,114 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.book; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.compat.guideapi.BookUtils; -import WayofTime.bloodmagic.compat.guideapi.entry.EntryText; -import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray; -import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.RecipeHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.IPage; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.PageHelper; -import amerifrance.guideapi.page.PageText; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -public class CategoryAlchemy -{ - public static Map buildCategory() - { - Map entries = new LinkedHashMap(); - String keyBase = "guide." + Constants.Mod.MODID + ".entry.alchemy."; - - List introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(introPages, TextHelper.localize(keyBase + "intro"), true)); - - List ashPages = new ArrayList(); - - TartaricForgeRecipe ashRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.ARCANE_ASHES)); - if (ashRecipe != null) - { - ashPages.add(new PageTartaricForgeRecipe(ashRecipe)); - } - ashPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ash" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "ash"), new EntryText(ashPages, TextHelper.localize(keyBase + "ash"), true)); - - List speedPages = new ArrayList(); - - PageAlchemyArray speedRecipePage = BookUtils.getAlchemyPage("movement"); - if (speedRecipePage != null) - { - speedPages.add(speedRecipePage); - } - speedPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "speed" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "speed"), new EntryText(speedPages, TextHelper.localize(keyBase + "speed"), true)); - - List updraftPages = new ArrayList(); - - PageAlchemyArray updraftRecipePage = BookUtils.getAlchemyPage("updraft"); - if (updraftRecipePage != null) - { - updraftPages.add(updraftRecipePage); - } - updraftPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "updraft" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "updraft"), new EntryText(updraftPages, TextHelper.localize(keyBase + "updraft"), true)); - - List turretPages = new ArrayList(); - - PageAlchemyArray turretRecipePage = BookUtils.getAlchemyPage("skeletonTurret"); - if (turretRecipePage != null) - { - turretPages.add(turretRecipePage); - } - turretPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "turret" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "turret"), new EntryText(turretPages, TextHelper.localize(keyBase + "turret"), true)); - - List bouncePages = new ArrayList(); - - PageAlchemyArray bounceRecipePage = BookUtils.getAlchemyPage("bounce"); - if (bounceRecipePage != null) - { - bouncePages.add(bounceRecipePage); - } - bouncePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bounce" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "bounce"), new EntryText(bouncePages, TextHelper.localize(keyBase + "bounce"), true)); - - List buffPages = new ArrayList(); - - buffPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "buff" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "buff"), new EntryText(buffPages, TextHelper.localize(keyBase + "buff"), true)); - - List fastMinerPages = new ArrayList(); - - PageAlchemyArray fastMinerRecipePage = BookUtils.getAlchemyPage("fastMiner"); - if (fastMinerRecipePage != null) - { - fastMinerPages.add(fastMinerRecipePage); - } - fastMinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "fastMiner" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "fastMiner"), new EntryText(fastMinerPages, TextHelper.localize(keyBase + "fastMiner"), true)); - - for (Entry entry : entries.entrySet()) - { - for (IPage page : entry.getValue().pageList) - { - if (page instanceof PageText) - { - ((PageText) page).setUnicodeFlag(true); - } - } - } - - return entries; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryArchitect.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryArchitect.java deleted file mode 100644 index 8766ab28..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryArchitect.java +++ /dev/null @@ -1,720 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.book; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.compat.guideapi.BookUtils; -import WayofTime.bloodmagic.compat.guideapi.entry.EntryText; -import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray; -import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe; -import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe; -import WayofTime.bloodmagic.item.ItemComponent; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.RecipeHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.IPage; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.PageHelper; -import amerifrance.guideapi.page.PageText; - -public class CategoryArchitect -{ - public static Map buildCategory() - { - Map entries = new LinkedHashMap(); - String keyBase = "guide." + Constants.Mod.MODID + ".entry.architect."; - - List introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 370)); -// introPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png"))); - entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(introPages, TextHelper.localize(keyBase + "intro"), true)); - - List altarPages = new ArrayList(); - - IRecipe altarRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.ALTAR)); - if (altarRecipe != null) - { - altarPages.add(BookUtils.getPageForRecipe(altarRecipe)); - } - - altarPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bloodaltar" + ".info.1"), 370)); - - IRecipe daggerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModItems.SACRIFICIAL_DAGGER)); - if (daggerRecipe != null) - { - altarPages.add(BookUtils.getPageForRecipe(daggerRecipe)); - } - - altarPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bloodaltar" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "bloodaltar"), new EntryText(altarPages, TextHelper.localize(keyBase + "bloodaltar"), true)); - - List ashPages = new ArrayList(); - - TartaricForgeRecipe ashRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.ARCANE_ASHES)); - if (ashRecipe != null) - { - ashPages.add(new PageTartaricForgeRecipe(ashRecipe)); - } - ashPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ash" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "ash"), new EntryText(ashPages, TextHelper.localize(keyBase + "ash"), true)); - - List divinationPages = new ArrayList(); - - PageAlchemyArray divinationRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_DIVINATION)); - if (divinationRecipePage != null) - { - divinationPages.add(divinationRecipePage); - } - - divinationPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "divination" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "divination"), new EntryText(divinationPages, TextHelper.localize(keyBase + "divination"), true)); - - List soulnetworkPages = new ArrayList(); - - soulnetworkPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "soulnetwork" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "soulnetwork"), new EntryText(soulnetworkPages, TextHelper.localize(keyBase + "soulnetwork"), true)); - - List weakorbPages = new ArrayList(); - weakorbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "weakorb" + ".info.1"), 370)); - - AltarRecipe weakorbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(ModItems.ORB_WEAK)); - if (weakorbRecipe != null) - { - weakorbPages.add(new PageAltarRecipe(weakorbRecipe)); - } - - weakorbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "weakorb" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "weakorb"), new EntryText(weakorbPages, TextHelper.localize(keyBase + "weakorb"), true)); - - List incensePages = new ArrayList(); - - IRecipe incenseRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.INCENSE_ALTAR)); - if (incenseRecipe != null) - { - incensePages.add(BookUtils.getPageForRecipe(incenseRecipe)); - } - - incensePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "incense" + ".info.1"), 370)); - - IRecipe woodPathRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.PATH_BLOCK, 1, 0)); - if (woodPathRecipe != null) - { - incensePages.add(BookUtils.getPageForRecipe(woodPathRecipe)); - } - - incensePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "incense" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "incense"), new EntryText(incensePages, TextHelper.localize(keyBase + "incense"), true)); - - List runePages = new ArrayList(); - - IRecipe runeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 0)); - if (runeRecipe != null) - { - runePages.add(BookUtils.getPageForRecipe(runeRecipe)); - } - - runePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bloodrune" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "bloodrune"), new EntryText(runePages, TextHelper.localize(keyBase + "bloodrune"), true)); - - List inspectPages = new ArrayList(); - - AltarRecipe inspectRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(ModItems.SANGUINE_BOOK)); - if (inspectRecipe != null) - { - inspectPages.add(new PageAltarRecipe(inspectRecipe)); - } - - inspectPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "inspectoris" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "inspectoris"), new EntryText(inspectPages, TextHelper.localize(keyBase + "inspectoris"), true)); - - List speedRunePages = new ArrayList(); - - IRecipe speedRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 1)); - if (speedRecipe != null) - { - speedRunePages.add(BookUtils.getPageForRecipe(speedRecipe)); - } - - speedRunePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "runeSpeed" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "runeSpeed"), new EntryText(speedRunePages, TextHelper.localize(keyBase + "runeSpeed"), true)); - - List waterPages = new ArrayList(); - - TartaricForgeRecipe waterRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_WATER)); - if (waterRecipe != null) - { - waterPages.add(new PageTartaricForgeRecipe(waterRecipe)); - } - - PageAlchemyArray waterRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_WATER)); - if (waterRecipePage != null) - { - waterPages.add(waterRecipePage); - } - - waterPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "water" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "water"), new EntryText(waterPages, TextHelper.localize(keyBase + "water"), true)); - - List lavaPages = new ArrayList(); - - TartaricForgeRecipe lavaRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_LAVA)); - if (lavaRecipe != null) - { - lavaPages.add(new PageTartaricForgeRecipe(lavaRecipe)); - } - - PageAlchemyArray lavaRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_LAVA)); - if (lavaRecipePage != null) - { - lavaPages.add(lavaRecipePage); - } - - lavaPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lava" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "lava"), new EntryText(lavaPages, TextHelper.localize(keyBase + "lava"), true)); - - List lavaCrystalPages = new ArrayList(); - - IRecipe lavaCrystalRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModItems.LAVA_CRYSTAL)); - if (lavaCrystalRecipe != null) - { - lavaCrystalPages.add(BookUtils.getPageForRecipe(lavaCrystalRecipe)); - } - - lavaCrystalPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lavaCrystal" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "lavaCrystal"), new EntryText(lavaCrystalPages, TextHelper.localize(keyBase + "lavaCrystal"), true)); - - List apprenticeorbPages = new ArrayList(); - - AltarRecipe apprenticeorbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE)); - if (apprenticeorbRecipe != null) - { - apprenticeorbPages.add(new PageAltarRecipe(apprenticeorbRecipe)); - } - - apprenticeorbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "apprenticeorb" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "apprenticeorb"), new EntryText(apprenticeorbPages, TextHelper.localize(keyBase + "apprenticeorb"), true)); - - List daggerPages = new ArrayList(); - - AltarRecipe daggerOfSacrificeRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(ModItems.DAGGER_OF_SACRIFICE)); - if (daggerOfSacrificeRecipe != null) - { - daggerPages.add(new PageAltarRecipe(daggerOfSacrificeRecipe)); - } - - daggerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "dagger" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "dagger"), new EntryText(daggerPages, TextHelper.localize(keyBase + "dagger"), true)); - - List runeSacrificePages = new ArrayList(); - - IRecipe runeSacrificeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 3)); - if (runeSacrificeRecipe != null) - { - runeSacrificePages.add(BookUtils.getPageForRecipe(runeSacrificeRecipe)); - } - - runeSacrificePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "runeSacrifice" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "runeSacrifice"), new EntryText(runeSacrificePages, TextHelper.localize(keyBase + "runeSacrifice"), true)); - - List runeSelfSacrificePages = new ArrayList(); - - IRecipe runeSelfSacrificeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 4)); - if (runeSelfSacrificeRecipe != null) - { - runeSelfSacrificePages.add(BookUtils.getPageForRecipe(runeSelfSacrificeRecipe)); - } - - runeSelfSacrificePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "runeSelfSacrifice" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "runeSelfSacrifice"), new EntryText(runeSelfSacrificePages, TextHelper.localize(keyBase + "runeSelfSacrifice"), true)); - - List holdingPages = new ArrayList(); - - TartaricForgeRecipe holdingRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_HOLDING)); - if (holdingRecipe != null) - { - holdingPages.add(new PageTartaricForgeRecipe(holdingRecipe)); - } - - PageAlchemyArray holdingRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_HOLDING)); - if (holdingRecipePage != null) - { - holdingPages.add(holdingRecipePage); - } - - holdingPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "holding" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "holding"), new EntryText(holdingPages, TextHelper.localize(keyBase + "holding"), true)); - - List airPages = new ArrayList(); - - TartaricForgeRecipe airRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_AIR)); - if (airRecipe != null) - { - airPages.add(new PageTartaricForgeRecipe(airRecipe)); - } - - PageAlchemyArray airRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_AIR)); - if (airRecipePage != null) - { - airPages.add(airRecipePage); - } - - airPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "air" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "air"), new EntryText(airPages, TextHelper.localize(keyBase + "air"), true)); - - List voidPages = new ArrayList(); - - TartaricForgeRecipe voidRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_VOID)); - if (voidRecipe != null) - { - voidPages.add(new PageTartaricForgeRecipe(voidRecipe)); - } - - PageAlchemyArray voidRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_VOID)); - if (voidRecipePage != null) - { - voidPages.add(voidRecipePage); - } - - voidPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "void" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "void"), new EntryText(voidPages, TextHelper.localize(keyBase + "void"), true)); - - List greenGrovePages = new ArrayList(); - - TartaricForgeRecipe greenGroveRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH)); - if (greenGroveRecipe != null) - { - greenGrovePages.add(new PageTartaricForgeRecipe(greenGroveRecipe)); - } - - PageAlchemyArray greenGroveRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_GREEN_GROVE)); - if (greenGroveRecipePage != null) - { - greenGrovePages.add(greenGroveRecipePage); - } - - greenGrovePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "greenGrove" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "greenGrove"), new EntryText(greenGrovePages, TextHelper.localize(keyBase + "greenGrove"), true)); - - List fastMinerPages = new ArrayList(); - - TartaricForgeRecipe fastMinerRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER)); - if (fastMinerRecipe != null) - { - fastMinerPages.add(new PageTartaricForgeRecipe(fastMinerRecipe)); - } - - PageAlchemyArray fastMinerRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_FAST_MINER)); - if (fastMinerRecipePage != null) - { - fastMinerPages.add(fastMinerRecipePage); - } - - fastMinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "fastMiner" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "fastMiner"), new EntryText(fastMinerPages, TextHelper.localize(keyBase + "fastMiner"), true)); - - List seerPages = new ArrayList(); - - TartaricForgeRecipe seerRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT)); - if (seerRecipe != null) - { - seerPages.add(new PageTartaricForgeRecipe(seerRecipe)); - } - - PageAlchemyArray seerRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_SEER)); - if (seerRecipePage != null) - { - seerPages.add(seerRecipePage); - } - - seerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "seer" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "seer"), new EntryText(seerPages, TextHelper.localize(keyBase + "seer"), true)); - - List magicianOrbPages = new ArrayList(); - - AltarRecipe magicianOrbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN)); - if (magicianOrbRecipe != null) - { - magicianOrbPages.add(new PageAltarRecipe(magicianOrbRecipe)); - } - - magicianOrbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "magicianOrb" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "magicianOrb"), new EntryText(magicianOrbPages, TextHelper.localize(keyBase + "magicianOrb"), true)); - - List capacityPages = new ArrayList(); - - IRecipe capacityRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 4)); - if (capacityRecipe != null) - { - capacityPages.add(BookUtils.getPageForRecipe(capacityRecipe)); - } - - capacityPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "capacity" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "capacity"), new EntryText(capacityPages, TextHelper.localize(keyBase + "capacity"), true)); - - List displacementPages = new ArrayList(); - - IRecipe displacementRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 4)); - if (displacementRecipe != null) - { - displacementPages.add(BookUtils.getPageForRecipe(displacementRecipe)); - } - - displacementPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "displacement" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "displacement"), new EntryText(displacementPages, TextHelper.localize(keyBase + "displacement"), true)); - - List affinityPages = new ArrayList(); - - TartaricForgeRecipe affinityRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY)); - if (affinityRecipe != null) - { - affinityPages.add(new PageTartaricForgeRecipe(affinityRecipe)); - } - - PageAlchemyArray affinityRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_ELEMENTAL_AFFINITY)); - if (affinityRecipePage != null) - { - affinityPages.add(affinityRecipePage); - } - - affinityPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "affinity" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "affinity"), new EntryText(affinityPages, TextHelper.localize(keyBase + "affinity"), true)); - - List lampPages = new ArrayList(); - - TartaricForgeRecipe lampRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT)); - if (lampRecipe != null) - { - lampPages.add(new PageTartaricForgeRecipe(lampRecipe)); - } - - PageAlchemyArray lampRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_BLOOD_LIGHT)); - if (lampRecipePage != null) - { - lampPages.add(lampRecipePage); - } - - lampPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lamp" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "lamp"), new EntryText(lampPages, TextHelper.localize(keyBase + "lamp"), true)); - - List magnetismPages = new ArrayList(); - - TartaricForgeRecipe magnetismRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_MAGNETISM)); - if (magnetismRecipe != null) - { - magnetismPages.add(new PageTartaricForgeRecipe(magnetismRecipe)); - } - - PageAlchemyArray magnetismRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_MAGNETISM)); - if (magnetismRecipePage != null) - { - magnetismPages.add(magnetismRecipePage); - } - - magnetismPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "magnetism" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "magnetism"), new EntryText(magnetismPages, TextHelper.localize(keyBase + "magnetism"), true)); - - List peritiaPages = new ArrayList(); - - IRecipe peritiaRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModItems.EXPERIENCE_TOME)); - if (peritiaRecipe != null) - { - peritiaPages.add(BookUtils.getPageForRecipe(peritiaRecipe)); - } - - peritiaPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "peritia" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "peritia"), new EntryText(peritiaPages, TextHelper.localize(keyBase + "peritia"), true)); - - List livingArmourPages = new ArrayList(); - - TartaricForgeRecipe bindingRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_BINDING)); - if (bindingRecipe != null) - { - livingArmourPages.add(new PageTartaricForgeRecipe(bindingRecipe)); - } - - PageAlchemyArray bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.LIVING_ARMOUR_CHEST)); - if (bindingRecipePage != null) - { - livingArmourPages.add(bindingRecipePage); - } - - bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.LIVING_ARMOUR_HELMET)); - if (bindingRecipePage != null) - { - livingArmourPages.add(bindingRecipePage); - } - - bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.LIVING_ARMOUR_LEGS)); - if (bindingRecipePage != null) - { - livingArmourPages.add(bindingRecipePage); - } - - bindingRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.LIVING_ARMOUR_BOOTS)); - if (bindingRecipePage != null) - { - livingArmourPages.add(bindingRecipePage); - } - - livingArmourPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "livingArmour" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "livingArmour"), new EntryText(livingArmourPages, TextHelper.localize(keyBase + "livingArmour"), true)); - - List upgradePages = new ArrayList(); - - upgradePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "upgradeTome" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "upgradeTome"), new EntryText(upgradePages, TextHelper.localize(keyBase + "upgradeTome"), true)); - - List downgradePages = new ArrayList(); - - downgradePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "downgrade" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "downgrade"), new EntryText(downgradePages, TextHelper.localize(keyBase + "downgrade"), true)); - - List teleposerPages = new ArrayList(); - - AltarRecipe teleposerFocusRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(ModItems.TELEPOSITION_FOCUS)); - if (teleposerFocusRecipe != null) - { - teleposerPages.add(new PageAltarRecipe(teleposerFocusRecipe)); - } - - IRecipe teleposerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.TELEPOSER)); - if (teleposerRecipe != null) - { - teleposerPages.add(BookUtils.getPageForRecipe(teleposerRecipe)); - } - - teleposerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "teleposer" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "teleposer"), new EntryText(teleposerPages, TextHelper.localize(keyBase + "teleposer"), true)); - - List boundBladePages = new ArrayList(); - - PageAlchemyArray boundBladePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.BOUND_SWORD)); - if (boundBladePage != null) - { - boundBladePages.add(boundBladePage); - } - - boundBladePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "boundBlade" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "boundBlade"), new EntryText(boundBladePages, TextHelper.localize(keyBase + "boundBlade"), true)); - - List boundToolPages = new ArrayList(); - - PageAlchemyArray boundToolPage = BookUtils.getAlchemyPage(new ItemStack(ModItems.BOUND_PICKAXE)); - if (boundToolPage != null) - { - boundToolPages.add(boundToolPage); - } - - boundToolPage = BookUtils.getAlchemyPage(new ItemStack(ModItems.BOUND_AXE)); - if (boundToolPage != null) - { - boundToolPages.add(boundToolPage); - } - - boundToolPage = BookUtils.getAlchemyPage(new ItemStack(ModItems.BOUND_SHOVEL)); - if (boundToolPage != null) - { - boundToolPages.add(boundToolPage); - } - - boundToolPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "boundTool" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "boundTool"), new EntryText(boundToolPages, TextHelper.localize(keyBase + "boundTool"), true)); - - List weakShardPages = new ArrayList(); - - weakShardPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "weakShard" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "weakShard"), new EntryText(weakShardPages, TextHelper.localize(keyBase + "weakShard"), true)); - - List masterOrbPages = new ArrayList(); - - AltarRecipe masterOrbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(ModItems.ORB_MASTER)); - if (magicianOrbRecipe != null) - { - masterOrbPages.add(new PageAltarRecipe(masterOrbRecipe)); - } - - masterOrbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "masterOrb" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "masterOrb"), new EntryText(masterOrbPages, TextHelper.localize(keyBase + "masterOrb"), true)); - - List orbRunePages = new ArrayList(); - - IRecipe orbRuneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 8)); - if (orbRuneRecipe != null) - { - orbRunePages.add(BookUtils.getPageForRecipe(orbRuneRecipe)); - } - - orbRunePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "runeOrb" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "runeOrb"), new EntryText(orbRunePages, TextHelper.localize(keyBase + "runeOrb"), true)); - - List augmentedCapacityPages = new ArrayList(); - - IRecipe augmentedCapacityRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 7)); - if (orbRuneRecipe != null) - { - augmentedCapacityPages.add(BookUtils.getPageForRecipe(augmentedCapacityRecipe)); - } - - augmentedCapacityPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "augmentedCapacity" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "augmentedCapacity"), new EntryText(augmentedCapacityPages, TextHelper.localize(keyBase + "augmentedCapacity"), true)); - - List chargingPages = new ArrayList(); - - IRecipe chargingRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 10)); - if (orbRuneRecipe != null) - { - chargingPages.add(BookUtils.getPageForRecipe(chargingRecipe)); - } - - chargingPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "charging" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "charging"), new EntryText(chargingPages, TextHelper.localize(keyBase + "charging"), true)); - - List accelerationPages = new ArrayList(); - - IRecipe accelerationRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 9)); - if (orbRuneRecipe != null) - { - accelerationPages.add(BookUtils.getPageForRecipe(accelerationRecipe)); - } - - accelerationPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "acceleration" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "acceleration"), new EntryText(accelerationPages, TextHelper.localize(keyBase + "acceleration"), true)); - - List suppressionPages = new ArrayList(); - - TartaricForgeRecipe suppressionRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION)); - if (suppressionRecipe != null) - { - suppressionPages.add(new PageTartaricForgeRecipe(suppressionRecipe)); - } - - PageAlchemyArray suppressionRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_SUPPRESSION)); - if (suppressionRecipePage != null) - { - suppressionPages.add(suppressionRecipePage); - } - - suppressionPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "suppression" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "suppression"), new EntryText(suppressionPages, TextHelper.localize(keyBase + "suppression"), true)); - - List hastePages = new ArrayList(); - - TartaricForgeRecipe hasteRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_HASTE)); - if (hasteRecipe != null) - { - hastePages.add(new PageTartaricForgeRecipe(hasteRecipe)); - } - - PageAlchemyArray hasteRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_HASTE)); - if (hasteRecipePage != null) - { - hastePages.add(hasteRecipePage); - } - - hastePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "haste" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "haste"), new EntryText(hastePages, TextHelper.localize(keyBase + "haste"), true)); - - List severancePages = new ArrayList(); - - TartaricForgeRecipe severanceRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_SEVERANCE)); - if (severanceRecipe != null) - { - severancePages.add(new PageTartaricForgeRecipe(severanceRecipe)); - } - - PageAlchemyArray severanceRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_ENDER_SEVERANCE)); - if (severanceRecipePage != null) - { - severancePages.add(severanceRecipePage); - } - - severancePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "severance" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "severance"), new EntryText(severancePages, TextHelper.localize(keyBase + "severance"), true)); - - List telepositionPages = new ArrayList(); - - TartaricForgeRecipe telepositionRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_TELEPOSITION)); - if (telepositionRecipe != null) - { - telepositionPages.add(new PageTartaricForgeRecipe(telepositionRecipe)); - } - - PageAlchemyArray telepositionRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_TELEPOSITION)); - if (telepositionRecipePage != null) - { - telepositionPages.add(telepositionRecipePage); - } - - telepositionPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "teleposition" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "teleposition"), new EntryText(telepositionPages, TextHelper.localize(keyBase + "teleposition"), true)); - - List compressionPages = new ArrayList(); - - TartaricForgeRecipe compressionRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_COMPRESSION)); - if (compressionRecipe != null) - { - compressionPages.add(new PageTartaricForgeRecipe(compressionRecipe)); - } - - PageAlchemyArray compressionRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_COMPRESSION)); - if (compressionRecipePage != null) - { - compressionPages.add(compressionRecipePage); - } - - compressionPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "compression" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "compression"), new EntryText(compressionPages, TextHelper.localize(keyBase + "compression"), true)); - - List bridgePages = new ArrayList(); - - TartaricForgeRecipe bridgeRecipe = RecipeHelper.getForgeRecipeForOutput(ItemComponent.getStack(ItemComponent.REAGENT_BRIDGE)); - if (bridgeRecipe != null) - { - bridgePages.add(new PageTartaricForgeRecipe(bridgeRecipe)); - } - - PageAlchemyArray bridgeRecipePage = BookUtils.getAlchemyPage(new ItemStack(ModItems.SIGIL_PHANTOM_BRIDGE)); - if (bridgeRecipePage != null) - { - bridgePages.add(bridgeRecipePage); - } - - bridgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bridge" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "bridge"), new EntryText(bridgePages, TextHelper.localize(keyBase + "bridge"), true)); - - List mimicPages = new ArrayList(); - - IRecipe mimicRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.MIMIC, 1, 1)); - if (mimicRecipe != null) - { - mimicPages.add(BookUtils.getPageForRecipe(mimicRecipe)); - } - - mimicPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "mimic" + ".info.1"), 370)); - entries.put(new ResourceLocation(keyBase + "mimic"), new EntryText(mimicPages, TextHelper.localize(keyBase + "mimic"), true)); - - for (Entry entry : entries.entrySet()) - { - for (IPage page : entry.getValue().pageList) - { - if (page instanceof PageText) - { - ((PageText) page).setUnicodeFlag(true); - } - } - } - - return entries; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryDemon.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryDemon.java deleted file mode 100644 index 37d5f3d6..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryDemon.java +++ /dev/null @@ -1,211 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.book; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.compat.guideapi.BookUtils; -import WayofTime.bloodmagic.compat.guideapi.entry.EntryText; -import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.RecipeHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.IPage; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.PageHelper; -import amerifrance.guideapi.page.PageText; - -public class CategoryDemon -{ - //TODO: Add Forge recipe pages - public static Map buildCategory() - { - Map entries = new LinkedHashMap(); - String keyBase = "guide." + Constants.Mod.MODID + ".entry.demon."; - - List introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 370)); -// introPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png"))); - entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(introPages, TextHelper.localize(keyBase + "intro"), true)); - - List snarePages = new ArrayList(); - snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.1"), 370)); - - IRecipe snareRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModItems.SOUL_SNARE)); - if (snareRecipe != null) - { - snarePages.add(BookUtils.getPageForRecipe(snareRecipe)); - } - - snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "snare"), new EntryText(snarePages, TextHelper.localize(keyBase + "snare"), true)); - - List forgePages = new ArrayList(); - forgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "forge" + ".info.1"), 370)); - - IRecipe forgeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.SOUL_FORGE)); - if (forgeRecipe != null) - { - forgePages.add(BookUtils.getPageForRecipe(forgeRecipe)); - } - - forgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "forge" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "forge"), new EntryText(forgePages, TextHelper.localize(keyBase + "forge"), true)); - - List pettyPages = new ArrayList(); - pettyPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "petty" + ".info.1"), 370)); - TartaricForgeRecipe pettyRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.SOUL_GEM)); - if (pettyRecipe != null) - { - pettyPages.add(new PageTartaricForgeRecipe(pettyRecipe)); - } - pettyPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "petty" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "petty"), new EntryText(pettyPages, TextHelper.localize(keyBase + "petty"), true)); - - List swordPages = new ArrayList(); - swordPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sword" + ".info.1"), 370)); - TartaricForgeRecipe swordRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.SENTIENT_SWORD)); - if (swordRecipe != null) - { - swordPages.add(new PageTartaricForgeRecipe(swordRecipe)); - } - swordPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sword" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "sword"), new EntryText(swordPages, TextHelper.localize(keyBase + "sword"), true)); - - List lesserPages = new ArrayList(); - lesserPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lesser" + ".info.1"), 370)); - TartaricForgeRecipe lesserRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.SOUL_GEM, 1, 1)); - if (lesserRecipe != null) - { - lesserPages.add(new PageTartaricForgeRecipe(lesserRecipe)); - } - lesserPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lesser" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "lesser"), new EntryText(lesserPages, TextHelper.localize(keyBase + "lesser"), true)); - - List reactionsPages = new ArrayList(); - reactionsPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "reactions" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "reactions"), new EntryText(reactionsPages, TextHelper.localize(keyBase + "reactions"), true)); - - List sentientGemPages = new ArrayList(); - sentientGemPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sentientGem" + ".info.1"), 370)); - sentientGemPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sentientGem" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "sentientGem"), new EntryText(sentientGemPages, TextHelper.localize(keyBase + "sentientGem"), true)); - - List routingPages = new ArrayList(); - TartaricForgeRecipe nodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.ITEM_ROUTING_NODE)); - if (nodeRecipe != null) - { - routingPages.add(new PageTartaricForgeRecipe(nodeRecipe)); - } - TartaricForgeRecipe inputNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.INPUT_ROUTING_NODE)); - if (inputNodeRecipe != null) - { - routingPages.add(new PageTartaricForgeRecipe(inputNodeRecipe)); - } - TartaricForgeRecipe outputNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.OUTPUT_ROUTING_NODE)); - if (outputNodeRecipe != null) - { - routingPages.add(new PageTartaricForgeRecipe(outputNodeRecipe)); - } - TartaricForgeRecipe masterNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.MASTER_ROUTING_NODE)); - if (masterNodeRecipe != null) - { - routingPages.add(new PageTartaricForgeRecipe(masterNodeRecipe)); - } - - TartaricForgeRecipe nodeRouterRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.NODE_ROUTER)); - if (nodeRouterRecipe != null) - { - routingPages.add(new PageTartaricForgeRecipe(nodeRouterRecipe)); - } - - routingPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "routing" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "routing"), new EntryText(routingPages, TextHelper.localize(keyBase + "routing"), true)); - - List auraPages = new ArrayList(); - - auraPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "aura" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "aura"), new EntryText(auraPages, TextHelper.localize(keyBase + "aura"), true)); - - List typesPages = new ArrayList(); - - typesPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "types" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "types"), new EntryText(typesPages, TextHelper.localize(keyBase + "types"), true)); - - List cruciblePages = new ArrayList(); - - TartaricForgeRecipe crucibleRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.DEMON_CRUCIBLE)); - if (crucibleRecipe != null) - { - cruciblePages.add(new PageTartaricForgeRecipe(crucibleRecipe)); - } - - cruciblePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "crucible" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "crucible"), new EntryText(cruciblePages, TextHelper.localize(keyBase + "crucible"), true)); - - List crystallizerPages = new ArrayList(); - - TartaricForgeRecipe crystallizerRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.DEMON_CRYSTALLIZER)); - if (crystallizerRecipe != null) - { - crystallizerPages.add(new PageTartaricForgeRecipe(crystallizerRecipe)); - } - - crystallizerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "crystallizer" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "crystallizer"), new EntryText(crystallizerPages, TextHelper.localize(keyBase + "crystallizer"), true)); - - List clusterPages = new ArrayList(); - - TartaricForgeRecipe clusterRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.DEMON_CRYSTAL)); - if (clusterRecipe != null) - { - clusterPages.add(new PageTartaricForgeRecipe(clusterRecipe)); - } - - clusterPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "cluster" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "cluster"), new EntryText(clusterPages, TextHelper.localize(keyBase + "cluster"), true)); - - List pylonPages = new ArrayList(); - - TartaricForgeRecipe pylonRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModBlocks.DEMON_PYLON)); - if (pylonRecipe != null) - { - pylonPages.add(new PageTartaricForgeRecipe(pylonRecipe)); - } - - pylonPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "pylon" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "pylon"), new EntryText(pylonPages, TextHelper.localize(keyBase + "pylon"), true)); - - List gaugePages = new ArrayList(); - - TartaricForgeRecipe gaugeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(ModItems.DEMON_WILL_GAUGE)); - if (gaugeRecipe != null) - { - gaugePages.add(new PageTartaricForgeRecipe(gaugeRecipe)); - } - - gaugePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "gauge" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "gauge"), new EntryText(gaugePages, TextHelper.localize(keyBase + "gauge"), true)); - - for (Entry entry : entries.entrySet()) - { - for (IPage page : entry.getValue().pageList) - { - if (page instanceof PageText) - { - ((PageText) page).setUnicodeFlag(true); - } - } - } - - return entries; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryRitual.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryRitual.java deleted file mode 100644 index 344069b3..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategoryRitual.java +++ /dev/null @@ -1,139 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.book; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.compat.guideapi.BookUtils; -import WayofTime.bloodmagic.compat.guideapi.entry.EntryText; -import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.RecipeHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.IPage; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.PageHelper; -import amerifrance.guideapi.page.PageText; - -public class CategoryRitual -{ - static String keyBase = "guide." + Constants.Mod.MODID + ".entry.ritual."; - - public static Map buildCategory() - { - Map entries = new LinkedHashMap(); - - addRitualPagesToEntries("intro", entries); - addRitualPagesToEntries("basics", entries); - - List ritualStonePages = new ArrayList(); - - IRecipe ritualStoneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.RITUAL_STONE)); - if (ritualStoneRecipe != null) - { - ritualStonePages.add(BookUtils.getPageForRecipe(ritualStoneRecipe)); - } - - ritualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ritualStone" + ".info.1"), 370)); - - for (int i = 1; i < 5; i++) - { - EnumRuneType type = EnumRuneType.values()[i]; - AltarRecipe scribeRecipe = RecipeHelper.getAltarRecipeForOutput(type.getScribeStack()); - if (scribeRecipe != null) - { - ritualStonePages.add(new PageAltarRecipe(scribeRecipe)); - } - } - - ritualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ritualStone" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "ritualStone"), new EntryText(ritualStonePages, TextHelper.localize(keyBase + "ritualStone"), true)); - - List masterRitualStonePages = new ArrayList(); - - IRecipe masterRitualStoneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModBlocks.RITUAL_CONTROLLER, 1, 0)); - if (masterRitualStoneRecipe != null) - { - masterRitualStonePages.add(BookUtils.getPageForRecipe(masterRitualStoneRecipe)); - } - - masterRitualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "masterRitualStone" + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + "masterRitualStone"), new EntryText(masterRitualStonePages, TextHelper.localize(keyBase + "masterRitualStone"), true)); - - List activationCrystalPages = new ArrayList(); - - activationCrystalPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "activationCrystal" + ".info.1"), 370)); - - AltarRecipe crystalRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(ModItems.ACTIVATION_CRYSTAL)); - if (crystalRecipe != null) - { - activationCrystalPages.add(new PageAltarRecipe(crystalRecipe)); - } - - activationCrystalPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "activationCrystal" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "activationCrystal"), new EntryText(activationCrystalPages, TextHelper.localize(keyBase + "activationCrystal"), true)); - - List divinerPages = new ArrayList(); - - divinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "diviner" + ".info.1"), 370)); - - IRecipe divinerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModItems.RITUAL_DIVINER)); - if (divinerRecipe != null) - { - divinerPages.add(BookUtils.getPageForRecipe(divinerRecipe)); - } - - divinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "diviner" + ".info.2"), 370)); - entries.put(new ResourceLocation(keyBase + "diviner"), new EntryText(divinerPages, TextHelper.localize(keyBase + "diviner"), true)); - - addRitualPagesToEntries("fullSpring", entries); - addRitualPagesToEntries("lava", entries); - addRitualPagesToEntries("greenGrove", entries); - addRitualPagesToEntries("magnetism", entries); - addRitualPagesToEntries("crusher", entries); - addRitualPagesToEntries("highJump", entries); - addRitualPagesToEntries("speed", entries); - addRitualPagesToEntries("wellOfSuffering", entries); - addRitualPagesToEntries("featheredKnife", entries); - addRitualPagesToEntries("regen", entries); - addRitualPagesToEntries("harvest", entries); - addRitualPagesToEntries("interdiction", entries); - addRitualPagesToEntries("containment", entries); - addRitualPagesToEntries("suppression", entries); - addRitualPagesToEntries("expulsion", entries); - addRitualPagesToEntries("zephyr", entries); - addRitualPagesToEntries("laying", entries); - addRitualPagesToEntries("timberman", entries); - addRitualPagesToEntries("meteor", entries); - addRitualPagesToEntries("downgrade", entries); - - for (Entry entry : entries.entrySet()) - { - for (IPage page : entry.getValue().pageList) - { - if (page instanceof PageText) - { - ((PageText) page).setUnicodeFlag(true); - } - } - } - - return entries; - } - - public static void addRitualPagesToEntries(String name, Map entries) - { - List pages = new ArrayList(); - pages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + name + ".info"), 370)); - entries.put(new ResourceLocation(keyBase + name), new EntryText(pages, TextHelper.localize(keyBase + name), true)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategorySpell.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategorySpell.java deleted file mode 100644 index 52aaa64d..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/CategorySpell.java +++ /dev/null @@ -1,20 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.book; - -import WayofTime.bloodmagic.api.Constants; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import net.minecraft.util.ResourceLocation; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -public class CategorySpell -{ - public static Map buildCategory() - { - Map entries = new LinkedHashMap(); - String keyBase = Constants.Mod.DOMAIN + "spell_"; - - return entries; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/package-info.java deleted file mode 100644 index 45901a67..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/book/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.guideapi.book; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/entry/EntryText.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/entry/EntryText.java deleted file mode 100644 index f14b372f..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/entry/EntryText.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.entry; - -import amerifrance.guideapi.api.IPage; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.entry.EntryResourceLocation; -import amerifrance.guideapi.gui.GuiBase; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Collections; -import java.util.List; - -public class EntryText extends EntryResourceLocation -{ - - public EntryText(List pageList, String unlocEntryName, boolean unicode) - { - super(pageList, unlocEntryName, new ResourceLocation("bloodmagicguide", "textures/gui/bullet_point.png"), unicode); - } - - public EntryText(List pageList, String unlocEntryName) - { - this(pageList, unlocEntryName, false); - } - - @Override - @SideOnly(Side.CLIENT) - public void drawExtras(Book book, CategoryAbstract category, int entryX, int entryY, int entryWidth, int entryHeight, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(image); - GuiHelper.drawSizedIconWithoutColor(entryX + 4, entryY + 2, 8, 8, 1F); - - boolean startFlag = fontRendererObj.getUnicodeFlag(); - fontRendererObj.setUnicodeFlag(false); - - // Cutting code ripped from GuiButtonExt#drawButton(...) - int strWidth = fontRendererObj.getStringWidth(getLocalizedName()); - boolean cutString = false; - - if (strWidth > guiBase.xSize - 80 && strWidth > fontRendererObj.getStringWidth("...")) - cutString = true; - - if (GuiHelper.isMouseBetween(mouseX, mouseY, entryX, entryY, entryWidth, entryHeight) && cutString) - { - - guiBase.drawHoveringText(Collections.singletonList(getLocalizedName()), entryX, entryY + 12); - fontRendererObj.setUnicodeFlag(unicode); - } - - fontRendererObj.setUnicodeFlag(startFlag); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/entry/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/entry/package-info.java deleted file mode 100644 index 6e1727c4..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/entry/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.guideapi.entry; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/package-info.java deleted file mode 100644 index 2469a557..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -//@ParametersAreNonnullByDefault -//@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.guideapi; - -// -//import mcp.MethodsReturnNonnullByDefault; -// -//import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageAlchemyArray.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageAlchemyArray.java deleted file mode 100644 index 0c2defc9..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageAlchemyArray.java +++ /dev/null @@ -1,100 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.page; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import lombok.AllArgsConstructor; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.impl.Page; -import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.gui.GuiBase; - -@AllArgsConstructor -public class PageAlchemyArray extends Page -{ - public static final double scale = 58d / 256d; - public List arrayResources = new ArrayList(); - public final ItemStack inputStack; - public final ItemStack catalystStack; - - public final ItemStack outputStack; - - public PageAlchemyArray(List resources, ItemStack inputStack, ItemStack catalystStack) - { - this(resources, inputStack, catalystStack, null); - } - - public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack, ItemStack outputStack) - { - this(Arrays.asList(resource), inputStack, catalystStack, outputStack); - } - - public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack) - { - this(Arrays.asList(resource), inputStack, catalystStack); - } - - @Override - @SideOnly(Side.CLIENT) - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) - { - int x = guiLeft + 65; - int y = guiTop + 30; - - Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/alchemyArrayCrafting.png")); - guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack == null ? 0 : 26)); - - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); - - for (ResourceLocation arrayResource : arrayResources) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(arrayResource); - GlStateManager.pushMatrix(); - GlStateManager.translate(x + 2, y + 28, 0); - GlStateManager.scale(scale, scale, scale); - guiBase.drawTexturedModalRect(0, 0, 0, 0, 256, 256); - GlStateManager.popMatrix(); - } - - int inputX = x + 3; - int inputY = y + 3; - GuiHelper.drawItemStack(inputStack, inputX, inputY); - - int catalystX = x + 43; - int catalystY = y + 3; - GuiHelper.drawItemStack(catalystStack, catalystX, catalystY); - - if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) - { - guiBase.renderToolTip(inputStack, mouseX, mouseY); - } - - if (GuiHelper.isMouseBetween(mouseX, mouseY, catalystX, catalystY, 15, 15)) - { - guiBase.renderToolTip(catalystStack, mouseX, mouseY); - } - - if (outputStack != null) - { - int outputX = x + 43; - int outputY = y + 95; - - GuiHelper.drawItemStack(outputStack, outputX, outputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) - { - guiBase.renderToolTip(outputStack, mouseX, mouseY); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageAltarRecipe.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageAltarRecipe.java deleted file mode 100644 index 72369163..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageAltarRecipe.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.page; - -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.impl.Page; -import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.gui.GuiBase; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class PageAltarRecipe extends Page -{ - - public List input; - public ItemStack output; - public int tier; - public int bloodRequired; - - public PageAltarRecipe(AltarRecipeRegistry.AltarRecipe recipe) - { - this.input = ItemStackWrapper.toStackList(recipe.getInput()); - this.output = recipe.getOutput(); - this.tier = recipe.getMinTier().toInt(); - this.bloodRequired = recipe.getSyphon(); - } - - @Override - @SideOnly(Side.CLIENT) - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png")); - guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104); - - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.bloodAltar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); - - int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1; - int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20 - GuiHelper.drawItemStack(input.get(0), inputX, inputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) - { - guiBase.renderToolTip(input.get(0), mouseX, mouseY); - } - - if (output == null) - { - output = new ItemStack(Blocks.BARRIER); - } - int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1; - int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20 - GuiHelper.drawItemStack(output, outputX, outputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) - { - guiBase.renderToolTip(output, outputX, outputY); - } - - if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER)) - { - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); - guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); - } - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.tier", String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.lp", String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageTartaricForgeRecipe.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageTartaricForgeRecipe.java deleted file mode 100644 index a63e14d6..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/PageTartaricForgeRecipe.java +++ /dev/null @@ -1,143 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.page; - -import java.util.List; -import java.util.Random; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.util.helper.TextHelper; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.impl.Page; -import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.gui.GuiBase; - -public class PageTartaricForgeRecipe extends Page -{ - public List input; - public ItemStack output; - public int tier; - public double minimumWill; - public double drainedWill; - - private int cycleIdx = 0; - private Random rand = new Random(); - - public PageTartaricForgeRecipe(TartaricForgeRecipe recipe) - { - this.input = recipe.getInput(); - this.output = recipe.getRecipeOutput(); - this.tier = 0; - this.minimumWill = recipe.getMinimumSouls(); - this.drainedWill = recipe.getSoulsDrained(); - } - - @SuppressWarnings("unchecked") - @Override - @SideOnly(Side.CLIENT) - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/soulForge.png")); - guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104); - - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.soulForge"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); - -// int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1; -// int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20 - - for (int y = 0; y < 2; y++) - { - for (int x = 0; x < 2; x++) - { - int stackX = (x + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1; - int stackY = (y + 1) * 20 + (guiTop + guiBase.ySize / 5) - 1; - Object component = input.size() > y * 2 + x ? input.get(y * 2 + x) : null;//recipe.getInput()[y * 2 + x]; - if (component != null) - { - if (component instanceof ItemStack) - { - ItemStack input = (ItemStack) component; - if (input.getItemDamage() == OreDictionary.WILDCARD_VALUE) - input.setItemDamage(0); - - GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { -// tooltips = GuiHelper.getTooltip((ItemStack) component); - guiBase.renderToolTip((ItemStack) component, mouseX, mouseY); - } - } else if (component instanceof Integer) - { - List list = OrbRegistry.getOrbsDownToTier((Integer) component); - if (!list.isEmpty()) - { - ItemStack stack = list.get(getRandomizedCycle(x + (y * 2), list.size())); - GuiHelper.drawItemStack(stack, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { -// tooltips = GuiHelper.getTooltip(stack); - guiBase.renderToolTip(stack, mouseX, mouseY); - } - } - } else - { - List list = (List) component; - if (!list.isEmpty()) - { - ItemStack stack = list.get(getRandomizedCycle(x + (y * 2), list.size())); - GuiHelper.drawItemStack(stack, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { -// tooltips = GuiHelper.getTooltip(stack); - guiBase.renderToolTip(stack, mouseX, mouseY); - } - } - } - } - } - } - -// GuiHelper.drawItemStack(input.get(0), inputX, inputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) -// { -// guiBase.renderToolTip(input.get(0), mouseX, mouseY); -// } - - if (output == null) - { - output = new ItemStack(Blocks.BARRIER); - } - int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1; - int outputY = (20) + (guiTop + guiBase.xSize / 5) + 10; // 1 * 20 - GuiHelper.drawItemStack(output, outputX, outputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) - { - guiBase.renderToolTip(output, outputX, outputY); - } - - if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER)) - { - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); -// guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); - } - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.minimumWill", String.valueOf(minimumWill)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 - 15, 0); - guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.drainedWill", String.valueOf(drainedWill)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); - } - - protected int getRandomizedCycle(int index, int max) - { - rand.setSeed(index); - return (index + rand.nextInt(max) + cycleIdx) % max; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/package-info.java deleted file mode 100644 index 01727b53..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.guideapi.page; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/ShapedBloodOrbRecipeRenderer.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/ShapedBloodOrbRecipeRenderer.java deleted file mode 100644 index e142a2f0..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/ShapedBloodOrbRecipeRenderer.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer; - -import java.util.List; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.gui.GuiBase; -import amerifrance.guideapi.page.reciperenderer.BasicRecipeRenderer; - -// TODO: Fix rendering of recipe -public class ShapedBloodOrbRecipeRenderer extends BasicRecipeRenderer -{ - public ShapedBloodOrbRecipeRenderer(ShapedBloodOrbRecipe recipe) - { - super(recipe); - } - - @SuppressWarnings("unchecked") - @Override - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) - { - super.draw(book, category, entry, guiLeft, guiTop, mouseX, mouseY, guiBase, fontRendererObj); - for (int y = 0; y < recipe.height; y++) - { - for (int x = 0; x < recipe.width; x++) - { - int stackX = (x + 1) * 17 + (guiLeft + 29); - int stackY = (y + 1) * 17 + (guiTop + 40); - Object component = recipe.getInput()[y * recipe.width + x]; - if (component != null) - { - if (component instanceof ItemStack) - { - ItemStack input = (ItemStack) component; - if (input.getItemDamage() == OreDictionary.WILDCARD_VALUE) - input.setItemDamage(0); - - GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { - tooltips = GuiHelper.getTooltip((ItemStack) component); - } - } else if (component instanceof Integer) - { - List list = OrbRegistry.getOrbsDownToTier((Integer) component); - if (!list.isEmpty()) - { - ItemStack stack = list.get(getRandomizedCycle(x + (y * 3), list.size())); - GuiHelper.drawItemStack(stack, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { - tooltips = GuiHelper.getTooltip(stack); - } - } - } else - { - List list = (List) component; - if (!list.isEmpty()) - { - ItemStack stack = list.get(getRandomizedCycle(x + (y * 3), list.size())); - GuiHelper.drawItemStack(stack, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { - tooltips = GuiHelper.getTooltip(stack); - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/ShapelessBloodOrbRecipeRenderer.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/ShapelessBloodOrbRecipeRenderer.java deleted file mode 100644 index 85684219..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/ShapelessBloodOrbRecipeRenderer.java +++ /dev/null @@ -1,92 +0,0 @@ -package WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer; - -import java.util.List; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import amerifrance.guideapi.api.impl.Book; -import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.api.util.TextHelper; -import amerifrance.guideapi.gui.GuiBase; -import amerifrance.guideapi.page.reciperenderer.BasicRecipeRenderer; - -public class ShapelessBloodOrbRecipeRenderer extends BasicRecipeRenderer -{ - - public ShapelessBloodOrbRecipeRenderer(ShapelessBloodOrbRecipe recipe) - { - super(recipe); - } - - @SuppressWarnings("unchecked") - @Override - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) - { - super.draw(book, category, entry, guiLeft, guiTop, mouseX, mouseY, guiBase, fontRendererObj); - for (int y = 0; y < 3; y++) - { - for (int x = 0; x < 3; x++) - { - int i = 3 * y + x; - if (i >= recipe.getRecipeSize()) - { - } else - { - int stackX = (x + 1) * 17 + (guiLeft + 29); - int stackY = (y + 1) * 17 + (guiTop + 40); - Object component = recipe.getInput().get(i); - if (component != null) - { - if (component instanceof ItemStack) - { - ItemStack input = (ItemStack) component; - if (input.getItemDamage() == OreDictionary.WILDCARD_VALUE) - input.setItemDamage(0); - - GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { - tooltips = GuiHelper.getTooltip((ItemStack) component); - } - } else if (component instanceof Integer) - { - List list = OrbRegistry.getOrbsDownToTier((Integer) component); - if (!list.isEmpty()) - { - ItemStack stack = list.get(getRandomizedCycle(x + (y * 3), list.size())); - GuiHelper.drawItemStack(stack, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { - tooltips = GuiHelper.getTooltip(stack); - } - } - } else - { - List list = (List) component; - if (!list.isEmpty()) - { - ItemStack stack = list.get(getRandomizedCycle(x + (y * 3), list.size())); - GuiHelper.drawItemStack(stack, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) - { - tooltips = GuiHelper.getTooltip(stack); - } - } - } - } - } - } - } - } - - @Override - protected String getRecipeName() - { - return TextHelper.localizeEffect("text.shapeless.crafting"); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/package-info.java deleted file mode 100644 index e108a88f..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/page/recipeRenderer/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java b/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java deleted file mode 100644 index 9399aee5..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java +++ /dev/null @@ -1,102 +0,0 @@ -package WayofTime.bloodmagic.compat.jei; - -import java.util.Map; - -import javax.annotation.Nonnull; - -import mezz.jei.api.*; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades; -import WayofTime.bloodmagic.client.gui.GuiSoulForge; -import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingCategory; -import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeHandler; -import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeMaker; -import WayofTime.bloodmagic.compat.jei.alchemyTable.AlchemyTableRecipeCategory; -import WayofTime.bloodmagic.compat.jei.alchemyTable.AlchemyTableRecipeHandler; -import WayofTime.bloodmagic.compat.jei.alchemyTable.AlchemyTableRecipeMaker; -import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeCategory; -import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeHandler; -import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeMaker; -import WayofTime.bloodmagic.compat.jei.armourDowngrade.ArmourDowngradeRecipeCategory; -import WayofTime.bloodmagic.compat.jei.armourDowngrade.ArmourDowngradeRecipeHandler; -import WayofTime.bloodmagic.compat.jei.armourDowngrade.ArmourDowngradeRecipeMaker; -import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeCategory; -import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeHandler; -import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeMaker; -import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeCategory; -import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeHandler; -import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeMaker; -import WayofTime.bloodmagic.compat.jei.orb.ShapedOrbRecipeHandler; -import WayofTime.bloodmagic.compat.jei.orb.ShapelessOrbRecipeHandler; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; - -@JEIPlugin -public class BloodMagicPlugin extends BlankModPlugin -{ - public static IJeiHelpers jeiHelper; - - @Override - public void register(@Nonnull IModRegistry registry) - { - jeiHelper = registry.getJeiHelpers(); - - registry.addRecipeCategories(new AltarRecipeCategory(), new BindingRecipeCategory(), new AlchemyArrayCraftingCategory(), new TartaricForgeRecipeCategory(), new AlchemyTableRecipeCategory(), new ArmourDowngradeRecipeCategory()); - - registry.addRecipeHandlers(new AltarRecipeHandler(), new BindingRecipeHandler(), new AlchemyArrayCraftingRecipeHandler(), new TartaricForgeRecipeHandler(), new AlchemyTableRecipeHandler(), new ArmourDowngradeRecipeHandler(), new ShapedOrbRecipeHandler(), new ShapelessOrbRecipeHandler()); - - registry.addRecipes(AltarRecipeMaker.getRecipes()); - registry.addRecipes(BindingRecipeMaker.getRecipes()); - registry.addRecipes(AlchemyArrayCraftingRecipeMaker.getRecipes()); - registry.addRecipes(TartaricForgeRecipeMaker.getRecipes()); - registry.addRecipes(AlchemyTableRecipeMaker.getRecipes()); - registry.addRecipes(ArmourDowngradeRecipeMaker.getRecipes()); - - registry.addDescription(new ItemStack(ModItems.ALTAR_MAKER), "jei.BloodMagic.desc.altarBuilder"); - registry.addDescription(new ItemStack(ModItems.MONSTER_SOUL), "jei.BloodMagic.desc.demonicWill"); - - jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.BLOOD_LIGHT)); - jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.SPECTRAL_BLOCK)); - jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.PHANTOM_BLOCK)); - jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.ALCHEMY_ARRAY)); - jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.DIMENSIONAL_PORTAL, 1, OreDictionary.WILDCARD_VALUE)); - - for (Map.Entry entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet()) - { - String key = entry.getKey(); - int maxLevel = entry.getValue(); - for (int i = 0; i < maxLevel - 1; i++) - { - ItemStack stack = new ItemStack(ModItems.UPGRADE_TOME); - LivingUpgrades.setKey(stack, key); - LivingUpgrades.setLevel(stack, i); - jeiHelper.getItemBlacklist().addItemToBlacklist(stack); - } - } - - jeiHelper.getSubtypeRegistry().useNbtForSubtypes(Item.getItemFromBlock(ModBlocks.BLOOD_TANK)); - - registry.addRecipeClickArea(GuiSoulForge.class, 115, 15, 16, 88, Constants.Compat.JEI_CATEGORY_SOULFORGE); - - registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.ALTAR), Constants.Compat.JEI_CATEGORY_ALTAR); - registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.SOUL_FORGE), Constants.Compat.JEI_CATEGORY_SOULFORGE); - registry.addRecipeCategoryCraftingItem(new ItemStack(ModItems.ARCANE_ASHES), Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY); - registry.addRecipeCategoryCraftingItem(new ItemStack(ModItems.ARCANE_ASHES), Constants.Compat.JEI_CATEGORY_BINDING); - registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.ALCHEMY_TABLE), Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE); - registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.RITUAL_CONTROLLER), Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE); - - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.OWNER_UUID); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.OWNER_NAME); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.USES); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.SOULS); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.X_COORD); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.Y_COORD); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.Z_COORD); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.DIMENSION_ID); - jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.ITEM_INVENTORY); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/CompatibilityJustEnoughItems.java b/src/main/java/WayofTime/bloodmagic/compat/jei/CompatibilityJustEnoughItems.java deleted file mode 100644 index dc95a10d..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/CompatibilityJustEnoughItems.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.compat.jei; - -import WayofTime.bloodmagic.compat.ICompatibility; - -public class CompatibilityJustEnoughItems implements ICompatibility -{ - @Override - public void loadCompatibility(InitializationPhase phase) - { - - } - - @Override - public String getModId() - { - return "JEI"; - } - - @Override - public boolean enableCompat() - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingCategory.java deleted file mode 100644 index 72653f5f..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingCategory.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyArray; - -import javax.annotation.Nonnull; - -import mezz.jei.api.gui.IDrawable; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.recipe.IRecipeCategory; -import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class AlchemyArrayCraftingCategory implements IRecipeCategory -{ - private static final int INPUT_SLOT = 0; - private static final int CATALYST_SLOT = 1; - private static final int OUTPUT_SLOT = 2; - - @Nonnull - private final IDrawable background = BloodMagicPlugin.jeiHelper.getGuiHelper().createDrawable(new ResourceLocation(Constants.Mod.DOMAIN + "gui/jei/binding.png"), 0, 0, 100, 30); - @Nonnull - private final String localizedName = TextHelper.localize("jei.BloodMagic.recipe.alchemyArrayCrafting"); - - @Nonnull - @Override - public String getUid() - { - return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY; - } - - @Nonnull - @Override - public String getTitle() - { - return localizedName; - } - - @Nonnull - @Override - public IDrawable getBackground() - { - return background; - } - - @Override - public void drawExtras(Minecraft minecraft) - { - - } - - @Override - public void drawAnimations(Minecraft minecraft) - { - - } - - @Override - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) - { - recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5); - recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3); - recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5); - - if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI) - { - AlchemyArrayCraftingRecipeJEI alchemyArrayWrapper = (AlchemyArrayCraftingRecipeJEI) recipeWrapper; - recipeLayout.getItemStacks().set(INPUT_SLOT, alchemyArrayWrapper.getInputs()); - recipeLayout.getItemStacks().set(CATALYST_SLOT, alchemyArrayWrapper.getCatalyst()); - recipeLayout.getItemStacks().set(OUTPUT_SLOT, alchemyArrayWrapper.getOutputs()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeHandler.java deleted file mode 100644 index 0d6f2acb..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyArray; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import WayofTime.bloodmagic.api.Constants; - -public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler -{ - @Nonnull - @Override - public Class getRecipeClass() - { - return AlchemyArrayCraftingRecipeJEI.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY; - } - - @Override - public String getRecipeCategoryUid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) - { - return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) - { - return recipe; - } - - @Override - public boolean isRecipeValid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) - { - return recipe.getInputs().size() > 0 && recipe.getOutputs().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeJEI.java deleted file mode 100644 index fa74d805..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeJEI.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyArray; - -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import mezz.jei.api.recipe.BlankRecipeWrapper; -import net.minecraft.item.ItemStack; - -public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper -{ - @Nonnull - private final List inputs; - - @Nullable - private final ItemStack catalyst; - - @Nonnull - private final ItemStack output; - - public AlchemyArrayCraftingRecipeJEI(@Nonnull List input, @Nullable ItemStack catalyst, @Nonnull ItemStack output) - { - this.inputs = input; - this.catalyst = catalyst; - this.output = output; - } - - @Override - @Nonnull - public List getInputs() - { - return inputs; - } - - public ItemStack getCatalyst() - { - return catalyst; - } - - @Override - @Nonnull - public List getOutputs() - { - return Collections.singletonList(output); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeMaker.java deleted file mode 100644 index ad94d56e..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/AlchemyArrayCraftingRecipeMaker.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyArray; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Nonnull; - -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffectCrafting; -import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; - -import com.google.common.collect.BiMap; - -public class AlchemyArrayCraftingRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - Map, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes(); - - ArrayList recipes = new ArrayList(); - - for (Map.Entry, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet()) - { - List input = itemStackAlchemyArrayRecipeEntry.getValue().getInput(); - BiMap catalystMap = itemStackAlchemyArrayRecipeEntry.getValue().catalystMap; - - for (Map.Entry entry : catalystMap.entrySet()) - { - ItemStack catalyst = entry.getKey().toStack(); - if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectCrafting) - { - ItemStack output = ((AlchemyArrayEffectCrafting) itemStackAlchemyArrayRecipeEntry.getValue().getAlchemyArrayEffectForCatalyst(catalyst)).getOutputStack(); - - AlchemyArrayCraftingRecipeJEI recipe = new AlchemyArrayCraftingRecipeJEI(input, catalyst, output); - recipes.add(recipe); - } - } - } - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/package-info.java deleted file mode 100644 index b9a88570..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyArray/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.alchemyArray; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeCategory.java deleted file mode 100644 index 7f4c84d7..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeCategory.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyTable; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import mezz.jei.api.gui.ICraftingGridHelper; -import mezz.jei.api.gui.IDrawable; -import mezz.jei.api.gui.IGuiItemStackGroup; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.recipe.IRecipeCategory; -import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class AlchemyTableRecipeCategory implements IRecipeCategory -{ - private static final int OUTPUT_SLOT = 0; - private static final int ORB_SLOT = 1; - private static final int INPUT_SLOT = 2; - - @Nonnull - private final IDrawable background = BloodMagicPlugin.jeiHelper.getGuiHelper().createDrawable(new ResourceLocation(Constants.Mod.DOMAIN + "gui/jei/alchemyTable.png"), 0, 0, 118, 40); - @Nonnull - private final String localizedName = TextHelper.localize("jei.BloodMagic.recipe.alchemyTable"); - @Nonnull - private final ICraftingGridHelper craftingGridHelper; - - public AlchemyTableRecipeCategory() - { - craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT); - } - - @Nonnull - @Override - public String getUid() - { - return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE; - } - - @Nonnull - @Override - public String getTitle() - { - return localizedName; - } - - @Nonnull - @Override - public IDrawable getBackground() - { - return background; - } - - @Override - public void drawExtras(Minecraft minecraft) - { - - } - - @Override - public void drawAnimations(Minecraft minecraft) - { - - } - - @Override - @SuppressWarnings("unchecked") - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) - { - IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); - - guiItemStacks.init(OUTPUT_SLOT, false, 91, 13); - guiItemStacks.init(ORB_SLOT, true, 60, 0); - - for (int y = 0; y < 3; ++y) - { - for (int x = 0; x < 3; ++x) - { - int index = INPUT_SLOT + x + (y * 3); - guiItemStacks.init(index, true, x * 18, y * 18 - 18); - } - } - - if (recipeWrapper instanceof AlchemyTableRecipeJEI) - { - AlchemyTableRecipeJEI recipe = (AlchemyTableRecipeJEI) recipeWrapper; - guiItemStacks.set(ORB_SLOT, (ArrayList) recipe.getInputs().get(1)); - craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs()); - craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 3, 2); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeHandler.java deleted file mode 100644 index 91755902..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyTable; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import WayofTime.bloodmagic.api.Constants; - -public class AlchemyTableRecipeHandler implements IRecipeHandler -{ - @Nonnull - @Override - public Class getRecipeClass() - { - return AlchemyTableRecipeJEI.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE; - } - - @Override - public String getRecipeCategoryUid(@Nonnull AlchemyTableRecipeJEI recipe) - { - return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyTableRecipeJEI recipe) - { - return recipe; - } - - @Override - public boolean isRecipeValid(@Nonnull AlchemyTableRecipeJEI recipe) - { - return recipe.getInputs().get(0).size() > 0 && recipe.getOutputs().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeJEI.java deleted file mode 100644 index e0a00fc9..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeJEI.java +++ /dev/null @@ -1,61 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyTable; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import lombok.Getter; -import mezz.jei.api.recipe.BlankRecipeWrapper; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class AlchemyTableRecipeJEI extends BlankRecipeWrapper -{ - @Getter - private AlchemyTableRecipe recipe; - -// @Getter -// private ArrayList validGems = new ArrayList(); - - public AlchemyTableRecipeJEI(AlchemyTableRecipe recipe) - { - this.recipe = recipe; - } - - @Override - @Nonnull - public List getInputs() - { - ArrayList ret = new ArrayList(); - ret.add(recipe.getInput()); - ret.add(OrbRegistry.getOrbsDownToTier(recipe.getTierRequired())); - return ret; - } - - @Override - @Nonnull - public List getOutputs() - { - return Collections.singletonList(recipe.getRecipeOutput(new ArrayList())); - } - - @Nullable - @Override - public List getTooltipStrings(int mouseX, int mouseY) - { - ArrayList ret = new ArrayList(); - if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34) - { - ret.add(TextHelper.localize("jei.BloodMagic.recipe.lpDrained", recipe.getLpDrained())); - ret.add(TextHelper.localize("jei.BloodMagic.recipe.ticksRequired", recipe.getTicksRequired())); - return ret; - } - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeMaker.java deleted file mode 100644 index 8dae28f8..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/AlchemyTableRecipeMaker.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.alchemyTable; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; -import WayofTime.bloodmagic.api.registry.AlchemyTableRecipeRegistry; - -public class AlchemyTableRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - List recipeList = AlchemyTableRecipeRegistry.getRecipeList(); - ArrayList recipes = new ArrayList(); - - for (AlchemyTableRecipe recipe : recipeList) - recipes.add(new AlchemyTableRecipeJEI(recipe)); - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/package-info.java deleted file mode 100644 index c7a5c86b..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/alchemyTable/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.alchemyTable; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeCategory.java deleted file mode 100644 index a4a7fc70..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeCategory.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.altar; - -import javax.annotation.Nonnull; - -import java.util.List; - -import mezz.jei.api.gui.IDrawable; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.recipe.IRecipeCategory; -import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class AltarRecipeCategory implements IRecipeCategory -{ - private static final int INPUT_SLOT = 0; - private static final int OUTPUT_SLOT = 1; - - @Nonnull - private final IDrawable background = BloodMagicPlugin.jeiHelper.getGuiHelper().createDrawable(new ResourceLocation(Constants.Mod.DOMAIN + "gui/jei/altar.png"), 3, 4, 155, 65); - @Nonnull - private final String localizedName = TextHelper.localize("jei.BloodMagic.recipe.altar"); - - @Nonnull - @Override - public String getUid() - { - return Constants.Compat.JEI_CATEGORY_ALTAR; - } - - @Nonnull - @Override - public String getTitle() - { - return localizedName; - } - - @Nonnull - @Override - public IDrawable getBackground() - { - return background; - } - - @Override - public void drawExtras(Minecraft minecraft) - { - - } - - @Override - public void drawAnimations(Minecraft minecraft) - { - - } - - @Override - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) - { - recipeLayout.getItemStacks().init(INPUT_SLOT, true, 31, 0); - recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 125, 30); - - if (recipeWrapper instanceof AltarRecipeJEI) - { - AltarRecipeJEI altarRecipeWrapper = (AltarRecipeJEI) recipeWrapper; - List> inputs = altarRecipeWrapper.getInputs(); - recipeLayout.getItemStacks().set(INPUT_SLOT, inputs.get(0)); - recipeLayout.getItemStacks().set(OUTPUT_SLOT, altarRecipeWrapper.getOutputs()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeHandler.java deleted file mode 100644 index dc414295..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.altar; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import WayofTime.bloodmagic.api.Constants; - -public class AltarRecipeHandler implements IRecipeHandler -{ - @Nonnull - @Override - public Class getRecipeClass() - { - return AltarRecipeJEI.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return Constants.Compat.JEI_CATEGORY_ALTAR; - } - - @Override - public String getRecipeCategoryUid(@Nonnull AltarRecipeJEI recipe) - { - return Constants.Compat.JEI_CATEGORY_ALTAR; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull AltarRecipeJEI recipe) - { - return recipe; - } - - @Override - public boolean isRecipeValid(@Nonnull AltarRecipeJEI recipe) - { - return recipe.getInputs().size() > 0 && recipe.getOutputs().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeJEI.java deleted file mode 100644 index 7b9e00cc..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeJEI.java +++ /dev/null @@ -1,71 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.altar; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import WayofTime.bloodmagic.util.helper.NumeralHelper; -import mezz.jei.api.recipe.BlankRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class AltarRecipeJEI extends BlankRecipeWrapper -{ - @Nonnull - private final List input; - - @Nonnull - private final ItemStack output; - - private final String[] infoString; - private final int consumptionRate; - private final int drainRate; - - public AltarRecipeJEI(@Nonnull List input, @Nonnull ItemStack output, int tier, int requiredLP, int consumptionRate, int drainRate) - { - this.input = input; - this.output = output; - - this.infoString = new String[] { TextHelper.localize("jei.BloodMagic.recipe.requiredTier", NumeralHelper.toRoman(tier)), TextHelper.localize("jei.BloodMagic.recipe.requiredLP", requiredLP) }; - this.consumptionRate = consumptionRate; - this.drainRate = drainRate; - } - - @Override - public List> getInputs() - { - return Collections.singletonList(input); - } - - @Override - public List getOutputs() - { - return Collections.singletonList(output); - } - - @Nullable - @Override - public List getTooltipStrings(int mouseX, int mouseY) - { - ArrayList ret = new ArrayList(); - if (mouseX >= 13 && mouseX <= 64 && mouseY >= 27 && mouseY <= 58) - { - ret.add(TextHelper.localize("jei.BloodMagic.recipe.consumptionRate", consumptionRate)); - ret.add(TextHelper.localize("jei.BloodMagic.recipe.drainRate", drainRate)); - return ret; - } - return null; - } - - @Override - public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) - { - minecraft.fontRendererObj.drawString(infoString[0], 90 - minecraft.fontRendererObj.getStringWidth(infoString[0]) / 2, 0, Color.gray.getRGB()); - minecraft.fontRendererObj.drawString(infoString[1], 90 - minecraft.fontRendererObj.getStringWidth(infoString[1]) / 2, 10, Color.gray.getRGB()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeMaker.java deleted file mode 100644 index 190629df..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/AltarRecipeMaker.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.altar; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Nonnull; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; -import net.minecraftforge.common.ForgeModContainer; - -public class AltarRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - Map, AltarRecipeRegistry.AltarRecipe> altarMap = AltarRecipeRegistry.getRecipes(); - - ArrayList recipes = new ArrayList(); - - for (Map.Entry, AltarRecipeRegistry.AltarRecipe> itemStackAltarRecipeEntry : altarMap.entrySet()) - { - // Make sure input is not a Blood Orb. If it is, the recipe is for a filling orb, and we don't want that. - if (!(itemStackAltarRecipeEntry.getKey().get(0).toStack().getItem() instanceof IBloodOrb)) - { - List input = ItemStackWrapper.toStackList(itemStackAltarRecipeEntry.getValue().getInput()); - ItemStack output = itemStackAltarRecipeEntry.getValue().getOutput(); - int requiredTier = itemStackAltarRecipeEntry.getValue().getMinTier().toInt(); - int requiredLP = itemStackAltarRecipeEntry.getValue().getSyphon(); - int consumptionRate = itemStackAltarRecipeEntry.getValue().getConsumeRate(); - int drainRate = itemStackAltarRecipeEntry.getValue().getDrainRate(); - - if (output.getItem() == ForgeModContainer.getInstance().universalBucket && requiredLP == 1000) - output = BloodMagicAPI.getLifeEssenceBucket(); - - AltarRecipeJEI recipe = new AltarRecipeJEI(input, output, requiredTier, requiredLP, consumptionRate, drainRate); - recipes.add(recipe); - } - } - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/altar/package-info.java deleted file mode 100644 index 4fb6eef6..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/altar/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.altar; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeCategory.java deleted file mode 100644 index 83e8efd5..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeCategory.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.armourDowngrade; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import mezz.jei.api.gui.ICraftingGridHelper; -import mezz.jei.api.gui.IDrawable; -import mezz.jei.api.gui.IGuiItemStackGroup; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.recipe.IRecipeCategory; -import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ArmourDowngradeRecipeCategory implements IRecipeCategory -{ - private static final int OUTPUT_SLOT = 0; - private static final int KEY_SLOT = 1; - private static final int INPUT_SLOT = 2; - - @Nonnull - private final IDrawable background = BloodMagicPlugin.jeiHelper.getGuiHelper().createDrawable(new ResourceLocation(Constants.Mod.DOMAIN + "gui/jei/alchemyTable.png"), 0, 0, 118, 40); - @Nonnull - private final String localizedName = TextHelper.localize("jei.BloodMagic.recipe.armourDowngrade"); - @Nonnull - private final ICraftingGridHelper craftingGridHelper; - - public ArmourDowngradeRecipeCategory() - { - craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT); - } - - @Nonnull - @Override - public String getUid() - { - return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE; - } - - @Nonnull - @Override - public String getTitle() - { - return localizedName; - } - - @Nonnull - @Override - public IDrawable getBackground() - { - return background; - } - - @Override - public void drawExtras(Minecraft minecraft) - { - - } - - @Override - public void drawAnimations(Minecraft minecraft) - { - - } - - @Override - @SuppressWarnings("unchecked") - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) - { - IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); - - guiItemStacks.init(OUTPUT_SLOT, false, 91, 13); - guiItemStacks.init(KEY_SLOT, true, 60, 0); - - for (int y = 0; y < 3; ++y) - { - for (int x = 0; x < 3; ++x) - { - int index = INPUT_SLOT + x + (y * 3); - guiItemStacks.init(index, true, x * 18, y * 18 - 18); - } - } - - if (recipeWrapper instanceof ArmourDowngradeRecipeJEI) - { - ArmourDowngradeRecipeJEI recipe = (ArmourDowngradeRecipeJEI) recipeWrapper; - guiItemStacks.set(KEY_SLOT, (ArrayList) recipe.getInputs().get(1)); - craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs()); - craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 3, 2); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeHandler.java deleted file mode 100644 index 757f1c32..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.armourDowngrade; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import WayofTime.bloodmagic.api.Constants; - -public class ArmourDowngradeRecipeHandler implements IRecipeHandler -{ - @Nonnull - @Override - public Class getRecipeClass() - { - return ArmourDowngradeRecipeJEI.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE; - } - - @Nonnull - @Override - public String getRecipeCategoryUid(ArmourDowngradeRecipeJEI recipe) - { - return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull ArmourDowngradeRecipeJEI recipe) - { - return recipe; - } - - @Override - public boolean isRecipeValid(@Nonnull ArmourDowngradeRecipeJEI recipe) - { - return recipe.getInputs().get(0).size() > 0 && recipe.getOutputs().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeJEI.java deleted file mode 100644 index a66d53f6..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeJEI.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.armourDowngrade; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import lombok.Getter; -import mezz.jei.api.recipe.BlankRecipeWrapper; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades; -import WayofTime.bloodmagic.registry.ModItems; - -import com.google.common.collect.Lists; - -public class ArmourDowngradeRecipeJEI extends BlankRecipeWrapper -{ - @Getter - private LivingArmourDowngradeRecipe recipe; - -// @Getter -// private ArrayList validGems = new ArrayList(); - - public ArmourDowngradeRecipeJEI(LivingArmourDowngradeRecipe recipe) - { - this.recipe = recipe; - } - - @Override - @Nonnull - public List getInputs() - { - ArrayList ret = new ArrayList(); - ret.add(recipe.getInput()); - ret.add(Lists.newArrayList(recipe.getKey())); - return ret; - } - - @Override - @Nonnull - public List getOutputs() - { - ItemStack upgradeStack = new ItemStack(ModItems.UPGRADE_TOME); - LivingUpgrades.setUpgrade(upgradeStack, recipe.getRecipeOutput()); - return Collections.singletonList(upgradeStack); - } - - @Nullable - @Override - public List getTooltipStrings(int mouseX, int mouseY) - { -// ArrayList ret = new ArrayList(); -// if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34) -// { -// ret.add(TextHelper.localize("jei.BloodMagic.recipe.lpDrained", recipe.getLpDrained())); -// ret.add(TextHelper.localize("jei.BloodMagic.recipe.ticksRequired", recipe.getTicksRequired())); -// return ret; -// } - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeMaker.java deleted file mode 100644 index 5f28f6c3..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/ArmourDowngradeRecipeMaker.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.armourDowngrade; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe; -import WayofTime.bloodmagic.api.registry.LivingArmourDowngradeRecipeRegistry; - -public class ArmourDowngradeRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - List recipeList = LivingArmourDowngradeRecipeRegistry.getRecipeList(); - ArrayList recipes = new ArrayList(); - - for (LivingArmourDowngradeRecipe recipe : recipeList) - recipes.add(new ArmourDowngradeRecipeJEI(recipe)); - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/package-info.java deleted file mode 100644 index cd9bdf10..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/armourDowngrade/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.armourDowngrade; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeCategory.java deleted file mode 100644 index cc341cd1..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeCategory.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.binding; - -import javax.annotation.Nonnull; - -import mezz.jei.api.gui.IDrawable; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.recipe.IRecipeCategory; -import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class BindingRecipeCategory implements IRecipeCategory -{ - private static final int INPUT_SLOT = 0; - private static final int CATALYST_SLOT = 1; - private static final int OUTPUT_SLOT = 2; - - @Nonnull - private final IDrawable background = BloodMagicPlugin.jeiHelper.getGuiHelper().createDrawable(new ResourceLocation(Constants.Mod.DOMAIN + "gui/jei/binding.png"), 0, 0, 100, 30); - @Nonnull - private final String localizedName = TextHelper.localize("jei.BloodMagic.recipe.binding"); - - @Nonnull - @Override - public String getUid() - { - return Constants.Compat.JEI_CATEGORY_BINDING; - } - - @Nonnull - @Override - public String getTitle() - { - return localizedName; - } - - @Nonnull - @Override - public IDrawable getBackground() - { - return background; - } - - @Override - public void drawExtras(Minecraft minecraft) - { - - } - - @Override - public void drawAnimations(Minecraft minecraft) - { - - } - - @Override - @SuppressWarnings("unchecked") - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) - { - recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5); - recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3); - recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5); - - if (recipeWrapper instanceof BindingRecipeJEI) - { - BindingRecipeJEI bindingRecipe = (BindingRecipeJEI) recipeWrapper; - recipeLayout.getItemStacks().set(INPUT_SLOT, bindingRecipe.getInputs()); - recipeLayout.getItemStacks().set(CATALYST_SLOT, bindingRecipe.getCatalyst()); - recipeLayout.getItemStacks().set(OUTPUT_SLOT, bindingRecipe.getOutputs()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeHandler.java deleted file mode 100644 index 34981bf9..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.binding; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import WayofTime.bloodmagic.api.Constants; - -public class BindingRecipeHandler implements IRecipeHandler -{ - @Nonnull - @Override - public Class getRecipeClass() - { - return BindingRecipeJEI.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return Constants.Compat.JEI_CATEGORY_BINDING; - } - - @Override - public String getRecipeCategoryUid(@Nonnull BindingRecipeJEI recipe) - { - return Constants.Compat.JEI_CATEGORY_BINDING; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull BindingRecipeJEI recipe) - { - return recipe; - } - - @Override - public boolean isRecipeValid(@Nonnull BindingRecipeJEI recipe) - { - return recipe.getInputs().size() > 0 && recipe.getOutputs().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeJEI.java deleted file mode 100644 index 7081c921..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeJEI.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.binding; - -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.BlankRecipeWrapper; -import net.minecraft.item.ItemStack; - -public class BindingRecipeJEI extends BlankRecipeWrapper -{ - @Nonnull - private final List inputs; - - @Nonnull - private final ItemStack catalyst; - - @Nonnull - private final ItemStack output; - - @SuppressWarnings("unchecked") - public BindingRecipeJEI(@Nonnull List input, @Nonnull ItemStack catalyst, @Nonnull ItemStack output) - { - this.inputs = input; - this.catalyst = catalyst; - this.output = output; - } - - @Override - @Nonnull - public List getInputs() - { - return inputs; - } - - public ItemStack getCatalyst() - { - return catalyst; - } - - @Override - @Nonnull - public List getOutputs() - { - return Collections.singletonList(output); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeMaker.java deleted file mode 100644 index 2632cf9d..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/BindingRecipeMaker.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.binding; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.annotation.Nonnull; - -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectBinding; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; - -import com.google.common.collect.BiMap; - -public class BindingRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - Map, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes(); - - ArrayList recipes = new ArrayList(); - - for (Map.Entry, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet()) - { - List input = itemStackAlchemyArrayRecipeEntry.getValue().getInput(); - BiMap catalystMap = itemStackAlchemyArrayRecipeEntry.getValue().catalystMap; - - for (Map.Entry entry : catalystMap.entrySet()) - { - ItemStack catalyst = entry.getKey().toStack(); - if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectBinding) - { - ItemStack output = ((AlchemyArrayEffectBinding) itemStackAlchemyArrayRecipeEntry.getValue().getAlchemyArrayEffectForCatalyst(catalyst)).getOutputStack(); - - BindingRecipeJEI recipe = new BindingRecipeJEI(input, catalyst, output); - recipes.add(recipe); - } - } - } - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/binding/package-info.java deleted file mode 100644 index b63096ff..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/binding/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.binding; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java deleted file mode 100644 index 999d6e8f..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.forge; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import mezz.jei.api.gui.ICraftingGridHelper; -import mezz.jei.api.gui.IDrawable; -import mezz.jei.api.gui.IGuiItemStackGroup; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.recipe.IRecipeCategory; -import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class TartaricForgeRecipeCategory implements IRecipeCategory -{ - private static final int OUTPUT_SLOT = 0; - private static final int GEM_SLOT = 1; - private static final int INPUT_SLOT = 2; - - @Nonnull - private final IDrawable background = BloodMagicPlugin.jeiHelper.getGuiHelper().createDrawable(new ResourceLocation(Constants.Mod.DOMAIN + "gui/jei/soulForge.png"), 0, 0, 100, 40); - @Nonnull - private final String localizedName = TextHelper.localize("jei.BloodMagic.recipe.soulForge"); - @Nonnull - private final ICraftingGridHelper craftingGridHelper; - - public TartaricForgeRecipeCategory() - { - craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT); - } - - @Nonnull - @Override - public String getUid() - { - return Constants.Compat.JEI_CATEGORY_SOULFORGE; - } - - @Nonnull - @Override - public String getTitle() - { - return localizedName; - } - - @Nonnull - @Override - public IDrawable getBackground() - { - return background; - } - - @Override - public void drawExtras(Minecraft minecraft) - { - - } - - @Override - public void drawAnimations(Minecraft minecraft) - { - - } - - @Override - @SuppressWarnings("unchecked") - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) - { - IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); - - guiItemStacks.init(OUTPUT_SLOT, false, 73, 13); - guiItemStacks.init(GEM_SLOT, true, 42, 0); - - for (int y = 0; y < 3; ++y) - { - for (int x = 0; x < 3; ++x) - { - int index = INPUT_SLOT + x + (y * 3); - guiItemStacks.init(index, true, x * 18, y * 18); - } - } - - if (recipeWrapper instanceof TartaricForgeRecipeJEI) - { - TartaricForgeRecipeJEI recipe = (TartaricForgeRecipeJEI) recipeWrapper; - guiItemStacks.set(GEM_SLOT, (ArrayList) recipe.getInputs().get(1)); - craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs()); - craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 2, 3); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeHandler.java deleted file mode 100644 index e5c0ac05..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.forge; - -import WayofTime.bloodmagic.api.Constants; -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; - -import javax.annotation.Nonnull; - -public class TartaricForgeRecipeHandler implements IRecipeHandler -{ - @Nonnull - @Override - public Class getRecipeClass() - { - return TartaricForgeRecipeJEI.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return Constants.Compat.JEI_CATEGORY_SOULFORGE; - } - - @Override - public String getRecipeCategoryUid(@Nonnull TartaricForgeRecipeJEI recipe) - { - return Constants.Compat.JEI_CATEGORY_SOULFORGE; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull TartaricForgeRecipeJEI recipe) - { - return recipe; - } - - @Override - public boolean isRecipeValid(@Nonnull TartaricForgeRecipeJEI recipe) - { - return recipe.getInputs().get(0).size() > 0 && recipe.getOutputs().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java deleted file mode 100644 index e51511bd..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java +++ /dev/null @@ -1,83 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.forge; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import lombok.Getter; -import mezz.jei.api.recipe.BlankRecipeWrapper; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class TartaricForgeRecipeJEI extends BlankRecipeWrapper -{ - @Getter - private TartaricForgeRecipe recipe; - @Getter - private ArrayList validGems = new ArrayList(); - - public TartaricForgeRecipeJEI(TartaricForgeRecipe recipe) - { - this.recipe = recipe; - - for (DefaultWill will : DefaultWill.values()) - if (will.minSouls >= recipe.getMinimumSouls()) - this.validGems.add(will.willStack); - } - - @Override - @Nonnull - public List getInputs() - { - ArrayList ret = new ArrayList(); - ret.add(recipe.getInput()); - ret.add(validGems); - return ret; - } - - @Override - @Nonnull - public List getOutputs() - { - return Collections.singletonList(recipe.getRecipeOutput()); - } - - @Nullable - @Override - public List getTooltipStrings(int mouseX, int mouseY) - { - ArrayList ret = new ArrayList(); - if (mouseX >= 40 && mouseX <= 60 && mouseY >= 21 && mouseY <= 34) - { - ret.add(TextHelper.localize("jei.BloodMagic.recipe.minimumSouls", recipe.getMinimumSouls())); - ret.add(TextHelper.localize("jei.BloodMagic.recipe.soulsDrained", recipe.getSoulsDrained())); - return ret; - } - return null; - } - - public enum DefaultWill - { - SOUL(new ItemStack(ModItems.MONSTER_SOUL, 1, 0), 64), - PETTY(new ItemStack(ModItems.SOUL_GEM, 1, 0), 64), - LESSER(new ItemStack(ModItems.SOUL_GEM, 1, 1), 256), - COMMON(new ItemStack(ModItems.SOUL_GEM, 1, 2), 1024), - GREATER(new ItemStack(ModItems.SOUL_GEM, 1, 3), 4096), - GRAND(new ItemStack(ModItems.SOUL_GEM, 1, 4), 16384); - - public final ItemStack willStack; - public final double minSouls; - - DefaultWill(ItemStack willStack, double minSouls) - { - this.willStack = willStack; - this.minSouls = minSouls; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java deleted file mode 100644 index f8577cc8..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.forge; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; - -public class TartaricForgeRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - List recipeList = TartaricForgeRecipeRegistry.getRecipeList(); - ArrayList recipes = new ArrayList(); - - for (TartaricForgeRecipe recipe : recipeList) - recipes.add(new TartaricForgeRecipeJEI(recipe)); - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/package-info.java deleted file mode 100644 index cc0c044a..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.forge; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapedOrbRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapedOrbRecipeHandler.java deleted file mode 100644 index 4e746059..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapedOrbRecipeHandler.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.orb; - -import java.util.Arrays; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import mezz.jei.api.recipe.VanillaRecipeCategoryUid; -import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe; - -public class ShapedOrbRecipeHandler implements IRecipeHandler -{ - - @Nonnull - @Override - public Class getRecipeClass() - { - return ShapedBloodOrbRecipe.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return VanillaRecipeCategoryUid.CRAFTING; - } - - @Nonnull - public String getRecipeCategoryUid(@Nonnull ShapedBloodOrbRecipe recipe) - { - return VanillaRecipeCategoryUid.CRAFTING; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull ShapedBloodOrbRecipe recipe) - { - return new ShapedOrbRecipeJEI(Arrays.asList(recipe.getInput()), recipe.getTier(), recipe.getRecipeOutput()); - } - - @Override - public boolean isRecipeValid(@Nonnull ShapedBloodOrbRecipe recipe) - { - return recipe.getInput().length > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapedOrbRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapedOrbRecipeJEI.java deleted file mode 100644 index 840e59ff..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapedOrbRecipeJEI.java +++ /dev/null @@ -1,105 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.orb; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import WayofTime.bloodmagic.util.helper.NumeralHelper; -import mezz.jei.api.recipe.wrapper.IShapedCraftingRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ShapedOrbRecipeJEI implements IShapedCraftingRecipeWrapper -{ - - @Nonnull - private final List inputs; - - private final int tier; - - @Nonnull - private final ItemStack output; - - @SuppressWarnings("unchecked") - public ShapedOrbRecipeJEI(@Nonnull List input, int tier, @Nonnull ItemStack output) - { - ArrayList inputList = new ArrayList(input); - - for (Object object : inputList) - if (object instanceof Integer) - inputList.set(inputList.indexOf(object), OrbRegistry.getOrbsDownToTier((Integer) object)); - - this.inputs = inputList; - this.tier = tier; - this.output = output; - } - - @Override - public int getWidth() - { - return 3; - } - - @Override - public int getHeight() - { - return 3; - } - - @Override - public List getInputs() - { - return inputs; - } - - @Override - public List getOutputs() - { - return Collections.singletonList(output); - } - - @Override - public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) - { - String draw = TextHelper.localize("jei.BloodMagic.recipe.requiredTier", NumeralHelper.toRoman(tier)); - minecraft.fontRendererObj.drawString(draw, 72 - minecraft.fontRendererObj.getStringWidth(draw) / 2, 10, Color.gray.getRGB()); - } - - @Override - public List getFluidInputs() - { - return null; - } - - @Override - public List getFluidOutputs() - { - return null; - } - - @Override - public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) - { - - } - - @Nullable - @Override - public List getTooltipStrings(int mouseX, int mouseY) - { - return null; - } - - @Override - public boolean handleClick(@Nonnull Minecraft minecraft, int mouseX, int mouseY, int mouseButton) - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapelessOrbRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapelessOrbRecipeHandler.java deleted file mode 100644 index 5bca16e6..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapelessOrbRecipeHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.orb; - -import javax.annotation.Nonnull; - -import mezz.jei.api.recipe.IRecipeHandler; -import mezz.jei.api.recipe.IRecipeWrapper; -import mezz.jei.api.recipe.VanillaRecipeCategoryUid; -import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe; - -public class ShapelessOrbRecipeHandler implements IRecipeHandler -{ - - @Nonnull - @Override - public Class getRecipeClass() - { - return ShapelessBloodOrbRecipe.class; - } - - @Deprecated - @Nonnull - @Override - public String getRecipeCategoryUid() - { - return VanillaRecipeCategoryUid.CRAFTING; - } - - @Override - public String getRecipeCategoryUid(@Nonnull ShapelessBloodOrbRecipe recipe) - { - return VanillaRecipeCategoryUid.CRAFTING; - } - - @Nonnull - @Override - public IRecipeWrapper getRecipeWrapper(@Nonnull ShapelessBloodOrbRecipe recipe) - { - return new ShapelessOrbRecipeJEI(recipe.getInput(), recipe.getTier(), recipe.getRecipeOutput()); - } - - @Override - public boolean isRecipeValid(@Nonnull ShapelessBloodOrbRecipe recipe) - { - return recipe.getInput().size() > 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapelessOrbRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapelessOrbRecipeJEI.java deleted file mode 100644 index dc16002d..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/ShapelessOrbRecipeJEI.java +++ /dev/null @@ -1,93 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.orb; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import WayofTime.bloodmagic.util.helper.NumeralHelper; -import mezz.jei.api.recipe.wrapper.ICraftingRecipeWrapper; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ShapelessOrbRecipeJEI implements ICraftingRecipeWrapper -{ - - @Nonnull - private final List inputs; - - private final int tier; - - @Nonnull - private final ItemStack output; - - @SuppressWarnings("unchecked") - public ShapelessOrbRecipeJEI(@Nonnull List input, int tier, @Nonnull ItemStack output) - { - ArrayList inputList = new ArrayList(input); - - for (Object object : inputList) - if (object instanceof Integer) - inputList.set(inputList.indexOf(object), OrbRegistry.getOrbsDownToTier((Integer) object)); - - this.inputs = inputList; - this.tier = tier; - this.output = output; - } - - @Override - public List getInputs() - { - return inputs; - } - - @Override - public List getOutputs() - { - return Collections.singletonList(output); - } - - @Override - public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) - { - String draw = TextHelper.localize("jei.BloodMagic.recipe.requiredTier", NumeralHelper.toRoman(tier)); - minecraft.fontRendererObj.drawString(draw, 72 - minecraft.fontRendererObj.getStringWidth(draw) / 2, 10, Color.gray.getRGB()); - } - - @Override - public List getFluidInputs() - { - return null; - } - - @Override - public List getFluidOutputs() - { - return null; - } - - @Override - public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) - { - - } - - @Nullable - @Override - public List getTooltipStrings(int mouseX, int mouseY) - { - return null; - } - - @Override - public boolean handleClick(@Nonnull Minecraft minecraft, int mouseX, int mouseY, int mouseButton) - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/orb/package-info.java deleted file mode 100644 index a9b8d95a..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/orb/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei.orb; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/jei/package-info.java deleted file mode 100644 index 7ce52522..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.jei; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/minecraft/CrossVersionProxy110.java b/src/main/java/WayofTime/bloodmagic/compat/minecraft/CrossVersionProxy110.java deleted file mode 100644 index 937fbcde..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/minecraft/CrossVersionProxy110.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.bloodmagic.compat.minecraft; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeModContainer; -import net.minecraftforge.fml.relauncher.ReflectionHelper; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -public class CrossVersionProxy110 implements ICrossVersionProxy { - - @Override - public TileEntity createTileFromData(World world, NBTTagCompound tagCompound) - { - Method m = ReflectionHelper.findMethod(TileEntity.class, null, new String[] { "create", "func_190200_a", "a" }, World.class, NBTTagCompound.class); - try - { - return (TileEntity) m.invoke(null, world, tagCompound); - } catch (Exception e) - { - return null; - } - } - - @Override - public boolean disableStairSlabCulling() - { - Field disableStairSlabCulling = ReflectionHelper.findField(ForgeModContainer.class, "disableStairSlabCulling"); - try - { - return (Boolean) disableStairSlabCulling.get(null); - } catch (Exception e) - { - return false; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/minecraft/CrossVersionProxy19.java b/src/main/java/WayofTime/bloodmagic/compat/minecraft/CrossVersionProxy19.java deleted file mode 100644 index 8c1253bb..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/minecraft/CrossVersionProxy19.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.compat.minecraft; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.ReflectionHelper; - -import java.lang.reflect.Method; - -public class CrossVersionProxy19 implements ICrossVersionProxy -{ - - @Override - public TileEntity createTileFromData(World world, NBTTagCompound tagCompound) - { - Method m = ReflectionHelper.findMethod(TileEntity.class, null, new String[] { "create", "func_189514_c", "c" }, NBTTagCompound.class); - try - { - return (TileEntity) m.invoke(null, tagCompound); - } catch (Exception e) - { - return null; - } - } - - @Override - public boolean disableStairSlabCulling() - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/minecraft/ICrossVersionProxy.java b/src/main/java/WayofTime/bloodmagic/compat/minecraft/ICrossVersionProxy.java deleted file mode 100644 index f8bd12de..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/minecraft/ICrossVersionProxy.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.bloodmagic.compat.minecraft; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -/** - * Allows for Blood Magic to support multiple MC versions that have only slight changes. - * - * Implementation copied from Botania. - */ -public interface ICrossVersionProxy -{ - TileEntity createTileFromData(World world, NBTTagCompound tagCompound); - - boolean disableStairSlabCulling(); -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/package-info.java deleted file mode 100644 index 302c3ae6..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/CompatibilityWaila.java b/src/main/java/WayofTime/bloodmagic/compat/waila/CompatibilityWaila.java deleted file mode 100644 index 22a5cbdd..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/CompatibilityWaila.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.compat.waila; - -import net.minecraftforge.fml.common.event.FMLInterModComms; -import WayofTime.bloodmagic.compat.ICompatibility; - -public class CompatibilityWaila implements ICompatibility -{ - @Override - public void loadCompatibility(InitializationPhase phase) - { - if (phase == InitializationPhase.INIT) - FMLInterModComms.sendMessage(getModId(), "register", "WayofTime.bloodmagic.compat.waila.WailaCallbackHandler.callbackRegister"); - } - - @Override - public String getModId() - { - return "Waila"; - } - - @Override - public boolean enableCompat() - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/WailaCallbackHandler.java b/src/main/java/WayofTime/bloodmagic/compat/waila/WailaCallbackHandler.java deleted file mode 100644 index f88c75c8..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/WailaCallbackHandler.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.bloodmagic.compat.waila; - -import WayofTime.bloodmagic.block.*; -import WayofTime.bloodmagic.compat.waila.provider.*; -import mcp.mobius.waila.api.IWailaRegistrar; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.base.BlockEnumPillar; -import WayofTime.bloodmagic.block.base.BlockEnumPillarCap; -import WayofTime.bloodmagic.block.base.BlockEnumStairs; - -public class WailaCallbackHandler -{ - public static void callbackRegister(IWailaRegistrar registrar) - { - registrar.registerBodyProvider(new DataProviderBloodAltar(), BlockAltar.class); - registrar.registerNBTProvider(new DataProviderBloodAltar(), BlockAltar.class); - registrar.registerBodyProvider(new DataProviderTeleposer(), BlockTeleposer.class); - registrar.registerBodyProvider(new DataProviderRitualController(), BlockRitualController.class); - registrar.registerBodyProvider(new DataProviderAlchemyArray(), BlockAlchemyArray.class); - registrar.registerBodyProvider(new DataProviderBloodTank(), BlockBloodTank.class); - registrar.registerNBTProvider(new DataProviderBloodTank(), BlockBloodTank.class); - registrar.registerStackProvider(new DataProviderAlchemyArray(), BlockAlchemyArray.class); - registrar.registerStackProvider(new DataProviderMimic(), BlockMimic.class); - registrar.registerNBTProvider(new DataProviderMimic(), BlockMimic.class); - registrar.registerStackProvider(DataProviderPillar.INSTANCE, BlockEnumPillarCap.class); - registrar.registerStackProvider(DataProviderPillar.INSTANCE, BlockEnumPillar.class); - registrar.registerStackProvider(DataProviderPillar.INSTANCE, BlockEnumStairs.class); - - registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK, false); - registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_ALTAR, true); - registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_TELEPOSER, true); - registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_RITUAL, true); - registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_ARRAY, true); - registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_BLOOD_TANK, true); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/waila/package-info.java deleted file mode 100644 index f2879261..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.waila; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderAlchemyArray.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderAlchemyArray.java deleted file mode 100644 index 3ff12659..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderAlchemyArray.java +++ /dev/null @@ -1,71 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import java.util.List; - -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.tile.TileAlchemyArray; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class DataProviderAlchemyArray implements IWailaDataProvider -{ - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return new ItemStack(ModItems.ARCANE_ASHES).setStackDisplayName(TextHelper.getFormattedText(ModBlocks.ALCHEMY_ARRAY.getLocalizedName())); - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (!config.getConfig(Constants.Compat.WAILA_CONFIG_ARRAY)) - return currenttip; - - if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) - { - TileEntity tile = accessor.getTileEntity(); - if (tile instanceof TileAlchemyArray) - { - TileAlchemyArray tileArray = (TileAlchemyArray) tile; - if (tileArray.getStackInSlot(0) != null) - currenttip.add(TextHelper.localize("waila.BloodMagic.array.reagent", tileArray.getStackInSlot(0).getDisplayName())); - - if (tileArray.getStackInSlot(1) != null) - currenttip.add(TextHelper.localize("waila.BloodMagic.array.catalyst", tileArray.getStackInSlot(1).getDisplayName())); - } - } else - { - currenttip.add(TextHelper.localizeEffect("waila.BloodMagic.sneak")); - } - - return currenttip; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) - { - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderBloodAltar.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderBloodAltar.java deleted file mode 100644 index 2638641b..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderBloodAltar.java +++ /dev/null @@ -1,151 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import java.util.List; - -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.BlockAltar; -import WayofTime.bloodmagic.item.sigil.ItemSigilDivination; -import WayofTime.bloodmagic.item.sigil.ItemSigilSeer; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.util.helper.TextHelper; - -/** - * Integrated from WailaPlugins by tterrag1098. Originally implemented - * in ImLookingAtBlood by Pokefenn. - */ -public class DataProviderBloodAltar implements IWailaDataProvider -{ - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (!config.getConfig(Constants.Compat.WAILA_CONFIG_ALTAR)) - return currenttip; - - boolean hasSigil = false; - boolean hasSeer = false; - - switch (ConfigHandler.wailaAltarDisplayMode) - { - case 0: - { - hasSigil = hasSeer = true; - break; - } - case 1: - { - hasSeer = holdingSeerSigil(accessor.getPlayer()); - hasSigil = hasSeer || holdingDivinationSigil(accessor.getPlayer()); - break; - } - case 2: - { - hasSeer = hasStack(new ItemStack(ModItems.SIGIL_SEER), accessor.getPlayer()); - hasSigil = hasSeer || hasStack(new ItemStack(ModItems.SIGIL_DIVINATION), accessor.getPlayer()); - break; - } - default: - { - break; - } - } - - if (!hasSeer && !hasSigil) - return currenttip; - - if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) - { - if (accessor.getBlock() instanceof BlockAltar && accessor.getTileEntity() instanceof TileAltar) - { - TileAltar altar = (TileAltar) accessor.getTileEntity(); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.seer.currentAltarTier", altar.getTier().toInt())); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.seer.currentAltarCapacity", altar.getCapacity())); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.seer.currentEssence", altar.getCurrentBlood())); - - if (hasSeer) - { - int progress = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_PROGRESS); - int liquidRequired = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_LIQUID_REQ); - int craftAmount = 1; - if (accessor.getNBTData().getTagList("Items", 10).get(0).getId() == 10) - craftAmount = ((NBTTagCompound)accessor.getNBTData().getTagList("Items", 10).get(0)).getByte("Count"); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent", (int) (((double) progress / (double) liquidRequired * 100) / craftAmount) + "%")); - } - } - } else - { - currenttip.add(TextHelper.localizeEffect("waila.BloodMagic.sneak")); - } - - return currenttip; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) - { - if (te != null) - te.writeToNBT(tag); - return tag; - } - - public static boolean hasStack(ItemStack stack, EntityPlayer player) - { - for (ItemStack inventoryStack : player.inventory.mainInventory) - if (inventoryStack != null && inventoryStack.isItemEqual(stack)) - return true; - - return false; - } - - private static boolean holdingSeerSigil(EntityPlayer player) - { - if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemSigilSeer) - return true; - - if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ItemSigilSeer) - return true; - - return false; - } - - private static boolean holdingDivinationSigil(EntityPlayer player) - { - if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemSigilDivination) - return true; - - if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ItemSigilDivination) - return true; - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderBloodTank.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderBloodTank.java deleted file mode 100644 index 6f381db5..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderBloodTank.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.BlockBloodTank; -import WayofTime.bloodmagic.tile.TileBloodTank; -import WayofTime.bloodmagic.util.helper.TextHelper; -import com.google.common.base.Strings; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; - -import java.util.List; - -public class DataProviderBloodTank implements IWailaDataProvider -{ - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (!config.getConfig(Constants.Compat.WAILA_CONFIG_BLOOD_TANK)) - return currenttip; - - if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) - { - if (accessor.getBlock() instanceof BlockBloodTank && accessor.getTileEntity() instanceof TileBloodTank) - { - TileBloodTank bloodTank = (TileBloodTank) accessor.getTileEntity(); - NBTTagCompound tag = accessor.getNBTData(); - int capacity = tag.getInteger(Constants.NBT.ALTAR_CAPACITY); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.tier", bloodTank.getBlockMetadata() + 1)); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.capacity") + ": " + capacity + "mB"); - - tag = tag.getCompoundTag(Constants.NBT.TANK); - FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag); - if (!Strings.isNullOrEmpty(tag.getString("FluidName")) && fluidStack != null) - { - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.type") + ": " + fluidStack.getLocalizedName()); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.amount") + ": " + tag.getInteger("Amount") + "/" + capacity + "mB"); - } - } - } - else - { - currenttip.add(TextHelper.localizeEffect("waila.BloodMagic.sneak")); - } - - return currenttip; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) - { - if (te != null) - te.writeToNBT(tag); - return tag; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderMimic.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderMimic.java deleted file mode 100644 index 3f42d8db..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderMimic.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import WayofTime.bloodmagic.tile.TileMimic; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.List; - -public class DataProviderMimic implements IWailaDataProvider -{ - - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (accessor.getNBTData().getBoolean("hasItem")) - return ItemStack.loadItemStackFromNBT(accessor.getNBTData()); - - return new ItemStack(accessor.getBlock(), 1, accessor.getMetadata()); - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) - { - if (te instanceof TileMimic && ((TileMimic) te).getStackInSlot(0) != null) - { - tag.setBoolean("hasItem", true); - ((TileMimic) te).getStackInSlot(0).writeToNBT(tag); - } - return tag; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderPillar.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderPillar.java deleted file mode 100644 index c24886ae..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderPillar.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.List; - -public class DataProviderPillar implements IWailaDataProvider { - - public static final DataProviderPillar INSTANCE = new DataProviderPillar(); - - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { - return new ItemStack(accessor.getBlock(), 1, accessor.getBlock().damageDropped(accessor.getBlockState())); - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return null; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) { - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderRitualController.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderRitualController.java deleted file mode 100644 index b9c1106c..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderRitualController.java +++ /dev/null @@ -1,103 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import java.util.List; - -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry; -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.block.BlockRitualController; -import WayofTime.bloodmagic.tile.TileImperfectRitualStone; -import WayofTime.bloodmagic.tile.TileMasterRitualStone; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class DataProviderRitualController implements IWailaDataProvider -{ - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (!config.getConfig(Constants.Compat.WAILA_CONFIG_RITUAL)) - return currenttip; - - if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) - { - if (accessor.getBlock() instanceof BlockRitualController) - { - if (accessor.getBlock().getMetaFromState(accessor.getBlockState()) == 0 && accessor.getTileEntity() instanceof TileMasterRitualStone) - { - TileMasterRitualStone mrs = (TileMasterRitualStone) accessor.getTileEntity(); - - if (mrs.getCurrentRitual() != null && mrs.isActive()) - { - currenttip.add(TextHelper.localizeEffect(mrs.getCurrentRitual().getUnlocalizedName())); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromUUID(mrs.getOwner()))); - if (!RitualRegistry.ritualEnabled(mrs.getCurrentRitual())) - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.config.disabled")); - } else - { - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.deactivated")); - } - } - - if (accessor.getBlock().getMetaFromState(accessor.getBlockState()) == 1 && accessor.getTileEntity() instanceof TileImperfectRitualStone) - { - if (accessor.getWorld().getBlockState(accessor.getPosition().up()).getBlock() != null) - { - Block up = accessor.getWorld().getBlockState(accessor.getPosition().up()).getBlock(); - int meta = up.getMetaFromState(accessor.getWorld().getBlockState(accessor.getPosition().up())); - BlockStack blockStack = new BlockStack(up, meta); - ImperfectRitual ritual = ImperfectRitualRegistry.getRitualForBlock(blockStack); - - if (ritual != null) - { - currenttip.add(TextHelper.localizeEffect(ritual.getUnlocalizedName())); - if (!ImperfectRitualRegistry.ritualEnabled(ritual)) - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.config.disabled")); - } - } - } - } - } else - { - currenttip.add(TextHelper.localizeEffect("waila.BloodMagic.sneak")); - } - - return currenttip; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) - { - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderTeleposer.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderTeleposer.java deleted file mode 100644 index 18136cee..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/DataProviderTeleposer.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.bloodmagic.compat.waila.provider; - -import java.util.List; - -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.BlockTeleposer; -import WayofTime.bloodmagic.item.ItemTelepositionFocus; -import WayofTime.bloodmagic.tile.TileTeleposer; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class DataProviderTeleposer implements IWailaDataProvider -{ - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (!config.getConfig(Constants.Compat.WAILA_CONFIG_TELEPOSER)) - return currenttip; - - if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK)) - { - if (accessor.getBlock() instanceof BlockTeleposer && accessor.getTileEntity() instanceof TileTeleposer) - { - TileTeleposer teleposer = (TileTeleposer) accessor.getTileEntity(); - if (teleposer.getStackInSlot(0) != null) - { - ItemStack contained = teleposer.getStackInSlot(0); - BlockPos toPos = ((ItemTelepositionFocus) contained.getItem()).getBlockPos(contained); - int dimensionID = contained.getTagCompound().getInteger(Constants.NBT.DIMENSION_ID); - - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.coords", toPos.getX(), toPos.getY(), toPos.getZ())); - currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.dimension", dimensionID)); - } - } - } else - { - currenttip.add(TextHelper.localizeEffect("waila.BloodMagic.sneak")); - } - - return currenttip; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) - { - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/package-info.java b/src/main/java/WayofTime/bloodmagic/compat/waila/provider/package-info.java deleted file mode 100644 index 6e1d3506..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/waila/provider/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compat.waila.provider; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/compress/AdvancedCompressionHandler.java b/src/main/java/WayofTime/bloodmagic/compress/AdvancedCompressionHandler.java deleted file mode 100644 index 5a04209c..00000000 --- a/src/main/java/WayofTime/bloodmagic/compress/AdvancedCompressionHandler.java +++ /dev/null @@ -1,171 +0,0 @@ -package WayofTime.bloodmagic.compress; - -import WayofTime.bloodmagic.api.compress.CompressionHandler; -import WayofTime.bloodmagic.api.compress.CompressionRegistry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class AdvancedCompressionHandler extends CompressionHandler -{ - @Override - public ItemStack compressInventory(ItemStack[] inv, World world) - { - return test(inv, true, world); - } - - public ItemStack test(ItemStack[] inv, boolean doDrain, World world) - { - for (ItemStack invStack : inv) - { - if (invStack == null) - { - continue; - } - - for (int i = 2; i <= 3; i++) - { - ItemStack stacky = getRecipe(invStack, world, i); - if (stacky != null) - { - int threshold = CompressionRegistry.getItemThreshold(invStack); - - int needed = i * i; - int neededLeft = iterateThroughInventory(invStack, threshold + invStack.getMaxStackSize() - needed, inv, needed, false); - if (neededLeft <= 0) - { - iterateThroughInventory(invStack, 0, inv, needed, true); - return stacky; - } - } - } - } - - return null; - } - - public int iterateThroughInventory(ItemStack required, int kept, ItemStack[] inv, int needed, boolean doDrain) - { - int i = -1; - - for (ItemStack invStack : inv) - { - i++; - - if (invStack == null) - { - continue; - } - - if (invStack.isItemEqual(required) && (invStack.getTagCompound() == null ? required.getTagCompound() == null : invStack.getTagCompound().equals(required.getTagCompound()))) - { - int stackSize = invStack.stackSize; - int used = 0; - if (kept > 0) - { - int remainingFromStack = Math.max(stackSize - kept, 0); - used += stackSize - remainingFromStack; - } - - kept -= used; - - if (kept <= 0 && needed > 0) - { - int remainingFromStack = Math.max(stackSize - used - needed, 0); - if (doDrain) - { - invStack.stackSize = remainingFromStack + used; - if (invStack.stackSize <= 0) - { - inv[i] = null; - } - } - - needed -= (stackSize - used - remainingFromStack); - } - - if (needed <= 0) - { - return 0; - } - } - } - - return needed; - } - - public static boolean isResultStackReversible(ItemStack stack, int gridSize, World world) - { - if (stack == null) - { - return false; - } - InventoryCrafting inventory = new InventoryCrafting(new Container() - { - public boolean canInteractWith(EntityPlayer player) - { - return false; - } - }, 2, 2); - - inventory.setInventorySlotContents(0, stack); - - ItemStack returnStack = StorageBlockCraftingManager.getInstance().findMatchingRecipe(inventory, world); - if (returnStack == null) - { - return false; - } - - ItemStack compressedStack = null; - switch (gridSize) - { - case 2: - compressedStack = get22Recipe(returnStack, world); - break; - case 3: - compressedStack = get33Recipe(returnStack, world); - break; - } - - return compressedStack != null && CompressionRegistry.areItemStacksEqual(stack, compressedStack); - } - - public static ItemStack getRecipe(ItemStack stack, World world, int gridSize) - { - InventoryCrafting inventory = new InventoryCrafting(new Container() - { - public boolean canInteractWith(EntityPlayer player) - { - return false; - } - }, gridSize, gridSize); - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - inventory.setInventorySlotContents(i, stack); - } - - return StorageBlockCraftingManager.getInstance().findMatchingRecipe(inventory, world); - } - - public static boolean has22Recipe(ItemStack stack, World world) - { - return get22Recipe(stack, world) != null; - } - - public static ItemStack get22Recipe(ItemStack stack, World world) - { - return getRecipe(stack, world, 2); - } - - public static boolean has33Recipe(ItemStack stack, World world) - { - return get33Recipe(stack, world) != null; - } - - public static ItemStack get33Recipe(ItemStack stack, World world) - { - return getRecipe(stack, world, 3); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compress/BaseCompressionHandler.java b/src/main/java/WayofTime/bloodmagic/compress/BaseCompressionHandler.java deleted file mode 100644 index 7eba6bb3..00000000 --- a/src/main/java/WayofTime/bloodmagic/compress/BaseCompressionHandler.java +++ /dev/null @@ -1,110 +0,0 @@ -package WayofTime.bloodmagic.compress; - -import WayofTime.bloodmagic.api.compress.CompressionHandler; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class BaseCompressionHandler extends CompressionHandler -{ - private final ItemStack required; - private final ItemStack result; - private final int leftover; - - public BaseCompressionHandler(ItemStack requested, ItemStack result, int leftover) - { - super(); - this.required = requested; - this.result = result; - this.leftover = leftover; - } - - public ItemStack getResultStack() - { - return this.result.copy(); - } - - public ItemStack getRequiredStack() - { - return this.required.copy(); - } - - @Override - public ItemStack compressInventory(ItemStack[] inv, World world) - { - int remaining = this.getRemainingNeeded(inv); - if (remaining <= 0) - { - this.drainInventory(inv); - return this.getResultStack(); - } - - return null; - } - - public int getRemainingNeeded(ItemStack[] inv) - { - return iterateThroughInventory(inv, false); - } - - public int drainInventory(ItemStack[] inv) - { - return iterateThroughInventory(inv, true); - } - - public int iterateThroughInventory(ItemStack[] inv, boolean doDrain) - { - int needed = this.required.stackSize; - int kept = this.getLeftover(); - int i = -1; - - for (ItemStack invStack : inv) - { - i++; - - if (invStack == null) - { - continue; - } - - if (invStack.isItemEqual(this.required) && (invStack.getTagCompound() == null ? this.required.getTagCompound() == null : invStack.getTagCompound().equals(this.required.getTagCompound()))) - { - int stackSize = invStack.stackSize; - int used = 0; - if (kept > 0) - { - int remainingFromStack = Math.max(stackSize - kept, 0); - used += stackSize - remainingFromStack; - } - - kept -= used; - - if (kept <= 0 && needed > 0) - { - int remainingFromStack = Math.max(stackSize - used - needed, 0); - if (doDrain) - { - invStack.stackSize = remainingFromStack + used; - if (invStack.stackSize <= 0) - { - inv[i] = null; - } - } - - needed -= (stackSize - used - remainingFromStack); - } - - if (needed <= 0) - { - return 0; - } - } - } - - return needed; - } - - public int getLeftover() - { - return this.leftover; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compress/StorageBlockCraftingManager.java b/src/main/java/WayofTime/bloodmagic/compress/StorageBlockCraftingManager.java deleted file mode 100644 index 21b6357b..00000000 --- a/src/main/java/WayofTime/bloodmagic/compress/StorageBlockCraftingManager.java +++ /dev/null @@ -1,167 +0,0 @@ -package WayofTime.bloodmagic.compress; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.compress.CompressionRegistry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.world.World; - -import java.util.LinkedList; -import java.util.List; - -public class StorageBlockCraftingManager -{ - private static final StorageBlockCraftingManager instance = new StorageBlockCraftingManager(); - private List recipes = new LinkedList(); - - public static StorageBlockCraftingManager getInstance() - { - return instance; - } - - public void addStorageBlockRecipes() - { - this.recipes = new StorageBlockCraftingRecipeAssimilator().getPackingRecipes(); - - BloodMagic.instance.getLogger().info("Total number of compression recipes: " + this.recipes.size()); - } - - private static boolean isResultStackReversible(ItemStack stack, int gridSize, World world, List list) - { - if (stack == null) - { - return false; - } - InventoryCrafting inventory = new InventoryCrafting(new Container() - { - public boolean canInteractWith(EntityPlayer player) - { - return false; - } - }, 2, 2); - - inventory.setInventorySlotContents(0, stack); - - ItemStack returnStack = StorageBlockCraftingManager.getInstance().findMatchingRecipe(inventory, world, list); - if (returnStack == null || returnStack.getItem() == null) - { - return false; - } - - ItemStack compressedStack = null; - switch (gridSize) - { - case 2: - compressedStack = get22Recipe(returnStack, world, list); - break; - case 3: - compressedStack = get33Recipe(returnStack, world, list); - break; - } - - return compressedStack != null && CompressionRegistry.areItemStacksEqual(stack, compressedStack); - } - - private static ItemStack getRecipe(ItemStack stack, World world, int gridSize, List list) - { - InventoryCrafting inventory = new InventoryCrafting(new Container() - { - public boolean canInteractWith(EntityPlayer player) - { - return false; - } - }, gridSize, gridSize); - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - inventory.setInventorySlotContents(i, stack); - } - - return StorageBlockCraftingManager.getInstance().findMatchingRecipe(inventory, world, list); - } - - private static boolean has22Recipe(ItemStack stack, World world, List list) - { - return get22Recipe(stack, world, list) != null; - } - - private static ItemStack get22Recipe(ItemStack stack, World world, List list) - { - return getRecipe(stack, world, 2, list); - } - - private static boolean has33Recipe(ItemStack stack, World world, List list) - { - return get33Recipe(stack, world, list) != null; - } - - private static ItemStack get33Recipe(ItemStack stack, World world, List list) - { - return getRecipe(stack, world, 3, list); - } - - public ItemStack findMatchingRecipe(InventoryCrafting craftingInventory, World world) - { - return this.findMatchingRecipe(craftingInventory, world, this.recipes); - } - - private ItemStack findMatchingRecipe(InventoryCrafting craftingInventory, World world, List list) - { - int i = 0; - ItemStack itemstack = null; - ItemStack itemstack1 = null; - int j; - - for (j = 0; j < craftingInventory.getSizeInventory(); ++j) - { - ItemStack itemstack2 = craftingInventory.getStackInSlot(j); - - if (itemstack2 != null) - { - if (i == 0) - { - itemstack = itemstack2; - } - - if (i == 1) - { - itemstack1 = itemstack2; - } - - ++i; - } - } - - if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) - { - Item item = itemstack.getItem(); - int j1 = item.getMaxDamage() - itemstack.getItemDamage(); - int k = item.getMaxDamage() - itemstack1.getItemDamage(); - int l = j1 + k + item.getMaxDamage() * 5 / 100; - int i1 = item.getMaxDamage() - l; - - if (i1 < 0) - { - i1 = 0; - } - - return new ItemStack(itemstack.getItem(), 1, i1); - } else - { - for (j = 0; j < list.size(); ++j) - { - IRecipe irecipe = (IRecipe) list.get(j); - - if (irecipe.matches(craftingInventory, world)) - { - return irecipe.getCraftingResult(craftingInventory); - } - } - - return null; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compress/StorageBlockCraftingRecipeAssimilator.java b/src/main/java/WayofTime/bloodmagic/compress/StorageBlockCraftingRecipeAssimilator.java deleted file mode 100644 index 5dc209df..00000000 --- a/src/main/java/WayofTime/bloodmagic/compress/StorageBlockCraftingRecipeAssimilator.java +++ /dev/null @@ -1,319 +0,0 @@ -package WayofTime.bloodmagic.compress; - -import WayofTime.bloodmagic.BloodMagic; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; - -import java.util.*; - -public class StorageBlockCraftingRecipeAssimilator -{ - public static final List ignore = new ArrayList(); - - public List getPackingRecipes() - { - // grab all recipes potentially suitable for packing or unpacking - - List packingRecipes = new LinkedList(); - List unpackingRecipes = new ArrayList(); - - for (IRecipe recipe : getCraftingRecipes()) - { - if (ignore.contains(recipe.getClass())) - continue; - - ItemStack output = recipe.getRecipeOutput(); - if (output == null || output.getItem() == null) - continue; - - if (output.stackSize == 1) - { - PackingRecipe packingRecipe = getPackingRecipe(recipe); - - if (packingRecipe != null) - { - packingRecipes.add(packingRecipe); - } - } else if ((output.stackSize == 4 || output.stackSize == 9) && recipe.getRecipeSize() == 1) - { - unpackingRecipes.add(recipe); - } - } - - // grab all packing recipes which accept the output of any of the - // unpacking recipes - - Container container = makeDummyContainer(); - InventoryCrafting inventoryUnpack = new InventoryCrafting(container, 2, 2); - InventoryCrafting inventory2x2 = new InventoryCrafting(container, 2, 2); - InventoryCrafting inventory3x3 = new InventoryCrafting(container, 3, 3); - World world = null; // TODO: use a proper dummy world? - - List ret = new ArrayList(); - - for (IRecipe recipeUnpack : unpackingRecipes) - { - if (ignore.contains(recipeUnpack.getClass())) - continue; - - ItemStack unpacked = recipeUnpack.getRecipeOutput(); - InventoryCrafting inventory = null; - - for (Iterator it = packingRecipes.iterator(); it.hasNext();) - { - PackingRecipe recipePack = it.next(); - - // check if the packing recipe accepts the unpacking recipe's output - - boolean matched = false; - - if (recipePack.possibleInputs != null) - { - // the recipe could be parsed, use its inputs directly since that's faster verify recipe size - - if (recipePack.inputCount != unpacked.stackSize) - continue; - - // check if any of the input options matches the unpacked - // item stack - - for (ItemStack stack : recipePack.possibleInputs) - { - if (areInputsIdentical(unpacked, stack)) - { - matched = true; - break; - } - } - } else - { - // unknown IRecipe, check through the recipe conventionally verify recipe size for 3x3 to skip anything smaller quickly - - if (unpacked.stackSize == 9 && recipePack.recipe.getRecipeSize() < 9) - continue; - - // initialize inventory late, but only once per unpack recipe - - if (inventory == null) - { - if (unpacked.stackSize == 4) - { - inventory = inventory2x2; - } else - { - inventory = inventory3x3; - } - - for (int i = 0; i < unpacked.stackSize; i++) - { - inventory.setInventorySlotContents(i, unpacked.copy()); - } - } - - // check if the packing recipe accepts the unpacked item - // stack - - matched = recipePack.recipe.matches(inventory, world); - } - - if (matched) - { - // check if the unpacking recipe accepts the packing - // recipe's output - - ItemStack packOutput = recipePack.recipe.getRecipeOutput(); - inventoryUnpack.setInventorySlotContents(0, packOutput.copy()); - - if (recipeUnpack.matches(inventoryUnpack, world)) - { - ret.add(recipePack.recipe); - it.remove(); - } - } - } - } - - return ret; - } - - @SuppressWarnings("unchecked") - private List getCraftingRecipes() - { - return CraftingManager.getInstance().getRecipeList(); - } - - private Container makeDummyContainer() - { - return new Container() - { - @Override - public boolean canInteractWith(EntityPlayer player) - { - return true; - } - }; - } - - private PackingRecipe getPackingRecipe(IRecipe recipe) - { - if (recipe.getRecipeSize() < 4) - return null; - - List inputs; - - if (recipe instanceof ShapedRecipes) - { - inputs = Arrays.asList(((ShapedRecipes) recipe).recipeItems); - } else if (recipe instanceof ShapelessRecipes) - { - inputs = ((ShapelessRecipes) recipe).recipeItems; - } else if (recipe instanceof ShapedOreRecipe) - { - inputs = Arrays.asList(((ShapedOreRecipe) recipe).getInput()); - } else if (recipe instanceof ShapelessOreRecipe) - { - inputs = ((ShapelessOreRecipe) recipe).getInput(); - } else - { - return new PackingRecipe(recipe, null, -1); - } - - // check if the recipe inputs are size 4 or 9 - - int count = 0; - - for (Object o : inputs) - { - if (o != null) - count++; - } - - if (count != 4 && count != 9) - return null; - - // grab identical inputs - - List identicalInputs = getIdenticalInputs(inputs); - if (identicalInputs == null) - return null; - - return new PackingRecipe(recipe, identicalInputs, count); - } - - /** - * Determine the item stacks from the provided inputs which are suitable for - * every input element. - * - * @param inputs - * List of all inputs, null elements are being ignored. - * @return List List of all options. - */ - @SuppressWarnings("unchecked") - private List getIdenticalInputs(List inputs) - { - List options = null; - - for (Object input : inputs) - { - if (input == null) - continue; - - List offers; - - if (input instanceof ItemStack) - { - offers = Collections.singletonList((ItemStack) input); - } else if (input instanceof List) - { - offers = (List) input; - - if (offers.isEmpty()) - return null; - } else - { - throw new RuntimeException("invalid input: " + input.getClass()); - } - - if (options == null) - { - options = new ArrayList(offers); - continue; - } - - for (Iterator it = options.iterator(); it.hasNext();) - { - ItemStack stackReq = it.next(); - boolean found = false; - - for (ItemStack stackCmp : offers) - { - if (areInputsIdentical(stackReq, stackCmp)) - { - found = true; - break; - } - } - - if (!found) - { - it.remove(); - - if (options.isEmpty()) - return null; - } - } - } - - return options; - } - - private boolean areInputsIdentical(ItemStack a, ItemStack b) - { - - try - { - if (a.getItem() != b.getItem()) - return false; - - int dmgA = a.getItemDamage(); - int dmgB = b.getItemDamage(); - - return dmgA == dmgB || dmgA == OreDictionary.WILDCARD_VALUE || dmgB == OreDictionary.WILDCARD_VALUE; - } catch (NullPointerException e) - { - - BloodMagic.instance.getLogger().error("A mod in this instance has registered an item with a null input. Known problem mods are:"); - - // String err = ""; - // for (String problem : problemMods) - // err += (err.length() > 0 ? ", " : "") + problem; - // BloodMagic.instance.getLogger().error(err); - - return false; - } - } - - private static class PackingRecipe - { - PackingRecipe(IRecipe recipe, List possibleInputs, int inputCount) - { - this.recipe = recipe; - this.possibleInputs = possibleInputs; - this.inputCount = inputCount; - } - - final IRecipe recipe; - final List possibleInputs; - final int inputCount; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compress/package-info.java b/src/main/java/WayofTime/bloodmagic/compress/package-info.java deleted file mode 100644 index d8b253d4..00000000 --- a/src/main/java/WayofTime/bloodmagic/compress/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.compress; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/demonAura/PosXY.java b/src/main/java/WayofTime/bloodmagic/demonAura/PosXY.java deleted file mode 100644 index 309090b8..00000000 --- a/src/main/java/WayofTime/bloodmagic/demonAura/PosXY.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.demonAura; - -import lombok.*; - -@EqualsAndHashCode -@ToString -@NoArgsConstructor -@AllArgsConstructor -@Setter -public class PosXY implements Comparable -{ - public int x; - public int y; - - @Override - public int compareTo(PosXY c) - { - return this.y == c.y ? this.x - c.x : this.y - c.y; - } - - public float getDistanceSquared(int x, int z) - { - float f = this.x - x; - float f2 = this.y - z; - return f * f + f2 * f2; - } - - public float getDistanceSquaredToChunkCoordinates(PosXY c) - { - return getDistanceSquared(c.x, c.y); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/demonAura/WillChunk.java b/src/main/java/WayofTime/bloodmagic/demonAura/WillChunk.java deleted file mode 100644 index 37f31156..00000000 --- a/src/main/java/WayofTime/bloodmagic/demonAura/WillChunk.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.demonAura; - -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.world.chunk.Chunk; - -import java.lang.ref.WeakReference; - -@Getter -@Setter -public class WillChunk -{ - PosXY loc; - private short base; - private DemonWillHolder currentWill = new DemonWillHolder(); - private WeakReference chunkRef; - - public WillChunk(PosXY loc) - { - this.loc = loc; - } - - public WillChunk(Chunk chunk, short base, DemonWillHolder currentWill) - { - this.loc = new PosXY(chunk.xPosition, chunk.zPosition); - this.chunkRef = new WeakReference(chunk); - this.base = base; - this.currentWill = currentWill; - } - - public boolean isModified() - { - if ((this.chunkRef != null) && (this.chunkRef.get() != null)) - { - return ((Chunk) this.chunkRef.get()).needsSaving(false); - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/demonAura/WillWorld.java b/src/main/java/WayofTime/bloodmagic/demonAura/WillWorld.java deleted file mode 100644 index e66411a8..00000000 --- a/src/main/java/WayofTime/bloodmagic/demonAura/WillWorld.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.bloodmagic.demonAura; - -import lombok.Getter; -import lombok.Setter; - -import java.util.concurrent.ConcurrentHashMap; - -public class WillWorld -{ - int dim; - @Getter - @Setter - ConcurrentHashMap willChunks = new ConcurrentHashMap(); - -// private static ConcurrentHashMap nodeTickets = new ConcurrentHashMap(); - - public WillWorld(int dim) - { - this.dim = dim; - } - - public WillChunk getWillChunkAt(int x, int y) - { - return getWillChunkAt(new PosXY(x, y)); - } - - public WillChunk getWillChunkAt(PosXY loc) - { - return this.willChunks.get(loc); - } - -// public static ConcurrentHashMap getNodeTickets() -// { -// return nodeTickets; -// } -// -// public static void setNodeTickets(ConcurrentHashMap nodeTickets) -// { -// nodeTickets = nodeTickets; -// } -} diff --git a/src/main/java/WayofTime/bloodmagic/demonAura/WorldDemonWillHandler.java b/src/main/java/WayofTime/bloodmagic/demonAura/WorldDemonWillHandler.java deleted file mode 100644 index b5a1a6bf..00000000 --- a/src/main/java/WayofTime/bloodmagic/demonAura/WorldDemonWillHandler.java +++ /dev/null @@ -1,203 +0,0 @@ -package WayofTime.bloodmagic.demonAura; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CopyOnWriteArrayList; - -public class WorldDemonWillHandler -{ - static ConcurrentHashMap containedWills = new ConcurrentHashMap(); - public static ConcurrentHashMap> dirtyChunks = new ConcurrentHashMap>(); - - public static DemonWillHolder getWillHolder(int dim, int x, int y) - { - WillChunk chunk = getWillChunk(dim, x, y); - if (chunk != null) - { - return chunk.getCurrentWill(); - } - - return null; - } - - public static DemonWillHolder getWillHolder(World world, BlockPos pos) - { - return getWillHolder(world.provider.getDimension(), pos.getX() >> 4, pos.getZ() >> 4); - } - - public static WillWorld getWillWorld(int dim) - { - return containedWills.get(dim); - } - - public static WillChunk getWillChunk(int dim, int x, int y) - { - if (!containedWills.containsKey(dim)) - { - addWillWorld(dim); - } - - return (containedWills.get(dim)).getWillChunkAt(x, y); - } - - public static void addWillWorld(int dim) - { - if (!containedWills.containsKey(dim)) - { - containedWills.put(dim, new WillWorld(dim)); - BloodMagicAPI.getLogger().info("Creating demon will cache for world " + dim); - } - } - - public static void removeWillWorld(int dim) - { - containedWills.remove(dim); - BloodMagicAPI.getLogger().info("Removing demon will cache for world " + dim); - } - - public static void addWillChunk(int dim, Chunk chunk, short base, DemonWillHolder currentWill) - { - WillWorld aw = containedWills.get(dim); - if (aw == null) - { - aw = new WillWorld(dim); - } - aw.getWillChunks().put(new PosXY(chunk.xPosition, chunk.zPosition), new WillChunk(chunk, base, currentWill)); - - containedWills.put(dim, aw); - } - - public static void removeWillChunk(int dim, int x, int y) - { - WillWorld aw = containedWills.get(dim); - if (aw != null) - { - WillChunk chunk = aw.getWillChunks().remove(new PosXY(x, y)); - if (chunk != null) - { - markChunkAsDirty(chunk, dim); - } - } - } - - public static EnumDemonWillType getHighestDemonWillType(World world, BlockPos pos) - { - double currentMax = 0; - EnumDemonWillType currentHighest = EnumDemonWillType.DEFAULT; - - WillChunk willChunk = getWillChunk(world, pos); - - DemonWillHolder currentWill = willChunk.getCurrentWill(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - if (currentWill.getWill(type) > currentMax) - { - currentMax = currentWill.getWill(type); - currentHighest = type; - } - } - - return currentHighest; - } - - public static double drainWill(World world, BlockPos pos, EnumDemonWillType type, double amount, boolean doDrain) - { - WillChunk willChunk = getWillChunk(world, pos); - - DemonWillHolder currentWill = willChunk.getCurrentWill(); - double drain = Math.min(currentWill.getWill(type), amount); - if (!doDrain) - { - return drain; - } - - drain = currentWill.drainWill(type, drain); - markChunkAsDirty(willChunk, world.provider.getDimension()); - - return drain; - } - - public static double fillWillToMaximum(World world, BlockPos pos, EnumDemonWillType type, double amount, double max, boolean doFill) - { - WillChunk willChunk = getWillChunk(world, pos); - - DemonWillHolder currentWill = willChunk.getCurrentWill(); - double fill = Math.min(amount, max - currentWill.getWill(type)); - if (!doFill || fill <= 0) - { - return fill > 0 ? fill : 0; - } - - fill = currentWill.addWill(type, amount, max); - markChunkAsDirty(willChunk, world.provider.getDimension()); - - return fill; - } - - public static double fillWill(World world, BlockPos pos, EnumDemonWillType type, double amount, boolean doFill) - { - WillChunk willChunk = getWillChunk(world, pos); - - DemonWillHolder currentWill = willChunk.getCurrentWill(); - if (!doFill) - { - return amount; - } - - currentWill.addWill(type, amount); - markChunkAsDirty(willChunk, world.provider.getDimension()); - - return amount; - } - - public static WillChunk getWillChunk(World world, BlockPos pos) - { - WillChunk willChunk = getWillChunk(world.provider.getDimension(), pos.getX() >> 4, pos.getZ() >> 4); - if (willChunk == null) - { - Chunk chunk = world.getChunkFromBlockCoords(pos); - generateWill(chunk); - - willChunk = getWillChunk(world.provider.getDimension(), pos.getX() >> 4, pos.getZ() >> 4); - } - - return willChunk; - } - - public static double getCurrentWill(World world, BlockPos pos, EnumDemonWillType type) - { - WillChunk willChunk = getWillChunk(world, pos); - - DemonWillHolder currentWill = willChunk.getCurrentWill(); - return currentWill.getWill(type); - } - - private static void markChunkAsDirty(WillChunk chunk, int dim) - { - if (chunk.isModified()) - { - return; - } - PosXY pos = new PosXY(chunk.loc.x, chunk.loc.y); - if (!dirtyChunks.containsKey(dim)) - { - dirtyChunks.put(dim, new CopyOnWriteArrayList()); - } - CopyOnWriteArrayList dc = dirtyChunks.get(dim); - if (!dc.contains(pos)) - { - dc.add(pos); - } - } - - public static void generateWill(Chunk chunk) - { - addWillChunk(chunk.getWorld().provider.getDimension(), chunk, (short) 1, new DemonWillHolder()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/demonAura/package-info.java b/src/main/java/WayofTime/bloodmagic/demonAura/package-info.java deleted file mode 100644 index 807bd734..00000000 --- a/src/main/java/WayofTime/bloodmagic/demonAura/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.demonAura; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIAttackRangedBow.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIAttackRangedBow.java deleted file mode 100644 index 09db9725..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIAttackRangedBow.java +++ /dev/null @@ -1,165 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.item.ItemBow; -import net.minecraft.util.EnumHand; -import WayofTime.bloodmagic.entity.mob.EntityDemonBase; - -public class EntityAIAttackRangedBow extends EntityAIBase -{ - private final EntityDemonBase entity; - private final double moveSpeedAmp; - private int attackCooldown; - private final float maxAttackDistance; - private int attackTime = -1; - private int seeTime; - private boolean strafingClockwise; - private boolean strafingBackwards; - private int strafingTime = -1; - - public EntityAIAttackRangedBow(EntityDemonBase entityDemonBase, double speedAmplifier, int delay, float maxDistance) - { - this.entity = entityDemonBase; - this.moveSpeedAmp = speedAmplifier; - this.attackCooldown = delay; - this.maxAttackDistance = maxDistance * maxDistance; - this.setMutexBits(3); - } - - public void setAttackCooldown(int p_189428_1_) - { - this.attackCooldown = p_189428_1_; - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - return this.entity.getAttackTarget() == null ? false : this.isBowInMainhand(); - } - - protected boolean isBowInMainhand() - { - return this.entity.getHeldItemMainhand() != null && this.entity.getHeldItemMainhand().getItem() instanceof ItemBow; - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - return (this.shouldExecute() || !this.entity.getNavigator().noPath()) && this.isBowInMainhand(); - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - super.startExecuting(); - } - - /** - * Resets the task - */ - public void resetTask() - { - super.startExecuting(); - this.seeTime = 0; - this.attackTime = -1; - this.entity.resetActiveHand(); - } - - /** - * Updates the task - */ - public void updateTask() - { - EntityLivingBase entitylivingbase = this.entity.getAttackTarget(); - - if (entitylivingbase != null) - { - double d0 = this.entity.getDistanceSq(entitylivingbase.posX, entitylivingbase.getEntityBoundingBox().minY, entitylivingbase.posZ); - boolean flag = this.entity.getEntitySenses().canSee(entitylivingbase); - boolean flag1 = this.seeTime > 0; - - if (flag != flag1) - { - this.seeTime = 0; - } - - if (flag) - { - ++this.seeTime; - } else - { - --this.seeTime; - } - - if (d0 <= (double) this.maxAttackDistance && this.seeTime >= 20) - { - this.entity.getNavigator().clearPathEntity(); - ++this.strafingTime; - } else - { - this.entity.getNavigator().tryMoveToEntityLiving(entitylivingbase, this.moveSpeedAmp); - this.strafingTime = -1; - } - - if (this.strafingTime >= 20) - { - if ((double) this.entity.getRNG().nextFloat() < 0.3D) - { - this.strafingClockwise = !this.strafingClockwise; - } - - if ((double) this.entity.getRNG().nextFloat() < 0.3D) - { - this.strafingBackwards = !this.strafingBackwards; - } - - this.strafingTime = 0; - } - - if (this.strafingTime > -1) - { - if (d0 > (double) (this.maxAttackDistance * 0.75F)) - { - this.strafingBackwards = false; - } else if (d0 < (double) (this.maxAttackDistance * 0.25F)) - { - this.strafingBackwards = true; - } - - this.entity.getMoveHelper().strafe(this.strafingBackwards ? -0.5F : 0.5F, this.strafingClockwise ? 0.5F : -0.5F); - this.entity.faceEntity(entitylivingbase, 30.0F, 30.0F); - } else - { - this.entity.getLookHelper().setLookPositionWithEntity(entitylivingbase, 30.0F, 30.0F); - } - - if (this.entity.isHandActive()) - { - if (!flag && this.seeTime < -60) - { - this.entity.resetActiveHand(); - } else if (flag) - { - int i = this.entity.getItemInUseMaxCount(); - - if (i >= 20) - { - this.entity.resetActiveHand(); - this.entity.attackEntityWithRangedAttack(entitylivingbase, ItemBow.getArrowVelocity(i)); - this.attackTime = this.attackCooldown; - } - } - } else if (--this.attackTime <= 0 && this.seeTime >= -60) - { - this.entity.setActiveHand(EnumHand.MAIN_HAND); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIAttackStealthMelee.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIAttackStealthMelee.java deleted file mode 100644 index e54d3c1e..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIAttackStealthMelee.java +++ /dev/null @@ -1,163 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.pathfinding.Path; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; - -public class EntityAIAttackStealthMelee extends EntityAIBase -{ - protected EntityCorruptedChicken chicken; - - World worldObj; - /** - * An amount of decrementing ticks that allows the entity to attack once the - * tick reaches 0. - */ - protected int attackTick; - /** The speed with which the mob will approach the target */ - double speedTowardsTarget; - /** - * When true, the mob will continue chasing its target, even if it can't - * find a path to them right now. - */ - boolean longMemory; - /** The PathEntity of our entity. */ - Path entityPathEntity; - private int delayCounter; - private double targetX; - private double targetY; - private double targetZ; - protected final int attackInterval = 20; - private int failedPathFindingPenalty = 0; - private boolean canPenalize = false; - - public EntityAIAttackStealthMelee(EntityCorruptedChicken creature, double speedIn, boolean useLongMemory) - { - this.chicken = creature; - this.worldObj = creature.worldObj; - this.speedTowardsTarget = speedIn; - this.longMemory = useLongMemory; - this.setMutexBits(3); - } - - @Override - public boolean shouldExecute() - { - if (chicken.attackStateMachine != 1) - { - return false; - } - - EntityLivingBase entitylivingbase = this.chicken.getAttackTarget(); - - if (entitylivingbase == null) - { - return false; - } else if (!entitylivingbase.isEntityAlive()) - { - return false; - } else - { - if (canPenalize) - { - if (--this.delayCounter <= 0) - { - this.entityPathEntity = this.chicken.getNavigator().getPathToEntityLiving(entitylivingbase); - this.delayCounter = 4 + this.chicken.getRNG().nextInt(7); - return this.entityPathEntity != null; - } else - { - return true; - } - } - this.entityPathEntity = this.chicken.getNavigator().getPathToEntityLiving(entitylivingbase); - return this.entityPathEntity != null; - } - } - - @Override - public boolean continueExecuting() - { - return chicken.attackStateMachine == 1 && super.continueExecuting(); - } - - @Override - public void resetTask() - { - if (chicken.attackStateMachine == 1) - { - chicken.attackStateMachine = 0; - } - } - - @Override - public void updateTask() - { - EntityLivingBase entitylivingbase = this.chicken.getAttackTarget(); - this.chicken.getLookHelper().setLookPositionWithEntity(entitylivingbase, 30.0F, 30.0F); - double d0 = this.chicken.getDistanceSq(entitylivingbase.posX, entitylivingbase.getEntityBoundingBox().minY, entitylivingbase.posZ); - --this.delayCounter; - - if ((this.longMemory || this.chicken.getEntitySenses().canSee(entitylivingbase)) && this.delayCounter <= 0 && (this.targetX == 0.0D && this.targetY == 0.0D && this.targetZ == 0.0D || entitylivingbase.getDistanceSq(this.targetX, this.targetY, this.targetZ) >= 1.0D || this.chicken.getRNG().nextFloat() < 0.05F)) - { - this.targetX = entitylivingbase.posX; - this.targetY = entitylivingbase.getEntityBoundingBox().minY; - this.targetZ = entitylivingbase.posZ; - this.delayCounter = 4 + this.chicken.getRNG().nextInt(7); - - if (this.canPenalize) - { - this.delayCounter += failedPathFindingPenalty; - if (this.chicken.getNavigator().getPath() != null) - { - net.minecraft.pathfinding.PathPoint finalPathPoint = this.chicken.getNavigator().getPath().getFinalPathPoint(); - if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1) - failedPathFindingPenalty = 0; - else - failedPathFindingPenalty += 10; - } else - { - failedPathFindingPenalty += 10; - } - } - - if (d0 > 1024.0D) - { - this.delayCounter += 10; - } else if (d0 > 256.0D) - { - this.delayCounter += 5; - } - - if (!this.chicken.getNavigator().tryMoveToEntityLiving(entitylivingbase, this.speedTowardsTarget)) - { - this.delayCounter += 15; - } - } - - this.attackTick = Math.max(this.attackTick - 1, 0); - this.attackEntity(entitylivingbase, d0); - } - - protected void attackEntity(EntityLivingBase attacked, double distance) - { - double d0 = this.getAttackReachSqr(attacked); - - if (distance <= d0 && this.attackTick <= 0) - { - this.attackTick = 20; - this.chicken.swingArm(EnumHand.MAIN_HAND); - this.chicken.attackEntityAsMob(attacked); - - chicken.attackStateMachine = 2; - } - } - - protected double getAttackReachSqr(EntityLivingBase attackTarget) - { - return (double) (this.chicken.width * 2.0F * this.chicken.width * 2.0F + attackTarget.width); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIEatAndCorruptBlock.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIEatAndCorruptBlock.java deleted file mode 100644 index 6c95a68a..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIEatAndCorruptBlock.java +++ /dev/null @@ -1,105 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.entity.mob.EntityAspectedDemonBase; -import WayofTime.bloodmagic.inversion.CorruptionHandler; - -public class EntityAIEatAndCorruptBlock extends EntityAIBase -{ - /** The entity owner of this AITask */ - private final EntityAspectedDemonBase grassEaterEntity; - /** The world the grass eater entity is eating from */ - private final World world; - /** Number of ticks since the entity started to eat grass */ - int eatingGrassTimer; - - public EntityAIEatAndCorruptBlock(EntityAspectedDemonBase entity) - { - this.grassEaterEntity = entity; - this.world = entity.worldObj; - this.setMutexBits(7); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - if (this.grassEaterEntity.getRNG().nextInt(50) != 0) - { - return false; - } else - { - BlockPos pos = new BlockPos(this.grassEaterEntity.posX, this.grassEaterEntity.posY, this.grassEaterEntity.posZ).down(); - IBlockState offsetState = world.getBlockState(pos); - Block offsetBlock = offsetState.getBlock(); - return CorruptionHandler.isBlockCorruptible(world, grassEaterEntity.getType(), pos, offsetState, offsetBlock); - } - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - this.eatingGrassTimer = 40; - this.world.setEntityState(this.grassEaterEntity, (byte) 10); - this.grassEaterEntity.getNavigator().clearPathEntity(); - } - - /** - * Resets the task - */ - public void resetTask() - { - this.eatingGrassTimer = 0; - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - return this.eatingGrassTimer > 0; - } - - /** - * Number of ticks since the entity started to eat grass - */ - public int getEatingGrassTimer() - { - return this.eatingGrassTimer; - } - - /** - * Updates the task - */ - public void updateTask() - { - this.eatingGrassTimer = Math.max(0, this.eatingGrassTimer - 1); - - if (this.eatingGrassTimer == 4) - { - BlockPos blockpos = new BlockPos(this.grassEaterEntity.posX, this.grassEaterEntity.posY, this.grassEaterEntity.posZ); - - BlockPos offsetPos = blockpos.down(); - IBlockState offsetState = world.getBlockState(offsetPos); - Block offsetBlock = offsetState.getBlock(); - - if (CorruptionHandler.isBlockCorruptible(world, grassEaterEntity.getType(), offsetPos, offsetState, offsetBlock)) - { -// if (this.world.getGameRules().getBoolean("mobGriefing")) - { - this.world.playEvent(2001, offsetPos, Block.getIdFromBlock(offsetBlock)); - CorruptionHandler.corruptSurroundingBlocks(world, grassEaterEntity.getType(), offsetPos, 2, 0.5, 0.5); - } - - this.grassEaterEntity.eatGrassBonus(); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIFollowOwner.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIFollowOwner.java deleted file mode 100644 index 7227f8cf..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIFollowOwner.java +++ /dev/null @@ -1,147 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.pathfinding.PathNavigate; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.pathfinding.PathNodeType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import WayofTime.bloodmagic.entity.mob.EntityDemonBase; - -public class EntityAIFollowOwner extends EntityAIBase -{ - private EntityDemonBase thePet; - private EntityLivingBase theOwner; - World theWorld; - private double followSpeed; - private PathNavigate petPathfinder; - private int timeToRecalcPath; - float maxDist; - float minDist; - private float oldWaterCost; - - public EntityAIFollowOwner(EntityDemonBase thePetIn, double followSpeedIn, float minDistIn, float maxDistIn) - { - this.thePet = thePetIn; - this.theWorld = thePetIn.worldObj; - this.followSpeed = followSpeedIn; - this.petPathfinder = thePetIn.getNavigator(); - this.minDist = minDistIn; - this.maxDist = maxDistIn; - this.setMutexBits(3); - - if (!(thePetIn.getNavigator() instanceof PathNavigateGround)) - { - throw new IllegalArgumentException("Unsupported mob type for FollowOwnerGoal"); - } - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - EntityLivingBase entitylivingbase = this.thePet.getOwner(); - - if (entitylivingbase == null) - { - return false; - } else if (entitylivingbase instanceof EntityPlayer && ((EntityPlayer) entitylivingbase).isSpectator()) - { - return false; - } else if (this.thePet.isStationary()) - { - return false; - } else if (this.thePet.getDistanceSqToEntity(entitylivingbase) < (double) (this.minDist * this.minDist)) - { - return false; - } else - { - this.theOwner = entitylivingbase; - return true; - } - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - return !this.petPathfinder.noPath() && this.thePet.getDistanceSqToEntity(this.theOwner) > (double) (this.maxDist * this.maxDist) && !this.thePet.isStationary(); - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - this.timeToRecalcPath = 0; - this.oldWaterCost = this.thePet.getPathPriority(PathNodeType.WATER); - this.thePet.setPathPriority(PathNodeType.WATER, 0.0F); - } - - /** - * Resets the task - */ - public void resetTask() - { - this.theOwner = null; - this.petPathfinder.clearPathEntity(); - this.thePet.setPathPriority(PathNodeType.WATER, this.oldWaterCost); - } - - private boolean isEmptyBlock(BlockPos pos) - { - IBlockState iblockstate = this.theWorld.getBlockState(pos); - Block block = iblockstate.getBlock(); - return block == Blocks.AIR ? true : !iblockstate.isFullCube(); - } - - /** - * Updates the task - */ - public void updateTask() - { - this.thePet.getLookHelper().setLookPositionWithEntity(this.theOwner, 10.0F, (float) this.thePet.getVerticalFaceSpeed()); - - if (!this.thePet.isStationary()) - { - if (--this.timeToRecalcPath <= 0) - { - this.timeToRecalcPath = 10; - - if (!this.petPathfinder.tryMoveToEntityLiving(this.theOwner, this.followSpeed)) - { - if (!this.thePet.getLeashed()) - { - if (this.thePet.getDistanceSqToEntity(this.theOwner) >= 144.0D) - { - int i = MathHelper.floor_double(this.theOwner.posX) - 2; - int j = MathHelper.floor_double(this.theOwner.posZ) - 2; - int k = MathHelper.floor_double(this.theOwner.getEntityBoundingBox().minY); - - for (int l = 0; l <= 4; ++l) - { - for (int i1 = 0; i1 <= 4; ++i1) - { - if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isFullyOpaque() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1))) - { - this.thePet.setLocationAndAngles((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.thePet.rotationYaw, this.thePet.rotationPitch); - this.petPathfinder.clearPathEntity(); - return; - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIGrabEffectsFromOwner.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIGrabEffectsFromOwner.java deleted file mode 100644 index 04e5fc62..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIGrabEffectsFromOwner.java +++ /dev/null @@ -1,160 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.pathfinding.PathNavigate; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.pathfinding.PathNodeType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; - -public class EntityAIGrabEffectsFromOwner extends EntityAIBase -{ - private EntitySentientSpecter thePet; - private EntityLivingBase theOwner; - World theWorld; - private double followSpeed; - private PathNavigate petPathfinder; - private int timeToRecalcPath; - float minDist; - private float oldWaterCost; - - /** - * In order to steal effects from the owner, the mob has to be close to the - * owner. - */ - public EntityAIGrabEffectsFromOwner(EntitySentientSpecter thePetIn, double followSpeedIn, float minDistIn) - { - this.thePet = thePetIn; - this.theWorld = thePetIn.worldObj; - this.followSpeed = followSpeedIn; - this.petPathfinder = thePetIn.getNavigator(); - this.minDist = minDistIn; - this.setMutexBits(3); - - if (!(thePetIn.getNavigator() instanceof PathNavigateGround)) - { - throw new IllegalArgumentException("Unsupported mob type for FollowOwnerGoal"); - } - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - EntityLivingBase entitylivingbase = this.thePet.getOwner(); - - if (entitylivingbase == null) - { - return false; - } else if (entitylivingbase instanceof EntityPlayer && ((EntityPlayer) entitylivingbase).isSpectator()) - { - return false; - } else if (this.thePet.isStationary()) - { - return false; -// } else if (this.thePet.getDistanceSqToEntity(entitylivingbase) < (double) (this.minDist * this.minDist)) -// { -// return false; - } else if (!this.thePet.canStealEffectFromOwner(entitylivingbase)) - { - return false; - } else - { - this.theOwner = entitylivingbase; - return true; - } - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - return this.thePet.canStealEffectFromOwner(theOwner);// || !this.petPathfinder.noPath() && this.thePet.getDistanceSqToEntity(this.theOwner) > (double) (this.minDist * this.minDist) && !this.thePet.isStationary(); - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - this.timeToRecalcPath = 0; - this.oldWaterCost = this.thePet.getPathPriority(PathNodeType.WATER); - this.thePet.setPathPriority(PathNodeType.WATER, 0.0F); - } - - /** - * Resets the task - */ - public void resetTask() - { - this.theOwner = null; - this.petPathfinder.clearPathEntity(); - this.thePet.setPathPriority(PathNodeType.WATER, this.oldWaterCost); - } - - private boolean isEmptyBlock(BlockPos pos) - { - IBlockState iblockstate = this.theWorld.getBlockState(pos); - Block block = iblockstate.getBlock(); - return block == Blocks.AIR ? true : !iblockstate.isFullCube(); - } - - /** - * Updates the task - */ - public void updateTask() - { - this.thePet.getLookHelper().setLookPositionWithEntity(this.theOwner, 10.0F, (float) this.thePet.getVerticalFaceSpeed()); - - if (this.thePet.getDistanceSqToEntity(theOwner) < this.minDist * this.minDist) - { - if (this.thePet.stealEffectsFromOwner(theOwner)) - { - return; - } - } - - if (!this.thePet.isStationary()) - { - if (--this.timeToRecalcPath <= 0) - { - this.timeToRecalcPath = 10; - - if (!this.petPathfinder.tryMoveToEntityLiving(this.theOwner, this.followSpeed)) - { - if (!this.thePet.getLeashed()) - { - if (this.thePet.getDistanceSqToEntity(this.theOwner) >= 144.0D) - { - int i = MathHelper.floor_double(this.theOwner.posX) - 2; - int j = MathHelper.floor_double(this.theOwner.posZ) - 2; - int k = MathHelper.floor_double(this.theOwner.getEntityBoundingBox().minY); - - for (int l = 0; l <= 4; ++l) - { - for (int i1 = 0; i1 <= 4; ++i1) - { - if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isFullyOpaque() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1))) - { - this.thePet.setLocationAndAngles((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.thePet.rotationYaw, this.thePet.rotationPitch); - this.petPathfinder.clearPathEntity(); - return; - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIHurtByTargetIgnoreTamed.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIHurtByTargetIgnoreTamed.java deleted file mode 100644 index 061d0bf9..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIHurtByTargetIgnoreTamed.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import java.util.UUID; - -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IEntityOwnable; -import net.minecraft.entity.ai.EntityAIHurtByTarget; - -public class EntityAIHurtByTargetIgnoreTamed extends EntityAIHurtByTarget -{ - public EntityAIHurtByTargetIgnoreTamed(EntityCreature creatureIn, boolean entityCallsForHelpIn, Class... targetClassesIn) - { - super(creatureIn, true, targetClassesIn); - } - - @Override - public boolean isSuitableTarget(EntityLivingBase target, boolean includeInvincibles) - { - if (this.taskOwner instanceof IEntityOwnable && target instanceof IEntityOwnable) - { - UUID thisId = ((IEntityOwnable) this.taskOwner).getOwnerId(); - UUID targetId = ((IEntityOwnable) target).getOwnerId(); - if (thisId != null && targetId != null && thisId.equals(targetId)) - { - return false; - } - } - - return super.isSuitableTarget(target, includeInvincibles); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIMimicReform.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIMimicReform.java deleted file mode 100644 index b7e63c30..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIMimicReform.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.util.math.BlockPos; -import WayofTime.bloodmagic.entity.mob.EntityMimic; - -public class EntityAIMimicReform extends EntityAIBase -{ - private final EntityMimic theEntity; - - public EntityAIMimicReform(EntityMimic creatureIn) - { - this.theEntity = creatureIn; - this.setMutexBits(2); - } - - @Override - public boolean shouldExecute() - { - return this.theEntity.ticksExisted > 100 && this.theEntity.hasHome() && this.theEntity.isWithinHomeDistanceCurrentPosition(); - } - - @Override - public void startExecuting() - { - BlockPos homePos = this.theEntity.getHomePosition(); - if (theEntity.reformIntoMimicBlock(homePos)) - { - this.theEntity.setDead(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIOwnerHurtByTarget.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIOwnerHurtByTarget.java deleted file mode 100644 index ef8ca421..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIOwnerHurtByTarget.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAITarget; -import WayofTime.bloodmagic.entity.mob.EntityDemonBase; - -public class EntityAIOwnerHurtByTarget extends EntityAITarget -{ - EntityDemonBase theDefendingTameable; - EntityLivingBase theOwnerAttacker; - private int timestamp; - - public EntityAIOwnerHurtByTarget(EntityDemonBase theDefendingTameableIn) - { - super(theDefendingTameableIn, false); - this.theDefendingTameable = theDefendingTameableIn; - this.setMutexBits(1); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - if (!this.theDefendingTameable.isTamed()) - { - return false; - } else - { - EntityLivingBase owner = this.theDefendingTameable.getOwner(); - - if (owner == null) - { - return false; - } else - { - this.theOwnerAttacker = owner.getAITarget(); - int i = owner.getRevengeTimer(); - return i != this.timestamp && this.isSuitableTarget(this.theOwnerAttacker, false) && this.theDefendingTameable.shouldAttackEntity(this.theOwnerAttacker, owner); - } - } - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - this.taskOwner.setAttackTarget(this.theOwnerAttacker); - EntityLivingBase owner = this.theDefendingTameable.getOwner(); - - if (owner != null) - { - this.timestamp = owner.getRevengeTimer(); - } - - super.startExecuting(); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIOwnerHurtTarget.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIOwnerHurtTarget.java deleted file mode 100644 index 5c7ee8f2..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIOwnerHurtTarget.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAITarget; -import WayofTime.bloodmagic.entity.mob.EntityDemonBase; - -public class EntityAIOwnerHurtTarget extends EntityAITarget -{ - EntityDemonBase theEntityDemonBase; - EntityLivingBase theTarget; - private int timestamp; - - public EntityAIOwnerHurtTarget(EntityDemonBase theEntityDemonBaseIn) - { - super(theEntityDemonBaseIn, false); - this.theEntityDemonBase = theEntityDemonBaseIn; - this.setMutexBits(1); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - if (!this.theEntityDemonBase.isTamed()) - { - return false; - } else - { - EntityLivingBase entitylivingbase = this.theEntityDemonBase.getOwner(); - - if (entitylivingbase == null) - { - return false; - } else - { - this.theTarget = entitylivingbase.getLastAttacker(); - int i = entitylivingbase.getLastAttackerTime(); - return i != this.timestamp && this.isSuitableTarget(this.theTarget, false) && this.theEntityDemonBase.shouldAttackEntity(this.theTarget, entitylivingbase); - } - } - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - this.taskOwner.setAttackTarget(this.theTarget); - EntityLivingBase entitylivingbase = this.theEntityDemonBase.getOwner(); - - if (entitylivingbase != null) - { - this.timestamp = entitylivingbase.getLastAttackerTime(); - } - - super.startExecuting(); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIPickUpAlly.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIPickUpAlly.java deleted file mode 100644 index c1ac0d59..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIPickUpAlly.java +++ /dev/null @@ -1,170 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.pathfinding.Path; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.world.World; -import WayofTime.bloodmagic.entity.mob.EntityAspectedDemonBase; - -public class EntityAIPickUpAlly extends EntityAIBase -{ - World worldObj; - protected EntityAspectedDemonBase entity; - /** - * An amount of decrementing ticks that allows the entity to attack once the - * tick reaches 0. - */ - protected int attackTick; - /** The speed with which the mob will approach the target */ - double speedTowardsTarget; - /** - * When true, the mob will continue chasing its target, even if it can't - * find a path to them right now. - */ - boolean longMemory; - /** The PathEntity of our entity. */ - Path entityPathEntity; - private int delayCounter; - private double targetX; - private double targetY; - private double targetZ; - protected final int attackInterval = 20; - private int failedPathFindingPenalty = 0; - private boolean canPenalize = false; - - private EntityLivingBase pickupTarget = null; - - public EntityAIPickUpAlly(EntityAspectedDemonBase creature, double speedIn, boolean useLongMemory) - { - this.entity = creature; - this.worldObj = creature.worldObj; - this.speedTowardsTarget = speedIn; - this.longMemory = useLongMemory; - this.setMutexBits(3); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - if (this.entity.getRidingEntity() != null) - { - return false; - } - - AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5); - List list = this.entity.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType())); - for (EntityLivingBase testEntity : list) - { - if (testEntity != this.entity) - { - Path path = this.entity.getNavigator().getPathToEntityLiving(testEntity); - if (path != null) - { - this.entityPathEntity = path; - this.pickupTarget = testEntity; - return true; - } - } - } - - return false; - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - return this.entity.getRidingEntity() != null; - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() - { - this.entity.getNavigator().setPath(this.entityPathEntity, this.speedTowardsTarget); - this.delayCounter = 0; - } - - /** - * Resets the task - */ - public void resetTask() - { - this.entity.getNavigator().clearPathEntity(); - this.pickupTarget = null; - } - - /** - * Updates the task - */ - public void updateTask() - { - EntityLivingBase entitylivingbase = this.pickupTarget; - this.entity.getLookHelper().setLookPositionWithEntity(entitylivingbase, 30.0F, 30.0F); - double d0 = this.entity.getDistanceSq(entitylivingbase.posX, entitylivingbase.getEntityBoundingBox().minY, entitylivingbase.posZ); - --this.delayCounter; - - if ((this.longMemory || this.entity.getEntitySenses().canSee(entitylivingbase)) && this.delayCounter <= 0 && (this.targetX == 0.0D && this.targetY == 0.0D && this.targetZ == 0.0D || entitylivingbase.getDistanceSq(this.targetX, this.targetY, this.targetZ) >= 1.0D || this.entity.getRNG().nextFloat() < 0.05F)) - { - this.targetX = entitylivingbase.posX; - this.targetY = entitylivingbase.getEntityBoundingBox().minY; - this.targetZ = entitylivingbase.posZ; - this.delayCounter = 4 + this.entity.getRNG().nextInt(7); - - if (this.canPenalize) - { - this.delayCounter += failedPathFindingPenalty; - if (this.entity.getNavigator().getPath() != null) - { - net.minecraft.pathfinding.PathPoint finalPathPoint = this.entity.getNavigator().getPath().getFinalPathPoint(); - if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1) - failedPathFindingPenalty = 0; - else - failedPathFindingPenalty += 10; - } else - { - failedPathFindingPenalty += 10; - } - } - - if (d0 > 1024.0D) - { - this.delayCounter += 10; - } else if (d0 > 256.0D) - { - this.delayCounter += 5; - } - - if (!this.entity.getNavigator().tryMoveToEntityLiving(entitylivingbase, this.speedTowardsTarget)) - { - this.delayCounter += 15; - } - } - - this.attackTick = Math.max(this.attackTick - 1, 0); - this.pickUpEntity(entitylivingbase, d0); - } - - protected void pickUpEntity(EntityLivingBase potentialPickup, double distance) - { - double d0 = this.getAttackReachSqr(potentialPickup); - - if (distance <= d0 && this.attackTick <= 0 && !potentialPickup.isRiding()) - { - System.out.println("Hai!"); - potentialPickup.startRiding(this.entity, true); - } - } - - protected double getAttackReachSqr(EntityLivingBase attackTarget) - { - return (double) (this.entity.width * 2.0F * this.entity.width * 2.0F + attackTarget.width); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIProtectAlly.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIProtectAlly.java deleted file mode 100644 index ad46d8ca..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIProtectAlly.java +++ /dev/null @@ -1,107 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.world.World; -import WayofTime.bloodmagic.entity.mob.EntityAspectedDemonBase; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; - -public class EntityAIProtectAlly extends EntityAIBase -{ - /** The entity owner of this AITask */ - private final EntityCorruptedSheep entity; - /** The world the grass eater entity is eating from */ - private final World world; - /** Number of ticks since the entity started to eat grass */ - int castTimer; - - public EntityAIProtectAlly(EntityCorruptedSheep entity) - { - this.entity = entity; - this.world = entity.worldObj; - this.setMutexBits(7); - } - - public int getCastTimer() - { - return this.castTimer; - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - @Override - public boolean shouldExecute() - { - AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5); - List list = world.getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType())); - for (EntityLivingBase testEntity : list) - { - if (testEntity != this.entity) - { - if (this.entity.canProtectAlly(testEntity)) - { - return true; - } - } - } - - return false; - } - - /** - * Execute a one shot task or start executing a continuous task - */ - @Override - public void startExecuting() - { - this.castTimer = 100; - this.world.setEntityState(this.entity, (byte) 53); - this.entity.getNavigator().clearPathEntity(); - } - - /** - * Resets the task - */ - @Override - public void resetTask() - { - this.castTimer = 0; - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - @Override - public boolean continueExecuting() - { - return castTimer > 0; - } - - /** - * Updates the task - */ - @Override - public void updateTask() - { - this.castTimer = Math.max(0, this.castTimer - 1); - if (castTimer == 0) - { - AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5); - List list = world.getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType())); - for (EntityLivingBase testEntity : list) - { - if (testEntity != this.entity) - { - if (this.entity.applyProtectionToAlly(testEntity)) - { - return; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIRetreatToHeal.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIRetreatToHeal.java deleted file mode 100644 index c4b08304..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIRetreatToHeal.java +++ /dev/null @@ -1,159 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import java.util.List; - -import javax.annotation.Nullable; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.RandomPositionGenerator; -import net.minecraft.pathfinding.Path; -import net.minecraft.pathfinding.PathNavigate; -import net.minecraft.util.EntitySelectors; -import net.minecraft.util.math.Vec3d; -import WayofTime.bloodmagic.entity.mob.EntityDemonBase; - -import com.google.common.base.Predicate; -import com.google.common.base.Predicates; - -public class EntityAIRetreatToHeal extends EntityAIBase -{ - private final Predicate canBeSeenSelector; - /** The entity we are attached to */ - protected EntityDemonBase theEntity; - private double farSpeed; - private double nearSpeed; - private double safeHealDistance = 3; - protected T closestLivingEntity; - private float avoidDistance; - /** The PathEntity of our entity */ - private Path entityPathEntity; - /** The PathNavigate of our entity */ - private PathNavigate entityPathNavigate; - private Class classToAvoid; - private Predicate avoidTargetSelector; - - public EntityAIRetreatToHeal(EntityDemonBase theEntityIn, Class classToAvoidIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn) - { - this(theEntityIn, classToAvoidIn, Predicates.alwaysTrue(), avoidDistanceIn, farSpeedIn, nearSpeedIn); - } - - public EntityAIRetreatToHeal(EntityDemonBase theEntityIn, Class classToAvoidIn, Predicate avoidTargetSelectorIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn) - { - this.canBeSeenSelector = new Predicate() - { - public boolean apply(@Nullable Entity p_apply_1_) - { - return p_apply_1_.isEntityAlive() && EntityAIRetreatToHeal.this.theEntity.getEntitySenses().canSee(p_apply_1_); - } - }; - this.theEntity = theEntityIn; - this.classToAvoid = classToAvoidIn; - this.avoidTargetSelector = avoidTargetSelectorIn; - this.avoidDistance = avoidDistanceIn; - this.farSpeed = farSpeedIn; - this.nearSpeed = nearSpeedIn; - this.entityPathNavigate = theEntityIn.getNavigator(); - this.setMutexBits(3); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - @Override - public boolean shouldExecute() - { - if (!this.theEntity.shouldEmergencyHeal()) - { - return false; - } - - //This part almost doesn't matter - List list = this.theEntity.worldObj.getEntitiesWithinAABB(this.classToAvoid, this.theEntity.getEntityBoundingBox().expand((double) this.avoidDistance, 3.0D, (double) this.avoidDistance), Predicates.and(new Predicate[] { EntitySelectors.CAN_AI_TARGET, this.canBeSeenSelector, this.avoidTargetSelector })); - - if (list.isEmpty()) - { - return true; //No entities nearby, so I can freely heal - } else - { - this.closestLivingEntity = list.get(0); - Vec3d vec3d = RandomPositionGenerator.findRandomTargetBlockAwayFrom(this.theEntity, 16, 7, new Vec3d(this.closestLivingEntity.posX, this.closestLivingEntity.posY, this.closestLivingEntity.posZ)); - - if (vec3d == null) - { - return false; //Nowhere to run, gotta fight! - } else if (this.closestLivingEntity.getDistanceSq(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord) < this.closestLivingEntity.getDistanceSqToEntity(this.theEntity)) - { - return false; //I'll be headed off if I choose this direction. - } else - { - this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord); - return this.entityPathEntity != null; - } - } - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - @Override - public boolean continueExecuting() - { - return this.theEntity.shouldEmergencyHeal();//!this.entityPathNavigate.noPath(); - } - - /** - * Execute a one shot task or start executing a continuous task - */ - @Override - public void startExecuting() - { - if (this.entityPathEntity != null) - { - this.entityPathNavigate.setPath(this.entityPathEntity, this.farSpeed); - } - } - - /** - * Resets the task - */ - @Override - public void resetTask() - { - this.closestLivingEntity = null; - } - - /** - * Updates the task - */ - @Override - public void updateTask() - { - if (this.closestLivingEntity != null) - { - if (this.theEntity.getDistanceSqToEntity(this.closestLivingEntity) < 49.0D) - { - this.theEntity.getNavigator().setSpeed(this.nearSpeed); - } else - { - this.theEntity.getNavigator().setSpeed(this.farSpeed); - } - - if (this.theEntity.ticksExisted % 20 == 0 && this.theEntity.getDistanceSqToEntity(this.closestLivingEntity) >= safeHealDistance * safeHealDistance) - { - healEntity(); - return; - } - } - - if (this.theEntity.ticksExisted % 20 == 0) - { - healEntity(); - } - } - - public void healEntity() - { - this.theEntity.performEmergencyHeal(2); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIStealthRetreat.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIStealthRetreat.java deleted file mode 100644 index 68d84d7b..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIStealthRetreat.java +++ /dev/null @@ -1,107 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.RandomPositionGenerator; -import net.minecraft.pathfinding.Path; -import net.minecraft.pathfinding.PathNavigate; -import net.minecraft.util.math.Vec3d; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; - -public class EntityAIStealthRetreat extends EntityAIBase -{ - /** The entity we are attached to */ - protected EntityCorruptedChicken entity; - private final double farSpeed; - private final double nearSpeed; - private final float avoidDistance; - /** The PathEntity of our entity */ - private Path entityPathEntity; - /** The PathNavigate of our entity */ - private final PathNavigate entityPathNavigate; - - private int ticksLeft = 0; - - public EntityAIStealthRetreat(EntityCorruptedChicken theEntityIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn) - { - this.entity = theEntityIn; - this.avoidDistance = avoidDistanceIn; - this.farSpeed = farSpeedIn; - this.nearSpeed = nearSpeedIn; - this.entityPathNavigate = theEntityIn.getNavigator(); - this.setMutexBits(1); - } - - @Override - public boolean shouldExecute() - { - if (this.entity.attackStateMachine == 2) - { - EntityLivingBase attacked = this.entity.getAttackTarget(); - if (attacked == null) - { - return false; - } - - Vec3d vec3d = RandomPositionGenerator.findRandomTargetBlockAwayFrom(this.entity, 16, 7, new Vec3d(attacked.posX, attacked.posY, attacked.posZ)); - - if (vec3d == null) - { - return false; - } else if (attacked.getDistanceSq(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord) < attacked.getDistanceSqToEntity(this.entity)) - { - return false; - } else - { - this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord); - return this.entityPathEntity != null; - } - } - - return false; - } - - @Override - public boolean continueExecuting() - { - if (this.entityPathNavigate.noPath()) - { - this.entity.attackStateMachine = 0; - return false; - } - - return this.entity.attackStateMachine == 2; - } - - @Override - public void resetTask() - { - ticksLeft = 0; - } - - @Override - public void startExecuting() - { - ticksLeft = this.entity.worldObj.rand.nextInt(100) + 100; - this.entityPathNavigate.setPath(this.entityPathEntity, this.farSpeed); - } - - @Override - public void updateTask() - { - ticksLeft--; - if (ticksLeft <= 0 || this.entity.getAttackTarget() == null) - { - this.entity.attackStateMachine = 0; - return; - } - - if (this.entity.getDistanceSqToEntity(this.entity.getAttackTarget()) < 49.0D) - { - this.entity.getNavigator().setSpeed(this.nearSpeed); - } else - { - this.entity.getNavigator().setSpeed(this.farSpeed); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIStealthTowardsTarget.java b/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIStealthTowardsTarget.java deleted file mode 100644 index fa9a52fe..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/ai/EntityAIStealthTowardsTarget.java +++ /dev/null @@ -1,104 +0,0 @@ -package WayofTime.bloodmagic.entity.ai; - -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.RandomPositionGenerator; -import net.minecraft.util.math.Vec3d; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; - -public class EntityAIStealthTowardsTarget extends EntityAIBase -{ - private final EntityCorruptedChicken entity; - private double xPosition; - private double yPosition; - private double zPosition; - private final double speed; - - private int ticksLeft = 0; - - public EntityAIStealthTowardsTarget(EntityCorruptedChicken creatureIn, double speedIn) - { - this.entity = creatureIn; - this.speed = speedIn; - this.setMutexBits(1); - } - - @Override - public boolean shouldExecute() - { - if (this.entity.attackStateMachine != 0 || this.entity.getAttackTarget() == null) - { - return false; - } - - EntityLivingBase target = this.entity.getAttackTarget(); - Vec3d vec3d = null; - if (target instanceof EntityCreature) - { - vec3d = RandomPositionGenerator.findRandomTarget((EntityCreature) target, 10, 7); - } else - { - vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7); - } - - if (vec3d == null) - { - return false; - } else - { - ticksLeft = this.entity.worldObj.rand.nextInt(200) + 100; - this.xPosition = vec3d.xCoord; - this.yPosition = vec3d.yCoord; - this.zPosition = vec3d.zCoord; - return true; - } - } - - @Override - public void resetTask() - { - ticksLeft = 0; - } - - @Override - public boolean continueExecuting() - { - ticksLeft--; - if (ticksLeft <= 0) - { - this.entity.attackStateMachine = 1; - } - - this.entity.cloak(); - - if (this.entity.getNavigator().noPath()) - { - EntityLivingBase target = this.entity.getAttackTarget(); - Vec3d vec3d = null; - if (target instanceof EntityCreature) - { - vec3d = RandomPositionGenerator.findRandomTarget((EntityCreature) target, 10, 7); - } else - { - vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7); - } - - if (vec3d != null) - { - this.xPosition = vec3d.xCoord; - this.yPosition = vec3d.yCoord; - this.zPosition = vec3d.zCoord; - this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed); - } - } - - return this.entity.attackStateMachine == 0; - } - - @Override - public void startExecuting() - { - this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityAspectedDemonBase.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityAspectedDemonBase.java deleted file mode 100644 index a3ba864b..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityAspectedDemonBase.java +++ /dev/null @@ -1,282 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.EntityDataManager; -import net.minecraft.util.DamageSource; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.gson.Serializers; - -import com.google.common.base.Predicate; - -import java.util.Locale; - -public abstract class EntityAspectedDemonBase extends EntityDemonBase -{ - protected static final DataParameter TYPE = EntityDataManager.createKey(EntityAspectedDemonBase.class, Serializers.WILL_TYPE_SERIALIZER); - - public EntityAspectedDemonBase(World worldIn) - { - super(worldIn); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataManager.register(TYPE, EnumDemonWillType.DEFAULT); - } - - public double getMeleeResist() - { - return 0; - } - - public double getProjectileResist() - { - return 0; - } - - public double getMagicResist() - { - return 0; - } - - public double getBaseHP(EnumDemonWillType type) - { - double baseHP = 40; - - switch (type) - { - case DEFAULT: - break; - case CORROSIVE: - break; - case DESTRUCTIVE: - break; - case VENGEFUL: - baseHP *= 0.8; - break; - case STEADFAST: - baseHP *= 1.25; - break; - } - - return baseHP; - } - - public double getBaseMeleeDamage(EnumDemonWillType type) - { - double baseDamage = 8; - - switch (type) - { - case DEFAULT: - break; - case CORROSIVE: - baseDamage *= 0.8; - break; - case DESTRUCTIVE: - baseDamage *= 1.5; - break; - case VENGEFUL: - baseDamage *= 0.8; - break; - case STEADFAST: - baseDamage *= 0.6; - break; - } - - return baseDamage; - } - - public double getBaseSpeed(EnumDemonWillType type) - { - double baseSpeed = 0.27; - - switch (type) - { - case DEFAULT: - break; - case CORROSIVE: - break; - case DESTRUCTIVE: - break; - case VENGEFUL: - baseSpeed *= 1.3; - break; - case STEADFAST: - break; - } - - return baseSpeed; - } - - public double getBaseSprintModifier(EnumDemonWillType type) - { - double baseSprint = 1; - - switch (type) - { - case DEFAULT: - break; - case CORROSIVE: - break; - case DESTRUCTIVE: - break; - case VENGEFUL: - baseSprint *= 1.2; - break; - case STEADFAST: - break; - } - - return baseSprint; - } - - public double getBaseKnockbackResist(EnumDemonWillType type) - { - double baseKnockback = 0; - - switch (type) - { - case DEFAULT: - break; - case CORROSIVE: - break; - case DESTRUCTIVE: - break; - case VENGEFUL: - break; - case STEADFAST: - baseKnockback += 0.35; - break; - } - - return baseKnockback; - } - - public void applyEntityAttributes(EnumDemonWillType type) - { - this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(this.getBaseHP(type)); - this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(this.getBaseSpeed(type)); - this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(this.getBaseMeleeDamage(type)); - this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(this.getBaseKnockbackResist(type)); - } - - @Override - public boolean attackEntityFrom(DamageSource source, float amount) - { - if (this.isEntityInvulnerable(source)) - { - return false; - } else - { - float newAmount = amount; - if (source.isProjectile()) - { - newAmount *= MathHelper.clamp_double(1 - getProjectileResist(), 0, 1); - } else - { - newAmount *= MathHelper.clamp_double(1 - getMeleeResist(), 0, 1); - } - - if (source.isMagicDamage()) - { - newAmount *= MathHelper.clamp_double(1 - getMagicResist(), 0, 1); - } - - return super.attackEntityFrom(source, newAmount); - } - } - - public EnumDemonWillType getType() - { - return this.dataManager.get(TYPE); - } - - public void setType(EnumDemonWillType type) - { - this.dataManager.set(TYPE, type); - this.applyEntityAttributes(type); - this.setCombatTask(); - } - - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - - tag.setString(Constants.NBT.WILL_TYPE, this.getType().toString()); - } - - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - setType(EnumDemonWillType.DEFAULT); - } else - { - setType(EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH))); - } - } - - public class TeamAttackPredicate implements Predicate - { - private final EntityAspectedDemonBase demon; - - public TeamAttackPredicate(EntityAspectedDemonBase demon) - { - this.demon = demon; - } - - //Returns true if this mob can attack the inputted mob. - @Override - public boolean apply(EntityLivingBase input) - { - if (input instanceof EntityAspectedDemonBase) - { - if (((EntityAspectedDemonBase) input).getType() == demon.getType()) - { - return false; - } - } - - return input != null; - } - } - - //Returns true if the inputted mob is on the same team. - public static class WillTypePredicate implements Predicate - { - private final EnumDemonWillType type; - - public WillTypePredicate(EnumDemonWillType type) - { - this.type = type; - } - - //Returns true if this mob is the same type. - @Override - public boolean apply(EntityLivingBase input) - { - if (input instanceof EntityAspectedDemonBase) - { - if (((EntityAspectedDemonBase) input).getType() == type) - { - return true; - } - } - - return false; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedChicken.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedChicken.java deleted file mode 100644 index 474343cf..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedChicken.java +++ /dev/null @@ -1,234 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.pathfinding.PathNodeType; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.entity.ai.EntityAIAttackStealthMelee; -import WayofTime.bloodmagic.entity.ai.EntityAIStealthRetreat; -import WayofTime.bloodmagic.entity.ai.EntityAIStealthTowardsTarget; - -public class EntityCorruptedChicken extends EntityAspectedDemonBase -{ - private EntityAIAttackStealthMelee aiAttackOnCollide; - private final int attackPriority = 3; - - public float wingRotation; - public float destPos; - public float oFlapSpeed; - public float oFlap; - public float wingRotDelta = 1.0F; - /** The time until the next egg is spawned. */ - public int timeUntilNextEgg; - - /* - * 0 means the chicken is casting stealth on itself when targeted, running - * to a random location near the target. 1 means the chicken is running - * after the target, attempting to attack it. 2 means it is running away - * from the target for a certain amount of time, before going back into - * state 0. - */ - public int attackStateMachine = 0; - - public EntityCorruptedChicken(World world) - { - this(world, EnumDemonWillType.DEFAULT); - } - - public EntityCorruptedChicken(World world, EnumDemonWillType type) - { - super(world); - this.setSize(0.4F, 0.7F); - this.timeUntilNextEgg = this.rand.nextInt(600) + 600; - this.setPathPriority(PathNodeType.WATER, 0.0F); - - this.setType(type); - } - - protected void initEntityAI() - { - this.tasks.addTask(0, new EntityAISwimming(this)); -// this.tasks.addTask(1, new EntityAIPanic(this, 1.4D)); - this.tasks.addTask(attackPriority, new EntityAIStealthTowardsTarget(this, 1)); - this.tasks.addTask(attackPriority, new EntityAIStealthRetreat(this, 6.0F, 1.4D, 1.4D)); - this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.tasks.addTask(7, new EntityAILookIdle(this)); - - this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLivingBase.class, 10, true, false, new EntityAspectedDemonBase.TeamAttackPredicate(this))); - } - - @Override - public void setCombatTask() - { - if (aiAttackOnCollide != null) - { - this.tasks.removeTask(aiAttackOnCollide); - } - - aiAttackOnCollide = new EntityAIAttackStealthMelee(this, this.getBaseSprintModifier(getType()), false); - this.tasks.addTask(attackPriority, aiAttackOnCollide); - } - - public void cloak() - { - this.addPotionEffect(new PotionEffect(MobEffects.INVISIBILITY, 50, 0, false, false)); - } - - @Override - public double getBaseHP(EnumDemonWillType type) - { - return super.getBaseHP(type) * 0.5; - } - - @Override - public double getBaseMeleeDamage(EnumDemonWillType type) - { - return super.getBaseMeleeDamage(type) * 2.5; - } - - @Override - public double getBaseSpeed(EnumDemonWillType type) - { - return super.getBaseSpeed(type); - } - - @Override - public double getBaseSprintModifier(EnumDemonWillType type) - { - return super.getBaseSprintModifier(type); - } - - @Override - public double getBaseKnockbackResist(EnumDemonWillType type) - { - return super.getBaseKnockbackResist(type); - } - - @Override - public float getEyeHeight() - { - return this.height; - } - - @Override - public void onLivingUpdate() - { - super.onLivingUpdate(); - -// if (!worldObj.isRemote) -// System.out.println("State machine: " + this.attackStateMachine); - - this.oFlap = this.wingRotation; - this.oFlapSpeed = this.destPos; - this.destPos = (float) ((double) this.destPos + (double) (this.onGround ? -1 : 4) * 0.3D); - this.destPos = MathHelper.clamp_float(this.destPos, 0.0F, 1.0F); - - if (!this.onGround && this.wingRotDelta < 1.0F) - { - this.wingRotDelta = 1.0F; - } - - this.wingRotDelta = (float) ((double) this.wingRotDelta * 0.9D); - - if (!this.onGround && this.motionY < 0.0D) - { - this.motionY *= 0.6D; - } - - this.wingRotation += this.wingRotDelta * 2.0F; - - if (!this.worldObj.isRemote && !this.isChild() && --this.timeUntilNextEgg <= 0) - { - this.playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); - this.dropItem(Items.EGG, 1); - this.timeUntilNextEgg = this.rand.nextInt(600) + 600; - } - } - - @Override - public void fall(float distance, float damageMultiplier) - { - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_CHICKEN_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_CHICKEN_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_CHICKEN_DEATH; - } - - @Override - protected float getSoundPitch() - { - return super.getSoundPitch() * 0.5f; - } - - @Override - protected void playStepSound(BlockPos pos, Block blockIn) - { - this.playSound(SoundEvents.ENTITY_CHICKEN_STEP, 0.15F, 1.0F); - } - - @Override - public void readEntityFromNBT(NBTTagCompound compound) - { - super.readEntityFromNBT(compound); - - if (compound.hasKey("EggLayTime")) - { - this.timeUntilNextEgg = compound.getInteger("EggLayTime"); - } - } - - @Override - public void writeEntityToNBT(NBTTagCompound compound) - { - super.writeEntityToNBT(compound); - compound.setInteger("EggLayTime", this.timeUntilNextEgg); - } - - @Override - public void updatePassenger(Entity passenger) - { - super.updatePassenger(passenger); - float f = MathHelper.sin(this.renderYawOffset * 0.017453292F); - float f1 = MathHelper.cos(this.renderYawOffset * 0.017453292F); - float f2 = 0.1F; - float f3 = 0.0F; - passenger.setPosition(this.posX + (double) (0.1F * f), this.posY + (double) (this.height * 0.5F) + passenger.getYOffset() + 0.0D, this.posZ - (double) (0.1F * f1)); - - if (passenger instanceof EntityLivingBase) - { - ((EntityLivingBase) passenger).renderYawOffset = this.renderYawOffset; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedSheep.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedSheep.java deleted file mode 100644 index 516ff8d2..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedSheep.java +++ /dev/null @@ -1,411 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import java.util.List; -import java.util.Map; -import java.util.Random; - -import javax.annotation.Nullable; - -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IEntityLivingData; -import net.minecraft.entity.ai.EntityAIAttackMelee; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.EnumDyeColor; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.DataSerializers; -import net.minecraft.network.datasync.EntityDataManager; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.DifficultyInstance; -import net.minecraft.world.World; -import net.minecraftforge.common.IShearable; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.entity.ai.EntityAIEatAndCorruptBlock; -import WayofTime.bloodmagic.entity.ai.EntityAIProtectAlly; - -import com.google.common.collect.Maps; - -public class EntityCorruptedSheep extends EntityAspectedDemonBase implements IShearable -{ - private static final DataParameter DYE_COLOR = EntityDataManager.createKey(EntityCorruptedSheep.class, DataSerializers.BYTE); - - private static final Map DYE_TO_RGB = Maps.newEnumMap(EnumDyeColor.class); - /** - * Used to control movement as well as wool regrowth. Set to 40 on - * handleHealthUpdate and counts down with each tick. - */ - private int sheepTimer; - - @Getter - private int castTimer = 0; - private EntityAIEatAndCorruptBlock entityAIEatGrass; - private EntityAIProtectAlly entityAIProtectAlly; - private EntityAIAttackMelee aiAttackOnCollide; - - private final int attackPriority = 3; - - public int protectionCooldown = 0; - public static int maxProtectionCooldown = 90 * 20; //90 second cooldown - - public static float[] getDyeRgb(EnumDyeColor dyeColor) - { - return (float[]) DYE_TO_RGB.get(dyeColor); - } - - public EntityCorruptedSheep(World world) - { - this(world, EnumDemonWillType.DEFAULT); - } - - public EntityCorruptedSheep(World world, EnumDemonWillType type) - { - super(world); - this.setSize(0.9F, 1.3F); - - this.setType(type); - } - - protected void initEntityAI() - { - this.entityAIEatGrass = new EntityAIEatAndCorruptBlock(this); - this.entityAIProtectAlly = new EntityAIProtectAlly(this); - - this.tasks.addTask(0, new EntityAISwimming(this)); - this.tasks.addTask(2, entityAIProtectAlly); - this.tasks.addTask(5, this.entityAIEatGrass); - this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - - this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLivingBase.class, 10, true, false, new EntityAspectedDemonBase.TeamAttackPredicate(this))); - } - - @Override - public void setCombatTask() - { - if (aiAttackOnCollide != null) - { - this.tasks.removeTask(aiAttackOnCollide); - } - - aiAttackOnCollide = new EntityAIAttackMelee(this, this.getBaseSprintModifier(getType()), false); - this.tasks.addTask(attackPriority, aiAttackOnCollide); - } - - @Override - protected void updateAITasks() - { - this.sheepTimer = this.entityAIEatGrass.getEatingGrassTimer(); - this.castTimer = this.entityAIProtectAlly.getCastTimer(); - super.updateAITasks(); - } - - @Override - public void onLivingUpdate() - { - if (this.worldObj.isRemote) - { - this.sheepTimer = Math.max(0, this.sheepTimer - 1); - this.castTimer = Math.max(0, castTimer - 1); - if (this.castTimer == 70) - { - this.playSound(this.getHurtSound(), this.getSoundVolume() * 2, this.getSoundPitch()); - } - } - - this.protectionCooldown = Math.max(0, this.protectionCooldown - 1); - - super.onLivingUpdate(); - } - - public boolean canProtectAlly(EntityLivingBase entity) - { - return this.protectionCooldown <= 0 && entity.getHealth() < entity.getMaxHealth() && !entity.isPotionActive(MobEffects.RESISTANCE); - } - - public boolean applyProtectionToAlly(EntityLivingBase entity) - { - if (canProtectAlly(entity)) - { - entity.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 20 * 20, 3)); - this.protectionCooldown = maxProtectionCooldown; - } - - return false; - } - - @Override - public double getBaseHP(EnumDemonWillType type) - { - return super.getBaseHP(type) * 0.75; - } - - @Override - public double getBaseMeleeDamage(EnumDemonWillType type) - { - return super.getBaseMeleeDamage(type) * 0.75; - } - - @Override - public double getBaseSpeed(EnumDemonWillType type) - { - return super.getBaseSpeed(type); - } - - @Override - public double getBaseSprintModifier(EnumDemonWillType type) - { - return super.getBaseSprintModifier(type); - } - - @Override - public double getBaseKnockbackResist(EnumDemonWillType type) - { - return super.getBaseKnockbackResist(type) + 0.2; - } - - @Override - public double getMeleeResist() - { - return 0.2; - } - - @Override - public double getProjectileResist() - { - return 0.6; - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataManager.register(DYE_COLOR, Byte.valueOf((byte) 0)); - } - - @Override - @SideOnly(Side.CLIENT) - public void handleStatusUpdate(byte id) - { - if (id == 10) - { - this.sheepTimer = 40; - } else if (id == 53) - { - this.castTimer = 100; - } else - { - super.handleStatusUpdate(id); - } - } - - @SideOnly(Side.CLIENT) - public float getHeadRotationPointY(float partialTick) - { - return this.sheepTimer <= 0 ? 0.0F : (this.sheepTimer >= 4 && this.sheepTimer <= 36 ? 1.0F : (this.sheepTimer < 4 ? ((float) this.sheepTimer - partialTick) / 4.0F : -((float) (this.sheepTimer - 40) - partialTick) / 4.0F)); - } - - @SideOnly(Side.CLIENT) - public float getHeadRotationAngleX(float partialTick) - { - if (this.sheepTimer > 4 && this.sheepTimer <= 36) - { - float f = ((float) (this.sheepTimer - 4) - partialTick) / 32.0F; - return ((float) Math.PI / 5F) + ((float) Math.PI * 7F / 100F) * MathHelper.sin(f * 28.7F); - } else - { - return this.sheepTimer > 0 ? ((float) Math.PI / 5F) : this.rotationPitch * 0.017453292F; - } - } - - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - tag.setBoolean("Sheared", this.getSheared()); - tag.setByte("Color", (byte) this.getFleeceColor().getMetadata()); - tag.setInteger("protection", this.protectionCooldown); - } - - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - this.setSheared(tag.getBoolean("Sheared")); - this.setFleeceColor(EnumDyeColor.byMetadata(tag.getByte("Color"))); - this.protectionCooldown = tag.getInteger("protection"); - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_SHEEP_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_SHEEP_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_SHEEP_DEATH; - } - - @Override - protected float getSoundPitch() - { - return super.getSoundPitch() * 0.5f; - } - - @Override - protected void playStepSound(BlockPos pos, Block blockIn) - { - this.playSound(SoundEvents.ENTITY_SHEEP_STEP, 0.15F, 1.0F); - } - - /** - * Gets the wool color of this sheep. - */ - public EnumDyeColor getFleeceColor() - { - return EnumDyeColor.byMetadata(((Byte) this.dataManager.get(DYE_COLOR)).byteValue() & 15); - } - - /** - * Sets the wool color of this sheep - */ - public void setFleeceColor(EnumDyeColor color) - { - byte b0 = ((Byte) this.dataManager.get(DYE_COLOR)).byteValue(); - this.dataManager.set(DYE_COLOR, Byte.valueOf((byte) (b0 & 240 | color.getMetadata() & 15))); - } - - /** - * returns true if a sheeps wool has been sheared - */ - public boolean getSheared() - { - return (((Byte) this.dataManager.get(DYE_COLOR)).byteValue() & 16) != 0; - } - - /** - * make a sheep sheared if set to true - */ - public void setSheared(boolean sheared) - { - byte b0 = ((Byte) this.dataManager.get(DYE_COLOR)).byteValue(); - - if (sheared) - { - this.dataManager.set(DYE_COLOR, Byte.valueOf((byte) (b0 | 16))); - } else - { - this.dataManager.set(DYE_COLOR, Byte.valueOf((byte) (b0 & -17))); - } - } - - /** - * Chooses a "vanilla" sheep color based on the provided random. - */ - public static EnumDyeColor getRandomSheepColor(Random random) - { - int i = random.nextInt(100); - return i < 5 ? EnumDyeColor.BLACK : (i < 10 ? EnumDyeColor.GRAY : (i < 15 ? EnumDyeColor.SILVER : (i < 18 ? EnumDyeColor.BROWN : (random.nextInt(500) == 0 ? EnumDyeColor.PINK : EnumDyeColor.WHITE)))); - } - - /** - * This function applies the benefits of growing back wool and faster - * growing up to the acting entity. (This function is used in the - * AIEatGrass) - */ - @Override - public void eatGrassBonus() - { - this.setSheared(false); - - if (this.isChild()) - { - this.heal(3); - } - } - - /** - * Called only once on an entity when first time spawned, via egg, mob - * spawner, natural spawning etc, but not called when entity is reloaded - * from nbt. Mainly used for initializing attributes and inventory - */ - @Override - public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata) - { - livingdata = super.onInitialSpawn(difficulty, livingdata); - this.setFleeceColor(getRandomSheepColor(this.worldObj.rand)); - return livingdata; - } - - @Override - public float getEyeHeight() - { - return 0.95F * this.height; - } - - static - { - DYE_TO_RGB.put(EnumDyeColor.WHITE, new float[] { 1.0F, 1.0F, 1.0F }); - DYE_TO_RGB.put(EnumDyeColor.ORANGE, new float[] { 0.85F, 0.5F, 0.2F }); - DYE_TO_RGB.put(EnumDyeColor.MAGENTA, new float[] { 0.7F, 0.3F, 0.85F }); - DYE_TO_RGB.put(EnumDyeColor.LIGHT_BLUE, new float[] { 0.4F, 0.6F, 0.85F }); - DYE_TO_RGB.put(EnumDyeColor.YELLOW, new float[] { 0.9F, 0.9F, 0.2F }); - DYE_TO_RGB.put(EnumDyeColor.LIME, new float[] { 0.5F, 0.8F, 0.1F }); - DYE_TO_RGB.put(EnumDyeColor.PINK, new float[] { 0.95F, 0.5F, 0.65F }); - DYE_TO_RGB.put(EnumDyeColor.GRAY, new float[] { 0.3F, 0.3F, 0.3F }); - DYE_TO_RGB.put(EnumDyeColor.SILVER, new float[] { 0.6F, 0.6F, 0.6F }); - DYE_TO_RGB.put(EnumDyeColor.CYAN, new float[] { 0.3F, 0.5F, 0.6F }); - DYE_TO_RGB.put(EnumDyeColor.PURPLE, new float[] { 0.5F, 0.25F, 0.7F }); - DYE_TO_RGB.put(EnumDyeColor.BLUE, new float[] { 0.2F, 0.3F, 0.7F }); - DYE_TO_RGB.put(EnumDyeColor.BROWN, new float[] { 0.4F, 0.3F, 0.2F }); - DYE_TO_RGB.put(EnumDyeColor.GREEN, new float[] { 0.4F, 0.5F, 0.2F }); - DYE_TO_RGB.put(EnumDyeColor.RED, new float[] { 0.6F, 0.2F, 0.2F }); - DYE_TO_RGB.put(EnumDyeColor.BLACK, new float[] { 0.1F, 0.1F, 0.1F }); - } - - @Override - public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos) - { - return !this.getSheared() && !this.isChild(); - } - - @Override - public List onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) - { - this.setSheared(true); - int i = 1 + this.rand.nextInt(3); - - java.util.List ret = new java.util.ArrayList(); - for (int j = 0; j < i; ++j) - ret.add(new ItemStack(Item.getItemFromBlock(Blocks.WOOL), 1, this.getFleeceColor().getMetadata())); - - this.playSound(SoundEvents.ENTITY_SHEEP_SHEAR, 1.0F, 1.0F); - return ret; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedSpider.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedSpider.java deleted file mode 100644 index ee512510..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedSpider.java +++ /dev/null @@ -1,246 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.entity.ai.EntityAIAttackMelee; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.DataSerializers; -import net.minecraft.network.datasync.EntityDataManager; -import net.minecraft.pathfinding.PathNavigate; -import net.minecraft.pathfinding.PathNavigateClimber; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.entity.ai.EntityAIPickUpAlly; - -public class EntityCorruptedSpider extends EntityAspectedDemonBase -{ - private static final DataParameter CLIMBING = EntityDataManager.createKey(EntityCorruptedSpider.class, DataSerializers.BYTE); - - public EntityCorruptedSpider(World world) - { - this(world, EnumDemonWillType.DEFAULT); - } - - public EntityCorruptedSpider(World world, EnumDemonWillType type) - { - super(world); - this.setSize(1.4F, 0.9F); - - this.setType(type); - } - - protected void initEntityAI() - { - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); - this.tasks.addTask(3, new EntityAIPickUpAlly(this, 1, true)); - this.tasks.addTask(4, new EntityCorruptedSpider.AISpiderAttack(this)); - this.tasks.addTask(5, new EntityAIWander(this, 0.8D)); - this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0])); - - this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLivingBase.class, 10, true, false, new EntityAspectedDemonBase.TeamAttackPredicate(this))); - } - - @Override - public double getBaseHP(EnumDemonWillType type) - { - return super.getBaseHP(type); - } - - @Override - public double getBaseMeleeDamage(EnumDemonWillType type) - { - return super.getBaseMeleeDamage(type); - } - - @Override - public double getBaseSpeed(EnumDemonWillType type) - { - return super.getBaseSpeed(type); - } - - @Override - public double getBaseSprintModifier(EnumDemonWillType type) - { - return super.getBaseSprintModifier(type); - } - - @Override - public double getBaseKnockbackResist(EnumDemonWillType type) - { - return super.getBaseKnockbackResist(type); - } - - @Override - public double getMountedYOffset() - { - return (double) (this.height * 0.5F); - } - - @Override - protected PathNavigate getNewNavigator(World worldIn) - { - return new PathNavigateClimber(this, worldIn); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataManager.register(CLIMBING, Byte.valueOf((byte) 0)); - } - - @Override - public void onUpdate() - { - super.onUpdate(); - - if (!this.worldObj.isRemote) - { - this.setBesideClimbableBlock(this.isCollidedHorizontally); - } - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_SPIDER_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_SPIDER_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_SPIDER_DEATH; - } - - @Override - protected float getSoundPitch() - { - return super.getSoundPitch() * 0.5f; - } - - @Override - protected void playStepSound(BlockPos pos, Block blockIn) - { - this.playSound(SoundEvents.ENTITY_SPIDER_STEP, 0.15F, 1.0F); - } - - @Override - public boolean isOnLadder() - { - return this.isBesideClimbableBlock(); - } - - @Override - public void setInWeb() - { - } - - @Override - public EnumCreatureAttribute getCreatureAttribute() - { - return EnumCreatureAttribute.ARTHROPOD; - } - - @Override - public boolean isPotionApplicable(PotionEffect potioneffectIn) - { - return potioneffectIn.getPotion() == MobEffects.POISON ? false : super.isPotionApplicable(potioneffectIn); - } - - public boolean isBesideClimbableBlock() - { - return (((Byte) this.dataManager.get(CLIMBING)).byteValue() & 1) != 0; - } - - public void setBesideClimbableBlock(boolean climbing) - { - byte b0 = ((Byte) this.dataManager.get(CLIMBING)).byteValue(); - - if (climbing) - { - b0 = (byte) (b0 | 1); - } else - { - b0 = (byte) (b0 & -2); - } - - this.dataManager.set(CLIMBING, Byte.valueOf(b0)); - } - - @Override - public float getEyeHeight() - { - return 0.65F; - } - - static class AISpiderAttack extends EntityAIAttackMelee - { - public AISpiderAttack(EntityCorruptedSpider spider) - { - super(spider, 1.0D, true); - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - float f = this.attacker.getBrightness(1.0F); - - if (f >= 0.5F && this.attacker.getRNG().nextInt(100) == 0) - { - this.attacker.setAttackTarget((EntityLivingBase) null); - return false; - } else - { - return super.continueExecuting(); - } - } - - protected double getAttackReachSqr(EntityLivingBase attackTarget) - { - return (double) (4.0F + attackTarget.width); - } - } - - static class AISpiderTarget extends EntityAINearestAttackableTarget - { - public AISpiderTarget(EntityCorruptedSpider spider, Class classTarget) - { - super(spider, classTarget, true); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - float f = this.taskOwner.getBrightness(1.0F); - return f >= 0.5F ? false : super.shouldExecute(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedZombie.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedZombie.java deleted file mode 100644 index 34b0825e..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityCorruptedZombie.java +++ /dev/null @@ -1,226 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackMelee; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIMoveThroughVillage; -import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.ItemBow; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.entity.ai.EntityAIAttackRangedBow; - -public class EntityCorruptedZombie extends EntityAspectedDemonBase -{ - private final EntityAIAttackRangedBow aiArrowAttack = new EntityAIAttackRangedBow(this, 1.0D, 20, 15.0F); - private final EntityAIAttackMelee aiAttackOnCollide = new EntityAIAttackMelee(this, 1.0D, false); - - private final int attackPriority = 3; - - public EntityCorruptedZombie(World worldIn) - { - super(worldIn); - this.setSize(0.6F, 1.95F); -// ((PathNavigateGround) getNavigator()).setCanSwim(false); - this.tasks.addTask(0, new EntityAISwimming(this)); - this.tasks.addTask(attackPriority, aiAttackOnCollide); - this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); - this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - - this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false)); - this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] { EntityPigZombie.class })); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityVillager.class, false)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true)); - - this.setCombatTask(); -// this.targetTasks.addTask(8, new EntityAINearestAttackableTarget(this, EntityMob.class, 10, true, false, new TargetPredicate(this))); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(35.0D); - getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40.0D); - getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); - getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.27D); - this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(2.0D); - } - - @Override - public void setCombatTask() - { - if (this.worldObj != null && !this.worldObj.isRemote) - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - ItemStack itemstack = this.getHeldItemMainhand(); - - if (itemstack != null && itemstack.getItem() instanceof ItemBow) - { - int i = 20; - - if (this.worldObj.getDifficulty() != EnumDifficulty.HARD) - { - i = 40; - } - - this.aiArrowAttack.setAttackCooldown(i); - this.tasks.addTask(attackPriority, this.aiArrowAttack); - } else - { - this.tasks.addTask(attackPriority, this.aiAttackOnCollide); - } - } - } - - @Override - public boolean attackEntityFrom(DamageSource source, float amount) - { - return this.isEntityInvulnerable(source) ? false : super.attackEntityFrom(source, amount); - } - - /** - * Redone from EntityMob to prevent despawning on peaceful. - */ - @Override - public boolean attackEntityAsMob(Entity attackedEntity) - { - boolean flag = super.attackEntityAsMob(attackedEntity); - - if (flag) - { - //EMPTY - - return true; - } else - { - return false; - } - } - - /** - * @param toHeal - * @return Amount of Will consumed from the Aura to heal - */ - public double absorbWillFromAuraToHeal(double toHeal) - { - if (worldObj.isRemote) - { - return 0; - } - - double healthMissing = this.getMaxHealth() - this.getHealth(); - if (healthMissing <= 0) - { - return 0; - } - - double will = WorldDemonWillHandler.getCurrentWill(worldObj, getPosition(), getType()); - - toHeal = Math.min(healthMissing, Math.min(toHeal, will / getWillToHealth())); - if (toHeal > 0) - { - this.heal((float) toHeal); - return WorldDemonWillHandler.drainWill(worldObj, getPosition(), getType(), toHeal * getWillToHealth(), true); - } - - return 0; - } - - public double getWillToHealth() - { - return 2; - } - - @Override - protected boolean canDespawn() - { - return !this.isTamed() && super.canDespawn(); - } - - public void onUpdate() - { - if (!this.worldObj.isRemote && this.ticksExisted % 20 == 0) - { - absorbWillFromAuraToHeal(2); - } - - super.onUpdate(); - } - - //TODO: Change to fit the given AI - @Override - public boolean shouldAttackEntity(EntityLivingBase attacker, EntityLivingBase owner) - { - if (!(attacker instanceof EntityCreeper) && !(attacker instanceof EntityGhast)) - { - return super.shouldAttackEntity(attacker, owner); - } else - { - return false; - } - } - - @Override - protected float getSoundPitch() - { - return super.getSoundPitch() * 0.5f; - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_ZOMBIE_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_ZOMBIE_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_ZOMBIE_DEATH; - } - - @Override - protected void playStepSound(BlockPos pos, Block block) - { - this.playSound(SoundEvents.ENTITY_ZOMBIE_STEP, 0.15F, 1.0F); - } - - /** - * Returns the volume for the sounds this mob makes. - */ - @Override - protected float getSoundVolume() - { - return 0.4F; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityDemonBase.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityDemonBase.java deleted file mode 100644 index 70d99fa1..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityDemonBase.java +++ /dev/null @@ -1,360 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import java.util.UUID; - -import net.minecraft.block.Block; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IEntityOwnable; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.init.SoundEvents; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.DataSerializers; -import net.minecraft.network.datasync.EntityDataManager; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.management.PreYggdrasilConverter; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; - -import com.google.common.base.Optional; -import com.google.common.base.Predicate; - -public class EntityDemonBase extends EntityCreature implements IEntityOwnable -{ - protected static final DataParameter TAMED = EntityDataManager.createKey(EntityDemonBase.class, DataSerializers.BYTE); - protected static final DataParameter> OWNER_UNIQUE_ID = EntityDataManager.>createKey(EntityDemonBase.class, DataSerializers.OPTIONAL_UNIQUE_ID); - - public EntityDemonBase(World worldIn) - { - super(worldIn); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataManager.register(TAMED, Byte.valueOf((byte) 0)); - this.dataManager.register(OWNER_UNIQUE_ID, Optional.absent()); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE); - } - - public void setCombatTask() - { - - } - - @Override - public boolean isPotionApplicable(PotionEffect effect) - { - return super.isPotionApplicable(effect); - } - - @Override - public void onLivingUpdate() - { - this.updateArmSwingProgress(); - - super.onLivingUpdate(); - } - - @Override - public boolean attackEntityFrom(DamageSource source, float amount) - { - return this.isEntityInvulnerable(source) ? false : super.attackEntityFrom(source, amount); - } - - /** - * Redone from EntityMob to prevent despawning on peaceful. - */ - @Override - public boolean attackEntityAsMob(Entity attackedEntity) - { - float f = (float) this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue(); - int i = 0; - - if (attackedEntity instanceof EntityLivingBase) - { - f += EnchantmentHelper.getModifierForCreature(this.getHeldItemMainhand(), ((EntityLivingBase) attackedEntity).getCreatureAttribute()); - i += EnchantmentHelper.getKnockbackModifier(this); - } - - boolean flag = attackedEntity.attackEntityFrom(DamageSource.causeMobDamage(this), f); - - if (flag) - { - if (i > 0 && attackedEntity instanceof EntityLivingBase) - { - ((EntityLivingBase) attackedEntity).knockBack(this, (float) i * 0.5F, (double) MathHelper.sin(this.rotationYaw * 0.017453292F), (double) (-MathHelper.cos(this.rotationYaw * 0.017453292F))); - this.motionX *= 0.6D; - this.motionZ *= 0.6D; - } - - int j = EnchantmentHelper.getFireAspectModifier(this); - - if (j > 0) - { - attackedEntity.setFire(j * 4); - } - - if (attackedEntity instanceof EntityPlayer) - { - EntityPlayer entityplayer = (EntityPlayer) attackedEntity; - ItemStack itemstack = this.getHeldItemMainhand(); - ItemStack itemstack1 = entityplayer.isHandActive() ? entityplayer.getActiveItemStack() : null; - - if (itemstack != null && itemstack1 != null && itemstack.getItem() instanceof ItemAxe && itemstack1.getItem() == Items.SHIELD) - { - float f1 = 0.25F + (float) EnchantmentHelper.getEfficiencyModifier(this) * 0.05F; - - if (this.rand.nextFloat() < f1) - { - entityplayer.getCooldownTracker().setCooldown(Items.SHIELD, 100); - this.worldObj.setEntityState(entityplayer, (byte) 30); - } - } - } - - this.applyEnchantments(this, attackedEntity); - } - - return flag; - } - - @Override - public void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack) - { - super.setItemStackToSlot(slotIn, stack); - - if (!this.worldObj.isRemote && slotIn == EntityEquipmentSlot.MAINHAND) - { - this.setCombatTask(); - } - } - - public boolean isStationary() - { - return false; - } - - public boolean absorbExplosion(Explosion explosion) - { - return false; - } - - public void performEmergencyHeal(double toHeal) - { - this.heal((float) toHeal); - - if (worldObj instanceof WorldServer) - { - WorldServer server = (WorldServer) worldObj; - server.spawnParticle(EnumParticleTypes.HEART, this.posX + (double) (this.rand.nextFloat() * this.width * 2.0F) - (double) this.width, this.posY + 0.5D + (double) (this.rand.nextFloat() * this.height), this.posZ + (double) (this.rand.nextFloat() * this.width * 2.0F) - (double) this.width, 7, 0.2, 0.2, 0.2, 0, new int[0]); - } - } - - public boolean shouldEmergencyHeal() - { - return this.getHealth() < this.getMaxHealth() * 0.5; - } - - @Override - protected boolean canDespawn() - { - return !this.isTamed() && super.canDespawn(); - } - - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - - if (this.getOwnerId() == null) - { - tag.setString("OwnerUUID", ""); - } else - { - tag.setString("OwnerUUID", this.getOwnerId().toString()); - } - - } - - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - - String s = ""; - - if (tag.hasKey("OwnerUUID", 8)) - { - s = tag.getString("OwnerUUID"); - } else - { - String s1 = tag.getString("Owner"); - s = PreYggdrasilConverter.convertMobOwnerIfNeeded(this.getServer(), s1); - } - - if (!s.isEmpty()) - { - try - { - this.setOwnerId(UUID.fromString(s)); - this.setTamed(true); - } catch (Throwable var4) - { - this.setTamed(false); - } - } - - this.setCombatTask(); - } - - //TODO: Change to fit the given AI - public boolean shouldAttackEntity(EntityLivingBase attacker, EntityLivingBase owner) - { - if (!(attacker instanceof EntityCreeper) && !(attacker instanceof EntityGhast)) - { - if (attacker instanceof IEntityOwnable) - { - IEntityOwnable entityOwnable = (IEntityOwnable) attacker; - - if (entityOwnable.getOwner() == owner) - { - return false; - } - } - - return attacker instanceof EntityPlayer && owner instanceof EntityPlayer && !((EntityPlayer) owner).canAttackPlayer((EntityPlayer) attacker) ? false : !(attacker instanceof EntityHorse) || !((EntityHorse) attacker).isTame(); - } else - { - return false; - } - } - - public void attackEntityWithRangedAttack(EntityLivingBase target, float velocity) - { - - } - - public boolean isTamed() - { - return (((Byte) this.dataManager.get(TAMED)).byteValue() & 4) != 0; - } - - public void setTamed(boolean tamed) - { - byte b0 = ((Byte) this.dataManager.get(TAMED)).byteValue(); - - if (tamed) - { - this.dataManager.set(TAMED, Byte.valueOf((byte) (b0 | 4))); - } else - { - this.dataManager.set(TAMED, Byte.valueOf((byte) (b0 & -5))); - } - -// this.setupTamedAI(); - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_COW_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_COW_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_COW_DEATH; - } - - @Override - protected void playStepSound(BlockPos pos, Block block) - { - this.playSound(SoundEvents.ENTITY_COW_STEP, 0.15F, 1.0F); - } - - /** - * Returns the volume for the sounds this mob makes. - */ - @Override - protected float getSoundVolume() - { - return 0.4F; - } - - @Override - public UUID getOwnerId() - { - return (UUID) (this.dataManager.get(OWNER_UNIQUE_ID)).orNull(); - } - - public void setOwnerId(UUID uuid) - { - this.dataManager.set(OWNER_UNIQUE_ID, Optional.fromNullable(uuid)); - } - - @Override - public EntityLivingBase getOwner() - { - try - { - UUID uuid = this.getOwnerId(); - return uuid == null ? null : this.worldObj.getPlayerEntityByUUID(uuid); - } catch (IllegalArgumentException var2) - { - return null; - } - } - - public void setOwner(EntityPlayer player) - { - setOwnerId(player.getUniqueID()); - } - - public class TargetPredicate implements Predicate - { - EntityDemonBase entity; - - public TargetPredicate(EntityDemonBase entity) - { - this.entity = entity; - } - - @Override - public boolean apply(EntityMob input) - { - return entity.shouldAttackEntity(input, this.entity.getOwner()); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityMimic.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntityMimic.java deleted file mode 100644 index 37c32741..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntityMimic.java +++ /dev/null @@ -1,401 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackMelee; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.DataSerializers; -import net.minecraft.network.datasync.EntityDataManager; -import net.minecraft.pathfinding.PathNavigate; -import net.minecraft.pathfinding.PathNavigateClimber; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import WayofTime.bloodmagic.block.BlockMimic; -import WayofTime.bloodmagic.entity.ai.EntityAIMimicReform; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.TileMimic; - -public class EntityMimic extends EntityDemonBase -{ - /** - * Copy of EntitySpider's AI (should be pretty evident...) - */ - private static final DataParameter CLIMBING = EntityDataManager.createKey(EntityMimic.class, DataSerializers.BYTE); - - public boolean dropItemsOnBreak = true; - public NBTTagCompound tileTag = new NBTTagCompound(); - public int metaOfReplacedBlock = 0; - public int playerCheckRadius = 5; - - public EntityMimic(World worldIn) - { - super(worldIn); - this.setSize(0.9F, 0.9F); - - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); - this.tasks.addTask(4, new EntityMimic.AISpiderAttack(this)); - this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1)); - this.tasks.addTask(6, new EntityAIWander(this, 0.8D)); - this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - this.tasks.addTask(7, new EntityAIMimicReform(this)); - - this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0])); - this.targetTasks.addTask(2, new EntityMimic.AISpiderTarget(this, EntityPlayer.class)); - this.targetTasks.addTask(3, new EntityMimic.AISpiderTarget(this, EntityIronGolem.class)); - } - - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - - tag.setBoolean("dropItemsOnBreak", dropItemsOnBreak); - tag.setTag("tileTag", tileTag); - tag.setInteger("metaOfReplacedBlock", metaOfReplacedBlock); - tag.setInteger("playerCheckRadius", playerCheckRadius); - } - - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - - dropItemsOnBreak = tag.getBoolean("dropItemsOnBreak"); - tileTag = tag.getCompoundTag("tileTag"); - metaOfReplacedBlock = tag.getInteger("metaOfReplacedBlock"); - playerCheckRadius = tag.getInteger("playerCheckRadius"); - } - - public ItemStack getMimicItemStack() - { - return this.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - } - - public void setMimicItemStack(ItemStack stack) - { - this.setItemStackToSlot(EntityEquipmentSlot.CHEST, stack); - } - - public boolean spawnHeldBlockOnDeath(World world, BlockPos pos) - { - return world.isAirBlock(pos) && TileMimic.replaceMimicWithBlockActual(world, pos, getMimicItemStack(), tileTag, metaOfReplacedBlock); - } - - public boolean spawnMimicBlockAtPosition(World world, BlockPos pos) - { - if (world.isAirBlock(pos)) - { - IBlockState mimicState = ModBlocks.MIMIC.getStateFromMeta(BlockMimic.sentientMimicMeta); - world.setBlockState(pos, mimicState, 3); - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileMimic) - { - TileMimic mimic = (TileMimic) tile; - mimic.metaOfReplacedBlock = metaOfReplacedBlock; - mimic.tileTag = tileTag; - mimic.setInventorySlotContents(0, getMimicItemStack()); - mimic.dropItemsOnBreak = dropItemsOnBreak; - mimic.refreshTileEntity(); - } - - return true; - } - - return false; - } - - public void initializeMimic(ItemStack heldStack, NBTTagCompound tileTag, boolean dropItemsOnBreak, int metaOfReplacedBlock, int playerCheckRadius, BlockPos homePosition) - { - this.setMimicItemStack(heldStack); - this.tileTag = tileTag; - this.dropItemsOnBreak = dropItemsOnBreak; - this.metaOfReplacedBlock = metaOfReplacedBlock; - this.playerCheckRadius = playerCheckRadius; - this.setHomePosAndDistance(homePosition, 2); //TODO: Save this. - } - - public boolean reformIntoMimicBlock(BlockPos centerPos) - { - int horizontalRadius = 1; - int verticalRadius = 1; - - for (int hR = 0; hR <= horizontalRadius; hR++) - { - for (int vR = 0; vR <= verticalRadius; vR++) - { - for (int i = -hR; i <= hR; i++) - { - for (int k = -hR; k <= hR; k++) - { - for (int j = -vR; j <= vR; j += 2 * vR + (vR > 0 ? 0 : 1)) - { - if (!(Math.abs(i) == hR || Math.abs(k) == hR)) - { - continue; - } - - BlockPos newPos = centerPos.add(i, j, k); - if (spawnMimicBlockAtPosition(worldObj, newPos)) - { - return true; - } - } - } - } - } - } - - return false; - } - - @Override - public void onDeath(DamageSource cause) - { - super.onDeath(cause); - - if (!worldObj.isRemote) - { - BlockPos centerPos = this.getPosition(); - - int horizontalRadius = 1; - int verticalRadius = 1; - - for (int hR = 0; hR <= horizontalRadius; hR++) - { - for (int vR = 0; vR <= verticalRadius; vR++) - { - for (int i = -hR; i <= hR; i++) - { - for (int k = -hR; k <= hR; k++) - { - for (int j = -vR; j <= vR; j += 2 * vR + (vR > 0 ? 0 : 1)) - { - if (!(Math.abs(i) == hR || Math.abs(k) == hR)) - { - continue; - } - - BlockPos newPos = centerPos.add(i, j, k); - if (spawnHeldBlockOnDeath(worldObj, newPos)) - { - return; - } - } - } - } - } - } - } - } - - /** - * Returns the Y offset from the entity's position for any entity riding - * this one. - */ - @Override - public double getMountedYOffset() - { - return (double) (this.height * 0.5F); - } - - /** - * Returns new PathNavigateGround instance - */ - @Override - protected PathNavigate getNewNavigator(World worldIn) - { - return new PathNavigateClimber(this, worldIn); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataManager.register(CLIMBING, Byte.valueOf((byte) 0)); -// this.dataManager.register(ITEMSTACK, null); - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - if (!this.worldObj.isRemote && this.worldObj.getDifficulty() == EnumDifficulty.PEACEFUL) - { - if (reformIntoMimicBlock(this.getPosition())) - { - this.setDead(); - } - } - - super.onUpdate(); - - if (!this.worldObj.isRemote) - { - this.setBesideClimbableBlock(this.isCollidedHorizontally); - } - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(16.0D); - this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.3D); - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_SPIDER_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_SPIDER_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_SPIDER_DEATH; - } - - @Override - protected void playStepSound(BlockPos pos, Block blockIn) - { - this.playSound(SoundEvents.ENTITY_SPIDER_STEP, 0.15F, 1.0F); - } - - /** - * returns true if this entity is by a ladder, false otherwise - */ - @Override - public boolean isOnLadder() - { - return this.isBesideClimbableBlock(); - } - - /** - * Sets the Entity inside a web block. - */ - @Override - public void setInWeb() - { - - } - - /** - * Get this Entity's EnumCreatureAttribute - */ - @Override - public EnumCreatureAttribute getCreatureAttribute() - { - return EnumCreatureAttribute.ARTHROPOD; - } - - @Override - public boolean isPotionApplicable(PotionEffect potioneffectIn) - { - return potioneffectIn.getPotion() == MobEffects.POISON ? false : super.isPotionApplicable(potioneffectIn); - } - - /** - * Returns true if the WatchableObject (Byte) is 0x01 otherwise returns - * false. The WatchableObject is updated using setBesideClimableBlock. - */ - public boolean isBesideClimbableBlock() - { - return (((Byte) this.dataManager.get(CLIMBING)).byteValue() & 1) != 0; - } - - /** - * Updates the WatchableObject (Byte) created in entityInit(), setting it to - * 0x01 if par1 is true or 0x00 if it is false. - */ - public void setBesideClimbableBlock(boolean climbing) - { - byte b0 = ((Byte) this.dataManager.get(CLIMBING)).byteValue(); - - if (climbing) - { - b0 = (byte) (b0 | 1); - } else - { - b0 = (byte) (b0 & -2); - } - - this.dataManager.set(CLIMBING, Byte.valueOf(b0)); - } - - public float getEyeHeight() - { - return 0.65F; - } - - static class AISpiderAttack extends EntityAIAttackMelee - { - public AISpiderAttack(EntityMimic spider) - { - super(spider, 1.0D, true); - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - @Override - public boolean continueExecuting() - { - return super.continueExecuting(); - } - - @Override - protected double getAttackReachSqr(EntityLivingBase attackTarget) - { - return (double) (4.0F + attackTarget.width); - } - } - - static class AISpiderTarget extends EntityAINearestAttackableTarget - { - public AISpiderTarget(EntityMimic spider, Class classTarget) - { - super(spider, classTarget, true); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - return super.shouldExecute(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/mob/EntitySentientSpecter.java b/src/main/java/WayofTime/bloodmagic/entity/mob/EntitySentientSpecter.java deleted file mode 100644 index 6e6c15a9..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/mob/EntitySentientSpecter.java +++ /dev/null @@ -1,572 +0,0 @@ -package WayofTime.bloodmagic.entity.mob; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import javax.annotation.Nullable; - -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.Block; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackMelee; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityTippedArrow; -import net.minecraft.init.Enchantments; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemBow; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.entity.ai.EntityAIAttackRangedBow; -import WayofTime.bloodmagic.entity.ai.EntityAIFollowOwner; -import WayofTime.bloodmagic.entity.ai.EntityAIGrabEffectsFromOwner; -import WayofTime.bloodmagic.entity.ai.EntityAIHurtByTargetIgnoreTamed; -import WayofTime.bloodmagic.entity.ai.EntityAIOwnerHurtByTarget; -import WayofTime.bloodmagic.entity.ai.EntityAIOwnerHurtTarget; -import WayofTime.bloodmagic.entity.ai.EntityAIRetreatToHeal; -import WayofTime.bloodmagic.item.soul.ItemSentientBow; -import WayofTime.bloodmagic.registry.ModItems; - -public class EntitySentientSpecter extends EntityDemonBase -{ - @Getter - @Setter - protected EnumDemonWillType type = EnumDemonWillType.DESTRUCTIVE; - - @Getter - @Setter - protected boolean wasGivenSentientArmour = false; - - private final EntityAIAttackRangedBow aiArrowAttack = new EntityAIAttackRangedBow(this, 1.0D, 20, 15.0F); - private final EntityAIAttackMelee aiAttackOnCollide = new EntityAIAttackMelee(this, 1.0D, false); - - private final int attackPriority = 3; - - public EntitySentientSpecter(World worldIn) - { - super(worldIn); - this.setSize(0.6F, 1.95F); -// ((PathNavigateGround) getNavigator()).setCanSwim(false); - this.tasks.addTask(0, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAIRetreatToHeal(this, EntityCreature.class, 6.0F, 1.0D, 1.2D)); - this.tasks.addTask(attackPriority, aiAttackOnCollide); - this.tasks.addTask(4, new EntityAIGrabEffectsFromOwner(this, 2.0D, 1.0F)); - this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); - - this.targetTasks.addTask(4, new EntityAIHurtByTargetIgnoreTamed(this, false, new Class[0])); - - this.setCombatTask(); -// this.targetTasks.addTask(8, new EntityAINearestAttackableTarget(this, EntityMob.class, 10, true, false, new TargetPredicate(this))); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40.0D); - getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); - getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.27D); - } - - @Override - public void setCombatTask() - { - if (this.worldObj != null && !this.worldObj.isRemote) - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - ItemStack itemstack = this.getHeldItemMainhand(); - - if (itemstack != null && itemstack.getItem() instanceof ItemBow) - { - int i = 20; - - if (this.worldObj.getDifficulty() != EnumDifficulty.HARD) - { - i = 40; - } - - this.aiArrowAttack.setAttackCooldown(i); - this.tasks.addTask(attackPriority, this.aiArrowAttack); - } else - { - this.tasks.addTask(attackPriority, this.aiAttackOnCollide); - } - } - } - - @Override - public boolean isPotionApplicable(PotionEffect effect) - { - Potion potion = effect.getPotion(); - - if (potion == MobEffects.REGENERATION || potion == MobEffects.INSTANT_HEALTH) //Specter cannot be healed by normal means - { - return false; - } - - return super.isPotionApplicable(effect); - } - - public boolean canStealEffectFromOwner(EntityLivingBase owner, PotionEffect effect) - { - return effect.getPotion().isBadEffect() && this.type == EnumDemonWillType.CORROSIVE; - } - - public boolean canStealEffectFromOwner(EntityLivingBase owner) - { - if (this.type != EnumDemonWillType.CORROSIVE) - { - return false; - } - - for (PotionEffect eff : owner.getActivePotionEffects()) - { - if (canStealEffectFromOwner(owner, eff)) - { - return true; - } - } - - return false; - } - - public boolean stealEffectsFromOwner(EntityLivingBase owner) - { - if (this.type != EnumDemonWillType.CORROSIVE) - { - return false; - } - - boolean hasStolenEffect = false; - - List removedEffects = new ArrayList(); - - for (PotionEffect eff : owner.getActivePotionEffects()) - { - if (canStealEffectFromOwner(owner, eff)) - { - removedEffects.add(eff); - hasStolenEffect = true; - } - } - - for (PotionEffect eff : removedEffects) - { - owner.removePotionEffect(eff.getPotion()); - this.addPotionEffect(eff); - } - - return hasStolenEffect; - } - - public boolean applyNegativeEffectsToAttacked(EntityLivingBase attackedEntity, float percentTransmitted) - { - boolean hasProvidedEffect = false; - List removedEffects = new ArrayList(); - for (PotionEffect eff : this.getActivePotionEffects()) - { - if (eff.getPotion().isBadEffect() && attackedEntity.isPotionApplicable(eff)) - { - if (!attackedEntity.isPotionActive(eff.getPotion())) - { - removedEffects.add(eff); - hasProvidedEffect = true; - } else - { - PotionEffect activeEffect = attackedEntity.getActivePotionEffect(eff.getPotion()); - if (activeEffect.getAmplifier() < eff.getAmplifier() || activeEffect.getDuration() < eff.getDuration() * percentTransmitted) - { - removedEffects.add(eff); - hasProvidedEffect = true; - } - } - } - } - - for (PotionEffect eff : removedEffects) - { - if (!attackedEntity.isPotionActive(eff.getPotion())) - { - PotionEffect newEffect = new PotionEffect(eff.getPotion(), (int) (eff.getDuration() * percentTransmitted), eff.getAmplifier(), eff.getIsAmbient(), eff.doesShowParticles()); - attackedEntity.addPotionEffect(newEffect); - - PotionEffect newSentientEffect = new PotionEffect(eff.getPotion(), (int) (eff.getDuration() * (1 - percentTransmitted)), eff.getAmplifier(), eff.getIsAmbient(), eff.doesShowParticles()); - this.removePotionEffect(eff.getPotion()); - this.addPotionEffect(newSentientEffect); - } else - { - PotionEffect activeEffect = attackedEntity.getActivePotionEffect(eff.getPotion()); - - PotionEffect newEffect = new PotionEffect(eff.getPotion(), (int) (eff.getDuration() * percentTransmitted), eff.getAmplifier(), activeEffect.getIsAmbient(), activeEffect.doesShowParticles()); - attackedEntity.addPotionEffect(newEffect); - - PotionEffect newSentientEffect = new PotionEffect(eff.getPotion(), (int) (eff.getDuration() * (1 - percentTransmitted)), eff.getAmplifier(), eff.getIsAmbient(), eff.doesShowParticles()); - this.removePotionEffect(eff.getPotion()); - this.addPotionEffect(newSentientEffect); - } - } - - return hasProvidedEffect; - } - - public List getPotionEffectsForArrowRemovingDuration(float percentTransmitted) - { - List arrowEffects = new ArrayList(); - - if (type != EnumDemonWillType.CORROSIVE) - { - return arrowEffects; - } - - List removedEffects = new ArrayList(); - for (PotionEffect eff : this.getActivePotionEffects()) - { - if (eff.getPotion().isBadEffect()) - { - removedEffects.add(eff); - } - } - - for (PotionEffect eff : removedEffects) - { - PotionEffect newEffect = new PotionEffect(eff.getPotion(), (int) (eff.getDuration() * percentTransmitted), eff.getAmplifier(), eff.getIsAmbient(), eff.doesShowParticles()); - arrowEffects.add(newEffect); - - PotionEffect newSentientEffect = new PotionEffect(eff.getPotion(), (int) (eff.getDuration() * (1 - percentTransmitted)), eff.getAmplifier(), eff.getIsAmbient(), eff.doesShowParticles()); - this.removePotionEffect(eff.getPotion()); - this.addPotionEffect(newSentientEffect); - } - - return arrowEffects; - } - - @Override - public boolean attackEntityFrom(DamageSource source, float amount) - { - return this.isEntityInvulnerable(source) ? false : super.attackEntityFrom(source, amount); - } - - /** - * Redone from EntityMob to prevent despawning on peaceful. - */ - @Override - public boolean attackEntityAsMob(Entity attackedEntity) - { - boolean flag = super.attackEntityAsMob(attackedEntity); - - if (flag) - { - if (this.type == EnumDemonWillType.CORROSIVE && attackedEntity instanceof EntityLivingBase) - { -// ((EntityLivingBase) attackedEntity).addPotionEffect(new PotionEffect(MobEffects.WITHER, 200)); - applyNegativeEffectsToAttacked((EntityLivingBase) attackedEntity, 1); - } - - return true; - } else - { - return false; - } - } - - @Override - public void onDeath(DamageSource cause) - { - super.onDeath(cause); - - if (!worldObj.isRemote && getHeldItemMainhand() != null) - { - this.entityDropItem(getHeldItemMainhand(), 0); - } - } - - @Override - public boolean isStationary() - { - return false; - } - - @Override - public boolean absorbExplosion(Explosion explosion) - { - if (this.type == EnumDemonWillType.DESTRUCTIVE) - { - this.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 600, 1)); - - explosion.doExplosionB(true); - - return true; - } - - return false; - } - - @Override - public boolean processInteract(EntityPlayer player, EnumHand hand, @Nullable ItemStack stack) - { - if (this.isTamed() && player.equals(this.getOwner()) && hand == EnumHand.MAIN_HAND) - { - if (stack == null && player.isSneaking()) //Should return to the entity - { - if (!worldObj.isRemote) - { - if (getHeldItemMainhand() != null) - { - this.entityDropItem(getHeldItemMainhand(), 0); - } - - if (getHeldItemOffhand() != null) - { - this.entityDropItem(getHeldItemOffhand(), 0); - } - - if (wasGivenSentientArmour) - { - this.entityDropItem(new ItemStack(ModItems.SENTIENT_ARMOUR_GEM), 0); - } - - this.setDead(); - } - } - } - - return super.processInteract(player, hand, stack); - } - - public boolean isEntityInvulnerable(DamageSource source) - { - return super.isEntityInvulnerable(source) && (this.type == EnumDemonWillType.DESTRUCTIVE && source.isExplosion()); - } - - @Override - public void performEmergencyHeal(double toHeal) - { - this.heal((float) toHeal); - - if (worldObj instanceof WorldServer) - { - WorldServer server = (WorldServer) worldObj; - server.spawnParticle(EnumParticleTypes.HEART, this.posX + (double) (this.rand.nextFloat() * this.width * 2.0F) - (double) this.width, this.posY + 0.5D + (double) (this.rand.nextFloat() * this.height), this.posZ + (double) (this.rand.nextFloat() * this.width * 2.0F) - (double) this.width, 7, 0.2, 0.2, 0.2, 0, new int[0]); - } - } - - /** - * - * @param toHeal - * @return Amount of Will consumed from the Aura to heal - */ - public double absorbWillFromAuraToHeal(double toHeal) - { - if (worldObj.isRemote) - { - return 0; - } - - double healthMissing = this.getMaxHealth() - this.getHealth(); - if (healthMissing <= 0) - { - return 0; - } - - double will = WorldDemonWillHandler.getCurrentWill(worldObj, getPosition(), getType()); - - toHeal = Math.min(healthMissing, Math.min(toHeal, will / getWillToHealth())); - if (toHeal > 0) - { - this.heal((float) toHeal); - return WorldDemonWillHandler.drainWill(worldObj, getPosition(), getType(), toHeal * getWillToHealth(), true); - } - - return 0; - } - - public double getWillToHealth() - { - return 2; - } - - @Override - protected boolean canDespawn() - { - return !this.isTamed() && super.canDespawn(); - } - - public void onUpdate() - { - if (!this.worldObj.isRemote && this.ticksExisted % 20 == 0) - { - absorbWillFromAuraToHeal(2); - } - - super.onUpdate(); - } - - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - - tag.setBoolean("sentientArmour", wasGivenSentientArmour); - } - - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - type = EnumDemonWillType.DEFAULT; - } else - { - type = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - wasGivenSentientArmour = tag.getBoolean("sentientArmour"); - - this.setCombatTask(); - } - - //TODO: Change to fit the given AI - @Override - public boolean shouldAttackEntity(EntityLivingBase attacker, EntityLivingBase owner) - { - if (!(attacker instanceof EntityCreeper) && !(attacker instanceof EntityGhast)) - { - return super.shouldAttackEntity(attacker, owner); - } else - { - return false; - } - } - - @Override - public void attackEntityWithRangedAttack(EntityLivingBase target, float velocity) - { - ItemStack heldStack = this.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND); - if (heldStack != null && heldStack.getItem() == ModItems.SENTIENT_BOW) - { - EntityTippedArrow arrowEntity = ((ItemSentientBow) heldStack.getItem()).getArrowEntity(worldObj, heldStack, target, this, velocity); - if (arrowEntity != null) - { - List effects = getPotionEffectsForArrowRemovingDuration(0.2f); - for (PotionEffect eff : effects) - { - arrowEntity.addEffect(eff); - } - - this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); - this.worldObj.spawnEntityInWorld(arrowEntity); - } - } else - { - EntityTippedArrow entitytippedarrow = new EntityTippedArrow(this.worldObj, this); //TODO: Change to an arrow created by the Sentient Bow - double d0 = target.posX - this.posX; - double d1 = target.getEntityBoundingBox().minY + (double) (target.height / 3.0F) - entitytippedarrow.posY; - double d2 = target.posZ - this.posZ; - double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); - entitytippedarrow.setThrowableHeading(d0, d1 + d3 * 0.2, d2, 1.6F, 0); //TODO: Yes, it is an accurate arrow. Don't be hatin' - int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.POWER, this); - int j = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.PUNCH, this); - entitytippedarrow.setDamage((double) (velocity * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.getDifficulty().getDifficultyId() * 0.11F)); - - if (i > 0) - { - entitytippedarrow.setDamage(entitytippedarrow.getDamage() + (double) i * 0.5D + 0.5D); - } - - if (j > 0) - { - entitytippedarrow.setKnockbackStrength(j); - } - - boolean burning = this.isBurning(); - burning = burning || EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FLAME, this) > 0; - - if (burning) - { - entitytippedarrow.setFire(100); - } - - if (true) //TODO: Add potion effects to the arrows - { - entitytippedarrow.addEffect(new PotionEffect(MobEffects.SLOWNESS, 600)); - } - - this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); - this.worldObj.spawnEntityInWorld(entitytippedarrow); - } - } - - @Override - protected SoundEvent getAmbientSound() - { - return SoundEvents.ENTITY_COW_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound() - { - return SoundEvents.ENTITY_COW_HURT; - } - - @Override - protected SoundEvent getDeathSound() - { - return SoundEvents.ENTITY_COW_DEATH; - } - - @Override - protected void playStepSound(BlockPos pos, Block block) - { - this.playSound(SoundEvents.ENTITY_COW_STEP, 0.15F, 1.0F); - } - - /** - * Returns the volume for the sounds this mob makes. - */ - @Override - protected float getSoundVolume() - { - return 0.4F; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntityBloodLight.java b/src/main/java/WayofTime/bloodmagic/entity/projectile/EntityBloodLight.java deleted file mode 100644 index d2bb8bd4..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntityBloodLight.java +++ /dev/null @@ -1,197 +0,0 @@ -package WayofTime.bloodmagic.entity.projectile; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.registry.ModBlocks; -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.*; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData; -import net.minecraftforge.fml.common.registry.IThrowableEntity; - -public class EntityBloodLight extends EntityThrowable implements IThrowableEntity, IEntityAdditionalSpawnData -{ - public EntityLivingBase shootingEntity; - protected int ticksInAir = 0; - protected int maxTicksInAir = 600; - - public EntityBloodLight(World world) - { - super(world); - this.setSize(0.5F, 0.5F); - } - - public EntityBloodLight(World world, double x, double y, double z) - { - super(world); - this.setSize(0.5F, 0.5F); - this.setPosition(x, y, z); - } - - public EntityBloodLight(World world, EntityLivingBase player) - { - super(world, player); - shootingEntity = player; - float par3 = 0.8F; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw, player.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - } - - @Override - protected float getGravityVelocity() - { - return 0F; - } - - @Override - public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) - { - float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5); - var1 /= var9; - var3 /= var9; - var5 /= var9; - var1 += rand.nextGaussian() * 0.007499999832361937D * var8; - var3 += rand.nextGaussian() * 0.007499999832361937D * var8; - var5 += rand.nextGaussian() * 0.007499999832361937D * var8; - var1 *= var7; - var3 *= var7; - var5 *= var7; - motionX = var1; - motionY = var3; - motionZ = var5; - float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); - } - - @Override - public void onUpdate() - { - super.onUpdate(); - if (this.ticksExisted > this.maxTicksInAir) - { - setDead(); - } - } - - @Override - protected void onImpact(RayTraceResult mop) - { - if (mop.typeOfHit == RayTraceResult.Type.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == RayTraceResult.Type.BLOCK) - { - EnumFacing sideHit = mop.sideHit; - BlockPos blockPos = mop.getBlockPos().offset(sideHit); - - if (worldObj.isAirBlock(blockPos)) - { - worldObj.setBlockState(blockPos, ModBlocks.BLOOD_LIGHT.getDefaultState()); - } - } - - this.setDead(); - } - - protected void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - doDamage(1, mop); - } - } - - if (worldObj.isAirBlock(new BlockPos((int) this.posX, (int) this.posY, (int) this.posZ))) - { - worldObj.setBlockState(new BlockPos((int) this.posX, (int) this.posY, (int) this.posZ), Blocks.FIRE.getDefaultState()); - } - - // spawnHitParticles("magicCrit", 8); - this.setDead(); - } - - protected void doDamage(int i, Entity mop) - { - mop.attackEntityFrom(this.getDamageSource(), i); - } - - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void writeSpawnData(ByteBuf data) - { - data.writeByte(this.ticksInAir); - } - - @Override - public void readSpawnData(ByteBuf data) - { - this.ticksInAir = data.readByte(); - } - - @Override - public void writeEntityToNBT(NBTTagCompound nbt) - { - super.writeEntityToNBT(nbt); - nbt.setInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir); - nbt.setInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir); - } - - @Override - public void readEntityFromNBT(NBTTagCompound nbt) - { - super.readEntityFromNBT(nbt); - ticksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR); - maxTicksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR); - } - - @Override - protected boolean canTriggerWalking() - { - return false; - } - - @Override - public boolean canBeCollidedWith() - { - return false; - } - - @Override - public void setThrower(Entity entity) - { - if (entity instanceof EntityLivingBase) - this.shootingEntity = (EntityLivingBase) entity; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntityMeteor.java b/src/main/java/WayofTime/bloodmagic/entity/projectile/EntityMeteor.java deleted file mode 100644 index 6735b95b..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntityMeteor.java +++ /dev/null @@ -1,150 +0,0 @@ -package WayofTime.bloodmagic.entity.projectile; - -import lombok.Setter; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IThrowableEntity; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.meteor.MeteorRegistry; - -public class EntityMeteor extends EntityThrowable implements IThrowableEntity -{ - protected int ticksInAir = 0; - protected int maxTicksInAir = 600; - - protected double radiusModifier = 1; - protected double explosionModifier = 1; - protected double fillerChance = 0; - - @Setter - public ItemStack meteorStack; - - public EntityMeteor(World world) - { - super(world); - } - - public EntityMeteor(World world, double x, double y, double z, double velX, double velY, double velZ, double radiusModifier, double explosionModifier, double fillerChance) - { - super(world); - this.setSize(1F, 1F); - this.setPosition(x, y, z); - motionX = velX; - motionY = velY; - motionZ = velZ; - this.radiusModifier = radiusModifier; - this.explosionModifier = explosionModifier; - this.fillerChance = fillerChance; - } - - @Override - protected float getGravityVelocity() - { - return 0.03F; - } - - @Override - public void onUpdate() - { - super.onUpdate(); - if (this.ticksExisted > this.maxTicksInAir) - { - setDead(); - } - } - - @Override - protected void onImpact(RayTraceResult mop) - { - if (mop.typeOfHit == RayTraceResult.Type.ENTITY && mop.entityHit != null) - { - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == RayTraceResult.Type.BLOCK) - { - generateMeteor(mop.getBlockPos()); - } - - this.setDead(); - } - - protected void onImpact(Entity mop) - { - if (mop instanceof EntityLivingBase) - { - doDamage(100, mop); - } - - generateMeteor(mop.getPosition()); - - // spawnHitParticles("magicCrit", 8); - this.setDead(); - } - - protected void doDamage(int i, Entity mop) - { - mop.attackEntityFrom(this.getDamageSource(), i); - } - - public void generateMeteor(BlockPos pos) - { - MeteorRegistry.generateMeteorForItem(meteorStack, worldObj, pos, Blocks.STONE.getDefaultState(), radiusModifier, explosionModifier, fillerChance); - } - - public DamageSource getDamageSource() - { - return DamageSource.anvil; - } - - @Override - public void writeEntityToNBT(NBTTagCompound nbt) - { - super.writeEntityToNBT(nbt); - nbt.setInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir); - nbt.setInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir); - nbt.setDouble("radiusModifier", radiusModifier); - nbt.setDouble("explosionModifier", explosionModifier); - nbt.setDouble("fillerChance", fillerChance); - if (meteorStack != null) - { - meteorStack.writeToNBT(nbt); - } - } - - @Override - public void readEntityFromNBT(NBTTagCompound nbt) - { - super.readEntityFromNBT(nbt); - ticksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR); - maxTicksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR); - radiusModifier = nbt.getDouble("radiusModifier"); - explosionModifier = nbt.getDouble("explosionModifier"); - fillerChance = nbt.getDouble("fillerChance"); - meteorStack = ItemStack.loadItemStackFromNBT(nbt); - } - - @Override - protected boolean canTriggerWalking() - { - return false; - } - - @Override - public boolean canBeCollidedWith() - { - return false; - } - - @Override - public void setThrower(Entity entity) - { - - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySentientArrow.java b/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySentientArrow.java deleted file mode 100644 index c9dc343e..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySentientArrow.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.bloodmagic.entity.projectile; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityTippedArrow; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; - -import java.util.Locale; - -public class EntitySentientArrow extends EntityTippedArrow -{ - public double reimbursedAmountOnHit = 0; - public EnumDemonWillType type = EnumDemonWillType.DEFAULT; - - public EntitySentientArrow(World worldIn) - { - super(worldIn); - } - - public EntitySentientArrow(World worldIn, double x, double y, double z) - { - super(worldIn, x, y, z); - } - - public EntitySentientArrow(World worldIn, EntityLivingBase shooter, EnumDemonWillType type, double reinburseAmount) - { - super(worldIn, shooter); - this.reimbursedAmountOnHit = reinburseAmount; - this.type = type; - } - - public void reimbursePlayer(EntityLivingBase hitEntity, float damage) - { - if (this.shootingEntity instanceof EntityPlayer) - { - if (hitEntity.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && !(hitEntity instanceof IMob)) - { - return; - } - - PlayerDemonWillHandler.addDemonWill(type, (EntityPlayer) this.shootingEntity, reimbursedAmountOnHit * damage / 20f); - } - } - - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - - tag.setDouble("reimbursement", reimbursedAmountOnHit); - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - - reimbursedAmountOnHit = tag.getDouble("reimbursement"); - type = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - @Override - protected ItemStack getArrowStack() - { - return new ItemStack(Items.ARROW); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySoulSnare.java b/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySoulSnare.java deleted file mode 100644 index aa26da03..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySoulSnare.java +++ /dev/null @@ -1,60 +0,0 @@ -package WayofTime.bloodmagic.entity.projectile; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import WayofTime.bloodmagic.registry.ModPotions; - -public class EntitySoulSnare extends EntityThrowable -{ - public EntitySoulSnare(World worldIn) - { - super(worldIn); - } - - public EntitySoulSnare(World worldIn, EntityLivingBase throwerIn) - { - super(worldIn, throwerIn); - } - - public EntitySoulSnare(World worldIn, double x, double y, double z) - { - super(worldIn, x, y, z); - } - - /** - * Called when this EntityThrowable hits a block or entity. - */ - @Override - protected void onImpact(RayTraceResult result) - { - if (result.entityHit == this.getThrower() && this.ticksExisted < 20) - { - return; - } - - if (result.entityHit != null && result.entityHit != this.getThrower()) - { - if (result.entityHit instanceof EntityLivingBase && result.entityHit.worldObj.rand.nextDouble() < 0.25) - { - ((EntityLivingBase) result.entityHit).addPotionEffect(new PotionEffect(ModPotions.soulSnare, 300, 0)); - } - - result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) 0); - } - - for (int j = 0; j < 8; ++j) - { - this.worldObj.spawnParticle(EnumParticleTypes.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[0]); - } - - if (!this.worldObj.isRemote) - { - this.setDead(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/entity/projectile/package-info.java b/src/main/java/WayofTime/bloodmagic/entity/projectile/package-info.java deleted file mode 100644 index 7f6a0496..00000000 --- a/src/main/java/WayofTime/bloodmagic/entity/projectile/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.entity.projectile; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/fakePlayer/FakeNetHandlerPlayServer.java b/src/main/java/WayofTime/bloodmagic/fakePlayer/FakeNetHandlerPlayServer.java deleted file mode 100644 index 7486c89b..00000000 --- a/src/main/java/WayofTime/bloodmagic/fakePlayer/FakeNetHandlerPlayServer.java +++ /dev/null @@ -1,179 +0,0 @@ -package WayofTime.bloodmagic.fakePlayer; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.EnumPacketDirection; -import net.minecraft.network.NetHandlerPlayServer; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.client.CPacketAnimation; -import net.minecraft.network.play.client.CPacketChatMessage; -import net.minecraft.network.play.client.CPacketClickWindow; -import net.minecraft.network.play.client.CPacketClientSettings; -import net.minecraft.network.play.client.CPacketClientStatus; -import net.minecraft.network.play.client.CPacketCloseWindow; -import net.minecraft.network.play.client.CPacketConfirmTransaction; -import net.minecraft.network.play.client.CPacketCreativeInventoryAction; -import net.minecraft.network.play.client.CPacketEnchantItem; -import net.minecraft.network.play.client.CPacketEntityAction; -import net.minecraft.network.play.client.CPacketHeldItemChange; -import net.minecraft.network.play.client.CPacketInput; -import net.minecraft.network.play.client.CPacketKeepAlive; -import net.minecraft.network.play.client.CPacketPlayer; -import net.minecraft.network.play.client.CPacketPlayerAbilities; -import net.minecraft.network.play.client.CPacketPlayerDigging; -import net.minecraft.network.play.client.CPacketPlayerTryUseItem; -import net.minecraft.network.play.client.CPacketResourcePackStatus; -import net.minecraft.network.play.client.CPacketSpectate; -import net.minecraft.network.play.client.CPacketTabComplete; -import net.minecraft.network.play.client.CPacketUpdateSign; -import net.minecraft.network.play.client.CPacketUseEntity; -import net.minecraft.util.text.ITextComponent; -import net.minecraftforge.fml.common.FMLCommonHandler; - -/** - * All credits for this go to CrazyPants, from EIO - */ -public class FakeNetHandlerPlayServer extends NetHandlerPlayServer -{ - public FakeNetHandlerPlayServer(EntityPlayerMP p_i1530_3_) - { - super(FMLCommonHandler.instance().getMinecraftServerInstance(), new net.minecraft.network.NetworkManager(EnumPacketDirection.CLIENTBOUND), p_i1530_3_); - } - - @Override - public NetworkManager getNetworkManager() - { - return null; - } - - @Override - public void kickPlayerFromServer(String p_147360_1_) - { - } - - @Override - public void processInput(CPacketInput p_147358_1_) - { - } - - @Override - public void processPlayer(CPacketPlayer p_147347_1_) - { - } - - @Override - public void setPlayerLocation(double p_147364_1_, double p_147364_3_, double p_147364_5_, float p_147364_7_, float p_147364_8_) - { - } - - @Override - public void processPlayerDigging(CPacketPlayerDigging p_147345_1_) - { - } - - @Override - public void processPlayerBlockPlacement(CPacketPlayerTryUseItem packetIn) - { - } - - @Override - public void onDisconnect(ITextComponent p_147231_1_) - { - } - - @Override - public void sendPacket(Packet p_147359_1_) - { - } - - @Override - public void processHeldItemChange(CPacketHeldItemChange p_147355_1_) - { - } - - @Override - public void processChatMessage(CPacketChatMessage p_147354_1_) - { - } - - @Override - public void handleAnimation(CPacketAnimation packetIn) - { - - } - - @Override - public void processEntityAction(CPacketEntityAction p_147357_1_) - { - } - - @Override - public void processUseEntity(CPacketUseEntity p_147340_1_) - { - } - - @Override - public void processClientStatus(CPacketClientStatus p_147342_1_) - { - } - - @Override - public void processCloseWindow(CPacketCloseWindow p_147356_1_) - { - } - - @Override - public void processClickWindow(CPacketClickWindow p_147351_1_) - { - } - - @Override - public void processEnchantItem(CPacketEnchantItem p_147338_1_) - { - } - - @Override - public void processCreativeInventoryAction(CPacketCreativeInventoryAction p_147344_1_) - { - } - - @Override - public void processConfirmTransaction(CPacketConfirmTransaction p_147339_1_) - { - } - - @Override - public void processUpdateSign(CPacketUpdateSign p_147343_1_) - { - } - - @Override - public void processKeepAlive(CPacketKeepAlive p_147353_1_) - { - } - - @Override - public void processPlayerAbilities(CPacketPlayerAbilities p_147348_1_) - { - } - - @Override - public void processTabComplete(CPacketTabComplete p_147341_1_) - { - } - - @Override - public void processClientSettings(CPacketClientSettings p_147352_1_) - { - } - - @Override - public void handleSpectate(CPacketSpectate packetIn) - { - } - - @Override - public void handleResourcePackStatus(CPacketResourcePackStatus packetIn) - { - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/fakePlayer/FakePlayerBM.java b/src/main/java/WayofTime/bloodmagic/fakePlayer/FakePlayerBM.java deleted file mode 100644 index 18e2c0d4..00000000 --- a/src/main/java/WayofTime/bloodmagic/fakePlayer/FakePlayerBM.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.bloodmagic.fakePlayer; - -import javax.annotation.Nullable; - -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.common.FMLCommonHandler; - -import com.mojang.authlib.GameProfile; - -/** - * All credits for this go to CrazyPants, from EIO - */ -public class FakePlayerBM extends FakePlayer -{ - ItemStack prevWeapon; - - public FakePlayerBM(World world, BlockPos pos, GameProfile profile) - { - super(FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(world.provider.getDimension()), profile); - posX = pos.getX() + 0.5; - posY = pos.getY() + 0.5; - posZ = pos.getZ() + 0.5; - connection = new FakeNetHandlerPlayServer(this); - } - - @Override - protected void onNewPotionEffect(PotionEffect p_70670_1_) - { - } - - @Override - protected void onChangedPotionEffect(PotionEffect effect, boolean p_70695_2_) - { - } - - @Override - protected void onFinishedPotionEffect(PotionEffect effect) - { - } - - protected void playEquipSound(@Nullable ItemStack stack) - { - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/fuel/FuelHandler.java b/src/main/java/WayofTime/bloodmagic/fuel/FuelHandler.java deleted file mode 100644 index d1ad5777..00000000 --- a/src/main/java/WayofTime/bloodmagic/fuel/FuelHandler.java +++ /dev/null @@ -1,20 +0,0 @@ -package WayofTime.bloodmagic.fuel; - -import WayofTime.bloodmagic.item.ItemComponent; -import WayofTime.bloodmagic.registry.ModItems; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.IFuelHandler; - -public class FuelHandler implements IFuelHandler -{ - @Override - public int getBurnTime(ItemStack fuel) - { - if (fuel != null && fuel.getItem() == ModItems.ITEM_COMPONENT && fuel.getMetadata() == ItemComponent.getStack(ItemComponent.SAND_COAL).getMetadata()) - { - return 1600; - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/fuel/package-info.java b/src/main/java/WayofTime/bloodmagic/fuel/package-info.java deleted file mode 100644 index 54f2718e..00000000 --- a/src/main/java/WayofTime/bloodmagic/fuel/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.fuel; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/gson/SerializerBase.java b/src/main/java/WayofTime/bloodmagic/gson/SerializerBase.java deleted file mode 100644 index 089ea4f1..00000000 --- a/src/main/java/WayofTime/bloodmagic/gson/SerializerBase.java +++ /dev/null @@ -1,22 +0,0 @@ -package WayofTime.bloodmagic.gson; - -import com.google.gson.*; - -import java.lang.reflect.Type; - -public abstract class SerializerBase implements JsonDeserializer, JsonSerializer -{ - @Override - public T deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException - { - return context.deserialize(json, getType()); - } - - @Override - public JsonElement serialize(T src, Type typeOfSrc, JsonSerializationContext context) - { - return context.serialize(src); - } - - public abstract Class getType(); -} diff --git a/src/main/java/WayofTime/bloodmagic/gson/Serializers.java b/src/main/java/WayofTime/bloodmagic/gson/Serializers.java deleted file mode 100644 index 51945b5e..00000000 --- a/src/main/java/WayofTime/bloodmagic/gson/Serializers.java +++ /dev/null @@ -1,119 +0,0 @@ -package WayofTime.bloodmagic.gson; - -import java.lang.reflect.Type; - -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.DataSerializer; -import net.minecraft.network.datasync.DataSerializers; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.JsonSerializationContext; - -public class Serializers -{ - // Data serializers - public static final DataSerializer WILL_TYPE_SERIALIZER = new DataSerializer() - { - @Override - public void write(PacketBuffer buf, EnumDemonWillType value) - { - buf.writeEnumValue(value); - } - - @Override - public EnumDemonWillType read(PacketBuffer buf) - { - return (EnumDemonWillType) buf.readEnumValue(EnumDemonWillType.class); - } - - @Override - public DataParameter createKey(int id) - { - return new DataParameter(id, this); - } - }; - - // Serializers - public static final SerializerBase FACING_SERIALIZER = new SerializerBase() - { - @Override - public Class getType() - { - return EnumFacing.class; - } - - @Override - public EnumFacing deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException - { - return EnumFacing.byName(json.getAsString()); - } - }; - public static final SerializerBase RESOURCELOCATION_SERIALIZER = new SerializerBase() - { - @Override - public Class getType() - { - return ResourceLocation.class; - } - - @Override - public ResourceLocation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException - { - String domain = json.getAsJsonObject().get("domain").getAsString(); - String path = json.getAsJsonObject().get("path").getAsString(); - return new ResourceLocation(domain, path); - } - - @Override - public JsonElement serialize(ResourceLocation src, Type typeOfSrc, JsonSerializationContext context) - { - JsonObject object = new JsonObject(); - object.addProperty("domain", src.getResourceDomain()); - object.addProperty("path", src.getResourcePath()); - return object; - } - }; - public static final SerializerBase ITEMMETA_SERIALIZER = new SerializerBase() - { - @Override - public Class getType() - { - return ItemStack.class; - } - - @Override - public ItemStack deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException - { - ResourceLocation registryName = context.deserialize(json.getAsJsonObject().get("registryName").getAsJsonObject(), ResourceLocation.class); - int meta = json.getAsJsonObject().get("meta").getAsInt(); - return new ItemStack(ForgeRegistries.ITEMS.getValue(registryName), 1, meta); - } - - @Override - public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) - { - JsonObject jsonObject = new JsonObject(); - jsonObject.add("registryName", context.serialize(src.getItem().getRegistryName())); - jsonObject.addProperty("meta", src.getItemDamage()); - return jsonObject; - } - }; - - public static final Gson GSON = new GsonBuilder().serializeNulls().setPrettyPrinting().disableHtmlEscaping().registerTypeAdapter(FACING_SERIALIZER.getType(), FACING_SERIALIZER).registerTypeAdapter(RESOURCELOCATION_SERIALIZER.getType(), RESOURCELOCATION_SERIALIZER).registerTypeAdapter(ITEMMETA_SERIALIZER.getType(), ITEMMETA_SERIALIZER).create(); - - static - { - DataSerializers.registerSerializer(WILL_TYPE_SERIALIZER); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/incense/IncenseAltarComponent.java b/src/main/java/WayofTime/bloodmagic/incense/IncenseAltarComponent.java deleted file mode 100644 index 9c72bff4..00000000 --- a/src/main/java/WayofTime/bloodmagic/incense/IncenseAltarComponent.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.incense; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; - -public class IncenseAltarComponent -{ - public final BlockPos offsetPos; - public final Block block; - public final IBlockState state; - - public IncenseAltarComponent(BlockPos offsetPos, Block block, IBlockState state) - { - this.offsetPos = offsetPos; - this.block = block; - this.state = state; - } - - public boolean doesBlockMatch(Block block, IBlockState state) - { - return this.block == block && block.getMetaFromState(state) == this.block.getMetaFromState(this.state); - } - - /** - * Base rotation is north. - */ - public BlockPos getOffset(EnumFacing rotation) - { - return new BlockPos(this.getX(rotation), offsetPos.getY(), this.getZ(rotation)); - } - - public int getX(EnumFacing direction) - { - switch (direction) - { - case EAST: - return -this.offsetPos.getZ(); - case SOUTH: - return -this.offsetPos.getX(); - case WEST: - return this.offsetPos.getZ(); - default: - return this.offsetPos.getX(); - } - } - - public int getZ(EnumFacing direction) - { - switch (direction) - { - case EAST: - return this.offsetPos.getX(); - case SOUTH: - return -this.offsetPos.getZ(); - case WEST: - return -this.offsetPos.getX(); - default: - return this.offsetPos.getZ(); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/incense/IncenseAltarHandler.java b/src/main/java/WayofTime/bloodmagic/incense/IncenseAltarHandler.java deleted file mode 100644 index ca874d2b..00000000 --- a/src/main/java/WayofTime/bloodmagic/incense/IncenseAltarHandler.java +++ /dev/null @@ -1,113 +0,0 @@ -package WayofTime.bloodmagic.incense; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -public class IncenseAltarHandler -{ - public static Map> incenseComponentMap = new TreeMap>(); - //Incense bonus maximum applied for the tier of blocks. - public static double[] incenseBonuses = new double[] { 0.2, 0.6, 1.2, 2, 3, 4.5 }; - public static double[] tranquilityRequired = new double[] { 0, 6, 14.14, 28, 44.09, 83.14 }; - public static int[] roadsRequired = new int[] { 0, 1, 4, 6, 8, 10, 12 }; //TODO: Change for when the roads are fully implemented - - public static void registerIncenseComponent(int altarLevel, IncenseAltarComponent component) - { - if (incenseComponentMap.containsKey(altarLevel)) - { - incenseComponentMap.get(altarLevel).add(component); - } else - { - List list = new ArrayList(); - list.add(component); - incenseComponentMap.put(altarLevel, list); - } - } - - public static void registerIncenseComponent(int altarLevel, BlockPos offsetPos, Block block, IBlockState state) - { - registerIncenseComponent(altarLevel, new IncenseAltarComponent(offsetPos, block, state)); - } - - public static double getMaxIncenseBonusFromComponents(World world, BlockPos pos) - { - double accumulatedBonus = 0; - for (int i = 0; i < incenseBonuses.length; i++) - { - double previousBonus = (i <= 0 ? 0 : incenseBonuses[i - 1]); - double nextBonus = incenseBonuses[i]; - if (!incenseComponentMap.containsKey(i)) - { - accumulatedBonus += (nextBonus - previousBonus); - } else - { - boolean hasAllComponentsThisTier = true; - for (IncenseAltarComponent component : incenseComponentMap.get(i)) - { - BlockPos offsetPos = pos.add(component.getOffset(EnumFacing.NORTH)); - IBlockState state = world.getBlockState(offsetPos); - Block block = state.getBlock(); - if (component.doesBlockMatch(block, state)) - { - hasAllComponentsThisTier = false; - } else - { - accumulatedBonus += (nextBonus - previousBonus) / incenseComponentMap.get(i).size(); - } - } - - if (!hasAllComponentsThisTier) - { - break; - } - } - } - - return accumulatedBonus; - } - - public static double getMaxIncenseBonusFromRoads(int roads) - { - double previousBonus = 0; - for (int i = 0; i < incenseBonuses.length; i++) - { - if (roads >= roadsRequired[i]) - { - previousBonus = incenseBonuses[i]; - } else - { - return previousBonus; - } - } - - return previousBonus; - } - - public static double getIncenseBonusFromComponents(World world, BlockPos pos, double tranquility, int roads) - { - double maxBonus = Math.min(getMaxIncenseBonusFromComponents(world, pos), getMaxIncenseBonusFromRoads(roads)); - double possibleBonus = 0; - - for (int i = 0; i < incenseBonuses.length; i++) - { - if (tranquility >= tranquilityRequired[i]) - { - possibleBonus = incenseBonuses[i]; - } else if (i >= 1) - { - possibleBonus += (incenseBonuses[i] - possibleBonus) * (tranquility - tranquilityRequired[i - 1]) / (tranquilityRequired[i] - tranquilityRequired[i - 1]); - break; - } - } - - return Math.min(maxBonus, possibleBonus); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/incense/TranquilityHandlers.java b/src/main/java/WayofTime/bloodmagic/incense/TranquilityHandlers.java deleted file mode 100644 index 4e1d3d69..00000000 --- a/src/main/java/WayofTime/bloodmagic/incense/TranquilityHandlers.java +++ /dev/null @@ -1,133 +0,0 @@ -package WayofTime.bloodmagic.incense; - -import WayofTime.bloodmagic.api.incense.EnumTranquilityType; -import WayofTime.bloodmagic.api.incense.ITranquilityHandler; -import WayofTime.bloodmagic.api.incense.TranquilityStack; -import WayofTime.bloodmagic.registry.ModBlocks; -import net.minecraft.block.*; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class TranquilityHandlers -{ - - public static class Plant implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block instanceof BlockLeaves) - { - return new TranquilityStack(EnumTranquilityType.PLANT, 1); - } - - return null; - } - } - - public static class Lava implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block == Blocks.LAVA || block == Blocks.FLOWING_LAVA) - { - return new TranquilityStack(EnumTranquilityType.LAVA, 1.2); - } - - return null; - } - } - - public static class Fire implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block instanceof BlockFire) - { - return new TranquilityStack(EnumTranquilityType.FIRE, 1); - } - - if (block == Blocks.NETHERRACK) - { - return new TranquilityStack(EnumTranquilityType.FIRE, 0.5); - } - - return null; - } - } - - public static class Earth implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block == Blocks.DIRT) - { - return new TranquilityStack(EnumTranquilityType.EARTHEN, 0.25); - } - - if (block instanceof BlockGrass) - { - return new TranquilityStack(EnumTranquilityType.EARTHEN, 0.5); - } - - if (block == Blocks.FARMLAND) - { - return new TranquilityStack(EnumTranquilityType.EARTHEN, 1); - } - - return null; - } - } - - public static class Crop implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block == Blocks.POTATOES || block == Blocks.CARROTS || block == Blocks.WHEAT || block == Blocks.NETHER_WART || block == Blocks.BEETROOTS) - { - return new TranquilityStack(EnumTranquilityType.CROP, 1); - } - - return null; - } - } - - public static class Tree implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block instanceof BlockLog) - { - return new TranquilityStack(EnumTranquilityType.TREE, 1); - } - - return null; - } - } - - public static class Water implements ITranquilityHandler - { - @Override - public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state) - { - if (block == Blocks.WATER || block == Blocks.FLOWING_WATER) - { - return new TranquilityStack(EnumTranquilityType.WATER, 1); - } - - if (block == ModBlocks.LIFE_ESSENCE) - { - return new TranquilityStack(EnumTranquilityType.WATER, 1.5); - } - - return null; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/incense/package-info.java b/src/main/java/WayofTime/bloodmagic/incense/package-info.java deleted file mode 100644 index ebb51c99..00000000 --- a/src/main/java/WayofTime/bloodmagic/incense/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.incense; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/inversion/CorruptionHandler.java b/src/main/java/WayofTime/bloodmagic/inversion/CorruptionHandler.java deleted file mode 100644 index 44b3af7e..00000000 --- a/src/main/java/WayofTime/bloodmagic/inversion/CorruptionHandler.java +++ /dev/null @@ -1,106 +0,0 @@ -package WayofTime.bloodmagic.inversion; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -public class CorruptionHandler -{ - public static Map, Map> corruptBlockMap = new HashMap, Map>(); - - public static void registerBlockCorruption(EnumDemonWillType type, Block block, int meta, IBlockState corruptedState) - { - Pair pair = Pair.of(block, meta); - if (corruptBlockMap.containsKey(pair)) - { - Map stateMap = corruptBlockMap.get(pair); - stateMap.put(type, corruptedState); - } else - { - Map stateMap = new HashMap(); - stateMap.put(type, corruptedState); - corruptBlockMap.put(pair, stateMap); - } - } - - public static boolean isBlockCorruptible(World world, EnumDemonWillType type, BlockPos pos, IBlockState state, Block block) - { - int meta = block.getMetaFromState(state); - Pair pair = Pair.of(block, meta); - if (corruptBlockMap.containsKey(pair)) - { - Map stateMap = corruptBlockMap.get(pair); - return stateMap.containsKey(type); - } - - return false; - } - - public static boolean corruptBlock(World world, EnumDemonWillType type, BlockPos pos, IBlockState state, Block block) - { - int meta = block.getMetaFromState(state); - Pair pair = Pair.of(block, meta); - if (corruptBlockMap.containsKey(pair)) - { - Map stateMap = corruptBlockMap.get(pair); - if (stateMap.containsKey(type)) - { - return world.setBlockState(pos, stateMap.get(type)); - } - } - - return false; - } - - /** - * - * @param world - * @param type - * @param centerPos - * @param radius - * @param featheringChance - * Chance that the block within the featheringDepth is NOT altered. - * @param featheringDepth - * @return - */ - public static boolean corruptSurroundingBlocks(World world, EnumDemonWillType type, BlockPos centerPos, int radius, double featheringChance, double featheringDepth) - { - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k > (radius + 0.5) * (radius + 0.5)) - { - continue; - } - - if (featheringChance > 0 && i * i + j * j + k * k > (radius - featheringDepth + 0.5) * (radius - featheringDepth + 0.5) && world.rand.nextDouble() < featheringChance) - { - continue; - } - - if (world.isAirBlock(centerPos)) - { - continue; - } - - BlockPos offsetPos = centerPos.add(i, j, k); - IBlockState offsetState = world.getBlockState(offsetPos); - Block offsetBlock = offsetState.getBlock(); - corruptBlock(world, type, offsetPos, offsetState, offsetBlock); - } - } - } - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/inversion/InversionPillarHandler.java b/src/main/java/WayofTime/bloodmagic/inversion/InversionPillarHandler.java deleted file mode 100644 index 512cb8cb..00000000 --- a/src/main/java/WayofTime/bloodmagic/inversion/InversionPillarHandler.java +++ /dev/null @@ -1,249 +0,0 @@ -package WayofTime.bloodmagic.inversion; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; - -public class InversionPillarHandler -{ - public static final double farthestDistanceSquared = 16 * 16; - public static Map>> pillarMap = new HashMap>>(); - public static Map>>> nearPillarMap = new HashMap>>>(); - - public static boolean addPillarToMap(World world, EnumDemonWillType type, BlockPos pos) - { - int dim = world.provider.getDimension(); - if (pillarMap.containsKey(dim)) - { - Map> willMap = pillarMap.get(dim); - if (willMap.containsKey(type)) - { - if (!willMap.get(type).contains(pos)) - { - willMap.get(type).add(pos); - onPillarAdded(world, type, pos); - return true; - } else - { - return false; - } - } else - { - List posList = new ArrayList(); - posList.add(pos); - willMap.put(type, posList); - onPillarAdded(world, type, pos); - return true; - } - } else - { - Map> willMap = new HashMap>(); - List posList = new ArrayList(); - posList.add(pos); - - willMap.put(type, posList); - pillarMap.put(dim, willMap); - onPillarAdded(world, type, pos); - return true; - } - } - - public static boolean removePillarFromMap(World world, EnumDemonWillType type, BlockPos pos) - { - int dim = world.provider.getDimension(); - if (pillarMap.containsKey(dim)) - { - Map> willMap = pillarMap.get(dim); - if (willMap.containsKey(type)) - { - if (willMap.get(type).contains(pos)) - { - onPillarRemoved(world, type, pos); - return willMap.get(type).remove(pos); - } else - { - return false; - } - } else - { - return false; - } - } else - { - return false; - } - } - - //Assume that it has been added already. - private static void onPillarAdded(World world, EnumDemonWillType type, BlockPos pos) - { - System.out.println("Adding..."); - List closePosList = new ArrayList(); - - int dim = world.provider.getDimension(); - if (pillarMap.containsKey(dim)) - { - Map> willMap = pillarMap.get(dim); - if (willMap.containsKey(type)) - { - List otherPosList = willMap.get(type); - - Iterator posIterator = otherPosList.iterator(); - while (posIterator.hasNext()) - { - BlockPos closePos = posIterator.next(); - if (!closePos.equals(pos) && closePos.distanceSq(pos) <= farthestDistanceSquared) - { - closePosList.add(closePos); - } - } - - } - } - if (nearPillarMap.containsKey(dim)) - { - Map>> willMap = nearPillarMap.get(dim); - if (willMap.containsKey(type)) - { - Map> posMap = willMap.get(type); - - Iterator closePosIterator = closePosList.iterator(); - while (closePosIterator.hasNext()) - { - BlockPos closePos = closePosIterator.next(); - List posList = posMap.get(closePos); - if (posList != null && !posList.contains(pos)) - { - posList.add(pos); - } else - { - posList = new ArrayList(); - posList.add(pos); - posMap.put(closePos, posList); - } - } - - posMap.put(pos, closePosList); - } else - { - Map> posMap = new HashMap>(); - - posMap.put(pos, closePosList); - willMap.put(type, posMap); - } - } else - { - Map>> willMap = new HashMap>>(); - Map> posMap = new HashMap>(); - - posMap.put(pos, closePosList); - willMap.put(type, posMap); - nearPillarMap.put(dim, willMap); - } - } - - private static void onPillarRemoved(World world, EnumDemonWillType type, BlockPos pos) - { - System.out.println("Removing..."); - int dim = world.provider.getDimension(); - if (nearPillarMap.containsKey(dim)) - { - Map>> willMap = nearPillarMap.get(dim); - if (willMap.containsKey(type)) - { - Map> posMap = willMap.get(type); - List posList = posMap.get(pos); - if (posList != null) - { - Iterator itr = posList.iterator(); - while (itr.hasNext()) - { - BlockPos checkPos = itr.next(); - List checkPosList = posMap.get(checkPos); - if (checkPosList != null) - { - checkPosList.remove(pos); - } - } - - posMap.remove(pos); - } - } - } - } - - //TODO: Change to use the nearPillarMap. - public static List getNearbyPillars(World world, EnumDemonWillType type, BlockPos pos) - { - int dim = world.provider.getDimension(); - if (nearPillarMap.containsKey(dim)) - { - Map>> willMap = nearPillarMap.get(dim); - if (willMap.containsKey(type)) - { - Map> posMap = willMap.get(type); - List posList = posMap.get(pos); - if (posList != null) - { - return posList; - } - } - } - - return new ArrayList(); - } - - public static List getAllConnectedPillars(World world, EnumDemonWillType type, BlockPos pos) - { - List checkedPosList = new ArrayList(); - List uncheckedPosList = new ArrayList(); //Positions where we did not check their connections. - - uncheckedPosList.add(pos); - - int dim = world.provider.getDimension(); - if (nearPillarMap.containsKey(dim)) - { - Map>> willMap = nearPillarMap.get(dim); - if (willMap.containsKey(type)) - { - Map> posMap = willMap.get(type); - // This is where the magic happens. - - while (!uncheckedPosList.isEmpty()) - { - //Positions that are new this iteration and need to be dumped into uncheckedPosList next iteration. - List newPosList = new ArrayList(); - - Iterator itr = uncheckedPosList.iterator(); - while (itr.hasNext()) - { - BlockPos checkPos = itr.next(); - List posList = posMap.get(checkPos); - if (posList != null) - { - for (BlockPos testPos : posList) - { - //Check if the position has already been checked, is scheduled to be checked, or is already found it needs to be checked. - if (!checkedPosList.contains(testPos) && !uncheckedPosList.contains(testPos) && !newPosList.contains(testPos)) - { - newPosList.add(testPos); - } - } - } - } - - checkedPosList.addAll(uncheckedPosList); - uncheckedPosList = newPosList; - } - } - } - - return checkedPosList; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java deleted file mode 100644 index a723262b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; - -public class ItemActivationCrystal extends ItemBindableBase implements IVariantProvider -{ - public static String[] names = { "weak", "awakened", "creative" }; - - public ItemActivationCrystal() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".activationCrystal."); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localize("tooltip.BloodMagic.activationCrystal." + names[stack.getItemDamage()])); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=weak")); - ret.add(new ImmutablePair(1, "type=demonic")); - ret.add(new ImmutablePair(2, "type=creative")); - return ret; - } - - public int getCrystalLevel(ItemStack stack) - { - return stack.getItemDamage() > 1 ? Integer.MAX_VALUE : stack.getItemDamage() + 1; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java b/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java deleted file mode 100644 index 74ad1c20..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java +++ /dev/null @@ -1,161 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import WayofTime.bloodmagic.util.helper.NumeralHelper; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.altar.BloodAltar; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.AltarComponent; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.altar.IAltarManipulator; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.block.BlockAltar; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemAltarMaker extends Item implements IAltarManipulator, IVariantProvider -{ - private EnumAltarTier tierToBuild = EnumAltarTier.ONE; - - public ItemAltarMaker() - { - super(); - setUnlocalizedName(Constants.Mod.MODID + ".altarMaker"); - setCreativeTab(BloodMagic.tabBloodMagic); - setMaxStackSize(1); - setFull3D(); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentTier", stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1)); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (world.isRemote) - return super.onItemRightClick(stack, world, player, hand); - - if (!player.capabilities.isCreativeMode) - { - ChatUtil.sendNoSpam(player, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.creativeOnly")); - return super.onItemRightClick(stack, world, player, hand); - } - - stack = NBTHelper.checkNBT(stack); - - if (player.isSneaking()) - { - if (stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) >= EnumAltarTier.MAXTIERS - 1) - stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, 0); - else - stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1); - - setTierToBuild(EnumAltarTier.values()[stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER)]); - ChatUtil.sendNoSpam(player, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.setTier", NumeralHelper.toRoman(stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1))); - return super.onItemRightClick(stack, world, player, hand); - } - - RayTraceResult rayTrace = rayTrace(world, player, false); - if (rayTrace == null || rayTrace.typeOfHit == RayTraceResult.Type.MISS || rayTrace.typeOfHit == RayTraceResult.Type.ENTITY) - return super.onItemRightClick(stack, world, player, hand); - - if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK && world.getBlockState(rayTrace.getBlockPos()).getBlock() instanceof BlockAltar) - { - ChatUtil.sendNoSpam(player, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.building", NumeralHelper.toRoman(tierToBuild.toInt()))); - buildAltar(world, rayTrace.getBlockPos()); - IBlockState state = world.getBlockState(rayTrace.getBlockPos()); - - world.notifyBlockUpdate(rayTrace.getBlockPos(), state, state, 3); - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=altarmaker")); - return ret; - } - - public void setTierToBuild(EnumAltarTier tierToBuild) - { - this.tierToBuild = tierToBuild; - } - - public void buildAltar(World world, BlockPos pos) - { - if (world.isRemote) - return; - - if (tierToBuild == EnumAltarTier.ONE) - return; - - for (AltarComponent altarComponent : tierToBuild.getAltarComponents()) - { - BlockPos componentPos = pos.add(altarComponent.getOffset()); - Block blockForComponent = Utils.getBlockForComponent(altarComponent.getComponent()); - - world.setBlockState(componentPos, blockForComponent.getDefaultState(), 3); - } - - ((IBloodAltar) world.getTileEntity(pos)).checkTier(); - } - - public String destroyAltar(EntityPlayer player) - { - World world = player.worldObj; - if (world.isRemote) - return ""; - - RayTraceResult rayTrace = rayTrace(world, player, false); - BlockPos pos = rayTrace.getBlockPos(); - IBlockState state = world.getBlockState(pos); - EnumAltarTier altarTier = BloodAltar.getAltarTier(world, pos); - - if (altarTier.equals(EnumAltarTier.ONE)) - return "" + altarTier.toInt(); - else - { - for (AltarComponent altarComponent : altarTier.getAltarComponents()) - { - BlockPos componentPos = pos.add(altarComponent.getOffset()); - IBlockState componentState = world.getBlockState(pos); - - world.setBlockToAir(componentPos); - world.notifyBlockUpdate(componentPos, componentState, componentState, 3); - } - } - - world.notifyBlockUpdate(pos, state, state, 3); - return String.valueOf(altarTier.toInt()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java b/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java deleted file mode 100644 index d2d2d91c..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java +++ /dev/null @@ -1,78 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.TileAlchemyArray; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemArcaneAshes extends Item implements IVariantProvider -{ - public ItemArcaneAshes() - { - setUnlocalizedName(Constants.Mod.MODID + ".arcaneAshes"); - setMaxStackSize(1); - setMaxDamage(19); //Allows for 20 uses - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.arcaneAshes")); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - BlockPos newPos = blockPos.offset(side); - - if (world.isAirBlock(newPos)) - { - if (!world.isRemote) - { - EnumFacing rotation = EnumFacing.fromAngle(player.getRotationYawHead()); - world.setBlockState(newPos, ModBlocks.ALCHEMY_ARRAY.getDefaultState()); - TileEntity tile = world.getTileEntity(newPos); - if (tile instanceof TileAlchemyArray) - { - ((TileAlchemyArray) tile).setRotation(rotation); - } - - stack.damageItem(1, player); - } - - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=arcaneashes")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBindableBase.java b/src/main/java/WayofTime/bloodmagic/item/ItemBindableBase.java deleted file mode 100644 index 686d4ba0..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBindableBase.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.impl.ItemBindable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; -import com.google.common.base.Strings; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class ItemBindableBase extends ItemBindable -{ - public ItemBindableBase() - { - super(); - - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - if (!Strings.isNullOrEmpty(getOwnerUUID(stack))) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromStack(stack))); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBloodOrb.java b/src/main/java/WayofTime/bloodmagic/item/ItemBloodOrb.java deleted file mode 100644 index 1c2aa67a..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBloodOrb.java +++ /dev/null @@ -1,133 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.orb.BloodOrb; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.base.Strings; - -public class ItemBloodOrb extends ItemBindableBase implements IBloodOrb, IBindable -{ - public ItemBloodOrb() - { - setUnlocalizedName(Constants.Mod.MODID + ".orb."); - this.setMaxDamage(0); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + OrbRegistry.getOrb(stack.getItemDamage()).getName(); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < OrbRegistry.getSize(); i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (world == null) - return super.onItemRightClick(stack, null, player, hand); - - world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - // SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, - // 20, world.provider.getDimensionId(), 4, posX, posY, posZ); - - if (PlayerHelper.isFakePlayer(player)) - return super.onItemRightClick(stack, world, player, hand); - - if (!stack.hasTagCompound()) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (Strings.isNullOrEmpty(getOwnerUUID(stack))) - return super.onItemRightClick(stack, world, player, hand); - - if (world.isRemote) - return super.onItemRightClick(stack, world, player, hand); - - if (getOwnerUUID(stack).equals(PlayerHelper.getUsernameFromPlayer(player))) - NetworkHelper.setMaxOrb(NetworkHelper.getSoulNetwork(getOwnerUUID(stack)), getOrbLevel(stack.getItemDamage())); - - NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).add(200, getMaxEssence(stack.getItemDamage())); - NetworkHelper.getSoulNetwork(player).hurtPlayer(player, 200); - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.orb.desc")); - - if (advanced) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.orb.owner", getOrb(stack.getItemDamage()).getOwner())); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public ItemStack getContainerItem(ItemStack stack) - { - return stack.copy(); - } - - @Override - public boolean hasContainerItem(ItemStack stack) - { - return true; - } - - // IBindable - - @Override - public boolean onBind(EntityPlayer player, ItemStack stack) - { - return true; - } - - // IBloodOrb - - @Override - public BloodOrb getOrb(int meta) - { - return OrbRegistry.getOrb(meta); - } - - @Override - public int getMaxEssence(int meta) - { - return OrbRegistry.getOrb(meta).getCapacity(); - } - - @Override - public int getOrbLevel(int meta) - { - return OrbRegistry.getOrb(meta).getTier(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java b/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java deleted file mode 100644 index 7a5665f5..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; - -public class ItemBloodShard extends Item implements IVariantProvider -{ - public String[] names = { "weak", "demon" }; - - public ItemBloodShard() - { - super(); - - setCreativeTab(BloodMagic.tabBloodMagic); - setUnlocalizedName(Constants.Mod.MODID + ".bloodShard."); - setHasSubtypes(true); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=weak")); - ret.add(new ImmutablePair(1, "type=demonic")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundAxe.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundAxe.java deleted file mode 100644 index 0521def7..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundAxe.java +++ /dev/null @@ -1,158 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import javax.annotation.Nullable; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockLeaves; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Enchantments; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable; - -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multimap; -import com.google.common.collect.Sets; - -public class ItemBoundAxe extends ItemBoundTool implements IMeshProvider -{ - private static final Set EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER); - - public ItemBoundAxe() - { - super("axe", 7, EFFECTIVE_ON); - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - return true; - } - - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState block, BlockPos pos, EntityLivingBase entityLiving) - { - return true; - } - - @Override - protected void onBoundRelease(ItemStack stack, World world, EntityPlayer player, int charge) - { - if (world.isRemote) - return; - - boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0; - int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack); - int range = (int) (charge / 6); //Charge is a max of 30 - want 5 to be the max - - HashMultiset drops = HashMultiset.create(); - - BlockPos playerPos = player.getPosition(); - - for (int i = -range; i <= range; i++) - { - for (int j = 0; j <= 2 * range; j++) - { - for (int k = -range; k <= range; k++) - { - BlockPos blockPos = playerPos.add(i, j, k); - BlockStack blockStack = BlockStack.getStackFromPos(world, blockPos); - - if (blockStack.getBlock().isAir(blockStack.getState(), world, blockPos)) - continue; - - if (blockStack.getState().getMaterial() != Material.WOOD && !EFFECTIVE_ON.contains(blockStack.getBlock())) - continue; - - BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player); - if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - continue; - - if (blockStack.getBlock().getBlockHardness(blockStack.getState(), world, blockPos) != -1.0F) - { - float strengthVsBlock = getStrVsBlock(stack, blockStack.getState()); - - if (strengthVsBlock > 1.1F || blockStack.getBlock() instanceof BlockLeaves && world.canMineBlockBody(player, blockPos)) - { - if (silkTouch && blockStack.getBlock().canSilkHarvest(world, blockPos, world.getBlockState(blockPos), player)) - drops.add(new ItemStackWrapper(blockStack)); - else - { - List itemDrops = blockStack.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), fortuneLvl); - - if (itemDrops != null) - for (ItemStack stacks : itemDrops) - drops.add(ItemStackWrapper.getHolder(stacks)); - } - - world.setBlockToAir(blockPos); - } - } - } - } - } - - NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, (int) (charge * charge * charge / 2.7)); - world.createExplosion(player, playerPos.getX(), playerPos.getY(), playerPos.getZ(), 0.1F, false); - dropStacks(drops, world, playerPos.add(0, 1, 0)); - } - - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot equipmentSlot, ItemStack stack) - { - Multimap multimap = super.getItemAttributeModifiers(equipmentSlot); - if (equipmentSlot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getActivated(stack) ? 11 : 2, 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", -3.0, 0)); - } - return multimap; - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionActivatable("ItemBoundAxe"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - ret.add("active=true"); - ret.add("active=false"); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java deleted file mode 100644 index 429e905b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java +++ /dev/null @@ -1,174 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Enchantments; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable; - -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multimap; -import com.google.common.collect.Sets; - -import javax.annotation.Nullable; - -public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider -{ - private static final Set EFFECTIVE_ON = Sets.newHashSet(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB); - - public ItemBoundPickaxe() - { - super("pickaxe", 5, EFFECTIVE_ON); - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - return true; - } - - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState block, BlockPos pos, EntityLivingBase entityLiving) - { - return true; - } - - @Override - public boolean canHarvestBlock(IBlockState blockIn) - { - return blockIn == Blocks.OBSIDIAN ? this.toolMaterial.getHarvestLevel() == 3 - : (blockIn != Blocks.DIAMOND_BLOCK && blockIn != Blocks.DIAMOND_ORE ? (blockIn != Blocks.EMERALD_ORE && blockIn != Blocks.EMERALD_BLOCK ? (blockIn != Blocks.GOLD_BLOCK && blockIn != Blocks.GOLD_ORE ? (blockIn != Blocks.IRON_BLOCK && blockIn != Blocks.IRON_ORE ? (blockIn != Blocks.LAPIS_BLOCK && blockIn != Blocks.LAPIS_ORE ? (blockIn != Blocks.REDSTONE_ORE && blockIn != Blocks.LIT_REDSTONE_ORE ? (blockIn.getMaterial() == Material.ROCK || (blockIn.getMaterial() == Material.IRON || blockIn.getMaterial() == Material.ANVIL)) : this.toolMaterial.getHarvestLevel() >= 2) - : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2); - } - - @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) - { - if (!getActivated(stack)) - return 1.0F; - - return state.getMaterial() != Material.IRON && state.getMaterial() != Material.ANVIL && state.getMaterial() != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; - } - - @Override - protected void onBoundRelease(ItemStack stack, World world, EntityPlayer player, int charge) - { - if (world.isRemote) - return; - - boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0; - int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack); - int range = (charge / 6); //Charge is a max of 30 - want 5 to be the max - - HashMultiset drops = HashMultiset.create(); - - BlockPos playerPos = player.getPosition(); - - for (int i = -range; i <= range; i++) - { - for (int j = 0; j <= 2 * range; j++) - { - for (int k = -range; k <= range; k++) - { - BlockPos blockPos = playerPos.add(i, j, k); - BlockStack blockStack = BlockStack.getStackFromPos(world, blockPos); - - if (blockStack.getBlock().isAir(blockStack.getState(), world, blockPos)) - continue; - - if (blockStack.getState().getMaterial() != Material.ROCK && !EFFECTIVE_ON.contains(blockStack.getBlock())) - continue; - - BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player); - if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - continue; - - if (blockStack.getBlock() != null && blockStack.getBlock().getBlockHardness(blockStack.getState(), world, blockPos) != -1) - { - float strengthVsBlock = getStrVsBlock(stack, blockStack.getState()); - - if (strengthVsBlock > 1.1F && world.canMineBlockBody(player, blockPos)) - { - if (silkTouch && blockStack.getBlock().canSilkHarvest(world, blockPos, world.getBlockState(blockPos), player)) - drops.add(new ItemStackWrapper(blockStack)); - else - { - List itemDrops = blockStack.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), fortuneLvl); - - if (itemDrops != null) - for (ItemStack stacks : itemDrops) - drops.add(ItemStackWrapper.getHolder(stacks)); - } - - world.setBlockToAir(blockPos); - } - } - } - } - } - - NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, (int) (charge * charge * charge / 2.7)); - world.createExplosion(player, playerPos.getX(), playerPos.getY(), playerPos.getZ(), 0.5F, false); - dropStacks(drops, world, playerPos.add(0, 1, 0)); - } - - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot equipmentSlot, ItemStack stack) - { - Multimap multimap = super.getItemAttributeModifiers(equipmentSlot); - if (equipmentSlot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getActivated(stack) ? 5 : 2, 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", -2.5, 0)); - } - return multimap; - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionActivatable("ItemBoundPickaxe"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - ret.add("active=true"); - ret.add("active=false"); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundShovel.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundShovel.java deleted file mode 100644 index f95b163b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundShovel.java +++ /dev/null @@ -1,158 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Enchantments; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable; - -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multimap; -import com.google.common.collect.Sets; - -import javax.annotation.Nullable; - -public class ItemBoundShovel extends ItemBoundTool implements IMeshProvider -{ - private static final Set EFFECTIVE_ON = Sets.newHashSet(Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND); - - public ItemBoundShovel() - { - super("shovel", 1, EFFECTIVE_ON); - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - return true; - } - - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState block, BlockPos pos, EntityLivingBase entityLiving) - { - return true; - } - - @Override - protected void onBoundRelease(ItemStack stack, World world, EntityPlayer player, int charge) - { - if (world.isRemote) - return; - - boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0; - int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack); - int range = (int) (charge / 6); //Charge is a max of 30 - want 5 to be the max - - HashMultiset drops = HashMultiset.create(); - - BlockPos playerPos = player.getPosition(); - - for (int i = -range; i <= range; i++) - { - for (int j = 0; j <= 2 * range; j++) - { - for (int k = -range; k <= range; k++) - { - BlockPos blockPos = playerPos.add(i, j, k); - BlockStack blockStack = BlockStack.getStackFromPos(world, blockPos); - - if (blockStack.getBlock().isAir(blockStack.getState(), world, blockPos)) - continue; - - Material material = blockStack.getState().getMaterial(); - if (material != Material.GROUND && material != Material.CLAY && material != Material.GRASS && !EFFECTIVE_ON.contains(blockStack.getBlock())) - continue; - - BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player); - if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - continue; - - if (blockStack.getBlock() != null && blockStack.getBlock().getBlockHardness(blockStack.getState(), world, blockPos) != -1) - { - float strengthVsBlock = getStrVsBlock(stack, blockStack.getState()); - - if (strengthVsBlock > 1.1F && world.canMineBlockBody(player, blockPos)) - { - if (silkTouch && blockStack.getBlock().canSilkHarvest(world, blockPos, world.getBlockState(blockPos), player)) - drops.add(new ItemStackWrapper(blockStack)); - else - { - List itemDrops = blockStack.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), fortuneLvl); - - if (itemDrops != null) - for (ItemStack stacks : itemDrops) - drops.add(ItemStackWrapper.getHolder(stacks)); - } - - world.setBlockToAir(blockPos); - } - } - } - } - } - - NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, (int) (charge * charge * charge / 2.7)); - world.createExplosion(player, playerPos.getX(), playerPos.getY(), playerPos.getZ(), 0.5F, false); - dropStacks(drops, world, playerPos.add(0, 1, 0)); - } - - @Override - public Multimap getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) - { - Multimap multimap = super.getItemAttributeModifiers(equipmentSlot); - if (equipmentSlot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", 5, 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", -2.5, 0)); - } - return multimap; - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionActivatable("ItemBoundShovel"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - ret.add("active=true"); - ret.add("active=false"); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundSword.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundSword.java deleted file mode 100644 index db1f9223..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundSword.java +++ /dev/null @@ -1,186 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nullable; - -import WayofTime.bloodmagic.util.Utils; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IActivatable; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.base.Strings; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemBoundSword extends ItemSword implements IBindable, IActivatable, IMeshProvider -{ - public ItemBoundSword() - { - super(ModItems.BOUND_TOOL_MATERIAL); - - setUnlocalizedName(Constants.Mod.MODID + ".bound.sword"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (player.isSneaking()) - setActivatedState(stack, !getActivated(stack)); - -// if (!player.isSneaking() && getActivated(stack)) -// { -// BoundToolEvent.Charge event = new BoundToolEvent.Charge(player, stack); -// if (MinecraftForge.EVENT_BUS.post(event)) -// return new ActionResult(EnumActionResult.FAIL, event.result); -// -// player.setActiveHand(hand); -// return new ActionResult(EnumActionResult.SUCCESS, stack); -// } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - return true; - } - - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState block, BlockPos pos, EntityLivingBase entityLiving) - { - return true; - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return oldStack.getItem() != newStack.getItem(); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) - { - subItems.add(Utils.setUnbreakable(new ItemStack(itemIn))); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - if (TextHelper.canTranslate("tooltip.BloodMagic.bound.sword.desc")) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.bound.sword.desc")); - - tooltip.add(TextHelper.localize("tooltip.BloodMagic." + (getActivated(stack) ? "activated" : "deactivated"))); - - if (!Strings.isNullOrEmpty(getOwnerUUID(stack))) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromStack(stack))); - } - - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot equipmentSlot, ItemStack stack) - { - Multimap multimap = HashMultimap.create(); - if (equipmentSlot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getActivated(stack) ? 8 : 2, 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -2.4, 0)); - } - return multimap; - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionActivatable("ItemBoundSword"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - ret.add("active=true"); - ret.add("active=false"); - return ret; - } - - // IBindable - - @Override - public boolean onBind(EntityPlayer player, ItemStack stack) - { - return true; - } - - @Override - public String getOwnerName(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_NAME) : null; - } - - @Override - public String getOwnerUUID(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_UUID) : null; - } - - // IActivatable - - @Override - public boolean getActivated(ItemStack stack) - { - return stack != null && NBTHelper.checkNBT(stack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); - } - - @Override - public ItemStack setActivatedState(ItemStack stack, boolean activated) - { - if (stack != null) - { - NBTHelper.checkNBT(stack).getTagCompound().setBoolean(Constants.NBT.ACTIVATED, activated); - return stack; - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java deleted file mode 100644 index 480543a8..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java +++ /dev/null @@ -1,295 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.util.Utils; -import com.google.common.base.Strings; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; -import lombok.Getter; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemTool; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ItemStackWrapper; -import WayofTime.bloodmagic.api.event.BoundToolEvent; -import WayofTime.bloodmagic.api.iface.IActivatable; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Multiset; - -@Getter -public class ItemBoundTool extends ItemTool implements IBindable, IActivatable -{ - protected final String tooltipBase; - private final String name; - - public Map heldDownMap = new HashMap(); - public Map heldDownCountMap = new HashMap(); - - public final int chargeTime = 30; - - public ItemBoundTool(String name, float damage, Set effectiveBlocks) - { - super(damage, 1, ModItems.BOUND_TOOL_MATERIAL, effectiveBlocks); - setUnlocalizedName(Constants.Mod.MODID + ".bound." + name); - setCreativeTab(BloodMagic.tabBloodMagic); - - this.name = name; - this.tooltipBase = "tooltip.BloodMagic.bound." + name + "."; - } - - @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) - { - return getActivated(stack) ? getToolMaterial().getEfficiencyOnProperMaterial() : 1.0F; - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return slotChanged; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) - { - subItems.add(Utils.setUnbreakable(new ItemStack(itemIn))); - } - - @Override - public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) - { - if (entityIn instanceof EntityPlayer && getActivated(stack) && isSelected && getBeingHeldDown(stack) && stack == ((EntityPlayer) entityIn).getActiveItemStack()) - { - EntityPlayer player = (EntityPlayer) entityIn; - setHeldDownCount(stack, Math.min(player.getItemInUseCount(), chargeTime)); - } else if (!isSelected) - { - setBeingHeldDown(stack, false); - } - } - - protected int getHeldDownCount(ItemStack stack) - { - if (!heldDownCountMap.containsKey(stack)) - return 0; - - return heldDownCountMap.get(stack); - } - - protected void setHeldDownCount(ItemStack stack, int count) - { - heldDownCountMap.put(stack, count); - } - - protected boolean getBeingHeldDown(ItemStack stack) - { - if (!heldDownMap.containsKey(stack)) - return false; - - return heldDownMap.get(stack); - } - - protected void setBeingHeldDown(ItemStack stack, boolean heldDown) - { - heldDownMap.put(stack, heldDown); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (player.isSneaking()) - setActivatedState(stack, !getActivated(stack)); - - if (!player.isSneaking() && getActivated(stack)) - { - BoundToolEvent.Charge event = new BoundToolEvent.Charge(player, stack); - if (MinecraftForge.EVENT_BUS.post(event)) - return new ActionResult(EnumActionResult.FAIL, event.result); - - player.setActiveHand(hand); - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public void onPlayerStoppedUsing(ItemStack stack, World worldIn, EntityLivingBase entityLiving, int timeLeft) - { - if (entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entityLiving; - if (!player.isSneaking() && getActivated(stack)) - { - int i = this.getMaxItemUseDuration(stack) - timeLeft; - BoundToolEvent.Release event = new BoundToolEvent.Release(player, stack, i); - if (MinecraftForge.EVENT_BUS.post(event)) - return; - - i = event.charge; - - onBoundRelease(stack, worldIn, player, Math.min(i, chargeTime)); - setBeingHeldDown(stack, false); - } - } - } - - protected void onBoundRelease(ItemStack stack, World world, EntityPlayer player, int charge) - { - - } - - @Override - public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase entityLiving) - { - return stack; - } - - @Override - public int getMaxItemUseDuration(ItemStack stack) - { - return 72000; - } - - @Override - public EnumAction getItemUseAction(ItemStack stack) - { - return EnumAction.BOW; - } - - @Override - public int getItemEnchantability() - { - return 50; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (TextHelper.canTranslate(tooltipBase + "desc")) - tooltip.add(TextHelper.localizeEffect(tooltipBase + "desc")); - - tooltip.add(TextHelper.localize("tooltip.BloodMagic." + (getActivated(stack) ? "activated" : "deactivated"))); - - if (!stack.hasTagCompound()) - return; - - if (!Strings.isNullOrEmpty(getOwnerUUID(stack))) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromStack(stack))); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public Set getToolClasses(ItemStack stack) - { - return ImmutableSet.of(name); - } - - public Multimap getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) - { - return ArrayListMultimap.create(); // No-op - } - - @Override - public boolean showDurabilityBar(ItemStack stack) - { - return getActivated(stack) && getBeingHeldDown(stack); - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) - { - return ((double) -Math.min(getHeldDownCount(stack), chargeTime) / chargeTime) + 1; - } - - protected static void dropStacks(Multiset drops, World world, BlockPos posToDrop) - { - for (Multiset.Entry entry : drops.entrySet()) - { - int count = entry.getCount(); - ItemStackWrapper stack = entry.getElement(); - int maxStackSize = stack.item.getItemStackLimit(stack.toStack(1)); - - while (count >= maxStackSize) - { - world.spawnEntityInWorld(new EntityItem(world, posToDrop.getX(), posToDrop.getY(), posToDrop.getZ(), stack.toStack(maxStackSize))); - count -= maxStackSize; - } - - if (count > 0) - world.spawnEntityInWorld(new EntityItem(world, posToDrop.getX(), posToDrop.getY(), posToDrop.getZ(), stack.toStack(count))); - } - } - - // IBindable - - @Override - public String getOwnerName(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_NAME) : null; - } - - @Override - public String getOwnerUUID(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_UUID) : null; - } - - @Override - public boolean onBind(EntityPlayer player, ItemStack stack) - { - return true; - } - - // IActivatable - - @Override - public boolean getActivated(ItemStack stack) - { - return stack != null && NBTHelper.checkNBT(stack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); - } - - @Override - public ItemStack setActivatedState(ItemStack stack, boolean activated) - { - if (stack != null) - { - NBTHelper.checkNBT(stack).getTagCompound().setBoolean(Constants.NBT.ACTIVATED, activated); - return stack; - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java b/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java deleted file mode 100644 index 95c6dd63..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java +++ /dev/null @@ -1,143 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import lombok.Getter; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModItems; - -public class ItemComponent extends Item implements IVariantProvider -{ - @Getter - private static ArrayList names = new ArrayList(); - - public static final String REAGENT_WATER = "reagentWater"; - public static final String REAGENT_LAVA = "reagentLava"; - public static final String REAGENT_AIR = "reagentAir"; - public static final String REAGENT_FASTMINER = "reagentFastMiner"; - public static final String REAGENT_VOID = "reagentVoid"; - public static final String REAGENT_GROWTH = "reagentGrowth"; - public static final String REAGENT_AFFINITY = "reagentAffinity"; - public static final String REAGENT_SIGHT = "reagentSight"; - public static final String REAGENT_BINDING = "reagentBinding"; - public static final String REAGENT_SUPPRESSION = "reagentSuppression"; - public static final String COMPONENT_FRAME_PART = "frameParts"; - public static final String REAGENT_BLOODLIGHT = "reagentBloodLight"; - public static final String REAGENT_MAGNETISM = "reagentMagnetism"; - public static final String REAGENT_HASTE = "reagentHaste"; - public static final String REAGENT_COMPRESSION = "reagentCompression"; - public static final String REAGENT_BRIDGE = "reagentBridge"; - public static final String REAGENT_SEVERANCE = "reagentSeverance"; - public static final String REAGENT_TELEPOSITION = "reagentTeleposition"; - public static final String REAGENT_TRANSPOSITION = "reagentTransposition"; - public static final String SAND_IRON = "ironSand"; - public static final String SAND_GOLD = "goldSand"; - public static final String SAND_COAL = "coalSand"; - public static final String PLANT_OIL = "plantOil"; - public static final String SULFUR = "sulfur"; - public static final String SALTPETER = "saltpeter"; - public static final String NEURO_TOXIN = "neurotoxin"; - public static final String ANTISEPTIC = "antiseptic"; - public static final String REAGENT_HOLDING = "reagentHolding"; - public static final String CATALYST_LENGTH_1 = "mundaneLength"; - public static final String CATALYST_POWER_1 = "mundanePower"; - public static final String REAGENT_CLAW = "reagentClaw"; - public static final String REAGENT_BOUNCE = "reagentBounce"; - public static final String REAGENT_FROST = "reagentFrost"; - - public ItemComponent() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".baseComponent."); - setHasSubtypes(true); - setCreativeTab(BloodMagic.tabBloodMagic); - - buildItemList(); - } - - private void buildItemList() - { - names.add(0, REAGENT_WATER); - names.add(1, REAGENT_LAVA); - names.add(2, REAGENT_AIR); - names.add(3, REAGENT_FASTMINER); - names.add(4, REAGENT_VOID); - names.add(5, REAGENT_GROWTH); - names.add(6, REAGENT_AFFINITY); - names.add(7, REAGENT_SIGHT); - names.add(8, REAGENT_BINDING); - names.add(9, REAGENT_SUPPRESSION); - names.add(10, COMPONENT_FRAME_PART); - names.add(11, REAGENT_BLOODLIGHT); - names.add(12, REAGENT_MAGNETISM); - names.add(13, REAGENT_HASTE); - names.add(14, REAGENT_COMPRESSION); - names.add(15, REAGENT_BRIDGE); - names.add(16, REAGENT_SEVERANCE); - names.add(17, REAGENT_TELEPOSITION); - names.add(18, REAGENT_TRANSPOSITION); - names.add(19, SAND_IRON); - names.add(20, SAND_GOLD); - names.add(21, SAND_COAL); - names.add(22, PLANT_OIL); - names.add(23, SULFUR); - names.add(24, SALTPETER); - names.add(25, NEURO_TOXIN); - names.add(26, ANTISEPTIC); - names.add(27, REAGENT_HOLDING); - names.add(28, CATALYST_LENGTH_1); - names.add(29, CATALYST_POWER_1); - names.add(30, REAGENT_CLAW); - names.add(31, REAGENT_BOUNCE); - names.add(32, REAGENT_FROST); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names.get(stack.getItemDamage()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.size(); i++) - list.add(new ItemStack(id, 1, i)); - } - - public static ItemStack getStack(String name) - { - return new ItemStack(ModItems.ITEM_COMPONENT, 1, names.indexOf(name)); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (String name : names) - ret.add(new ImmutablePair(names.indexOf(name), "type=" + name)); - return ret; - } - - public static ItemStack getStack(String key, int stackSize) - { - ItemStack stack = getStack(key); - stack.stackSize = stackSize; - - return stack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java b/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java deleted file mode 100644 index abdbb755..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.SoundCategory; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper; -import WayofTime.bloodmagic.api.util.helper.PurificationHelper; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class ItemDaggerOfSacrifice extends Item implements IVariantProvider -{ - public ItemDaggerOfSacrifice() - { - super(); - setUnlocalizedName(Constants.Mod.MODID + ".daggerOfSacrifice"); - setCreativeTab(BloodMagic.tabBloodMagic); - setMaxStackSize(1); - setFull3D(); - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - if (target == null || attacker == null || attacker.worldObj.isRemote || (attacker instanceof EntityPlayer && !(attacker instanceof EntityPlayerMP))) - return false; - - if (!target.isNonBoss()) - return false; - - if (target.isChild() || target instanceof EntityPlayer) - return false; - - if (target.isDead || target.getHealth() < 0.5F) - return false; - - String entityName = target.getClass().getSimpleName(); - int lifeEssenceRatio = 25; - - if (ConfigHandler.entitySacrificeValues.containsKey(entityName)) - lifeEssenceRatio = ConfigHandler.entitySacrificeValues.get(entityName); - - if (BloodMagicAPI.getEntitySacrificeValues().containsKey(entityName)) - lifeEssenceRatio = BloodMagicAPI.getEntitySacrificeValues().get(entityName); - - if (lifeEssenceRatio <= 0) - return false; - - int lifeEssence = (int) (lifeEssenceRatio * target.getHealth()); - if (target instanceof EntityAnimal) - { - lifeEssence = (int) (lifeEssence * (1 + PurificationHelper.getCurrentPurity((EntityAnimal) target))); - } - - if (PlayerSacrificeHelper.findAndFillAltar(attacker.worldObj, target, lifeEssence, true)) - { - target.worldObj.playSound(null, target.posX, target.posY, target.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (target.worldObj.rand.nextFloat() - target.worldObj.rand.nextFloat()) * 0.8F); - target.setHealth(-1); - target.onDeath(BloodMagicAPI.getDamageSource()); - } - - return false; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java deleted file mode 100644 index 649bf361..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import lombok.Getter; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDiscreteDemonWill; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModItems; - -public class ItemDemonCrystal extends Item implements IDiscreteDemonWill, IVariantProvider -{ - @Getter - private static ArrayList names = new ArrayList(); - - public static final String CRYSTAL_DEFAULT = "crystalDefault"; - public static final String CRYSTAL_CORROSIVE = "crystalCorrosive"; - public static final String CRYSTAL_VENGEFUL = "crystalVengeful"; - public static final String CRYSTAL_DESTRUCTIVE = "crystalDestructive"; - public static final String CRYSTAL_STEADFAST = "crystalSteadfast"; - - public ItemDemonCrystal() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".demonCrystal."); - setHasSubtypes(true); - setCreativeTab(BloodMagic.tabBloodMagic); - - buildItemList(); - } - - private void buildItemList() - { - names.add(0, CRYSTAL_DEFAULT); - names.add(1, CRYSTAL_CORROSIVE); - names.add(2, CRYSTAL_DESTRUCTIVE); - names.add(3, CRYSTAL_VENGEFUL); - names.add(4, CRYSTAL_STEADFAST); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names.get(stack.getItemDamage()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.size(); i++) - list.add(new ItemStack(id, 1, i)); - } - - public static ItemStack getStack(String name) - { - return new ItemStack(ModItems.ITEM_DEMON_CRYSTAL, 1, names.indexOf(name)); - } - - @Override - public double getWill(ItemStack willStack) - { - return getDiscretization(willStack) * willStack.stackSize; - } - - @Override - public double drainWill(ItemStack willStack, double drainAmount) - { - double discretization = getDiscretization(willStack); - int drainedNumber = (int) Math.floor(Math.min(willStack.stackSize * discretization, drainAmount) / discretization); - - if (drainedNumber > 0) - { - willStack.stackSize -= drainedNumber; - return drainedNumber * discretization; - } - - return 0; - } - - @Override - public double getDiscretization(ItemStack willStack) - { - return 50; - } - - @Override - public EnumDemonWillType getType(ItemStack willStack) - { - return EnumDemonWillType.values()[MathHelper.clamp_int(willStack.getMetadata(), 0, EnumDemonWillType.values().length - 1)]; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (String name : names) - ret.add(new ImmutablePair(names.indexOf(name), "type=" + name)); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemDemonWillGauge.java b/src/main/java/WayofTime/bloodmagic/item/ItemDemonWillGauge.java deleted file mode 100644 index f4ab42fe..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemDemonWillGauge.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IDemonWillViewer; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemDemonWillGauge extends Item implements IVariantProvider, IDemonWillViewer -{ - public ItemDemonWillGauge() - { - setUnlocalizedName(Constants.Mod.MODID + ".willGauge"); - setMaxStackSize(1); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.willGauge")))); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=willgauge")); - return ret; - } - - @Override - public boolean canSeeDemonWillAura(World world, ItemStack stack, EntityPlayer player) - { - return true; - } - - @Override - public int getDemonWillAuraResolution(World world, ItemStack stack, EntityPlayer player) - { - return 100; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemExperienceBook.java b/src/main/java/WayofTime/bloodmagic/item/ItemExperienceBook.java deleted file mode 100644 index 8d0063f9..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemExperienceBook.java +++ /dev/null @@ -1,221 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemExperienceBook extends Item implements IVariantProvider -{ - public ItemExperienceBook() - { - setUnlocalizedName(Constants.Mod.MODID + ".experienceTome"); - setMaxStackSize(1); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack) - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.experienceTome")); - - if (!stack.hasTagCompound()) - return; - - double storedExp = getStoredExperience(stack); - - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.experienceTome.exp", (int) storedExp)); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.experienceTome.expLevel", (int) getLevelForExperience(storedExp))); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (!world.isRemote) - { - if (player.isSneaking()) - absorbOneLevelExpFromPlayer(stack, player); - else - giveOneLevelExpToPlayer(stack, player); - } - - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=experiencetome")); - return ret; - } - - public void giveOneLevelExpToPlayer(ItemStack stack, EntityPlayer player) - { - float progress = player.experience; - int expToNext = getExperienceForNextLevel(player.experienceLevel); - - int neededExp = (int) Math.ceil((1 - progress) * expToNext); - float containedExp = (float) getStoredExperience(stack); - - System.out.println("Needed: " + neededExp + ", contained: " + containedExp + ", exp to next: " + expToNext); - - if (containedExp >= neededExp) - { - setStoredExperience(stack, containedExp - neededExp); - addPlayerXP(player, neededExp); - - if (player.experienceLevel % 5 == 0) - { - float f = player.experienceLevel > 30 ? 1.0F : (float) player.experienceLevel / 30.0F; - player.worldObj.playSound((EntityPlayer) null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_LEVELUP, player.getSoundCategory(), f * 0.75F, 1.0F); - } - } else - { - setStoredExperience(stack, 0); - addPlayerXP(player, (int) containedExp); - } - } - - public void absorbOneLevelExpFromPlayer(ItemStack stack, EntityPlayer player) - { - float progress = player.experience; - - if (progress > 0) - { - int expDeduction = (int) getExperienceAcquiredToNext(player); - if (expDeduction > 0) - { - addPlayerXP(player, -expDeduction); - addExperience(stack, expDeduction); - } - } else if (progress == 0 && player.experienceLevel > 0) - { - int expDeduction = getExperienceForNextLevel(player.experienceLevel - 1); - addPlayerXP(player, -expDeduction); - addExperience(stack, expDeduction); - } - } - - // Credits to Ender IO for some of the experience code, although now modified slightly for my convenience. - public static int getPlayerXP(EntityPlayer player) - { - return (int) (getExperienceForLevel(player.experienceLevel) + (player.experience * player.xpBarCap())); - } - - public static void addPlayerXP(EntityPlayer player, int amount) - { - int experience = Math.max(0, getPlayerXP(player) + amount); - player.experienceTotal = experience; - player.experienceLevel = getLevelForExperience(experience); - int expForLevel = getExperienceForLevel(player.experienceLevel); - player.experience = (float) (experience - expForLevel) / (float) player.xpBarCap(); - } - - public static void setStoredExperience(ItemStack stack, double exp) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("experience", exp); - } - - public static double getStoredExperience(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getDouble("experience"); - } - - public static void addExperience(ItemStack stack, double exp) - { - setStoredExperience(stack, getStoredExperience(stack) + exp); - } - - public static int getExperienceForNextLevel(int currentLevel) - { - if (currentLevel < 16) - { - return 2 * currentLevel + 7; - } else if (currentLevel < 31) - { - return 5 * currentLevel - 38; - } else - { - return 9 * currentLevel - 158; - } - } - - //TODO: Change to calculation form. - public static int getExperienceForLevel(int level) - { - if (level >= 21863) - { - return Integer.MAX_VALUE; - } - if (level == 0) - { - return 0; - } - int res = 0; - for (int i = 0; i < level; i++) - { - res += getExperienceForNextLevel(i); - } - return res; - } - - public static double getExperienceAcquiredToNext(EntityPlayer player) - { - return player.experience * player.xpBarCap(); - } - - public static int getLevelForExperience(double exp) - { - if (exp <= 352) - { - return (int) Math.floor(solveParabola(1, 6, -exp)); - } else if (exp <= 1507) - { - return (int) Math.floor(solveParabola(2.5, -40.5, 360 - exp)); - } else - { - return (int) Math.floor(solveParabola(4.5, -162.5, 2220 - exp)); - } - } - - public static double solveParabola(double a, double b, double c) - { - return (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java b/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java deleted file mode 100644 index 2483ab51..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java +++ /dev/null @@ -1,117 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.block.BlockRitualStone; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemInscriptionTool extends ItemBindableBase implements IVariantProvider -{ - public ItemInscriptionTool() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".scribe."); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + EnumRuneType.values()[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 1; i < EnumRuneType.values().length; i++) - { - ItemStack stack = NBTHelper.checkNBT(new ItemStack(id, 1, i)); - stack.getTagCompound().setInteger(Constants.NBT.USES, 10); - list.add(stack); - } - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) - { - IBlockState state = world.getBlockState(pos); - - if (state.getBlock() instanceof BlockRitualStone && !((BlockRitualStone) state.getBlock()).isRuneType(world, pos, getType(stack))) - { - stack = NBTHelper.checkNBT(stack); - int uses = stack.getTagCompound().getInteger(Constants.NBT.USES); - - world.setBlockState(pos, state.withProperty(((BlockRitualStone) state.getBlock()).getProperty(), getType(stack))); - if (!player.capabilities.isCreativeMode) - { - stack.getTagCompound().setInteger(Constants.NBT.USES, --uses); - if (uses <= 0) - player.inventory.setInventorySlotContents(player.inventory.currentItem, null); - } - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) - { - return true; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - int uses = stack.getTagCompound().getInteger(Constants.NBT.USES); - - return 1.0 - ((double) uses / (double) 10); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) - { - list.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.inscriber.desc")))); - super.addInformation(stack, player, list, advanced); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 1; i < EnumRuneType.values().length; i++) - ret.add(new ImmutablePair(i, "type=" + EnumRuneType.values()[i].name())); - return ret; - } - - public EnumRuneType getType(ItemStack stack) - { - return EnumRuneType.values()[stack.getItemDamage()]; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java deleted file mode 100644 index 3cd4b88f..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java +++ /dev/null @@ -1,94 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraftforge.fml.common.IFuelHandler; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.client.IVariantProvider; - -import com.google.common.base.Strings; - -public class ItemLavaCrystal extends ItemBindableBase implements IFuelHandler, IVariantProvider -{ - public ItemLavaCrystal() - { - super(); - setUnlocalizedName(Constants.Mod.MODID + ".lavaCrystal"); - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - NetworkHelper.getSoulNetwork(this.getOwnerUUID(itemStack)).syphon(25); - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage()); - copiedStack.stackSize = 1; - return copiedStack; - } - - @Override - public boolean hasContainerItem(ItemStack itemStack) - { - return true; - } - - @Override - public int getBurnTime(ItemStack fuel) - { - if (fuel == null) - { - return 0; - } - - Item fuelItem = fuel.getItem(); - - if (fuelItem instanceof ItemLavaCrystal) - { -// -// if (FMLCommonHandler.instance().getSide() == Side.CLIENT) -// { -// return 200; -// } -// System.out.println(FMLCommonHandler.instance().getSide()); - - if (NetworkHelper.canSyphonFromContainer(fuel, 25)) - { - return 200; - } else - { - if (!Strings.isNullOrEmpty(this.getOwnerUUID(fuel))) - { - EntityPlayer player = PlayerHelper.getPlayerFromUUID(this.getOwnerUUID(fuel)); - if (player != null) - { - player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 99)); - } - } - - return 0; - } - } - - return 0; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java b/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java deleted file mode 100644 index 3a4154a6..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java +++ /dev/null @@ -1,669 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.common.base.Strings; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.lwjgl.input.Keyboard; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.RitualHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.TileMasterRitualStone; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.handler.event.ClientHandler; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemRitualDiviner extends Item implements IVariantProvider -{ - public static String[] names = { "normal", "dusk", "dawn" }; - - public static final String tooltipBase = "tooltip.BloodMagic.diviner."; - - public ItemRitualDiviner() - { - setUnlocalizedName(Constants.Mod.MODID + ".ritualDiviner"); - setCreativeTab(BloodMagic.tabBloodMagic); - setHasSubtypes(true); - setMaxStackSize(1); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - public String getHighlightTip(ItemStack stack, String displayName) - { - if (Strings.isNullOrEmpty(getCurrentRitual(stack))) - return displayName; - - Ritual ritual = RitualRegistry.getRitualForId(getCurrentRitual(stack)); - if (ritual == null) - return displayName; - - return displayName + ": " + TextHelper.localize(ritual.getUnlocalizedName()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) - { - if (player.isSneaking()) - { - if (world.isRemote) - { - trySetDisplayedRitual(stack, world, pos); - } - - return EnumActionResult.SUCCESS; - } else if (addRuneToRitual(stack, world, pos, player)) - { - if (world.isRemote) - { - spawnParticles(world, pos.up(), 15); - } - - return EnumActionResult.SUCCESS; - // TODO: Have the diviner automagically build the ritual - } - - return EnumActionResult.PASS; - } - - /** - * Adds a single rune to the ritual. - * - * @param stack - * - The Ritual Diviner stack - * @param world - * - The World - * @param pos - * - Block Position of the MRS. - * @param player - * - The Player attempting to place the ritual - * - * @return - True if a rune was successfully added - */ - public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, EntityPlayer player) - { - TileEntity tile = world.getTileEntity(pos); - - if (tile instanceof TileMasterRitualStone) - { - Ritual ritual = RitualRegistry.getRitualForId(this.getCurrentRitual(stack)); - if (ritual != null) - { - EnumFacing direction = getDirection(stack); - for (RitualComponent component : ritual.getComponents()) - { - if (!canPlaceRitualStone(component.getRuneType(), stack)) - { - return false; - } - BlockPos offset = component.getOffset(direction); - BlockPos newPos = pos.add(offset); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (RitualHelper.isRune(world, newPos)) - { - if (RitualHelper.isRuneType(world, newPos, component.getRuneType())) - { - if (world.isRemote) - { - undisplayHologram(); - } - } else - { - // Replace existing ritual stone - RitualHelper.setRuneType(world, newPos, component.getRuneType()); - return true; - } - } else if (block.isAir(state, world, newPos) || block.isReplaceable(world, newPos)) - { - if (!consumeStone(stack, world, player)) - { - return false; - } - int meta = component.getRuneType().ordinal(); - IBlockState newState = ModBlocks.RITUAL_STONE.getStateFromMeta(meta); - world.setBlockState(newPos, newState); - return true; - } else - { - return false; // TODO: Possibly replace the block with a - // ritual stone - } - } - } - } - - return false; - } - - @SideOnly(Side.CLIENT) - public void trySetDisplayedRitual(ItemStack itemStack, World world, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - - if (tile instanceof TileMasterRitualStone) - { - Ritual ritual = RitualRegistry.getRitualForId(this.getCurrentRitual(itemStack)); - TileMasterRitualStone masterRitualStone = (TileMasterRitualStone) tile; - - if (ritual != null) - { - EnumFacing direction = getDirection(itemStack); - ClientHandler.setRitualHolo(masterRitualStone, ritual, direction, true); - } - } - } - - @SideOnly(Side.CLIENT) - public void undisplayHologram() - { - ClientHandler.setRitualHoloToNull(); - } - - // TODO: Make this work for any IRitualStone - public boolean consumeStone(ItemStack stack, World world, EntityPlayer player) - { - if (player.capabilities.isCreativeMode) - { - return true; - } - - ItemStack[] inventory = player.inventory.mainInventory; - for (int i = 0; i < inventory.length; i++) - { - ItemStack newStack = inventory[i]; - if (newStack == null) - { - continue; - } - Item item = newStack.getItem(); - if (item instanceof ItemBlock) - { - Block block = ((ItemBlock) item).getBlock(); - if (block == ModBlocks.RITUAL_STONE) - { - newStack.stackSize--; - if (newStack.stackSize <= 0) - { - inventory[i] = null; - } - - return true; - } - } - } - - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - Ritual ritual = RitualRegistry.getRitualForId(this.getCurrentRitual(stack)); - if (ritual != null) - { - tooltip.add(TextHelper.localize("tooltip.BloodMagic.diviner.currentRitual") + TextHelper.localize(ritual.getUnlocalizedName())); - - boolean sneaking = Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); - boolean extraInfo = sneaking && Keyboard.isKeyDown(Keyboard.KEY_M); - - if (extraInfo) - { - tooltip.add(""); - - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - if (TextHelper.canTranslate(ritual.getUnlocalizedName() + "." + type.getName().toLowerCase() + ".info")) - { - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect(ritual.getUnlocalizedName() + "." + type.getName().toLowerCase() + ".info")))); - } - } - } else if (sneaking) - { - tooltip.add(TextHelper.localize(tooltipBase + "currentDirection", Utils.toFancyCasing(getDirection(stack).getName()))); - tooltip.add(""); - ArrayList componentList = ritual.getComponents(); - - int blankRunes = 0; - int airRunes = 0; - int waterRunes = 0; - int fireRunes = 0; - int earthRunes = 0; - int duskRunes = 0; - int dawnRunes = 0; - int totalRunes = componentList.size(); - - for (RitualComponent component : componentList) - { - switch (component.getRuneType()) - { - case BLANK: - blankRunes++; - break; - case AIR: - airRunes++; - break; - case EARTH: - earthRunes++; - break; - case FIRE: - fireRunes++; - break; - case WATER: - waterRunes++; - break; - case DUSK: - duskRunes++; - break; - case DAWN: - dawnRunes++; - break; - } - } - - if (blankRunes > 0) - tooltip.add(EnumRuneType.BLANK.colorCode + TextHelper.localize(tooltipBase + "blankRune", blankRunes)); - if (waterRunes > 0) - tooltip.add(EnumRuneType.WATER.colorCode + TextHelper.localize(tooltipBase + "waterRune", waterRunes)); - if (airRunes > 0) - tooltip.add(EnumRuneType.AIR.colorCode + TextHelper.localize(tooltipBase + "airRune", airRunes)); - if (fireRunes > 0) - tooltip.add(EnumRuneType.FIRE.colorCode + TextHelper.localize(tooltipBase + "fireRune", fireRunes)); - if (earthRunes > 0) - tooltip.add(EnumRuneType.EARTH.colorCode + TextHelper.localize(tooltipBase + "earthRune", earthRunes)); - if (duskRunes > 0) - tooltip.add(EnumRuneType.DUSK.colorCode + TextHelper.localize(tooltipBase + "duskRune", duskRunes)); - if (dawnRunes > 0) - tooltip.add(EnumRuneType.DAWN.colorCode + TextHelper.localize(tooltipBase + "dawnRune", dawnRunes)); - - tooltip.add(""); - tooltip.add(TextHelper.localize(tooltipBase + "totalRune", totalRunes)); - } else - { - tooltip.add(""); - if (TextHelper.canTranslate(ritual.getUnlocalizedName() + ".info")) - { - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect(ritual.getUnlocalizedName() + ".info")))); - tooltip.add(""); - } - - tooltip.add(TextHelper.localizeEffect(tooltipBase + "extraInfo")); - tooltip.add(TextHelper.localizeEffect(tooltipBase + "extraExtraInfo")); - } - } - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - RayTraceResult ray = this.rayTrace(world, player, false); - if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK) - { - return new ActionResult(EnumActionResult.PASS, stack); - } - - if (player.isSneaking()) - { - if (!world.isRemote) - { - cycleRitual(stack, player); - } - - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - - return new ActionResult(EnumActionResult.PASS, stack); - } - - @Override - public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack) - { - if (entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entityLiving; - - RayTraceResult ray = this.rayTrace(player.worldObj, player, false); - if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK) - { - return false; - } - - if (!player.isSwingInProgress) - { - if (player.isSneaking()) - { - cycleRitualBackwards(stack, player); - } else - { - cycleDirection(stack, player); - } - } - } - - return false; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=basic")); - ret.add(new ImmutablePair(1, "type=dusk")); - ret.add(new ImmutablePair(2, "type=dawn")); - return ret; - } - - public void cycleDirection(ItemStack stack, EntityPlayer player) - { - EnumFacing direction = getDirection(stack); - EnumFacing newDirection; - switch (direction) - { - case NORTH: - newDirection = EnumFacing.EAST; - break; - case EAST: - newDirection = EnumFacing.SOUTH; - break; - case SOUTH: - newDirection = EnumFacing.WEST; - break; - case WEST: - newDirection = EnumFacing.NORTH; - break; - default: - newDirection = EnumFacing.NORTH; - } - - setDirection(stack, newDirection); - notifyDirectionChange(newDirection, player); - } - - public void notifyDirectionChange(EnumFacing direction, EntityPlayer player) - { - ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentDirection", Utils.toFancyCasing(direction.getName()))); - } - - public void setDirection(ItemStack stack, EnumFacing direction) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setInteger(Constants.NBT.DIRECTION, direction.getIndex()); - } - - public EnumFacing getDirection(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - return EnumFacing.NORTH; - } - - NBTTagCompound tag = stack.getTagCompound(); - - int dir = tag.getInteger(Constants.NBT.DIRECTION); - if (dir == 0) - { - return EnumFacing.NORTH; - } - - return EnumFacing.VALUES[tag.getInteger(Constants.NBT.DIRECTION)]; - } - - /** - * Cycles the selected ritual to the next available ritual that is enabled. - * - * @param stack - * - The ItemStack of the ritual diviner - * @param player - * - The player using the ritual diviner - */ - public void cycleRitual(ItemStack stack, EntityPlayer player) - { - String key = getCurrentRitual(stack); - List idList = RitualRegistry.getOrderedIds(); - String firstId = ""; - boolean foundId = false; - boolean foundFirst = false; - - for (String str : idList) - { - Ritual ritual = RitualRegistry.getRitualForId(str); - - if (!RitualRegistry.ritualEnabled(ritual) || !canDivinerPerformRitual(stack, ritual)) - { - continue; - } - - if (!foundFirst) - { - firstId = str; - foundFirst = true; - } - - if (foundId) - { - setCurrentRitual(stack, str); - notifyRitualChange(str, player); - return; - } else - { - if (str.equals(key)) - { - foundId = true; - continue; - } - } - } - - if (foundFirst) - { - setCurrentRitual(stack, firstId); - notifyRitualChange(firstId, player); - } - } - - /** - * Does the same as cycleRitual but instead cycles backwards. - * - * @param stack - * @param player - */ - public void cycleRitualBackwards(ItemStack stack, EntityPlayer player) - { - String key = getCurrentRitual(stack); - List idList = RitualRegistry.getOrderedIds(); - String firstId = ""; - boolean foundId = false; - boolean foundFirst = false; - - for (int i = idList.size() - 1; i >= 0; i--) - { - String str = idList.get(i); - Ritual ritual = RitualRegistry.getRitualForId(str); - - if (!RitualRegistry.ritualEnabled(ritual) || !canDivinerPerformRitual(stack, ritual)) - { - continue; - } - - if (!foundFirst) - { - firstId = str; - foundFirst = true; - } - - if (foundId) - { - setCurrentRitual(stack, str); - notifyRitualChange(str, player); - return; - } else - { - if (str.equals(key)) - { - foundId = true; - continue; - } - } - } - - if (foundFirst) - { - setCurrentRitual(stack, firstId); - notifyRitualChange(firstId, player); - } - } - - public boolean canDivinerPerformRitual(ItemStack stack, Ritual ritual) - { - if (ritual == null) - { - return false; - } - - ArrayList components = ritual.getComponents(); - for (RitualComponent component : components) - { - if (!canPlaceRitualStone(component.getRuneType(), stack)) - { - return false; - } - } - - return true; - } - - public void notifyRitualChange(String key, EntityPlayer player) - { - Ritual ritual = RitualRegistry.getRitualForId(key); - if (ritual != null) - { - ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentRitual") + TextHelper.localize(ritual.getUnlocalizedName())); - } - } - - public void setCurrentRitual(ItemStack stack, String key) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.CURRENT_RITUAL, key); - } - - public String getCurrentRitual(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getString(Constants.NBT.CURRENT_RITUAL); - } - - public boolean canPlaceRitualStone(EnumRuneType rune, ItemStack stack) - { - int meta = stack.getItemDamage(); - switch (rune) - { - case BLANK: - case AIR: - case EARTH: - case FIRE: - case WATER: - return true; - case DUSK: - return meta >= 1; - case DAWN: - return meta >= 2; - } - - return false; - } - - public static void spawnParticles(World worldIn, BlockPos pos, int amount) - { - IBlockState state = worldIn.getBlockState(pos); - Block block = worldIn.getBlockState(pos).getBlock(); - - if (block.isAir(state, worldIn, pos)) - { - for (int i = 0; i < amount; ++i) - { - double d0 = itemRand.nextGaussian() * 0.02D; - double d1 = itemRand.nextGaussian() * 0.02D; - double d2 = itemRand.nextGaussian() * 0.02D; - worldIn.spawnParticle(EnumParticleTypes.VILLAGER_HAPPY, (double) ((float) pos.getX() + itemRand.nextFloat()), (double) pos.getY() + (double) itemRand.nextFloat(), (double) ((float) pos.getZ() + itemRand.nextFloat()), d0, d1, d2, new int[0]); - } - } else - { - for (int i1 = 0; i1 < amount; ++i1) - { - double d0 = itemRand.nextGaussian() * 0.02D; - double d1 = itemRand.nextGaussian() * 0.02D; - double d2 = itemRand.nextGaussian() * 0.02D; - worldIn.spawnParticle(EnumParticleTypes.VILLAGER_HAPPY, (double) ((float) pos.getX() + itemRand.nextFloat()), (double) pos.getY() + (double) itemRand.nextFloat() * 1.0f, (double) ((float) pos.getZ() + itemRand.nextFloat()), d0, d1, d2, new int[0]); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemRitualReader.java b/src/main/java/WayofTime/bloodmagic/item/ItemRitualReader.java deleted file mode 100644 index 12ef782b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemRitualReader.java +++ /dev/null @@ -1,278 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.lwjgl.input.Keyboard; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.EnumRitualReaderState; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDiscreteDemonWill; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemRitualReader extends Item implements IVariantProvider -{ - public static final String tooltipBase = "tooltip.BloodMagic.ritualReader."; - - public ItemRitualReader() - { - super(); - setUnlocalizedName(Constants.Mod.MODID + ".ritualReader"); - setMaxStackSize(1); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - EnumRitualReaderState state = this.getState(stack); - tooltip.add(TextHelper.localizeEffect(tooltipBase + "currentState", TextHelper.localizeEffect(tooltipBase + state.toString().toLowerCase()))); - - tooltip.add(""); - - boolean sneaking = Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); - - if (sneaking) - { - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect(tooltipBase + "desc." + state.toString().toLowerCase())))); - } else - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.extraInfo")); - } - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - RayTraceResult ray = this.rayTrace(world, player, false); - if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK) - { - return new ActionResult(EnumActionResult.PASS, stack); - } - - if (player.isSneaking()) - { - if (!world.isRemote) - { - cycleReader(stack, player); - } - - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - - return new ActionResult(EnumActionResult.PASS, stack); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) - { - if (!world.isRemote) - { - EnumRitualReaderState state = this.getState(stack); - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof IMasterRitualStone) - { - IMasterRitualStone master = (IMasterRitualStone) tile; - this.setMasterBlockPos(stack, pos); - this.setBlockPos(stack, BlockPos.ORIGIN); - - switch (state) - { - case INFORMATION: - master.provideInformationOfRitualToPlayer(player); - break; - case SET_AREA: - String range = this.getCurrentBlockRange(stack); - if (player.isSneaking()) - { - String newRange = master.getNextBlockRange(range); - range = newRange; - this.setCurrentBlockRange(stack, newRange); - } - - master.provideInformationOfRangeToPlayer(player, range); - break; - case SET_WILL_TYPES: - List typeList = new ArrayList(); - ItemStack[] inv = player.inventory.mainInventory; - for (int i = 0; i < 9; i++) - { - ItemStack testStack = inv[i]; - if (testStack == null) - { - continue; - } - - if (testStack.getItem() instanceof IDiscreteDemonWill) - { - EnumDemonWillType type = ((IDiscreteDemonWill) testStack.getItem()).getType(testStack); - if (!typeList.contains(type)) - { - typeList.add(type); - } - } - } - - master.setActiveWillConfig(player, typeList); - master.provideInformationOfWillConfigToPlayer(player, typeList); - break; - } - - return EnumActionResult.FAIL; - } else - { - if (state == EnumRitualReaderState.SET_AREA) - { - BlockPos masterPos = this.getMasterBlockPos(stack); - if (!masterPos.equals(BlockPos.ORIGIN)) - { - BlockPos containedPos = getBlockPos(stack); - if (containedPos.equals(BlockPos.ORIGIN)) - { - this.setBlockPos(stack, pos.subtract(masterPos)); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.blockRange.firstBlock")); - //TODO: Notify player. - } else - { - tile = world.getTileEntity(masterPos); - if (tile instanceof IMasterRitualStone) - { - IMasterRitualStone master = (IMasterRitualStone) tile; - master.setBlockRangeByBounds(player, this.getCurrentBlockRange(stack), containedPos, pos.subtract(masterPos)); - } - - this.setBlockPos(stack, BlockPos.ORIGIN); - } - } - } - } - } - - return super.onItemUse(stack, player, world, pos, hand, facing, hitX, hitY, hitZ); - } - - public BlockPos getBlockPos(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - return new BlockPos(stack.getTagCompound().getInteger(Constants.NBT.X_COORD), stack.getTagCompound().getInteger(Constants.NBT.Y_COORD), stack.getTagCompound().getInteger(Constants.NBT.Z_COORD)); - } - - public ItemStack setBlockPos(ItemStack stack, BlockPos pos) - { - stack = NBTHelper.checkNBT(stack); - NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - return stack; - } - - public BlockPos getMasterBlockPos(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - return new BlockPos(stack.getTagCompound().getInteger(Constants.NBT.X_COORD + "master"), stack.getTagCompound().getInteger(Constants.NBT.Y_COORD + "master"), stack.getTagCompound().getInteger(Constants.NBT.Z_COORD + "master")); - } - - public ItemStack setMasterBlockPos(ItemStack stack, BlockPos pos) - { - stack = NBTHelper.checkNBT(stack); - NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger(Constants.NBT.X_COORD + "master", pos.getX()); - itemTag.setInteger(Constants.NBT.Y_COORD + "master", pos.getY()); - itemTag.setInteger(Constants.NBT.Z_COORD + "master", pos.getZ()); - return stack; - } - - public String getCurrentBlockRange(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getString("range"); - } - - public void setCurrentBlockRange(ItemStack stack, String range) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString("range", range); - } - - public void cycleReader(ItemStack stack, EntityPlayer player) - { - EnumRitualReaderState prevState = getState(stack); - int val = prevState.ordinal(); - int nextVal = val + 1 >= EnumRitualReaderState.values().length ? 0 : val + 1; - EnumRitualReaderState nextState = EnumRitualReaderState.values()[nextVal]; - - setState(stack, nextState); - notifyPlayerOfStateChange(nextState, player); - } - - public void notifyPlayerOfStateChange(EnumRitualReaderState state, EntityPlayer player) - { - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentState", new TextComponentTranslation(tooltipBase + state.toString().toLowerCase()))); - } - - public void setState(ItemStack stack, EnumRitualReaderState state) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setInteger(Constants.NBT.RITUAL_READER, state.ordinal()); - } - - public EnumRitualReaderState getState(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - return EnumRitualReaderState.INFORMATION; - } - - NBTTagCompound tag = stack.getTagCompound(); - - return EnumRitualReaderState.values()[tag.getInteger(Constants.NBT.RITUAL_READER)]; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java b/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java deleted file mode 100644 index 29ebda58..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java +++ /dev/null @@ -1,226 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.client.IMeshProvider; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import javax.annotation.Nullable; - -public class ItemSacrificialDagger extends Item implements IMeshProvider -{ - public static String[] names = { "normal", "creative" }; - - public ItemSacrificialDagger() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".sacrificialDagger."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHasSubtypes(true); - setMaxStackSize(1); - setFull3D(); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) - { - list.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.sacrificialDagger.desc")))); - - if (stack.getItemDamage() == 1) - list.add(TextHelper.localizeEffect("tooltip.BloodMagic.sacrificialDagger.creative")); - } - - @Override - public void onPlayerStoppedUsing(ItemStack stack, World worldIn, EntityLivingBase entityLiving, int timeLeft) - { - if (entityLiving instanceof EntityPlayer && !entityLiving.worldObj.isRemote) - PlayerSacrificeHelper.sacrificePlayerHealth((EntityPlayer) entityLiving); - } - - @Override - public int getMaxItemUseDuration(ItemStack stack) - { - return 72000; - } - - @Override - public EnumAction getItemUseAction(ItemStack stack) - { - return EnumAction.BOW; - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return super.onItemRightClick(stack, world, player, hand); - - if (this.canUseForSacrifice(stack)) - { - player.setActiveHand(hand); - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - - int lpAdded = ConfigHandler.sacrificialDaggerConversion * ConfigHandler.sacrificialDaggerDamage; - - RayTraceResult rayTrace = rayTrace(world, player, false); - if (rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) - { - TileEntity tile = world.getTileEntity(rayTrace.getBlockPos()); - - if (tile != null && tile instanceof TileAltar && stack.getItemDamage() == 1) - lpAdded = ((TileAltar) tile).getCapacity(); - } - - if (!player.capabilities.isCreativeMode) - { - SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, ConfigHandler.sacrificialDaggerDamage, lpAdded); - if (MinecraftForge.EVENT_BUS.post(evt)) - return super.onItemRightClick(stack, world, player, hand); - - if (evt.shouldDrainHealth) - { - player.hurtResistantTime = 0; - player.attackEntityFrom(BloodMagicAPI.getDamageSource(), 0.001F); - player.setHealth(Math.max(player.getHealth() - ConfigHandler.sacrificialDaggerDamage, 0.0001f)); - if (player.getHealth() <= 0.001f) - { - player.onDeath(BloodMagicAPI.getDamageSource()); - player.setHealth(0); - } -// player.attackEntityFrom(BloodMagicAPI.getDamageSource(), 2.0F); - } - - if (!evt.shouldFillAltar) - return super.onItemRightClick(stack, world, player, hand); - - lpAdded = evt.lpAdded; - } - - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSound(null, posX, posY, posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - - for (int l = 0; l < 8; ++l) - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), 0, 0, 0); - - if (!world.isRemote && PlayerHelper.isFakePlayer(player)) - return super.onItemRightClick(stack, world, player, hand); - - // TODO - Check if SoulFray is active - PlayerSacrificeHelper.findAndFillAltar(world, player, lpAdded, false); - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - if (!world.isRemote && entity instanceof EntityPlayer) - this.setUseForSacrifice(stack, this.isPlayerPreparedForSacrifice(world, (EntityPlayer) entity)); - } - - public boolean isPlayerPreparedForSacrifice(World world, EntityPlayer player) - { - return !world.isRemote && (PlayerSacrificeHelper.getPlayerIncense(player) > 0); - } - - public boolean canUseForSacrifice(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - return stack.getTagCompound().getBoolean(Constants.NBT.SACRIFICE); - } - - public void setUseForSacrifice(ItemStack stack, boolean sacrifice) - { - stack = NBTHelper.checkNBT(stack); - stack.getTagCompound().setBoolean(Constants.NBT.SACRIFICE, sacrifice); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new ItemMeshDefinition() - { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - String variant = "type=normal"; - if (stack.getItemDamage() != 0) - variant = "type=creative"; - - if (canUseForSacrifice(stack)) - variant = "type=ceremonial"; - - return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/ItemSacrificialDagger"), variant); - } - }; - } - - @Override - public List getVariants() - { - List variants = new ArrayList(); - variants.add("type=normal"); - variants.add("type=creative"); - variants.add("type=ceremonial"); - return variants; - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemSanguineBook.java b/src/main/java/WayofTime/bloodmagic/item/ItemSanguineBook.java deleted file mode 100644 index 4fb5aa1d..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemSanguineBook.java +++ /dev/null @@ -1,125 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.altar.IAltarManipulator; -import WayofTime.bloodmagic.api.iface.IDocumentedBlock; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.NumeralHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.Collections; -import java.util.List; - -public class ItemSanguineBook extends Item implements IVariantProvider, IAltarManipulator -{ - private EnumAltarTier currentDisplayedTier = EnumAltarTier.ONE; - - public ItemSanguineBook() - { - setUnlocalizedName(Constants.Mod.MODID + ".sanguineBook"); - setCreativeTab(BloodMagic.tabBloodMagic); - setMaxStackSize(1); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - return super.onItemUse(stack, player, world, pos, hand, facing, hitX, hitY, hitZ); - - IBlockState hitState = world.getBlockState(pos); - if (player.isSneaking()) - { - if (hitState.getBlock() instanceof IDocumentedBlock) - { - trySetDisplayedTier(world, pos); - IDocumentedBlock documentedBlock = (IDocumentedBlock) hitState.getBlock(); - List docs = documentedBlock.getDocumentation(player, world, pos, hitState); - if (!docs.isEmpty()) - { - ChatUtil.sendNoSpam(player, docs.toArray(new ITextComponent[docs.size()])); - return super.onItemUse(stack, player, world, pos, hand, facing, hitX, hitY, hitZ); - } - } - } - - return super.onItemUse(stack, player, world, pos, hand, facing, hitX, hitY, hitZ); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (world.isRemote) - return super.onItemRightClick(stack, world, player, hand); - - stack = NBTHelper.checkNBT(stack); - - RayTraceResult rayTrace = rayTrace(world, player, false); - if (rayTrace == null || rayTrace.typeOfHit == RayTraceResult.Type.MISS || rayTrace.typeOfHit == RayTraceResult.Type.ENTITY) - { - if (stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) >= EnumAltarTier.MAXTIERS - 1) - stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, 0); - else - stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1); - - currentDisplayedTier = EnumAltarTier.values()[stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER)]; - ChatUtil.sendNoSpam(player, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.setTier", NumeralHelper.toRoman(stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1))); - - return super.onItemRightClick(stack, world, player, hand); - } - - return super.onItemRightClick(stack, world, player, hand); - } - - public boolean trySetDisplayedTier(World world, BlockPos pos) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileAltar) - { - return !((TileAltar) tile).setCurrentTierDisplayed(currentDisplayedTier); - } - - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.book.shifting")); - tooltip.add(TextFormatting.OBFUSCATED + "~ILikeTehNutsAndICannotLie"); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentTier", stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1)); - } - - // IVariantProvider - - @Override - public List> getVariants() - { - return Collections.singletonList(Pair.of(0, "type=normal")); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java b/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java deleted file mode 100644 index f8552ec5..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class ItemSlate extends Item implements IVariantProvider -{ - public String[] names = { "blank", "reinforced", "imbued", "demonic", "ethereal" }; - - public ItemSlate() - { - super(); - - setCreativeTab(BloodMagic.tabBloodMagic); - setUnlocalizedName(Constants.Mod.MODID + ".slate."); - setHasSubtypes(true); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) - { - list.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.slate.desc")))); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=blank")); - ret.add(new ImmutablePair(1, "type=reinforced")); - ret.add(new ImmutablePair(2, "type=imbued")); - ret.add(new ImmutablePair(3, "type=demonic")); - ret.add(new ImmutablePair(4, "type=ethereal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java b/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java deleted file mode 100644 index e717c234..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class ItemTelepositionFocus extends ItemBindableBase implements IVariantProvider -{ - public static String[] names = { "weak", "enhanced", "reinforced", "demonic" }; - - public ItemTelepositionFocus() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".focus."); - setCreativeTab(BloodMagic.tabBloodMagic); - setMaxStackSize(1); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (player.isSneaking()) - { - RayTraceResult mop = rayTrace(world, player, false); - - if (mop != null && mop.typeOfHit == RayTraceResult.Type.BLOCK) - { - setBlockPos(stack, world, mop.getBlockPos()); - } - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localize("tooltip.BloodMagic.telepositionFocus." + names[stack.getItemDamage()])))); - - super.addInformation(stack, player, tooltip, advanced); - - if (!stack.hasTagCompound()) - return; - - stack = NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - BlockPos coords = getBlockPos(stack); - - if (coords != null && tag != null) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.coords", coords.getX(), coords.getY(), coords.getZ())); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.dimension", tag.getInteger(Constants.NBT.DIMENSION_ID))); - } - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=weak")); - ret.add(new ImmutablePair(1, "type=enhanced")); - ret.add(new ImmutablePair(2, "type=reinforced")); - ret.add(new ImmutablePair(3, "type=demonic")); - return ret; - } - - public World getWorld(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - return DimensionManager.getWorld(stack.getTagCompound().getInteger(Constants.NBT.DIMENSION_ID)); - } - - public BlockPos getBlockPos(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - return new BlockPos(stack.getTagCompound().getInteger(Constants.NBT.X_COORD), stack.getTagCompound().getInteger(Constants.NBT.Y_COORD), stack.getTagCompound().getInteger(Constants.NBT.Z_COORD)); - } - - public ItemStack setBlockPos(ItemStack stack, World world, BlockPos pos) - { - stack = NBTHelper.checkNBT(stack); - NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - itemTag.setInteger(Constants.NBT.DIMENSION_ID, world.provider.getDimension()); - return stack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java b/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java deleted file mode 100644 index 63c83d4c..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.bloodmagic.item; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map.Entry; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemUpgradeTome extends Item implements IVariantProvider -{ - public ItemUpgradeTome() - { - super(); - - setCreativeTab(BloodMagic.tabUpgradeTome); - setUnlocalizedName(Constants.Mod.MODID + ".upgradeTome"); - setHasSubtypes(true); - setMaxStackSize(1); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (world.isRemote) - { - return super.onItemRightClick(stack, world, player, hand); - } - - LivingArmourUpgrade upgrade = LivingUpgrades.getUpgrade(stack); - if (upgrade == null) - { - return super.onItemRightClick(stack, world, player, hand); - } - - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - if (chestStack != null && chestStack.getItem() instanceof ItemLivingArmour) - { - LivingArmour armour = ItemLivingArmour.getLivingArmourFromStack(chestStack); - if (armour == null) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (armour.upgradeArmour(player, upgrade)) - { - ItemLivingArmour.setLivingArmour(chestStack, armour); -// ((ItemLivingArmour) chestStack.getItem()).setLivingArmour(stack, armour, false); - stack.stackSize--; - } - } - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (Entry entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet()) - { - String key = entry.getKey(); - int maxLevel = entry.getValue(); - for (int i = 0; i < maxLevel; i++) - { - ItemStack stack = new ItemStack(this); - LivingUpgrades.setKey(stack, key); - LivingUpgrades.setLevel(stack, i); - list.add(stack); - } - } - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=upgradetome")); - return ret; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { -// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmour")))); - if (!stack.hasTagCompound()) - return; - LivingArmourUpgrade upgrade = LivingUpgrades.getUpgrade(stack); - if (upgrade != null) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmour.upgrade.level", TextHelper.localize(upgrade.getUnlocalizedName()), upgrade.getUpgradeLevel() + 1)); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java b/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java deleted file mode 100644 index df338564..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java +++ /dev/null @@ -1,97 +0,0 @@ -package WayofTime.bloodmagic.item; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IUpgradeTrainer; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map.Entry; - -public class ItemUpgradeTrainer extends Item implements IUpgradeTrainer, IVariantProvider -{ - public ItemUpgradeTrainer() - { - super(); - - setCreativeTab(BloodMagic.tabUpgradeTome); - setUnlocalizedName(Constants.Mod.MODID + ".upgradeTrainer"); - setHasSubtypes(true); - setMaxStackSize(1); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - list.add(new ItemStack(this)); - for (Entry entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet()) - { - String key = entry.getKey(); - ItemStack stack = new ItemStack(this); - LivingUpgrades.setKey(stack, key); - list.add(stack); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { -// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmour")))); - if (!stack.hasTagCompound()) - return; - LivingArmourUpgrade upgrade = LivingUpgrades.getUpgrade(stack); - if (upgrade != null) - { - tooltip.add(TextHelper.localize(upgrade.getUnlocalizedName())); - } - } - - @Override - public List getTrainedUpgrades(ItemStack stack) - { - List keyList = new ArrayList(); - String key = LivingUpgrades.getKey(stack); - - if (!key.isEmpty()) - { - keyList.add(key); - } - - return keyList; - } - - @Override - public boolean setTrainedUpgrades(ItemStack stack, List keys) - { - if (keys.isEmpty()) - { - return false; - } - - LivingUpgrades.setKey(stack, keys.get(0)); - return true; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=upgradetrainer")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/alchemy/ItemCuttingFluid.java b/src/main/java/WayofTime/bloodmagic/item/alchemy/ItemCuttingFluid.java deleted file mode 100644 index acb4e8ce..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/alchemy/ItemCuttingFluid.java +++ /dev/null @@ -1,142 +0,0 @@ -package WayofTime.bloodmagic.item.alchemy; - -import java.util.ArrayList; -import java.util.List; - -import lombok.Getter; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.ICustomAlchemyConsumable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemCuttingFluid extends Item implements IVariantProvider, ICustomAlchemyConsumable -{ - @Getter - private static ArrayList names = new ArrayList(); - - public static final String BASIC = "basicCuttingFluid"; - public static final String EXPLOSIVE = "explosive"; - - public ItemCuttingFluid() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".cuttingFluid."); - setHasSubtypes(true); - setCreativeTab(BloodMagic.tabBloodMagic); - setMaxStackSize(1); - - buildItemList(); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - int max = getMaxUsesForFluid(stack); - tooltip.add(TextHelper.localize("tooltip.BloodMagic.cuttingFluidRatio", max - getDamageOfFluid(stack), max)); - } - - private void buildItemList() - { - names.add(0, BASIC); - names.add(1, EXPLOSIVE); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names.get(stack.getItemDamage()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.size(); i++) - list.add(new ItemStack(id, 1, i)); - } - - public static ItemStack getStack(String name) - { - return new ItemStack(ModItems.CUTTING_FLUID, 1, names.indexOf(name)); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (String name : names) - ret.add(new ImmutablePair(names.indexOf(name), "type=" + name)); - return ret; - } - - public int getDamageOfFluid(ItemStack stack) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getInteger("used"); - } - - public void applyDamageToFluid(ItemStack stack) - { - int damage = Math.min(getDamageOfFluid(stack) + 1, getMaxUsesForFluid(stack)); - NBTTagCompound tag = stack.getTagCompound(); - - tag.setInteger("used", damage); - } - - public int getMaxUsesForFluid(ItemStack stack) - { - switch (stack.getMetadata()) - { - case 0: - return 16; - case 1: - return 64; - default: - return 1; - } - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) - { - return (double) (getDamageOfFluid(stack)) / (double) (getMaxUsesForFluid(stack)); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) - { - return getDamageOfFluid(stack) > 0; - } - - @Override - public ItemStack drainUseOnAlchemyCraft(ItemStack stack) - { - applyDamageToFluid(stack); - if (getDamageOfFluid(stack) >= getMaxUsesForFluid(stack)) - { - return null; - } - - return stack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/alchemy/ItemLivingArmourPointsUpgrade.java b/src/main/java/WayofTime/bloodmagic/item/alchemy/ItemLivingArmourPointsUpgrade.java deleted file mode 100644 index 1d6c05d2..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/alchemy/ItemLivingArmourPointsUpgrade.java +++ /dev/null @@ -1,158 +0,0 @@ -package WayofTime.bloodmagic.item.alchemy; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import lombok.Getter; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.Iterables; - -public class ItemLivingArmourPointsUpgrade extends Item implements IVariantProvider -{ - @Getter - private static ArrayList names = new ArrayList(); - - public static final String DRAFT_ANGELUS = "draftAngelus"; - - public ItemLivingArmourPointsUpgrade() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".livingPointUpgrade."); - setHasSubtypes(true); - setCreativeTab(BloodMagic.tabBloodMagic); - - buildItemList(); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmourPointsUpgrade.desc", 200)))); - } - - @Override - public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) - { - EntityPlayer player = entityLiving instanceof EntityPlayer ? (EntityPlayer) entityLiving : null; - - if (player == null || !player.capabilities.isCreativeMode) - { - --stack.stackSize; - } - - if (!worldIn.isRemote) - { - player.addPotionEffect(new PotionEffect(MobEffects.WITHER, 300, 5)); - player.addPotionEffect(new PotionEffect(MobEffects.POISON, 300, 5)); - player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 400, 1)); - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = Iterables.toArray(player.getArmorInventoryList(), ItemStack.class)[2]; - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - if (armour.maxUpgradePoints < 200) - { - armour.maxUpgradePoints = 200; - ((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true); - ItemLivingArmour.setLivingArmour(chestStack, armour); - } - } - } - } - - return stack; - } - - @Override - public int getMaxItemUseDuration(ItemStack stack) - { - return 32; - } - - @Override - public EnumAction getItemUseAction(ItemStack stack) - { - return EnumAction.DRINK; - } - - @Override - public ActionResult onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) - { - playerIn.setActiveHand(hand); - return new ActionResult(EnumActionResult.SUCCESS, itemStackIn); - } - - private void buildItemList() - { - names.add(0, DRAFT_ANGELUS); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names.get(stack.getItemDamage()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.size(); i++) - list.add(new ItemStack(id, 1, i)); - } - - public static ItemStack getStack(String name) - { - return new ItemStack(ModItems.ITEM_POINTS_UPGRADE, 1, names.indexOf(name)); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (String name : names) - ret.add(new ImmutablePair(names.indexOf(name), "type=" + name)); - return ret; - } - - public static ItemStack getStack(String key, int stackSize) - { - ItemStack stack = getStack(key); - stack.stackSize = stackSize; - - return stack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/alchemy/package-info.java b/src/main/java/WayofTime/bloodmagic/item/alchemy/package-info.java deleted file mode 100644 index a96a3d45..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/alchemy/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.alchemy; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java b/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java deleted file mode 100644 index d94bdcca..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java +++ /dev/null @@ -1,610 +0,0 @@ -package WayofTime.bloodmagic.item.armour; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.UUID; - -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.util.DamageSource; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.fml.relauncher.ReflectionHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.input.Keyboard; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.item.ItemComponent; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerRepairing; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeElytra; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.network.PlayerFallDistancePacketProcessor; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshProvider -{ - private static Field _FLAGS = ReflectionHelper.findField(Entity.class, "FLAGS", "field_184240_ax"); - - private static DataParameter FLAGS = null; - public static String[] names = { "helmet", "chest", "legs", "boots" }; - - public static final boolean useSpecialArmourCalculation = true; - - //TODO: Save/delete cache periodically. - public static Map armourMap = new HashMap(); - - public ItemLivingArmour(EntityEquipmentSlot armorType) - { - super(ItemArmor.ArmorMaterial.IRON, 0, armorType); - setUnlocalizedName(Constants.Mod.MODID + ".livingArmour."); -// setMaxDamage(250); - setMaxDamage((int) (getMaxDamage() * 1.5)); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public void onCreated(ItemStack stack, World world, EntityPlayer player) - { - if (stack != null && !world.isRemote && stack.getItem() == ModItems.LIVING_ARMOUR_CHEST) - { - Utils.setUUID(stack); - } - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) - { - if (this == ModItems.LIVING_ARMOUR_CHEST || this == ModItems.LIVING_ARMOUR_HELMET || this == ModItems.LIVING_ARMOUR_BOOTS) - { - return "bloodmagic:models/armor/livingArmour_layer_1.png"; - } - - if (this == ModItems.LIVING_ARMOUR_LEGS) - { - return "bloodmagic:models/armor/livingArmour_layer_2.png"; - } else - { - return null; - } - } - -// public double getRemainderForDamage(double damage, double plating) //TODO: Add plating, which shifts the damage -// { -// if (damage <= 0) -// { -// return 1; -// } -// -// double protectionAmount = 1 - Math.max(3, 15 - damage / 2) / 25; //This puts the base armour protection at vanilla iron level -// -// return 0; -// } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) - { - return ItemStack.areItemsEqual(repair, ItemComponent.getStack(ItemComponent.REAGENT_BINDING)); - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack stack, DamageSource source, double damage, int slot) - { - double armourReduction = 0.0; - double damageAmount = 0.25; - - if (this == ModItems.LIVING_ARMOUR_BOOTS || this == ModItems.LIVING_ARMOUR_HELMET) - { - damageAmount = 3d / 20d * 0.6; - } else if (this == ModItems.LIVING_ARMOUR_LEGS) - { - damageAmount = 6d / 20d * 0.6; - } else if (this == ModItems.LIVING_ARMOUR_CHEST) - { - damageAmount = 0.64; - } - - double armourPenetrationReduction = 0; - - int maxAbsorption = 100000; - - if (source.equals(DamageSource.drown)) - { - return new ArmorProperties(-1, 0, 0); - } - - if (source.equals(DamageSource.outOfWorld)) - { - return new ArmorProperties(-1, 0, 0); - } - - if (this == ModItems.LIVING_ARMOUR_CHEST) - { - armourReduction = 0.24 / 0.64; // This values puts it at iron level - - ItemStack helmet = player.getItemStackFromSlot(EntityEquipmentSlot.HEAD); - ItemStack leggings = player.getItemStackFromSlot(EntityEquipmentSlot.LEGS); - ItemStack boots = player.getItemStackFromSlot(EntityEquipmentSlot.FEET); - - if (helmet == null || leggings == null || boots == null) - { - damageAmount *= (armourReduction); - - return new ArmorProperties(-1, damageAmount, maxAbsorption); - } - - if (helmet.getItem() instanceof ItemLivingArmour && leggings.getItem() instanceof ItemLivingArmour && boots.getItem() instanceof ItemLivingArmour) - { - double remainder = 1; // Multiply this number by the armour upgrades for protection - - if (hasLivingArmour(stack)) - { - LivingArmour armour = getLivingArmour(stack); - if (armour != null && isEnabled(stack)) - { - for (Entry entry : armour.upgradeMap.entrySet()) - { - LivingArmourUpgrade upgrade = entry.getValue(); - remainder *= (1 - upgrade.getArmourProtection(player, source)); - } - } - } - - armourReduction = armourReduction + (1 - remainder) * (1 - armourReduction); - damageAmount *= (armourReduction); - -// if (source.isUnblockable()) -// { -// return new ArmorProperties(-1, damageAmount * armourPenetrationReduction, maxAbsorption); -// } - - return new ArmorProperties(-1, source.isUnblockable() ? 1 - remainder : damageAmount, maxAbsorption); - } - } else - { - if (source.isUnblockable()) - { - return new ArmorProperties(-1, damageAmount * armourPenetrationReduction, maxAbsorption); - } - - return new ArmorProperties(-1, damageAmount, maxAbsorption); - } - - return new ArmorProperties(-1, 0, 0); - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) - { - if (armor.getItem() == ModItems.LIVING_ARMOUR_HELMET) - { - return 3; - } - - if (armor.getItem() == ModItems.LIVING_ARMOUR_CHEST) - { - return 8; - } - - if (armor.getItem() == ModItems.LIVING_ARMOUR_LEGS) - { - return 6; - } - - if (armor.getItem() == ModItems.LIVING_ARMOUR_BOOTS) - { - return 3; - } - - return 5; - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) - { - if (this == ModItems.LIVING_ARMOUR_CHEST) - { - int preDamage = stack.getItemDamage(); - if (source.isUnblockable()) - { - return; - } - - if (damage > this.getMaxDamage(stack) - this.getDamage(stack)) - { - //TODO: Syphon a load of LP. - if (entity.worldObj.isRemote && entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - network.syphonAndDamage(player, damage * 100); - } - - return; - } - - stack.damageItem(damage, entity); - - int receivedDamage = stack.getItemDamage() - preDamage; - if (entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - if (LivingArmour.hasFullSet(player)) - { - LivingArmour armour = ItemLivingArmour.getLivingArmour(stack); - if (armour != null) - { - StatTrackerRepairing.incrementCounter(armour, receivedDamage); - } - } - } - - } else - { - stack.damageItem(damage, entity); - } - - return; // TODO Armour shouldn't get damaged... for now - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - if (this == ModItems.LIVING_ARMOUR_CHEST) - { - LivingArmour armour = getLivingArmourFromStack(stack); - for (Entry entry : armour.upgradeMap.entrySet()) - { - LivingArmourUpgrade upgrade = entry.getValue(); - if (upgrade != null) - { - if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && Keyboard.isKeyDown(Keyboard.KEY_M)) - { - StatTracker tracker = null; - for (StatTracker searchTracker : armour.trackerMap.values()) - { - if (searchTracker != null && searchTracker.providesUpgrade(upgrade.getUniqueIdentifier())) - { - tracker = searchTracker; - break; - } - } - - if (tracker != null) - { - double progress = tracker.getProgress(armour, upgrade.getUpgradeLevel()); - tooltip.add(TextHelper.localize("tooltip.BloodMagic.livingArmour.upgrade.progress", TextHelper.localize(upgrade.getUnlocalizedName()), MathHelper.clamp_int((int) (progress * 100D), 0, 100))); - } - } else - { - tooltip.add(TextHelper.localize("tooltip.BloodMagic.livingArmour.upgrade.level", TextHelper.localize(upgrade.getUnlocalizedName()), upgrade.getUpgradeLevel() + 1)); - } - } - } - - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmour.upgrade.points", armour.totalUpgradePoints, armour.maxUpgradePoints)); - if (!(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && Keyboard.isKeyDown(Keyboard.KEY_M))) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmour.extraExtraInfo")); - } - } - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) - { - super.onArmorTick(world, player, stack); - - if (world.isRemote && this == ModItems.LIVING_ARMOUR_CHEST) - { - if (player instanceof EntityPlayerSP) //Sanity check - { - EntityPlayerSP spPlayer = (EntityPlayerSP) player; - - if (FLAGS == null) - { - try - { - FLAGS = (DataParameter) _FLAGS.get(null); - } catch (IllegalArgumentException e) - { - e.printStackTrace(); - } catch (IllegalAccessException e) - { - e.printStackTrace(); - } - } - - if (FLAGS != null) - { - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgradeFromNBT(Constants.Mod.MODID + ".upgrade.elytra", chestStack); - if (upgrade instanceof LivingArmourUpgradeElytra) - { - if (spPlayer.movementInput.jump && !spPlayer.onGround && spPlayer.motionY < 0.0D && !spPlayer.capabilities.isFlying) - { - if (spPlayer.motionY > -0.5D) - { - BloodMagicPacketHandler.INSTANCE.sendToServer(new PlayerFallDistancePacketProcessor(1)); - } - - if (!spPlayer.isElytraFlying()) - { - byte b0 = player.getDataManager().get(FLAGS); - player.getDataManager().set(FLAGS, (byte) (b0 | 1 << 7)); - } - } else if (spPlayer.isElytraFlying() && !spPlayer.movementInput.jump && !spPlayer.onGround) - { - byte b0 = player.getDataManager().get(FLAGS); - player.getDataManager().set(FLAGS, (byte) (b0 & ~(1 << 7))); - } - } - } - } - } - } - - if (this == ModItems.LIVING_ARMOUR_CHEST) - { - if (!hasLivingArmour(stack)) - { - setLivingArmour(stack, getLivingArmourFromStack(stack)); - } - - LivingArmour armour = getLivingArmour(stack); - if (LivingArmour.hasFullSet(player)) - { - this.setIsEnabled(stack, true); - armour.onTick(world, player); - } - - setLivingArmour(stack, armour, false); - } - } - - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) - { - if (this == ModItems.LIVING_ARMOUR_CHEST && isEnabled(stack) && slot == EntityEquipmentSlot.CHEST) - { - LivingArmour armour = ItemLivingArmour.getLivingArmourFromStack(stack); - - return armour.getAttributeModifiers(); - } - - return HashMultimap.create(); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[3 - armorType.getIndex()]; - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new ItemMeshDefinition() - { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - assert getCustomLocation() != null; - if (stack.getItem() == ModItems.LIVING_ARMOUR_HELMET) - return new ModelResourceLocation(getCustomLocation(), "armour=head"); - else if (stack.getItem() == ModItems.LIVING_ARMOUR_CHEST) - return new ModelResourceLocation(getCustomLocation(), "armour=body"); - else if (stack.getItem() == ModItems.LIVING_ARMOUR_LEGS) - return new ModelResourceLocation(getCustomLocation(), "armour=leg"); - else - return new ModelResourceLocation(getCustomLocation(), "armour=feet"); - } - }; - } - - @Override - public ResourceLocation getCustomLocation() - { - return new ResourceLocation(Constants.Mod.MODID, "item/ItemLivingArmour"); - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - ret.add("armour=head"); - ret.add("armour=body"); - ret.add("armour=leg"); - ret.add("armour=feet"); - return ret; - } - - public static LivingArmour getLivingArmourFromStack(ItemStack stack) - { - NBTTagCompound livingTag = getArmourTag(stack); - - LivingArmour livingArmour = new LivingArmour(); - livingArmour.readFromNBT(livingTag); - - return livingArmour; - } - - public void setLivingArmour(ItemStack stack, LivingArmour armour, boolean forceWrite) - { - NBTTagCompound livingTag = new NBTTagCompound(); - - if (!forceWrite) - { - livingTag = getArmourTag(stack); - armour.writeDirtyToNBT(livingTag); - } else - { - armour.writeToNBT(livingTag); - } - - setArmourTag(stack, livingTag); - } - - public static NBTTagCompound getArmourTag(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getCompoundTag(Constants.NBT.LIVING_ARMOUR); - } - - public void setArmourTag(ItemStack stack, NBTTagCompound livingTag) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setTag(Constants.NBT.LIVING_ARMOUR, livingTag); - } - - //TODO: Add the ability to have the armour give an upgrade with a higher level - public static LivingArmourUpgrade getUpgrade(String uniqueIdentifier, ItemStack stack) - { - if (!hasLivingArmour(stack)) - { - setLivingArmour(stack, getLivingArmourFromStack(stack)); - } - - LivingArmour armour = getLivingArmour(stack); - - for (Entry entry : armour.upgradeMap.entrySet()) - { - if (entry.getKey().equals(uniqueIdentifier)) - { - return entry.getValue(); - } - } - - return null; - } - - public static LivingArmourUpgrade getUpgradeFromNBT(String uniqueIdentifier, ItemStack stack) - { - LivingArmour armour = getLivingArmourFromStack(stack); - - for (Entry entry : armour.upgradeMap.entrySet()) - { - if (entry.getKey().equals(uniqueIdentifier)) - { - return entry.getValue(); - } - } - - return null; - } - - public static boolean hasLivingArmour(ItemStack stack) - { - UUID uuid = Utils.getUUID(stack); - return uuid != null && armourMap.containsKey(uuid); - } - - public static LivingArmour getLivingArmour(ItemStack stack) - { - UUID uuid = Utils.getUUID(stack); - - return armourMap.get(uuid); - } - - public static void setLivingArmour(ItemStack stack, LivingArmour armour) - { - if (!Utils.hasUUID(stack)) - { - Utils.setUUID(stack); - } - - UUID uuid = Utils.getUUID(stack); - - armourMap.put(uuid, armour); - } - - public static boolean hasUpgrade(String id, ItemStack stack) - { - if (!hasLivingArmour(stack)) - { - setLivingArmour(stack, getLivingArmourFromStack(stack)); - } - - LivingArmour armour = getLivingArmour(stack); - - return armour.upgradeMap.containsKey(id); - } - - public void setIsEnabled(ItemStack stack, boolean bool) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - tag.setBoolean("enabled", bool); - } - - public boolean isEnabled(ItemStack stack) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - return tag.getBoolean("enabled"); - } - - public void setIsElytra(ItemStack stack, boolean bool) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - tag.setBoolean("elytra", bool); - } - - public boolean isElytra(ItemStack stack) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - return tag.getBoolean("elytra"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/armour/ItemSentientArmour.java b/src/main/java/WayofTime/bloodmagic/item/armour/ItemSentientArmour.java deleted file mode 100644 index f5dc8800..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/armour/ItemSentientArmour.java +++ /dev/null @@ -1,684 +0,0 @@ -package WayofTime.bloodmagic.item.armour; - -import java.util.*; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.registry.ModItems; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMeshProvider, IMultiWillTool -{ - public static String[] names = { "helmet", "chest", "legs", "boots" }; - - public static double[] willBracket = new double[] { 30, 200, 600, 1500, 4000, 6000, 8000, 16000 }; - public static double[] consumptionPerHit = new double[] { 0.1, 0.12, 0.15, 0.2, 0.3, 0.35, 0.4, 0.5 }; - public static double[] extraProtectionLevel = new double[] { 0, 0.25, 0.5, 0.6, 0.7, 0.75, 0.85, 0.9 }; - public static double[] steadfastProtectionLevel = new double[] { 0.25, 0.5, 0.6, 0.7, 0.75, 0.85, 0.9, 0.95 }; - - //public static double[] healthBonus = new double[] { 3, 6, 9, 12, 15, 20, 25, 30 }; - public static double[] knockbackBonus = new double[] { 0.2, 0.4, 0.6, 0.8, 1, 1, 1, 1 }; - - public static double[] damageBoost = new double[] { 0.03, 0.06, 0.09, 0.12, 0.15, 0.18, 0.22, 0.25 }; - public static double[] attackSpeed = new double[] { -0.02, -0.04, -0.06, -0.08, -0.1, -0.12, -0.14, -0.16 }; - - public static double[] speedBonus = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4 }; - - public ItemSentientArmour(EntityEquipmentSlot armorType) - { - super(ItemArmor.ArmorMaterial.IRON, 0, armorType); - setUnlocalizedName(Constants.Mod.MODID + ".sentientArmour."); - setMaxDamage(250); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) - { - if (this == ModItems.SENTIENT_ARMOUR_CHEST || this == ModItems.SENTIENT_ARMOUR_HELMET || this == ModItems.SENTIENT_ARMOUR_BOOTS) - { - switch (this.getCurrentType(stack)) - { - case DEFAULT: - return "bloodmagic:models/armor/sentientArmour_layer_1.png"; - case CORROSIVE: - return "bloodmagic:models/armor/sentientArmour_corrosive_layer_1.png"; - case VENGEFUL: - return "bloodmagic:models/armor/sentientArmour_vengeful_layer_1.png"; - case DESTRUCTIVE: - return "bloodmagic:models/armor/sentientArmour_destructive_layer_1.png"; - case STEADFAST: - return "bloodmagic:models/armor/sentientArmour_steadfast_layer_1.png"; - } - return "bloodmagic:models/armor/sentientArmour_layer_1.png"; - } - - if (this == ModItems.SENTIENT_ARMOUR_LEGS) - { - switch (this.getCurrentType(stack)) - { - case DEFAULT: - return "bloodmagic:models/armor/sentientArmour_layer_2.png"; - case CORROSIVE: - return "bloodmagic:models/armor/sentientArmour_corrosive_layer_2.png"; - case VENGEFUL: - return "bloodmagic:models/armor/sentientArmour_vengeful_layer_2.png"; - case DESTRUCTIVE: - return "bloodmagic:models/armor/sentientArmour_destructive_layer_2.png"; - case STEADFAST: - return "bloodmagic:models/armor/sentientArmour_steadfast_layer_2.png"; - } - return "bloodmagic:models/armor/sentientArmour_layer_1.png"; - } else - { - return null; - } - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) - { - if (this.armorType == EntityEquipmentSlot.CHEST) - { - EnumDemonWillType type = this.getCurrentType(stack); - switch (type) - { - case CORROSIVE: - if (player.isPotionActive(MobEffects.POISON)) - { - player.removeActivePotionEffect(MobEffects.POISON); - } - if (player.isPotionActive(MobEffects.WITHER)) - { - player.removeActivePotionEffect(MobEffects.WITHER); - } - break; - default: - } - } - } - - public void onPlayerAttacked(ItemStack stack, DamageSource source, EntityPlayer attackedPlayer) - { - if (source.getEntity() instanceof EntityLivingBase) - { - EntityLivingBase attacker = (EntityLivingBase) source.getEntity(); - EnumDemonWillType type = this.getCurrentType(stack); - switch (type) - { - case CORROSIVE: - if (!source.isProjectile()) - { - attacker.addPotionEffect(new PotionEffect(MobEffects.POISON, 100)); //TODO: customize duration - } - break; - case DEFAULT: - break; - case DESTRUCTIVE: - break; - case STEADFAST: - break; - case VENGEFUL: - break; - } - } - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack stack, DamageSource source, double damage, int slot) - { - double armourReduction = 0.0; - double damageAmount = 0.25; - - if (this == ModItems.SENTIENT_ARMOUR_BOOTS || this == ModItems.SENTIENT_ARMOUR_HELMET) - { - damageAmount = 3d / 20d * 0.6; - } else if (this == ModItems.SENTIENT_ARMOUR_LEGS) - { - damageAmount = 6d / 20d * 0.6; - } else if (this == ModItems.SENTIENT_ARMOUR_CHEST) - { - damageAmount = 0.64; - } - - double armourPenetrationReduction = 0; - - int maxAbsorption = 100000; - - if (source.equals(DamageSource.drown)) - { - return new ArmorProperties(-1, 0, 0); - } - - if (source.equals(DamageSource.outOfWorld)) - { - return new ArmorProperties(-1, 0, 0); - } - - if (this == ModItems.SENTIENT_ARMOUR_CHEST) - { - armourReduction = 0.24 / 0.64; // This values puts it at iron level - - ItemStack helmet = player.getItemStackFromSlot(EntityEquipmentSlot.HEAD); - ItemStack leggings = player.getItemStackFromSlot(EntityEquipmentSlot.LEGS); - ItemStack boots = player.getItemStackFromSlot(EntityEquipmentSlot.FEET); - - if (helmet == null || leggings == null || boots == null) - { - damageAmount *= (armourReduction); - - return new ArmorProperties(-1, damageAmount, maxAbsorption); - } - - if (helmet.getItem() instanceof ItemSentientArmour && leggings.getItem() instanceof ItemSentientArmour && boots.getItem() instanceof ItemSentientArmour) - { - double remainder = 1; // Multiply this number by the armour upgrades for protection - remainder *= (1 - this.getArmourModifier(stack)); - - armourReduction = armourReduction + (1 - remainder) * (1 - armourReduction); - damageAmount *= (armourReduction); - - if (source.isUnblockable()) - { - return new ArmorProperties(-1, damageAmount * armourPenetrationReduction, maxAbsorption); - } - - return new ArmorProperties(-1, damageAmount, maxAbsorption); - } - } else - { - if (source.isUnblockable()) - { - return new ArmorProperties(-1, damageAmount * armourPenetrationReduction, maxAbsorption); - } - - return new ArmorProperties(-1, damageAmount, maxAbsorption); - } - - return new ArmorProperties(-1, 0, 0); - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) - { - if (armor.getItem() == ModItems.SENTIENT_ARMOUR_HELMET) - { - return 3; - } - - if (armor.getItem() == ModItems.SENTIENT_ARMOUR_CHEST) - { - return 8; - } - - if (armor.getItem() == ModItems.SENTIENT_ARMOUR_LEGS) - { - return 6; - } - - if (armor.getItem() == ModItems.SENTIENT_ARMOUR_BOOTS) - { - return 3; - } - - return 5; - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) - { - if (entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - - EnumDemonWillType type = getCurrentType(stack); - - double willRequired = this.getCostModifier(stack) * damage; - double willLeft = PlayerDemonWillHandler.getTotalDemonWill(type, player); - if (willLeft >= willRequired && canSustainArmour(type, willLeft)) - { - this.setAbilitiesOfArmour(type, willLeft - willRequired, stack); - PlayerDemonWillHandler.consumeDemonWill(type, player, willRequired); - } else - { - this.revertArmour(player, stack); - } - } - } - - public double getCostModifier(ItemStack stack) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getDouble("costModifier"); - } - - public void setCostModifier(ItemStack stack, double modifier) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("costModifier", modifier); - } - - public double getArmourModifier(ItemStack stack) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getDouble("armourModifier"); - } - - public void setArmourModifier(ItemStack stack, double modifier) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("armourModifier", modifier); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[3 - armorType.getIndex()]; - } - - public void revertArmour(EntityPlayer player, ItemStack itemStack) - { - ItemStack stack = this.getContainedArmourStack(itemStack); - player.setItemStackToSlot(armorType, stack); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new ItemMeshDefinition() - { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - assert getCustomLocation() != null; - EnumDemonWillType type = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_HELMET).getCurrentType(stack); - String additional = "_" + type.getName().toLowerCase(); - if (stack.getItem() == ModItems.SENTIENT_ARMOUR_HELMET) - return new ModelResourceLocation(getCustomLocation(), "armour=head" + additional); - else if (stack.getItem() == ModItems.SENTIENT_ARMOUR_CHEST) - return new ModelResourceLocation(getCustomLocation(), "armour=body" + additional); - else if (stack.getItem() == ModItems.SENTIENT_ARMOUR_LEGS) - return new ModelResourceLocation(getCustomLocation(), "armour=leg" + additional); - else - return new ModelResourceLocation(getCustomLocation(), "armour=feet" + additional); - } - }; - } - - @Override - public ResourceLocation getCustomLocation() - { - return new ResourceLocation(Constants.Mod.MODID, "item/ItemSentientArmour"); - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - String additional = "_" + type.getName().toLowerCase(); - - ret.add("armour=head" + additional); - ret.add("armour=body" + additional); - ret.add("armour=leg" + additional); - ret.add("armour=feet" + additional); - } - - return ret; - } - - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) - { - Multimap multimap = HashMultimap.create(); - if (slot == EntityEquipmentSlot.CHEST) - { - multimap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 318145), "Armor modifier", this.getHealthBonus(stack), 0)); - multimap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 8145), "Armor modifier", this.getKnockbackResistance(stack), 0)); - multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 94021), "Armor modifier", this.getSpeedBoost(stack), 2)); - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 96721), "Armor modifier", this.getDamageBoost(stack), 2)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 73245), "Armor modifier", this.getAttackSpeedBoost(stack), 2)); - } - return multimap; - } - - public static void revertAllArmour(EntityPlayer player) - { - ItemStack[] armourInventory = player.inventory.armorInventory; - for (ItemStack stack : armourInventory) - { - if (stack != null && stack.getItem() instanceof ItemSentientArmour) - { - ((ItemSentientArmour) stack.getItem()).revertArmour(player, stack); - } - } - } - - public void setContainedArmourStack(ItemStack newArmour, ItemStack previousArmour) - { - if (newArmour == null || previousArmour == null) - { - return; - } - - NBTTagCompound tag = new NBTTagCompound(); - previousArmour.writeToNBT(tag); - - NBTTagCompound omegaTag = newArmour.getTagCompound(); - if (omegaTag == null) - { - omegaTag = new NBTTagCompound(); - newArmour.setTagCompound(omegaTag); - } - - omegaTag.setTag("armour", tag); - Map enchantmentMap = EnchantmentHelper.getEnchantments(previousArmour); - EnchantmentHelper.setEnchantments(enchantmentMap, newArmour); - } - - public ItemStack getContainedArmourStack(ItemStack newArmour) - { - NBTTagCompound omegaTag = newArmour.getTagCompound(); - if (omegaTag == null) - { - return null; - } - - NBTTagCompound tag = omegaTag.getCompoundTag("armour"); - ItemStack armourStack = ItemStack.loadItemStackFromNBT(tag); - - return armourStack; - } - - public static boolean convertPlayerArmour(EnumDemonWillType type, double will, EntityPlayer player) - { - if (!canSustainArmour(type, will)) - { - return false; - } - - ItemStack helmetStack = player.getItemStackFromSlot(EntityEquipmentSlot.HEAD); - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - ItemStack leggingsStack = player.getItemStackFromSlot(EntityEquipmentSlot.LEGS); - ItemStack bootsStack = player.getItemStackFromSlot(EntityEquipmentSlot.FEET); - - { - ItemStack omegaHelmetStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_HELMET).getSubstituteStack(type, will, helmetStack); - ItemStack omegaChestStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_CHEST).getSubstituteStack(type, will, chestStack); - ItemStack omegaLeggingsStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_LEGS).getSubstituteStack(type, will, leggingsStack); - ItemStack omegaBootsStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_BOOTS).getSubstituteStack(type, will, bootsStack); - - player.setItemStackToSlot(EntityEquipmentSlot.HEAD, omegaHelmetStack); - player.setItemStackToSlot(EntityEquipmentSlot.CHEST, omegaChestStack); - player.setItemStackToSlot(EntityEquipmentSlot.LEGS, omegaLeggingsStack); - player.setItemStackToSlot(EntityEquipmentSlot.FEET, omegaBootsStack); - - return true; - } - } - - public ItemStack getSubstituteStack(EnumDemonWillType type, double will, ItemStack previousArmour) - { - ItemStack newArmour = new ItemStack(this); - - this.setContainedArmourStack(newArmour, previousArmour); - this.setAbilitiesOfArmour(type, will, newArmour); - - return newArmour; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public void setCurrentType(EnumDemonWillType type, ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - public void setAbilitiesOfArmour(EnumDemonWillType type, double willValue, ItemStack armourStack) - { - int willBracket = getWillBracket(willValue); - if (willBracket >= 0) - { - double recurringCost = consumptionPerHit[willBracket]; - - this.setCostModifier(armourStack, recurringCost); - this.setCurrentType(type, armourStack); - - if (this.armorType == EntityEquipmentSlot.CHEST) - { - this.setArmourModifier(armourStack, getArmourModifier(type, willBracket)); - this.setHealthBonus(armourStack, this.getHealthModifier(type, willBracket)); - this.setKnockbackResistance(armourStack, getKnockbackModifier(type, willBracket)); - this.setSpeedBoost(armourStack, getSpeedModifier(type, willBracket)); - this.setDamageBoost(armourStack, getDamageModifier(type, willBracket)); - this.setAttackSpeedBoost(armourStack, getAttackSpeedModifier(type, willBracket)); - } - } - } - - public double getArmourModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - return steadfastProtectionLevel[willBracket]; - default: - return extraProtectionLevel[willBracket]; - } - } - - public double getHealthModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - //return healthBonus[willBracket]; - default: - return 0; - } - } - - public double getKnockbackModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - return knockbackBonus[willBracket]; - default: - return 0; - } - } - - public double getSpeedModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return speedBonus[willBracket]; - default: - return 0; - } - } - - public double getDamageModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case DESTRUCTIVE: - return damageBoost[willBracket]; - default: - return 0; - } - } - - public double getAttackSpeedModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case DESTRUCTIVE: - return attackSpeed[willBracket]; - default: - return 0; - } - } - - public static boolean canSustainArmour(EnumDemonWillType type, double willValue) - { - return getWillBracket(willValue) >= 0; - } - - public static int getWillBracket(double will) - { - int bracket = -1; - - for (int i = 0; i < willBracket.length; i++) - { - if (will >= willBracket[i]) - { - bracket = i; - } - } - - return bracket; - } - - public double getHealthBonus(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); - } - - public void setHealthBonus(ItemStack stack, double hp) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); - } - - public double getKnockbackResistance(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble("knockback"); - } - - public void setKnockbackResistance(ItemStack stack, double kb) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("knockback", kb); - } - - public double getSpeedBoost(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble("speed"); - } - - public void setSpeedBoost(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("speed", speed); - } - - public double getDamageBoost(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble("damage"); - } - - public void setDamageBoost(ItemStack stack, double damage) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("damage", damage); - } - - public double getAttackSpeedBoost(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble("attackSpeed"); - } - - public void setAttackSpeedBoost(ItemStack stack, double attackSpeed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("attackSpeed", attackSpeed); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/armour/package-info.java b/src/main/java/WayofTime/bloodmagic/item/armour/package-info.java deleted file mode 100644 index d6803eed..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/armour/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.armour; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockAlchemyTable.java b/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockAlchemyTable.java deleted file mode 100644 index d92b04e1..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockAlchemyTable.java +++ /dev/null @@ -1,71 +0,0 @@ -package WayofTime.bloodmagic.item.block; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.tile.TileAlchemyTable; - -public class ItemBlockAlchemyTable extends ItemBlock -{ - public ItemBlockAlchemyTable(Block block) - { - super(block); - } - - @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) - { - float yaw = player.rotationYaw; - EnumFacing direction = EnumFacing.fromAngle(yaw); - - if (direction.getFrontOffsetY() != 0) - { - return false; - } - - if (!world.isAirBlock(pos.offset(direction))) - { - return false; - } - -// newState = block.getDefaultState().withProperty(BlockAlchemyTable.DIRECTION, direction).withProperty(BlockAlchemyTable.INVISIBLE, true); - - if (!world.setBlockState(pos, newState, 3)) - { - return false; - } - - if (!world.setBlockState(pos.offset(direction), newState, 3)) - { - return false; - } - - IBlockState state = world.getBlockState(pos); - if (state.getBlock() == this.block) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileAlchemyTable) - { - ((TileAlchemyTable) tile).setInitialTableParameters(direction, false, pos.offset(direction)); - } - - TileEntity slaveTile = world.getTileEntity(pos.offset(direction)); - if (slaveTile instanceof TileAlchemyTable) - { - ((TileAlchemyTable) slaveTile).setInitialTableParameters(direction, true, pos); - } - - setTileEntityNBT(world, player, pos, stack); - this.block.onBlockPlacedBy(world, pos, state, player, stack); - } - - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java b/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java deleted file mode 100644 index d9baff09..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java +++ /dev/null @@ -1,168 +0,0 @@ -package WayofTime.bloodmagic.item.block; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.block.BlockBloodTank; -import WayofTime.bloodmagic.tile.TileBloodTank; -import WayofTime.bloodmagic.util.helper.TextHelper; -import com.google.common.base.Strings; -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.fluids.*; -import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class ItemBlockBloodTank extends ItemBlock implements IFluidContainerItem -{ - public ItemBlockBloodTank(Block block) - { - super(block); - - setHasSubtypes(true); - } - - @Override - public int getMetadata(int meta) - { - return meta; - } - - @Override - public String getItemStackDisplayName(ItemStack stack) - { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.TANK) && !stack.getTagCompound().getCompoundTag(Constants.NBT.TANK).getString("FluidName").equals("")) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK); - return super.getItemStackDisplayName(stack) + " " + TextHelper.localizeEffect("tooltip.BloodMagic.tier", stack.getItemDamage() + 1) + " (" + FluidStack.loadFluidStackFromNBT(tag).getLocalizedName() + ")"; - } - else - { - return super.getItemStackDisplayName(stack) + " " + TextHelper.localizeEffect("tooltip.BloodMagic.tier", stack.getItemDamage() + 1); - } - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.tier", stack.getItemDamage() + 1)); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.capacity") + ": " + getCapacity(stack) + "mB"); - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK); - FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag); - if (!Strings.isNullOrEmpty(tag.getString("FluidName")) && fluidStack != null) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.type") + ": " + fluidStack.getLocalizedName()); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.amount") + ": " + tag.getInteger("Amount") + "/" + getCapacity(stack) + "mB"); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < TileBloodTank.CAPACITIES.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - public FluidStack getFluid(ItemStack stack) - { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.TANK) && !stack.getTagCompound().getCompoundTag(Constants.NBT.TANK).getString("FluidName").equals("")) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK); - return FluidStack.loadFluidStackFromNBT(tag); - } - - return null; - } - - @Override - public int getCapacity(ItemStack container) - { - return container != null && Block.getBlockFromItem(container.getItem()) instanceof BlockBloodTank ? TileBloodTank.CAPACITIES[container.getMetadata()] * Fluid.BUCKET_VOLUME : 0; - } - - @Override - public int fill(ItemStack stack, FluidStack resource, boolean doFill) - { - if (resource == null || stack.stackSize != 1) - return 0; - - int fillAmount = 0, capacity = getCapacity(stack); - NBTTagCompound tag = stack.getTagCompound(), fluidTag = null; - FluidStack fluid = null; - - if (tag == null || !tag.hasKey(Constants.NBT.TANK) || (fluidTag = tag.getCompoundTag(Constants.NBT.TANK)) == null || (fluid = FluidStack.loadFluidStackFromNBT(fluidTag)) == null) - fillAmount = Math.min(capacity, resource.amount); - - if (fluid == null) - { - if (doFill) - { - fluid = resource.copy(); - fluid.amount = 0; - } - } - else if (!fluid.isFluidEqual(resource)) - return 0; - else - fillAmount = Math.min(capacity - fluid.amount, resource.amount); - - fillAmount = Math.max(fillAmount, 0); - - if (doFill) - { - if (tag == null) - stack.setTagCompound(new NBTTagCompound()); - - tag = stack.getTagCompound(); - fluid.amount += fillAmount; - tag.setTag(Constants.NBT.TANK, fluid.writeToNBT(fluidTag == null ? new NBTTagCompound() : fluidTag)); - } - - return fillAmount; - } - - @Override - public FluidStack drain(ItemStack stack, int maxDrain, boolean doDrain) - { - NBTTagCompound tag = stack.getTagCompound(), fluidTag = null; - FluidStack fluid; - - if (tag == null || !tag.hasKey(Constants.NBT.TANK) || (fluidTag = tag.getCompoundTag(Constants.NBT.TANK)) == null || (fluid = FluidStack.loadFluidStackFromNBT(fluidTag)) == null) - { - if (fluidTag != null) - tag.removeTag(Constants.NBT.TANK); - return null; - } - - int drainAmount = Math.min(maxDrain, fluid.amount); - - if (doDrain) - { - tag.removeTag(Constants.NBT.TANK); - fluid.amount -= drainAmount; - if (fluid.amount > 0) - fill(stack, fluid, true); - } - - fluid.amount = drainAmount; - return fluid; - } - - @Override - public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) - { - return new FluidHandlerItemStack(stack, getCapacity(stack)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockDemonCrystal.java b/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockDemonCrystal.java deleted file mode 100644 index 51f523e5..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockDemonCrystal.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.item.block; - -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.tile.TileDemonCrystal; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.Locale; - -public class ItemBlockDemonCrystal extends ItemBlock -{ - public ItemBlockDemonCrystal(Block block) - { - super(block); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + EnumDemonWillType.values()[stack.getItemDamage()].toString().toLowerCase(Locale.ENGLISH); - } - - @Override - public int getMetadata(int meta) - { - return meta; - } - - @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) - { - if (super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ, newState)) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileDemonCrystal) - { - ((TileDemonCrystal) tile).setPlacement(side); - } - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockEnum.java b/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockEnum.java deleted file mode 100644 index 9b9f825e..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockEnum.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.bloodmagic.item.block.base; - -import WayofTime.bloodmagic.block.base.BlockEnum; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.MathHelper; - -public class ItemBlockEnum & IStringSerializable> extends ItemBlock -{ - - public ItemBlockEnum(BlockEnum block) - { - super(block); - - if (block.getTypes().length > 1) - setHasSubtypes(true); - } - - @SuppressWarnings("unchecked") - @Override - public BlockEnum getBlock() - { - return (BlockEnum) super.getBlock(); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return getBlock().getUnlocalizedName() + getBlock().getTypes()[MathHelper.clamp_int(stack.getItemDamage(), 0, 15)].getName(); - } - - @Override - public int getMetadata(int damage) - { - return damage; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockInteger.java b/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockInteger.java deleted file mode 100644 index 038c4e22..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockInteger.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.bloodmagic.item.block.base; - -import WayofTime.bloodmagic.block.base.BlockInteger; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemBlockInteger extends ItemBlock { - - public ItemBlockInteger(BlockInteger block) { - super(block); - - if (block.getMaxMeta() > 1) - setHasSubtypes(true); - } - - @SuppressWarnings("unchecked") - @Override - public BlockInteger getBlock() { - return (BlockInteger) super.getBlock(); - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return getBlock().getUnlocalizedName() + "." + stack.getItemDamage(); - } - - @Override - public int getMetadata(int damage) { - return damage; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockString.java b/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockString.java deleted file mode 100644 index 3fdea986..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/base/ItemBlockString.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.item.block.base; - -import WayofTime.bloodmagic.block.base.BlockString; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.MathHelper; - -public class ItemBlockString extends ItemBlock { - - public ItemBlockString(BlockString block) { - super(block); - - if (block.getTypes().length> 1) - setHasSubtypes(true); - } - - @SuppressWarnings("unchecked") - @Override - public BlockString getBlock() { - return (BlockString) super.getBlock(); - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return getBlock().getUnlocalizedName() + "." + getBlock().getTypes()[MathHelper.clamp_int(stack.getItemDamage(), 0, 15)]; - } - - @Override - public int getMetadata(int damage) { - return damage; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/block/package-info.java b/src/main/java/WayofTime/bloodmagic/item/block/package-info.java deleted file mode 100644 index 67b9b28e..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/block/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.block; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java b/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java deleted file mode 100644 index 0ea4f2e8..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java +++ /dev/null @@ -1,114 +0,0 @@ -package WayofTime.bloodmagic.item.gear; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.IAltarManipulator; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.iface.IItemLPContainer; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LPContainer; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; - -public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator, IItemLPContainer, IVariantProvider -{ - public final int CAPACITY = 10000; // Max LP storage - - public ItemPackSacrifice() - { - super(ArmorMaterial.CHAIN, 0, EntityEquipmentSlot.CHEST); - - setUnlocalizedName(Constants.Mod.MODID + ".pack.sacrifice"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (world.isRemote) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - RayTraceResult rayTrace = this.rayTrace(world, player, false); - - if (rayTrace == null) - { - return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND); - } else - { - if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) - { - TileEntity tile = world.getTileEntity(rayTrace.getBlockPos()); - - if (!(tile instanceof IBloodAltar)) - return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND); - - LPContainer.tryAndFillAltar((IBloodAltar) tile, stack, world, rayTrace.getBlockPos()); - } - } - - return ActionResult.newResult(EnumActionResult.FAIL, stack); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) - { - if (getStoredLP(stack) > CAPACITY) - setStoredLP(stack, CAPACITY); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - list.add(TextHelper.localize("tooltip.BloodMagic.pack.sacrifice.desc")); - list.add(TextHelper.localize("tooltip.BloodMagic.pack.stored", getStoredLP(stack))); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } - - // IFillable - - @Override - public int getCapacity() - { - return this.CAPACITY; - } - - @Override - public int getStoredLP(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getInteger(Constants.NBT.STORED_LP) : 0; - } - - @Override - public void setStoredLP(ItemStack stack, int lp) - { - if (stack != null) - { - NBTHelper.checkNBT(stack).getTagCompound().setInteger(Constants.NBT.STORED_LP, lp); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java b/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java deleted file mode 100644 index d5c74e74..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java +++ /dev/null @@ -1,140 +0,0 @@ -package WayofTime.bloodmagic.item.gear; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.IAltarManipulator; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.iface.IItemLPContainer; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LPContainer; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; - -public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulator, IItemLPContainer, IVariantProvider -{ - /** - * How much LP per half heart - */ - public final int CONVERSION = 100; - /** - * Max LP storage - */ - public final int CAPACITY = 10000; - /** - * How often the pack syphons - */ - public final int INTERVAL = 20; - /** - * How much health is required for the pack to syphon (0 - 1) - */ - public final float HEALTHREQ = 0.5f; - - public ItemPackSelfSacrifice() - { - super(ArmorMaterial.CHAIN, 0, EntityEquipmentSlot.CHEST); - - setUnlocalizedName(Constants.Mod.MODID + ".pack.selfSacrifice"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (world.isRemote) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - RayTraceResult position = this.rayTrace(world, player, false); - - if (position == null) - { - return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND); - } else - { - if (position.typeOfHit == RayTraceResult.Type.BLOCK) - { - TileEntity tile = world.getTileEntity(position.getBlockPos()); - - if (!(tile instanceof IBloodAltar)) - return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND); - - LPContainer.tryAndFillAltar((IBloodAltar) tile, stack, world, position.getBlockPos()); - } - } - - return ActionResult.newResult(EnumActionResult.FAIL, stack); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) - { - if (world.isRemote || player.capabilities.isCreativeMode) - return; - - boolean shouldSyphon = player.getHealth() / player.getMaxHealth() > HEALTHREQ && getStoredLP(stack) < CAPACITY; - - if (shouldSyphon & world.getTotalWorldTime() % INTERVAL == 0) - { - NetworkHelper.getSoulNetwork(player).hurtPlayer(player, 1.0F); - LPContainer.addLPToItem(stack, CONVERSION, CAPACITY); - } - - if (getStoredLP(stack) > CAPACITY) - setStoredLP(stack, CAPACITY); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - list.add(TextHelper.localize("tooltip.BloodMagic.pack.selfSacrifice.desc")); - list.add(TextHelper.localize("tooltip.BloodMagic.pack.stored", getStoredLP(stack))); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } - - // IFillable - - @Override - public int getCapacity() - { - return this.CAPACITY; - } - - @Override - public int getStoredLP(ItemStack stack) - { - return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getInteger(Constants.NBT.STORED_LP) : 0; - } - - @Override - public void setStoredLP(ItemStack stack, int lp) - { - if (stack != null) - { - NBTHelper.checkNBT(stack).getTagCompound().setInteger(Constants.NBT.STORED_LP, lp); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/gear/package-info.java b/src/main/java/WayofTime/bloodmagic/item/gear/package-info.java deleted file mode 100644 index 8cfd7cd2..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/gear/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.gear; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/inventory/ContainerHolding.java b/src/main/java/WayofTime/bloodmagic/item/inventory/ContainerHolding.java deleted file mode 100644 index c95f2497..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/inventory/ContainerHolding.java +++ /dev/null @@ -1,190 +0,0 @@ -package WayofTime.bloodmagic.item.inventory; - -import WayofTime.bloodmagic.api.iface.ISigil; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.FMLCommonHandler; - -public class ContainerHolding extends Container -{ - private final int PLAYER_INVENTORY_ROWS = 3; - private final int PLAYER_INVENTORY_COLUMNS = 9; - - private final EntityPlayer player; - public final InventoryHolding inventoryHolding; - - public ContainerHolding(EntityPlayer player, InventoryHolding inventoryHolding) - { - this.player = player; - this.inventoryHolding = inventoryHolding; - int currentSlotHeldIn = player.inventory.currentItem; - - for (int columnIndex = 0; columnIndex < ItemSigilHolding.inventorySize; ++columnIndex) - { - this.addSlotToContainer(new SlotHolding(this, inventoryHolding, player, columnIndex, 8 + columnIndex * 36, 17)); - } - - for (int rowIndex = 0; rowIndex < PLAYER_INVENTORY_ROWS; ++rowIndex) - { - for (int columnIndex = 0; columnIndex < PLAYER_INVENTORY_COLUMNS; ++columnIndex) - { - this.addSlotToContainer(new Slot(player.inventory, columnIndex + rowIndex * 9 + 9, 8 + columnIndex * 18, 41 + rowIndex * 18)); - } - } - - for (int actionBarIndex = 0; actionBarIndex < PLAYER_INVENTORY_COLUMNS; ++actionBarIndex) - { - if (actionBarIndex == currentSlotHeldIn) - { - this.addSlotToContainer(new SlotDisabled(player.inventory, actionBarIndex, 8 + actionBarIndex * 18, 99)); - } else - { - this.addSlotToContainer(new Slot(player.inventory, actionBarIndex, 8 + actionBarIndex * 18, 99)); - } - } - } - - @Override - public boolean canInteractWith(EntityPlayer entityPlayer) - { - return true; - } - - @Override - public void onContainerClosed(EntityPlayer entityPlayer) - { - super.onContainerClosed(entityPlayer); - - if (!entityPlayer.worldObj.isRemote) - { - saveInventory(entityPlayer); - } - } - - @Override - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - - if (!player.worldObj.isRemote) - { - saveInventory(player); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex) - { - ItemStack stack = null; - Slot slotObject = (Slot) inventorySlots.get(slotIndex); - int slots = inventorySlots.size(); - - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - - if (stack.getItem() instanceof ISigil) - { - if (slotIndex < ItemSigilHolding.inventorySize) - { - if (!this.mergeItemStack(stackInSlot, ItemSigilHolding.inventorySize, slots, false)) - { - return null; - } - } else if (!this.mergeItemStack(stackInSlot, 0, ItemSigilHolding.inventorySize, false)) - { - return null; - } - } else if (stack.getItem() instanceof ItemSigilHolding) - { - if (slotIndex < ItemSigilHolding.inventorySize + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS)) - { - if (!this.mergeItemStack(stackInSlot, ItemSigilHolding.inventorySize + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), inventorySlots.size(), false)) - { - return null; - } - } else if (!this.mergeItemStack(stackInSlot, ItemSigilHolding.inventorySize, ItemSigilHolding.inventorySize + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), false)) - { - return null; - } - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } - - public void saveInventory(EntityPlayer entityPlayer) - { - inventoryHolding.onGuiSaved(entityPlayer); - } - - private class SlotHolding extends Slot - { - private final EntityPlayer player; - private ContainerHolding containerHolding; - - public SlotHolding(ContainerHolding containerHolding, IInventory inventory, EntityPlayer player, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - this.player = player; - this.containerHolding = containerHolding; - } - - @Override - public void onSlotChanged() - { - super.onSlotChanged(); - - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) - { - containerHolding.saveInventory(player); - } - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof ISigil && !(itemStack.getItem() instanceof ItemSigilHolding); - } - } - - private class SlotDisabled extends Slot - { - public SlotDisabled(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return false; - } - - @Override - public boolean canTakeStack(EntityPlayer player) - { - return false; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/inventory/InventoryHolding.java b/src/main/java/WayofTime/bloodmagic/item/inventory/InventoryHolding.java deleted file mode 100644 index e14c2b2f..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/inventory/InventoryHolding.java +++ /dev/null @@ -1,84 +0,0 @@ -package WayofTime.bloodmagic.item.inventory; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.ISigil; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import WayofTime.bloodmagic.util.Utils; - -public class InventoryHolding extends ItemInventory -{ - protected ItemStack[] inventory; - - public InventoryHolding(ItemStack itemStack) - { - super(itemStack, ItemSigilHolding.inventorySize, "SigilOfHolding"); - -// readFromNBT(itemStack.getTagCompound()); - } - - public void onGuiSaved(EntityPlayer entityPlayer) - { - masterStack = findParentStack(entityPlayer); - - if (masterStack != null) - { - save(); - } - } - - public ItemStack findParentStack(EntityPlayer entityPlayer) - { - if (Utils.hasUUID(masterStack)) - { - UUID parentStackUUID = new UUID(masterStack.getTagCompound().getLong(Constants.NBT.MOST_SIG), masterStack.getTagCompound().getLong(Constants.NBT.LEAST_SIG)); - for (int i = 0; i < entityPlayer.inventory.getSizeInventory(); i++) - { - ItemStack itemStack = entityPlayer.inventory.getStackInSlot(i); - - if (itemStack != null && Utils.hasUUID(itemStack)) - { - if (itemStack.getTagCompound().getLong(Constants.NBT.MOST_SIG) == parentStackUUID.getMostSignificantBits() && itemStack.getTagCompound().getLong(Constants.NBT.LEAST_SIG) == parentStackUUID.getLeastSignificantBits()) - { - return itemStack; - } - } - } - } - - return null; - } - - public void save() - { - NBTTagCompound nbtTagCompound = masterStack.getTagCompound(); - - if (nbtTagCompound == null) - { - nbtTagCompound = new NBTTagCompound(); - - UUID uuid = UUID.randomUUID(); - nbtTagCompound.setLong(Constants.NBT.MOST_SIG, uuid.getMostSignificantBits()); - nbtTagCompound.setLong(Constants.NBT.LEAST_SIG, uuid.getLeastSignificantBits()); - } - - writeToNBT(nbtTagCompound); - masterStack.setTagCompound(nbtTagCompound); - } - - @Override - public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) - { - return itemStack.getItem() instanceof ISigil && !(itemStack.getItem() instanceof ItemSigilHolding); - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/inventory/ItemInventory.java b/src/main/java/WayofTime/bloodmagic/item/inventory/ItemInventory.java deleted file mode 100644 index dcea591a..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/inventory/ItemInventory.java +++ /dev/null @@ -1,258 +0,0 @@ -package WayofTime.bloodmagic.item.inventory; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentString; - -public class ItemInventory implements IInventory -{ - protected int[] syncedSlots = new int[0]; - private ItemStack[] inventory; - private int size; - private String name; - protected ItemStack masterStack; - - public ItemInventory(ItemStack masterStack, int size, String name) - { - this.inventory = new ItemStack[size]; - this.size = size; - this.name = name; - this.masterStack = masterStack; - - if (masterStack != null) - this.readFromStack(masterStack); - } - - public void initializeInventory(ItemStack masterStack) - { - this.masterStack = masterStack; - this.clear(); - this.readFromStack(masterStack); - } - - private boolean isSyncedSlot(int slot) - { - for (int s : this.syncedSlots) - { - if (s == slot) - { - return true; - } - } - return false; - } - - public void readFromNBT(NBTTagCompound tagCompound) - { - NBTTagList tags = tagCompound.getTagList(Constants.NBT.ITEMS, 10); - inventory = new ItemStack[getSizeInventory()]; - - for (int i = 0; i < tags.tagCount(); i++) - { - if (!isSyncedSlot(i)) - { - NBTTagCompound data = tags.getCompoundTagAt(i); - byte j = data.getByte(Constants.NBT.SLOT); - - if (j >= 0 && j < inventory.length) - { - inventory[j] = ItemStack.loadItemStackFromNBT(data); - } - } - } - } - - public void writeToNBT(NBTTagCompound tagCompound) - { - NBTTagList tags = new NBTTagList(); - - for (int i = 0; i < inventory.length; i++) - { - if ((inventory[i] != null) && !isSyncedSlot(i)) - { - NBTTagCompound data = new NBTTagCompound(); - data.setByte(Constants.NBT.SLOT, (byte) i); - inventory[i].writeToNBT(data); - tags.appendTag(data); - } - } - - tagCompound.setTag(Constants.NBT.ITEMS, tags); - } - - public void readFromStack(ItemStack masterStack) - { - if (masterStack != null) - { - NBTHelper.checkNBT(masterStack); - NBTTagCompound tag = masterStack.getTagCompound(); - readFromNBT(tag.getCompoundTag(Constants.NBT.ITEM_INVENTORY)); - } - } - - public void writeToStack(ItemStack masterStack) - { - if (masterStack != null) - { - NBTHelper.checkNBT(masterStack); - NBTTagCompound tag = masterStack.getTagCompound(); - NBTTagCompound invTag = new NBTTagCompound(); - writeToNBT(invTag); - tag.setTag(Constants.NBT.ITEM_INVENTORY, invTag); - } - } - - @Override - public int getSizeInventory() - { - return size; - } - - @Override - public ItemStack getStackInSlot(int index) - { - return inventory[index]; - } - - @Override - public ItemStack decrStackSize(int index, int count) - { - if (inventory[index] != null) - { -// if (!worldObj.isRemote) -// worldObj.markBlockForUpdate(this.pos); - - if (inventory[index].stackSize <= count) - { - ItemStack itemStack = inventory[index]; - inventory[index] = null; - markDirty(); - return itemStack; - } - - ItemStack itemStack = inventory[index].splitStack(count); - if (inventory[index].stackSize == 0) - inventory[index] = null; - - markDirty(); - return itemStack; - } - - return null; - } - - @Override - public ItemStack removeStackFromSlot(int slot) - { - if (inventory[slot] != null) - { - ItemStack itemStack = inventory[slot]; - setInventorySlotContents(slot, null); - return itemStack; - } - return null; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack stack) - { - inventory[slot] = stack; - if (stack != null && stack.stackSize > getInventoryStackLimit()) - stack.stackSize = getInventoryStackLimit(); - markDirty(); -// if (!worldObj.isRemote) -// worldObj.markBlockForUpdate(this.pos); - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer player) - { - return true; - } - - @Override - public void openInventory(EntityPlayer player) - { - - } - - @Override - public void closeInventory(EntityPlayer player) - { - - } - - @Override - public boolean isItemValidForSlot(int index, ItemStack stack) - { - return true; - } - - @Override - public int getField(int id) - { - return 0; - } - - @Override - public void setField(int id, int value) - { - - } - - @Override - public int getFieldCount() - { - return 0; - } - - @Override - public void clear() - { - this.inventory = new ItemStack[size]; - } - - @Override - public String getName() - { - return name; - } - - @Override - public boolean hasCustomName() - { - return false; - } - - @Override - public ITextComponent getDisplayName() - { - return new TextComponentString(getName()); - } - - @Override - public void markDirty() - { - if (masterStack != null) - { - this.writeToStack(masterStack); - } - } - - public boolean canInventoryBeManipulated() - { - return masterStack != null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/inventory/package-info.java b/src/main/java/WayofTime/bloodmagic/item/inventory/package-info.java deleted file mode 100644 index 3b114989..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/inventory/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.inventory; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/package-info.java b/src/main/java/WayofTime/bloodmagic/item/package-info.java deleted file mode 100644 index 71e26b95..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/routing/IItemFilterProvider.java b/src/main/java/WayofTime/bloodmagic/item/routing/IItemFilterProvider.java deleted file mode 100644 index 57e1c19e..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/routing/IItemFilterProvider.java +++ /dev/null @@ -1,13 +0,0 @@ -package WayofTime.bloodmagic.item.routing; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.routing.IItemFilter; - -public interface IItemFilterProvider -{ - IItemFilter getInputItemFilter(ItemStack stack, TileEntity tile, IItemHandler handler); - - IItemFilter getOutputItemFilter(ItemStack stack, TileEntity tile, IItemHandler handler); -} diff --git a/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java b/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java deleted file mode 100644 index d3e96eac..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java +++ /dev/null @@ -1,223 +0,0 @@ -package WayofTime.bloodmagic.item.routing; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.INodeRenderer; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.routing.IMasterRoutingNode; -import WayofTime.bloodmagic.routing.IRoutingNode; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -public class ItemNodeRouter extends Item implements INodeRenderer, IVariantProvider -{ - public ItemNodeRouter() - { - setUnlocalizedName(Constants.Mod.MODID + ".nodeRouter"); - setMaxStackSize(1); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - NBTTagCompound tag = stack.getTagCompound(); - BlockPos coords = getBlockPos(stack); - - if (coords != null && tag != null) - { - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.coords", coords.getX(), coords.getY(), coords.getZ())); - } - } - - @Override - public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) - { - if (world.isRemote) - { - return EnumActionResult.PASS; - } - - TileEntity tileHit = world.getTileEntity(pos); - - if (!(tileHit instanceof IRoutingNode)) - { - // TODO: Remove contained position? - BlockPos containedPos = getBlockPos(stack); - if (!containedPos.equals(BlockPos.ORIGIN)) - { - this.setBlockPos(stack, BlockPos.ORIGIN); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.remove")); - return EnumActionResult.FAIL; - } - return EnumActionResult.FAIL; - } - IRoutingNode node = (IRoutingNode) tileHit; - BlockPos containedPos = getBlockPos(stack); - if (containedPos.equals(BlockPos.ORIGIN)) - { - this.setBlockPos(stack, pos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.set")); - return EnumActionResult.SUCCESS; - } else - { - TileEntity pastTile = world.getTileEntity(containedPos); - if (pastTile instanceof IRoutingNode) - { - IRoutingNode pastNode = (IRoutingNode) pastTile; - if (pastNode instanceof IMasterRoutingNode) - { - IMasterRoutingNode master = (IMasterRoutingNode) pastNode; - - if (!node.isMaster(master)) - { - if (node.getMasterPos().equals(BlockPos.ORIGIN)) //If the node is not the master and it is receptive - { - node.connectMasterToRemainingNode(world, new LinkedList(), master); - master.addConnection(pos, containedPos); - master.addNodeToList(node); - node.addConnection(containedPos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link.master")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } - } else - { - master.addConnection(pos, containedPos); - node.addConnection(containedPos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link.master")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } - - } else if (node instanceof IMasterRoutingNode) - { - IMasterRoutingNode master = (IMasterRoutingNode) node; - - if (!pastNode.isMaster(master)) - { - if (pastNode.getMasterPos().equals(BlockPos.ORIGIN)) //TODO: This is where the issue is - { - pastNode.connectMasterToRemainingNode(world, new LinkedList(), master); - master.addConnection(pos, containedPos); - pastNode.addConnection(pos); - master.addNodeToList(pastNode); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link.master")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } - } else - { - master.addConnection(pos, containedPos); - pastNode.addConnection(pos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link.master")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } - } else - { - //Both nodes are not master nodes, so normal linking - if (pastNode.getMasterPos().equals(node.getMasterPos())) - { - if (!pastNode.getMasterPos().equals(BlockPos.ORIGIN)) - { - TileEntity testTile = world.getTileEntity(pastNode.getMasterPos()); - if (testTile instanceof IMasterRoutingNode) - { - IMasterRoutingNode master = (IMasterRoutingNode) testTile; - master.addConnection(pos, containedPos); - } - } - pastNode.addConnection(pos); - node.addConnection(containedPos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } else if (pastNode.getMasterPos().equals(BlockPos.ORIGIN)) //pastNode is not connected to a master, but node is - { - TileEntity tile = world.getTileEntity(node.getMasterPos()); - if (tile instanceof IMasterRoutingNode) - { - IMasterRoutingNode master = (IMasterRoutingNode) tile; - master.addConnection(pos, containedPos); - master.addNodeToList(pastNode); - pastNode.connectMasterToRemainingNode(world, new LinkedList(), master); - } - pastNode.addConnection(pos); - node.addConnection(containedPos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } else if (node.getMasterPos().equals(BlockPos.ORIGIN)) //node is not connected to a master, but pastNode is - { - TileEntity tile = world.getTileEntity(pastNode.getMasterPos()); - if (tile instanceof IMasterRoutingNode) - { - IMasterRoutingNode master = (IMasterRoutingNode) tile; - master.addConnection(pos, containedPos); - master.addNodeToList(node); - node.connectMasterToRemainingNode(world, new LinkedList(), master); - } - pastNode.addConnection(pos); - node.addConnection(containedPos); - ChatUtil.sendChat(player, TextHelper.localize("chat.BloodMagic.routing.link")); - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } else - { - this.setBlockPos(stack, BlockPos.ORIGIN); - return EnumActionResult.SUCCESS; - } - } - } - } - - return EnumActionResult.FAIL; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } - - public BlockPos getBlockPos(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - return new BlockPos(stack.getTagCompound().getInteger(Constants.NBT.X_COORD), stack.getTagCompound().getInteger(Constants.NBT.Y_COORD), stack.getTagCompound().getInteger(Constants.NBT.Z_COORD)); - } - - public ItemStack setBlockPos(ItemStack stack, BlockPos pos) - { - NBTHelper.checkNBT(stack); - NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - return stack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java b/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java deleted file mode 100644 index 3ff83caa..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java +++ /dev/null @@ -1,167 +0,0 @@ -package WayofTime.bloodmagic.item.routing; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraftforge.items.IItemHandler; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.item.inventory.ItemInventory; -import WayofTime.bloodmagic.routing.DefaultItemFilter; -import WayofTime.bloodmagic.routing.IItemFilter; -import WayofTime.bloodmagic.routing.IgnoreNBTItemFilter; -import WayofTime.bloodmagic.routing.ModIdItemFilter; -import WayofTime.bloodmagic.routing.OreDictItemFilter; -import WayofTime.bloodmagic.routing.TestItemFilter; -import WayofTime.bloodmagic.util.GhostItemHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemRouterFilter extends Item implements IItemFilterProvider, IVariantProvider -{ - public static String[] names = { "exact", "ignoreNBT", "modItems", "oreDict" }; - - public ItemRouterFilter() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".itemFilter."); - setHasSubtypes(true); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.add(TextHelper.localize("tooltip.BloodMagic.itemFilter." + names[stack.getItemDamage()])); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public IItemFilter getInputItemFilter(ItemStack filterStack, TileEntity tile, IItemHandler handler) - { - IItemFilter testFilter = new TestItemFilter(); - - switch (filterStack.getMetadata()) - { - case 0: - testFilter = new TestItemFilter(); - break; - case 1: - testFilter = new IgnoreNBTItemFilter(); - break; - case 2: - testFilter = new ModIdItemFilter(); - break; - case 3: - testFilter = new OreDictItemFilter(); - break; - - default: - testFilter = new DefaultItemFilter(); - } - - List filteredList = new ArrayList(); - ItemInventory inv = new ItemInventory(filterStack, 9, ""); - for (int i = 0; i < inv.getSizeInventory(); i++) - { - ItemStack stack = inv.getStackInSlot(i); - if (stack == null) - { - continue; - } - - ItemStack ghostStack = GhostItemHelper.getStackFromGhost(stack); - - filteredList.add(ghostStack); - } - - testFilter.initializeFilter(filteredList, tile, handler, false); - return testFilter; - } - - @Override - public IItemFilter getOutputItemFilter(ItemStack filterStack, TileEntity tile, IItemHandler handler) - { - IItemFilter testFilter = new TestItemFilter(); - - switch (filterStack.getMetadata()) - { - case 0: - testFilter = new TestItemFilter(); - break; - case 1: - testFilter = new IgnoreNBTItemFilter(); - break; - case 2: - testFilter = new ModIdItemFilter(); - break; - case 3: - testFilter = new OreDictItemFilter(); - break; - - default: - testFilter = new DefaultItemFilter(); - } - - List filteredList = new ArrayList(); - ItemInventory inv = new ItemInventory(filterStack, 9, ""); //TODO: Change to grab the filter from the Item later. - for (int i = 0; i < inv.getSizeInventory(); i++) - { - ItemStack stack = inv.getStackInSlot(i); - if (stack == null) - { - continue; - } - - ItemStack ghostStack = GhostItemHelper.getStackFromGhost(stack); - if (ghostStack.stackSize == 0) - { - ghostStack.stackSize = Integer.MAX_VALUE; - } - - filteredList.add(ghostStack); - } - - testFilter.initializeFilter(filteredList, tile, handler, true); - return testFilter; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=exact")); - ret.add(new ImmutablePair(1, "type=ignorenbt")); - ret.add(new ImmutablePair(2, "type=moditems")); - ret.add(new ImmutablePair(3, "type=oredict")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/routing/package-info.java b/src/main/java/WayofTime/bloodmagic/item/routing/package-info.java deleted file mode 100644 index 02b38ed2..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/routing/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.routing; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilAir.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilAir.java deleted file mode 100644 index 7908a6b8..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilAir.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.registry.ModPotions; - -public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectProvider -{ - public ItemSigilAir() - { - super("air", 50); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - boolean unusable = isUnusable(stack); - if (world.isRemote && !unusable) - { - Vec3d vec = player.getLookVec(); - double wantedVelocity = 1.7; - - // TODO - Revisit after potions - if (player.isPotionActive(ModPotions.boost)) - { - int amplifier = player.getActivePotionEffect(ModPotions.boost).getAmplifier(); - wantedVelocity += (1 + amplifier) * (0.35); - } - - player.motionX = vec.xCoord * wantedVelocity; - player.motionY = vec.yCoord * wantedVelocity; - player.motionZ = vec.zCoord * wantedVelocity; - world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - } - - if (!world.isRemote) - { - if (!player.capabilities.isCreativeMode) - this.setUnusable(stack, !NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())); - - if (!unusable) - player.fallDistance = 0; - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean applyOnHitEffect(EnumDemonWillType type, ItemStack swordStack, ItemStack providerStack, EntityLivingBase attacker, EntityLivingBase target) - { - target.addPotionEffect(new PotionEffect(MobEffects.LEVITATION, 200, 0)); - return true; - } - - @Override - public boolean providesEffectForWill(EnumDemonWillType type) - { - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java deleted file mode 100644 index 99c4ea50..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java +++ /dev/null @@ -1,70 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.impl.ItemSigil; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import com.google.common.base.Strings; -import lombok.Getter; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; - -@Getter -public class ItemSigilBase extends ItemSigil implements IVariantProvider -{ - protected final String tooltipBase; - private final String name; - - public ItemSigilBase(String name, int lpUsed) - { - super(lpUsed); - - setUnlocalizedName(Constants.Mod.MODID + ".sigil." + name); - setCreativeTab(BloodMagic.tabBloodMagic); - - this.name = name; - this.tooltipBase = "tooltip.BloodMagic.sigil." + name + "."; - } - - public ItemSigilBase(String name) - { - this(name, 0); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (TextHelper.canTranslate(tooltipBase + "desc")) - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect(tooltipBase + "desc")))); - - if (!stack.hasTagCompound()) - return; - - if (!Strings.isNullOrEmpty(getOwnerName(stack))) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromStack(stack))); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java deleted file mode 100644 index fcfe44dd..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.entity.projectile.EntityBloodLight; -import WayofTime.bloodmagic.registry.ModBlocks; - -public class ItemSigilBloodLight extends ItemSigilBase -{ - public ItemSigilBloodLight() - { - super("bloodLight", 10); - } - - @Override - public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) - { - if (getCooldownRemainder(stack) > 0) - reduceCooldown(stack); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - RayTraceResult mop = this.rayTrace(world, player, false); - - if (getCooldownRemainder(stack) > 0) - return super.onItemRightClick(stack, world, player, hand); - - if (mop != null && mop.typeOfHit == RayTraceResult.Type.BLOCK) - { - BlockPos blockPos = mop.getBlockPos().offset(mop.sideHit); - - if (world.isAirBlock(blockPos)) - { - world.setBlockState(blockPos, ModBlocks.BLOOD_LIGHT.getDefaultState()); - if (!world.isRemote) - NetworkHelper.syphonAndDamage(NetworkHelper.getSoulNetwork(player), player, getLpUsed()); - resetCooldown(stack); - player.swingArm(hand); - return super.onItemRightClick(stack, world, player, hand); - } - } else - { - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityBloodLight(world, player)); - NetworkHelper.syphonAndDamage(NetworkHelper.getSoulNetwork(player), player, getLpUsed()); - } - resetCooldown(stack); - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return oldStack.getItem() != newStack.getItem(); - } - - public int getCooldownRemainder(ItemStack stack) - { - return NBTHelper.checkNBT(stack).getTagCompound().getInteger(Constants.NBT.TICKS_REMAINING); - } - - public void reduceCooldown(ItemStack stack) - { - NBTHelper.checkNBT(stack).getTagCompound().setInteger(Constants.NBT.TICKS_REMAINING, getCooldownRemainder(stack) - 1); - } - - public void resetCooldown(ItemStack stack) - { - NBTHelper.checkNBT(stack).getTagCompound().setInteger(Constants.NBT.TICKS_REMAINING, 10); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBounce.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBounce.java deleted file mode 100644 index 997f79f1..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBounce.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.registry.ModPotions; - -public class ItemSigilBounce extends ItemSigilToggleableBase -{ - public ItemSigilBounce() - { - super("bounce", 100); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - player.addPotionEffect(new PotionEffect(ModPotions.bounce, 2, 0, true, false)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilClaw.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilClaw.java deleted file mode 100644 index e2778691..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilClaw.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.registry.ModPotions; - -public class ItemSigilClaw extends ItemSigilToggleableBase -{ - public ItemSigilClaw() - { - super("claw", 100); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - player.addPotionEffect(new PotionEffect(ModPotions.cling, 2, 0, true, false)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilCompression.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilCompression.java deleted file mode 100644 index 6cc0eeb8..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilCompression.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.compress.CompressionRegistry; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class ItemSigilCompression extends ItemSigilToggleableBase -{ - public ItemSigilCompression() - { - super("compression", 200); - } - - // TODO REWRITE all compression stuff if someone has time - // TODO for now, there is a semi-working system in place - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - ItemStack compressedStack = CompressionRegistry.compressInventory(player.inventory.mainInventory, world); - - if (compressedStack != null) - { - EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, compressedStack); - world.spawnEntityInWorld(entityItem); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilDivination.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilDivination.java deleted file mode 100644 index 5a4af378..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilDivination.java +++ /dev/null @@ -1,104 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.iface.IAltarReader; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.tile.TileIncenseAltar; -import WayofTime.bloodmagic.tile.TileInversionPillar; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.NumeralHelper; - -public class ItemSigilDivination extends ItemSigilBase implements IAltarReader -{ - public ItemSigilDivination() - { - super("divination"); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { -// if (world instanceof WorldServer) -// { -// System.out.println("Testing..."); -//// BuildTestStructure s = new BuildTestStructure(); -//// s.placeStructureAtPosition(new Random(), Rotation.CLOCKWISE_180, (WorldServer) world, player.getPosition(), 0); -// DungeonTester.testDungeonElementWithOutput((WorldServer) world, player.getPosition()); -// } - -// if (!world.isRemote) -// { -// EntityCorruptedSheep fred = new EntityCorruptedSheep(world, EnumDemonWillType.DESTRUCTIVE); -// fred.setPosition(player.posX, player.posY, player.posZ); -// world.spawnEntityInWorld(fred); -// } - - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote) - { - super.onItemRightClick(stack, world, player, hand); - - RayTraceResult position = rayTrace(world, player, false); - - if (position == null) - { - int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence(); - List toSend = new ArrayList(); - if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player))) - toSend.add(new TextComponentTranslation(tooltipBase + "otherNetwork", getOwnerName(stack))); - toSend.add(new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence)); - ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()])); - } else - { - if (position.typeOfHit == RayTraceResult.Type.BLOCK) - { - TileEntity tile = world.getTileEntity(position.getBlockPos()); - - if (tile != null && tile instanceof IBloodAltar) - { - IBloodAltar altar = (IBloodAltar) tile; - int tier = altar.getTier().ordinal() + 1; - int currentEssence = altar.getCurrentBlood(); - int capacity = altar.getCapacity(); - altar.checkTier(); - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity)); - } else if (tile != null && tile instanceof TileIncenseAltar) - { - TileIncenseAltar altar = (TileIncenseAltar) tile; - altar.recheckConstruction(); - double tranquility = altar.tranquility; - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TextComponentTranslation(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition))); - } else if (tile != null && tile instanceof TileInversionPillar) - { - TileInversionPillar pillar = (TileInversionPillar) tile; - double inversion = pillar.getCurrentInversion(); - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentInversion", ((int) (10 * inversion)) / 10d)); - } else - - { - int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence(); - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence)); - } - } - } - } - - return super.onItemRightClick(stack, world, player, hand); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilElementalAffinity.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilElementalAffinity.java deleted file mode 100644 index 45d0f5bf..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilElementalAffinity.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -public class ItemSigilElementalAffinity extends ItemSigilToggleableBase -{ - public ItemSigilElementalAffinity() - { - super("elementalAffinity", 200); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - player.fallDistance = 0; - player.extinguish(); - player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 2, 1, true, false)); - player.addPotionEffect(new PotionEffect(MobEffects.WATER_BREATHING, 2, 0, true, false)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilEnderSeverance.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilEnderSeverance.java deleted file mode 100644 index 20a869f2..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilEnderSeverance.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.List; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.registry.ModPotions; - -public class ItemSigilEnderSeverance extends ItemSigilToggleableBase -{ - public ItemSigilEnderSeverance() - { - super("enderSeverance", 200); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - List entityList = world.getEntitiesWithinAABB(Entity.class, new net.minecraft.util.math.AxisAlignedBB(player.posX - 4.5, player.posY - 4.5, player.posZ - 4.5, player.posX + 4.5, player.posY + 4.5, player.posZ + 4.5)); - for (Entity entity : entityList) - { - if (entity instanceof EntityEnderman) - ((EntityEnderman) entity).addPotionEffect(new PotionEffect(ModPotions.planarBinding, 40, 0)); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFastMiner.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFastMiner.java deleted file mode 100644 index 6b99eb6d..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFastMiner.java +++ /dev/null @@ -1,60 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.List; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class ItemSigilFastMiner extends ItemSigilToggleableBase -{ - public ItemSigilFastMiner() - { - super("fastMiner", 100); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - player.addPotionEffect(new PotionEffect(MobEffects.HASTE, 2, 0, true, false)); - } - - @Override - public boolean performArrayEffect(World world, BlockPos pos) - { - double radius = 10; - int ticks = 600; - int potionPotency = 2; - - AxisAlignedBB bb = new AxisAlignedBB(pos).expandXyz(radius); - List playerList = world.getEntitiesWithinAABB(EntityPlayer.class, bb); - for (EntityPlayer player : playerList) - { - if (!player.isPotionActive(MobEffects.HASTE) || (player.isPotionActive(MobEffects.HASTE) && player.getActivePotionEffect(MobEffects.HASTE).getAmplifier() < potionPotency)) - { - player.addPotionEffect(new PotionEffect(MobEffects.HASTE, ticks, potionPotency)); - if (!player.capabilities.isCreativeMode) - { - player.hurtResistantTime = 0; - player.attackEntityFrom(BloodMagicAPI.getDamageSource(), 1.0F); - } - } - } - - return false; - } - - @Override - public boolean hasArrayEffect() - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFilledHand.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFilledHand.java deleted file mode 100644 index 3f99aa2c..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFilledHand.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import WayofTime.bloodmagic.util.handler.event.GenericHandler; - -public class ItemSigilFilledHand extends ItemSigilToggleableBase -{ - public ItemSigilFilledHand() - { - super("hand", 100); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - GenericHandler.filledHandMap.put(player, 4); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFrost.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFrost.java deleted file mode 100644 index 990b0040..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilFrost.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.enchantment.EnchantmentFrostWalker; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class ItemSigilFrost extends ItemSigilToggleableBase -{ - public ItemSigilFrost() - { - super("frost", 100); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - EnchantmentFrostWalker.freezeNearby(player, world, player.getPosition(), 1); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilGreenGrove.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilGreenGrove.java deleted file mode 100644 index 38631787..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilGreenGrove.java +++ /dev/null @@ -1,113 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.block.Block; -import net.minecraft.block.IGrowable; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.BonemealEvent; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import WayofTime.bloodmagic.api.BloodMagicAPI; - -public class ItemSigilGreenGrove extends ItemSigilToggleableBase -{ - public ItemSigilGreenGrove() - { - super("greenGrove", 150); - } - - @Override - public boolean onSigilUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (PlayerHelper.isFakePlayer(player)) - return false; - - if (applyBonemeal(world, blockPos, player)) - { - if (!world.isRemote) - { - world.playEvent(2005, blockPos, 0); - } - return true; - } - - return false; - } - - @Override - public void onSigilUpdate(ItemStack stack, World worldIn, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - int range = 3; - int verticalRange = 2; - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) - { - BlockPos blockPos = new BlockPos(ix, iy, iz); - Block block = worldIn.getBlockState(blockPos).getBlock(); - - if (!BloodMagicAPI.getGreenGroveBlacklist().contains(block)) - { - if (block instanceof IPlantable || block instanceof IGrowable) - { - if (worldIn.rand.nextInt(50) == 0) - { - IBlockState preBlockState = worldIn.getBlockState(blockPos); - block.updateTick(worldIn, blockPos, worldIn.getBlockState(blockPos), worldIn.rand); - - IBlockState newState = worldIn.getBlockState(blockPos); - if (!newState.equals(preBlockState) && !worldIn.isRemote) - worldIn.playEvent(2005, blockPos, 0); - } - } - } - } - } - } - } - - private boolean applyBonemeal(World worldIn, BlockPos target, EntityPlayer player) - { - IBlockState iblockstate = worldIn.getBlockState(target); - - BonemealEvent event = new BonemealEvent(player, worldIn, target, iblockstate); - if (MinecraftForge.EVENT_BUS.post(event)) - return false; - else if (event.getResult() == Result.ALLOW) - return true; - - if (iblockstate.getBlock() instanceof IGrowable) - { - IGrowable igrowable = (IGrowable) iblockstate.getBlock(); - - if (igrowable.canGrow(worldIn, target, iblockstate, worldIn.isRemote)) - { - if (!worldIn.isRemote) - { - if (igrowable.canUseBonemeal(worldIn, worldIn.rand, target, iblockstate)) - igrowable.grow(worldIn, worldIn.rand, target, iblockstate); - } - return true; - } - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilHaste.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilHaste.java deleted file mode 100644 index 3eaf082a..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilHaste.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.registry.ModPotions; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -public class ItemSigilHaste extends ItemSigilToggleableBase -{ - public ItemSigilHaste() - { - super("haste", 250); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - player.addPotionEffect(new PotionEffect(ModPotions.boost, 2, 0, true, false)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilHolding.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilHolding.java deleted file mode 100644 index 5214d64a..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilHolding.java +++ /dev/null @@ -1,339 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.Collections; -import java.util.List; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.client.key.KeyBindings; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IAltarReader; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.client.key.IKeybindable; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.base.Strings; - -public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAltarReader -{ - public static final int inventorySize = 5; - - public ItemSigilHolding() - { - super("holding"); - } - - @Override - public void onKeyPressed(ItemStack stack, EntityPlayer player, KeyBindings key, boolean showInChat) - { - if (stack == player.getHeldItemMainhand() && stack.getItem() instanceof ItemSigilHolding && key.equals(KeyBindings.OPEN_HOLDING)) - { - Utils.setUUID(stack); - player.openGui(BloodMagic.instance, Constants.Gui.SIGIL_HOLDING_GUI, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); - } - } - - @Override - public String getHighlightTip(ItemStack stack, String displayName) - { - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - return displayName; - - int currentSlot = getCurrentItemOrdinal(stack); - ItemStack item = inv[currentSlot]; - - if (item == null) - return displayName; - else - return TextHelper.localizeEffect("item.BloodMagic.sigil.holding.display", displayName, item.getDisplayName()); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - super.addInformation(stack, player, tooltip, advanced); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.holding.press", KeyBindings.OPEN_HOLDING.getKey().getDisplayName())); - - if (!stack.hasTagCompound()) - return; - - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - return; - - int currentSlot = getCurrentItemOrdinal(stack); - ItemStack item = inv[currentSlot]; - - for (int i = 0; i < inventorySize; i++) - { - if (inv[i] != null) - if (item != null && inv[i] == item) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.holding.sigilInSlot", i + 1, "&o&n" + inv[i].getDisplayName())); - else - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.holding.sigilInSlot", i + 1, inv[i].getDisplayName())); - } - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) - { - if (PlayerHelper.isFakePlayer(playerIn)) - return EnumActionResult.FAIL; - - int currentSlot = getCurrentItemOrdinal(stack); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - return EnumActionResult.PASS; - - ItemStack itemUsing = inv[currentSlot]; - - if (itemUsing == null || Strings.isNullOrEmpty(((IBindable) itemUsing.getItem()).getOwnerUUID(itemUsing))) - return EnumActionResult.PASS; - - EnumActionResult result = itemUsing.getItem().onItemUse(itemUsing, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ); - saveInventory(stack, inv); - - return result; - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - int currentSlot = getCurrentItemOrdinal(stack); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - return ActionResult.newResult(EnumActionResult.PASS, stack); - - ItemStack itemUsing = inv[currentSlot]; - - if (itemUsing == null || Strings.isNullOrEmpty(((IBindable) itemUsing.getItem()).getOwnerUUID(itemUsing))) - return ActionResult.newResult(EnumActionResult.PASS, stack); - - itemUsing.getItem().onItemRightClick(itemUsing, world, player, hand); - - saveInventory(stack, inv); - - return ActionResult.newResult(EnumActionResult.PASS, stack); - } - - public void saveInventory(ItemStack itemStack, ItemStack[] inventory) - { - NBTTagCompound itemTag = itemStack.getTagCompound(); - - if (itemTag == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < inventorySize; i++) - { - if (inventory[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte(Constants.NBT.SLOT, (byte) i); - inventory[i].writeToNBT(tag); - itemList.appendTag(tag); - } - } - - itemTag.setTag(Constants.NBT.ITEMS, itemList); - } - - @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int itemSlot, boolean isSelected) - { - if (itemStack.getTagCompound() != null) - { - this.tickInternalInventory(itemStack, world, entity, itemSlot, isSelected); - } - } - - public void tickInternalInventory(ItemStack itemStack, World world, Entity entity, int itemSlot, boolean isSelected) - { - ItemStack[] inv = getInternalInventory(itemStack); - - if (inv == null) - { - return; - } - - for (int i = 0; i < inventorySize; i++) - { - if (inv[i] == null) - { - continue; - } - - inv[i].getItem().onUpdate(inv[i], world, entity, itemSlot, isSelected); - } - } - - public static int next(int mode) - { - int index = mode + 1; - - if (index >= inventorySize) - { - index = 0; - } - - return index; - } - - public static int prev(int mode) - { - int index = mode - 1; - - if (index < 0) - { - index = inventorySize; - } - - return index; - } - - private static void initModeTag(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack = NBTHelper.checkNBT(itemStack); - itemStack.getTagCompound().setInteger(Constants.NBT.CURRENT_SIGIL, inventorySize); - } - } - - public static ItemStack getItemStackInSlot(ItemStack itemStack, int slot) - { - if (itemStack.getItem() instanceof ItemSigilHolding) - { - ItemStack[] itemStacks = getInternalInventory(itemStack); - if (itemStacks != null) - return itemStacks[slot == 5 ? 4 : slot]; - else - return null; - } - - return null; - } - - public static int getCurrentItemOrdinal(ItemStack itemStack) - { - if (itemStack.getItem() instanceof ItemSigilHolding) - { - initModeTag(itemStack); - int currentSigil = itemStack.getTagCompound().getInteger(Constants.NBT.CURRENT_SIGIL); - currentSigil = MathHelper.clamp_int(currentSigil, 0, inventorySize - 1); - return currentSigil; - } - - return 0; - } - - public static ItemStack[] getInternalInventory(ItemStack itemStack) - { - initModeTag(itemStack); - NBTTagCompound tagCompound = itemStack.getTagCompound(); - - if (tagCompound == null) - { - return null; - } - - NBTTagList tagList = tagCompound.getTagList(Constants.NBT.ITEMS, 10); - - if (tagList == null) - { - return null; - } - - ItemStack[] inv = new ItemStack[inventorySize]; - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound data = tagList.getCompoundTagAt(i); - byte j = data.getByte(Constants.NBT.SLOT); - - if (j >= 0 && j < inv.length) - { - inv[j] = ItemStack.loadItemStackFromNBT(data); - } - } - - return inv; - } - - public static void cycleToNextSigil(ItemStack itemStack, int mode) - { - if (itemStack.getItem() instanceof ItemSigilHolding) - { - initModeTag(itemStack); - - int index = mode; - if (mode == 120 || mode == -120) - { - int currentIndex = getCurrentItemOrdinal(itemStack); - ItemStack currentItemStack = getItemStackInSlot(itemStack, currentIndex); - if (currentItemStack == null) - return; - if (mode < 0) - { - index = next(currentIndex); - currentItemStack = getItemStackInSlot(itemStack, index); - - while (currentItemStack == null) - { - index = next(index); - currentItemStack = getItemStackInSlot(itemStack, index); - } - } else - { - index = prev(currentIndex); - currentItemStack = getItemStackInSlot(itemStack, index); - - while (currentItemStack == null) - { - index = prev(index); - currentItemStack = getItemStackInSlot(itemStack, index); - } - } - } - - itemStack.getTagCompound().setInteger(Constants.NBT.CURRENT_SIGIL, index); - } - } - - @Override - public List> getVariants() - { - return Collections.emptyList(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java deleted file mode 100644 index 51846c0f..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java +++ /dev/null @@ -1,129 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.event.ForgeEventFactory; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.bloodmagic.api.Constants; - -public class ItemSigilLava extends ItemSigilBase -{ - public ItemSigilLava() - { - super("lava", 1000); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote && !isUnusable(stack)) - { - RayTraceResult rayTrace = this.rayTrace(world, player, false); - - if (rayTrace != null) - { - ActionResult ret = ForgeEventFactory.onBucketUse(player, world, stack, rayTrace); - if (ret != null) - return ret; - - if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) - { - BlockPos blockpos = rayTrace.getBlockPos(); - - if (!world.isBlockModifiable(player, blockpos)) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack)) - { - return super.onItemRightClick(stack, world, player, hand); - } - - BlockPos blockpos1 = blockpos.offset(rayTrace.sideHit); - - if (!player.canPlayerEdit(blockpos1, rayTrace.sideHit, stack)) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (this.canPlaceLava(world, blockpos1) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && this.tryPlaceLava(world, blockpos1)) - { - return super.onItemRightClick(stack, world, player, hand); - } - } - } - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote || player.isSneaking() || isUnusable(stack)) - { - return EnumActionResult.FAIL; - } - if (!world.canMineBlockBody(player, blockPos)) - { - return EnumActionResult.FAIL; - } - - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof IFluidHandler) - { - FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000); - int amount = ((IFluidHandler) tile).fill(side, fluid, false); - - if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - ((IFluidHandler) tile).fill(side, fluid, true); - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } - - return EnumActionResult.FAIL; - } - - public boolean canPlaceLava(World world, BlockPos blockPos) - { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isSolid()) - { - return false; - } else if ((world.getBlockState(blockPos).getBlock() == Blocks.LAVA || world.getBlockState(blockPos).getBlock() == Blocks.FLOWING_LAVA) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0) - { - return false; - } else - { - world.setBlockState(blockPos, Blocks.FLOWING_LAVA.getBlockState().getBaseState(), 3); - return true; - } - } - - public boolean tryPlaceLava(World world, BlockPos pos) - { - Material material = world.getBlockState(pos).getBlock().getMaterial(world.getBlockState(pos)); - - return world.isAirBlock(pos) && !material.isSolid(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilMagnetism.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilMagnetism.java deleted file mode 100644 index 5ab19bc1..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilMagnetism.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.List; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.world.World; - -public class ItemSigilMagnetism extends ItemSigilToggleableBase -{ - public ItemSigilMagnetism() - { - super("magnetism", 50); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - int range = 5; - int verticalRange = 5; - float posX = Math.round(player.posX); - float posY = (float) (player.posY - player.getEyeHeight()); - float posZ = Math.round(player.posZ); - List entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); - List xpOrbs = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); - - for (EntityItem entity : entities) - { - if (entity != null && !world.isRemote && !entity.isDead) - { - entity.onCollideWithPlayer(player); - } - } - - for (EntityXPOrb xpOrb : xpOrbs) - { - if (xpOrb != null && !world.isRemote) - { - xpOrb.onCollideWithPlayer(player); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilPhantomBridge.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilPhantomBridge.java deleted file mode 100644 index 9dfeaec3..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilPhantomBridge.java +++ /dev/null @@ -1,102 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.HashMap; -import java.util.Map; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.registry.ModBlocks; - -public class ItemSigilPhantomBridge extends ItemSigilToggleableBase -{ - private Map> prevPositionMap = new HashMap>(); - private double expansionFactor = 2; - private int range = 3; - - public ItemSigilPhantomBridge() - { - super("phantomBridge", 100); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - if (!prevPositionMap.containsKey(player)) - { - prevPositionMap.put(player, Pair.of(player.posX, player.posZ)); - } - - if ((!player.onGround && !player.isRiding()) && !player.isSneaking()) - { - prevPositionMap.put(player, Pair.of(player.posX, player.posZ)); - return; - } - - int verticalOffset = -1; - - if (player.isSneaking()) - verticalOffset--; - - Pair prevPosition = prevPositionMap.get(player); - - double playerVelX = player.posX - prevPosition.getLeft(); - double playerVelZ = player.posZ - prevPosition.getRight(); - - double totalVel = Math.sqrt(playerVelX * playerVelX + playerVelZ * playerVelZ); - if (totalVel > 2) - { - //I am SURE you are teleporting! - playerVelX = 0; - playerVelZ = 0; - totalVel = 0; - } - - BlockPos playerPos = player.getPosition(); - int posX = playerPos.getX(); - int posY = playerPos.getY(); - int posZ = playerPos.getZ(); - - double offsetPosX = posX + expansionFactor * playerVelX; - double offsetPosZ = posZ + expansionFactor * playerVelZ; - double avgX = (posX + offsetPosX) / 2; - double avgZ = (posZ + offsetPosZ) / 2; - - double C = 2 * (range + expansionFactor * totalVel) + 1; - int truncC = (int) C; - - //TODO: Make this for-loop better. - for (int ix = -truncC; ix <= truncC; ix++) - { - for (int iz = -truncC; iz <= truncC; iz++) - { - if (computeEllipse(ix + avgX, iz + avgZ, posX, posZ, offsetPosX, offsetPosZ) > C) - { - continue; - } - - BlockPos blockPos = new BlockPos(ix + posX, posY + verticalOffset, iz + posZ); - - if (world.isAirBlock(blockPos)) - world.setBlockState(blockPos, ModBlocks.PHANTOM_BLOCK.getDefaultState()); - } - } - - prevPositionMap.put(player, Pair.of(player.posX, player.posZ)); - } - - public static double computeEllipse(double x, double z, double focusX1, double focusZ1, double focusX2, double focusZ2) - { - return Math.sqrt((x - focusX1) * (x - focusX1) + (z - focusZ1) * (z - focusZ1)) + Math.sqrt((x - focusX2) * (x - focusX2) + (z - focusZ2) * (z - focusZ2)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSeer.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSeer.java deleted file mode 100644 index 818a440b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSeer.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.ArrayList; -import java.util.List; - -import WayofTime.bloodmagic.util.helper.NumeralHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.iface.IAltarReader; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.tile.TileIncenseAltar; -import WayofTime.bloodmagic.util.ChatUtil; - -public class ItemSigilSeer extends ItemSigilBase implements IAltarReader -{ - public ItemSigilSeer() - { - super("seer"); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote) - { - super.onItemRightClick(stack, world, player, hand); - RayTraceResult rayTrace = rayTrace(world, player, false); - - if (rayTrace == null) - { - int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence(); - - List toSend = new ArrayList(); - if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player))) - toSend.add(new TextComponentTranslation(tooltipBase + "otherNetwork", getOwnerName(stack))); - toSend.add(new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence)); - ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()])); - } else - { - if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) - { - - TileEntity tile = world.getTileEntity(rayTrace.getBlockPos()); - - if (tile != null && tile instanceof IBloodAltar) - { - IBloodAltar altar = (IBloodAltar) tile; - int tier = altar.getTier().ordinal() + 1; - int currentEssence = altar.getCurrentBlood(); - int capacity = altar.getCapacity(); - int charge = altar.getTotalCharge(); - altar.checkTier(); - if (tile instanceof IInventory) - { - if (((IInventory) tile).getStackInSlot(0) != null) - { - int progress = altar.getProgress(); - int totalLiquidRequired = altar.getLiquidRequired() * ((IInventory) tile).getStackInSlot(0).stackSize; - int consumptionRate = (int) (altar.getConsumptionRate() * (altar.getConsumptionMultiplier() + 1)); - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarProgress", progress, totalLiquidRequired), new TextComponentTranslation(tooltipBase + "currentAltarConsumptionRate", consumptionRate), new TextComponentTranslation(tooltipBase + "currentAltarTier", tier), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity), new TextComponentTranslation(tooltipBase + "currentCharge", charge)); - } else - { - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity), new TextComponentTranslation(tooltipBase + "currentCharge", charge)); - } - } - } else if (tile != null && tile instanceof TileIncenseAltar) - { - TileIncenseAltar altar = (TileIncenseAltar) tile; - altar.recheckConstruction(); - double tranquility = altar.tranquility; - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TextComponentTranslation(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition))); - } else - { - int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence(); - ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence)); - } - } - } - } - - return super.onItemRightClick(stack, world, player, hand); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java deleted file mode 100644 index af684fe6..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.TileSpectralBlock; -import WayofTime.bloodmagic.util.Utils; -import net.minecraftforge.fluids.BlockFluidBase; - -public class ItemSigilSuppression extends ItemSigilToggleableBase -{ - public ItemSigilSuppression() - { - super("suppression", 400); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - int x = (int) player.posX; - int y = (int) player.posY; - int z = (int) player.posZ; - final int radius = 5; - final int refresh = 100; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - continue; - } - - BlockPos blockPos = new BlockPos(x + i, y + j, z + k); - IBlockState state = world.getBlockState(blockPos); - - // TODO - Change back when BlockFluidBase overrides getStateFromMeta() - // Temporary fix to avoid liquid duplication - if (state.getBlock() instanceof BlockFluidBase) {/*No-op*/} - else if (Utils.isBlockLiquid(state) && world.getTileEntity(blockPos) == null) - TileSpectralBlock.createSpectralBlock(world, blockPos, refresh); - else - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TileSpectralBlock) - ((TileSpectralBlock) tile).resetDuration(refresh); - } - } - } - } - } - -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java deleted file mode 100644 index a01999e3..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java +++ /dev/null @@ -1,94 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.List; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.teleport.TeleportQueue; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.ritual.portal.Teleports; -import WayofTime.bloodmagic.tile.TileTeleposer; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemSigilTeleposition extends ItemSigilBase -{ - public ItemSigilTeleposition() - { - super("teleposition"); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - super.addInformation(stack, player, tooltip, advanced); - - if (!stack.hasTagCompound()) - return; - NBTTagCompound tag = stack.getTagCompound(); - - if (tag != null && stack.getTagCompound().hasKey(Constants.NBT.DIMENSION_ID) && stack.getTagCompound().hasKey(Constants.NBT.X_COORD) && stack.getTagCompound().hasKey(Constants.NBT.Y_COORD) && stack.getTagCompound().hasKey(Constants.NBT.Z_COORD)) - { - tooltip.add(" "); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.coords", getValue(tag, Constants.NBT.X_COORD), getValue(tag, Constants.NBT.Y_COORD), getValue(tag, Constants.NBT.Z_COORD))); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.telepositionFocus.dimension", getValue(tag, Constants.NBT.DIMENSION_ID))); - } - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote && NBTHelper.checkNBT(stack) != null && stack.getTagCompound().hasKey(Constants.NBT.DIMENSION_ID) && stack.getTagCompound().hasKey(Constants.NBT.X_COORD) && stack.getTagCompound().hasKey(Constants.NBT.Y_COORD) && stack.getTagCompound().hasKey(Constants.NBT.Z_COORD)) - { - BlockPos blockPos = new BlockPos(getValue(stack.getTagCompound(), Constants.NBT.X_COORD), getValue(stack.getTagCompound(), Constants.NBT.Y_COORD), getValue(stack.getTagCompound(), Constants.NBT.Z_COORD)).up(); - if (world.provider.getDimension() == getValue(stack.getTagCompound(), Constants.NBT.DIMENSION_ID)) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(blockPos, player, getOwnerUUID(stack), true)); - } else - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(blockPos, player, getOwnerUUID(stack), world, getValue(stack.getTagCompound(), Constants.NBT.DIMENSION_ID), true)); - } - } - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (PlayerHelper.isFakePlayer(player)) - return EnumActionResult.FAIL; - - if (!world.isRemote && player.isSneaking() && NBTHelper.checkNBT(stack) != null) - { - if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileTeleposer) - { - stack.getTagCompound().setInteger(Constants.NBT.DIMENSION_ID, world.provider.getDimension()); - stack.getTagCompound().setInteger(Constants.NBT.X_COORD, pos.getX()); - stack.getTagCompound().setInteger(Constants.NBT.Y_COORD, pos.getY()); - stack.getTagCompound().setInteger(Constants.NBT.Z_COORD, pos.getZ()); - - return EnumActionResult.SUCCESS; - } - } - return EnumActionResult.FAIL; - } - - public int getValue(NBTTagCompound tag, String key) - { - return tag.getInteger(key); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleableBase.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleableBase.java deleted file mode 100644 index 26a98b4f..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleableBase.java +++ /dev/null @@ -1,78 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.ArrayList; -import java.util.List; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.impl.ItemSigilToggleable; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable; -import com.google.common.base.Strings; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.text.WordUtils; - -import javax.annotation.Nullable; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemSigilToggleableBase extends ItemSigilToggleable implements IMeshProvider -{ - protected final String tooltipBase; - private final String name; - - public ItemSigilToggleableBase(String name, int lpUsed) - { - super(lpUsed); - - setUnlocalizedName(Constants.Mod.MODID + ".sigil." + name); - setCreativeTab(BloodMagic.tabBloodMagic); - - this.name = name; - this.tooltipBase = "tooltip.BloodMagic.sigil." + name + "."; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - super.addInformation(stack, player, tooltip, advanced); - if (!stack.hasTagCompound()) - return; - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic." + (getActivated(stack) ? "activated" : "deactivated"))); - - if (!Strings.isNullOrEmpty(getOwnerName(stack))) - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromStack(stack))); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionActivatable("ItemSigil" + WordUtils.capitalize(name)); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - ret.add("active=false"); - ret.add("active=true"); - - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java deleted file mode 100644 index 04ae9a4b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java +++ /dev/null @@ -1,154 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import java.util.List; - -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntityMobSpawner; -import net.minecraft.util.*; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; - -public class ItemSigilTransposition extends ItemSigilBase -{ - public ItemSigilTransposition() - { - super("transposition", 1000); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - super.addInformation(stack, player, tooltip, advanced); - - if (!stack.hasTagCompound()) - return; - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) && tag.hasKey(Constants.NBT.CONTAINED_BLOCK_META)) - { - tooltip.add(" "); - BlockStack blockStack = new BlockStack(Block.getBlockFromName(tag.getString(Constants.NBT.CONTAINED_BLOCK_NAME)), tag.getByte(Constants.NBT.CONTAINED_BLOCK_META)); - tooltip.add(blockStack.getItemStack().getDisplayName()); - } - } - - @Override - public String getItemStackDisplayName(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) && tag.hasKey(Constants.NBT.CONTAINED_BLOCK_META)) - { - BlockStack blockStack = new BlockStack(ForgeRegistries.BLOCKS.getValue(new ResourceLocation(tag.getString(Constants.NBT.CONTAINED_BLOCK_NAME))), tag.getByte(Constants.NBT.CONTAINED_BLOCK_META)); - if (blockStack.getItemStack() != null && blockStack.getItemStack().getItem() != null) //TODO: Figure out why it's a null item. This is a patchwork solution. - { - return super.getItemStackDisplayName(stack) + " (" + blockStack.getItemStack().getDisplayName() + ")"; - } - - } - return super.getItemStackDisplayName(stack); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (PlayerHelper.isFakePlayer(player)) - return EnumActionResult.FAIL; - - stack = NBTHelper.checkNBT(stack); - - IBlockState state = world.getBlockState(blockPos); - if (!world.isRemote) - { - BlockStack rightClickedBlock = BlockStack.getStackFromPos(world, blockPos); - if (BloodMagicAPI.getTranspositionBlacklist().contains(rightClickedBlock)) - return EnumActionResult.FAIL; - - if (!ConfigHandler.transpositionBlacklist.contains(rightClickedBlock) && player.isSneaking() && (!stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) || !stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_META))) - { - if (rightClickedBlock.getState().getPlayerRelativeBlockHardness(player, world, blockPos) >= 0 && rightClickedBlock.getState().getBlockHardness(world, blockPos) >= 0) - { - int cost = getLpUsed(); - - NBTTagCompound tileNBTTag = new NBTTagCompound(); - String blockName = rightClickedBlock.getBlock().getRegistryName().toString(); - byte metadata = (byte) rightClickedBlock.getMeta(); - - if (world.getTileEntity(blockPos) != null) - { - cost *= 5; - world.getTileEntity(blockPos).writeToNBT(tileNBTTag); - - if (world.getTileEntity(blockPos) instanceof TileEntityMobSpawner) - { - cost *= 6; - } - } - - stack.getTagCompound().setString(Constants.NBT.CONTAINED_BLOCK_NAME, blockName); - stack.getTagCompound().setByte(Constants.NBT.CONTAINED_BLOCK_META, metadata); - stack.getTagCompound().setTag(Constants.NBT.CONTAINED_TILE_ENTITY, tileNBTTag); - - NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, cost); - - world.removeTileEntity(blockPos); - world.setBlockToAir(blockPos); - - return EnumActionResult.SUCCESS; - } - } else if (stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) && stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_META)) - { - IBlockState iblockstate = world.getBlockState(blockPos); - Block block = iblockstate.getBlock(); - BlockStack blockToPlace = new BlockStack(Block.getBlockFromName(stack.getTagCompound().getString(Constants.NBT.CONTAINED_BLOCK_NAME)), stack.getTagCompound().getByte(Constants.NBT.CONTAINED_BLOCK_META)); - - if (!block.isReplaceable(world, blockPos)) - { - blockPos = blockPos.offset(side); - } - - if (stack.stackSize != 0 && player.canPlayerEdit(blockPos, side, stack) && world.canBlockBePlaced(blockToPlace.getBlock(), blockPos, false, side, player, stack)) - { - if (world.setBlockState(blockPos, blockToPlace.getState(), 3)) - { - blockToPlace.getBlock().onBlockPlacedBy(world, blockPos, blockToPlace.getState(), player, blockToPlace.getItemStack()); -// world.playSound((double) ((float) blockPos.getX() + 0.5F), (double) ((float) blockPos.getY() + 0.5F), (double) ((float) blockPos.getZ() + 0.5F), blockToPlace.getBlock().getStepSound().getPlaceSound(), (blockToPlace.getBlock().getStepSound().getVolume() + 1.0F) / 2.0F, blockToPlace.getBlock().getStepSound().getPitch() * 0.8F); - - if (stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_TILE_ENTITY) && blockToPlace.getBlock().hasTileEntity(blockToPlace.getState())) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.CONTAINED_TILE_ENTITY); - tag.setInteger("x", blockPos.getX()); - tag.setInteger("y", blockPos.getY()); - tag.setInteger("z", blockPos.getZ()); - world.getTileEntity(blockPos).readFromNBT(tag); - } - world.notifyBlockUpdate(blockPos, state, state, 3); - - stack.getTagCompound().removeTag(Constants.NBT.CONTAINED_BLOCK_NAME); - stack.getTagCompound().removeTag(Constants.NBT.CONTAINED_BLOCK_META); - stack.getTagCompound().removeTag(Constants.NBT.CONTAINED_TILE_ENTITY); - - return EnumActionResult.SUCCESS; - } - } - } - } - return EnumActionResult.FAIL; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilVoid.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilVoid.java deleted file mode 100644 index 80d18508..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilVoid.java +++ /dev/null @@ -1,126 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.event.ForgeEventFactory; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidBlock; -import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.bloodmagic.api.Constants; - -public class ItemSigilVoid extends ItemSigilBase -{ - public ItemSigilVoid() - { - super("void", 50); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote && !isUnusable(stack)) - { - RayTraceResult rayTrace = this.rayTrace(world, player, true); - - if (rayTrace != null) - { - ActionResult ret = ForgeEventFactory.onBucketUse(player, world, stack, rayTrace); - if (ret != null) - return ret; - - if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) - { - BlockPos blockpos = rayTrace.getBlockPos(); - - if (!world.isBlockModifiable(player, blockpos)) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack)) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (!player.canPlayerEdit(blockpos, rayTrace.sideHit, stack)) - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (world.getBlockState(blockpos).getBlock().getMaterial(world.getBlockState(blockpos)).isLiquid() && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - world.setBlockToAir(blockpos); - return super.onItemRightClick(stack, world, player, hand); - } - } - } else - { - return super.onItemRightClick(stack, world, player, hand); - } - - if (!player.capabilities.isCreativeMode) - this.setUnusable(stack, !NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())); - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (PlayerHelper.isFakePlayer(player)) - return EnumActionResult.FAIL; - - if (world.isRemote || player.isSneaking() || isUnusable(stack)) - { - return EnumActionResult.FAIL; - } - - if (!world.canMineBlockBody(player, blockPos)) - { - return EnumActionResult.FAIL; - } - - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof IFluidHandler) - { - FluidStack amount = ((IFluidHandler) tile).drain(side, 1000, false); - - if (amount != null && amount.amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - ((IFluidHandler) tile).drain(side, 1000, true); - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } - - BlockPos newPos = blockPos.offset(side); - - if (!player.canPlayerEdit(newPos, side, stack)) - { - return EnumActionResult.FAIL; - } - - if (world.getBlockState(newPos).getBlock() instanceof IFluidBlock && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - world.setBlockToAir(newPos); - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java deleted file mode 100644 index 9a0bb270..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java +++ /dev/null @@ -1,147 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.block.BlockCauldron; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.bloodmagic.api.Constants; - -public class ItemSigilWater extends ItemSigilBase -{ - public ItemSigilWater() - { - super("water", 100); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - if (PlayerHelper.isFakePlayer(player)) - return ActionResult.newResult(EnumActionResult.FAIL, stack); - - if (!world.isRemote && !isUnusable(stack)) - { - RayTraceResult rayTrace = this.rayTrace(world, player, false); - - if (rayTrace != null) - { - ActionResult ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, rayTrace); - if (ret != null) - return ret; - - if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) - { - BlockPos blockpos = rayTrace.getBlockPos(); - - if (!world.isBlockModifiable(player, blockpos)) - return super.onItemRightClick(stack, world, player, hand); - - if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack)) - return super.onItemRightClick(stack, world, player, hand); - - BlockPos blockpos1 = blockpos.offset(rayTrace.sideHit); - - if (!player.canPlayerEdit(blockpos1, rayTrace.sideHit, stack)) - return super.onItemRightClick(stack, world, player, hand); - - if (this.canPlaceWater(world, blockpos1) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && this.tryPlaceWater(world, blockpos1)) - return super.onItemRightClick(stack, world, player, hand); - } - } - } - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote || player.isSneaking() || isUnusable(stack)) - return EnumActionResult.FAIL; - - if (!world.canMineBlockBody(player, blockPos)) - return EnumActionResult.FAIL; - - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof IFluidHandler) - { - FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000); - int amount = ((IFluidHandler) tile).fill(side, fluid, false); - - if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - ((IFluidHandler) tile).fill(side, fluid, true); - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } - - if (world.getBlockState(blockPos).getBlock() == Blocks.CAULDRON && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - world.setBlockState(blockPos, Blocks.CAULDRON.getDefaultState().withProperty(BlockCauldron.LEVEL, 3)); - return EnumActionResult.SUCCESS; - } - - return EnumActionResult.FAIL; - } - - public boolean canPlaceWater(World world, BlockPos blockPos) - { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isSolid()) - return false; - else if ((world.getBlockState(blockPos).getBlock() == Blocks.WATER || world.getBlockState(blockPos).getBlock() == Blocks.FLOWING_WATER) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0) - return false; - else - return true; - } - - public boolean tryPlaceWater(World worldIn, BlockPos pos) - { - - Material material = worldIn.getBlockState(pos).getBlock().getMaterial(worldIn.getBlockState(pos)); - boolean notSolid = !material.isSolid(); - - if (!worldIn.isAirBlock(pos) && !notSolid) - { - return false; - } else - { - if (worldIn.provider.doesWaterVaporize()) - { - int i = pos.getX(); - int j = pos.getY(); - int k = pos.getZ(); - worldIn.playSound(null, i, j, k, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F); - - for (int l = 0; l < 8; ++l) - worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D, 0); - } else - { - if (!worldIn.isRemote && notSolid && !material.isLiquid()) - worldIn.destroyBlock(pos, true); - - worldIn.setBlockState(pos, Blocks.FLOWING_WATER.getDefaultState(), 3); - } - - return true; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWhirlwind.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWhirlwind.java deleted file mode 100644 index ea2b230b..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWhirlwind.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.bloodmagic.item.sigil; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.registry.ModPotions; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.world.World; - -public class ItemSigilWhirlwind extends ItemSigilToggleableBase -{ - public ItemSigilWhirlwind() - { - super("whirlwind", 250); - } - - @Override - public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) - { - if (PlayerHelper.isFakePlayer(player)) - return; - - player.addPotionEffect(new PotionEffect(ModPotions.whirlwind, 2, 0, true, false)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/package-info.java b/src/main/java/WayofTime/bloodmagic/item/sigil/package-info.java deleted file mode 100644 index 8ec040b9..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.sigil; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java deleted file mode 100644 index 5e615643..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java +++ /dev/null @@ -1,144 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; - -public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvider -{ - public static String[] names = { "base", "corrosive", "destructive", "vengeful", "steadfast" }; - - public ItemMonsterSoul() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".monsterSoul."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHasSubtypes(true); - setMaxStackSize(1); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - tooltip.add(TextHelper.localize("tooltip.BloodMagic.will", getWill(getType(stack), stack))); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public EnumDemonWillType getType(ItemStack stack) - { - return EnumDemonWillType.values()[stack.getItemDamage() % 5]; - } - - @Override - public double getWill(EnumDemonWillType type, ItemStack soulStack) - { - if (type != this.getType(soulStack)) - { - return 0; - } - - NBTHelper.checkNBT(soulStack); - - NBTTagCompound tag = soulStack.getTagCompound(); - - return tag.getDouble(Constants.NBT.SOULS); - } - - @Override - public void setWill(EnumDemonWillType type, ItemStack soulStack, double souls) - { - NBTHelper.checkNBT(soulStack); - - NBTTagCompound tag = soulStack.getTagCompound(); - - soulStack.setItemDamage(type.ordinal()); - - tag.setDouble(Constants.NBT.SOULS, souls); - } - - @Override - public double drainWill(EnumDemonWillType type, ItemStack soulStack, double drainAmount) - { - double souls = getWill(type, soulStack); - - double soulsDrained = Math.min(drainAmount, souls); - setWill(type, soulStack, souls - soulsDrained); - - return soulsDrained; - } - - @Override - public ItemStack createWill(int meta, double number) - { - ItemStack soulStack = new ItemStack(this, 1, meta % 5); - setWill(getType(soulStack), soulStack, number); - return soulStack; - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - for (int i = 0; i < names.length; i++) - { - String name = names[i]; - ret.add(new ImmutablePair(i, "type=" + name)); - } - return ret; - } - - @Override - public double getWill(ItemStack willStack) - { - return this.getWill(EnumDemonWillType.DEFAULT, willStack); - } - - @Override - public void setWill(ItemStack willStack, double will) - { - this.setWill(EnumDemonWillType.DEFAULT, willStack, will); - } - - @Override - public double drainWill(ItemStack willStack, double drainAmount) - { - return this.drainWill(EnumDemonWillType.DEFAULT, willStack, drainAmount); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientArmourGem.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientArmourGem.java deleted file mode 100644 index 34830ea0..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientArmourGem.java +++ /dev/null @@ -1,83 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.item.armour.ItemSentientArmour; - -public class ItemSentientArmourGem extends Item -{ - public ItemSentientArmourGem() - { - super(); - - setCreativeTab(BloodMagic.tabBloodMagic); - setUnlocalizedName(Constants.Mod.MODID + ".sentientArmourGem"); - setMaxStackSize(1); - } - - public EnumDemonWillType getCurrentType(ItemStack stack) - { - return EnumDemonWillType.DEFAULT; - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - boolean hasSentientArmour = false; - ItemStack[] armourInventory = player.inventory.armorInventory; - for (ItemStack armourStack : armourInventory) - { - if (armourStack != null && armourStack.getItem() instanceof ItemSentientArmour) - { - hasSentientArmour = true; - } - } - - if (hasSentientArmour) - { - ItemSentientArmour.revertAllArmour(player); - } else - { - EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); - double will = PlayerDemonWillHandler.getTotalDemonWill(type, player); - -// PlayerDemonWillHandler.consumeDemonWill(player, willBracket[bracket]); - ItemSentientArmour.convertPlayerArmour(type, will, player); - } - - return new ActionResult(EnumActionResult.PASS, stack); - } - - @SideOnly(Side.CLIENT) - public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) - { - boolean hasSentientArmour = false; - ItemStack[] armourInventory = player.inventory.armorInventory; - for (ItemStack armourStack : armourInventory) - { - if (armourStack != null && armourStack.getItem() instanceof ItemSentientArmour) - { - hasSentientArmour = true; - } - } - - if (hasSentientArmour) - { - return new ModelResourceLocation("bloodmagic:ItemSentientArmourGem1", "inventory"); - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientAxe.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientAxe.java deleted file mode 100644 index 255ac5d9..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientAxe.java +++ /dev/null @@ -1,575 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import java.util.*; - -import javax.annotation.Nullable; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider; -import WayofTime.bloodmagic.api.iface.ISentientTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionMultiWill; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshProvider, IMultiWillTool, ISentientTool -{ - public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; - public static double[] defaultDamageAdded = new double[] { 1, 2, 3, 3.5, 4 }; - public static double[] destructiveDamageAdded = new double[] { 2, 3, 4, 5, 6 }; - public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; - public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; - public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; - public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; - public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; - public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; - - public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; //TODO: Think of implementing this later - public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; - public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; - - public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; - - public static double maxAbsorptionHearts = 10; - - public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; - public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; - - public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; - - public final double baseAttackDamage = 8; - public final double baseAttackSpeed = -3; - - public ItemSentientAxe() - { - super(Item.ToolMaterial.IRON); - setMaxDamage(getMaxDamage() * 2); -// super(ModItems.soulToolMaterial); - - setUnlocalizedName(Constants.Mod.MODID + ".sentientAxe"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) - { - float value = super.getStrVsBlock(stack, state); - if (value > 1) - { - return (float) (value + getDigSpeedOfSword(stack)); - } else - { - return value; - } - } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) - { - return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair); - } - - public void recalculatePowers(ItemStack stack, World world, EntityPlayer player) - { - EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); - int level = getLevel(stack, soulsRemaining); - - double drain = level >= 0 ? soulDrainPerSwing[level] : 0; - double extraDamage = getExtraDamage(type, level); - - setDrainOfActivatedSword(stack, drain); - setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); - setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); - setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); - setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); - setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); - setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); - setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); - } - - public double getExtraDamage(EnumDemonWillType type, int willBracket) - { - if (willBracket < 0) - { - return 0; - } - - switch (type) - { - case CORROSIVE: - case DEFAULT: - return defaultDamageAdded[willBracket]; - case DESTRUCTIVE: - return destructiveDamageAdded[willBracket]; - case VENGEFUL: - return vengefulDamageAdded[willBracket]; - case STEADFAST: - return steadfastDamageAdded[willBracket]; - } - - return 0; - } - - public double getAttackSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return vengefulAttackSpeed[willBracket]; - case DESTRUCTIVE: - return destructiveAttackSpeed[willBracket]; - default: - return -2.9; - } - } - - public double getHealthBonus(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - return healthBonus[willBracket]; - default: - return 0; - } - } - - public double getMovementSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return movementSpeed[willBracket]; - default: - return 0; - } - } - - public double getDigSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: -// return movementSpeed[willBracket]; - default: - return defaultDigSpeedAdded[willBracket]; - } - } - - public void applyEffectToEntity(EnumDemonWillType type, int willBracket, EntityLivingBase target, EntityPlayer attacker) - { - switch (type) - { - case CORROSIVE: - target.addPotionEffect(new PotionEffect(MobEffects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); - break; - case DEFAULT: - break; - case DESTRUCTIVE: - break; - case STEADFAST: - if (!target.isEntityAlive()) - { - float absorption = attacker.getAbsorptionAmount(); - attacker.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, absorptionTime[willBracket], 127)); - attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); - } - break; - case VENGEFUL: - break; - } - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - if (super.hitEntity(stack, target, attacker)) - { - if (attacker instanceof EntityPlayer) - { - EntityPlayer attackerPlayer = (EntityPlayer) attacker; - this.recalculatePowers(stack, attackerPlayer.worldObj, attackerPlayer); - EnumDemonWillType type = this.getCurrentType(stack); - double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); - int willBracket = this.getLevel(stack, will); - - applyEffectToEntity(type, willBracket, target, attackerPlayer); - - ItemStack offStack = attackerPlayer.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND); - if (offStack != null && offStack.getItem() instanceof ISentientSwordEffectProvider) - { - ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); - if (provider.providesEffectForWill(type)) - { - provider.applyOnHitEffect(type, stack, offStack, attacker, target); - } - } - } - - return true; - } - - return false; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public void setCurrentType(ItemStack stack, EnumDemonWillType type) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - recalculatePowers(stack, world, player); - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return oldStack.getItem() != newStack.getItem(); - } - - private int getLevel(ItemStack stack, double soulsRemaining) - { - int lvl = -1; - for (int i = 0; i < soulBracket.length; i++) - { - if (soulsRemaining >= soulBracket[i]) - { - lvl = i; - } - } - - return lvl; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.sentientAxe.desc")))); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentType." + getCurrentType(stack).getName().toLowerCase())); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - recalculatePowers(stack, player.worldObj, player); - - double drain = this.getDrainOfActivatedSword(stack); - if (drain > 0) - { - EnumDemonWillType type = getCurrentType(stack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - - if (drain > soulsRemaining) - { - return false; - } else - { - PlayerDemonWillHandler.consumeDemonWill(type, player, drain); - } - } - - return super.onLeftClickEntity(stack, player, entity); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionMultiWill("ItemSentientAxe"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - ret.add("type=" + type.getName().toLowerCase()); - } - - return ret; - } - - @Override - public List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) - { - List soulList = new ArrayList(); - - if (killedEntity.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) - { - return soulList; - } - - double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1; - - IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL); - - EnumDemonWillType type = this.getCurrentType(stack); - - for (int i = 0; i <= looting; i++) - { - if (i == 0 || attackingEntity.worldObj.rand.nextDouble() < 0.4) - { - ItemStack soulStack = soul.createWill(type.ordinal(), willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.worldObj.rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); - soulList.add(soulStack); - } - } - - return soulList; - } - - //TODO: Change attack speed. - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) - { - Multimap multimap = HashMultimap.create(); - if (slot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), 2)); - } - - return multimap; - } - - public double getDamageOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); - } - - public void setDamageOfActivatedSword(ItemStack stack, double damage) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); - } - - public double getDrainOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); - } - - public void setDrainOfActivatedSword(ItemStack stack, double drain) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); - } - - public double getStaticDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); - } - - public void setStaticDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); - } - - public double getDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); - } - - public void setDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop); - } - - public double getHealthBonusOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); - } - - public void setHealthBonusOfSword(ItemStack stack, double hp) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); - } - - public double getAttackSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); - } - - public void setAttackSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); - } - - public double getSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); - } - - public void setSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); - } - - public double getDigSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); - } - - public void setDigSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); - } - - @Override - public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player) - { - World world = player.worldObj; - if (!world.isRemote) - { - this.recalculatePowers(droppedStack, world, player); - - EnumDemonWillType type = this.getCurrentType(droppedStack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - if (soulsRemaining < 1024) - { - return false; - } - - PlayerDemonWillHandler.consumeDemonWill(type, player, 100); - - EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); - specterEntity.setPosition(player.posX, player.posY, player.posZ); - world.spawnEntityInWorld(specterEntity); - - specterEntity.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, droppedStack.copy()); - - specterEntity.setType(this.getCurrentType(droppedStack)); - specterEntity.setOwner(player); - specterEntity.setTamed(true); - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java deleted file mode 100644 index 29505a45..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java +++ /dev/null @@ -1,485 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.entity.projectile.EntityTippedArrow; -import net.minecraft.init.Enchantments; -import net.minecraft.init.Items; -import net.minecraft.init.SoundEvents; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.IItemPropertyGetter; -import net.minecraft.item.ItemBow; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.stats.StatList; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.iface.ISentientTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; -import WayofTime.bloodmagic.registry.ModItems; - -import java.util.Locale; - -public class ItemSentientBow extends ItemBow implements IMultiWillTool, ISentientTool//, IMeshProvider -{ - public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; - public static double[] defaultDamageAdded = new double[] { 0.25, 0.5, 0.75, 1, 1.25 }; - public static float[] velocityAdded = new float[] { 0.25f, 0.5f, 0.75f, 1, 1.25f }; - public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; //TODO - public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; - public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; - - public ItemSentientBow() - { - super(); - setUnlocalizedName(Constants.Mod.MODID + ".sentientBow"); - setCreativeTab(BloodMagic.tabBloodMagic); - this.addPropertyOverride(new ResourceLocation("pull"), new IItemPropertyGetter() - { - @SideOnly(Side.CLIENT) - public float apply(ItemStack stack, World world, EntityLivingBase entityIn) - { - if (entityIn == null) - { - return 0.0F; - } else - { - ItemStack itemstack = entityIn.getActiveItemStack(); - return itemstack != null && itemstack.getItem() == ModItems.SENTIENT_BOW ? (float) (stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0F : 0.0F; - } - } - }); - this.addPropertyOverride(new ResourceLocation("pulling"), new IItemPropertyGetter() - { - @SideOnly(Side.CLIENT) - public float apply(ItemStack stack, World world, EntityLivingBase entityIn) - { - return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F; - } - }); - this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() - { - @SideOnly(Side.CLIENT) - public float apply(ItemStack stack, World world, EntityLivingBase entityIn) - { - return ((ItemSentientBow) ModItems.SENTIENT_BOW).getCurrentType(stack).ordinal(); - } - }); - } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) - { - return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair); - } - - public void recalculatePowers(ItemStack stack, World world, EntityPlayer player) - { - EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - recalculatePowers(stack, type, soulsRemaining); - } - - public void recalculatePowers(ItemStack stack, EnumDemonWillType type, double will) - { - this.setCurrentType(stack, will > 0 ? type : EnumDemonWillType.DEFAULT); - int level = getLevel(stack, will); -// - double drain = level >= 0 ? soulDrainPerSwing[level] : 0; - - setDrainOfActivatedBow(stack, drain); - setStaticDropOfActivatedBow(stack, level >= 0 ? staticDrop[level] : 1); - setDropOfActivatedBow(stack, level >= 0 ? soulDrop[level] : 0); -// double drain = level >= 0 ? soulDrainPerSwing[level] : 0; -// double extraDamage = level >= 0 ? damageAdded[level] : 0; -// -// setDrainOfActivatedSword(stack, drain); -// setDamageOfActivatedSword(stack, 7 + extraDamage); -// setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); -// setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); - - setVelocityOfArrow(stack, level >= 0 ? 3 + getVelocityModifier(type, level) : 0); - setDamageAdded(stack, level >= 0 ? getDamageModifier(type, level) : 0); - } - - private int getLevel(ItemStack stack, double soulsRemaining) - { - int lvl = -1; - for (int i = 0; i < soulBracket.length; i++) - { - if (soulsRemaining >= soulBracket[i]) - { - lvl = i; - } - } - - return lvl; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public double getDamageModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return 0; - case DEFAULT: - case CORROSIVE: - case DESTRUCTIVE: - case STEADFAST: - return defaultDamageAdded[willBracket]; - } - - return 0; - } - - public float getVelocityModifier(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return velocityAdded[willBracket]; - default: - return 0; - } - } - - public void setDamageAdded(ItemStack stack, double damage) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble("damage", damage); - } - - public double getDamageAdded(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getDouble("damage"); - } - - public void setVelocityOfArrow(ItemStack stack, float velocity) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setFloat("velocity", velocity); - } - - public float getVelocityOfArrow(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.hasKey("velocity")) - { - return tag.getFloat("velocity"); - } - - return 3; - } - - public void setCurrentType(ItemStack stack, EnumDemonWillType type) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - public double getDrainOfActivatedBow(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); - } - - public void setDrainOfActivatedBow(ItemStack stack, double drain) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); - } - - public double getStaticDropOfActivatedBow(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); - } - - public void setStaticDropOfActivatedBow(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); - } - - public double getDropOfActivatedBow(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); - } - - public void setDropOfActivatedBow(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - this.recalculatePowers(stack, world, player); - return super.onItemRightClick(stack, world, player, hand); - } - - public EntityTippedArrow getArrowEntity(World world, ItemStack stack, EntityLivingBase target, EntityLivingBase user, float velocity) - { - EnumDemonWillType type = this.getCurrentType(stack); - - double amount = user instanceof EntityPlayer ? (this.getDropOfActivatedBow(stack) * world.rand.nextDouble() + this.getStaticDropOfActivatedBow(stack)) : 0; - - float newArrowVelocity = velocity * getVelocityOfArrow(stack); - EntitySentientArrow entityArrow = new EntitySentientArrow(world, user, type, amount); - entityArrow.setAim(user, user.rotationPitch, user.rotationYaw, 0.0F, newArrowVelocity, 1.0F); - - double d0 = target.posX - user.posX; - double d1 = target.getEntityBoundingBox().minY + (double) (target.height / 3.0F) - entityArrow.posY; - double d2 = target.posZ - user.posZ; - double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); - entityArrow.setThrowableHeading(d0, d1 + d3 * 0.05, d2, newArrowVelocity, 0); - - if (newArrowVelocity == 0) - { - world.playSound(null, user.getPosition(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.NEUTRAL, 0.4F, 1.0F); - return null; - } - - if (velocity == 1.0F) - { - entityArrow.setIsCritical(true); - } - - int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack); - - entityArrow.setDamage(entityArrow.getDamage() + this.getDamageAdded(stack) + (j > 0 ? j * 0.5 + 0.5 : 0)); - - int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack); - - if (k > 0) - { - entityArrow.setKnockbackStrength(k); - } - - if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack) > 0) - { - entityArrow.setFire(100); - } - - entityArrow.pickupStatus = EntityArrow.PickupStatus.CREATIVE_ONLY; - - return entityArrow; - } - - @Override - public void onPlayerStoppedUsing(ItemStack stack, World world, EntityLivingBase entityLiving, int timeLeft) - { - if (entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entityLiving; - boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack) > 0; - ItemStack itemstack = this.getFiredArrow(player); - - int i = this.getMaxItemUseDuration(stack) - timeLeft; - i = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(stack, world, (EntityPlayer) entityLiving, i, itemstack != null || flag); - if (i < 0) - return; - - if (itemstack != null || flag) - { - if (itemstack == null) - { - itemstack = new ItemStack(Items.ARROW); - } - - float arrowVelocity = getArrowVelocity(i); - - if ((double) arrowVelocity >= 0.1D) - { - boolean flag1 = flag && itemstack.getItem() == Items.ARROW; //Forge: Fix consuming custom arrows. - - if (!world.isRemote) - { - this.recalculatePowers(stack, world, player); - EnumDemonWillType type = this.getCurrentType(stack); - - //Need to do some stuffs -// ItemArrow itemarrow = ((ItemArrow) (itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.arrow)); -// EntityArrow entityArrow = itemarrow.createArrow(world, itemstack, player); - - double amount = (this.getDropOfActivatedBow(stack) * world.rand.nextDouble() + this.getStaticDropOfActivatedBow(stack)); - - float newArrowVelocity = arrowVelocity * getVelocityOfArrow(stack); - EntitySentientArrow entityArrow = new EntitySentientArrow(world, entityLiving, type, amount); - entityArrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, newArrowVelocity, 1.0F); - - if (newArrowVelocity == 0) - { - world.playSound(null, player.getPosition(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.NEUTRAL, 0.4F, 1.0F); - return; - } - - if (arrowVelocity == 1.0F) - { - entityArrow.setIsCritical(true); - } - - int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack); - - entityArrow.setDamage(entityArrow.getDamage() + this.getDamageAdded(stack) + (j > 0 ? j * 0.5 + 0.5 : 0)); - - int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack); - - if (k > 0) - { - entityArrow.setKnockbackStrength(k); - } - - if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack) > 0) - { - entityArrow.setFire(100); - } - - stack.damageItem(1, player); - - if (flag1) - { - entityArrow.pickupStatus = EntityArrow.PickupStatus.CREATIVE_ONLY; - } - - world.spawnEntityInWorld(entityArrow); - } - - world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F); - - if (!flag1) - { - --itemstack.stackSize; - - if (itemstack.stackSize == 0) - { - player.inventory.deleteStack(itemstack); - } - } - - player.addStat(StatList.getObjectUseStats(this)); - } - } - } - } - - protected ItemStack getFiredArrow(EntityPlayer player) - { - if (this.isArrow(player.getHeldItem(EnumHand.OFF_HAND))) - { - return player.getHeldItem(EnumHand.OFF_HAND); - } else if (this.isArrow(player.getHeldItem(EnumHand.MAIN_HAND))) - { - return player.getHeldItem(EnumHand.MAIN_HAND); - } else - { - for (int i = 0; i < player.inventory.getSizeInventory(); ++i) - { - ItemStack itemstack = player.inventory.getStackInSlot(i); - - if (this.isArrow(itemstack)) - { - return itemstack; - } - } - - return null; - } - } - - @Override - public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player) - { - World world = player.worldObj; - if (!world.isRemote) - { - this.recalculatePowers(droppedStack, world, player); - - EnumDemonWillType type = this.getCurrentType(droppedStack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - if (soulsRemaining < 1024) - { - return false; - } - - PlayerDemonWillHandler.consumeDemonWill(type, player, 100); - - EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); - specterEntity.setPosition(player.posX, player.posY, player.posZ); - world.spawnEntityInWorld(specterEntity); - - specterEntity.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, droppedStack.copy()); - - specterEntity.setType(this.getCurrentType(droppedStack)); - specterEntity.setOwner(player); - specterEntity.setTamed(true); - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientPickaxe.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientPickaxe.java deleted file mode 100644 index 9ccef5ad..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientPickaxe.java +++ /dev/null @@ -1,575 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import java.util.*; - -import javax.annotation.Nullable; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider; -import WayofTime.bloodmagic.api.iface.ISentientTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionMultiWill; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon, IMeshProvider, IMultiWillTool, ISentientTool -{ - public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; - public static double[] defaultDamageAdded = new double[] { 1, 2, 3, 3.5, 4 }; - public static double[] destructiveDamageAdded = new double[] { 2, 3, 4, 5, 6 }; - public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; - public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; - public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; - public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; - public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; - public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; - - public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; //TODO: Think of implementing this later - public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; - public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; - - public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; - - public static double maxAbsorptionHearts = 10; - - public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; - public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; - - public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; - - public final double baseAttackDamage = 3; - public final double baseAttackSpeed = -2.8; - - public ItemSentientPickaxe() - { - super(Item.ToolMaterial.IRON); - setMaxDamage(getMaxDamage() * 2); -// super(ModItems.soulToolMaterial); - - setUnlocalizedName(Constants.Mod.MODID + ".sentientPickaxe"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) - { - float value = super.getStrVsBlock(stack, state); - if (value > 1) - { - return (float) (value + getDigSpeedOfSword(stack)); - } else - { - return value; - } - } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) - { - return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair); - } - - public void recalculatePowers(ItemStack stack, World world, EntityPlayer player) - { - EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); - int level = getLevel(stack, soulsRemaining); - - double drain = level >= 0 ? soulDrainPerSwing[level] : 0; - double extraDamage = getExtraDamage(type, level); - - setDrainOfActivatedSword(stack, drain); - setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); - setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); - setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); - setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); - setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); - setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); - setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); - } - - public double getExtraDamage(EnumDemonWillType type, int willBracket) - { - if (willBracket < 0) - { - return 0; - } - - switch (type) - { - case CORROSIVE: - case DEFAULT: - return defaultDamageAdded[willBracket]; - case DESTRUCTIVE: - return destructiveDamageAdded[willBracket]; - case VENGEFUL: - return vengefulDamageAdded[willBracket]; - case STEADFAST: - return steadfastDamageAdded[willBracket]; - } - - return 0; - } - - public double getAttackSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return vengefulAttackSpeed[willBracket]; - case DESTRUCTIVE: - return destructiveAttackSpeed[willBracket]; - default: - return -2.9; - } - } - - public double getHealthBonus(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - return healthBonus[willBracket]; - default: - return 0; - } - } - - public double getMovementSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return movementSpeed[willBracket]; - default: - return 0; - } - } - - public double getDigSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: -// return movementSpeed[willBracket]; - default: - return defaultDigSpeedAdded[willBracket]; - } - } - - public void applyEffectToEntity(EnumDemonWillType type, int willBracket, EntityLivingBase target, EntityPlayer attacker) - { - switch (type) - { - case CORROSIVE: - target.addPotionEffect(new PotionEffect(MobEffects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); - break; - case DEFAULT: - break; - case DESTRUCTIVE: - break; - case STEADFAST: - if (!target.isEntityAlive()) - { - float absorption = attacker.getAbsorptionAmount(); - attacker.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, absorptionTime[willBracket], 127)); - attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); - } - break; - case VENGEFUL: - break; - } - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - if (super.hitEntity(stack, target, attacker)) - { - if (attacker instanceof EntityPlayer) - { - EntityPlayer attackerPlayer = (EntityPlayer) attacker; - this.recalculatePowers(stack, attackerPlayer.worldObj, attackerPlayer); - EnumDemonWillType type = this.getCurrentType(stack); - double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); - int willBracket = this.getLevel(stack, will); - - applyEffectToEntity(type, willBracket, target, attackerPlayer); - - ItemStack offStack = attackerPlayer.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND); - if (offStack != null && offStack.getItem() instanceof ISentientSwordEffectProvider) - { - ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); - if (provider.providesEffectForWill(type)) - { - provider.applyOnHitEffect(type, stack, offStack, attacker, target); - } - } - } - - return true; - } - - return false; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public void setCurrentType(ItemStack stack, EnumDemonWillType type) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - recalculatePowers(stack, world, player); - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return oldStack.getItem() != newStack.getItem(); - } - - private int getLevel(ItemStack stack, double soulsRemaining) - { - int lvl = -1; - for (int i = 0; i < soulBracket.length; i++) - { - if (soulsRemaining >= soulBracket[i]) - { - lvl = i; - } - } - - return lvl; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.sentientPickaxe.desc")))); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentType." + getCurrentType(stack).getName().toLowerCase())); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - recalculatePowers(stack, player.worldObj, player); - - double drain = this.getDrainOfActivatedSword(stack); - if (drain > 0) - { - EnumDemonWillType type = getCurrentType(stack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - - if (drain > soulsRemaining) - { - return false; - } else - { - PlayerDemonWillHandler.consumeDemonWill(type, player, drain); - } - } - - return super.onLeftClickEntity(stack, player, entity); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionMultiWill("ItemSentientPickaxe"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - ret.add("type=" + type.getName().toLowerCase()); - } - - return ret; - } - - @Override - public List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) - { - List soulList = new ArrayList(); - - if (killedEntity.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) - { - return soulList; - } - - double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1; - - IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL); - - EnumDemonWillType type = this.getCurrentType(stack); - - for (int i = 0; i <= looting; i++) - { - if (i == 0 || attackingEntity.worldObj.rand.nextDouble() < 0.4) - { - ItemStack soulStack = soul.createWill(type.ordinal(), willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.worldObj.rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); - soulList.add(soulStack); - } - } - - return soulList; - } - - //TODO: Change attack speed. - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) - { - Multimap multimap = HashMultimap.create(); - if (slot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), 2)); - } - - return multimap; - } - - public double getDamageOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); - } - - public void setDamageOfActivatedSword(ItemStack stack, double damage) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); - } - - public double getDrainOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); - } - - public void setDrainOfActivatedSword(ItemStack stack, double drain) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); - } - - public double getStaticDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); - } - - public void setStaticDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); - } - - public double getDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); - } - - public void setDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop); - } - - public double getHealthBonusOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); - } - - public void setHealthBonusOfSword(ItemStack stack, double hp) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); - } - - public double getAttackSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); - } - - public void setAttackSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); - } - - public double getSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); - } - - public void setSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); - } - - public double getDigSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); - } - - public void setDigSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); - } - - @Override - public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player) - { - World world = player.worldObj; - if (!world.isRemote) - { - this.recalculatePowers(droppedStack, world, player); - - EnumDemonWillType type = this.getCurrentType(droppedStack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - if (soulsRemaining < 1024) - { - return false; - } - - PlayerDemonWillHandler.consumeDemonWill(type, player, 100); - - EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); - specterEntity.setPosition(player.posX, player.posY, player.posZ); - world.spawnEntityInWorld(specterEntity); - - specterEntity.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, droppedStack.copy()); - - specterEntity.setType(this.getCurrentType(droppedStack)); - specterEntity.setOwner(player); - specterEntity.setTamed(true); - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientShovel.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientShovel.java deleted file mode 100644 index 664afb3e..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientShovel.java +++ /dev/null @@ -1,575 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import java.util.*; - -import javax.annotation.Nullable; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider; -import WayofTime.bloodmagic.api.iface.ISentientTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionMultiWill; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, IMeshProvider, IMultiWillTool, ISentientTool -{ - public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; - public static double[] defaultDamageAdded = new double[] { 1, 2, 3, 3.5, 4 }; - public static double[] destructiveDamageAdded = new double[] { 2, 3, 4, 5, 6 }; - public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; - public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; - public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; - public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; - public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; - public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; - - public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; //TODO: Think of implementing this later - public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; - public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; - - public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; - - public static double maxAbsorptionHearts = 10; - - public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; - public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; - - public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; - - public final double baseAttackDamage = 3; - public final double baseAttackSpeed = -2.8; - - public ItemSentientShovel() - { - super(Item.ToolMaterial.IRON); - setMaxDamage(getMaxDamage() * 2); -// super(ModItems.soulToolMaterial); - - setUnlocalizedName(Constants.Mod.MODID + ".sentientShovel"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) - { - float value = super.getStrVsBlock(stack, state); - if (value > 1) - { - return (float) (value + getDigSpeedOfSword(stack)); - } else - { - return value; - } - } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) - { - return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair); - } - - public void recalculatePowers(ItemStack stack, World world, EntityPlayer player) - { - EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); - int level = getLevel(stack, soulsRemaining); - - double drain = level >= 0 ? soulDrainPerSwing[level] : 0; - double extraDamage = getExtraDamage(type, level); - - setDrainOfActivatedSword(stack, drain); - setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); - setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); - setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); - setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); - setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); - setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); - setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); - } - - public double getExtraDamage(EnumDemonWillType type, int willBracket) - { - if (willBracket < 0) - { - return 0; - } - - switch (type) - { - case CORROSIVE: - case DEFAULT: - return defaultDamageAdded[willBracket]; - case DESTRUCTIVE: - return destructiveDamageAdded[willBracket]; - case VENGEFUL: - return vengefulDamageAdded[willBracket]; - case STEADFAST: - return steadfastDamageAdded[willBracket]; - } - - return 0; - } - - public double getAttackSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return vengefulAttackSpeed[willBracket]; - case DESTRUCTIVE: - return destructiveAttackSpeed[willBracket]; - default: - return -2.9; - } - } - - public double getHealthBonus(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - return healthBonus[willBracket]; - default: - return 0; - } - } - - public double getMovementSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return movementSpeed[willBracket]; - default: - return 0; - } - } - - public double getDigSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: -// return movementSpeed[willBracket]; - default: - return defaultDigSpeedAdded[willBracket]; - } - } - - public void applyEffectToEntity(EnumDemonWillType type, int willBracket, EntityLivingBase target, EntityPlayer attacker) - { - switch (type) - { - case CORROSIVE: - target.addPotionEffect(new PotionEffect(MobEffects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); - break; - case DEFAULT: - break; - case DESTRUCTIVE: - break; - case STEADFAST: - if (!target.isEntityAlive()) - { - float absorption = attacker.getAbsorptionAmount(); - attacker.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, absorptionTime[willBracket], 127)); - attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); - } - break; - case VENGEFUL: - break; - } - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - if (super.hitEntity(stack, target, attacker)) - { - if (attacker instanceof EntityPlayer) - { - EntityPlayer attackerPlayer = (EntityPlayer) attacker; - this.recalculatePowers(stack, attackerPlayer.worldObj, attackerPlayer); - EnumDemonWillType type = this.getCurrentType(stack); - double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); - int willBracket = this.getLevel(stack, will); - - applyEffectToEntity(type, willBracket, target, attackerPlayer); - - ItemStack offStack = attackerPlayer.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND); - if (offStack != null && offStack.getItem() instanceof ISentientSwordEffectProvider) - { - ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); - if (provider.providesEffectForWill(type)) - { - provider.applyOnHitEffect(type, stack, offStack, attacker, target); - } - } - } - - return true; - } - - return false; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public void setCurrentType(ItemStack stack, EnumDemonWillType type) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - recalculatePowers(stack, world, player); - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return oldStack.getItem() != newStack.getItem(); - } - - private int getLevel(ItemStack stack, double soulsRemaining) - { - int lvl = -1; - for (int i = 0; i < soulBracket.length; i++) - { - if (soulsRemaining >= soulBracket[i]) - { - lvl = i; - } - } - - return lvl; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.sentientShovel.desc")))); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentType." + getCurrentType(stack).getName().toLowerCase())); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - recalculatePowers(stack, player.worldObj, player); - - double drain = this.getDrainOfActivatedSword(stack); - if (drain > 0) - { - EnumDemonWillType type = getCurrentType(stack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - - if (drain > soulsRemaining) - { - return false; - } else - { - PlayerDemonWillHandler.consumeDemonWill(type, player, drain); - } - } - - return super.onLeftClickEntity(stack, player, entity); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionMultiWill("ItemSentientShovel"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - ret.add("type=" + type.getName().toLowerCase()); - } - - return ret; - } - - @Override - public List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) - { - List soulList = new ArrayList(); - - if (killedEntity.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) - { - return soulList; - } - - double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1; - - IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL); - - EnumDemonWillType type = this.getCurrentType(stack); - - for (int i = 0; i <= looting; i++) - { - if (i == 0 || attackingEntity.worldObj.rand.nextDouble() < 0.4) - { - ItemStack soulStack = soul.createWill(type.ordinal(), willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.worldObj.rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); - soulList.add(soulStack); - } - } - - return soulList; - } - - //TODO: Change attack speed. - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) - { - Multimap multimap = HashMultimap.create(); - if (slot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), 2)); - } - - return multimap; - } - - public double getDamageOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); - } - - public void setDamageOfActivatedSword(ItemStack stack, double damage) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); - } - - public double getDrainOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); - } - - public void setDrainOfActivatedSword(ItemStack stack, double drain) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); - } - - public double getStaticDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); - } - - public void setStaticDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); - } - - public double getDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); - } - - public void setDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop); - } - - public double getHealthBonusOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); - } - - public void setHealthBonusOfSword(ItemStack stack, double hp) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); - } - - public double getAttackSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); - } - - public void setAttackSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); - } - - public double getSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); - } - - public void setSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); - } - - public double getDigSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); - } - - public void setDigSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); - } - - @Override - public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player) - { - World world = player.worldObj; - if (!world.isRemote) - { - this.recalculatePowers(droppedStack, world, player); - - EnumDemonWillType type = this.getCurrentType(droppedStack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - if (soulsRemaining < 1024) - { - return false; - } - - PlayerDemonWillHandler.consumeDemonWill(type, player, 100); - - EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); - specterEntity.setPosition(player.posX, player.posY, player.posZ); - world.spawnEntityInWorld(specterEntity); - - specterEntity.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, droppedStack.copy()); - - specterEntity.setType(this.getCurrentType(droppedStack)); - specterEntity.setOwner(player); - specterEntity.setTamed(true); - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java deleted file mode 100644 index bbc5cc5d..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java +++ /dev/null @@ -1,530 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import java.util.*; - -import javax.annotation.Nullable; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider; -import WayofTime.bloodmagic.api.iface.ISentientTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionMultiWill; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IMeshProvider, IMultiWillTool, ISentientTool -{ - public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000, 2000, 4000 }; - public static double[] defaultDamageAdded = new double[] { 1, 1.5, 2, 2.5, 3, 3.5, 4 }; - public static double[] destructiveDamageAdded = new double[] { 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6 }; - public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2, 2.25, 2.5 }; - public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2, 2.25, 2.5 }; - public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75, 1, 1.25 }; - public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13, 15, 18 }; - public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3, 4, 4 }; - - public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0, 0, 0 }; //TODO: Think of implementing this later - public static double[] vengefulAttackSpeed = new double[] { -2.1, -2, -1.8, -1.7, -1.6, -1.6, -1.5 }; - public static double[] destructiveAttackSpeed = new double[] { -2.6, -2.7, -2.8, -2.9, -3, -3, -3 }; - - public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600, 700, 800 }; - - public static double maxAbsorptionHearts = 10; - - public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100, 120, 150 }; - public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1, 1, 1 }; - - public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4 }; - - public ItemSentientSword() - { - super(ModItems.SOUL_TOOL_MATERIAL); - - setUnlocalizedName(Constants.Mod.MODID + ".sentientSword"); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) - { - return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair); - } - - public void recalculatePowers(ItemStack stack, World world, EntityPlayer player) - { - EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - recalculatePowers(stack, type, soulsRemaining); - } - - public void recalculatePowers(ItemStack stack, EnumDemonWillType type, double will) - { - this.setCurrentType(stack, will > 0 ? type : EnumDemonWillType.DEFAULT); - int level = getLevel(stack, will); - - double drain = level >= 0 ? soulDrainPerSwing[level] : 0; - double extraDamage = getExtraDamage(type, level); - - setDrainOfActivatedSword(stack, drain); - setDamageOfActivatedSword(stack, 5 + extraDamage); - setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); - setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); - setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : -2.4); - setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); - setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); - } - - public double getExtraDamage(EnumDemonWillType type, int willBracket) - { - if (willBracket < 0) - { - return 0; - } - - switch (type) - { - case CORROSIVE: - case DEFAULT: - return defaultDamageAdded[willBracket]; - case DESTRUCTIVE: - return destructiveDamageAdded[willBracket]; - case VENGEFUL: - return vengefulDamageAdded[willBracket]; - case STEADFAST: - return steadfastDamageAdded[willBracket]; - } - - return 0; - } - - public double getAttackSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return vengefulAttackSpeed[willBracket]; - case DESTRUCTIVE: - return destructiveAttackSpeed[willBracket]; - default: - return -2.4; - } - } - - public double getHealthBonus(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case STEADFAST: - return healthBonus[willBracket]; - default: - return 0; - } - } - - public double getMovementSpeed(EnumDemonWillType type, int willBracket) - { - switch (type) - { - case VENGEFUL: - return movementSpeed[willBracket]; - default: - return 0; - } - } - - public void applyEffectToEntity(EnumDemonWillType type, int willBracket, EntityLivingBase target, EntityLivingBase attacker) - { - switch (type) - { - case CORROSIVE: - target.addPotionEffect(new PotionEffect(MobEffects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); - break; - case DEFAULT: - break; - case DESTRUCTIVE: - break; - case STEADFAST: - if (!target.isEntityAlive()) - { - float absorption = attacker.getAbsorptionAmount(); - attacker.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, absorptionTime[willBracket], 127)); - attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); - } - break; - case VENGEFUL: - break; - } - } - - @Override - public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) - { - if (super.hitEntity(stack, target, attacker)) - { - if (attacker instanceof EntityPlayer) - { - EntityPlayer attackerPlayer = (EntityPlayer) attacker; - this.recalculatePowers(stack, attackerPlayer.worldObj, attackerPlayer); - EnumDemonWillType type = this.getCurrentType(stack); - double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); - int willBracket = this.getLevel(stack, will); - - applyEffectToEntity(type, willBracket, target, attackerPlayer); - - ItemStack offStack = attackerPlayer.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND); - if (offStack != null && offStack.getItem() instanceof ISentientSwordEffectProvider) - { - ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); - if (provider.providesEffectForWill(type)) - { - provider.applyOnHitEffect(type, stack, offStack, attacker, target); - } - } - } - - return true; - } - - return false; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public void setCurrentType(ItemStack stack, EnumDemonWillType type) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - recalculatePowers(stack, world, player); - - return super.onItemRightClick(stack, world, player, hand); - } - - @Override - public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) - { - return oldStack.getItem() != newStack.getItem(); - } - - private int getLevel(ItemStack stack, double soulsRemaining) - { - int lvl = -1; - for (int i = 0; i < soulBracket.length; i++) - { - if (soulsRemaining >= soulBracket[i]) - { - lvl = i; - } - } - - return lvl; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.sentientSword.desc")))); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentType." + getCurrentType(stack).getName().toLowerCase())); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - recalculatePowers(stack, player.worldObj, player); - - double drain = this.getDrainOfActivatedSword(stack); - if (drain > 0) - { - EnumDemonWillType type = getCurrentType(stack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - - if (drain > soulsRemaining) - { - return false; - } else - { - PlayerDemonWillHandler.consumeDemonWill(type, player, drain); - } - } - - return super.onLeftClickEntity(stack, player, entity); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionMultiWill("ItemSentientSword"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - ret.add("type=" + type.getName().toLowerCase()); - } - - return ret; - } - - @Override - public List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) - { - List soulList = new ArrayList(); - - if (killedEntity.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) - { - return soulList; - } - - double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1; - - IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL); - - EnumDemonWillType type = this.getCurrentType(stack); - - for (int i = 0; i <= looting; i++) - { - if (i == 0 || attackingEntity.worldObj.rand.nextDouble() < 0.4) - { - ItemStack soulStack = soul.createWill(type.ordinal(), willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.worldObj.rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); - soulList.add(soulStack); - } - } - - return soulList; - } - - //TODO: Change attack speed. - @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) - { - Multimap multimap = HashMultimap.create(); - if (slot == EntityEquipmentSlot.MAINHAND) - { - multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0)); - multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), 0)); - multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), 2)); - } - - return multimap; - } - - public double getDamageOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); - } - - public void setDamageOfActivatedSword(ItemStack stack, double damage) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); - } - - public double getDrainOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); - } - - public void setDrainOfActivatedSword(ItemStack stack, double drain) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); - } - - public double getStaticDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); - } - - public void setStaticDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); - } - - public double getDropOfActivatedSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); - } - - public void setDropOfActivatedSword(ItemStack stack, double drop) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop); - } - - public double getHealthBonusOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); - } - - public void setHealthBonusOfSword(ItemStack stack, double hp) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); - } - - public double getAttackSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); - } - - public void setAttackSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); - } - - public double getSpeedOfSword(ItemStack stack) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); - } - - public void setSpeedOfSword(ItemStack stack, double speed) - { - NBTHelper.checkNBT(stack); - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); - } - - @Override - public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player) - { - World world = player.worldObj; - if (!world.isRemote) - { - this.recalculatePowers(droppedStack, world, player); - - EnumDemonWillType type = this.getCurrentType(droppedStack); - double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - if (soulsRemaining < 1024) - { - return false; - } - - PlayerDemonWillHandler.consumeDemonWill(type, player, 100); - - EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); - specterEntity.setPosition(player.posX, player.posY, player.posZ); - world.spawnEntityInWorld(specterEntity); - - specterEntity.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, droppedStack.copy()); - - specterEntity.setType(this.getCurrentType(droppedStack)); - specterEntity.setOwner(player); - specterEntity.setTamed(true); - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java deleted file mode 100644 index 4e6adfa5..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java +++ /dev/null @@ -1,301 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import javax.annotation.Nullable; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IMultiWillTool; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillGem; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionWillGem; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, IMultiWillTool -{ - public static String[] names = { "petty", "lesser", "common", "greater", "grand" }; - - public ItemSoulGem() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".soulGem."); - setHasSubtypes(true); - setMaxStackSize(1); - setCreativeTab(BloodMagic.tabBloodMagic); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - EnumDemonWillType type = this.getCurrentType(stack); - double drain = Math.min(this.getWill(type, stack), this.getMaxWill(type, stack) / 10); - - double filled = PlayerDemonWillHandler.addDemonWill(type, player, drain, stack); - this.drainWill(type, stack, filled, true); - - return new ActionResult(EnumActionResult.PASS, stack); - } - - @Override - @SideOnly(Side.CLIENT) - public ItemMeshDefinition getMeshDefinition() - { - return new CustomMeshDefinitionWillGem("ItemSoulGem"); - } - - @Nullable - @Override - public ResourceLocation getCustomLocation() - { - return null; - } - - @Override - public List getVariants() - { - List ret = new ArrayList(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - ret.add("type=petty_" + type.getName().toLowerCase()); - ret.add("type=lesser_" + type.getName().toLowerCase()); - ret.add("type=common_" + type.getName().toLowerCase()); - ret.add("type=greater_" + type.getName().toLowerCase()); - ret.add("type=grand_" + type.getName().toLowerCase()); - } - - return ret; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - { - ItemStack emptyStack = new ItemStack(this, 1, i); - - list.add(emptyStack); - } - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - for (int i = 0; i < names.length; i++) - { - ItemStack fullStack = new ItemStack(this, 1, i); - setWill(type, fullStack, getMaxWill(EnumDemonWillType.DEFAULT, fullStack)); - list.add(fullStack); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - if (!stack.hasTagCompound()) - return; - - EnumDemonWillType type = this.getCurrentType(stack); - tooltip.add(TextHelper.localize("tooltip.BloodMagic.soulGem." + names[stack.getItemDamage()])); - tooltip.add(TextHelper.localize("tooltip.BloodMagic.will", getWill(type, stack))); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentType." + getCurrentType(stack).getName().toLowerCase())); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) - { - return true; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) - { - EnumDemonWillType type = this.getCurrentType(stack); - double maxWill = getMaxWill(type, stack); - if (maxWill <= 0) - { - return 1; - } - return 1.0 - (getWill(type, stack) / maxWill); - } - - @Override - public ItemStack fillDemonWillGem(ItemStack soulGemStack, ItemStack soulStack) - { - if (soulStack != null && soulStack.getItem() instanceof IDemonWill) - { - EnumDemonWillType thisType = this.getCurrentType(soulGemStack); - if (thisType != ((IDemonWill) soulStack.getItem()).getType(soulStack)) - { - return soulStack; - } - IDemonWill soul = (IDemonWill) soulStack.getItem(); - double soulsLeft = getWill(thisType, soulGemStack); - - if (soulsLeft < getMaxWill(thisType, soulGemStack)) - { - double newSoulsLeft = Math.min(soulsLeft + soul.getWill(thisType, soulStack), getMaxWill(thisType, soulGemStack)); - soul.drainWill(thisType, soulStack, newSoulsLeft - soulsLeft); - - setWill(thisType, soulGemStack, newSoulsLeft); - if (soul.getWill(thisType, soulStack) <= 0) - { - return null; - } - } - } - - return soulStack; - } - - @Override - public double getWill(EnumDemonWillType type, ItemStack soulGemStack) - { - if (!type.equals(getCurrentType(soulGemStack))) - { - return 0; - } - - NBTTagCompound tag = soulGemStack.getTagCompound(); - - return tag.getDouble(Constants.NBT.SOULS); - } - - @Override - public void setWill(EnumDemonWillType type, ItemStack soulGemStack, double souls) - { - setCurrentType(type, soulGemStack); - - NBTTagCompound tag = soulGemStack.getTagCompound(); - - tag.setDouble(Constants.NBT.SOULS, souls); - } - - @Override - public double drainWill(EnumDemonWillType type, ItemStack soulGemStack, double drainAmount, boolean doDrain) - { - EnumDemonWillType currentType = this.getCurrentType(soulGemStack); - if (currentType != type) - { - return 0; - } - double souls = getWill(type, soulGemStack); - - double soulsDrained = Math.min(drainAmount, souls); - - if (doDrain) - { - setWill(type, soulGemStack, souls - soulsDrained); - } - - return soulsDrained; - } - - @Override - public int getMaxWill(EnumDemonWillType type, ItemStack soulGemStack) - { - EnumDemonWillType currentType = getCurrentType(soulGemStack); - if (!type.equals(currentType) && currentType != EnumDemonWillType.DEFAULT) - { - return 0; - } - - switch (soulGemStack.getMetadata()) - { - case 0: - return 64; - case 1: - return 256; - case 2: - return 1024; - case 3: - return 4096; - case 4: - return 16384; - } - return 64; - } - - @Override - public EnumDemonWillType getCurrentType(ItemStack soulGemStack) - { - NBTHelper.checkNBT(soulGemStack); - - NBTTagCompound tag = soulGemStack.getTagCompound(); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - return EnumDemonWillType.DEFAULT; - } - - return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - } - - public void setCurrentType(EnumDemonWillType type, ItemStack soulGemStack) - { - NBTHelper.checkNBT(soulGemStack); - - NBTTagCompound tag = soulGemStack.getTagCompound(); - - if (type == EnumDemonWillType.DEFAULT) - { - if (tag.hasKey(Constants.NBT.WILL_TYPE)) - { - tag.removeTag(Constants.NBT.WILL_TYPE); - } - - return; - } - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - } - - @Override - public double fillWill(EnumDemonWillType type, ItemStack stack, double fillAmount, boolean doFill) - { - if (!type.equals(getCurrentType(stack)) && this.getWill(getCurrentType(stack), stack) > 0) - { - return 0; - } - - double current = this.getWill(type, stack); - double maxWill = this.getMaxWill(type, stack); - - double filled = Math.min(fillAmount, maxWill - current); - - if (doFill) - { - this.setWill(type, stack, filled + current); - } - - return filled; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java deleted file mode 100644 index b1107f31..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java +++ /dev/null @@ -1,92 +0,0 @@ -package WayofTime.bloodmagic.item.soul; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class ItemSoulSnare extends Item implements IVariantProvider -{ - public static String[] names = { "base" }; - - public ItemSoulSnare() - { - super(); - - setUnlocalizedName(Constants.Mod.MODID + ".soulSnare."); - setCreativeTab(BloodMagic.tabBloodMagic); - setHasSubtypes(true); - setMaxStackSize(16); - } - - @Override - public ActionResult onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) - { - if (!playerIn.capabilities.isCreativeMode) - { - --itemStackIn.stackSize; - } - - worldIn.playSound((EntityPlayer) null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!worldIn.isRemote) - { - EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn); - snare.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); - worldIn.spawnEntityInWorld(snare); - } - - return new ActionResult(EnumActionResult.SUCCESS, itemStackIn); - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - return super.getUnlocalizedName(stack) + names[stack.getItemDamage()]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int i = 0; i < names.length; i++) - list.add(new ItemStack(id, 1, i)); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.soulSnare.desc")))); - - super.addInformation(stack, player, tooltip, advanced); - } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=soulsnare")); - return ret; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/package-info.java b/src/main/java/WayofTime/bloodmagic/item/soul/package-info.java deleted file mode 100644 index 1be2245d..00000000 --- a/src/main/java/WayofTime/bloodmagic/item/soul/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.item.soul; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java b/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java deleted file mode 100644 index 6c880de0..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java +++ /dev/null @@ -1,408 +0,0 @@ -package WayofTime.bloodmagic.livingArmour; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.iface.IUpgradeTrainer; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class LivingArmour implements ILivingArmour -{ - public static String chatBase = "chat.BloodMagic.livingArmour."; - public HashMap trackerMap = new HashMap(); - public HashMap upgradeMap = new HashMap(); - - public int maxUpgradePoints = 100; - public int totalUpgradePoints = 0; - - public StatTracker getTracker(String key) - { - if (trackerMap.containsKey(key)) - { - return trackerMap.get(key); - } else - { - return null; - } - } - - public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - double total = 0; - for (Entry entry : upgradeMap.entrySet()) - { - total += entry.getValue().getAdditionalDamageOnHit(damage, wearer, hitEntity, weapon); - } - - return total; - } - - public double getKnockbackOnHit(EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - double total = 0; - for (Entry entry : upgradeMap.entrySet()) - { - total += entry.getValue().getKnockbackOnHit(wearer, hitEntity, weapon); - } - - return total; - } - - public void recalculateUpgradePoints() - { - totalUpgradePoints = 0; - for (LivingArmourUpgrade upgrade : upgradeMap.values()) - { - totalUpgradePoints += upgrade.getCostOfUpgrade(); - } - } - - @Override - public Multimap getAttributeModifiers() - { - HashMultimap modifierMap = HashMultimap.create(); - - for (Entry entry : upgradeMap.entrySet()) - { - LivingArmourUpgrade upgrade = entry.getValue(); - if (upgrade == null) - { - continue; - } - modifierMap.putAll(upgrade.getAttributeModifiers()); - } - - return modifierMap; - } - - @Override - public boolean upgradeArmour(EntityPlayer user, LivingArmourUpgrade upgrade) - { - String key = upgrade.getUniqueIdentifier(); - if (upgradeMap.containsKey(key)) - { - //Check if this is a higher level than the previous upgrade - int nextLevel = upgrade.getUpgradeLevel(); - int currentLevel = upgradeMap.get(key).getUpgradeLevel(); - - if (nextLevel > currentLevel) - { - int upgradePointDifference = upgrade.getCostOfUpgrade() - upgradeMap.get(key).getCostOfUpgrade(); - if (totalUpgradePoints + upgradePointDifference <= maxUpgradePoints) - { - upgradeMap.put(key, upgrade); - totalUpgradePoints += upgradePointDifference; - notifyPlayerOfUpgrade(user, upgrade); - for (StatTracker tracker : trackerMap.values()) - { - tracker.onArmourUpgradeAdded(upgrade); - } - - return true; - } - } - } else - { - int upgradePoints = upgrade.getCostOfUpgrade(); - if (totalUpgradePoints + upgradePoints <= maxUpgradePoints) - { - upgradeMap.put(key, upgrade); - totalUpgradePoints += upgradePoints; - notifyPlayerOfUpgrade(user, upgrade); - for (StatTracker tracker : trackerMap.values()) - { - tracker.onArmourUpgradeAdded(upgrade); - } - - return true; - } - } - - return false; - } - - @Override - public boolean canApplyUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade) - { - String key = upgrade.getUniqueIdentifier(); - if (upgradeMap.containsKey(key)) - { - //Check if this is a higher level than the previous upgrade - int nextLevel = upgrade.getUpgradeLevel(); - int currentLevel = upgradeMap.get(key).getUpgradeLevel(); - - if (nextLevel > currentLevel) - { - int upgradePointDifference = upgrade.getCostOfUpgrade() - upgradeMap.get(key).getCostOfUpgrade(); - if (totalUpgradePoints + upgradePointDifference <= maxUpgradePoints) - { - return true; - } - } - } else - { - int upgradePoints = upgrade.getCostOfUpgrade(); - if (totalUpgradePoints + upgradePoints <= maxUpgradePoints) - { - return true; - } - } - - return false; - } - - @Override - public void notifyPlayerOfUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade) - { - ChatUtil.sendChat(user, TextHelper.localizeEffect(chatBase + "newUpgrade")); - } - - /** - * Ticks the upgrades and stat trackers, passing in the world and player as - * well as the LivingArmour - * - * @param world - * @param player - */ - @Override - public void onTick(World world, EntityPlayer player) - { - for (Entry entry : upgradeMap.entrySet()) - { - LivingArmourUpgrade upgrade = entry.getValue(); - - if (upgrade == null) - { - continue; - } - - if ((world.isRemote && upgrade.runOnClient()) || !world.isRemote) - { - upgrade.onTick(world, player, this); - } - } - - if (world.isRemote) - { - return; - } - - List allowedUpgradesList = new ArrayList(); - for (ItemStack stack : player.inventory.mainInventory) - { - if (stack != null && stack.getItem() instanceof IUpgradeTrainer) - { - List keyList = ((IUpgradeTrainer) stack.getItem()).getTrainedUpgrades(stack); - if (!keyList.isEmpty()) - { - allowedUpgradesList.addAll(keyList); - } - } - } - - for (Entry entry : trackerMap.entrySet()) - { - StatTracker tracker = entry.getValue(); - - if (tracker == null) - { - continue; - } - - if (!allowedUpgradesList.isEmpty()) - { - boolean allowed = false; - - for (String key : allowedUpgradesList) - { - if (tracker.providesUpgrade(key)) - { - allowed = true; - break; - } - } - - if (!allowed) - { - tracker.onDeactivatedTick(world, player, this); - continue; - } - } - - if (tracker.onTick(world, player, this)) - { - List upgradeList = tracker.getUpgrades(); - - for (LivingArmourUpgrade upgrade : upgradeList) //TODO: make a getNextUpgrade? - { - upgradeArmour(player, upgrade); - } - } - - } - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - maxUpgradePoints = Math.max(100, tag.getInteger("maxUpgradePoints")); - - NBTTagList upgradeTags = tag.getTagList("upgrades", 10); - if (upgradeTags != null) - { - for (int i = 0; i < upgradeTags.tagCount(); i++) - { - NBTTagCompound upgradeTag = upgradeTags.getCompoundTagAt(i); - String key = upgradeTag.getString("key"); - int level = upgradeTag.getInteger("level"); - NBTTagCompound nbtTag = upgradeTag.getCompoundTag("upgrade"); - LivingArmourUpgrade upgrade = LivingArmourHandler.generateUpgradeFromKey(key, level, nbtTag); - if (upgrade != null) - { - upgradeMap.put(key, upgrade); - totalUpgradePoints += upgrade.getCostOfUpgrade(); - } - } - } - - for (Class clazz : LivingArmourHandler.trackers) - { - try - { - Constructor ctor = clazz.getConstructor(); - Object obj = ctor.newInstance(); - if (!(obj instanceof StatTracker)) - { - // ????? - } - StatTracker tracker = (StatTracker) obj; - String key = tracker.getUniqueIdentifier(); - NBTTagCompound trackerTag = tag.getCompoundTag(key); - if (!trackerTag.hasNoTags()) - { - tracker.readFromNBT(trackerTag); - } - trackerMap.put(key, tracker); - } catch (Exception e) - { - e.printStackTrace(); - } - } - } - - @Override - public void writeToNBT(NBTTagCompound tag, boolean forceWrite) - { - tag.setInteger("maxUpgradePoints", maxUpgradePoints); - - NBTTagList tags = new NBTTagList(); - - for (Entry entry : upgradeMap.entrySet()) - { - NBTTagCompound upgradeTag = new NBTTagCompound(); - - LivingArmourUpgrade upgrade = entry.getValue(); - NBTTagCompound nbtTag = new NBTTagCompound(); - upgrade.writeToNBT(nbtTag); - - upgradeTag.setString("key", upgrade.getUniqueIdentifier()); - upgradeTag.setInteger("level", upgrade.getUpgradeLevel()); - upgradeTag.setTag("upgrade", nbtTag); - - tags.appendTag(upgradeTag); - } - - tag.setTag("upgrades", tags); - - for (Entry entry : trackerMap.entrySet()) - { - StatTracker tracker = entry.getValue(); - - if (tracker == null) - { - continue; - } - - String key = tracker.getUniqueIdentifier(); - - if (forceWrite || tracker.isDirty()) - { - NBTTagCompound trackerTag = new NBTTagCompound(); - tracker.writeToNBT(trackerTag); - - tag.setTag(key, trackerTag); - - tracker.resetDirty(); - } - } - } - - /** - * Writes the LivingArmour to the NBTTag. This will only write the trackers - * that are dirty. - * - * @param tag - */ - @Override - public void writeDirtyToNBT(NBTTagCompound tag) - { - writeToNBT(tag, false); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - writeToNBT(tag, true); - } - - public static boolean hasFullSet(EntityPlayer player) - { - for (EntityEquipmentSlot slot : EntityEquipmentSlot.values()) - { - if (slot.getSlotType() != EntityEquipmentSlot.Type.ARMOR) - { - continue; - } - ItemStack slotStack = player.getItemStackFromSlot(slot); - if (slotStack == null || !(slotStack.getItem() instanceof ItemLivingArmour)) - return false; - } - - return true; - } - - @Override - public boolean removeUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade) - { - String key = upgrade.getUniqueIdentifier(); - if (upgradeMap.containsKey(key)) - { - upgradeMap.remove(key); - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeBattleHungry.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeBattleHungry.java deleted file mode 100644 index db53c6f8..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeBattleHungry.java +++ /dev/null @@ -1,84 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeBattleHungry extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -10, -20, -35, -50, -75 }; - public static final float[] exhaustionAdded = new float[] { 0.02f, 0.04f, 0.06f, 0.08f, 0.1f }; - public static final int[] delay = new int[] { 600, 600, 600, 500, 400 }; - - public int timer = 0; - - public LivingArmourUpgradeBattleHungry(int level) - { - super(level); - } - - public void resetTimer() - { - this.timer = delay[this.level]; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (timer > 0) - { - timer--; - return; - } - - if (player.ticksExisted % 20 == 0) - { - player.addExhaustion(exhaustionAdded[this.level]); //TODO: Change exhaustion added per level. - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.battleHunger"; - } - - @Override - public int getMaxTier() - { - return 5; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger("timer", timer); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - timer = tag.getInteger("timer"); - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "battleHunger"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeCrippledArm.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeCrippledArm.java deleted file mode 100644 index 81b646bf..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeCrippledArm.java +++ /dev/null @@ -1,64 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeCrippledArm extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -150 }; - - public LivingArmourUpgradeCrippledArm(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.crippledArm"; - } - - @Override - public int getMaxTier() - { - return 1; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "crippledArm"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeDigSlowdown.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeDigSlowdown.java deleted file mode 100644 index 8da4d5bc..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeDigSlowdown.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import java.util.HashMap; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.livingArmour.LivingArmour; - -public class LivingArmourUpgradeDigSlowdown extends LivingArmourUpgrade -{ - public static HashMap changeMap = new HashMap(); - - public static final int[] costs = new int[] { -10, -17, -28, -42, -60, -80, -100, -125, -160, -200 }; - - public static final double[] digSpeedModifier = new double[] { 0.9, 0.8, 0.7, 0.6, 0.55, 0.5, 0.4, 0.35, 0.3, 0.2 }; - - public LivingArmourUpgradeDigSlowdown(int level) - { - super(level); - } - - @Override - public double getMiningSpeedModifier(EntityPlayer player) - { - return digSpeedModifier[this.level]; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.digSlowdown"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "digSlowdown"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeDisoriented.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeDisoriented.java deleted file mode 100644 index 61f0be8e..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeDisoriented.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeDisoriented extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -10, -20, -30, -40, -70, -80, -100, -140, -180, -220 }; - public static final double[] chance = new double[] { 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.008, 0.0010, 0.0012, 0.014 }; - - public LivingArmourUpgradeDisoriented(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (world.isRemote && player.ticksExisted % 20 == 0 && world.rand.nextDouble() <= chance[this.level]) - { - player.rotationYaw = (float) (world.rand.nextFloat() * 360); - player.rotationPitch = (float) (world.rand.nextFloat() * 180 - 90); - } - } - - @Override - public boolean runOnClient() - { - return true; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.disoriented"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "disoriented"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeMeleeDecrease.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeMeleeDecrease.java deleted file mode 100644 index 96dc33fa..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeMeleeDecrease.java +++ /dev/null @@ -1,85 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import java.util.UUID; - -public class LivingArmourUpgradeMeleeDecrease extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -10, -17, -28, -42, -60, -80, -100, -125, -160, -200 }; - public static final double[] meleeDamage = new double[] { -0.1, -0.2, -0.25, -0.3, -0.35, -0.4, -0.5, -0.6, -0.7, -0.8 }; - - public LivingArmourUpgradeMeleeDecrease(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public Multimap getAttributeModifiers() - { - Multimap modifierMap = HashMultimap.create(); - - modifierMap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(0271023, 5321), "damage modifier" + 2, meleeDamage[this.level], 1)); - - return modifierMap; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.meleeDecrease"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "meleeDecrease"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeQuenched.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeQuenched.java deleted file mode 100644 index acad75c6..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeQuenched.java +++ /dev/null @@ -1,64 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeQuenched extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -100 }; - - public LivingArmourUpgradeQuenched(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.quenched"; - } - - @Override - public int getMaxTier() - { - return 1; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "quenched"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlippery.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlippery.java deleted file mode 100644 index cfa1f3a4..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlippery.java +++ /dev/null @@ -1,106 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeSlippery extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -50 }; - public static final int[] slipperyDuration = new int[] { 30 * 20 }; - - public LivingArmourUpgradeSlippery(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (world.isRemote && player.onGround) - { -// if (player.moveForward == 0) - { - - float f6 = 0.91F; - BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(player.posX, player.getEntityBoundingBox().minY - 1.0D, player.posZ); - - if (player.onGround) - { - f6 = world.getBlockState(blockpos$pooledmutableblockpos).getBlock().slipperiness * 0.91F; - } - - player.motionX /= (double) (f6 / 0.91); - player.motionZ /= (double) (f6 / 0.91); - - float f7 = 0.16277136F / (f6 * f6 * f6); - float f8; - - if (player.onGround) - { - f8 = player.getAIMoveSpeed() * f7; - } else - { - f8 = player.jumpMovementFactor; - } - - player.moveRelative(-player.moveStrafing, -player.moveForward, f8); - - player.moveRelative(player.moveStrafing, player.moveForward, f8 / 10); - - player.motionX *= 0.90; - player.motionY *= 0.90; - } - } - } - - @Override - public boolean runOnClient() - { - return true; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.slippery"; - } - - @Override - public int getMaxTier() - { - return 1; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "slippery"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlowHeal.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlowHeal.java deleted file mode 100644 index 5951579a..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlowHeal.java +++ /dev/null @@ -1,73 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeSlowHeal extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -10, -17, -28, -42, -60, -80, -100, -125, -160, -200 }; - - public static final double[] healModifier = new double[] { 0.9, 0.8, 0.7, 0.6, 0.55, 0.5, 0.4, 0.35, 0.3, 0.2 }; - - public LivingArmourUpgradeSlowHeal(int level) - { - super(level); - } - - public double getHealingModifier() - { - return healModifier[this.level]; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.slowHeal"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "slowHeal"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlowness.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlowness.java deleted file mode 100644 index ad67cfe4..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeSlowness.java +++ /dev/null @@ -1,82 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import java.util.UUID; - -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class LivingArmourUpgradeSlowness extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -10, -17, -23, -35, -48, -60, -80, -110, -160, -200 }; - public static final double[] speedModifier = new double[] { -0.1, -0.2, -0.3, -0.4, -0.45, -0.5, -0.55, -0.6, -0.65, -0.7 }; - - public LivingArmourUpgradeSlowness(int level) - { - super(level); - } - - @Override - public Multimap getAttributeModifiers() - { - Multimap modifierMap = HashMultimap.create(); - - modifierMap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85472, 8502), "speed modifier" + 2, speedModifier[this.level], 1)); - - return modifierMap; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.slowness"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "slowness"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeStormTrooper.java b/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeStormTrooper.java deleted file mode 100644 index 8074631d..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/downgrade/LivingArmourUpgradeStormTrooper.java +++ /dev/null @@ -1,70 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.downgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeStormTrooper extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { -10, -25, -40, 65, -90 }; - public static final float[] inaccuracy = new float[] { 0.04f, 0.08f, 0.12f, 0.16f, 0.2f }; - - public LivingArmourUpgradeStormTrooper(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - public float getArrowJiggle(EntityPlayer player) - { - return inaccuracy[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.stormTrooper"; - } - - @Override - public int getMaxTier() - { - return 5; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "stormTrooper"; - } - - @Override - public boolean isDowngrade() - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/package-info.java b/src/main/java/WayofTime/bloodmagic/livingArmour/package-info.java deleted file mode 100644 index 4b5564f8..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.livingArmour; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerArrowProtect.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerArrowProtect.java deleted file mode 100644 index 64371af5..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerArrowProtect.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import WayofTime.bloodmagic.util.Utils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowProtect; - -public class StatTrackerArrowProtect extends StatTracker -{ - public int totalDamage = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 30, 200, 400, 800, 1500, 2500, 3500, 5000, 7000, 15000 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.arrowProtect"; - } - - @Override - public void resetTracker() - { - this.totalDamage = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamage = tag.getInteger(Constants.Mod.MODID + ".tracker.arrowProtect"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.arrowProtect", totalDamage); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamage += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalDamage >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeArrowProtect(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamage, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.arrowProtect"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeArrowProtect) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamage = Math.max(totalDamage, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerArrowShot.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerArrowShot.java deleted file mode 100644 index 2f1da239..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerArrowShot.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowShot; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerArrowShot extends StatTracker -{ - public int totalShots = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] shotsRequired = new int[] { 50, 200, 700, 1500, 3000 }; - - public static void incrementCounter(LivingArmour armour) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + 1 : 1); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.trickShot"; - } - - @Override - public void resetTracker() - { - this.totalShots = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalShots = tag.getInteger(Constants.Mod.MODID + ".tracker.trickShot"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.trickShot", totalShots); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - int change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalShots += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 5; i++) - { - if (totalShots >= shotsRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeArrowShot(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalShots, shotsRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.arrowShot"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeArrowShot) - { - int level = upgrade.getUpgradeLevel(); - if (level < shotsRequired.length) - { - totalShots = Math.max(totalShots, shotsRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerCriticalStrike.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerCriticalStrike.java deleted file mode 100644 index 4980448d..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerCriticalStrike.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeCriticalStrike; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerCriticalStrike extends StatTracker -{ - public double totalDamageDealt = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 200, 800, 1300, 2500, 3800 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.criticalStrike"; - } - - @Override - public void resetTracker() - { - this.totalDamageDealt = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamageDealt = tag.getDouble(Constants.Mod.MODID + ".tracker.criticalStrike"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.criticalStrike", totalDamageDealt); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamageDealt += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 5; i++) - { - if (totalDamageDealt >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeCriticalStrike(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamageDealt, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.criticalStrike"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeCriticalStrike) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamageDealt = Math.max(totalDamageDealt, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerDigging.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerDigging.java deleted file mode 100644 index 8241ce84..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerDigging.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeDigging; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerDigging extends StatTracker -{ - public int totalBlocksDug = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] blocksRequired = new int[] { 128, 512, 1024, 2048, 8192, 16000, 32000, 50000, 80000, 150000 }; - - public static void incrementCounter(LivingArmour armour) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + 1 : 1); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.digging"; - } - - @Override - public void resetTracker() - { - this.totalBlocksDug = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalBlocksDug = tag.getInteger(Constants.Mod.MODID + ".tracker.digging"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.digging", totalBlocksDug); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - int change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalBlocksDug += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalBlocksDug >= blocksRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeDigging(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalBlocksDug, blocksRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.digging"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeDigging) - { - int level = upgrade.getUpgradeLevel(); - if (level < blocksRequired.length) - { - totalBlocksDug = Math.max(totalBlocksDug, blocksRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerExperience.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerExperience.java deleted file mode 100644 index cbaee6c2..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerExperience.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeExperience; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerExperience extends StatTracker -{ - public double totalExperienceGained = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] experienceRequired = new int[] { 100, 400, 1000, 1600, 3200, 5000, 7000, 9200, 11500, 140000 }; - - public static void incrementCounter(LivingArmour armour, int exp) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + exp : exp); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.experienced"; - } - - @Override - public void resetTracker() - { - this.totalExperienceGained = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalExperienceGained = tag.getDouble(Constants.Mod.MODID + ".tracker.experienced"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.experienced", totalExperienceGained); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalExperienceGained += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalExperienceGained >= experienceRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeExperience(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalExperienceGained, experienceRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.experienced"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeExperience) - { - int level = upgrade.getUpgradeLevel(); - if (level < experienceRequired.length) - { - totalExperienceGained = Math.max(totalExperienceGained, experienceRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFallProtect.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFallProtect.java deleted file mode 100644 index 349ba96e..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFallProtect.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFallProtect; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerFallProtect extends StatTracker -{ - public int totalDamage = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 30, 200, 400, 800, 1500 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.fallProtect"; - } - - @Override - public void resetTracker() - { - this.totalDamage = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamage = tag.getInteger(Constants.Mod.MODID + ".tracker.fallProtect"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.fallProtect", totalDamage); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamage += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 5; i++) - { - if (totalDamage >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeFallProtect(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamage, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.fallProtect"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeFallProtect) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamage = Math.max(totalDamage, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFireResist.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFireResist.java deleted file mode 100644 index 179870c0..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFireResist.java +++ /dev/null @@ -1,106 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFireResist; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerFireResist extends StatTracker -{ - public int totalFireTicks = 0; - - public static int[] fireTicksRequired = new int[] { 60 * 20, 3 * 60 * 20, 10 * 60 * 20, 20 * 60 * 20, 25 * 60 * 20 }; - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.fire"; - } - - @Override - public void resetTracker() - { - this.totalFireTicks = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalFireTicks = tag.getInteger(Constants.Mod.MODID + ".tracker.fire"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.fire", totalFireTicks); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (player.isBurning()) - { - totalFireTicks++; - this.markDirty(); - return true; - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 5; i++) - { - if (totalFireTicks >= fireTicksRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeFireResist(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalFireTicks, fireTicksRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.fireResist"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeFireResist) - { - int level = upgrade.getUpgradeLevel(); - if (level < fireTicksRequired.length) - { - totalFireTicks = Math.max(totalFireTicks, fireTicksRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFood.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFood.java deleted file mode 100644 index e32e7e38..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerFood.java +++ /dev/null @@ -1,126 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeKnockbackResist; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerFood extends StatTracker -{ - public static Map lastFoodEatenMap = new HashMap(); - - public static int[] foodRequired = new int[] { 100, 200, 300, 5000, 1000 }; - - public int foodEaten = 0; - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.foodEaten"; - } - - @Override - public void resetTracker() - { - this.foodEaten = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - foodEaten = tag.getInteger(Constants.Mod.MODID + ".tracker.foodEaten"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.foodEaten", foodEaten); - - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (!lastFoodEatenMap.containsKey(player)) - { - lastFoodEatenMap.put(player, 20); - return false; - } - - int currentFood = player.getFoodStats().getFoodLevel(); - int prevFood = lastFoodEatenMap.get(player); - lastFoodEatenMap.put(player, currentFood); - - if (currentFood > prevFood) - { - foodEaten += (currentFood - prevFood); - - markDirty(); - - return true; - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (lastFoodEatenMap.containsKey(player)) - { - lastFoodEatenMap.remove(player); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < foodRequired.length; i++) - { - if (foodEaten >= foodRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeKnockbackResist(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(foodEaten, foodRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.knockback"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeKnockbackResist) - { - int level = upgrade.getUpgradeLevel(); - if (level < foodRequired.length) - { - foodEaten = Math.max(foodEaten, foodRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerGraveDigger.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerGraveDigger.java deleted file mode 100644 index f4fe2cc3..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerGraveDigger.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGraveDigger; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerGraveDigger extends StatTracker -{ - public double totalDamageDealt = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 200, 800, 1300, 2500, 3800, 5000, 7000, 9200, 11500, 140000 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.graveDigger"; - } - - @Override - public void resetTracker() - { - this.totalDamageDealt = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamageDealt = tag.getDouble(Constants.Mod.MODID + ".tracker.graveDigger"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.graveDigger", totalDamageDealt); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamageDealt += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalDamageDealt >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeGraveDigger(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamageDealt, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.graveDigger"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeGraveDigger) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamageDealt = Math.max(totalDamageDealt, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerGrimReaperSprint.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerGrimReaperSprint.java deleted file mode 100644 index 80cdb444..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerGrimReaperSprint.java +++ /dev/null @@ -1,131 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGrimReaperSprint; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerGrimReaperSprint extends StatTracker -{ - public int totalDeaths = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] deathsRequired = new int[] { 6, 10, 15, 25, 50, 70, 90, 120, 150, 200 }; //TODO: Modify - - public static void incrementCounter(LivingArmour armour) - { - StatTracker tracker = armour.getTracker(Constants.Mod.MODID + ".tracker.grimReaper"); - if (tracker instanceof StatTrackerGrimReaperSprint) - { - ((StatTrackerGrimReaperSprint) tracker).totalDeaths++; - System.out.println(((StatTrackerGrimReaperSprint) tracker).totalDeaths); - tracker.markDirty(); - } -// changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + 1 : 1); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.grimReaper"; - } - - @Override - public void resetTracker() - { - this.totalDeaths = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDeaths = tag.getInteger(Constants.Mod.MODID + ".tracker.grimReaper"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.grimReaper", totalDeaths); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDeaths += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return true; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalDeaths >= deathsRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeGrimReaperSprint(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDeaths, deathsRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.grimReaper"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeGrimReaperSprint) - { - int level = upgrade.getUpgradeLevel(); - if (level < deathsRequired.length) - { - totalDeaths = Math.max(totalDeaths, deathsRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerHealthboost.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerHealthboost.java deleted file mode 100644 index 3e522b27..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerHealthboost.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeHealthboost; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerHealthboost extends StatTracker -{ - public double totalHealthGenned = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] healthedRequired = new int[] { 80, 200, 340, 540, 800, 1600, 2800, 5000, 7600, 10000 }; - - public static void incrementCounter(LivingArmour armour, double health) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + health : health); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.health"; - } - - @Override - public void resetTracker() - { - this.totalHealthGenned = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalHealthGenned = tag.getDouble(Constants.Mod.MODID + ".tracker.health"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.health", totalHealthGenned); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalHealthGenned += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalHealthGenned >= healthedRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeHealthboost(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalHealthGenned, healthedRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.health"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeHealthboost) - { - int level = upgrade.getUpgradeLevel(); - if (level < healthedRequired.length) - { - totalHealthGenned = Math.max(totalHealthGenned, healthedRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerJump.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerJump.java deleted file mode 100644 index 4c9be523..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerJump.java +++ /dev/null @@ -1,125 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeJump; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerJump extends StatTracker -{ - public static HashMap changeMap = new HashMap(); - public static int[] jumpsRequired = new int[] { 30, 200, 400, 700, 1100, 1500, 2000, 2800, 3600, 5000 }; //testing - - public int totalJumps = 0; - - public static void incrementCounter(LivingArmour armour) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + 1 : 1); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.jump"; - } - - @Override - public void resetTracker() - { - this.totalJumps = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalJumps = tag.getInteger(Constants.Mod.MODID + ".tracker.jump"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.jump", totalJumps); - - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - int change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalJumps += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalJumps >= jumpsRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeJump(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalJumps, jumpsRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.jump"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeJump) - { - int level = upgrade.getUpgradeLevel(); - if (level < jumpsRequired.length) - { - totalJumps = Math.max(totalJumps, jumpsRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerMeleeDamage.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerMeleeDamage.java deleted file mode 100644 index c5912864..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerMeleeDamage.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeMeleeDamage; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerMeleeDamage extends StatTracker -{ - public double totalDamageDealt = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 200, 800, 1300, 2500, 3800, 5000, 7000, 9200, 11500, 140000 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.meleeDamage"; - } - - @Override - public void resetTracker() - { - this.totalDamageDealt = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamageDealt = tag.getDouble(Constants.Mod.MODID + ".tracker.meleeDamage"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.meleeDamage", totalDamageDealt); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamageDealt += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalDamageDealt >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeMeleeDamage(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamageDealt, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.meleeDamage"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeMeleeDamage) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamageDealt = Math.max(totalDamageDealt, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerMovement.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerMovement.java deleted file mode 100644 index b9e6fc60..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerMovement.java +++ /dev/null @@ -1,134 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSpeed; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerMovement extends StatTracker -{ - public static Map lastPosX = new HashMap(); - public static Map lastPosZ = new HashMap(); - - public static int[] blocksRequired = new int[] { 200, 1000, 2000, 4000, 7000, 15000, 25000, 35000, 50000, 70000 }; - - public double totalMovement = 0; - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.movement"; - } - - @Override - public void resetTracker() - { - this.totalMovement = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalMovement = tag.getDouble(Constants.Mod.MODID + ".tracker.movement"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.movement", totalMovement); - - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (!lastPosX.containsKey(player)) - { - lastPosX.put(player, player.posX); - lastPosZ.put(player, player.posZ); - return false; - } - - if (!player.onGround) - { - return false; - } - - double distanceTravelled = Math.sqrt(Math.pow(lastPosX.get(player) - player.posX, 2) + Math.pow(lastPosZ.get(player) - player.posZ, 2)); - - if (distanceTravelled > 0.0001 && distanceTravelled < 2) - { - totalMovement += distanceTravelled; - - lastPosX.put(player, player.posX); - lastPosZ.put(player, player.posZ); - - markDirty(); - - return true; - } - - lastPosX.put(player, player.posX); - lastPosZ.put(player, player.posZ); - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalMovement >= blocksRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeSpeed(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalMovement, blocksRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.movement"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeSpeed) - { - int level = upgrade.getUpgradeLevel(); - if (level < blocksRequired.length) - { - totalMovement = Math.max(totalMovement, blocksRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerNightSight.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerNightSight.java deleted file mode 100644 index 8c0b7913..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerNightSight.java +++ /dev/null @@ -1,148 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeNightSight; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerNightSight extends StatTracker -{ - public double totalDamageDealt = 0; - public int totalNightVision = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 0, 200, 800, 1300, 2500, 3800, 5000, 7000, 9200, 11500 }; - - public static int neededNightVision = 3 * 60 * 20; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.nightSight"; - } - - @Override - public void resetTracker() - { - this.totalDamageDealt = 0; - this.totalNightVision = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamageDealt = tag.getDouble(Constants.Mod.MODID + ".tracker.nightSight"); - totalNightVision = tag.getInteger(Constants.Mod.MODID + ".tracker.nightSightVision"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.nightSight", totalDamageDealt); - tag.setInteger(Constants.Mod.MODID + ".tracker.nightSightVision", totalNightVision); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - boolean test = false; - - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamageDealt += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - test = true; - } - } - - if (world.getLight(player.getPosition()) <= 9 && player.isPotionActive(MobEffects.NIGHT_VISION)) - { - totalNightVision++; - test = true; - } - - if (test) - { - this.markDirty(); - } - - return test; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - if (totalNightVision < neededNightVision) - { - return upgradeList; - } - - for (int i = 0; i < 10; i++) - { - if (totalDamageDealt >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeNightSight(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamageDealt, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.nightSight"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeNightSight) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamageDealt = Math.max(totalDamageDealt, damageRequired[level]); - totalNightVision = neededNightVision; - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerPhysicalProtect.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerPhysicalProtect.java deleted file mode 100644 index 638ee99a..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerPhysicalProtect.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradePhysicalProtect; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerPhysicalProtect extends StatTracker -{ - public int totalDamage = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 30, 50, 80, 140, 200, 300, 400, 500, 650, 800 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.physicalProtect"; - } - - @Override - public void resetTracker() - { - this.totalDamage = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamage = tag.getInteger(Constants.Mod.MODID + ".tracker.physicalProtect"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.physicalProtect", totalDamage); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamage += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalDamage >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradePhysicalProtect(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamage, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.physicalProtect"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradePhysicalProtect) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamage = Math.max(totalDamage, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerPoison.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerPoison.java deleted file mode 100644 index 588e9a83..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerPoison.java +++ /dev/null @@ -1,107 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradePoisonResist; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerPoison extends StatTracker -{ - public int totalPoisonTicks = 0; - - public static int[] poisonTicksRequired = new int[] { 60 * 20, 3 * 60 * 20, 10 * 60 * 20, 20 * 60 * 20, 25 * 60 * 20 }; - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.poison"; - } - - @Override - public void resetTracker() - { - this.totalPoisonTicks = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalPoisonTicks = tag.getInteger(Constants.Mod.MODID + ".tracker.poison"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.poison", totalPoisonTicks); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (player.isPotionActive(MobEffects.POISON)) - { - totalPoisonTicks++; - this.markDirty(); - return true; - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 5; i++) - { - if (totalPoisonTicks >= poisonTicksRequired[i]) - { - upgradeList.add(new LivingArmourUpgradePoisonResist(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalPoisonTicks, poisonTicksRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.poisonResist"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradePoisonResist) - { - int level = upgrade.getUpgradeLevel(); - if (level < poisonTicksRequired.length) - { - totalPoisonTicks = Math.max(totalPoisonTicks, poisonTicksRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerRepairing.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerRepairing.java deleted file mode 100644 index 8a3271f1..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerRepairing.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeRepairing; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerRepairing extends StatTracker -{ - public double totalDamage = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 500 }; - - public static void incrementCounter(LivingArmour armour, int receivedDamage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + receivedDamage : receivedDamage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.repair"; - } - - @Override - public void resetTracker() - { - this.totalDamage = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamage = tag.getDouble(Constants.Mod.MODID + ".tracker.repair"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.repair", totalDamage); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamage += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 1; i++) - { - if (totalDamage >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeRepairing(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamage, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.repair"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeRepairing) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamage = Math.max(totalDamage, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSelfSacrifice.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSelfSacrifice.java deleted file mode 100644 index c18f9e17..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSelfSacrifice.java +++ /dev/null @@ -1,125 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSelfSacrifice; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerSelfSacrifice extends StatTracker -{ - public static HashMap changeMap = new HashMap(); - public static int[] sacrificesRequired = new int[] { 30, 200, 400, 700, 1100, 1500, 2000, 2800, 3600, 5000 }; //testing - - public int totalSacrifices = 0; - - public static void incrementCounter(LivingArmour armour, int hearts) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + hearts : hearts); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.selfSacrifice"; - } - - @Override - public void resetTracker() - { - this.totalSacrifices = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalSacrifices = tag.getInteger(Constants.Mod.MODID + ".tracker.selfSacrifice"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.selfSacrifice", totalSacrifices); - - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - int change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalSacrifices += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalSacrifices >= sacrificesRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeSelfSacrifice(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalSacrifices, sacrificesRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.selfSacrifice"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeSelfSacrifice) - { - int level = upgrade.getUpgradeLevel(); - if (level < sacrificesRequired.length) - { - totalSacrifices = Math.max(totalSacrifices, sacrificesRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSolarPowered.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSolarPowered.java deleted file mode 100644 index b68ef8e0..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSolarPowered.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSolarPowered; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerSolarPowered extends StatTracker -{ - public double totalHealthGenned = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] healthedRequired = new int[] { 70, 150, 300, 500, 700, 1400, 2400, 4000, 7000, 9000 }; - - public static void incrementCounter(LivingArmour armour, double health) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + health : health); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.solarPowered"; - } - - @Override - public void resetTracker() - { - this.totalHealthGenned = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalHealthGenned = tag.getDouble(Constants.Mod.MODID + ".tracker.solarPowered"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.solarPowered", totalHealthGenned); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalHealthGenned += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 10; i++) - { - if (totalHealthGenned >= healthedRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeSolarPowered(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalHealthGenned, healthedRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.solarPowered"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeSolarPowered) - { - int level = upgrade.getUpgradeLevel(); - if (level < healthedRequired.length) - { - totalHealthGenned = Math.max(totalHealthGenned, healthedRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSprintAttack.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSprintAttack.java deleted file mode 100644 index a3e36c19..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerSprintAttack.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSprintAttack; -import WayofTime.bloodmagic.util.Utils; - -public class StatTrackerSprintAttack extends StatTracker -{ - public double totalDamageDealt = 0; - - public static HashMap changeMap = new HashMap(); - public static int[] damageRequired = new int[] { 200, 800, 1300, 2500, 3800 }; - - public static void incrementCounter(LivingArmour armour, double damage) - { - changeMap.put(armour, changeMap.containsKey(armour) ? changeMap.get(armour) + damage : damage); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.sprintAttack"; - } - - @Override - public void resetTracker() - { - this.totalDamageDealt = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalDamageDealt = tag.getDouble(Constants.Mod.MODID + ".tracker.sprintAttack"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.sprintAttack", totalDamageDealt); - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - double change = Math.abs(changeMap.get(livingArmour)); - if (change > 0) - { - totalDamageDealt += Math.abs(changeMap.get(livingArmour)); - - changeMap.put(livingArmour, 0d); - - this.markDirty(); - - return true; - } - } - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour)) - { - changeMap.remove(livingArmour); - } - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - for (int i = 0; i < 5; i++) - { - if (totalDamageDealt >= damageRequired[i]) - { - upgradeList.add(new LivingArmourUpgradeSprintAttack(i)); - } - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - return Utils.calculateStandardProgress(totalDamageDealt, damageRequired, currentLevel); - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.sprintAttack"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeSprintAttack) - { - int level = upgrade.getUpgradeLevel(); - if (level < damageRequired.length) - { - totalDamageDealt = Math.max(totalDamageDealt, damageRequired[level]); - this.markDirty(); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerStepAssist.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerStepAssist.java deleted file mode 100644 index cae6b9eb..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/StatTrackerStepAssist.java +++ /dev/null @@ -1,130 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.tracker; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeStepAssist; - -public class StatTrackerStepAssist extends StatTracker -{ - public static Map lastPosX = new HashMap(); - public static Map lastPosZ = new HashMap(); - - public static int blocksRequired = 1000; - - public double totalMovement = 0; - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".tracker.stepAssist"; - } - - @Override - public void resetTracker() - { - this.totalMovement = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - totalMovement = tag.getDouble(Constants.Mod.MODID + ".tracker.stepAssist"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setDouble(Constants.Mod.MODID + ".tracker.stepAssist", totalMovement); - - } - - @Override - public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - if (!lastPosX.containsKey(player)) - { - lastPosX.put(player, player.posX); - lastPosZ.put(player, player.posZ); - return false; - } - - if (!player.onGround || player.stepHeight < 1) - { - return false; - } - - double distanceTravelled = Math.sqrt(Math.pow(lastPosX.get(player) - player.posX, 2) + Math.pow(lastPosZ.get(player) - player.posZ, 2)); - - if (distanceTravelled > 0.0001 && distanceTravelled < 2) - { - double previousMovement = totalMovement; - totalMovement += distanceTravelled; - - lastPosX.put(player, player.posX); - lastPosZ.put(player, player.posZ); - - markDirty(); - - return previousMovement < blocksRequired && totalMovement >= blocksRequired; - } - - lastPosX.put(player, player.posX); - lastPosZ.put(player, player.posZ); - - return false; - } - - @Override - public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) - { - - } - - @Override - public List getUpgrades() - { - List upgradeList = new ArrayList(); - - if (totalMovement >= blocksRequired) - { - upgradeList.add(new LivingArmourUpgradeStepAssist(0)); - } - - return upgradeList; - } - - @Override - public double getProgress(LivingArmour livingArmour, int currentLevel) - { - if (currentLevel == 1) - return 1.0D; - - return totalMovement / (double) blocksRequired; - } - - @Override - public boolean providesUpgrade(String key) - { - return key.equals(Constants.Mod.MODID + ".upgrade.stepAssist"); - } - - @Override - public void onArmourUpgradeAdded(LivingArmourUpgrade upgrade) - { - if (upgrade instanceof LivingArmourUpgradeStepAssist) - { - totalMovement = Math.max(totalMovement, blocksRequired); - this.markDirty(); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/package-info.java b/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/package-info.java deleted file mode 100644 index 317f24d4..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/tracker/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.livingArmour.tracker; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeArrowProtect.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeArrowProtect.java deleted file mode 100644 index 818d8a16..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeArrowProtect.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeArrowProtect extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 4, 9, 16, 30, 60, 90, 125, 165, 210, 250 }; - public static final double[] protectionLevel = new double[] { 0.1, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.77, 0.80, 0.83 }; - - public LivingArmourUpgradeArrowProtect(int level) - { - super(level); - } - - @Override - public double getArmourProtection(EntityLivingBase wearer, DamageSource source) - { - if (source.isProjectile()) - { - return protectionLevel[this.level]; - } - - return 0; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.arrowProtect"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "arrowProtect"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeArrowShot.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeArrowShot.java deleted file mode 100644 index c85e6d05..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeArrowShot.java +++ /dev/null @@ -1,66 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class LivingArmourUpgradeArrowShot extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 20, 50, 90, 160, 290 }; - public static final int[] extraArrow = new int[] { 1, 2, 3, 4, 5 }; - - public LivingArmourUpgradeArrowShot(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.arrowShot"; - } - - @Override - public int getMaxTier() - { - return 5; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "arrowShot"; - } - - public int getExtraArrows() - { - return extraArrow[this.level]; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeCriticalStrike.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeCriticalStrike.java deleted file mode 100644 index 5a9d1fb5..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeCriticalStrike.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeCriticalStrike extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 12, 22, 35, 49 }; - public static final double[] damageBoost = new double[] { 0.1, 0.2, 0.3, 0.4, 0.5 }; - - public LivingArmourUpgradeCriticalStrike(int level) - { - super(level); - } - - @Override - public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - boolean flag = wearer.fallDistance > 0.0F && !wearer.onGround && !wearer.isOnLadder() && !wearer.isInWater() && !wearer.isPotionActive(MobEffects.BLINDNESS) && !wearer.isRiding() && !wearer.isSprinting(); - - if (flag) - { - return getDamageModifier() * damage; - } - - return 0; - } - - public double getDamageModifier() - { - return damageBoost[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.criticalStrike"; - } - - @Override - public int getMaxTier() - { - return 5; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "criticalStrike"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeDigging.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeDigging.java deleted file mode 100644 index 7f545d90..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeDigging.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import java.util.HashMap; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.livingArmour.LivingArmour; - -public class LivingArmourUpgradeDigging extends LivingArmourUpgrade -{ - public static HashMap changeMap = new HashMap(); - - public static final int[] costs = new int[] { 5, 10, 18, 32, 60, 90, 140, 180, 240, 300 }; - public static final int[] digSpeedTime = new int[] { 0, 50, 60, 100, 100, 100, 100, 150, 150, 150 }; - public static final int[] digSpeedLevel = new int[] { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2 }; - - public static final double[] digSpeedModifier = new double[] { 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 2, 2.2, 2.5 }; - - public static void hasDug(LivingArmour armour) - { - changeMap.put(armour, true); - } - - public LivingArmourUpgradeDigging(int level) - { - super(level); - } - - @Override - public double getMiningSpeedModifier(EntityPlayer player) - { - return digSpeedModifier[this.level]; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (changeMap.containsKey(livingArmour) && changeMap.get(livingArmour)) - { - changeMap.put(livingArmour, false); - - if (digSpeedTime[this.level] > 0) - { - player.addPotionEffect(new PotionEffect(MobEffects.SPEED, digSpeedTime[this.level], digSpeedLevel[this.level], false, false)); - } - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.digging"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "digging"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeElytra.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeElytra.java deleted file mode 100644 index 908bc3ee..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeElytra.java +++ /dev/null @@ -1,60 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class LivingArmourUpgradeElytra extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 20 }; - - public LivingArmourUpgradeElytra(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.elytra"; - } - - @Override - public int getMaxTier() - { - return 1; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "elytra"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeExperience.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeExperience.java deleted file mode 100644 index 7cab3ea4..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeExperience.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.nbt.NBTTagCompound; - -public class LivingArmourUpgradeExperience extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 7, 13, 22, 40, 65, 90, 130, 180, 250, 350 }; - public static final double[] experienceModifier = new double[] { 0.15, 0.3, 0.45, 0.6, 0.75, 0.9, 1.05, 1.2, 1.35, 1.5 }; - - public LivingArmourUpgradeExperience(int level) - { - super(level); - } - - public double getExperienceModifier() - { - return experienceModifier[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.experienced"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "experienced"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeFallProtect.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeFallProtect.java deleted file mode 100644 index 12e23ef7..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeFallProtect.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; - -public class LivingArmourUpgradeFallProtect extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 2, 5, 9, 15, 25 }; - public static final double[] protectionLevel = new double[] { 0.2, 0.4, 0.6, 0.8, 1 }; - - public LivingArmourUpgradeFallProtect(int level) - { - super(level); - } - - @Override - public double getArmourProtection(EntityLivingBase wearer, DamageSource source) - { - if (source.equals(DamageSource.fall)) - { - return protectionLevel[this.level]; - } - - return 0; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.fallProtect"; - } - - @Override - public int getMaxTier() - { - return 5; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "fallProtect"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeFireResist.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeFireResist.java deleted file mode 100644 index 9733a93a..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeFireResist.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class LivingArmourUpgradeFireResist extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 2, 6, 14, 25, 40 }; - public static final int[] fireCooldownTime = new int[] { 5 * 60 * 20, 5 * 60 * 20, 4 * 60 * 20, 3 * 60 * 20, 2 * 60 * 20 }; - public static final int[] fireResistDuration = new int[] { 30 * 20, 30 * 20, 40 * 20, 50 * 20, 60 * 20 }; - - public int fireCooldown = 0; - - public LivingArmourUpgradeFireResist(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (player.isBurning() && fireCooldown <= 0) - { - - player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistDuration[this.level])); - fireCooldown = fireCooldownTime[this.level]; - - ChatUtil.sendNoSpam(player, TextHelper.localizeEffect(chatBase + "fireRemove")); - - } else if (fireCooldown > 0) - { - fireCooldown--; - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.fireResist"; - } - - @Override - public int getMaxTier() - { - return 5; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.NBT.UPGRADE_FIRE_TIMER, fireCooldown); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - fireCooldown = tag.getInteger(Constants.NBT.UPGRADE_FIRE_TIMER); - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "fireResist"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeGraveDigger.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeGraveDigger.java deleted file mode 100644 index fef4c4da..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeGraveDigger.java +++ /dev/null @@ -1,72 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeGraveDigger extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 12, 20, 35, 49, 78, 110, 160, 215, 320 }; - public static final double[] damageBoost = new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - - public LivingArmourUpgradeGraveDigger(int level) - { - super(level); - } - - @Override - public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - if (weapon != null && weapon.getItem() instanceof ItemSpade) - { - return getDamageModifier(); - } - - return 0; - } - - public double getDamageModifier() - { - return damageBoost[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.graveDigger"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "graveDigger"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeGrimReaperSprint.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeGrimReaperSprint.java deleted file mode 100644 index bd600265..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeGrimReaperSprint.java +++ /dev/null @@ -1,100 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 20, 50, 130, 270, 450, 580, 700, 800, 900, 1000 }; - public static final int[] rebirthDelay = new int[] { 20 * 60 * 60, 20 * 60 * 50, 20 * 60 * 45, 20 * 60 * 40, 20 * 60 * 30, 20 * 60 * 25, 20 * 60 * 15, 20 * 60 * 10, 20 * 60 * 5, 20 * 60 }; - public static final int[] strengthDuration = new int[] { 0, 0, 100, 100, 200, 200, 200, 300, 300, 400 }; - public static final int[] strengthValue = new int[] { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3 }; - public static final int[] resistanceDuration = new int[] { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; - public static final int[] resistanceValue = new int[] { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3 }; - public static final float[] healthOnRevive = new float[] { 0.2f, 0.2f, 0.3f, 0.3f, 0.4f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f }; - - public int deathTimer = 0; - - public LivingArmourUpgradeGrimReaperSprint(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (deathTimer > 0) - { - deathTimer--; - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.grimReaper"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - deathTimer = tag.getInteger(Constants.Mod.MODID + ".tracker.grimReaper"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.grimReaper", deathTimer); - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "grimReaper"; - } - - public void applyEffectOnRebirth(EntityPlayer player) - { - player.setHealth(player.getMaxHealth() * healthOnRevive[this.level]); - - int strDur = strengthDuration[this.level]; - if (strDur > 0) - { - player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, strDur, strengthValue[this.level])); - } - - int resDur = resistanceDuration[this.level]; - if (resDur > 0) - { - player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, resDur, resistanceValue[this.level])); - } - - deathTimer = rebirthDelay[this.level]; - ChatUtil.sendNoSpam(player, TextHelper.localizeEffect(chatBase + "grimReaper")); - } - - public boolean canSavePlayer(EntityPlayer player) - { - return deathTimer <= 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeHealthboost.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeHealthboost.java deleted file mode 100644 index b593da5a..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeHealthboost.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import java.util.UUID; - -public class LivingArmourUpgradeHealthboost extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 12, 20, 35, 49, 78, 110, 160, 215, 320 }; - public static final int[] healthModifier = new int[] { 4, 8, 12, 16, 20, 26, 32, 38, 44, 50 }; - - public LivingArmourUpgradeHealthboost(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public Multimap getAttributeModifiers() - { - Multimap modifierMap = HashMultimap.create(); - - modifierMap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(9423688, 1), "Health modifier" + 1, healthModifier[this.level], 0)); - - return modifierMap; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.health"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "health"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeJump.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeJump.java deleted file mode 100644 index 0b317a1e..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeJump.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeJump extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 3, 6, 11, 23, 37, 50, 70, 100, 140, 200 }; - public static final double[] jumpModifier = new double[] { 0.10, 0.2, 0.3, 0.4, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5 }; - public static final double[] fallModifier = new double[] { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.85 }; - - public LivingArmourUpgradeJump(int level) - { - super(level); - } - - public double getJumpModifier() - { - return jumpModifier[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.jump"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (!world.isRemote) - { - double motionY = player.motionY; - - if (motionY < 0) - { - player.fallDistance = (float) Math.max(0, player.fallDistance + motionY * fallModifier[this.level]); - } - } - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "jump"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeKnockbackResist.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeKnockbackResist.java deleted file mode 100644 index 078aa21f..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeKnockbackResist.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.nbt.NBTTagCompound; - -import java.util.UUID; - -public class LivingArmourUpgradeKnockbackResist extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 3, 7, 13, 26, 42 }; - public static final double[] kbModifier = new double[] { 0.2, 0.4, 0.6, 0.8, 1.0 }; - public static final int[] healthModifier = new int[] { 0, 0, 0, 4, 10 }; - - public LivingArmourUpgradeKnockbackResist(int level) - { - super(level); - } - - @Override - public Multimap getAttributeModifiers() - { - Multimap modifierMap = HashMultimap.create(); - - modifierMap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(895132, 1), "Knockback modifier" + 1, kbModifier[this.level], 0)); - - if (healthModifier[this.level] > 0) - { - modifierMap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(952142, 1), "Health modifier" + 1, healthModifier[this.level], 0)); - } - - return modifierMap; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.knockback"; - } - - @Override - public int getMaxTier() - { - return 5; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "knockback"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeMeleeDamage.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeMeleeDamage.java deleted file mode 100644 index 228404de..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeMeleeDamage.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import java.util.UUID; - -public class LivingArmourUpgradeMeleeDamage extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 12, 20, 35, 49, 78, 110, 160, 215, 320 }; - public static final double[] meleeDamage = new double[] { 0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7 }; - - public LivingArmourUpgradeMeleeDamage(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - - } - - @Override - public Multimap getAttributeModifiers() - { - Multimap modifierMap = HashMultimap.create(); - - modifierMap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(9423688, 1), "damage modifier" + 1, meleeDamage[this.level], 0)); - - return modifierMap; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.meleeDamage"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "meleeDamage"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeNightSight.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeNightSight.java deleted file mode 100644 index 696b3c4b..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeNightSight.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeNightSight extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 8, 15, 20, 34, 45, 70, 100, 150, 200 }; - public static final double[] meleeDamage = new double[] { 0, 0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6 }; - - public boolean isActive = false; - - public LivingArmourUpgradeNightSight(int level) - { - super(level); - } - - @Override - public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - return isActive ? meleeDamage[this.level] : 0; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (world.getLight(player.getPosition()) <= 9) - { - isActive = true; - if (player.isPotionActive(MobEffects.NIGHT_VISION)) - { - int dur = player.getActivePotionEffect(MobEffects.NIGHT_VISION).getDuration(); - if (dur > 100 && dur < 20 * 60 * 20) - { - //Don't override the potion effect if the other potion effect is sufficiently long. - return; - } - } - - player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, Constants.Misc.NIGHT_VISION_CONSTANT_BEGIN, 0, false, false)); - } else - { - isActive = false; - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.nightSight"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "nightSight"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradePhysicalProtect.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradePhysicalProtect.java deleted file mode 100644 index d58094db..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradePhysicalProtect.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; - -public class LivingArmourUpgradePhysicalProtect extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 10, 18, 35, 65, 100, 140, 190, 250, 300 }; - public static final double[] protectionLevel = new double[] { 0.1, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.77, 0.80, 0.83 }; - - public LivingArmourUpgradePhysicalProtect(int level) - { - super(level); - } - - @Override - public double getArmourProtection(EntityLivingBase wearer, DamageSource source) - { - if (source.getEntity() != null && !source.isMagicDamage() && !source.isProjectile()) - { - return protectionLevel[this.level]; - } - - return 0; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.physicalProtect"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "physicalProtect"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradePoisonResist.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradePoisonResist.java deleted file mode 100644 index db3b3905..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradePoisonResist.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 2, 6, 14, 25, 40 }; - public static final int[] poisonCooldownTime = new int[] { 1200, 800, 600, 300, 100 }; - public static final int[] poisonMaxCure = new int[] { 0, 1, 2, 2, 3 }; - - public int poisonCooldown = 0; - - public LivingArmourUpgradePoisonResist(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (player.isPotionActive(MobEffects.POISON) && poisonCooldown <= 0) - { - PotionEffect eff = player.getActivePotionEffect(MobEffects.POISON); - if (eff.getAmplifier() <= poisonMaxCure[this.level]) - { - player.removePotionEffect(MobEffects.POISON); - poisonCooldown = poisonCooldownTime[this.level]; - - ChatUtil.sendNoSpam(player, TextHelper.localize(chatBase + "poisonRemove")); - } - } else if (poisonCooldown > 0) - { - poisonCooldown--; - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.poisonResist"; - } - - @Override - public int getMaxTier() - { - return 5; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.NBT.UPGRADE_POISON_TIMER, poisonCooldown); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - poisonCooldown = tag.getInteger(Constants.NBT.UPGRADE_POISON_TIMER); - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "poisonResist"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeRepairing.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeRepairing.java deleted file mode 100644 index 818e177b..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeRepairing.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeRepairing extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 15 }; - public static final int[] repairDelay = new int[] { 200 }; - - int maxRepair = 1; - - int delay = 0; - - public LivingArmourUpgradeRepairing(int level) - { - super(level); - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (delay <= 0) - { - delay = repairDelay[this.level]; - - EntityEquipmentSlot randomSlot = EntityEquipmentSlot.values()[2 + world.rand.nextInt(4)]; - ItemStack repairStack = player.getItemStackFromSlot(randomSlot); - if (repairStack != null) - { - if (repairStack.isItemStackDamageable() && repairStack.isItemDamaged()) - { - int toRepair = Math.min(maxRepair, repairStack.getItemDamage()); - if (toRepair > 0) - { - repairStack.setItemDamage(repairStack.getItemDamage() - toRepair); - } - } - } - } else - { - delay--; - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.repair"; - } - - @Override - public int getMaxTier() - { - return 1; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger("repairingDelay", delay); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - delay = tag.getInteger("repairingDelay"); - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "repair"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSelfSacrifice.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSelfSacrifice.java deleted file mode 100644 index c711a537..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSelfSacrifice.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.nbt.NBTTagCompound; - -public class LivingArmourUpgradeSelfSacrifice extends LivingArmourUpgrade -{ - //TODO: Add extra effects for higher levels - public static final int[] costs = new int[] { 7, 13, 22, 40, 65, 90, 130, 180, 250, 350 }; - public static final double[] sacrificeModifier = new double[] { 0.15, 0.3, 0.45, 0.6, 0.75, 0.9, 1.05, 1.2, 1.35, 1.5 }; - - public LivingArmourUpgradeSelfSacrifice(int level) - { - super(level); - } - - public double getSacrificeModifier() - { - return sacrificeModifier[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.selfSacrifice"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "selfSacrifice"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSolarPowered.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSolarPowered.java deleted file mode 100644 index b86b39cc..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSolarPowered.java +++ /dev/null @@ -1,93 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 5, 12, 20, 35, 49, 78, 110, 160, 215, 320 }; - public static final int[] regenCooldown = new int[] { 200, 180, 160, 120, 100, 80, 40, 20, 10, 10 }; - public static final int[] fireResistCooldown = new int[] { 1, 1, 60 * 60, 50 * 60, 40 * 60, 35 * 60, 30 * 60, 25 * 60, 20 * 60, 10 * 60 }; - public static final int[] fireResistTime = new int[] { 0, 0, 15 * 60, 20 * 60, 30 * 60, 35 * 60, 40 * 60, 50 * 60, 60 * 60, 100 * 60 }; - public static final double[] protectionLevel = new double[] { 0.02, 0.04, 0.06, 0.08, 0.10, 0.13, 0.16, 0.19, 0.22, 0.25 }; - - public int counter = 0; - - public LivingArmourUpgradeSolarPowered(int level) - { - super(level); - } - - @Override - public double getArmourProtection(EntityLivingBase wearer, DamageSource source) - { - if (wearer.worldObj.canSeeSky(wearer.getPosition()) || wearer.worldObj.provider.isDaytime()) - { - return protectionLevel[this.level]; - } - - return 0; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - counter++; - if (world.canSeeSky(player.getPosition()) || world.provider.isDaytime()) - { - if (counter % regenCooldown[this.level] == 0 && player.getHealth() < player.getMaxHealth()) - { - player.heal(1); - } - - if (fireResistTime[this.level] != 0 && counter % fireResistCooldown[this.level] == 0) - { - player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistTime[this.level], 0, false, false)); - } - } - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.solarPowered"; - } - - @Override - public int getMaxTier() - { - return 10; // Set to here until I can add more upgrades to it. - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger(Constants.Mod.MODID + ".tracker.solarPowered", counter); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - counter = tag.getInteger(Constants.Mod.MODID + ".tracker.solarPowered"); - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "solarPowered"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSpeed.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSpeed.java deleted file mode 100644 index eca1937e..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSpeed.java +++ /dev/null @@ -1,105 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import java.util.UUID; - -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.ILivingArmour; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class LivingArmourUpgradeSpeed extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 3, 7, 13, 26, 42, 60, 90, 130, 180, 250 }; - public static final double[] speedModifier = new double[] { 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5 }; - public static final int[] sprintSpeedTime = new int[] { 0, 0, 0, 0, 0, 20, 60, 60, 100, 200 }; - public static final int[] sprintSpeedLevel = new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 1, 2 }; - public static final int[] healthModifier = new int[] { 0, 0, 0, 0, 0, 0, 0, 4, 10, 20 }; - public static final int[] sprintRegenTime = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 25 }; - - public LivingArmourUpgradeSpeed(int level) - { - super(level); - } - - public double getSpeedModifier() - { - return speedModifier[this.level]; - } - - @Override - public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) - { - if (player.isSprinting()) - { - if (sprintSpeedTime[this.level] > 0) - { - player.addPotionEffect(new PotionEffect(MobEffects.SPEED, sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false)); - } - - if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(MobEffects.REGENERATION)) - { - player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, sprintRegenTime[this.level], 0, false, false)); - } - } - } - - @Override - public Multimap getAttributeModifiers() - { - Multimap modifierMap = HashMultimap.create(); - -// modifierMap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(895132, 1), "Speed modifier" + 1, speedModifier[this.level], 1)); - - if (healthModifier[this.level] > 0) - { - modifierMap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(952142, 1), "Health modifier" + 1, healthModifier[this.level], 0)); - } - - return modifierMap; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.movement"; - } - - @Override - public int getMaxTier() - { - return 10; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "speed"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSprintAttack.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSprintAttack.java deleted file mode 100644 index 8dd3ea30..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeSprintAttack.java +++ /dev/null @@ -1,88 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; - -public class LivingArmourUpgradeSprintAttack extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 3, 7, 15, 25, 40 }; - public static final double[] damageBoost = new double[] { 0.5, 0.75, 1, 1.25, 1.5 }; - public static final double[] knockbackModifier = new double[] { 1, 2, 3, 4, 5 }; - - public LivingArmourUpgradeSprintAttack(int level) - { - super(level); - } - - @Override - public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - if (wearer.isSprinting()) - { - return getDamageModifier(); - } - - return 0; - } - - @Override - public double getKnockbackOnHit(EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) - { - if (wearer.isSprinting()) - { - return getKnockbackModifier(); - } - - return 0; - } - - public double getDamageModifier() - { - return damageBoost[this.level]; - } - - public double getKnockbackModifier() - { - return knockbackModifier[this.level]; - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.sprintAttack"; - } - - @Override - public int getMaxTier() - { - return 5; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "sprintAttack"; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeStepAssist.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeStepAssist.java deleted file mode 100644 index 9971a7cf..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/LivingArmourUpgradeStepAssist.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.livingArmour.upgrade; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import net.minecraft.nbt.NBTTagCompound; - -public class LivingArmourUpgradeStepAssist extends LivingArmourUpgrade -{ - public static final int[] costs = new int[] { 20 }; - public static final float[] assist = new float[] { Constants.Misc.ALTERED_STEP_HEIGHT }; - -// public static final double[] speedModifier = new double[] { 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5 }; -// public static final int[] sprintSpeedTime = new int[] { 0, 0, 0, 0, 0, 20, 60, 60, 100, 200 }; -// public static final int[] sprintSpeedLevel = new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 1, 2 }; -// public static final int[] healthModifier = new int[] { 0, 0, 0, 0, 0, 0, 0, 4, 10, 20 }; -// public static final int[] sprintRegenTime = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 25 }; - - public LivingArmourUpgradeStepAssist(int level) - { - super(level); - } - - @Override - public String getUniqueIdentifier() - { - return Constants.Mod.MODID + ".upgrade.stepAssist"; - } - - @Override - public int getMaxTier() - { - return 1; - } - - @Override - public int getCostOfUpgrade() - { - return costs[this.level]; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - // EMPTY - } - - @Override - public String getUnlocalizedName() - { - return tooltipBase + "stepAssist"; - } - - public float getStepAssist() - { - return assist[this.level]; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/package-info.java b/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/package-info.java deleted file mode 100644 index 7d4f11a7..00000000 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/upgrade/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.livingArmour.upgrade; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java b/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java deleted file mode 100644 index 0a28f0b3..00000000 --- a/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java +++ /dev/null @@ -1,93 +0,0 @@ -package WayofTime.bloodmagic.meteor; - -import java.util.List; -import java.util.Random; - -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.util.Utils; - -@Getter -public class Meteor -{ - private static final Random RAND = new Random(); - - private final ItemStack catalystStack; - private final List components; - private final float explosionStrength; - private final int radius; - private final int maxWeight; - - @Setter - public int version; - - public Meteor(ItemStack catalystStack, List components, float explosionStrength, int radius, int maxWeight) - { - this.catalystStack = catalystStack; - this.components = components; - this.explosionStrength = explosionStrength; - this.radius = radius; - this.maxWeight = maxWeight; - } - - public void generateMeteor(World world, BlockPos pos, IBlockState fillerBlock, double radiusModifier, double explosionModifier, double fillerChance) - { - world.newExplosion(null, pos.getX(), pos.getY(), pos.getZ(), (float) (explosionStrength * explosionModifier), true, true); - int radius = (int) Math.ceil(getRadius() * radiusModifier); - double floatingRadius = getRadius() * radiusModifier; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k > (floatingRadius + 0.5) * (floatingRadius + 0.5)) - { - continue; - } - - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - - if (world.isAirBlock(newPos) || Utils.isBlockLiquid(state)) - { - IBlockState placedState = getRandomOreFromComponents(fillerBlock, fillerChance); - if (placedState != null) - { - world.setBlockState(newPos, placedState); - } - } - } - } - } - } - - //fillerChance is the chance that the filler block will NOT be placed - public IBlockState getRandomOreFromComponents(IBlockState fillerBlock, double fillerChance) - { - int goal = RAND.nextInt(getMaxWeight()); - - for (MeteorComponent component : getComponents()) - { - goal -= component.getWeight(); - if (goal < 0) - { - IBlockState state = component.getStateFromOre(); - if (state != null) - { - return state; - } else - { - return RAND.nextDouble() > fillerChance ? fillerBlock : null; - } - } - } - - return RAND.nextDouble() > fillerChance ? fillerBlock : null; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/meteor/MeteorComponent.java b/src/main/java/WayofTime/bloodmagic/meteor/MeteorComponent.java deleted file mode 100644 index af778bd4..00000000 --- a/src/main/java/WayofTime/bloodmagic/meteor/MeteorComponent.java +++ /dev/null @@ -1,61 +0,0 @@ -package WayofTime.bloodmagic.meteor; - -import java.util.List; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.util.Utils; - -@Getter -@Setter -@AllArgsConstructor -public class MeteorComponent -{ - public int weight; - public String oreName; - - public IBlockState getStateFromOre() - { - if (oreName.contains(":")) - { - String[] stringList = oreName.split(":"); - String domain = stringList[0]; - String block = stringList[1]; - int meta = 0; - if (stringList.length > 2 && Utils.isInteger(stringList[2])) - { - meta = Integer.parseInt(stringList[2]); - } - - Block ore = Block.REGISTRY.getObject(new ResourceLocation(domain, block)); - if (ore != null) - { - return ore.getStateFromMeta(meta); - } - } - - List list = OreDictionary.getOres(oreName); - if (list != null && !list.isEmpty()) - { - for (ItemStack stack : list) - { - if (stack != null && stack.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) stack.getItem()).getBlock(); - IBlockState state = block.getStateFromMeta(stack.getItemDamage()); - - return state; - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java b/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java deleted file mode 100644 index 0ef06ef9..00000000 --- a/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java +++ /dev/null @@ -1,146 +0,0 @@ -package WayofTime.bloodmagic.meteor; - -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.gson.Serializers; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import org.apache.commons.io.FilenameUtils; -import org.apache.commons.io.filefilter.FileFilterUtils; -import org.apache.commons.lang3.tuple.Pair; - -import java.io.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MeteorConfigHandler -{ - private static final Map DEFAULT_METEORS = new HashMap(); - - private static File meteorDir; - - public static void init(File meteorDirectory) - { - meteorDir = meteorDirectory; - handleMeteors(true); - } - - public static void handleMeteors(boolean checkNewVersion) - { - // Clear the meteors so that reloading in-game can be done - MeteorRegistry.meteorMap.clear(); - List> defaultMeteors = getDefaultMeteors(); - - try - { - // Create defaults if the folder doesn't exist - if (!meteorDir.exists() && meteorDir.mkdir()) - { - for (Pair meteor : defaultMeteors) - { - String json = Serializers.GSON.toJson(meteor.getRight()); - FileWriter writer = new FileWriter(new File(meteorDir, meteor.getLeft() + ".json")); - writer.write(json); - writer.close(); - } - } - - // Collect all meteors from the files - File[] meteorFiles = meteorDir.listFiles((FileFilter) FileFilterUtils.suffixFileFilter(".json")); - if (meteorFiles == null) - return; - - List> meteors = new ArrayList>(); - - // Filter names so we can compare to defaults - for (File meteorFile : meteorFiles) - { - Meteor meteor = Serializers.GSON.fromJson(new FileReader(meteorFile), Meteor.class); - meteors.add(Pair.of(FilenameUtils.removeExtension(meteorFile.getName()), meteor)); - } - - if (checkNewVersion && ConfigHandler.getConfig().getBoolean("resyncOnVersionChange", "Meteors", true, "Should the default meteors be regenerated if the mod has updated them")) - { - // Check defaults for new version - for (Pair meteor : meteors) - { - Meteor defaultMeteor = DEFAULT_METEORS.get(meteor.getLeft()); - if (defaultMeteor != null && defaultMeteor.version > meteor.getRight().version) - { - String json = Serializers.GSON.toJson(defaultMeteor); - File meteorFile = new File(meteorDir, meteor.getLeft() + ".json"); - new PrintWriter(meteorFile).close(); // Clear the file - FileWriter fileWriter = new FileWriter(meteorFile); - fileWriter.write(json); // Write the new contents - fileWriter.close(); - - meteors.set(meteors.indexOf(meteor), Pair.of(meteor.getLeft(), defaultMeteor)); - } - } - } - - // Finally, register all of our meteors - for (Pair meteor : meteors) - MeteorRegistry.registerMeteor(meteor.getRight().getCatalystStack(), meteor.getRight()); - } catch (Exception e) - { - e.printStackTrace(); - } - - ConfigHandler.getConfig().save(); - } - - private static List> getDefaultMeteors() - { - List> holders = new ArrayList>(); - - // Iron - List ironMeteorList = new ArrayList(); - ironMeteorList.add(new MeteorComponent(400, "oreIron")); - ironMeteorList.add(new MeteorComponent(200, "oreCopper")); - ironMeteorList.add(new MeteorComponent(140, "oreTin")); - ironMeteorList.add(new MeteorComponent(70, "oreSilver")); - ironMeteorList.add(new MeteorComponent(80, "oreLead")); - ironMeteorList.add(new MeteorComponent(30, "oreGold")); - ironMeteorList.add(new MeteorComponent(60, "oreLapis")); - ironMeteorList.add(new MeteorComponent(100, "oreRedstone")); - Meteor ironMeteor = new Meteor(new ItemStack(Blocks.IRON_BLOCK), ironMeteorList, 15, 5, 1000); - ironMeteor.setVersion(2); - // Gold - List goldMeteorList = new ArrayList(); - goldMeteorList.add(new MeteorComponent(200, "oreIron")); - goldMeteorList.add(new MeteorComponent(100, "oreCopper")); - goldMeteorList.add(new MeteorComponent(60, "oreTin")); - goldMeteorList.add(new MeteorComponent(100, "oreGold")); - goldMeteorList.add(new MeteorComponent(120, "oreLapis")); - goldMeteorList.add(new MeteorComponent(30, "oreDiamond")); - goldMeteorList.add(new MeteorComponent(20, "oreEmerald")); - goldMeteorList.add(new MeteorComponent(20, "oreCoal")); - - Meteor goldMeteor = new Meteor(new ItemStack(Blocks.GOLD_BLOCK), goldMeteorList, 18, 6, 1000); - goldMeteor.setVersion(3); - - List diamondMeteorList = new ArrayList(); - diamondMeteorList.add(new MeteorComponent(50, "oreIron")); - diamondMeteorList.add(new MeteorComponent(100, "oreGold")); - diamondMeteorList.add(new MeteorComponent(10, "oreLapis")); - diamondMeteorList.add(new MeteorComponent(250, "oreDiamond")); - diamondMeteorList.add(new MeteorComponent(180, "oreEmerald")); - diamondMeteorList.add(new MeteorComponent(50, "oreRedstone")); - diamondMeteorList.add(new MeteorComponent(400, "minecraft:diamond_block")); - - Meteor diamondMeteor = new Meteor(new ItemStack(Blocks.DIAMOND_BLOCK), diamondMeteorList, 10, 3, 1000); - goldMeteor.setVersion(3); - - holders.add(Pair.of("IronMeteor", ironMeteor)); - DEFAULT_METEORS.put("IronMeteor", ironMeteor); - - holders.add(Pair.of("GoldMeteor", goldMeteor)); - DEFAULT_METEORS.put("GoldMeteor", goldMeteor); - - holders.add(Pair.of("DiamondMeteor", diamondMeteor)); - DEFAULT_METEORS.put("DiamondMeteor", diamondMeteor); - return holders; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java b/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java deleted file mode 100644 index f85cbcc4..00000000 --- a/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.bloodmagic.meteor; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.ItemStackWrapper; - -public class MeteorRegistry -{ - public static Map meteorMap = new HashMap(); - - public static void registerMeteor(ItemStack stack, Meteor holder) - { - ItemStackWrapper wrapper = ItemStackWrapper.getHolder(stack); - if (wrapper != null) - { - meteorMap.put(wrapper, holder); - } - } - - public static void registerMeteor(ItemStack stack, List componentList, float explosionStrength, int radius, int maxWeight) - { - Meteor holder = new Meteor(stack, componentList, explosionStrength, radius, maxWeight); - registerMeteor(stack, holder); - } - - public static boolean hasMeteorForItem(ItemStack stack) - { - ItemStackWrapper wrapper = ItemStackWrapper.getHolder(stack); - return wrapper != null && meteorMap.containsKey(wrapper); - } - - public static Meteor getMeteorForItem(ItemStack stack) - { - ItemStackWrapper wrapper = ItemStackWrapper.getHolder(stack); - return wrapper != null ? meteorMap.get(wrapper) : null; - } - - public static void generateMeteorForItem(ItemStack stack, World world, BlockPos pos, IBlockState fillerBlock, double radiusModifier, double explosionModifier, double fillerChance) - { - Meteor holder = getMeteorForItem(stack); - if (holder != null) - { - holder.generateMeteor(world, pos, fillerBlock, radiusModifier, explosionModifier, fillerChance); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/BloodMagicPacketHandler.java b/src/main/java/WayofTime/bloodmagic/network/BloodMagicPacketHandler.java deleted file mode 100644 index aeb1dad6..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/BloodMagicPacketHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.network; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.relauncher.Side; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.util.ChatUtil; - -public class BloodMagicPacketHandler -{ - public static final SimpleNetworkWrapper INSTANCE = new SimpleNetworkWrapper(Constants.Mod.MODID); - - public static void init() - { - INSTANCE.registerMessage(ChatUtil.PacketNoSpamChat.Handler.class, ChatUtil.PacketNoSpamChat.class, 0, Side.CLIENT); - INSTANCE.registerMessage(ItemRouterButtonPacketProcessor.class, ItemRouterButtonPacketProcessor.class, 1, Side.SERVER); - INSTANCE.registerMessage(PlayerVelocityPacketProcessor.class, PlayerVelocityPacketProcessor.class, 2, Side.CLIENT); - INSTANCE.registerMessage(PlayerFallDistancePacketProcessor.class, PlayerFallDistancePacketProcessor.class, 3, Side.SERVER); - INSTANCE.registerMessage(SigilHoldingPacketProcessor.class, SigilHoldingPacketProcessor.class, 4, Side.SERVER); - INSTANCE.registerMessage(KeyProcessor.class, KeyProcessor.class, 5, Side.SERVER); - INSTANCE.registerMessage(DemonAuraPacketProcessor.class, DemonAuraPacketProcessor.class, 6, Side.CLIENT); - INSTANCE.registerMessage(ItemRouterAmountPacketProcessor.class, ItemRouterAmountPacketProcessor.class, 7, Side.SERVER); - } - - public static void sendToAllAround(IMessage message, TileEntity te, int range) - { - INSTANCE.sendToAllAround(message, new NetworkRegistry.TargetPoint(te.getWorld().provider.getDimension(), te.getPos().getX(), te.getPos().getY(), te.getPos().getZ(), range)); - } - - public static void sendToAllAround(IMessage message, TileEntity te) - { - sendToAllAround(message, te, 64); - } - - public static void sendTo(IMessage message, EntityPlayerMP player) - { - INSTANCE.sendTo(message, player); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/DemonAuraPacketProcessor.java b/src/main/java/WayofTime/bloodmagic/network/DemonAuraPacketProcessor.java deleted file mode 100644 index 69659502..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/DemonAuraPacketProcessor.java +++ /dev/null @@ -1,69 +0,0 @@ -package WayofTime.bloodmagic.network; - -import io.netty.buffer.ByteBuf; -import net.minecraft.network.PacketBuffer; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.proxy.ClientProxy; - -public class DemonAuraPacketProcessor implements IMessage, IMessageHandler -{ - public DemonWillHolder currentWill = new DemonWillHolder(); - - public DemonAuraPacketProcessor() - { - - } - - public DemonAuraPacketProcessor(DemonWillHolder holder) - { - this.currentWill = holder; - } - - @Override - public void fromBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - currentWill.willMap.put(type, buff.readDouble()); - } - } - - @Override - public void toBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - if (currentWill.willMap.containsKey(type)) - { - buff.writeDouble(currentWill.willMap.get(type)); - } else - { - buff.writeDouble(0); - } - } - } - - @Override - public IMessage onMessage(DemonAuraPacketProcessor message, MessageContext ctx) - { - if (ctx.side == Side.CLIENT) - { - message.onMessageFromServer(); - } - return null; - } - - @SideOnly(Side.CLIENT) - public void onMessageFromServer() - { - ClientProxy.currentAura = currentWill; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/ItemRouterAmountPacketProcessor.java b/src/main/java/WayofTime/bloodmagic/network/ItemRouterAmountPacketProcessor.java deleted file mode 100644 index debc75e3..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/ItemRouterAmountPacketProcessor.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.bloodmagic.network; - -import WayofTime.bloodmagic.tile.routing.TileFilteredRoutingNode; -import io.netty.buffer.ByteBuf; -import net.minecraft.network.PacketBuffer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.relauncher.Side; - -public class ItemRouterAmountPacketProcessor implements IMessage, IMessageHandler -{ - private int ghostItemSlot; - private int amount; - private int dimension; - private BlockPos pos; - - public ItemRouterAmountPacketProcessor() - { - - } - - public ItemRouterAmountPacketProcessor(int ghostItemSlot, int amount, BlockPos pos, World world) - { - this.ghostItemSlot = ghostItemSlot; - this.amount = amount; - this.pos = pos; - this.dimension = world.provider.getDimension(); - } - - @Override - public void fromBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - dimension = buff.readInt(); - pos = buff.readBlockPos(); - ghostItemSlot = buff.readInt(); - amount = buff.readInt(); - } - - @Override - public void toBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - buff.writeInt(dimension); - buff.writeBlockPos(pos); - buff.writeInt(ghostItemSlot); - buff.writeInt(amount); - } - - @Override - public IMessage onMessage(ItemRouterAmountPacketProcessor message, MessageContext ctx) - { - if (ctx.side == Side.SERVER) - { - message.onMessageFromClient(); - } - return null; - } - - public void onMessageFromClient() - { - World world = DimensionManager.getWorld(dimension); - if (world != null) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileFilteredRoutingNode) - { - ((TileFilteredRoutingNode) tile).setGhostItemAmount(ghostItemSlot, amount); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/ItemRouterButtonPacketProcessor.java b/src/main/java/WayofTime/bloodmagic/network/ItemRouterButtonPacketProcessor.java deleted file mode 100644 index d3b3dcf8..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/ItemRouterButtonPacketProcessor.java +++ /dev/null @@ -1,85 +0,0 @@ -package WayofTime.bloodmagic.network; - -import WayofTime.bloodmagic.tile.routing.TileFilteredRoutingNode; -import io.netty.buffer.ByteBuf; -import net.minecraft.network.PacketBuffer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.relauncher.Side; - -public class ItemRouterButtonPacketProcessor implements IMessage, IMessageHandler -{ - private int buttonPress; - private int dimension; - private BlockPos pos; - - public ItemRouterButtonPacketProcessor() - { - - } - - public ItemRouterButtonPacketProcessor(int buttonPress, BlockPos pos, World world) - { - this.buttonPress = buttonPress; - this.pos = pos; - this.dimension = world.provider.getDimension(); - } - - @Override - public void fromBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - dimension = buff.readInt(); - pos = buff.readBlockPos(); - buttonPress = buff.readInt(); - } - - @Override - public void toBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - buff.writeInt(dimension); - buff.writeBlockPos(pos); - buff.writeInt(buttonPress); - } - - @Override - public IMessage onMessage(ItemRouterButtonPacketProcessor message, MessageContext ctx) - { - if (ctx.side == Side.SERVER) - { - message.onMessageFromClient(); - } - return null; - } - - public void onMessageFromClient() - { - World world = DimensionManager.getWorld(dimension); - if (world != null) - { - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileFilteredRoutingNode) - { - if (buttonPress >= 6) - { - if (buttonPress == 6) - { - ((TileFilteredRoutingNode) tile).incrementCurrentPriotiryToMaximum(9); - } else if (buttonPress == 7) - { - ((TileFilteredRoutingNode) tile).decrementCurrentPriority(); - } - } else - { - ((TileFilteredRoutingNode) tile).swapFilters(buttonPress); - } - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/KeyProcessor.java b/src/main/java/WayofTime/bloodmagic/network/KeyProcessor.java deleted file mode 100644 index 4cd933f4..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/KeyProcessor.java +++ /dev/null @@ -1,61 +0,0 @@ -package WayofTime.bloodmagic.network; - -import WayofTime.bloodmagic.client.key.IKeybindable; -import WayofTime.bloodmagic.client.key.KeyBindings; -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; - -public class KeyProcessor implements IMessage, IMessageHandler -{ - public int keyId; - public boolean showInChat; - - public KeyProcessor() - { - } - - public KeyProcessor(KeyBindings key, boolean showInChat) - { - this.keyId = key.ordinal(); - this.showInChat = showInChat; - } - - @Override - public void fromBytes(ByteBuf buf) - { - this.keyId = buf.readInt(); - this.showInChat = buf.readBoolean(); - } - - @Override - public void toBytes(ByteBuf buf) - { - buf.writeInt(this.keyId); - buf.writeBoolean(this.showInChat); - } - - @Override - public IMessage onMessage(KeyProcessor msg, MessageContext ctx) - { - EntityPlayer entityPlayer = ctx.getServerHandler().playerEntity; - - if (entityPlayer != null) - { - ItemStack heldStack = entityPlayer.getHeldItemMainhand(); - if (heldStack.getItem() instanceof IKeybindable) - { - if (msg.keyId < 0 || msg.keyId >= KeyBindings.values().length) - { - return null; - } - KeyBindings key = KeyBindings.values()[msg.keyId]; - ((IKeybindable) heldStack.getItem()).onKeyPressed(heldStack, entityPlayer, key, msg.showInChat); - } - } - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/PlayerFallDistancePacketProcessor.java b/src/main/java/WayofTime/bloodmagic/network/PlayerFallDistancePacketProcessor.java deleted file mode 100644 index 2e1deac3..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/PlayerFallDistancePacketProcessor.java +++ /dev/null @@ -1,54 +0,0 @@ -package WayofTime.bloodmagic.network; - -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.network.PacketBuffer; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class PlayerFallDistancePacketProcessor implements IMessage, IMessageHandler -{ - private float fallDistance; - - public PlayerFallDistancePacketProcessor() - { - - } - - public PlayerFallDistancePacketProcessor(float fallDistance) - { - this.fallDistance = fallDistance; - } - - @Override - public void fromBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - fallDistance = buff.readFloat(); - } - - @Override - public void toBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - buff.writeFloat(fallDistance); - } - - @Override - public IMessage onMessage(PlayerFallDistancePacketProcessor message, MessageContext ctx) - { - if (ctx.side == Side.SERVER) - { - message.onMessageFromClient(ctx.getServerHandler().playerEntity); - } - return null; - } - - public void onMessageFromClient(EntityPlayer player) - { - player.fallDistance = fallDistance; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/PlayerVelocityPacketProcessor.java b/src/main/java/WayofTime/bloodmagic/network/PlayerVelocityPacketProcessor.java deleted file mode 100644 index d2a1c13f..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/PlayerVelocityPacketProcessor.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.bloodmagic.network; - -import io.netty.buffer.ByteBuf; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.network.PacketBuffer; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class PlayerVelocityPacketProcessor implements IMessage, IMessageHandler -{ - private double motionX; - private double motionY; - private double motionZ; - - public PlayerVelocityPacketProcessor() - { - - } - - public PlayerVelocityPacketProcessor(double motionX, double motionY, double motionZ) - { - this.motionX = motionX; - this.motionY = motionY; - this.motionZ = motionZ; - } - - @Override - public void fromBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - motionX = buff.readDouble(); - motionY = buff.readDouble(); - motionZ = buff.readDouble(); - } - - @Override - public void toBytes(ByteBuf buffer) - { - PacketBuffer buff = new PacketBuffer(buffer); - buff.writeDouble(motionX); - buff.writeDouble(motionY); - buff.writeDouble(motionZ); - } - - @Override - public IMessage onMessage(PlayerVelocityPacketProcessor message, MessageContext ctx) - { - if (ctx.side == Side.CLIENT) - { - message.onMessageFromServer(); - } - return null; - } - - @SideOnly(Side.CLIENT) - public void onMessageFromServer() - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - player.motionX = motionX; - player.motionY = motionY; - player.motionZ = motionZ; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/network/SigilHoldingPacketProcessor.java b/src/main/java/WayofTime/bloodmagic/network/SigilHoldingPacketProcessor.java deleted file mode 100644 index de688e44..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/SigilHoldingPacketProcessor.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.network; - -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import io.netty.buffer.ByteBuf; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; - -public class SigilHoldingPacketProcessor implements IMessage, IMessageHandler -{ - private int slot; - private int mode; - - public SigilHoldingPacketProcessor() - { - } - - public SigilHoldingPacketProcessor(int slot, int mode) - { - this.slot = slot; - this.mode = mode; - } - - @Override - public void toBytes(ByteBuf buffer) - { - buffer.writeInt(slot); - buffer.writeInt(mode); - } - - @Override - public void fromBytes(ByteBuf buffer) - { - slot = buffer.readInt(); - mode = buffer.readInt(); - } - - @Override - public IMessage onMessage(SigilHoldingPacketProcessor message, MessageContext ctx) - { - ItemStack itemStack = null; - - if (message.slot > -1 && message.slot < 9) - { - itemStack = ctx.getServerHandler().playerEntity.inventory.getStackInSlot(message.slot); - } - - if (itemStack != null) - { - ItemSigilHolding.cycleToNextSigil(itemStack, message.mode); - } - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/network/package-info.java b/src/main/java/WayofTime/bloodmagic/network/package-info.java deleted file mode 100644 index c62e2432..00000000 --- a/src/main/java/WayofTime/bloodmagic/network/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.network; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/package-info.java b/src/main/java/WayofTime/bloodmagic/package-info.java deleted file mode 100644 index 96b3c820..00000000 --- a/src/main/java/WayofTime/bloodmagic/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic; - -import mcp.MethodsReturnNonnullByDefault; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/potion/BMPotionUtils.java b/src/main/java/WayofTime/bloodmagic/potion/BMPotionUtils.java deleted file mode 100644 index 1296ed4b..00000000 --- a/src/main/java/WayofTime/bloodmagic/potion/BMPotionUtils.java +++ /dev/null @@ -1,161 +0,0 @@ -package WayofTime.bloodmagic.potion; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.IGrowable; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTablePotionAugmentRecipe; - -import com.google.common.base.Objects; - -public class BMPotionUtils -{ - public static Random rand = new Random(); - - public static double damageMobAndGrowSurroundingPlants(EntityLivingBase entity, int horizontalRadius, int verticalRadius, double damageRatio, int maxPlantsGrown) - { - World world = entity.worldObj; - if (world.isRemote) - { - return 0; - } - - if (entity.isDead) - { - return 0; - } - - double incurredDamage = 0; - - List growList = new ArrayList(); - - for (int i = 0; i < maxPlantsGrown; i++) - { - BlockPos blockPos = entity.getPosition().add(rand.nextInt(horizontalRadius * 2 + 1) - horizontalRadius, rand.nextInt(verticalRadius * 2 + 1) - verticalRadius, rand.nextInt(horizontalRadius * 2 + 1) - horizontalRadius); - Block block = world.getBlockState(blockPos).getBlock(); - - if (!BloodMagicAPI.getGreenGroveBlacklist().contains(block)) - { - if (block instanceof IPlantable || block instanceof IGrowable) - { - growList.add(blockPos); - } - } - } - - for (BlockPos blockPos : growList) - { - Block block = world.getBlockState(blockPos).getBlock(); -// if (world.rand.nextInt(50) == 0) - { - IBlockState preBlockState = world.getBlockState(blockPos); - for (int n = 0; n < 10; n++) - block.updateTick(world, blockPos, world.getBlockState(blockPos), world.rand); - - IBlockState newState = world.getBlockState(blockPos); - if (!newState.equals(preBlockState)) - { - world.playEvent(2001, blockPos, Block.getIdFromBlock(newState.getBlock()) + (newState.getBlock().getMetaFromState(newState) << 12)); - incurredDamage += damageRatio; - } - } - } - - if (incurredDamage > 0) - { - entity.attackEntityFrom(BloodMagicAPI.getDamageSource(), (float) incurredDamage); - } - - return incurredDamage; - } - - public static double getLengthAugment(ItemStack flaskStack, Potion potion) - { - NBTHelper.checkNBT(flaskStack); - NBTTagCompound tag = flaskStack.getTagCompound(); - - return tag.getDouble(Constants.NBT.POTION_AUGMENT_LENGHT + potion.getName()); - } - - public static void setLengthAugment(ItemStack flaskStack, Potion potion, double value) - { - if (value < 0) - { - value = 0; - } - - NBTHelper.checkNBT(flaskStack); - NBTTagCompound tag = flaskStack.getTagCompound(); - - tag.setDouble(Constants.NBT.POTION_AUGMENT_LENGHT + potion.getName(), value); - } - - public static int getAugmentedLength(int originalLength, double lengthAugment, double powerAugment) - { - return Math.max((int) (originalLength * (Math.pow(8f / 3f, lengthAugment) * Math.pow(0.5, powerAugment))), 1); - } - - /** - * Copied from PotionUtils - * - * @param stack - * @param effects - * @return - */ - public static ItemStack setEffects(ItemStack stack, Collection effects) - { - if (effects.isEmpty()) - { - return stack; - } else - { - NBTTagCompound nbttagcompound = (NBTTagCompound) Objects.firstNonNull(stack.getTagCompound(), new NBTTagCompound()); - NBTTagList nbttaglist = new NBTTagList(); - - for (PotionEffect potioneffect : effects) - { - nbttaglist.appendTag(potioneffect.writeCustomPotionEffectToNBT(new NBTTagCompound())); - } - - nbttagcompound.setTag("CustomPotionEffects", nbttaglist); - stack.setTagCompound(nbttagcompound); - return stack; - } - } - - public static AlchemyTablePotionAugmentRecipe getLengthAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, List inputItems, PotionEffect baseEffect, double lengthAugment) - { - return new AlchemyTablePotionAugmentRecipe(lpDrained, ticksRequired, tierRequired, inputItems, baseEffect, lengthAugment, 0); - } - - public static AlchemyTablePotionAugmentRecipe getPowerAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, List inputItems, PotionEffect baseEffect, int powerAugment) - { - return new AlchemyTablePotionAugmentRecipe(lpDrained, ticksRequired, tierRequired, inputItems, baseEffect, 0, powerAugment); - } - - public static AlchemyTablePotionAugmentRecipe getLengthAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect, double lengthAugment) - { - return new AlchemyTablePotionAugmentRecipe(lpDrained, ticksRequired, tierRequired, inputItem, baseEffect, lengthAugment, 0); - } - - public static AlchemyTablePotionAugmentRecipe getPowerAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect, int powerAugment) - { - return new AlchemyTablePotionAugmentRecipe(lpDrained, ticksRequired, tierRequired, inputItem, baseEffect, 0, powerAugment); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/potion/PotionBloodMagic.java b/src/main/java/WayofTime/bloodmagic/potion/PotionBloodMagic.java deleted file mode 100644 index 7af491ad..00000000 --- a/src/main/java/WayofTime/bloodmagic/potion/PotionBloodMagic.java +++ /dev/null @@ -1,65 +0,0 @@ -package WayofTime.bloodmagic.potion; - -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class PotionBloodMagic extends Potion -{ - public static ResourceLocation texture = new ResourceLocation(Constants.Mod.MODID, "textures/misc/potions.png"); - - public PotionBloodMagic(String name, ResourceLocation texture, boolean badEffect, int potionColor, int iconIndexX, int iconIndexY) - { - super(badEffect, potionColor); - this.setPotionName(name); - this.setIconIndex(iconIndexX, iconIndexY); - } - - @Override - public boolean shouldRenderInvText(PotionEffect effect) - { - return true; - } - - public PotionEffect apply(EntityLivingBase entity, int duration) - { - return apply(entity, duration, 0); - } - - public PotionEffect apply(EntityLivingBase entity, int duration, int level) - { - PotionEffect effect = new PotionEffect(this, duration, level, false, false); - entity.addPotionEffect(effect); - return effect; - } - - public int getLevel(EntityLivingBase entity) - { - PotionEffect effect = entity.getActivePotionEffect(this); - if (effect != null) - { - return effect.getAmplifier(); - } - return 0; - } - - @Override - public boolean shouldRender(PotionEffect effect) - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public int getStatusIconIndex() - { - Minecraft.getMinecraft().renderEngine.bindTexture(texture); - - return super.getStatusIconIndex(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/potion/PotionEventHandlers.java b/src/main/java/WayofTime/bloodmagic/potion/PotionEventHandlers.java deleted file mode 100644 index 58813ea4..00000000 --- a/src/main/java/WayofTime/bloodmagic/potion/PotionEventHandlers.java +++ /dev/null @@ -1,129 +0,0 @@ -package WayofTime.bloodmagic.potion; - -import WayofTime.bloodmagic.registry.ModPotions; -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; -import net.minecraftforge.event.entity.living.LivingAttackEvent; -import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - -import java.util.List; - -public class PotionEventHandlers -{ - public PotionEventHandlers() - { - MinecraftForge.EVENT_BUS.register(this); - } - - @SubscribeEvent - public void onLivingJumpEvent(LivingEvent.LivingJumpEvent event) - { - if (event.getEntityLiving().isPotionActive(ModPotions.boost)) - { - int i = event.getEntityLiving().getActivePotionEffect(ModPotions.boost).getAmplifier(); - event.getEntityLiving().motionY += (0.1f) * (2 + i); - } - - // if (event.getEntityLiving().isPotionActive(ModPotions.heavyHeart)) { - // event.getEntityLiving().motionY = 0; - // } - } - - @SubscribeEvent - public void onEntityUpdate(LivingEvent.LivingUpdateEvent event) - { -// if (event.getEntityLiving().isPotionActive(ModPotions.boost)) -// { -// int i = event.getEntityLiving().getActivePotionEffect(ModPotions.boost).getAmplifier(); -// { -// float percentIncrease = (i + 1) * 0.05f; -// -// if (event.getEntityLiving() instanceof EntityPlayer) -// { -// EntityPlayer entityPlayer = (EntityPlayer) event.getEntityLiving(); -// -// if ((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F) -// entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease); -// } -// } -// } - - if (event.getEntityLiving().isPotionActive(ModPotions.whirlwind)) - { - int d0 = 3; - AxisAlignedBB axisAlignedBB = new AxisAlignedBB(event.getEntityLiving().posX - 0.5, event.getEntityLiving().posY - 0.5, event.getEntityLiving().posZ - 0.5, event.getEntityLiving().posX + 0.5, event.getEntityLiving().posY + 0.5, event.getEntityLiving().posZ + 0.5).expand(d0, d0, d0); - List entityList = event.getEntityLiving().worldObj.getEntitiesWithinAABB(Entity.class, axisAlignedBB); - - for (Object thing : entityList) - { - Entity projectile = (Entity) thing; - - if (projectile == null) - continue; - if (!(projectile instanceof IProjectile)) - continue; - - Entity throwingEntity = null; - - if (projectile instanceof EntityArrow) - throwingEntity = ((EntityArrow) projectile).shootingEntity; - else if (projectile instanceof EntityThrowable) - throwingEntity = ((EntityThrowable) projectile).getThrower(); - - if (throwingEntity != null && throwingEntity.equals(event.getEntityLiving())) - continue; - - double delX = projectile.posX - event.getEntityLiving().posX; - double delY = projectile.posY - event.getEntityLiving().posY; - double delZ = projectile.posZ - event.getEntityLiving().posZ; - - double angle = (delX * projectile.motionX + delY * projectile.motionY + delZ * projectile.motionZ) / (Math.sqrt(delX * delX + delY * delY + delZ * delZ) * Math.sqrt(projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ)); - - angle = Math.acos(angle); - - if (angle < 3 * (Math.PI / 4)) - continue; // angle is < 135 degrees - - if (throwingEntity != null) - { - delX = -projectile.posX + throwingEntity.posX; - delY = -projectile.posY + (throwingEntity.posY + throwingEntity.getEyeHeight()); - delZ = -projectile.posZ + throwingEntity.posZ; - } - - double curVel = Math.sqrt(delX * delX + delY * delY + delZ * delZ); - - delX /= curVel; - delY /= curVel; - delZ /= curVel; - double newVel = Math.sqrt(projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ); - projectile.motionX = newVel * delX; - projectile.motionY = newVel * delY; - projectile.motionZ = newVel * delZ; - } - } - } - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onPlayerDamageEvent(LivingAttackEvent event) - { - if (event.getEntityLiving().isPotionActive(ModPotions.whirlwind) && event.isCancelable() && event.getSource().isProjectile()) - event.setCanceled(true); - } - - @SubscribeEvent - public void onEndermanTeleportEvent(EnderTeleportEvent event) - { - if (event.getEntityLiving().isPotionActive(ModPotions.planarBinding) && event.isCancelable()) - { - event.setCanceled(true); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/potion/item/ItemPotionFlask.java b/src/main/java/WayofTime/bloodmagic/potion/item/ItemPotionFlask.java deleted file mode 100644 index d96ae079..00000000 --- a/src/main/java/WayofTime/bloodmagic/potion/item/ItemPotionFlask.java +++ /dev/null @@ -1,116 +0,0 @@ -package WayofTime.bloodmagic.potion.item; - -import java.util.ArrayList; -import java.util.List; - -import WayofTime.bloodmagic.util.helper.TextHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.potion.PotionUtils; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.client.IVariantProvider; - -public class ItemPotionFlask extends Item implements IVariantProvider -{ - public ItemPotionFlask() - { - setUnlocalizedName(Constants.Mod.MODID + ".potionFlask"); - setCreativeTab(BloodMagic.tabBloodMagic); - setMaxStackSize(1); - setMaxDamage(8); - setNoRepair(); - } - - @Override - public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase entityLiving) - { - EntityPlayer player = entityLiving instanceof EntityPlayer ? (EntityPlayer) entityLiving : null; - - int remainingUses = stack.getMaxDamage() - stack.getItemDamage(); - if (remainingUses <= 0) - { - return stack; - } - - if (player == null || !player.capabilities.isCreativeMode) - { - stack.setItemDamage(stack.getItemDamage() + 1); - } - - if (!world.isRemote) - { - for (PotionEffect potioneffect : PotionUtils.getEffectsFromStack(stack)) - { - entityLiving.addPotionEffect(new PotionEffect(potioneffect)); - } - } - - return stack; - } - - @Override - public int getMaxItemUseDuration(ItemStack stack) - { - return 32; - } - - @Override - public EnumAction getItemUseAction(ItemStack stack) - { - return EnumAction.DRINK; - } - - @Override - public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) - { - int remainingUses = stack.getMaxDamage() - stack.getItemDamage(); - if (remainingUses <= 0) - { - return new ActionResult(EnumActionResult.PASS, stack); - } - player.setActiveHand(hand); - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) - { - PotionUtils.addPotionTooltip(stack, tooltip, 1.0F); - tooltip.add(""); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.potion.uses", stack.getMaxDamage() - stack.getItemDamage())); - } - -// @Override -// @SideOnly(Side.CLIENT) -// public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) -// { -// for (PotionType potiontype : PotionType.REGISTRY) -// { -// subItems.add(PotionUtils.addPotionToItemStack(new ItemStack(itemIn), potiontype)); -// } -// } - - @Override - public List> getVariants() - { - List> ret = new ArrayList>(); - ret.add(new ImmutablePair(0, "type=normal")); - return ret; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/potion/package-info.java b/src/main/java/WayofTime/bloodmagic/potion/package-info.java deleted file mode 100644 index 683d1cac..00000000 --- a/src/main/java/WayofTime/bloodmagic/potion/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.potion; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java b/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java deleted file mode 100644 index 9c0954d4..00000000 --- a/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java +++ /dev/null @@ -1,231 +0,0 @@ -package WayofTime.bloodmagic.proxy; - -import java.awt.Color; - -import WayofTime.bloodmagic.client.key.KeyBindings; -import WayofTime.bloodmagic.client.render.block.*; -import WayofTime.bloodmagic.tile.*; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.client.renderer.color.IItemColor; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.entity.RenderPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.client.model.ModelLoaderRegistry; -import net.minecraftforge.client.model.animation.AnimationTESR; -import net.minecraftforge.client.model.obj.OBJLoader; -import net.minecraftforge.common.animation.Event; -import net.minecraftforge.common.animation.ITimeValue; -import net.minecraftforge.common.model.animation.IAnimationStateMachine; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.client.registry.RenderingRegistry; -import net.minecraftforge.fml.common.ObfuscationReflectionHelper; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.client.IMeshProvider; -import WayofTime.bloodmagic.client.IVariantProvider; -import WayofTime.bloodmagic.client.helper.ShaderHelper; -import WayofTime.bloodmagic.client.hud.HUDElementDemonWillAura; -import WayofTime.bloodmagic.client.hud.HUDElementHolding; -import WayofTime.bloodmagic.client.render.LayerBloodElytra; -import WayofTime.bloodmagic.client.render.entity.BloodLightRenderFactory; -import WayofTime.bloodmagic.client.render.entity.CorruptedChickenRenderFactory; -import WayofTime.bloodmagic.client.render.entity.CorruptedSheepRenderFactory; -import WayofTime.bloodmagic.client.render.entity.CorruptedSpiderRenderFactory; -import WayofTime.bloodmagic.client.render.entity.CorruptedZombieRenderFactory; -import WayofTime.bloodmagic.client.render.entity.MeteorRenderFactory; -import WayofTime.bloodmagic.client.render.entity.MimicRenderFactory; -import WayofTime.bloodmagic.client.render.entity.SentientArrowRenderFactory; -import WayofTime.bloodmagic.client.render.entity.SentientSpecterRenderFactory; -import WayofTime.bloodmagic.client.render.entity.SoulSnareRenderFactory; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedZombie; -import WayofTime.bloodmagic.entity.mob.EntityMimic; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.entity.projectile.EntityBloodLight; -import WayofTime.bloodmagic.entity.projectile.EntityMeteor; -import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; -import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.tile.routing.TileRoutingNode; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelper; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2; - -import com.google.common.collect.ImmutableMap; - -public class ClientProxy extends CommonProxy -{ - public static DemonWillHolder currentAura = new DemonWillHolder(); - - private InventoryRenderHelper renderHelper; - private InventoryRenderHelperV2 renderHelperV2; - - @Override - public InventoryRenderHelper getRenderHelper() - { - return renderHelper; - } - - @Override - public InventoryRenderHelperV2 getRenderHelperV2() - { - return renderHelperV2; - } - - @Override - public void preInit() - { - super.preInit(); - - renderHelper = new InventoryRenderHelper(Constants.Mod.DOMAIN); - renderHelperV2 = new InventoryRenderHelperV2(Constants.Mod.DOMAIN); - - OBJLoader.INSTANCE.addDomain(Constants.Mod.MODID); - - ModBlocks.initRenders(); - ModItems.initRenders(); - - ClientRegistry.bindTileEntitySpecialRenderer(TileInversionPillar.class, new AnimationTESR() - { - @Override - public void handleEvents(TileInversionPillar chest, float time, Iterable pastEvents) - { - chest.handleEvents(time, pastEvents); - } - }); - - ClientRegistry.bindTileEntitySpecialRenderer(TileAlchemyArray.class, new RenderAlchemyArray()); - ClientRegistry.bindTileEntitySpecialRenderer(TileAltar.class, new RenderAltar()); - ClientRegistry.bindTileEntitySpecialRenderer(TileRoutingNode.class, new RenderItemRoutingNode()); - ClientRegistry.bindTileEntitySpecialRenderer(TileDemonCrucible.class, new RenderDemonCrucible()); - ClientRegistry.bindTileEntitySpecialRenderer(TileMimic.class, new RenderMimic()); - ClientRegistry.bindTileEntitySpecialRenderer(TileBloodTank.class, new RenderBloodTank()); - - // Initialize key-binds during startup so they load correctly - for (KeyBindings key : KeyBindings.values()) - key.getKey(); - } - - @Override - public void registerRenderers() - { - RenderingRegistry.registerEntityRenderingHandler(EntitySoulSnare.class, new SoulSnareRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntitySentientArrow.class, new SentientArrowRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityBloodLight.class, new BloodLightRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new MeteorRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntitySentientSpecter.class, new SentientSpecterRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityMimic.class, new MimicRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityCorruptedZombie.class, new CorruptedZombieRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityCorruptedSheep.class, new CorruptedSheepRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityCorruptedChicken.class, new CorruptedChickenRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntityCorruptedSpider.class, new CorruptedSpiderRenderFactory()); - - ShaderHelper.init(); - } - - @Override - public void init() - { - Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() - { - @Override - public int getColorFromItemstack(ItemStack stack, int tintIndex) - { - try - { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.COLOR)) - if (tintIndex == 1) - return Color.decode(stack.getTagCompound().getString(Constants.NBT.COLOR)).getRGB(); - } catch (NumberFormatException e) - { - return -1; - } - return -1; - } - }, ModItems.SIGIL_HOLDING); - Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() - { - @Override - public int getColorFromItemstack(ItemStack stack, int tintIndex) - { - if (tintIndex != 0 && tintIndex != 2) - return -1; - - return PotionUtils.getPotionColorFromEffectList(PotionUtils.getEffectsFromStack(stack)); - } - }, ModItems.POTION_FLASK); - - addElytraLayer(); - } - - @Override - public void postInit() - { - new HUDElementHolding(); - new HUDElementDemonWillAura(); - } - - @Override - public void tryHandleBlockModel(Block block, String name) - { - if (block instanceof IVariantProvider) - { - IVariantProvider variantProvider = (IVariantProvider) block; - for (Pair variant : variantProvider.getVariants()) - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), variant.getLeft(), new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, name), variant.getRight())); - } - } - - @Override - public void tryHandleItemModel(Item item, String name) - { - if (item instanceof IMeshProvider) - { - IMeshProvider meshProvider = (IMeshProvider) item; - ModelLoader.setCustomMeshDefinition(item, meshProvider.getMeshDefinition()); - ResourceLocation resourceLocation = meshProvider.getCustomLocation(); - if (resourceLocation == null) - resourceLocation = new ResourceLocation(Constants.Mod.MODID, "item/" + name); - for (String variant : meshProvider.getVariants()) - ModelLoader.registerItemVariants(item, new ModelResourceLocation(resourceLocation, variant)); - } else if (item instanceof IVariantProvider) - { - IVariantProvider variantProvider = (IVariantProvider) item; - for (Pair variant : variantProvider.getVariants()) - ModelLoader.setCustomModelResourceLocation(item, variant.getLeft(), new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), variant.getRight())); - } - } - - private void addElytraLayer() - { - RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); - try - { - RenderPlayer renderPlayer = ObfuscationReflectionHelper.getPrivateValue(RenderManager.class, renderManager, "playerRenderer", "field_178637_m"); - renderPlayer.addLayer(new LayerBloodElytra(renderPlayer)); - BloodMagic.instance.getLogger().info("Elytra layer added"); - } catch (Exception e) - { - BloodMagic.instance.getLogger().error("Failed to set custom Elytra Layer for Elytra Living Armour Upgrade."); - BloodMagic.instance.getLogger().error(e.getLocalizedMessage()); - } - } - - @Override - public IAnimationStateMachine load(ResourceLocation location, ImmutableMap parameters) - { - return ModelLoaderRegistry.loadASM(location, parameters); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java b/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java deleted file mode 100644 index c178e638..00000000 --- a/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.bloodmagic.proxy; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.animation.ITimeValue; -import net.minecraftforge.common.capabilities.CapabilityManager; -import net.minecraftforge.common.model.animation.IAnimationStateMachine; -import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.bloodmagic.api.ritual.CapabilityRuneType; -import WayofTime.bloodmagic.api.ritual.IRitualStone; -import WayofTime.bloodmagic.api.teleport.TeleportQueue; -import WayofTime.bloodmagic.fuel.FuelHandler; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelper; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2; - -import com.google.common.collect.ImmutableMap; - -public class CommonProxy -{ - @Deprecated - public InventoryRenderHelper getRenderHelper() - { - return null; - } - - public InventoryRenderHelperV2 getRenderHelperV2() - { - return null; - } - - public void preInit() - { - MinecraftForge.EVENT_BUS.register(TeleportQueue.getInstance()); - GameRegistry.registerFuelHandler(new FuelHandler()); - registerRenderers(); - } - - public void init() - { - CapabilityManager.INSTANCE.register(IRitualStone.Tile.class, new CapabilityRuneType.RuneTypeStorage(), new CapabilityRuneType.Factory()); - } - - public void postInit() - { - - } - - public void registerRenderers() - { - - } - - public Object beamCont(World worldObj, double xi, double yi, double zi, double tx, double ty, double tz, int type, int color, boolean reverse, float endmod, Object input, int impact) - { - // TODO Auto-generated method stub - return null; - } - - public void tryHandleBlockModel(Block block, String name) - { - // NO-OP - } - - public void tryHandleItemModel(Item item, String name) - { - // NO-OP - } - - public IAnimationStateMachine load(ResourceLocation location, ImmutableMap parameters) - { - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/proxy/package-info.java b/src/main/java/WayofTime/bloodmagic/proxy/package-info.java deleted file mode 100644 index f4ee72c8..00000000 --- a/src/main/java/WayofTime/bloodmagic/proxy/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.proxy; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTableDyeableRecipe.java b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTableDyeableRecipe.java deleted file mode 100644 index 465ecef2..00000000 --- a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTableDyeableRecipe.java +++ /dev/null @@ -1,144 +0,0 @@ -package WayofTime.bloodmagic.recipe.alchemyTable; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.init.Items; -import net.minecraft.item.EnumDyeColor; -import net.minecraft.item.ItemBanner; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; - -public class AlchemyTableDyeableRecipe extends AlchemyTableRecipe -{ - private ItemStack inputItem; - - public AlchemyTableDyeableRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem) - { - super(inputItem, lpDrained, ticksRequired, tierRequired); - - ArrayList validDyes = new ArrayList(); - validDyes.add(new ItemStack(Items.NAME_TAG)); - validDyes.add(new ItemStack(Items.DYE, 1, OreDictionary.WILDCARD_VALUE)); - - ArrayList recipe = new ArrayList(); - recipe.add(inputItem); - recipe.add(validDyes); - - this.input = recipe; - - this.inputItem = inputItem; - } - - @Override - public ItemStack getRecipeOutput(List inputList) - { - int nameTagOrDyeLocation = -1; - int inputItemLocation = -1; - for (int x = 0; x < inputList.size(); x++) - { - ItemStack slot = inputList.get(x); - - if (slot != null) - { - boolean match = OreDictionary.itemMatches(inputItem, slot, false); - - if (match) - { - inputItemLocation = x; - continue; - } else - { - if (slot.getItem() == Items.NAME_TAG || slot.getItem() == Items.DYE) - { - nameTagOrDyeLocation = x; - continue; - } - } - } - } - - if (nameTagOrDyeLocation != -1 && inputItemLocation != -1) - { - ItemStack tagOrDyeStack = inputList.get(nameTagOrDyeLocation); - ItemStack inputStack = inputList.get(inputItemLocation); - - if (inputStack == null || tagOrDyeStack == null) - { - return output.copy(); - } - - ItemStack outputStack = inputStack.copy(); - - if (tagOrDyeStack.getItem() == Items.NAME_TAG) - { - if (!outputStack.hasTagCompound()) - { - outputStack.setTagCompound(new NBTTagCompound()); - } - - outputStack.getTagCompound().setString(Constants.NBT.COLOR, tagOrDyeStack.getDisplayName()); - - return outputStack; - } else - { - EnumDyeColor dyeColor = ItemBanner.getBaseColor(tagOrDyeStack); - if (!outputStack.hasTagCompound()) - { - outputStack.setTagCompound(new NBTTagCompound()); - } - - outputStack.getTagCompound().setString(Constants.NBT.COLOR, String.valueOf(dyeColor.getMapColor().colorValue)); - - return outputStack; - } - } - - return output.copy(); - } - - @Override - public boolean matches(List checkedList, World world, BlockPos pos) - { - boolean hasNameTagOrDye = false; - boolean hasInputItem = false; - - for (int x = 0; x < checkedList.size(); x++) - { - ItemStack slot = checkedList.get(x); - - if (slot != null) - { - boolean match = OreDictionary.itemMatches(inputItem, slot, false); - - if (match && hasInputItem) - { - return false; - } else if (match) - { - hasInputItem = true; - continue; - } else - { - if (slot.getItem() == Items.NAME_TAG || slot.getItem() == Items.DYE) - { - if (hasNameTagOrDye) - { - return false; - } else - { - hasNameTagOrDye = true; - } - } - } - } - } - - return hasNameTagOrDye && hasInputItem; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java deleted file mode 100644 index 4769bcc9..00000000 --- a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.bloodmagic.recipe.alchemyTable; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.potion.PotionUtils; -import WayofTime.bloodmagic.potion.BMPotionUtils; -import WayofTime.bloodmagic.registry.ModItems; - -public class AlchemyTablePotionAugmentRecipe extends AlchemyTablePotionRecipe -{ - protected double lengthAugment = 0; - protected int powerAugment = 0; - protected Potion wantedPotion; - - public AlchemyTablePotionAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, List inputItems, PotionEffect baseEffect, double lengthAugment, int powerAugment) - { - super(lpDrained, ticksRequired, tierRequired, inputItems, baseEffect); - - ArrayList recipe = new ArrayList(); - for (ItemStack stack : inputItems) - { - recipe.add(stack); - } - recipe.add(getAugmentedPotionFlask(baseEffect)); - - this.input = recipe; - - this.wantedPotion = baseEffect.getPotion(); - this.lengthAugment = lengthAugment; - this.powerAugment = powerAugment; - } - - public AlchemyTablePotionAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect, double lengthAugment, int powerAugment) - { - this(lpDrained, ticksRequired, tierRequired, Arrays.asList(inputItem), baseEffect, lengthAugment, powerAugment); - } - - @Override - public boolean isPotionFlaskValidInput(ItemStack stack) - { - List effectList = PotionUtils.getEffectsFromStack(stack); - for (PotionEffect eff : effectList) - { - if (eff.getPotion() == wantedPotion) - { - double currentAugment = BMPotionUtils.getLengthAugment(stack, wantedPotion); - - return currentAugment < lengthAugment || eff.getAmplifier() < powerAugment; - } - } - - return false; - } - - @Override - public ItemStack getModifiedFlaskForInput(ItemStack inputStack) - { - if (inputStack == null) - { - ItemStack outputStack = new ItemStack(ModItems.POTION_FLASK); - - List effectList = new ArrayList(); - int potionLength = wantedPotion.isInstant() ? 1 : BMPotionUtils.getAugmentedLength(baseEffect.getDuration(), lengthAugment, powerAugment - baseEffect.getAmplifier()); - effectList.add(new PotionEffect(wantedPotion, potionLength, powerAugment - baseEffect.getAmplifier())); - - BMPotionUtils.setEffects(outputStack, effectList); - - return outputStack; - } - - ItemStack outputStack = inputStack.copy(); - - List effectList = PotionUtils.getEffectsFromStack(outputStack); - List newEffectList = new ArrayList(); - - Iterator effectIterator = effectList.iterator(); - while (effectIterator.hasNext()) - { - PotionEffect effect = effectIterator.next(); - if (effect.getPotion() == wantedPotion) - { - double currentLengthAugment = Math.max(lengthAugment, BMPotionUtils.getLengthAugment(outputStack, wantedPotion)); - int currentPowerAugment = Math.max(powerAugment, effect.getAmplifier()); - int potionLength = wantedPotion.isInstant() ? 1 : BMPotionUtils.getAugmentedLength(baseEffect.getDuration(), currentLengthAugment, currentPowerAugment); - newEffectList.add(new PotionEffect(wantedPotion, potionLength, currentPowerAugment)); - BMPotionUtils.setLengthAugment(outputStack, wantedPotion, currentLengthAugment); - } else - { - newEffectList.add(effect); - } - } - - BMPotionUtils.setEffects(outputStack, newEffectList); - - return outputStack; - } - - public static ItemStack getAugmentedPotionFlask(PotionEffect baseEffect) - { - ItemStack outputStack = new ItemStack(ModItems.POTION_FLASK); - - List effectList = new ArrayList(); - effectList.add(baseEffect); - - BMPotionUtils.setEffects(outputStack, effectList); - - return outputStack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java deleted file mode 100644 index 48d9c4bf..00000000 --- a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java +++ /dev/null @@ -1,174 +0,0 @@ -package WayofTime.bloodmagic.recipe.alchemyTable; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.potion.PotionUtils; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; -import WayofTime.bloodmagic.registry.ModItems; - -public class AlchemyTablePotionRecipe extends AlchemyTableRecipe -{ - public static final ItemStack basePotionFlaskStack = new ItemStack(ModItems.POTION_FLASK, 1, OreDictionary.WILDCARD_VALUE); - protected PotionEffect baseEffect; - - public static final int temporaryMaximumEffectsOnThePotionFlaskYesThisIsALongFieldItIsJustSoIRemember = 3; - - protected double baseAddedImpurity = 5; - - public AlchemyTablePotionRecipe(int lpDrained, int ticksRequired, int tierRequired, List inputItems, PotionEffect baseEffect) - { - super(basePotionFlaskStack, lpDrained, ticksRequired, tierRequired); - - ArrayList recipe = new ArrayList(); - for (ItemStack stack : inputItems) - { - recipe.add(stack); - } - recipe.add(basePotionFlaskStack); - - this.input = recipe; - this.baseEffect = baseEffect; - } - - public AlchemyTablePotionRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect) - { - this(lpDrained, ticksRequired, tierRequired, Arrays.asList(inputItem), baseEffect); - } - - @Override - public ItemStack getRecipeOutput(List inputList) - { - int flaskLocation = -1; - for (int x = 0; x < inputList.size(); x++) - { - ItemStack slot = inputList.get(x); - - if (slot != null) - { - boolean match = slot.getItem() == ModItems.POTION_FLASK; - - if (match) - { - flaskLocation = x; - continue; - } - } - } - - if (flaskLocation != -1) - { - return getModifiedFlaskForInput(inputList.get(flaskLocation)); - } - - return getModifiedFlaskForInput(null); - } - - @Override - public boolean matches(List checkedList, World world, BlockPos pos) - { - ArrayList required = new ArrayList(input); - - for (int x = 0; x < checkedList.size(); x++) - { - ItemStack slot = checkedList.get(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack) next, slot, false); - } else if (next instanceof List) - { - Iterator itr = ((List) next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) - { - if (next instanceof ItemStack && ((ItemStack) next).getItem() == ModItems.POTION_FLASK) - { - if (!isPotionFlaskValidInput(slot)) - { - break; - } - } - - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - public boolean isPotionFlaskValidInput(ItemStack stack) - { - List effectList = PotionUtils.getEffectsFromStack(stack); - if (effectList.size() >= temporaryMaximumEffectsOnThePotionFlaskYesThisIsALongFieldItIsJustSoIRemember) - { - return false; - } - - for (PotionEffect eff : effectList) - { - if (eff.getPotion() == baseEffect.getPotion()) - { - return false; - } - } - - return true; - } - - public ItemStack getModifiedFlaskForInput(ItemStack inputStack) - { - if (inputStack == null) - { - ItemStack outputStack = new ItemStack(ModItems.POTION_FLASK); - - List effectList = new ArrayList(); - effectList.add(baseEffect); - - PotionUtils.appendEffects(outputStack, effectList); - - return outputStack; - } - - ItemStack outputStack = inputStack.copy(); - - List effectList = PotionUtils.getEffectsFromStack(outputStack); - effectList.add(baseEffect); - - PotionUtils.appendEffects(outputStack, effectList); - - return outputStack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModArmourTrackers.java b/src/main/java/WayofTime/bloodmagic/registry/ModArmourTrackers.java deleted file mode 100644 index ca58b1b7..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModArmourTrackers.java +++ /dev/null @@ -1,118 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeBattleHungry; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeCrippledArm; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeDigSlowdown; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeDisoriented; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeMeleeDecrease; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeQuenched; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeSlippery; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeSlowHeal; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeSlowness; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeStormTrooper; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerArrowShot; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerCriticalStrike; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerDigging; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerExperience; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFallProtect; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFireResist; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFood; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGraveDigger; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGrimReaperSprint; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerHealthboost; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerJump; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerMeleeDamage; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerMovement; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerNightSight; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerPhysicalProtect; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerPoison; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerRepairing; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSelfSacrifice; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSolarPowered; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSprintAttack; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerStepAssist; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowShot; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeCriticalStrike; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeDigging; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeElytra; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeExperience; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFallProtect; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFireResist; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGraveDigger; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGrimReaperSprint; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeHealthboost; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeJump; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeKnockbackResist; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeMeleeDamage; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeNightSight; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradePhysicalProtect; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradePoisonResist; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeRepairing; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSelfSacrifice; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSolarPowered; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSpeed; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSprintAttack; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeStepAssist; - -public class ModArmourTrackers -{ - public static void init() - { - LivingArmourHandler.registerStatTracker(StatTrackerMovement.class); - LivingArmourHandler.registerStatTracker(StatTrackerDigging.class); - LivingArmourHandler.registerStatTracker(StatTrackerPoison.class); - LivingArmourHandler.registerStatTracker(StatTrackerSelfSacrifice.class); - LivingArmourHandler.registerStatTracker(StatTrackerFood.class); - LivingArmourHandler.registerStatTracker(StatTrackerPhysicalProtect.class); - LivingArmourHandler.registerStatTracker(StatTrackerHealthboost.class); - LivingArmourHandler.registerStatTracker(StatTrackerMeleeDamage.class); - LivingArmourHandler.registerStatTracker(StatTrackerArrowShot.class); - LivingArmourHandler.registerStatTracker(StatTrackerGrimReaperSprint.class); - LivingArmourHandler.registerStatTracker(StatTrackerSolarPowered.class); - LivingArmourHandler.registerStatTracker(StatTrackerExperience.class); - LivingArmourHandler.registerStatTracker(StatTrackerJump.class); - LivingArmourHandler.registerStatTracker(StatTrackerFallProtect.class); - LivingArmourHandler.registerStatTracker(StatTrackerGraveDigger.class); - LivingArmourHandler.registerStatTracker(StatTrackerStepAssist.class); - LivingArmourHandler.registerStatTracker(StatTrackerSprintAttack.class); - LivingArmourHandler.registerStatTracker(StatTrackerCriticalStrike.class); - LivingArmourHandler.registerStatTracker(StatTrackerFireResist.class); - LivingArmourHandler.registerStatTracker(StatTrackerNightSight.class); - LivingArmourHandler.registerStatTracker(StatTrackerRepairing.class); - - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSpeed(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeDigging(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradePoisonResist(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSelfSacrifice(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeKnockbackResist(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradePhysicalProtect(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeHealthboost(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeMeleeDamage(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeArrowShot(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeStepAssist(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeGrimReaperSprint(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSolarPowered(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeExperience(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeJump(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeFallProtect(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeGraveDigger(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSprintAttack(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeCriticalStrike(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeElytra(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeFireResist(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeNightSight(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeRepairing(0)); - - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSlowness(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeCrippledArm(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSlippery(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeBattleHungry(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeQuenched(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeMeleeDecrease(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeDisoriented(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeDigSlowdown(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeStormTrooper(0)); - LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeSlowHeal(0)); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java b/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java deleted file mode 100644 index b76b8028..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java +++ /dev/null @@ -1,293 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.item.ItemBlock; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.block.BlockAlchemyArray; -import WayofTime.bloodmagic.block.BlockAlchemyTable; -import WayofTime.bloodmagic.block.BlockAltar; -import WayofTime.bloodmagic.block.BlockBloodLight; -import WayofTime.bloodmagic.block.BlockBloodRune; -import WayofTime.bloodmagic.block.BlockBloodStoneBrick; -import WayofTime.bloodmagic.block.BlockBloodTank; -import WayofTime.bloodmagic.block.BlockCrystal; -import WayofTime.bloodmagic.block.BlockDemonBase; -import WayofTime.bloodmagic.block.BlockDemonCrucible; -import WayofTime.bloodmagic.block.BlockDemonCrystal; -import WayofTime.bloodmagic.block.BlockDemonCrystallizer; -import WayofTime.bloodmagic.block.BlockDemonLight; -import WayofTime.bloodmagic.block.BlockDemonPillarBase; -import WayofTime.bloodmagic.block.BlockDemonPillarCapBase; -import WayofTime.bloodmagic.block.BlockDemonPylon; -import WayofTime.bloodmagic.block.BlockDemonStairsBase; -import WayofTime.bloodmagic.block.BlockDemonWallBase; -import WayofTime.bloodmagic.block.BlockDimensionalPortal; -import WayofTime.bloodmagic.block.BlockIncenseAltar; -import WayofTime.bloodmagic.block.BlockInputRoutingNode; -import WayofTime.bloodmagic.block.BlockInversionPillar; -import WayofTime.bloodmagic.block.BlockInversionPillarEnd; -import WayofTime.bloodmagic.block.BlockItemRoutingNode; -import WayofTime.bloodmagic.block.BlockLifeEssence; -import WayofTime.bloodmagic.block.BlockMasterRoutingNode; -import WayofTime.bloodmagic.block.BlockMimic; -import WayofTime.bloodmagic.block.BlockOutputRoutingNode; -import WayofTime.bloodmagic.block.BlockPath; -import WayofTime.bloodmagic.block.BlockPhantom; -import WayofTime.bloodmagic.block.BlockRitualController; -import WayofTime.bloodmagic.block.BlockRitualStone; -import WayofTime.bloodmagic.block.BlockSoulForge; -import WayofTime.bloodmagic.block.BlockSpectral; -import WayofTime.bloodmagic.block.BlockTeleposer; -import WayofTime.bloodmagic.block.enums.EnumBloodRune; -import WayofTime.bloodmagic.block.enums.EnumBrickSize; -import WayofTime.bloodmagic.block.enums.EnumDemonBlock1; -import WayofTime.bloodmagic.block.enums.EnumDemonBlock2; -import WayofTime.bloodmagic.block.enums.EnumDemonBlock3; -import WayofTime.bloodmagic.block.enums.EnumInversionCap; -import WayofTime.bloodmagic.block.enums.EnumMimic; -import WayofTime.bloodmagic.block.enums.EnumPath; -import WayofTime.bloodmagic.block.enums.EnumRitualController; -import WayofTime.bloodmagic.block.enums.EnumSubWillType; -import WayofTime.bloodmagic.block.enums.EnumSubWillType1; -import WayofTime.bloodmagic.block.enums.EnumSubWillType2; -import WayofTime.bloodmagic.block.enums.EnumSubWillType3; -import WayofTime.bloodmagic.block.enums.EnumWillWall; -import WayofTime.bloodmagic.item.block.ItemBlockAlchemyTable; -import WayofTime.bloodmagic.item.block.ItemBlockBloodTank; -import WayofTime.bloodmagic.item.block.ItemBlockDemonCrystal; -import WayofTime.bloodmagic.item.block.base.ItemBlockEnum; -import WayofTime.bloodmagic.tile.TileAlchemyArray; -import WayofTime.bloodmagic.tile.TileAlchemyTable; -import WayofTime.bloodmagic.tile.TileAltar; -import WayofTime.bloodmagic.tile.TileBloodTank; -import WayofTime.bloodmagic.tile.TileDemonCrucible; -import WayofTime.bloodmagic.tile.TileDemonCrystal; -import WayofTime.bloodmagic.tile.TileDemonCrystallizer; -import WayofTime.bloodmagic.tile.TileDemonPylon; -import WayofTime.bloodmagic.tile.TileDimensionalPortal; -import WayofTime.bloodmagic.tile.TileImperfectRitualStone; -import WayofTime.bloodmagic.tile.TileIncenseAltar; -import WayofTime.bloodmagic.tile.TileInversionPillar; -import WayofTime.bloodmagic.tile.TileMasterRitualStone; -import WayofTime.bloodmagic.tile.TileMimic; -import WayofTime.bloodmagic.tile.TilePhantomBlock; -import WayofTime.bloodmagic.tile.TilePlinth; -import WayofTime.bloodmagic.tile.TileSoulForge; -import WayofTime.bloodmagic.tile.TileSpectralBlock; -import WayofTime.bloodmagic.tile.TileTeleposer; -import WayofTime.bloodmagic.tile.routing.TileInputRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileItemRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode; -import WayofTime.bloodmagic.tile.routing.TileOutputRoutingNode; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelper; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2; - -public class ModBlocks -{ - public static final Block ALTAR; - public static final Block BLOOD_RUNE; - public static final Block RITUAL_CONTROLLER; - public static final Block RITUAL_STONE; - public static final Block BLOOD_LIGHT; - public static final Block TELEPOSER; - public static final Block ALCHEMY_ARRAY; - public static final Block SPECTRAL_BLOCK; - public static final Block PHANTOM_BLOCK; - public static final Block SOUL_FORGE; - public static final Block INCENSE_ALTAR; - public static final Block DEMON_CRUCIBLE; - public static final Block DEMON_PYLON; - public static final Block DEMON_CRYSTALLIZER; - public static final Block DEMON_CRYSTAL; - public static final Block ALCHEMY_TABLE; - public static final Block LIFE_ESSENCE; - public static final Block CRYSTAL; - public static final Block BLOOD_STONE; - public static final Block PATH_BLOCK; - public static final Block MASTER_ROUTING_NODE; - public static final Block INPUT_ROUTING_NODE; - public static final Block OUTPUT_ROUTING_NODE; - public static final Block ITEM_ROUTING_NODE; - public static final Block DIMENSIONAL_PORTAL; - public static final Block BLOOD_TANK; - public static final Block MIMIC; - public static final Block DEMON_BRICK_1; - public static final Block DEMON_BRICK_2; - public static final Block DEMON_EXTRAS; - public static final Block DEMON_PILLAR_1; - public static final Block DEMON_PILLAR_2; - public static final Block DEMON_PILLAR_CAP_1; - public static final Block DEMON_PILLAR_CAP_2; - public static final Block DEMON_PILLAR_CAP_3; - public static final Block DEMON_LIGHT; - public static final Block DEMON_WALL_1; - public static final Block DEMON_STAIRS_1; - public static final Block DEMON_STAIRS_2; - public static final Block DEMON_STAIRS_3; - public static final Block INVERSION_PILLAR; - public static final Block INVERSION_PILLAR_END; - - static - { - FluidRegistry.registerFluid(BlockLifeEssence.getLifeEssence()); - FluidRegistry.addBucketForFluid(BlockLifeEssence.getLifeEssence()); - LIFE_ESSENCE = registerBlock(new BlockLifeEssence(), Constants.BloodMagicBlock.LIFE_ESSENCE.getRegName()); - - ALTAR = registerBlock(new BlockAltar(), Constants.BloodMagicBlock.ALTAR.getRegName()); - BLOOD_RUNE = registerBlock(new ItemBlockEnum(new BlockBloodRune()), Constants.BloodMagicBlock.BLOOD_RUNE.getRegName()); - RITUAL_CONTROLLER = registerBlock(new ItemBlockEnum(new BlockRitualController()), Constants.BloodMagicBlock.RITUAL_CONTROLLER.getRegName()); - RITUAL_STONE = registerBlock(new ItemBlockEnum(new BlockRitualStone()), Constants.BloodMagicBlock.RITUAL_STONE.getRegName()); - BLOOD_LIGHT = registerBlock(new BlockBloodLight(), Constants.BloodMagicBlock.BLOOD_LIGHT.getRegName()); - TELEPOSER = registerBlock(new BlockTeleposer(), Constants.BloodMagicBlock.TELEPOSER.getRegName()); - ALCHEMY_ARRAY = registerBlock(new BlockAlchemyArray(), Constants.BloodMagicBlock.ALCHEMY_ARRAY.getRegName()); - SPECTRAL_BLOCK = registerBlock(new BlockSpectral(), Constants.BloodMagicBlock.SPECTRAL.getRegName()); - PHANTOM_BLOCK = registerBlock(new BlockPhantom(), Constants.BloodMagicBlock.PHANTOM.getRegName()); - SOUL_FORGE = registerBlock(new BlockSoulForge(), Constants.BloodMagicBlock.SOUL_FORGE.getRegName()); - CRYSTAL = registerBlock(new ItemBlockEnum(new BlockCrystal()), Constants.BloodMagicBlock.CRYSTAL.getRegName()); - BLOOD_STONE = registerBlock(new ItemBlockEnum(new BlockBloodStoneBrick()), Constants.BloodMagicBlock.BLOOD_STONE.getRegName()); - MASTER_ROUTING_NODE = registerBlock(new ItemBlock(new BlockMasterRoutingNode()), Constants.BloodMagicBlock.MASTER_ROUTING_NODE.getRegName()); - INPUT_ROUTING_NODE = registerBlock(new ItemBlock(new BlockInputRoutingNode()), Constants.BloodMagicBlock.INPUT_ROUTING_NODE.getRegName()); - OUTPUT_ROUTING_NODE = registerBlock(new ItemBlock(new BlockOutputRoutingNode()), Constants.BloodMagicBlock.OUTPUT_ROUTING_NODE.getRegName()); - ITEM_ROUTING_NODE = registerBlock(new ItemBlock(new BlockItemRoutingNode()), Constants.BloodMagicBlock.ITEM_ROUTING_NODE.getRegName()); - INCENSE_ALTAR = registerBlock(new BlockIncenseAltar(), Constants.BloodMagicBlock.INCENSE_ALTAR.getRegName()); - PATH_BLOCK = registerBlock(new ItemBlockEnum(new BlockPath()), Constants.BloodMagicBlock.PATH.getRegName()); - DEMON_CRUCIBLE = registerBlock(new BlockDemonCrucible(), Constants.BloodMagicBlock.DEMON_CRUCIBLE.getRegName()); - DEMON_PYLON = registerBlock(new BlockDemonPylon(), Constants.BloodMagicBlock.DEMON_PYLON.getRegName()); - DEMON_CRYSTALLIZER = registerBlock(new BlockDemonCrystallizer(), Constants.BloodMagicBlock.DEMON_CRYSTALLIZER.getRegName()); - DEMON_CRYSTAL = registerBlock(new ItemBlockDemonCrystal(new BlockDemonCrystal()), Constants.BloodMagicBlock.DEMON_CRYSTAL.getRegName()); - - ALCHEMY_TABLE = registerBlock(new ItemBlockAlchemyTable(new BlockAlchemyTable()), Constants.BloodMagicBlock.ALCHEMY_TABLE.getRegName()); - - DIMENSIONAL_PORTAL = registerBlock(new BlockDimensionalPortal(), Constants.BloodMagicBlock.DIMENSIONAL_PORTAL.getRegName()); - BLOOD_TANK = registerBlock(new ItemBlockBloodTank(new BlockBloodTank()), Constants.BloodMagicBlock.BLOOD_TANK.getRegName()); - - MIMIC = registerBlock(new ItemBlockEnum(new BlockMimic()), Constants.BloodMagicBlock.MIMIC.getRegName()); - - DEMON_BRICK_1 = registerBlock(new ItemBlockEnum(new BlockDemonBase("bricks1", EnumDemonBlock1.class)), Constants.BloodMagicBlock.DEMON_BRICK_1.getRegName()); - DEMON_BRICK_2 = registerBlock(new ItemBlockEnum(new BlockDemonBase("bricks2", EnumDemonBlock2.class)), Constants.BloodMagicBlock.DEMON_BRICK_2.getRegName()); - DEMON_EXTRAS = registerBlock(new ItemBlockEnum(new BlockDemonBase("extras", EnumDemonBlock3.class)), Constants.BloodMagicBlock.DEMON_BLOCK_EXTRA.getRegName()); - - DEMON_PILLAR_1 = registerBlock(new ItemBlockEnum(new BlockDemonPillarBase("pillar1", Material.ROCK, EnumSubWillType.class)), Constants.BloodMagicBlock.DEMON_PILLAR_1.getRegName()); - DEMON_PILLAR_2 = registerBlock(new ItemBlockEnum(new BlockDemonPillarBase("pillar2", Material.ROCK, EnumSubWillType.class)), Constants.BloodMagicBlock.DEMON_PILLAR_2.getRegName()); - DEMON_PILLAR_CAP_1 = registerBlock(new ItemBlockEnum(new BlockDemonPillarCapBase("pillarCap1", Material.ROCK, EnumSubWillType1.class)), Constants.BloodMagicBlock.DEMON_PILLAR_CAP_1.getRegName()); - DEMON_PILLAR_CAP_2 = registerBlock(new ItemBlockEnum(new BlockDemonPillarCapBase("pillarCap2", Material.ROCK, EnumSubWillType2.class)), Constants.BloodMagicBlock.DEMON_PILLAR_CAP_2.getRegName()); - DEMON_PILLAR_CAP_3 = registerBlock(new ItemBlockEnum(new BlockDemonPillarCapBase("pillarCap3", Material.ROCK, EnumSubWillType3.class)), Constants.BloodMagicBlock.DEMON_PILLAR_CAP_3.getRegName()); - - DEMON_LIGHT = registerBlock(new ItemBlockEnum(new BlockDemonLight()), Constants.BloodMagicBlock.DEMON_LIGHT.getRegName()); - - DEMON_WALL_1 = registerBlock(new ItemBlockEnum(new BlockDemonWallBase("wall1", Material.ROCK, EnumWillWall.class)), Constants.BloodMagicBlock.DEMON_WALL_1.getRegName()); - - DEMON_STAIRS_1 = registerBlock(new ItemBlockEnum(new BlockDemonStairsBase("stairs1", Material.ROCK, EnumSubWillType1.class)), Constants.BloodMagicBlock.DEMON_STAIRS_1.getRegName()); - DEMON_STAIRS_2 = registerBlock(new ItemBlockEnum(new BlockDemonStairsBase("stairs2", Material.ROCK, EnumSubWillType2.class)), Constants.BloodMagicBlock.DEMON_STAIRS_2.getRegName()); - DEMON_STAIRS_3 = registerBlock(new ItemBlockEnum(new BlockDemonStairsBase("stairs3", Material.ROCK, EnumSubWillType3.class)), Constants.BloodMagicBlock.DEMON_STAIRS_3.getRegName()); - - INVERSION_PILLAR = registerBlock(new ItemBlockEnum(new BlockInversionPillar()), Constants.BloodMagicBlock.INVERSION_PILLAR.getRegName()); - INVERSION_PILLAR_END = registerBlock(new ItemBlockEnum(new BlockInversionPillarEnd()), Constants.BloodMagicBlock.INVERSION_PILLAR_END.getRegName()); - } - - public static void init() - { - BloodMagicAPI.addToTeleposerBlacklist(INPUT_ROUTING_NODE); - BloodMagicAPI.addToTranspositionBlacklist(INPUT_ROUTING_NODE); - BloodMagicAPI.addToTeleposerBlacklist(OUTPUT_ROUTING_NODE); - BloodMagicAPI.addToTranspositionBlacklist(OUTPUT_ROUTING_NODE); - BloodMagicAPI.addToTeleposerBlacklist(ITEM_ROUTING_NODE); - BloodMagicAPI.addToTranspositionBlacklist(ITEM_ROUTING_NODE); - BloodMagicAPI.addToTeleposerBlacklist(DEMON_CRYSTAL); - BloodMagicAPI.addToTranspositionBlacklist(DEMON_CRYSTAL); - - initTiles(); - } - - public static void initTiles() - { - GameRegistry.registerTileEntity(TileAltar.class, Constants.Mod.MODID + ":" + TileAltar.class.getSimpleName()); - GameRegistry.registerTileEntity(TileImperfectRitualStone.class, Constants.Mod.MODID + ":" + TileImperfectRitualStone.class.getSimpleName()); - GameRegistry.registerTileEntity(TileMasterRitualStone.class, Constants.Mod.MODID + ":" + TileMasterRitualStone.class.getSimpleName()); - GameRegistry.registerTileEntity(TilePlinth.class, Constants.Mod.MODID + ":" + TilePlinth.class.getSimpleName()); - GameRegistry.registerTileEntity(TileAlchemyArray.class, Constants.Mod.MODID + ":" + TileAlchemyArray.class.getSimpleName()); - GameRegistry.registerTileEntity(TileSpectralBlock.class, Constants.Mod.MODID + ":" + TileSpectralBlock.class.getSimpleName()); - GameRegistry.registerTileEntity(TilePhantomBlock.class, Constants.Mod.MODID + ":" + TilePhantomBlock.class.getSimpleName()); - GameRegistry.registerTileEntity(TileTeleposer.class, Constants.Mod.MODID + ":" + TileTeleposer.class.getSimpleName()); - GameRegistry.registerTileEntity(TileSoulForge.class, Constants.Mod.MODID + ":" + TileSoulForge.class.getSimpleName()); - GameRegistry.registerTileEntity(TileMasterRoutingNode.class, Constants.Mod.MODID + ":" + TileMasterRoutingNode.class.getSimpleName()); - GameRegistry.registerTileEntity(TileInputRoutingNode.class, Constants.Mod.MODID + ":" + TileInputRoutingNode.class.getSimpleName()); - GameRegistry.registerTileEntity(TileOutputRoutingNode.class, Constants.Mod.MODID + ":" + TileOutputRoutingNode.class.getSimpleName()); - GameRegistry.registerTileEntity(TileItemRoutingNode.class, Constants.Mod.MODID + ":" + TileItemRoutingNode.class.getSimpleName()); - GameRegistry.registerTileEntity(TileIncenseAltar.class, Constants.Mod.MODID + ":" + TileIncenseAltar.class.getSimpleName()); - GameRegistry.registerTileEntity(TileDemonCrucible.class, Constants.Mod.MODID + ":" + TileDemonCrucible.class.getSimpleName()); - GameRegistry.registerTileEntity(TileDemonPylon.class, Constants.Mod.MODID + ":" + TileDemonPylon.class.getSimpleName()); - GameRegistry.registerTileEntity(TileDemonCrystallizer.class, Constants.Mod.MODID + ":" + TileDemonCrystallizer.class.getSimpleName()); - GameRegistry.registerTileEntity(TileDemonCrystal.class, Constants.Mod.MODID + ":" + TileDemonCrystal.class.getSimpleName()); - GameRegistry.registerTileEntity(TileAlchemyTable.class, Constants.Mod.MODID + ":" + TileAlchemyTable.class.getSimpleName()); - - GameRegistry.registerTileEntity(TileDimensionalPortal.class, Constants.Mod.MODID + ":" + TileDimensionalPortal.class.getSimpleName()); - GameRegistry.registerTileEntity(TileBloodTank.class, Constants.Mod.MODID + ":" + TileBloodTank.class.getSimpleName()); - GameRegistry.registerTileEntity(TileMimic.class, Constants.Mod.MODID + ":" + TileMimic.class.getSimpleName()); - GameRegistry.registerTileEntity(TileInversionPillar.class, Constants.Mod.MODID + ":" + TileInversionPillar.class.getSimpleName()); - } - - @SideOnly(Side.CLIENT) - public static void initRenders() - { - InventoryRenderHelper renderHelper = BloodMagic.proxy.getRenderHelper(); - InventoryRenderHelperV2 renderHelperV2 = BloodMagic.proxy.getRenderHelperV2(); - - renderHelper.fluidRender(LIFE_ESSENCE); - - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(BLOOD_LIGHT)); - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ALCHEMY_ARRAY)); - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(OUTPUT_ROUTING_NODE)); - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(INPUT_ROUTING_NODE)); - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(MASTER_ROUTING_NODE)); - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ITEM_ROUTING_NODE)); - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ALCHEMY_TABLE)); - renderHelperV2.registerRender(InventoryRenderHelper.getItemFromBlock(DEMON_CRYSTAL), 0, "ItemBlockDemonCrystal", "default"); - renderHelperV2.registerRender(InventoryRenderHelper.getItemFromBlock(DEMON_CRYSTAL), 1, "ItemBlockDemonCrystal", "corrosive"); - renderHelperV2.registerRender(InventoryRenderHelper.getItemFromBlock(DEMON_CRYSTAL), 2, "ItemBlockDemonCrystal", "destructive"); - renderHelperV2.registerRender(InventoryRenderHelper.getItemFromBlock(DEMON_CRYSTAL), 3, "ItemBlockDemonCrystal", "vengeful"); - renderHelperV2.registerRender(InventoryRenderHelper.getItemFromBlock(DEMON_CRYSTAL), 4, "ItemBlockDemonCrystal", "steadfast"); - - renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(DIMENSIONAL_PORTAL)); - } - - private static Block registerBlock(Block block, String name) - { - if (!ConfigHandler.blockBlacklist.contains(name)) - { - if (block.getRegistryName() == null) - block.setRegistryName(name); - GameRegistry.register(block); - GameRegistry.register(new ItemBlock(block).setRegistryName(name)); - BloodMagic.proxy.tryHandleBlockModel(block, name); - } - - return block; - } - - private static Block registerBlock(ItemBlock itemBlock, String name) - { - Block block = itemBlock.getBlock(); - - if (block.getRegistryName() == null) - block.setRegistryName(name); - - if (!ConfigHandler.blockBlacklist.contains(name)) - { - GameRegistry.register(block); - GameRegistry.register(itemBlock.setRegistryName(name)); - BloodMagic.proxy.tryHandleBlockModel(block, name); - } - - return block; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java b/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java deleted file mode 100644 index fdf91ba5..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import WayofTime.bloodmagic.compat.ICompatibility; -import WayofTime.bloodmagic.compat.guideapi.CompatibilityGuideAPI; -import WayofTime.bloodmagic.compat.jei.CompatibilityJustEnoughItems; -import WayofTime.bloodmagic.compat.waila.CompatibilityWaila; -import net.minecraftforge.fml.common.Loader; - -import java.util.ArrayList; - -public class ModCompatibility -{ - private static ArrayList compatibilities = new ArrayList(); - - public static void registerModCompat() - { - compatibilities.add(new CompatibilityJustEnoughItems()); - compatibilities.add(new CompatibilityWaila()); - compatibilities.add(new CompatibilityGuideAPI()); -// compatibilities.add(new CompatibilityThaumcraft()); - } - - public static void loadCompat(ICompatibility.InitializationPhase phase) - { - for (ICompatibility compatibility : compatibilities) - if (Loader.isModLoaded(compatibility.getModId()) && compatibility.enableCompat()) - compatibility.loadCompatibility(phase); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModCorruptionBlocks.java b/src/main/java/WayofTime/bloodmagic/registry/ModCorruptionBlocks.java deleted file mode 100644 index 7e4c1cbc..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModCorruptionBlocks.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import net.minecraft.init.Blocks; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.inversion.CorruptionHandler; - -public class ModCorruptionBlocks -{ - public static void init() - { - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - CorruptionHandler.registerBlockCorruption(type, Blocks.STONE, 0, ModBlocks.DEMON_EXTRAS.getStateFromMeta(type.ordinal())); - CorruptionHandler.registerBlockCorruption(type, Blocks.GRASS, 0, ModBlocks.DEMON_EXTRAS.getStateFromMeta(type.ordinal())); - CorruptionHandler.registerBlockCorruption(type, Blocks.DIRT, 0, ModBlocks.DEMON_EXTRAS.getStateFromMeta(type.ordinal())); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java b/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java deleted file mode 100644 index 0fce4e69..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java +++ /dev/null @@ -1,33 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import net.minecraftforge.fml.common.registry.EntityRegistry; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedChicken; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSheep; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider; -import WayofTime.bloodmagic.entity.mob.EntityCorruptedZombie; -import WayofTime.bloodmagic.entity.mob.EntityMimic; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.entity.projectile.EntityBloodLight; -import WayofTime.bloodmagic.entity.projectile.EntityMeteor; -import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; -import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; - -public class ModEntities -{ - public static void init() - { - int id = 0; - - EntityRegistry.registerModEntity(EntityBloodLight.class, "BloodLight", id++, BloodMagic.instance, 64, 20, true); - EntityRegistry.registerModEntity(EntitySoulSnare.class, "SoulSnare", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntitySentientArrow.class, "SoulArrow", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntityMeteor.class, "Meteor", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntitySentientSpecter.class, "SentientSpecter", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntityMimic.class, "Mimic", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntityCorruptedZombie.class, "CorruptedZombie", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntityCorruptedSheep.class, "CorruptedSheep", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntityCorruptedChicken.class, "CorruptedChicken", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntityCorruptedSpider.class, "CorruptedSpider", id++, BloodMagic.instance, 64, 1, true); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModItems.java b/src/main/java/WayofTime/bloodmagic/registry/ModItems.java deleted file mode 100644 index 6973a278..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModItems.java +++ /dev/null @@ -1,333 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fml.common.IFuelHandler; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.orb.BloodOrb; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.item.ItemActivationCrystal; -import WayofTime.bloodmagic.item.ItemAltarMaker; -import WayofTime.bloodmagic.item.ItemArcaneAshes; -import WayofTime.bloodmagic.item.ItemBloodOrb; -import WayofTime.bloodmagic.item.ItemBloodShard; -import WayofTime.bloodmagic.item.ItemBoundAxe; -import WayofTime.bloodmagic.item.ItemBoundPickaxe; -import WayofTime.bloodmagic.item.ItemBoundShovel; -import WayofTime.bloodmagic.item.ItemBoundSword; -import WayofTime.bloodmagic.item.ItemComponent; -import WayofTime.bloodmagic.item.ItemDaggerOfSacrifice; -import WayofTime.bloodmagic.item.ItemDemonCrystal; -import WayofTime.bloodmagic.item.ItemDemonWillGauge; -import WayofTime.bloodmagic.item.ItemExperienceBook; -import WayofTime.bloodmagic.item.ItemInscriptionTool; -import WayofTime.bloodmagic.item.ItemLavaCrystal; -import WayofTime.bloodmagic.item.ItemRitualDiviner; -import WayofTime.bloodmagic.item.ItemRitualReader; -import WayofTime.bloodmagic.item.ItemSacrificialDagger; -import WayofTime.bloodmagic.item.ItemSanguineBook; -import WayofTime.bloodmagic.item.ItemSlate; -import WayofTime.bloodmagic.item.ItemTelepositionFocus; -import WayofTime.bloodmagic.item.ItemUpgradeTome; -import WayofTime.bloodmagic.item.ItemUpgradeTrainer; -import WayofTime.bloodmagic.item.alchemy.ItemCuttingFluid; -import WayofTime.bloodmagic.item.alchemy.ItemLivingArmourPointsUpgrade; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.item.armour.ItemSentientArmour; -import WayofTime.bloodmagic.item.gear.ItemPackSacrifice; -import WayofTime.bloodmagic.item.gear.ItemPackSelfSacrifice; -import WayofTime.bloodmagic.item.routing.ItemNodeRouter; -import WayofTime.bloodmagic.item.routing.ItemRouterFilter; -import WayofTime.bloodmagic.item.sigil.ItemSigilAir; -import WayofTime.bloodmagic.item.sigil.ItemSigilBloodLight; -import WayofTime.bloodmagic.item.sigil.ItemSigilBounce; -import WayofTime.bloodmagic.item.sigil.ItemSigilClaw; -import WayofTime.bloodmagic.item.sigil.ItemSigilCompression; -import WayofTime.bloodmagic.item.sigil.ItemSigilDivination; -import WayofTime.bloodmagic.item.sigil.ItemSigilElementalAffinity; -import WayofTime.bloodmagic.item.sigil.ItemSigilEnderSeverance; -import WayofTime.bloodmagic.item.sigil.ItemSigilFastMiner; -import WayofTime.bloodmagic.item.sigil.ItemSigilFrost; -import WayofTime.bloodmagic.item.sigil.ItemSigilGreenGrove; -import WayofTime.bloodmagic.item.sigil.ItemSigilHaste; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import WayofTime.bloodmagic.item.sigil.ItemSigilLava; -import WayofTime.bloodmagic.item.sigil.ItemSigilMagnetism; -import WayofTime.bloodmagic.item.sigil.ItemSigilPhantomBridge; -import WayofTime.bloodmagic.item.sigil.ItemSigilSeer; -import WayofTime.bloodmagic.item.sigil.ItemSigilSuppression; -import WayofTime.bloodmagic.item.sigil.ItemSigilTeleposition; -import WayofTime.bloodmagic.item.sigil.ItemSigilTransposition; -import WayofTime.bloodmagic.item.sigil.ItemSigilVoid; -import WayofTime.bloodmagic.item.sigil.ItemSigilWater; -import WayofTime.bloodmagic.item.sigil.ItemSigilWhirlwind; -import WayofTime.bloodmagic.item.soul.ItemMonsterSoul; -import WayofTime.bloodmagic.item.soul.ItemSentientArmourGem; -import WayofTime.bloodmagic.item.soul.ItemSentientAxe; -import WayofTime.bloodmagic.item.soul.ItemSentientBow; -import WayofTime.bloodmagic.item.soul.ItemSentientPickaxe; -import WayofTime.bloodmagic.item.soul.ItemSentientShovel; -import WayofTime.bloodmagic.item.soul.ItemSentientSword; -import WayofTime.bloodmagic.item.soul.ItemSoulGem; -import WayofTime.bloodmagic.item.soul.ItemSoulSnare; -import WayofTime.bloodmagic.potion.item.ItemPotionFlask; -import WayofTime.bloodmagic.util.helper.InventoryRenderHelper; - -public class ModItems -{ - public static final BloodOrb ORB_WEAK; - public static final BloodOrb ORB_APPRENTICE; - public static final BloodOrb ORB_MAGICIAN; - public static final BloodOrb ORB_MASTER; - public static final BloodOrb ORB_ARCHMAGE; - public static final BloodOrb ORB_TRANSCENDENT; - - public static final Item BLOOD_ORB; - public static final Item ACTIVATION_CRYSTAL; - public static final Item SLATE; - public static final Item INSCRIPTION_TOOL; - public static final Item SACRIFICIAL_DAGGER; - public static final Item PACK_SELF_SACRIFICE; - public static final Item PACK_SACRIFICE; - public static final Item DAGGER_OF_SACRIFICE; - public static final Item RITUAL_DIVINER; - public static final Item RITUAL_READER; - public static final Item LAVA_CRYSTAL; - public static final Item BOUND_SWORD; - public static final Item BOUND_PICKAXE; - public static final Item BOUND_AXE; - public static final Item BOUND_SHOVEL; - public static final Item SIGIL_DIVINATION; - public static final Item SIGIL_AIR; - public static final Item SIGIL_WATER; - public static final Item SIGIL_LAVA; - public static final Item SIGIL_VOID; - public static final Item SIGIL_GREEN_GROVE; - public static final Item SIGIL_BLOOD_LIGHT; - public static final Item SIGIL_ELEMENTAL_AFFINITY; - public static final Item SIGIL_HASTE; - public static final Item SIGIL_MAGNETISM; - public static final Item SIGIL_SUPPRESSION; - public static final Item SIGIL_FAST_MINER; - public static final Item SIGIL_SEER; - public static final Item SIGIL_ENDER_SEVERANCE; - public static final Item SIGIL_WHIRLWIND; - public static final Item SIGIL_PHANTOM_BRIDGE; - public static final Item SIGIL_COMPRESSION; - public static final Item SIGIL_HOLDING; - public static final Item SIGIL_TELEPOSITION; - public static final Item SIGIL_TRANSPOSITION; - public static final Item SIGIL_CLAW; - public static final Item SIGIL_BOUNCE; - public static final Item SIGIL_FROST; - public static final Item ITEM_COMPONENT; - public static final Item ITEM_DEMON_CRYSTAL; - public static final Item TELEPOSITION_FOCUS; - public static final Item EXPERIENCE_TOME; - public static final Item BLOOD_SHARD; - public static final Item LIVING_ARMOUR_HELMET; - public static final Item LIVING_ARMOUR_CHEST; - public static final Item LIVING_ARMOUR_LEGS; - public static final Item LIVING_ARMOUR_BOOTS; - public static final Item SENTIENT_ARMOUR_HELMET; - public static final Item SENTIENT_ARMOUR_CHEST; - public static final Item SENTIENT_ARMOUR_LEGS; - public static final Item SENTIENT_ARMOUR_BOOTS; - public static final Item ALTAR_MAKER; - public static final Item UPGRADE_TOME; - public static final Item UPGRADE_TRAINER; - public static final Item ARCANE_ASHES; - public static final Item MONSTER_SOUL; - public static final Item SOUL_GEM; - public static final Item SOUL_SNARE; - public static final Item SENTIENT_SWORD; - public static final Item SENTIENT_BOW; - public static final Item SENTIENT_ARMOUR_GEM; - public static final Item SENTIENT_AXE; - public static final Item SENTIENT_PICKAXE; - public static final Item SENTIENT_SHOVEL; - public static final Item NODE_ROUTER; - public static final Item BASE_ITEM_FILTER; - public static final Item CUTTING_FLUID; - public static final Item SANGUINE_BOOK; - public static final Item ITEM_POINTS_UPGRADE; - public static final Item DEMON_WILL_GAUGE; - public static final Item POTION_FLASK; - - public static final Item.ToolMaterial BOUND_TOOL_MATERIAL = EnumHelper.addToolMaterial("BoundToolMaterial", 4, 1, 10, 8, 50); - public static final Item.ToolMaterial SOUL_TOOL_MATERIAL = EnumHelper.addToolMaterial("SoulToolMaterial", 4, 520, 7, 8, 50); - - static - { - BLOOD_ORB = registerItem(new ItemBloodOrb(), Constants.BloodMagicItem.BLOOD_ORB.getRegName()); - ORB_WEAK = new BloodOrb("weak", 1, 5000); - ORB_APPRENTICE = new BloodOrb("apprentice", 2, 25000); - ORB_MAGICIAN = new BloodOrb("magician", 3, 150000); - ORB_MASTER = new BloodOrb("master", 4, 1000000); - ORB_ARCHMAGE = new BloodOrb("archmage", 5, 10000000); - ORB_TRANSCENDENT = new BloodOrb("transcendent", 6, 30000000); - - ACTIVATION_CRYSTAL = registerItem(new ItemActivationCrystal(), Constants.BloodMagicItem.ACTIVATION_CRYSTAL.getRegName()); - SLATE = registerItem(new ItemSlate(), Constants.BloodMagicItem.SLATE.getRegName()); - INSCRIPTION_TOOL = registerItem(new ItemInscriptionTool(), Constants.BloodMagicItem.INSCRIPTION_TOOL.getRegName()); - - SACRIFICIAL_DAGGER = registerItem(new ItemSacrificialDagger(), Constants.BloodMagicItem.SACRIFICIAL_DAGGER.getRegName()); - PACK_SACRIFICE = registerItem(new ItemPackSacrifice(), Constants.BloodMagicItem.SACRIFICE_PACK.getRegName()); - PACK_SELF_SACRIFICE = registerItem(new ItemPackSelfSacrifice(), Constants.BloodMagicItem.SELF_SACRIFICE_PACK.getRegName()); - DAGGER_OF_SACRIFICE = registerItem(new ItemDaggerOfSacrifice(), Constants.BloodMagicItem.DAGGER_OF_SACRIFICE.getRegName()); - - RITUAL_DIVINER = registerItem(new ItemRitualDiviner(), Constants.BloodMagicItem.RITUAL_DIVINER.getRegName()); - RITUAL_READER = registerItem(new ItemRitualReader(), Constants.BloodMagicItem.RITUAL_READER.getRegName()); - - LAVA_CRYSTAL = registerItem(new ItemLavaCrystal(), Constants.BloodMagicItem.LAVA_CRYSTAL.getRegName()); - - BOUND_SWORD = registerItem(new ItemBoundSword(), Constants.BloodMagicItem.BOUND_SWORD.getRegName()); - BOUND_PICKAXE = registerItem(new ItemBoundPickaxe(), Constants.BloodMagicItem.BOUND_PICKAXE.getRegName()); - BOUND_AXE = registerItem(new ItemBoundAxe(), Constants.BloodMagicItem.BOUND_AXE.getRegName()); - BOUND_SHOVEL = registerItem(new ItemBoundShovel(), Constants.BloodMagicItem.BOUND_SHOVEL.getRegName()); - - SIGIL_DIVINATION = registerItem(new ItemSigilDivination(), Constants.BloodMagicItem.SIGIL_DIVINATION.getRegName()); - SIGIL_AIR = registerItem(new ItemSigilAir(), Constants.BloodMagicItem.SIGIL_AIR.getRegName()); - SIGIL_WATER = registerItem(new ItemSigilWater(), Constants.BloodMagicItem.SIGIL_WATER.getRegName()); - SIGIL_LAVA = registerItem(new ItemSigilLava(), Constants.BloodMagicItem.SIGIL_LAVA.getRegName()); - SIGIL_VOID = registerItem(new ItemSigilVoid(), Constants.BloodMagicItem.SIGIL_VOID.getRegName()); - SIGIL_GREEN_GROVE = registerItem(new ItemSigilGreenGrove(), Constants.BloodMagicItem.SIGIL_GREEN_GROVE.getRegName()); - SIGIL_BLOOD_LIGHT = registerItem(new ItemSigilBloodLight(), Constants.BloodMagicItem.SIGIL_BLOOD_LIGHT.getRegName()); - SIGIL_ELEMENTAL_AFFINITY = registerItem(new ItemSigilElementalAffinity(), Constants.BloodMagicItem.SIGIL_ELEMENTAL_AFFINITY.getRegName()); - SIGIL_MAGNETISM = registerItem(new ItemSigilMagnetism(), Constants.BloodMagicItem.SIGIL_MAGNETISM.getRegName()); - SIGIL_SUPPRESSION = registerItem(new ItemSigilSuppression(), Constants.BloodMagicItem.SIGIL_SUPPRESION.getRegName()); - SIGIL_HASTE = registerItem(new ItemSigilHaste(), Constants.BloodMagicItem.SIGIL_HASTE.getRegName()); - SIGIL_FAST_MINER = registerItem(new ItemSigilFastMiner(), Constants.BloodMagicItem.SIGIL_FAST_MINER.getRegName()); - SIGIL_SEER = registerItem(new ItemSigilSeer(), Constants.BloodMagicItem.SIGIL_SEER.getRegName()); - SIGIL_PHANTOM_BRIDGE = registerItem(new ItemSigilPhantomBridge(), Constants.BloodMagicItem.SIGIL_PHANTOM_BRIDGE.getRegName()); - SIGIL_WHIRLWIND = registerItem(new ItemSigilWhirlwind(), Constants.BloodMagicItem.SIGIL_WHIRLWIND.getRegName()); - SIGIL_COMPRESSION = registerItem(new ItemSigilCompression(), Constants.BloodMagicItem.SIGIL_COMPRESSION.getRegName()); - SIGIL_ENDER_SEVERANCE = registerItem(new ItemSigilEnderSeverance(), Constants.BloodMagicItem.SIGIL_ENDER_SEVERANCE.getRegName()); - SIGIL_HOLDING = registerItem(new ItemSigilHolding(), Constants.BloodMagicItem.SIGIL_HOLDING.getRegName()); - - SIGIL_TELEPOSITION = registerItem(new ItemSigilTeleposition(), Constants.BloodMagicItem.SIGIL_TELEPOSITION.getRegName()); - SIGIL_TRANSPOSITION = registerItem(new ItemSigilTransposition(), Constants.BloodMagicItem.SIGIL_TRANSPOSITION.getRegName()); - - SIGIL_CLAW = registerItem(new ItemSigilClaw(), Constants.BloodMagicItem.SIGIL_CLAW.getRegName()); - SIGIL_BOUNCE = registerItem(new ItemSigilBounce(), Constants.BloodMagicItem.SIGIL_BOUNCE.getRegName()); - SIGIL_FROST = registerItem(new ItemSigilFrost(), Constants.BloodMagicItem.SIGIL_FROST.getRegName()); - - ITEM_COMPONENT = registerItem(new ItemComponent(), Constants.BloodMagicItem.COMPONENT.getRegName()); - ITEM_DEMON_CRYSTAL = registerItem(new ItemDemonCrystal(), Constants.BloodMagicItem.DEMON_CRYSTAL.getRegName()); - TELEPOSITION_FOCUS = registerItem(new ItemTelepositionFocus(), Constants.BloodMagicItem.TELEPOSITION_FOCUS.getRegName()); - EXPERIENCE_TOME = registerItem(new ItemExperienceBook(), Constants.BloodMagicItem.EXPERIENCE_TOME.getRegName()); - - BLOOD_SHARD = registerItem(new ItemBloodShard(), Constants.BloodMagicItem.BLOOD_SHARD.getRegName()); - - LIVING_ARMOUR_HELMET = registerItem(new ItemLivingArmour(EntityEquipmentSlot.HEAD), "ItemLivingArmourHelmet"); - LIVING_ARMOUR_CHEST = registerItem(new ItemLivingArmour(EntityEquipmentSlot.CHEST), "ItemLivingArmourChest"); - LIVING_ARMOUR_LEGS = registerItem(new ItemLivingArmour(EntityEquipmentSlot.LEGS), "ItemLivingArmourLegs"); - LIVING_ARMOUR_BOOTS = registerItem(new ItemLivingArmour(EntityEquipmentSlot.FEET), "ItemLivingArmourBoots"); - - SENTIENT_ARMOUR_HELMET = registerItem(new ItemSentientArmour(EntityEquipmentSlot.HEAD), "ItemSentientArmourHelmet"); - SENTIENT_ARMOUR_CHEST = registerItem(new ItemSentientArmour(EntityEquipmentSlot.CHEST), "ItemSentientArmourChest"); - SENTIENT_ARMOUR_LEGS = registerItem(new ItemSentientArmour(EntityEquipmentSlot.LEGS), "ItemSentientArmourLegs"); - SENTIENT_ARMOUR_BOOTS = registerItem(new ItemSentientArmour(EntityEquipmentSlot.FEET), "ItemSentientArmourBoots"); - - ALTAR_MAKER = registerItem(new ItemAltarMaker(), Constants.BloodMagicItem.ALTAR_MAKER.getRegName()); - UPGRADE_TOME = registerItem(new ItemUpgradeTome(), Constants.BloodMagicItem.UPGRADE_TOME.getRegName()); - UPGRADE_TRAINER = registerItem(new ItemUpgradeTrainer(), Constants.BloodMagicItem.UPGRADE_TRAINER.getRegName()); - - ARCANE_ASHES = registerItem(new ItemArcaneAshes(), Constants.BloodMagicItem.ARCANE_ASHES.getRegName()); - MONSTER_SOUL = registerItem(new ItemMonsterSoul(), Constants.BloodMagicItem.MONSTER_SOUL.getRegName()); - SOUL_GEM = registerItem(new ItemSoulGem(), Constants.BloodMagicItem.SOUL_GEM.getRegName()); - SOUL_SNARE = registerItem(new ItemSoulSnare(), Constants.BloodMagicItem.SOUL_SNARE.getRegName()); - - SENTIENT_SWORD = registerItem(new ItemSentientSword(), Constants.BloodMagicItem.SENTIENT_SWORD.getRegName()); - SENTIENT_BOW = registerItem(new ItemSentientBow(), Constants.BloodMagicItem.SENTIENT_BOW.getRegName()); - SENTIENT_ARMOUR_GEM = registerItem(new ItemSentientArmourGem(), Constants.BloodMagicItem.SENTIENT_ARMOR_GEM.getRegName()); - SENTIENT_AXE = registerItem(new ItemSentientAxe(), Constants.BloodMagicItem.SENTIENT_AXE.getRegName()); - SENTIENT_PICKAXE = registerItem(new ItemSentientPickaxe(), Constants.BloodMagicItem.SENTIENT_PICKAXE.getRegName()); - SENTIENT_SHOVEL = registerItem(new ItemSentientShovel(), Constants.BloodMagicItem.SENTIENT_SHOVEL.getRegName()); - - NODE_ROUTER = registerItem(new ItemNodeRouter(), Constants.BloodMagicItem.NODE_ROUTER.getRegName()); - BASE_ITEM_FILTER = registerItem(new ItemRouterFilter(), Constants.BloodMagicItem.ROUTER_FILTER.getRegName()); - - CUTTING_FLUID = registerItem(new ItemCuttingFluid(), Constants.BloodMagicItem.CUTTING_FLUID.getRegName()); - - SANGUINE_BOOK = registerItem(new ItemSanguineBook(), Constants.BloodMagicItem.SANGUINE_BOOK.getRegName()); - - ITEM_POINTS_UPGRADE = registerItem(new ItemLivingArmourPointsUpgrade(), Constants.BloodMagicItem.ARMOUR_POINTS_UPGRADE.getRegName()); - - DEMON_WILL_GAUGE = registerItem(new ItemDemonWillGauge(), Constants.BloodMagicItem.DEMON_WILL_GAUGE.getRegName()); - - POTION_FLASK = registerItem(new ItemPotionFlask(), Constants.BloodMagicItem.POTION_FLASK.getRegName()); - } - - public static void init() - { - OrbRegistry.registerOrb(ORB_WEAK); - OrbRegistry.registerOrb(ORB_APPRENTICE); - OrbRegistry.registerOrb(ORB_MAGICIAN); - OrbRegistry.registerOrb(ORB_MASTER); - OrbRegistry.registerOrb(ORB_ARCHMAGE); - OrbRegistry.registerOrb(ORB_TRANSCENDENT); - - GameRegistry.registerFuelHandler((IFuelHandler) LAVA_CRYSTAL); - } - - @SideOnly(Side.CLIENT) - public static void initRenders() - { - InventoryRenderHelper renderHelper = BloodMagic.proxy.getRenderHelper(); - - final ResourceLocation holdingLoc = new ResourceLocation("bloodmagic", "item/ItemSigilHolding"); - ModelLoader.setCustomMeshDefinition(SIGIL_HOLDING, new ItemMeshDefinition() - { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.COLOR)) - return new ModelResourceLocation(holdingLoc, "type=color"); - return new ModelResourceLocation(holdingLoc, "type=normal"); - } - }); - ModelLoader.registerItemVariants(SIGIL_HOLDING, new ModelResourceLocation(holdingLoc, "type=normal")); - ModelLoader.registerItemVariants(SIGIL_HOLDING, new ModelResourceLocation(holdingLoc, "type=color")); - - renderHelper.itemRenderAll(BLOOD_ORB); - OrbRegistry.registerOrbTexture(ORB_WEAK, new ResourceLocation(Constants.Mod.DOMAIN + "ItemBloodOrbWeak")); - OrbRegistry.registerOrbTexture(ORB_APPRENTICE, new ResourceLocation(Constants.Mod.DOMAIN + "ItemBloodOrbApprentice")); - OrbRegistry.registerOrbTexture(ORB_MAGICIAN, new ResourceLocation(Constants.Mod.DOMAIN + "ItemBloodOrbMagician")); - OrbRegistry.registerOrbTexture(ORB_MASTER, new ResourceLocation(Constants.Mod.DOMAIN + "ItemBloodOrbMaster")); - OrbRegistry.registerOrbTexture(ORB_ARCHMAGE, new ResourceLocation(Constants.Mod.DOMAIN + "ItemBloodOrbArchmage")); - OrbRegistry.registerOrbTexture(ORB_TRANSCENDENT, new ResourceLocation(Constants.Mod.DOMAIN + "ItemBloodOrbTranscendent")); - - renderHelper.itemRender(SENTIENT_BOW, 0, "ItemSentientBow"); -// renderHelper.itemRender(sentientBow, 1, "ItemSentientBow_pulling_0"); -// renderHelper.itemRender(sentientBow, 2, "ItemSentientBow_pulling_1"); -// renderHelper.itemRender(sentientBow, 3, "ItemSentientBow_pulling_2"); - - renderHelper.itemRender(SENTIENT_ARMOUR_GEM, 0, "ItemSentientArmourGem0"); - renderHelper.itemRender(SENTIENT_ARMOUR_GEM, 1, "ItemSentientArmourGem1"); - } - - private static Item registerItem(Item item, String name) - { - if (!ConfigHandler.itemBlacklist.contains(name)) - { - if (item.getRegistryName() == null) - item.setRegistryName(name); - GameRegistry.register(item); - BloodMagic.proxy.tryHandleItemModel(item, name); - } - - return item; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModPotions.java b/src/main/java/WayofTime/bloodmagic/registry/ModPotions.java deleted file mode 100644 index 915b5037..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModPotions.java +++ /dev/null @@ -1,68 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper; -import WayofTime.bloodmagic.potion.PotionBloodMagic; -import WayofTime.bloodmagic.potion.PotionEventHandlers; - -public class ModPotions -{ - public static Potion drowning; - public static Potion boost; - public static Potion heavyHeart; - public static Potion whirlwind; - public static Potion planarBinding; - public static Potion soulSnare; - public static Potion soulFray; - public static Potion fireFuse; - public static Potion constrict; - public static Potion plantLeech; - public static Potion deafness; - - public static Potion bounce; - public static Potion cling; - public static Potion sacrificialLamb; - - public static void init() - { - new PotionEventHandlers(); - - // TODO FUTURE MAKE POTION TEXTURES - - // final String resourceLocation = Constants.Mod.MODID + - // ":textures/potions/"; - - // drowning = new PotionBloodMagic("Drowning", new - // ResourceLocation(resourceLocation + - // drowning.getName().toLowerCase()), true, 0, 0, 0); - boost = registerPotion("Boost", new ResourceLocation("boost"), false, 0xFFFFFF, 0, 1); - // new ResourceLocation(resourceLocation + - // boost.getName().toLowerCase()) - - whirlwind = registerPotion("Whirlwind", new ResourceLocation("whirlwind"), false, 0, 1, 0); - planarBinding = registerPotion("Planar Binding", new ResourceLocation("planarBinding"), false, 0, 2, 0); - soulSnare = registerPotion("Soul Snare", new ResourceLocation("soulSnare"), false, 0xFFFFFF, 3, 0); - soulFray = registerPotion("Soul Fray", new ResourceLocation("soulFray"), true, 0xFFFFFF, 4, 0); - PlayerSacrificeHelper.soulFrayId = soulFray; - - fireFuse = registerPotion("Fire Fuse", new ResourceLocation("fireFuse"), true, 0xFF3333, 5, 0); - constrict = registerPotion("Constriction", new ResourceLocation("constrict"), true, 0x000000, 6, 0); - plantLeech = registerPotion("Plant Leech", new ResourceLocation("plantLeech"), true, 0x000000, 7, 0); - deafness = registerPotion("Deaf", new ResourceLocation("deafness"), true, 0x000000, 0, 1); - bounce = registerPotion("Bounce", new ResourceLocation("bounce"), false, 0x000000, 1, 1); - cling = registerPotion("Cling", new ResourceLocation("cling"), false, 0x000000, 2, 1); - sacrificialLamb = registerPotion("S. Lamb", new ResourceLocation("lamb"), false, 0x000000, 3, 1); - // heavyHeart = new PotionBloodMagic("Heavy Heart", new - // ResourceLocation(resourceLocation + - // heavyHeart.getName().toLowerCase()), true, 0, 0, 0); - } - - protected static Potion registerPotion(String name, ResourceLocation location, boolean badEffect, int potionColour, int x, int y) - { - Potion potion = new PotionBloodMagic(name, location, badEffect, potionColour, x, y); - GameRegistry.register(potion.setRegistryName(location.getResourcePath())); - return potion; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java deleted file mode 100644 index 7226d51e..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java +++ /dev/null @@ -1,602 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import WayofTime.bloodmagic.tile.TileBloodTank; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.init.MobEffects; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraftforge.common.ForgeModContainer; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.RecipeSorter; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectAttractor; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectBinding; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectBounce; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectMovement; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectSigil; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectSkeletonTurret; -import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectUpdraft; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.compress.CompressionRegistry; -import WayofTime.bloodmagic.api.iface.ISigil; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.recipe.AlchemyTableCustomRecipe; -import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe; -import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe; -import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; -import WayofTime.bloodmagic.api.registry.AlchemyTableRecipeRegistry; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; -import WayofTime.bloodmagic.api.registry.LivingArmourDowngradeRecipeRegistry; -import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.block.enums.EnumBloodRune; -import WayofTime.bloodmagic.client.render.alchemyArray.AttractorAlchemyCircleRenderer; -import WayofTime.bloodmagic.client.render.alchemyArray.BindingAlchemyCircleRenderer; -import WayofTime.bloodmagic.client.render.alchemyArray.DualAlchemyCircleRenderer; -import WayofTime.bloodmagic.client.render.alchemyArray.SingleAlchemyCircleRenderer; -import WayofTime.bloodmagic.client.render.alchemyArray.StaticAlchemyCircleRenderer; -import WayofTime.bloodmagic.compress.AdvancedCompressionHandler; -import WayofTime.bloodmagic.compress.BaseCompressionHandler; -import WayofTime.bloodmagic.compress.StorageBlockCraftingManager; -import WayofTime.bloodmagic.item.ItemComponent; -import WayofTime.bloodmagic.item.ItemDemonCrystal; -import WayofTime.bloodmagic.item.alchemy.ItemCuttingFluid; -import WayofTime.bloodmagic.item.alchemy.ItemLivingArmourPointsUpgrade; -import WayofTime.bloodmagic.item.soul.ItemSoulGem; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeBattleHungry; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeCrippledArm; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeDigSlowdown; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeDisoriented; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeMeleeDecrease; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeQuenched; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeSlowHeal; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeSlowness; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeStormTrooper; -import WayofTime.bloodmagic.potion.BMPotionUtils; -import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTableDyeableRecipe; -import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTablePotionRecipe; -import WayofTime.bloodmagic.util.Utils; - -import com.google.common.base.Stopwatch; - -public class ModRecipes -{ - public static ArrayList addedOreRecipeList = new ArrayList(); - - public static void init() - { - RecipeSorter.register(Constants.Mod.DOMAIN + "shapedorb", ShapedBloodOrbRecipe.class, RecipeSorter.Category.SHAPED, "before:minecraft:shapeless"); - RecipeSorter.register(Constants.Mod.DOMAIN + "shapelessorb", ShapelessBloodOrbRecipe.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); - - initOreDict(); - addFurnaceRecipes(); - addCraftingRecipes(); - addAltarRecipes(); - addAlchemyArrayRecipes(); - addSoulForgeRecipes(); - addAlchemyTableRecipes(); - addOreDoublingAlchemyRecipes(); - addPotionRecipes(); - addLivingArmourDowngradeRecipes(); - } - - public static void initOreDict() - { - OreDictionary.registerOre("dustIron", ItemComponent.getStack(ItemComponent.SAND_IRON)); - OreDictionary.registerOre("dustGold", ItemComponent.getStack(ItemComponent.SAND_GOLD)); - OreDictionary.registerOre("dustCoal", ItemComponent.getStack(ItemComponent.SAND_COAL)); - } - - public static void addFurnaceRecipes() - { - FurnaceRecipes.instance().addSmeltingRecipe(ItemComponent.getStack(ItemComponent.SAND_IRON), new ItemStack(Items.IRON_INGOT), (float) 0.15); - FurnaceRecipes.instance().addSmeltingRecipe(ItemComponent.getStack(ItemComponent.SAND_GOLD), new ItemStack(Items.GOLD_INGOT), (float) 0.15); - } - - public static void addCraftingRecipes() - { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.SOUL_FORGE), "i i", "sgs", "sos", 'i', "ingotIron", 's', "stone", 'g', "ingotGold", 'o', "blockIron")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.SACRIFICIAL_DAGGER), "aaa", " ba", "c a", 'a', "blockGlass", 'b', "ingotGold", 'c', "ingotIron")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.ALTAR), "a a", "aba", "cdc", 'a', "stone", 'b', Blocks.FURNACE, 'c', "ingotGold", 'd', new ItemStack(ModItems.MONSTER_SOUL))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.PACK_SELF_SACRIFICE), "aba", "cdc", "aea", 'a', "blockGlass", 'b', Items.BUCKET, 'c', Items.FLINT, 'd', Items.LEATHER_CHESTPLATE, 'e', ModItems.SLATE)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.PACK_SACRIFICE), "aba", "cdc", "aea", 'a', "blockGlass", 'b', Items.BUCKET, 'c', "ingotIron", 'd', Items.LEATHER_CHESTPLATE, 'e', ModItems.SLATE)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.RITUAL_DIVINER), "dfd", "ase", "dwd", 'f', EnumRuneType.FIRE.getScribeStack(), 'a', EnumRuneType.AIR.getScribeStack(), 'w', EnumRuneType.WATER.getScribeStack(), 'e', EnumRuneType.EARTH.getScribeStack(), 'd', "gemDiamond", 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.RITUAL_DIVINER, 1, 1), " S ", "tdt", " S ", 'S', new ItemStack(ModItems.SLATE, 1, 3), 't', EnumRuneType.DUSK.getScribeStack(), 'd', new ItemStack(ModItems.RITUAL_DIVINER))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.BLOOD_STONE, 1, 1), "aa", "aa", 'a', new ItemStack(ModBlocks.BLOOD_STONE))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.BLOOD_STONE, 16), "stone", new ItemStack(ModItems.BLOOD_SHARD))); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ACTIVATION_CRYSTAL, 1, 1), new ItemStack(Items.NETHER_STAR), OrbRegistry.getOrbStack(ModItems.ORB_ARCHMAGE)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.SOUL_SNARE, 4, 0), "sis", "iri", "sis", 's', new ItemStack(Items.STRING), 'i', "ingotIron", 'r', "dustRedstone")); - - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.BLOOD_TANK), "RBR", "G G", "RRR", 'R', new ItemStack(ModBlocks.BLOOD_RUNE), 'B', ModBlocks.BLOOD_STONE, 'G', "blockGlass")); - for (int i = 1; i < TileBloodTank.CAPACITIES.length; i++) - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.BLOOD_TANK, 1, i), "RBR", "T T", "RRR", 'R', new ItemStack(ModBlocks.BLOOD_RUNE), 'B', ModBlocks.BLOOD_STONE, 'T', new ItemStack(ModBlocks.BLOOD_TANK, 1, i - 1))); - - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.TELEPOSITION_FOCUS, 1, 2), new ItemStack(ModItems.TELEPOSITION_FOCUS, 1, 1), new ItemStack(ModItems.BLOOD_SHARD)); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.TELEPOSITION_FOCUS, 1, 3), new ItemStack(ModItems.TELEPOSITION_FOCUS, 1, 2), new ItemStack(ModItems.BLOOD_SHARD, 1, 1)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.TELEPOSER), "ggg", "efe", "ggg", 'g', "ingotGold", 'e', new ItemStack(Items.ENDER_PEARL), 'f', ModItems.TELEPOSITION_FOCUS)); - - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.LAVA_CRYSTAL), "aba", "bcb", "ded", 'a', "blockGlass", 'b', Items.LAVA_BUCKET, 'c', OrbRegistry.getOrbStack(ModItems.ORB_WEAK), 'd', Blocks.OBSIDIAN, 'e', "gemDiamond")); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE), "aaa", "bcb", "aaa", 'a', "stone", 'b', ModItems.SLATE, 'c', OrbRegistry.getOrbStack(ModItems.ORB_WEAK))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 1), "aba", "cdc", "aba", 'a', "stone", 'b', ModItems.SLATE, 'c', Items.SUGAR, 'd', new ItemStack(ModBlocks.BLOOD_RUNE))); //Speed -// GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 2), "aba", "cdc", "aba", 'a', "stone", 'b', ModItems.slate, 'c', Items.sugar, 'd', new ItemStack(ModBlocks.bloodRune))); //Efficiency - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 3), "aba", "cdc", "aea", 'a', "stone", 'b', new ItemStack(ModItems.SLATE, 1, 1), 'c', "ingotGold", 'd', new ItemStack(ModBlocks.BLOOD_RUNE), 'e', OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE))); //Sacrifice - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 4), "aba", "cdc", "aea", 'a', "stone", 'b', new ItemStack(ModItems.SLATE, 1, 1), 'c', "dustGlowstone", 'd', new ItemStack(ModBlocks.BLOOD_RUNE), 'e', OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE))); //Self-Sacrifice - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 5), "aba", "bcb", "ada", 'a', "stone", 'b', Items.WATER_BUCKET, 'c', new ItemStack(ModBlocks.BLOOD_RUNE), 'd', new ItemStack(ModItems.SLATE, 1, 2))); //Displacement - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 6), "aba", "bcb", "ada", 'a', "stone", 'b', Items.BUCKET, 'c', new ItemStack(ModBlocks.BLOOD_RUNE), 'd', new ItemStack(ModItems.SLATE, 1, 2))); //Capacity - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 7), "aba", "cdc", "aea", 'a', Blocks.OBSIDIAN, 'b', new ItemStack(ModItems.SLATE, 1, 3), 'c', Items.BUCKET, 'd', new ItemStack(ModBlocks.BLOOD_RUNE, 1, 6), 'e', OrbRegistry.getOrbStack(ModItems.ORB_MASTER))); //Augmented Capacity - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 8), "aba", "cdc", "aba", 'a', "stone", 'b', OrbRegistry.getOrbStack(ModItems.ORB_WEAK), 'c', new ItemStack(ModBlocks.BLOOD_RUNE), 'd', OrbRegistry.getOrbStack(ModItems.ORB_MASTER))); //Orb - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 9), "aba", "cdc", "aea", 'a', Items.BUCKET, 'b', new ItemStack(ModItems.SLATE, 1, 3), 'c', "ingotGold", 'd', new ItemStack(ModBlocks.BLOOD_RUNE, 1, 1), 'e', OrbRegistry.getOrbStack(ModItems.ORB_MASTER))); //Acceleration - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.BLOOD_RUNE, 1, 10), "RsR", "GrG", "ReR", 'G', "glowstone", 's', new ItemStack(ModItems.SLATE, 1, 3), 'R', "dustRedstone", 'r', new ItemStack(ModBlocks.BLOOD_RUNE, 1), 'e', OrbRegistry.getOrbStack(ModItems.ORB_MASTER))); //Charging - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.RITUAL_STONE, 4), "aba", "bcb", "aba", 'a', Blocks.OBSIDIAN, 'b', new ItemStack(ModItems.SLATE, 1, 1), 'c', OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.RITUAL_CONTROLLER), "aba", "bcb", "aba", 'a', Blocks.OBSIDIAN, 'b', ModBlocks.RITUAL_STONE, 'c', OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.RITUAL_CONTROLLER, 1, 1), "aba", "bcb", "aba", 'a', Blocks.OBSIDIAN, 'b', "stone", 'c', OrbRegistry.getOrbStack(ModItems.ORB_WEAK))); - - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.BASE_ITEM_FILTER, 1, 0), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "blockGlass", 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.BASE_ITEM_FILTER, 1, 1), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyeYellow", 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.BASE_ITEM_FILTER, 1, 2), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyeGreen", 's', "stickWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.BASE_ITEM_FILTER, 1, 3), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyePurple", 's', "stickWood")); - - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.UPGRADE_TRAINER), "ngn", "ioi", "ngn", 'o', OrbRegistry.getOrbStack(ModItems.ORB_MASTER), 'i', "ingotIron", 'n', "nuggetGold", 'g', "ingotGold")); - - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.INCENSE_ALTAR), "s s", "shs", "coc", 'o', OrbRegistry.getOrbStack(ModItems.ORB_WEAK), 's', "stone", 'c', "cobblestone", 'h', new ItemStack(Items.COAL, 1, 1))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 0), "plankWood", "plankWood", "plankWood", "plankWood", OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 1), new ItemStack(ModBlocks.PATH_BLOCK, 1, 0), new ItemStack(ModBlocks.PATH_BLOCK, 1, 0), new ItemStack(ModBlocks.PATH_BLOCK, 1, 0), new ItemStack(ModBlocks.PATH_BLOCK, 1, 0))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 2), "stone", "stone", "stone", "stone", OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 3), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 4), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), new ItemStack(ModBlocks.PATH_BLOCK, 1, 2), OrbRegistry.getOrbStack(ModItems.ORB_MASTER))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 5), new ItemStack(ModBlocks.PATH_BLOCK, 1, 4), new ItemStack(ModBlocks.PATH_BLOCK, 1, 4), new ItemStack(ModBlocks.PATH_BLOCK, 1, 4), new ItemStack(ModBlocks.PATH_BLOCK, 1, 4))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 6), Blocks.OBSIDIAN, Blocks.OBSIDIAN, Blocks.OBSIDIAN, Blocks.OBSIDIAN, OrbRegistry.getOrbStack(ModItems.ORB_ARCHMAGE))); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.PATH_BLOCK, 4, 7), new ItemStack(ModBlocks.PATH_BLOCK, 1, 6), new ItemStack(ModBlocks.PATH_BLOCK, 1, 6), new ItemStack(ModBlocks.PATH_BLOCK, 1, 6), new ItemStack(ModBlocks.PATH_BLOCK, 1, 6))); - - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.EXPERIENCE_TOME), "ses", "lbl", "gog", 'o', OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN), 'e', Blocks.LAPIS_BLOCK, 'l', new ItemStack(ModItems.SLATE, 1, 2), 'b', Items.ENCHANTED_BOOK, 's', Items.STRING, 'g', "ingotGold")); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.RITUAL_READER), "gog", "isi", " s ", 's', new ItemStack(ModItems.SLATE, 1, 3), 'g', "blockGlass", 'i', "ingotGold", 'o', OrbRegistry.getOrbStack(ModItems.ORB_MASTER))); - - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ALCHEMY_TABLE), "sss", "wbw", "gog", 's', "stone", 'w', "plankWood", 'b', Items.BLAZE_ROD, 'g', "ingotGold", 'o', OrbRegistry.getOrbStack(ModItems.ORB_WEAK))); - - for (int i = 1; i < EnumBloodRune.values().length; i++) - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.BLOOD_RUNE), new ItemStack(ModBlocks.BLOOD_RUNE, 1, i))); - - for (int i = 0; i < ItemSoulGem.names.length; i++) - { - for (int j = 0; j < ItemDemonCrystal.getNames().size(); j++) - { - ItemStack baseGemStack = new ItemStack(ModItems.SOUL_GEM, 1, i); - ItemStack newGemStack = new ItemStack(ModItems.SOUL_GEM, 1, i); - - ItemStack crystalStack = new ItemStack(ModItems.ITEM_DEMON_CRYSTAL, 1, j); - - ((ItemSoulGem) ModItems.SOUL_GEM).setCurrentType(((ItemDemonCrystal) ModItems.ITEM_DEMON_CRYSTAL).getType(crystalStack), newGemStack); - GameRegistry.addShapelessRecipe(newGemStack, baseGemStack, crystalStack); - } - } - - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.MIMIC, 4, 0), "b b", " r ", "bob", 'b', new ItemStack(ModBlocks.BLOOD_STONE), 'r', new ItemStack(ModBlocks.BLOOD_RUNE), 'o', OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.MIMIC, 4, 1), "bsb", "srs", "bob", 'b', new ItemStack(ModBlocks.BLOOD_STONE), 'r', new ItemStack(ModBlocks.BLOOD_RUNE), 's', "stone", 'o', OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.MIMIC, 4, 2), "bsb", "srs", "bob", 'b', new ItemStack(ModBlocks.BLOOD_STONE), 'r', new ItemStack(ModBlocks.BLOOD_RUNE), 's', "blockGlass", 'o', OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.MIMIC, 2, 3), "bnb", "trt", "bob", 'b', new ItemStack(ModBlocks.BLOOD_STONE), 'r', new ItemStack(ModBlocks.BLOOD_RUNE), 'n', Blocks.GLOWSTONE, 't', "torch", 'o', OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN))); - - for (int i = 0; i < 5; i++) - { - ItemStack crystalStack = new ItemStack(ModItems.ITEM_DEMON_CRYSTAL, 1, i); - ItemStack baseStoneStack = new ItemStack(ModBlocks.DEMON_EXTRAS, 1, i); - ItemStack baseStoneStackCrafted = new ItemStack(ModBlocks.DEMON_EXTRAS, 16, i); - ItemStack polishedStoneStack = new ItemStack(ModBlocks.DEMON_EXTRAS, 1, i + 5); - ItemStack willBrickStack = new ItemStack(ModBlocks.DEMON_BRICK_1, 1, i); - ItemStack willBrickStackCrafted = new ItemStack(ModBlocks.DEMON_BRICK_1, 4, i); - - ItemStack willSmallBrickStack = new ItemStack(ModBlocks.DEMON_BRICK_2, 1, i); - ItemStack willSmallBrickStackCrafted = new ItemStack(ModBlocks.DEMON_BRICK_2, 1, i); - ItemStack pillarStack = new ItemStack(ModBlocks.DEMON_PILLAR_1, 1, i); - ItemStack pillarStackCrafted = new ItemStack(ModBlocks.DEMON_PILLAR_1, 6, i); - - GameRegistry.addRecipe(new ShapelessOreRecipe(baseStoneStackCrafted, crystalStack, "stone", "stone", "stone", "stone", "stone", "stone", "stone", "stone")); - GameRegistry.addRecipe(willBrickStackCrafted, "ss", "ss", 's', baseStoneStack); - GameRegistry.addRecipe(willSmallBrickStackCrafted, "ss", "ss", 's', willBrickStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_BRICK_2, 9, i + 5), "scs", "ccc", "scs", 's', baseStoneStack, 'c', willBrickStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_BRICK_2, 9, i + 10), "scs", "coc", "scs", 's', baseStoneStack, 'c', willBrickStack, 'o', crystalStack); - GameRegistry.addRecipe(pillarStackCrafted, "ss", "ss", "ss", 's', polishedStoneStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_PILLAR_2, 8, i), "ppp", "pcp", "ppp", 'p', pillarStack, 'c', crystalStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_WALL_1, 6, i), "sss", "sss", 's', willBrickStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_WALL_1, 6, i + 5), "sss", "sss", 's', willSmallBrickStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_WALL_1, 6, i + 10), "sss", "sss", 's', polishedStoneStack); - - GameRegistry.addRecipe(new ItemStack(i < 2 ? ModBlocks.DEMON_STAIRS_1 : (i < 4 ? ModBlocks.DEMON_STAIRS_2 : ModBlocks.DEMON_STAIRS_3), 8, i % 2), "s ", "ss ", "sss", 's', polishedStoneStack); - GameRegistry.addRecipe(new ItemStack(i < 2 ? ModBlocks.DEMON_PILLAR_CAP_1 : (i < 4 ? ModBlocks.DEMON_PILLAR_CAP_2 : ModBlocks.DEMON_PILLAR_CAP_3), 6, i % 2), "sss", "sss", 's', pillarStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.DEMON_LIGHT, 5, i), "sgs", "ggg", "sgs", 's', polishedStoneStack, 'g', Blocks.GLOWSTONE); - - GameRegistry.addSmelting(baseStoneStack, polishedStoneStack, 0.15f); - } - } - - public static void addAltarRecipes() - { - // ONE - AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.ORB_WEAK), EnumAltarTier.ONE, ModItems.ORB_WEAK.getCapacity(), 2, 1); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.DIAMOND), OrbRegistry.getOrbStack(ModItems.ORB_WEAK), EnumAltarTier.ONE, 2000, 2, 1)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.STONE), new ItemStack(ModItems.SLATE), EnumAltarTier.ONE, 1000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.BUCKET), new ItemStack(ForgeModContainer.getInstance().universalBucket), EnumAltarTier.ONE, 1000, 5, 0)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.BOOK), new ItemStack(ModItems.SANGUINE_BOOK), EnumAltarTier.ONE, 1000, 20, 0)); - - // TWO - AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE), EnumAltarTier.TWO, ModItems.ORB_APPRENTICE.getCapacity(), 5, 5); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.REDSTONE_BLOCK), OrbRegistry.getOrbStack(ModItems.ORB_APPRENTICE), EnumAltarTier.TWO, 5000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.SLATE), new ItemStack(ModItems.SLATE, 1, 1), EnumAltarTier.TWO, 2000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.IRON_SWORD), new ItemStack(ModItems.DAGGER_OF_SACRIFICE), EnumAltarTier.TWO, 3000, 5, 5)); - - // THREE - AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN), EnumAltarTier.THREE, ModItems.ORB_MAGICIAN.getCapacity(), 15, 15); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.GOLD_BLOCK), OrbRegistry.getOrbStack(ModItems.ORB_MAGICIAN), EnumAltarTier.THREE, 25000, 20, 20)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SLATE, 1, 2), EnumAltarTier.THREE, 5000, 15, 10)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.OBSIDIAN), EnumRuneType.EARTH.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.LAPIS_BLOCK), EnumRuneType.WATER.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.MAGMA_CREAM), EnumRuneType.FIRE.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.GHAST_TEAR), EnumRuneType.AIR.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.LAVA_CRYSTAL), new ItemStack(ModItems.ACTIVATION_CRYSTAL), EnumAltarTier.THREE, 10000, 20, 10)); - - // FOUR - AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.ORB_MASTER), EnumAltarTier.FOUR, ModItems.ORB_MASTER.getCapacity(), 25, 25); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.BLOOD_SHARD), OrbRegistry.getOrbStack(ModItems.ORB_MASTER), EnumAltarTier.FOUR, 25000, 30, 50)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.SLATE, 1, 2), new ItemStack(ModItems.SLATE, 1, 3), EnumAltarTier.FOUR, 15000, 20, 20)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.COAL_BLOCK), EnumRuneType.DUSK.getScribeStack(), EnumAltarTier.FOUR, 2000, 20, 10)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.ENDER_PEARL), new ItemStack(ModItems.TELEPOSITION_FOCUS), EnumAltarTier.FOUR, 2000, 10, 10)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.TELEPOSITION_FOCUS), new ItemStack(ModItems.TELEPOSITION_FOCUS, 1, 1), EnumAltarTier.FOUR, 10000, 20, 10)); - - // FIVE - AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.ORB_ARCHMAGE), EnumAltarTier.FIVE, ModItems.ORB_ARCHMAGE.getCapacity(), 50, 50); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.NETHER_STAR), OrbRegistry.getOrbStack(ModItems.ORB_ARCHMAGE), EnumAltarTier.FIVE, 80000, 50, 100)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SLATE, 1, 4), EnumAltarTier.FIVE, 30000, 40, 100)); - - // SIX - AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.ORB_TRANSCENDENT), EnumAltarTier.SIX, ModItems.ORB_TRANSCENDENT.getCapacity(), 50, 50); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModBlocks.CRYSTAL), OrbRegistry.getOrbStack(ModItems.ORB_TRANSCENDENT), EnumAltarTier.SIX, 200000, 100, 200)); - AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.GLOWSTONE), EnumRuneType.DAWN.getScribeStack(), EnumAltarTier.SIX, 200000, 100, 200)); - } - - public static void addAlchemyArrayRecipes() - { - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_SWORD), new AlchemyArrayEffectBinding("boundSword", Utils.setUnbreakable(new ItemStack(ModItems.BOUND_SWORD))), new BindingAlchemyCircleRenderer()); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_AXE), new AlchemyArrayEffectBinding("boundAxe", Utils.setUnbreakable(new ItemStack(ModItems.BOUND_AXE)))); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_PICKAXE), new AlchemyArrayEffectBinding("boundPickaxe", Utils.setUnbreakable(new ItemStack(ModItems.BOUND_PICKAXE)))); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_SHOVEL), new AlchemyArrayEffectBinding("boundShovel", Utils.setUnbreakable(new ItemStack(ModItems.BOUND_SHOVEL)))); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_HELMET), new AlchemyArrayEffectBinding("livingHelmet", new ItemStack(ModItems.LIVING_ARMOUR_HELMET))); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_CHESTPLATE), new AlchemyArrayEffectBinding("livingChest", new ItemStack(ModItems.LIVING_ARMOUR_CHEST))); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_LEGGINGS), new AlchemyArrayEffectBinding("livingLegs", new ItemStack(ModItems.LIVING_ARMOUR_LEGS))); - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_BOOTS), new AlchemyArrayEffectBinding("livingBoots", new ItemStack(ModItems.LIVING_ARMOUR_BOOTS))); - - AlchemyArrayRecipeRegistry.registerCraftingRecipe(new ItemStack(Items.REDSTONE), new ItemStack(ModItems.SLATE), new ItemStack(ModItems.SIGIL_DIVINATION), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/DivinationSigil.png")); - - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), new ItemStack(ModItems.SLATE), new ItemStack(ModItems.SIGIL_WATER), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WaterSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), new ItemStack(ModItems.SLATE), new ItemStack(ModItems.SIGIL_LAVA), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/LavaSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AIR), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_AIR), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/AirSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_FAST_MINER), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/FastMinerSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_VOID), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_VOID), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/VoidSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_GREEN_GROVE), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/GrowthSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), new ItemStack(ModItems.SLATE, 1, 2), new ItemStack(ModItems.SIGIL_ELEMENTAL_AFFINITY), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/ElementalAffinitySigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_SEER), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SightSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_HOLDING), new ItemStack(ModItems.SLATE, 1, 2), new ItemStack(ModItems.SIGIL_HOLDING), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), new ItemStack(ModItems.SLATE, 1, 2), new ItemStack(ModItems.SIGIL_BLOOD_LIGHT), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/LightSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_MAGNETISM), new ItemStack(ModItems.SLATE, 1, 2), new ItemStack(ModItems.SIGIL_MAGNETISM), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/MagnetismSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_SUPPRESSION), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SuppressionSigil.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_HASTE), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_HASTE), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BRIDGE), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_PHANTOM_BRIDGE), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_COMPRESSION), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_COMPRESSION), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SEVERANCE), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_ENDER_SEVERANCE), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TELEPOSITION), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_TELEPOSITION), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TRANSPOSITION), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.SIGIL_TRANSPOSITION), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_CLAW), new ItemStack(ModItems.SLATE, 1, 2), new ItemStack(ModItems.SIGIL_CLAW), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BOUNCE), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_BOUNCE), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FROST), new ItemStack(ModItems.SLATE, 1, 1), new ItemStack(ModItems.SIGIL_FROST), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WIPArray.png")); - - AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.ROTTEN_FLESH), new AlchemyArrayEffectAttractor("attractor"), new AttractorAlchemyCircleRenderer()); - AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.FEATHER), new ItemStack(Items.REDSTONE), new AlchemyArrayEffectMovement("movement"), new StaticAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/MovementArray.png"))); - AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.FEATHER), new ItemStack(Items.GLOWSTONE_DUST), new AlchemyArrayEffectUpdraft("updraft"), new AttractorAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/UpdraftArray.png"))); - AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.SLIME_BALL), new ItemStack(Items.REDSTONE), new AlchemyArrayEffectBounce("bounce"), new SingleAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BounceArray.png"))); - - AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.ARROW), new ItemStack(Items.FEATHER), new AlchemyArrayEffectSkeletonTurret("skeletonTurret"), new DualAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret1.png"), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret2.png"))); - - AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), new ItemStack(Items.IRON_PICKAXE), new AlchemyArrayEffectSigil("fastMiner", (ISigil) ModItems.SIGIL_FAST_MINER), new SingleAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/FastMinerSigil.png"))); - - } - - public static void addCompressionHandlers() - { - Stopwatch stopwatch = Stopwatch.createStarted(); - StorageBlockCraftingManager.getInstance().addStorageBlockRecipes(); - CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.GLOWSTONE_DUST, 4, 0), new ItemStack(Blocks.GLOWSTONE), 64)); - CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.SNOWBALL, 4, 0), new ItemStack(Blocks.SNOW), 8)); - CompressionRegistry.registerHandler(new AdvancedCompressionHandler()); - - CompressionRegistry.registerItemThreshold(new ItemStack(Blocks.COBBLESTONE), 64); - stopwatch.stop(); - - BloodMagic.instance.getLogger().info("Added compression recipes in {}", stopwatch); - } - - public static void addSoulForgeRecipes() - { - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SOUL_GEM), 1, 1, "dustRedstone", "ingotGold", "blockGlass", "dyeBlue"); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SOUL_GEM, 1, 1), 60, 20, new ItemStack(ModItems.SOUL_GEM), "gemDiamond", "blockRedstone", "blockLapis"); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SOUL_GEM, 1, 2), 240, 50, new ItemStack(ModItems.SOUL_GEM, 1, 1), "gemDiamond", "blockGold", new ItemStack(ModItems.SLATE, 1, 2)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SOUL_GEM, 1, 3), 1000, 100, new ItemStack(ModItems.SOUL_GEM, 1, 2), new ItemStack(ModItems.SLATE, 1, 3), new ItemStack(ModItems.BLOOD_SHARD), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SOUL_GEM, 1, 4), 4000, 500, new ItemStack(ModItems.SOUL_GEM, 1, 3), Items.NETHER_STAR); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SENTIENT_SWORD), 0, 0, new ItemStack(ModItems.SOUL_GEM), new ItemStack(Items.IRON_SWORD)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SENTIENT_AXE), 0, 0, new ItemStack(ModItems.SOUL_GEM), new ItemStack(Items.IRON_AXE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SENTIENT_PICKAXE), 0, 0, new ItemStack(ModItems.SOUL_GEM), new ItemStack(Items.IRON_PICKAXE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SENTIENT_SHOVEL), 0, 0, new ItemStack(ModItems.SOUL_GEM), new ItemStack(Items.IRON_SHOVEL)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SENTIENT_BOW), 70, 0, new ItemStack(Items.BOW), new ItemStack(ModItems.SOUL_GEM, 1, 1), Items.STRING, Items.STRING); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.ARCANE_ASHES), 0, 0, "dustRedstone", "dyeWhite", new ItemStack(Items.GUNPOWDER), Items.COAL); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), 10, 3, new ItemStack(Items.SUGAR), new ItemStack(Items.WATER_BUCKET), new ItemStack(Items.WATER_BUCKET)); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), 32, 10, Items.LAVA_BUCKET, "dustRedstone", "cobblestone", "blockCoal"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_VOID), 64, 10, Items.BUCKET, Items.STRING, Items.STRING, Items.GUNPOWDER); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH), 128, 20, "treeSapling", "treeSapling", Items.REEDS, Items.SUGAR); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AIR), 128, 20, Items.GHAST_TEAR, Items.FEATHER, Items.FEATHER); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT), 64, 0, ModItems.SIGIL_DIVINATION, "blockGlass", "blockGlass", "dustGlowstone"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_HOLDING), 64, 20, Blocks.CHEST, "leather", "string", "string"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), 128, 10, Items.IRON_PICKAXE, Items.IRON_AXE, Items.IRON_SHOVEL, Items.GUNPOWDER); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.SIGIL_WATER, ModItems.SIGIL_AIR, ModItems.SIGIL_LAVA, Blocks.OBSIDIAN); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.TELEPOSER, Items.WATER_BUCKET, Items.LAVA_BUCKET, Items.BLAZE_ROD); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.GUNPOWDER); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), 300, 10, "glowstone", Blocks.TORCH, "dustRedstone", "dustRedstone"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_MAGNETISM), 600, 10, Items.STRING, "ingotGold", "blockIron", "ingotGold"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_HASTE), 1400, 100, Items.COOKIE, Items.SUGAR, Items.COOKIE, "stone"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BRIDGE), 600, 50, Blocks.SOUL_SAND, Blocks.SOUL_SAND, "stone", Blocks.OBSIDIAN); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SEVERANCE), 800, 70, Items.ENDER_EYE, Items.ENDER_PEARL, "ingotGold", "ingotGold"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_COMPRESSION), 2000, 200, "blockIron", "blockGold", Blocks.OBSIDIAN, "cobblestone"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TELEPOSITION), 1500, 200, ModBlocks.TELEPOSER, "glowstone", "blockRedstone", "ingotGold"); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TRANSPOSITION), 1500, 200, ModBlocks.TELEPOSER, "gemDiamond", Items.ENDER_PEARL, Blocks.OBSIDIAN); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_CLAW), 800, 120, Items.FLINT, Items.FLINT, ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BOUNCE), 200, 20, Blocks.SLIME_BLOCK, Blocks.SLIME_BLOCK, Items.LEATHER, Items.STRING); - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FROST), 80, 10, Blocks.ICE, Items.SNOWBALL, Items.SNOWBALL, "dustRedstone"); - - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.SENTIENT_ARMOUR_GEM), 240, 150, Items.DIAMOND_CHESTPLATE, new ItemStack(ModItems.SOUL_GEM, 1, 1), Blocks.IRON_BLOCK, Blocks.OBSIDIAN); - - TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 400, 10, "blockGlass", "stone", new ItemStack(ModItems.SLATE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.NODE_ROUTER), 400, 5, "stickWood", new ItemStack(ModItems.SLATE, 1, 1), "gemLapis", "gemLapis"); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.ITEM_ROUTING_NODE), 400, 5, "dustGlowstone", "dustRedstone", "blockGlass", "stone"); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.OUTPUT_ROUTING_NODE), 400, 25, "dustGlowstone", "dustRedstone", "ingotIron", new ItemStack(ModBlocks.ITEM_ROUTING_NODE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.INPUT_ROUTING_NODE), 400, 25, "dustGlowstone", "dustRedstone", "ingotGold", new ItemStack(ModBlocks.ITEM_ROUTING_NODE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.MASTER_ROUTING_NODE), 400, 200, "blockIron", "gemDiamond", new ItemStack(ModItems.SLATE, 1, 2)); - - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRYSTAL, 1, 0), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRYSTAL, 1, 1), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_CORROSIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_CORROSIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_CORROSIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_CORROSIVE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRYSTAL, 1, 2), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRYSTAL, 1, 3), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_VENGEFUL), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_VENGEFUL), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_VENGEFUL), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_VENGEFUL)); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRYSTAL, 1, 4), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST)); - - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRUCIBLE), 400, 100, Items.CAULDRON, "stone", "gemLapis", "gemDiamond"); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_PYLON), 400, 50, "blockIron", "stone", "gemLapis", ModItems.ITEM_DEMON_CRYSTAL); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.DEMON_CRYSTALLIZER), 500, 100, ModBlocks.SOUL_FORGE, "stone", "gemLapis", "blockGlass"); - TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.DEMON_WILL_GAUGE), 400, 50, "ingotGold", "dustRedstone", "blockGlass", ModItems.ITEM_DEMON_CRYSTAL); - } - - public static void addAlchemyTableRecipes() - { - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.STRING, 4), 0, 100, 0, Blocks.WOOL, Items.FLINT); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.FLINT, 2), 0, 20, 0, Blocks.GRAVEL, Items.FLINT); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.LEATHER, 4), 100, 200, 1, Items.ROTTEN_FLESH, Items.ROTTEN_FLESH, Items.ROTTEN_FLESH, Items.ROTTEN_FLESH, Items.FLINT, Items.WATER_BUCKET); - - AlchemyTableRecipeRegistry.registerRecipe(ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE), 500, 200, 1, Items.GUNPOWDER, Items.GUNPOWDER, "dustCoal"); - - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.BREAD), 100, 200, 1, Items.WHEAT, Items.SUGAR); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.GRASS), 200, 200, 1, Blocks.DIRT, new ItemStack(Items.DYE, 1, 15), Items.WHEAT_SEEDS); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.CLAY_BALL, 4), 50, 100, 2, Items.WATER_BUCKET, "sand"); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.CLAY, 5), 200, 200, 1, Items.WATER_BUCKET, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.OBSIDIAN), 50, 50, 1, Items.WATER_BUCKET, Items.LAVA_BUCKET); - - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.SULFUR, 8), 0, 100, 0, Items.LAVA_BUCKET); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.SALTPETER, 4), 0, 100, 0, ItemComponent.getStack(ItemComponent.PLANT_OIL), ItemComponent.getStack(ItemComponent.PLANT_OIL), "dustCoal"); - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.GUNPOWDER, 3), 0, 100, 0, ItemComponent.getStack(ItemComponent.SALTPETER), ItemComponent.getStack(ItemComponent.SULFUR), new ItemStack(Items.COAL, 1, 1)); - - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_COAL, 4), 100, 100, 1, new ItemStack(Items.COAL, 1, 0), new ItemStack(Items.COAL, 1, 0), Items.FLINT)); - - AlchemyTableRecipeRegistry.registerRecipe(ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC), 1000, 400, 1, "dustCoal", Items.GUNPOWDER, Items.REDSTONE, Items.SUGAR, ItemComponent.getStack(ItemComponent.PLANT_OIL), new ItemStack(Items.POTIONITEM)); - - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_IRON, 2), 400, 200, 1, "oreIron", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC))); - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_GOLD, 2), 400, 200, 1, "oreGold", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC))); - - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(new ItemStack(Items.REDSTONE, 8), 400, 200, 1, "oreRedstone", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC))); - - addedOreRecipeList.add("oreIron"); - addedOreRecipeList.add("oreGold"); - addedOreRecipeList.add("oreCoal"); - addedOreRecipeList.add("oreRedstone"); - - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(new ItemStack(Blocks.GRAVEL), 50, 50, 1, "cobblestone", ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE))); - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(new ItemStack(Blocks.SAND), 50, 50, 1, Blocks.GRAVEL, ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE))); - - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.CARROT, Items.CARROT, Items.CARROT, new ItemStack(Items.DYE, 1, 15)); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.POTATO, Items.POTATO, new ItemStack(Items.DYE, 1, 15)); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.WHEAT, Items.WHEAT, new ItemStack(Items.DYE, 1, 15)); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.BEETROOT, Items.BEETROOT, Items.BEETROOT, new ItemStack(Items.DYE, 1, 15)); - - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.NEURO_TOXIN), 1000, 100, 2, new ItemStack(Items.FISH, 1, 3)); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.ANTISEPTIC, 2), 1000, 200, 2, ItemComponent.getStack(ItemComponent.PLANT_OIL), "nuggetGold", Items.WHEAT, Items.SUGAR, Blocks.BROWN_MUSHROOM, Blocks.RED_MUSHROOM); - - AlchemyTableRecipeRegistry.registerRecipe(ItemLivingArmourPointsUpgrade.getStack(ItemLivingArmourPointsUpgrade.DRAFT_ANGELUS), 20000, 400, 3, ItemComponent.getStack(ItemComponent.NEURO_TOXIN), ItemComponent.getStack(ItemComponent.ANTISEPTIC), "dustGold", Items.FERMENTED_SPIDER_EYE, new ItemStack(ModItems.BLOOD_SHARD, 1, 0), Items.GHAST_TEAR); - - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableDyeableRecipe(0, 100, 0, new ItemStack(ModItems.SIGIL_HOLDING))); - - AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(ModItems.POTION_FLASK), 1000, 200, 2, new ItemStack(Items.POTIONITEM), Items.NETHER_WART, Items.REDSTONE, Items.GLOWSTONE_DUST); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.CATALYST_LENGTH_1), 1000, 100, 2, Items.GUNPOWDER, Items.NETHER_WART, "gemLapis"); - AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.CATALYST_POWER_1), 1000, 100, 2, Items.GUNPOWDER, Items.NETHER_WART, "dustRedstone"); - } - - public static void addOreDoublingAlchemyRecipes() - { - String[] oreList = OreDictionary.getOreNames().clone(); - for (String ore : oreList) - { - if (ore.startsWith("ore") && !addedOreRecipeList.contains(ore)) - { - String dustName = ore.replaceFirst("ore", "dust"); - - List dustList = OreDictionary.getOres(dustName); - if (dustList != null && dustList.size() > 0) - { - ItemStack dustStack = dustList.get(0).copy(); - dustStack.stackSize = 2; - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(dustStack, 400, 200, 1, ore, ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC))); - addedOreRecipeList.add(ore); - } - } - } - } - - public static void addPotionRecipes() - { - addPotionRecipe(1000, 1, new ItemStack(Items.GHAST_TEAR), new PotionEffect(MobEffects.REGENERATION, 450)); - addPotionRecipe(1000, 1, new ItemStack(Items.GOLDEN_CARROT), new PotionEffect(MobEffects.NIGHT_VISION, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.MAGMA_CREAM), new PotionEffect(MobEffects.FIRE_RESISTANCE, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.WATER_BUCKET), new PotionEffect(MobEffects.WATER_BREATHING, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.SUGAR), new PotionEffect(MobEffects.SPEED, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.SPECKLED_MELON), new PotionEffect(MobEffects.INSTANT_HEALTH, 1)); - addPotionRecipe(1000, 1, new ItemStack(Items.SPIDER_EYE), new PotionEffect(MobEffects.POISON, 450)); - addPotionRecipe(1000, 1, new ItemStack(Items.DYE, 1, 0), new PotionEffect(MobEffects.BLINDNESS, 450)); - addPotionRecipe(1000, 1, new ItemStack(Items.FERMENTED_SPIDER_EYE), new PotionEffect(MobEffects.WEAKNESS, 450)); - addPotionRecipe(1000, 1, new ItemStack(Items.BLAZE_POWDER), new PotionEffect(MobEffects.STRENGTH, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.FEATHER), new PotionEffect(MobEffects.JUMP_BOOST, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.CLAY_BALL), new PotionEffect(MobEffects.SLOWNESS, 450)); - addPotionRecipe(1000, 1, new ItemStack(Items.REDSTONE), new PotionEffect(MobEffects.HASTE, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.GLASS_BOTTLE), new PotionEffect(MobEffects.INVISIBILITY, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.POISONOUS_POTATO), new PotionEffect(MobEffects.SATURATION, 1)); - addPotionRecipe(1000, 1, new ItemStack(ModItems.BLOOD_SHARD, 1, 0), new PotionEffect(MobEffects.HEALTH_BOOST, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Blocks.SLIME_BLOCK), new PotionEffect(ModPotions.bounce, 2 * 60 * 20)); - addPotionRecipe(1000, 1, new ItemStack(Items.STRING), new PotionEffect(ModPotions.cling, 2 * 60 * 20)); - - addPotionRecipe(1000, 1, new ItemStack(Items.BEETROOT), new PotionEffect(ModPotions.deafness, 450)); - -// AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(5000, 100, 4, new ItemStack(Blocks.SLIME_BLOCK), new PotionEffect(ModPotions.bounce, 15 * 60 * 20))); -// AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(5000, 100, 4, new ItemStack(Items.STRING), new PotionEffect(ModPotions.bounce, 15 * 60 * 20))); - } - - static ItemStack mundaneLengtheningStack = ItemComponent.getStack(ItemComponent.CATALYST_LENGTH_1); - static ItemStack mundanePowerStack = ItemComponent.getStack(ItemComponent.CATALYST_POWER_1); - - public static void addPotionRecipe(int lpDrained, int tier, ItemStack inputStack, PotionEffect baseEffect) - { - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(lpDrained, 100, tier, inputStack, baseEffect)); - - List lengtheningList = new ArrayList(); - lengtheningList.add(inputStack); - lengtheningList.add(mundaneLengtheningStack); - AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getLengthAugmentRecipe(lpDrained, 100, tier, lengtheningList, baseEffect, 1)); - - List powerList = new ArrayList(); - powerList.add(inputStack); - powerList.add(mundanePowerStack); - AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getPowerAugmentRecipe(lpDrained, 100, tier, powerList, baseEffect, 1)); - } - - public static void addLivingArmourDowngradeRecipes() - { - String messageBase = "ritual.BloodMagic.downgradeRitual.dialogue."; - - ItemStack bowStack = new ItemStack(Items.BOW); - ItemStack bottleStack = new ItemStack(Items.POTIONITEM, 1, 0); - ItemStack swordStack = new ItemStack(Items.STONE_SWORD); - ItemStack goldenAppleStack = new ItemStack(Items.GOLDEN_APPLE); - ItemStack fleshStack = new ItemStack(Items.ROTTEN_FLESH); - ItemStack shieldStack = new ItemStack(Items.SHIELD); - ItemStack pickStack = new ItemStack(Items.STONE_PICKAXE); - ItemStack minecartStack = new ItemStack(Items.MINECART); - ItemStack stringStack = new ItemStack(Items.STRING); - - Map> dialogueMap = new HashMap>(); - dialogueMap.put(bowStack, Pair.of("bow", new int[] { 1, 100, 300, 500 })); - dialogueMap.put(bottleStack, Pair.of("quenched", new int[] { 1, 100, 300, 500 })); - dialogueMap.put(swordStack, Pair.of("dulledBlade", new int[] { 1, 100, 300, 500, 700 })); - dialogueMap.put(goldenAppleStack, Pair.of("slowHeal", new int[] { 1, 100, 300, 500, 700 })); - - for (Entry> entry : dialogueMap.entrySet()) - { - ItemStack keyStack = entry.getKey(); - String str = entry.getValue().getKey(); - Map> textMap = new HashMap>(); - for (int tick : entry.getValue().getValue()) - { - List textList = new ArrayList(); - textList.add(new TextComponentTranslation("\u00A74%s", new TextComponentTranslation(messageBase + str + "." + tick))); - textMap.put(tick, textList); - } - - LivingArmourDowngradeRecipeRegistry.registerDialog(keyStack, textMap); - } - - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(0), bowStack, Items.ARROW, Items.STRING, "ingotIron", "ingotIron"); - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(1), bowStack, Items.SPECTRAL_ARROW, "ingotGold", "dustRedstone", "dustGlowstone", "gemLapis"); - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(2), bowStack, "gemDiamond", Items.FIRE_CHARGE, Items.BLAZE_ROD, Items.FEATHER); - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(3), bowStack, Items.PRISMARINE_SHARD, Items.BLAZE_ROD, Items.FEATHER, Items.FEATHER); - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(4), bowStack, new ItemStack(Items.TIPPED_ARROW, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.TIPPED_ARROW, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.TIPPED_ARROW, 1, OreDictionary.WILDCARD_VALUE)); -// LivingArmourDowngradeRecipeRegistry.registerDialog(bowStack, bowMap); - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeQuenched(0), bottleStack, Items.DRAGON_BREATH); - LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeCrippledArm(0), shieldStack, "gemDiamond"); - - for (int i = 0; i < 10; i++) - { - addRecipeForTieredDowngrade(new LivingArmourUpgradeMeleeDecrease(i), swordStack, i); - addRecipeForTieredDowngrade(new LivingArmourUpgradeSlowHeal(i), goldenAppleStack, i); - addRecipeForTieredDowngrade(new LivingArmourUpgradeBattleHungry(i), fleshStack, i); - addRecipeForTieredDowngrade(new LivingArmourUpgradeDigSlowdown(i), pickStack, i); - addRecipeForTieredDowngrade(new LivingArmourUpgradeDisoriented(i), minecartStack, i); - addRecipeForTieredDowngrade(new LivingArmourUpgradeSlowness(i), stringStack, i); - } - } - - public static void addRecipeForTieredDowngrade(LivingArmourUpgrade upgrade, ItemStack stack, int tier) - { - switch (tier) - { - case 0: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, "ingotIron", new ItemStack(ModItems.SLATE, 1, 0)); - break; - case 1: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, "dustRedstone", "dustRedstone", "ingotIron", new ItemStack(ModItems.SLATE, 1, 0)); - break; - case 2: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, "ingotGold", "gemLapis", "gemLapis", new ItemStack(ModItems.SLATE, 1, 1)); - break; - case 3: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.VINE, "dyeRed", Items.GOLDEN_CARROT, new ItemStack(ModItems.SLATE, 1, 1)); - break; - case 4: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Items.GOLDEN_APPLE, "treeSapling", "treeSapling", new ItemStack(ModItems.SLATE, 1, 2)); - break; - case 5: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.IRON_BLOCK, Blocks.REDSTONE_BLOCK, new ItemStack(ModItems.SLATE, 1, 2)); - break; - case 6: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.IRON_BLOCK, Blocks.GLOWSTONE, "ingotGold", "ingotGold", new ItemStack(ModItems.SLATE, 1, 3)); - break; - case 7: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.GOLD_BLOCK, Blocks.LAPIS_BLOCK, "gemDiamond", new ItemStack(ModItems.SLATE, 1, 3)); - break; - case 8: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Items.DRAGON_BREATH, "gemDiamond", new ItemStack(ModItems.SLATE, 1, 4)); - break; - case 9: - LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Items.NETHER_STAR, "gemDiamond", "gemDiamond", new ItemStack(ModItems.SLATE, 1, 4)); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java b/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java deleted file mode 100644 index b03ccce2..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java +++ /dev/null @@ -1,182 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import net.minecraft.init.Blocks; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.registry.HarvestRegistry; -import WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry; -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import WayofTime.bloodmagic.item.alchemy.ItemCuttingFluid; -import WayofTime.bloodmagic.ritual.RitualAltarBuilder; -import WayofTime.bloodmagic.ritual.RitualAnimalGrowth; -import WayofTime.bloodmagic.ritual.RitualArmourEvolve; -import WayofTime.bloodmagic.ritual.RitualContainment; -import WayofTime.bloodmagic.ritual.RitualCrushing; -import WayofTime.bloodmagic.ritual.RitualCrystalHarvest; -import WayofTime.bloodmagic.ritual.RitualExpulsion; -import WayofTime.bloodmagic.ritual.RitualFeatheredKnife; -import WayofTime.bloodmagic.ritual.RitualFelling; -import WayofTime.bloodmagic.ritual.RitualForsakenSoul; -import WayofTime.bloodmagic.ritual.RitualFullStomach; -import WayofTime.bloodmagic.ritual.RitualGreenGrove; -import WayofTime.bloodmagic.ritual.RitualHarvest; -import WayofTime.bloodmagic.ritual.RitualInterdiction; -import WayofTime.bloodmagic.ritual.RitualJumping; -import WayofTime.bloodmagic.ritual.RitualLava; -import WayofTime.bloodmagic.ritual.RitualLivingArmourDowngrade; -import WayofTime.bloodmagic.ritual.RitualMagnetic; -import WayofTime.bloodmagic.ritual.RitualMeteor; -import WayofTime.bloodmagic.ritual.RitualPlacer; -import WayofTime.bloodmagic.ritual.RitualPortal; -import WayofTime.bloodmagic.ritual.RitualPump; -import WayofTime.bloodmagic.ritual.RitualRegeneration; -import WayofTime.bloodmagic.ritual.RitualSpeed; -import WayofTime.bloodmagic.ritual.RitualSuppression; -import WayofTime.bloodmagic.ritual.RitualUpgradeRemove; -import WayofTime.bloodmagic.ritual.RitualWater; -import WayofTime.bloodmagic.ritual.RitualWellOfSuffering; -import WayofTime.bloodmagic.ritual.RitualZephyr; -import WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable; -import WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem; -import WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall; -import WayofTime.bloodmagic.ritual.imperfect.ImperfectRitualNight; -import WayofTime.bloodmagic.ritual.imperfect.ImperfectRitualRain; -import WayofTime.bloodmagic.ritual.imperfect.ImperfectRitualResistance; -import WayofTime.bloodmagic.ritual.imperfect.ImperfectRitualZombie; - -public class ModRituals -{ - public static Ritual waterRitual; - public static Ritual lavaRitual; - public static Ritual greenGroveRitual; - public static Ritual jumpRitual; - public static Ritual sufferingRitual; - public static Ritual featheredKnifeRitual; - public static Ritual regenerationRitual; - public static Ritual animalGrowthRitual; - public static Ritual harvestRitual; - public static Ritual magneticRitual; - public static Ritual crushingRitual; - public static Ritual stomachRitual; - public static Ritual interdictionRitual; - public static Ritual containmentRitual; - public static Ritual speedRitual; - public static Ritual suppressionRitual; - public static Ritual expulsionRitual; - public static Ritual zephyrRitual; - public static Ritual upgradeRemoveRitual; - public static Ritual armourEvolveRitual; - public static Ritual forsakenSoulRitual; - public static Ritual crystalHarvestRitual; - -// public static Ritual cobblestoneRitual; - public static Ritual placerRitual; - public static Ritual fellingRitual; - public static Ritual pumpRitual; - public static Ritual altarBuilderRitual; - public static Ritual portalRitual; - - public static Ritual meteorRitual; - - public static Ritual downgradeRitual; - - public static ImperfectRitual imperfectNight; - public static ImperfectRitual imperfectRain; - public static ImperfectRitual imperfectResistance; - public static ImperfectRitual imperfectZombie; - - public static void initRituals() - { - waterRitual = new RitualWater(); - RitualRegistry.registerRitual(waterRitual, ConfigHandler.ritualWater); - lavaRitual = new RitualLava(); - RitualRegistry.registerRitual(lavaRitual, ConfigHandler.ritualLava); - greenGroveRitual = new RitualGreenGrove(); - RitualRegistry.registerRitual(greenGroveRitual, ConfigHandler.ritualGreenGrove); - jumpRitual = new RitualJumping(); - RitualRegistry.registerRitual(jumpRitual, ConfigHandler.ritualJumping); - sufferingRitual = new RitualWellOfSuffering(); - RitualRegistry.registerRitual(sufferingRitual, ConfigHandler.ritualWellOfSuffering); - featheredKnifeRitual = new RitualFeatheredKnife(); - RitualRegistry.registerRitual(featheredKnifeRitual, ConfigHandler.ritualFeatheredKnife); - regenerationRitual = new RitualRegeneration(); - RitualRegistry.registerRitual(regenerationRitual, ConfigHandler.ritualRegeneration); - animalGrowthRitual = new RitualAnimalGrowth(); - RitualRegistry.registerRitual(animalGrowthRitual, ConfigHandler.ritualAnimalGrowth); - harvestRitual = new RitualHarvest(); - RitualRegistry.registerRitual(harvestRitual, ConfigHandler.ritualHarvest); - initHarvestHandlers(); - magneticRitual = new RitualMagnetic(); - RitualRegistry.registerRitual(magneticRitual, ConfigHandler.ritualMagnetic); - crushingRitual = new RitualCrushing(); - RitualRegistry.registerRitual(crushingRitual, ConfigHandler.ritualCrushing); - stomachRitual = new RitualFullStomach(); - RitualRegistry.registerRitual(stomachRitual, ConfigHandler.ritualFullStomach); - interdictionRitual = new RitualInterdiction(); - RitualRegistry.registerRitual(interdictionRitual, ConfigHandler.ritualInterdiction); - containmentRitual = new RitualContainment(); - RitualRegistry.registerRitual(containmentRitual, ConfigHandler.ritualContainment); - speedRitual = new RitualSpeed(); - RitualRegistry.registerRitual(speedRitual, ConfigHandler.ritualSpeed); - suppressionRitual = new RitualSuppression(); - RitualRegistry.registerRitual(suppressionRitual, ConfigHandler.ritualSuppression); - zephyrRitual = new RitualZephyr(); - RitualRegistry.registerRitual(zephyrRitual, ConfigHandler.ritualZephyr); - expulsionRitual = new RitualExpulsion(); - RitualRegistry.registerRitual(expulsionRitual, ConfigHandler.ritualExpulsion); - upgradeRemoveRitual = new RitualUpgradeRemove(); - RitualRegistry.registerRitual(upgradeRemoveRitual, ConfigHandler.ritualUpgradeRemove); - armourEvolveRitual = new RitualArmourEvolve(); - RitualRegistry.registerRitual(armourEvolveRitual, ConfigHandler.ritualArmourEvolve); - forsakenSoulRitual = new RitualForsakenSoul(); - RitualRegistry.registerRitual(forsakenSoulRitual, ConfigHandler.ritualForsakenSoul); - crystalHarvestRitual = new RitualCrystalHarvest(); - RitualRegistry.registerRitual(crystalHarvestRitual, ConfigHandler.ritualCrystalHarvest); - -// cobblestoneRitual = new RitualCobblestone(); -// RitualRegistry.registerRitual(cobblestoneRitual, ConfigHandler.cobblestoneRitual); - placerRitual = new RitualPlacer(); - RitualRegistry.registerRitual(placerRitual, ConfigHandler.placerRitual); - fellingRitual = new RitualFelling(); - RitualRegistry.registerRitual(fellingRitual, ConfigHandler.fellingRitual); - pumpRitual = new RitualPump(); - RitualRegistry.registerRitual(pumpRitual, ConfigHandler.pumpRitual); - altarBuilderRitual = new RitualAltarBuilder(); - RitualRegistry.registerRitual(altarBuilderRitual, ConfigHandler.altarBuilderRitual); - portalRitual = new RitualPortal(); - RitualRegistry.registerRitual(portalRitual, ConfigHandler.portalRitual); - meteorRitual = new RitualMeteor(); - RitualRegistry.registerRitual(meteorRitual, ConfigHandler.meteorRitual); - - downgradeRitual = new RitualLivingArmourDowngrade(); - RitualRegistry.registerRitual(downgradeRitual, ConfigHandler.downgradeRitual); - - RitualCrushing.registerCuttingFluid(ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC), 250, 0.5); - RitualCrushing.registerCuttingFluid(ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE), 25, 0.05); - } - - public static void initImperfectRituals() - { - imperfectNight = new ImperfectRitualNight(); - ImperfectRitualRegistry.registerRitual(imperfectNight, ConfigHandler.imperfectRitualNight); - imperfectRain = new ImperfectRitualRain(); - ImperfectRitualRegistry.registerRitual(imperfectRain, ConfigHandler.imperfectRitualRain); - imperfectResistance = new ImperfectRitualResistance(); - ImperfectRitualRegistry.registerRitual(imperfectResistance, ConfigHandler.imperfectRitualResistance); - imperfectZombie = new ImperfectRitualZombie(); - ImperfectRitualRegistry.registerRitual(imperfectZombie, ConfigHandler.imperfectRitualZombie); - } - - public static void initHarvestHandlers() - { - HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.DIAMOND_BLOCK), 15); - HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.GOLD_BLOCK), 10); - HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.IRON_BLOCK), 6); - - HarvestRegistry.registerHandler(new HarvestHandlerPlantable()); - HarvestRegistry.registerHandler(new HarvestHandlerTall()); - HarvestRegistry.registerHandler(new HarvestHandlerStem()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModTranquilityHandlers.java b/src/main/java/WayofTime/bloodmagic/registry/ModTranquilityHandlers.java deleted file mode 100644 index 0c7c8c4b..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/ModTranquilityHandlers.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.bloodmagic.registry; - -import WayofTime.bloodmagic.api.incense.IncenseTranquilityRegistry; -import WayofTime.bloodmagic.incense.*; - -public class ModTranquilityHandlers -{ - public static void init() - { - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Plant()); - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Crop()); - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Water()); - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Earth()); - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Fire()); - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Lava()); - IncenseTranquilityRegistry.registerTranquilityHandler(new TranquilityHandlers.Tree()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/registry/package-info.java b/src/main/java/WayofTime/bloodmagic/registry/package-info.java deleted file mode 100644 index 3a0366cc..00000000 --- a/src/main/java/WayofTime/bloodmagic/registry/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.registry; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java deleted file mode 100644 index 6a093244..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java +++ /dev/null @@ -1,324 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.AltarComponent; -import WayofTime.bloodmagic.api.altar.EnumAltarComponent; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.block.BlockBloodRune; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.util.Utils; -import net.minecraft.block.Block; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; - -import java.util.ArrayList; -import java.util.Iterator; - -public class RitualAltarBuilder extends Ritual -{ - private Iterator altarComponentsIterator = new ArrayList(EnumAltarTier.SIX.getAltarComponents()).iterator(); - private boolean cycleDone = false; - - private AltarComponent currentComponent; - private BlockPos currentPos; - - public RitualAltarBuilder() - { - super("ritualAltarBuilder", 0, 450, "ritual." + Constants.Mod.MODID + ".altarBuilderRitual"); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - TileEntity tileEntity = world.getTileEntity(masterRitualStone.getBlockPos().up()); - BlockPos altarPos = masterRitualStone.getBlockPos().up(2); - - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - if (cycleDone) - { - altarComponentsIterator = new ArrayList(EnumAltarTier.SIX.getAltarComponents()).iterator(); - } - - if (world.getBlockState(altarPos).getBlock().isReplaceable(world, altarPos) && hasItem(tileEntity, Item.getItemFromBlock(ModBlocks.ALTAR), 0, true)) - { - world.setBlockState(altarPos, ModBlocks.ALTAR.getDefaultState()); - lightning(world, altarPos); - network.syphon(getRefreshCost()); - } - - if (altarComponentsIterator.hasNext()) - { - currentComponent = altarComponentsIterator.next(); - currentPos = altarPos.add(currentComponent.getOffset()); - - if (world.getBlockState(currentPos).getBlock().isReplaceable(world, currentPos)) - { - switch (currentComponent.getComponent()) - { - case NOTAIR: - { - BlockStack blockStack = getMundaneBlock(tileEntity); - if (blockStack != null) - { - world.setBlockState(currentPos, blockStack.getState(), 3); - lightning(world, currentPos); - network.syphon(getRefreshCost()); - } - break; - } - case BLOODRUNE: - { - BlockStack blockStack = getBloodRune(tileEntity); - if (blockStack != null) - { - world.setBlockState(currentPos, blockStack.getState(), 3); - lightning(world, currentPos); - network.syphon(getRefreshCost()); - } - break; - } - default: - { - BlockStack blockStack = new BlockStack(Utils.getBlockForComponent(currentComponent.getComponent()), 0); - if (hasItem(tileEntity, Item.getItemFromBlock(blockStack.getBlock()), blockStack.getMeta(), true)) - { - world.setBlockState(currentPos, blockStack.getState(), 3); - lightning(world, currentPos); - network.syphon(getRefreshCost()); - } - break; - } - } - } - } else - { - cycleDone = true; - } - } - - @Override - public int getRefreshCost() - { - return 75; - } - - @Override - public int getRefreshTime() - { - return 12; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - for (int i = -12; i <= -8; i++) - { - addRune(components, i, -6, 13, EnumRuneType.AIR); - addRune(components, i, -6, -13, EnumRuneType.FIRE); - - addRune(components, 13, -6, i, EnumRuneType.EARTH); - addRune(components, -13, -6, i, EnumRuneType.WATER); - - addRune(components, i, 5, 13, EnumRuneType.AIR); - addRune(components, i, 5, -13, EnumRuneType.FIRE); - - addRune(components, 13, 5, i, EnumRuneType.EARTH); - addRune(components, -13, 5, i, EnumRuneType.WATER); - } - - for (int i = 8; i <= 12; i++) - { - addRune(components, i, -6, 13, EnumRuneType.AIR); - addRune(components, i, -6, -13, EnumRuneType.FIRE); - - addRune(components, 13, -6, i, EnumRuneType.EARTH); - addRune(components, -13, -6, i, EnumRuneType.WATER); - - addRune(components, i, 5, 13, EnumRuneType.AIR); - addRune(components, i, 5, -13, EnumRuneType.FIRE); - - addRune(components, 13, 5, i, EnumRuneType.EARTH); - addRune(components, -13, 5, i, EnumRuneType.WATER); - } - - for (int i = -6; i <= -4; i++) - { - addCornerRunes(components, 13, i, EnumRuneType.DUSK); - } - - for (int i = 3; i <= 5; i++) - { - addCornerRunes(components, 13, i, EnumRuneType.DUSK); - } - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualAltarBuilder(); - } - - public void lightning(World world, BlockPos blockPos) - { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY(), blockPos.getZ(), true)); - } - - /* - * - * These methods are utilities for this ritual. They support both the old - * forge inventory system, and the new one. - */ - public boolean hasItem(TileEntity tileEntity, Item item, int damage, boolean consumeItem) - { - if (tileEntity != null) - { - if (tileEntity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN)) - { - IItemHandler iItemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); - - if (iItemHandler.getSlots() <= 0) - { - return false; - } - - for (int i = 0; i < iItemHandler.getSlots(); i++) - { - if (iItemHandler.getStackInSlot(i) != null && iItemHandler.getStackInSlot(i).stackSize > 0 && iItemHandler.getStackInSlot(i).getItem() == item && iItemHandler.getStackInSlot(i).getItemDamage() == damage && iItemHandler.extractItem(i, 1, !consumeItem) != null) - { - return true; - } - } - } else if (tileEntity instanceof IInventory) - { - IInventory inv = (IInventory) tileEntity; - for (int i = 0; i < inv.getSizeInventory(); i++) - { - if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).stackSize > 0 && inv.getStackInSlot(i).getItem() == item && inv.getStackInSlot(i).getItemDamage() == damage) - { - if (consumeItem) - { - inv.decrStackSize(i, 1); - } - return true; - } - } - } - } - return false; - } - - public BlockStack getBloodRune(TileEntity tileEntity) - { - if (tileEntity != null) - { - if (tileEntity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN)) - { - IItemHandler iItemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); - - if (iItemHandler.getSlots() <= 0) - { - return null; - } - - for (int i = 0; i < iItemHandler.getSlots(); i++) - { - if (iItemHandler.getStackInSlot(i) != null && iItemHandler.getStackInSlot(i).stackSize > 0 && iItemHandler.getStackInSlot(i).getItem() instanceof ItemBlock && Block.getBlockFromItem(iItemHandler.getStackInSlot(i).getItem()) instanceof BlockBloodRune && iItemHandler.extractItem(i, 1, true) != null) - { - BlockStack blockStack = new BlockStack(Utils.getBlockForComponent(EnumAltarComponent.BLOODRUNE), iItemHandler.getStackInSlot(i).getItemDamage()); - iItemHandler.extractItem(i, 1, false); - return blockStack; - } - } - } else if (tileEntity instanceof IInventory) - { - IInventory inv = (IInventory) tileEntity; - for (int i = 0; i < inv.getSizeInventory(); i++) - { - if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).stackSize > 0 && inv.getStackInSlot(i).getItem() instanceof ItemBlock && Block.getBlockFromItem(inv.getStackInSlot(i).getItem()) instanceof BlockBloodRune) - { - BlockStack blockStack = new BlockStack(Utils.getBlockForComponent(EnumAltarComponent.BLOODRUNE), inv.getStackInSlot(i).getItemDamage()); - inv.decrStackSize(i, 1); - return blockStack; - } - } - } - } - return null; - } - - public BlockStack getMundaneBlock(TileEntity tileEntity) - { - if (tileEntity != null) - { - if (tileEntity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN)) - { - IItemHandler iItemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); - - if (iItemHandler.getSlots() <= 0) - { - return null; - } - - for (int i = 0; i < iItemHandler.getSlots(); i++) - { - if (iItemHandler.getStackInSlot(i) != null && iItemHandler.getStackInSlot(i).stackSize > 0 && iItemHandler.getStackInSlot(i).getItem() instanceof ItemBlock && !(Block.getBlockFromItem(iItemHandler.getStackInSlot(i).getItem()) instanceof BlockBloodRune) && iItemHandler.extractItem(i, 1, true) != null) - { - Block block = Block.getBlockFromItem(iItemHandler.getStackInSlot(i).getItem()); - if (block != null && block != Blocks.GLOWSTONE && block != ModBlocks.BLOOD_STONE && block != ModBlocks.CRYSTAL) - { - BlockStack blockStack = new BlockStack(block, iItemHandler.getStackInSlot(i).getItemDamage()); - iItemHandler.extractItem(i, 1, false); - return blockStack; - } - } - } - } else if (tileEntity instanceof IInventory) - { - IInventory inv = (IInventory) tileEntity; - for (int i = 0; i < inv.getSizeInventory(); i++) - { - if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).stackSize > 0 && inv.getStackInSlot(i).getItem() instanceof ItemBlock && !(Block.getBlockFromItem(inv.getStackInSlot(i).getItem()) instanceof BlockBloodRune)) - { - Block block = Block.getBlockFromItem(inv.getStackInSlot(i).getItem()); - if (block != null && block != Blocks.GLOWSTONE && block != ModBlocks.BLOOD_STONE && block != ModBlocks.CRYSTAL) - { - BlockStack blockStack = new BlockStack(block, inv.getStackInSlot(i).getItemDamage()); - inv.decrStackSize(i, 1); - return blockStack; - } - } - } - } - } - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualAnimalGrowth.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualAnimalGrowth.java deleted file mode 100644 index 6b2728fd..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualAnimalGrowth.java +++ /dev/null @@ -1,258 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.util.Utils; - -public class RitualAnimalGrowth extends Ritual -{ - public static final double rawWillDrain = 0.05; - public static final double vengefulWillDrain = 0.02; - public static final double steadfastWillDrain = 0.1; - public static final double destructiveWillDrain = 1; - - public static final String GROWTH_RANGE = "growing"; - public static final String CHEST_RANGE = "chest"; - - public int refreshTime = 20; - public static int defaultRefreshTime = 20; - - public RitualAnimalGrowth() - { - super("ritualAnimalGrowth", 0, 10000, "ritual." + Constants.Mod.MODID + ".animalGrowthRitual"); - addBlockRange(GROWTH_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, 1, -2), 5, 2, 5)); - addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(GROWTH_RANGE, 0, 7, 7); - setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxGrowths = currentEssence / getRefreshCost(); - int totalGrowths = 0; - BlockPos pos = masterRitualStone.getBlockPos(); - - AreaDescriptor chestRange = getBlockRange(CHEST_RANGE); - TileEntity chest = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); - IItemHandler itemHandler = null; - if (chest != null) - { - itemHandler = Utils.getInventory(chest, null); - } - - List willConfig = masterRitualStone.getActiveWillConfig(); - - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - refreshTime = getRefreshTimeForRawWill(rawWill); - - boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; - - double vengefulDrain = 0; - double steadfastDrain = 0; - double destructiveDrain = 0; - - boolean decreaseBreedTimer = vengefulWill >= vengefulWillDrain; - boolean breedAnimals = steadfastWill >= steadfastWillDrain && itemHandler != null; - boolean kamikaze = destructiveWill >= destructiveWillDrain; - - AreaDescriptor growingRange = getBlockRange(GROWTH_RANGE); - AxisAlignedBB axis = growingRange.getAABB(masterRitualStone.getBlockPos()); - List animalList = world.getEntitiesWithinAABB(EntityAnimal.class, axis); - - boolean performedEffect = false; - - for (EntityAnimal animal : animalList) - { - if (animal.getGrowingAge() < 0) - { - animal.addGrowth(5); - totalGrowths++; - performedEffect = true; - } else if (animal.getGrowingAge() > 0) - { - if (decreaseBreedTimer) - { - if (vengefulWill >= vengefulWillDrain) - { - animal.setGrowingAge(Math.max(0, animal.getGrowingAge() - getBreedingDecreaseForWill(vengefulWill))); - vengefulDrain += vengefulWillDrain; - vengefulWill -= vengefulWillDrain; - performedEffect = true; - } else - { - decreaseBreedTimer = false; - } - } - } else - { - if (kamikaze) - { - if (destructiveWill >= destructiveWillDrain) - { - if (!animal.isPotionActive(ModPotions.sacrificialLamb)) - { - animal.addPotionEffect(new PotionEffect(ModPotions.sacrificialLamb, 1200)); - destructiveDrain += destructiveWillDrain; - destructiveWill -= destructiveWillDrain; - performedEffect = true; - } - } else - { - kamikaze = false; - } - } - - if (breedAnimals) - { - if (steadfastWill >= steadfastWillDrain) - { - if (!animal.isInLove()) - { - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - ItemStack foodStack = itemHandler.getStackInSlot(slot); - if (foodStack != null && animal.isBreedingItem(foodStack) && itemHandler.extractItem(slot, 1, true) != null) - { - animal.setInLove(null); - itemHandler.extractItem(slot, 1, false); - steadfastDrain += steadfastWillDrain; - steadfastWill -= steadfastWillDrain; - performedEffect = true; - break; - } - } - } - } else - { - breedAnimals = false; - } - } - } - - if (totalGrowths >= maxGrowths) - { - break; - } - } - - if (performedEffect && consumeRawWill) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawWillDrain, true); - } - - if (vengefulDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrain, true); - } - - if (steadfastDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastDrain, true); - } - - if (destructiveDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DESTRUCTIVE, destructiveDrain, true); - } - - network.syphon(totalGrowths * getRefreshCost()); - } - - @Override - public int getRefreshCost() - { - return 2; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 2, 0, EnumRuneType.DUSK); - this.addParallelRunes(components, 1, 0, EnumRuneType.WATER); - components.add(new RitualComponent(new BlockPos(1, 0, 2), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(1, 0, -2), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-1, 0, 2), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-1, 0, -2), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(2, 0, 1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(2, 0, -1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(-2, 0, 1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(-2, 0, -1), EnumRuneType.AIR)); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualAnimalGrowth(); - } - - @Override - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") }; - } - - public int getBreedingDecreaseForWill(double vengefulWill) - { - return (int) (10 + vengefulWill / 5); - } - - public int getRefreshTimeForRawWill(double rawWill) - { - if (rawWill >= rawWillDrain) - { - return (int) Math.max(defaultRefreshTime - rawWill / 10, 1); - } - - return defaultRefreshTime; - } - - @Override - public int getRefreshTime() - { - return refreshTime; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualArmourEvolve.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualArmourEvolve.java deleted file mode 100644 index 2fb686f9..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualArmourEvolve.java +++ /dev/null @@ -1,103 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import com.google.common.collect.Iterables; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualArmourEvolve extends Ritual -{ - public static final String CHECK_RANGE = "fillRange"; - - public RitualArmourEvolve() - { - super("ritualArmourEvolve", 0, 50000, "ritual." + Constants.Mod.MODID + ".armourEvolveRitual"); - addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1)); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - - if (world.isRemote) - { - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - AreaDescriptor checkRange = getBlockRange(CHECK_RANGE); - - List playerList = world.getEntitiesWithinAABB(EntityPlayer.class, checkRange.getAABB(pos)); - - for (EntityPlayer player : playerList) - { - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = Iterables.toArray(player.getArmorInventoryList(), ItemStack.class)[2]; - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - if (armour.maxUpgradePoints < 300) - { - armour.maxUpgradePoints = 300; - ((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true); - - masterRitualStone.setActive(false); - - world.spawnEntityInWorld(new EntityLightningBolt(world, pos.getX(), pos.getY() - 1, pos.getZ(), true)); - } - } - } - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 0; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.DUSK); - this.addCornerRunes(components, 2, 0, EnumRuneType.FIRE); - this.addOffsetRunes(components, 1, 2, 0, EnumRuneType.FIRE); - this.addCornerRunes(components, 1, 1, EnumRuneType.DUSK); - this.addParallelRunes(components, 4, 0, EnumRuneType.EARTH); - this.addCornerRunes(components, 1, 3, EnumRuneType.DUSK); - this.addParallelRunes(components, 1, 4, EnumRuneType.EARTH); - - for (int i = 0; i < 4; i++) - { - this.addCornerRunes(components, 3, i, EnumRuneType.EARTH); - } - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualArmourEvolve(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java deleted file mode 100644 index 3f8a2d0e..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.item.ItemComponent; -import WayofTime.bloodmagic.tile.TileAlchemyArray; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; - -public class RitualCobblestone extends Ritual -{ - - public static final String COBBLESTONE_RANGE = "cobblestoneRange"; - - public RitualCobblestone() - { - super("ritualCobblestone", 0, 500, "ritual." + Constants.Mod.MODID + ".cobblestoneRitual"); - addBlockRange(COBBLESTONE_RANGE, new AreaDescriptor.Cross(new BlockPos(0, 1, 0), 1)); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - TileEntity tileEntity = world.getTileEntity(masterRitualStone.getBlockPos().up()); - Block block = Blocks.COBBLESTONE; - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - AreaDescriptor cobblestoneRange = getBlockRange(COBBLESTONE_RANGE); - - if (tileEntity != null && tileEntity instanceof TileAlchemyArray) - { - TileAlchemyArray alchemyArray = (TileAlchemyArray) tileEntity; - if (alchemyArray.getStackInSlot(0) != null && alchemyArray.getStackInSlot(0).getItem() instanceof ItemComponent) - { - switch (alchemyArray.getStackInSlot(0).getItemDamage()) - { - case 0: - block = Blocks.OBSIDIAN; - alchemyArray.decrStackSize(0, 1); - world.setBlockToAir(alchemyArray.getPos()); - break; - case 1: - block = Blocks.NETHERRACK; - alchemyArray.decrStackSize(0, 1); - world.setBlockToAir(alchemyArray.getPos()); - break; - /* - * case 4: block = Blocks.end_stone; - * alchemyArray.decrStackSize(0, 1); - * world.setBlockToAir(alchemyArray.getPos()); break; - */ - default: - break; - } - } - } - - for (BlockPos blockPos : cobblestoneRange.getContainedPositions(masterRitualStone.getBlockPos())) - { - if (world.isAirBlock(blockPos)) - { - world.setBlockState(blockPos, block.getDefaultState()); - totalEffects++; - } - - if (totalEffects >= maxEffects) - { - break; - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - @Override - public int getRefreshCost() - { - return 25; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 1, EnumRuneType.FIRE); - this.addParallelRunes(components, 1, 0, EnumRuneType.WATER); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualCobblestone(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualContainment.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualContainment.java deleted file mode 100644 index d96561e3..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualContainment.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; - -public class RitualContainment extends Ritual -{ - public static final String CONTAINMENT_RANGE = "containmentRange"; - - public RitualContainment() - { - super("ritualContainment", 0, 2000, "ritual." + Constants.Mod.MODID + ".containmentRitual"); - addBlockRange(CONTAINMENT_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-3, 0, -3), 7)); - setMaximumVolumeAndDistanceOfRange(CONTAINMENT_RANGE, 0, 10, 10); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - AreaDescriptor containmentRange = getBlockRange(CONTAINMENT_RANGE); - - for (EntityLivingBase entity : world.getEntitiesWithinAABB(EntityLivingBase.class, containmentRange.getAABB(masterRitualStone.getBlockPos()))) - { - if (entity instanceof EntityPlayer && (((EntityPlayer) entity).capabilities.isCreativeMode || PlayerHelper.getUUIDFromPlayer((EntityPlayer) entity).toString().equals(masterRitualStone.getOwner()))) - continue; - - double xDif = entity.posX - (masterRitualStone.getBlockPos().getX() + 0.5); - double yDif = entity.posY - (masterRitualStone.getBlockPos().getY() + 2.5); - double zDif = entity.posZ - (masterRitualStone.getBlockPos().getZ() + 0.5); - - entity.motionX = -0.05 * xDif; - entity.motionY = -0.05 * yDif; - entity.motionZ = -0.05 * zDif; - entity.fallDistance = 0; - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 1; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 1, 0, EnumRuneType.EARTH); - this.addCornerRunes(components, 2, 0, EnumRuneType.EARTH); - this.addParallelRunes(components, 1, 5, EnumRuneType.EARTH); - this.addCornerRunes(components, 2, 5, EnumRuneType.EARTH); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualContainment(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualCrushing.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualCrushing.java deleted file mode 100644 index c88dd481..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualCrushing.java +++ /dev/null @@ -1,334 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.compress.CompressionRegistry; -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; -import WayofTime.bloodmagic.api.registry.AlchemyTableRecipeRegistry; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.util.Utils; - -public class RitualCrushing extends Ritual -{ - public static final String CRUSHING_RANGE = "crushingRange"; - public static final String CHEST_RANGE = "chest"; - - public static double rawWillDrain = 0.05; - public static double steadfastWillDrain = 0.2; - public static double destructiveWillDrain = 0.2; - public static double vengefulWillDrain = 0.2; - - public static Map cuttingFluidLPMap = new HashMap(); - public static Map cuttingFluidWillMap = new HashMap(); - - public int refreshTime = 40; - public static int defaultRefreshTime = 40; - - public RitualCrushing() - { - super("ritualCrushing", 0, 5000, "ritual." + Constants.Mod.MODID + ".crushingRitual"); - addBlockRange(CRUSHING_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, -3, -1), 3)); - addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(CRUSHING_RANGE, 50, 10, 10); - setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); - } - - public static void registerCuttingFluid(ItemStack stack, int lpDrain, double willDrain) - { - cuttingFluidLPMap.put(stack, lpDrain); - cuttingFluidWillMap.put(stack, willDrain); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - AreaDescriptor chestRange = getBlockRange(CHEST_RANGE); - TileEntity tile = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); - - if (tile != null && Utils.getNumberOfFreeSlots(tile, EnumFacing.DOWN) < 1) - { - return; - } - - List willConfig = masterRitualStone.getActiveWillConfig(); - - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - refreshTime = getRefreshTimeForRawWill(rawWill); - - boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; - - boolean isSilkTouch = steadfastWill >= steadfastWillDrain; - boolean useCuttingFluid = corrosiveWill > 0; - - int fortune = destructiveWill > 0 ? 3 : 0; - - AreaDescriptor crushingRange = getBlockRange(CRUSHING_RANGE); - boolean hasOperated = false; - - double rawDrain = 0; - - for (BlockPos newPos : crushingRange.getContainedPositions(pos)) - { - if (world.isAirBlock(newPos)) - { - continue; - } - - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block.equals(ModBlocks.RITUAL_CONTROLLER) || block.equals(ModBlocks.RITUAL_STONE) || block.getBlockHardness(state, world, newPos) == -1.0F || Utils.isBlockLiquid(state)) - { - continue; - } - - boolean isBlockClaimed = false; - if (useCuttingFluid) - { - ItemStack checkStack = block.getItem(world, newPos, state); - if (checkStack == null) - { - continue; - } - - ItemStack copyStack = checkStack.copy(); - - for (Entry entry : cuttingFluidLPMap.entrySet()) - { - ItemStack cuttingStack = entry.getKey(); - int lpDrain = entry.getValue(); - double willDrain = cuttingFluidWillMap.containsKey(cuttingStack) ? cuttingFluidWillMap.get(cuttingStack) : 0; - - if (corrosiveWill < willDrain || currentEssence < lpDrain + getRefreshCost()) - { - continue; - } - - cuttingStack = cuttingStack.copy(); - List input = new ArrayList(); - input.add(cuttingStack); - input.add(copyStack); - - AlchemyTableRecipe recipe = AlchemyTableRecipeRegistry.getMatchingRecipe(input, world, pos); - if (recipe == null) - { - continue; - } - - ItemStack result = recipe.getRecipeOutput(input); - if (result == null) - { - continue; - } - - if (tile != null) - { - result = Utils.insertStackIntoTile(result, tile, EnumFacing.DOWN); - if (result != null && result.stackSize > 0) - { - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, result); - } - } else - { - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, result); - } - - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, willDrain, true); - corrosiveWill -= willDrain; - - network.syphon(lpDrain); - currentEssence -= lpDrain; - - isBlockClaimed = true; - } - } - - if (!isBlockClaimed && isSilkTouch && block.canSilkHarvest(world, newPos, state, null)) - { - ItemStack checkStack = block.getItem(world, newPos, state); - if (checkStack == null) - { - continue; - } - - ItemStack copyStack = checkStack.copy(); - - if (steadfastWill >= steadfastWillDrain) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastWillDrain, true); - steadfastWill -= steadfastWillDrain; - } else - { - continue; - } - - if (tile != null) - copyStack = Utils.insertStackIntoTile(copyStack, tile, EnumFacing.DOWN); - else - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, copyStack); - - if (copyStack != null && copyStack.stackSize > 0) - { - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, copyStack); - } - } else if (!isBlockClaimed) - { - if (fortune > 0 && destructiveWill < destructiveWillDrain) - { - fortune = 0; - } - - List stackList = block.getDrops(world, newPos, state, fortune); - - if (stackList != null && !stackList.isEmpty()) - { - for (ItemStack item : stackList) - { - ItemStack copyStack = ItemStack.copyItemStack(item); - - if (tile != null) - { - copyStack = Utils.insertStackIntoTile(copyStack, tile, EnumFacing.DOWN); - } else - { - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, copyStack); - continue; - } - if (copyStack != null && copyStack.stackSize > 0) - { - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, copyStack); - } - } - - if (fortune > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DESTRUCTIVE, destructiveWillDrain, true); - destructiveWill -= destructiveWillDrain; - } - } - } - - world.destroyBlock(newPos, false); - network.syphon(getRefreshCost()); - hasOperated = true; - - if (consumeRawWill) - { - rawDrain += rawWillDrain; - rawWill -= rawWillDrain; - } - - break; - } - - if (hasOperated && tile != null && vengefulWill >= vengefulWillDrain) - { - Pair pair = CompressionRegistry.compressInventory(tile, world); - if (pair.getRight()) - { - ItemStack returned = pair.getLeft(); - if (returned != null) - { - Utils.spawnStackAtBlock(world, pos, EnumFacing.UP, returned); - } - - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulWillDrain, true); - } - } - - if (rawDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrain, true); - } - } - - public int getRefreshTimeForRawWill(double rawWill) - { - if (rawWill >= rawWillDrain) - { - return Math.max(1, (int) (40 - rawWill / 5)); - } - - return defaultRefreshTime; - } - - @Override - public int getRefreshTime() - { - return refreshTime; - } - - @Override - public int getRefreshCost() - { - return 7; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 1, 0, EnumRuneType.EARTH); - this.addParallelRunes(components, 2, 0, EnumRuneType.FIRE); - this.addCornerRunes(components, 2, 0, EnumRuneType.DUSK); - this.addParallelRunes(components, 2, 1, EnumRuneType.AIR); - - return components; - } - - @Override - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") }; - } - - @Override - public Ritual getNewCopy() - { - return new RitualCrushing(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualCrystalHarvest.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualCrystalHarvest.java deleted file mode 100644 index c2ee0625..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualCrystalHarvest.java +++ /dev/null @@ -1,109 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.tile.TileDemonCrystal; - -public class RitualCrystalHarvest extends Ritual -{ - public static final String CRYSTAL_RANGE = "crystal"; - - public RitualCrystalHarvest() - { - super("ritualCrystalHarvest", 0, 40000, "ritual." + Constants.Mod.MODID + ".crystalHarvestRitual"); - addBlockRange(CRYSTAL_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-3, 2, -3), 7, 5, 7)); - - setMaximumVolumeAndDistanceOfRange(CRYSTAL_RANGE, 250, 5, 7); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - BlockPos pos = masterRitualStone.getBlockPos(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxEffects = 1; - int totalEffects = 0; - - AreaDescriptor crystalRange = getBlockRange(CRYSTAL_RANGE); - - crystalRange.resetIterator(); - while (crystalRange.hasNext()) - { - BlockPos nextPos = crystalRange.next().add(pos); - TileEntity tile = world.getTileEntity(nextPos); - if (tile instanceof TileDemonCrystal) - { - TileDemonCrystal demonCrystal = (TileDemonCrystal) tile; - if (demonCrystal.dropSingleCrystal()) - { - IBlockState state = world.getBlockState(nextPos); - world.notifyBlockUpdate(nextPos, state, state, 3); - totalEffects++; - if (totalEffects >= maxEffects) - { - break; - } - } - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - @Override - public int getRefreshTime() - { - return 25; - } - - @Override - public int getRefreshCost() - { - return 50; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.AIR); - this.addParallelRunes(components, 1, 1, EnumRuneType.DUSK); - this.addParallelRunes(components, 1, -1, EnumRuneType.FIRE); - this.addParallelRunes(components, 2, -1, EnumRuneType.FIRE); - this.addParallelRunes(components, 3, -1, EnumRuneType.FIRE); - this.addOffsetRunes(components, 3, 1, -1, EnumRuneType.FIRE); - this.addCornerRunes(components, 3, -1, EnumRuneType.EARTH); - this.addCornerRunes(components, 3, 0, EnumRuneType.EARTH); - this.addOffsetRunes(components, 3, 2, 0, EnumRuneType.DUSK); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualCrystalHarvest(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java deleted file mode 100644 index 694cc40a..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java +++ /dev/null @@ -1,285 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.util.Utils; - -import com.google.common.base.Strings; - -public class RitualExpulsion extends Ritual -{ - public static final String EXPULSION_RANGE = "expulsionRange"; - - public RitualExpulsion() - { - super("ritualExpulsion", 0, 10000, "ritual." + Constants.Mod.MODID + ".expulsionRitual"); - addBlockRange(EXPULSION_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-12, 0, -12), 25)); - setMaximumVolumeAndDistanceOfRange(EXPULSION_RANGE, 0, 12, 12); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - if (masterRitualStone.getWorldObj().isRemote) - return; - - AreaDescriptor expulsionRange = getBlockRange(EXPULSION_RANGE); - - List allowedNames = new ArrayList(); - BlockPos masterPos = masterRitualStone.getBlockPos(); - TileEntity tile = world.getTileEntity(masterPos.up()); - - if (tile != null) - { - IItemHandler handler = Utils.getInventory(tile, null); - if (handler != null) - { - for (int i = 0; i < handler.getSlots(); i++) - { - ItemStack itemStack = handler.getStackInSlot(i); - if (itemStack != null && itemStack.getItem() instanceof IBindable) - { - IBindable bindable = (IBindable) itemStack.getItem(); - if (!Strings.isNullOrEmpty(bindable.getOwnerName(itemStack)) && !allowedNames.contains(bindable.getOwnerName(itemStack))) - allowedNames.add(bindable.getOwnerName(itemStack)); - } - } - } - } - - final int teleportDistance = 100; - - for (EntityPlayer player : world.getEntitiesWithinAABB(EntityPlayer.class, expulsionRange.getAABB(masterRitualStone.getBlockPos()))) - { - if (player.capabilities.isCreativeMode || PlayerHelper.getUUIDFromPlayer(player).toString().equals(masterRitualStone.getOwner()) || allowedNames.contains(PlayerHelper.getUUIDFromPlayer(player).toString())) - continue; - - if (teleportRandomly(player, teleportDistance)) - network.syphon(getRefreshCost() * 1000); - } - - allowedNames.clear(); - } - - public boolean teleportRandomly(EntityLivingBase entityLiving, double distance) - { - if (entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entityLiving; - if (player.capabilities.isCreativeMode) - return false; - } - - double x = entityLiving.posX; - double y = entityLiving.posY; - double z = entityLiving.posZ; - Random rand = new Random(); - double randX = x + (rand.nextDouble() - 0.5D) * distance; - double randY = y + (rand.nextInt((int) distance) - (distance) / 2); - double randZ = z + (rand.nextDouble() - 0.5D) * distance; - int i = 0; - - while (!teleportTo(entityLiving, randX, randY, randZ, x, y, z) && i < 100) - { - randX = x + (rand.nextDouble() - 0.5D) * distance; - randY = y + (rand.nextInt((int) distance) - (distance) / 2); - randZ = z + (rand.nextDouble() - 0.5D) * distance; - i++; - } - - return i >= 100; - } - - public boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ) - { - EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0); - - if (MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - moveEntityViaTeleport(entityLiving, event.getTargetX(), event.getTargetY(), event.getTargetZ()); - boolean flag = false; - int i = MathHelper.floor_double(entityLiving.posX); - int j = MathHelper.floor_double(entityLiving.posY); - int k = MathHelper.floor_double(entityLiving.posZ); - int l; - - if (!entityLiving.worldObj.isAirBlock(new BlockPos(i, j, k))) - { - boolean flag1 = false; - - while (!flag1 && j > 0) - { - IBlockState state = entityLiving.worldObj.getBlockState(new BlockPos(i, j - 1, k)); - - if (state != null && state.getMaterial().blocksMovement()) - { - flag1 = true; - } else - { - --entityLiving.posY; - --j; - } - } - - if (flag1) - { - moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - - if (!entityLiving.isCollided && !entityLiving.worldObj.containsAnyLiquid(entityLiving.getEntityBoundingBox())) - { - flag = true; - } - } - } - - if (!flag) - { - moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); - return false; - } else - { - for (l = 0; l < 128; ++l) - { - double lengthVal = (double) l / ((double) 128 - 1.0D); - float randF1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - float randF2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - float randF3 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double lengthValX = lastX + (entityLiving.posX - lastX) * lengthVal + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double lengthValY = lastY + (entityLiving.posY - lastY) * lengthVal + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double lengthValZ = lastZ + (entityLiving.posZ - lastZ) * lengthVal + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, lengthValX, lengthValY, lengthValZ, (double) randF1, (double) randF2, (double) randF3); - } - - return true; - } - } - - public void moveEntityViaTeleport(EntityLivingBase entityLiving, double x, double y, double z) - { - if (entityLiving != null && entityLiving instanceof EntityPlayer) - { - if (entityLiving instanceof EntityPlayerMP) - { - EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving; - - if (entityplayermp.worldObj == entityLiving.worldObj) - { - EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, x, y, z, 5.0F); - - if (!MinecraftForge.EVENT_BUS.post(event)) - { - if (entityLiving.isRiding()) - { - entityplayermp.mountEntityAndWakeUp(); - } - entityLiving.setPositionAndUpdate(event.getTargetX(), event.getTargetY(), event.getTargetZ()); - } - } - } - } else if (entityLiving != null) - { - entityLiving.setPosition(x, y, z); - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 2; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 2, 0, EnumRuneType.EARTH); - this.addRune(components, 2, 0, 1, EnumRuneType.EARTH); - this.addRune(components, 1, 0, 2, EnumRuneType.EARTH); - this.addRune(components, 2, 0, -1, EnumRuneType.EARTH); - this.addRune(components, -1, 0, 2, EnumRuneType.EARTH); - this.addRune(components, -2, 0, 1, EnumRuneType.EARTH); - this.addRune(components, 1, 0, -2, EnumRuneType.EARTH); - this.addRune(components, -2, 0, -1, EnumRuneType.EARTH); - this.addRune(components, -1, 0, -2, EnumRuneType.EARTH); - this.addRune(components, 4, 0, 2, EnumRuneType.AIR); - this.addRune(components, 5, 0, 2, EnumRuneType.AIR); - this.addRune(components, 4, 0, -2, EnumRuneType.AIR); - this.addRune(components, 5, 0, -2, EnumRuneType.AIR); - this.addRune(components, -4, 0, 2, EnumRuneType.AIR); - this.addRune(components, -5, 0, 2, EnumRuneType.AIR); - this.addRune(components, -4, 0, -2, EnumRuneType.AIR); - this.addRune(components, -5, 0, -2, EnumRuneType.AIR); - this.addRune(components, 2, 0, 4, EnumRuneType.AIR); - this.addRune(components, 2, 0, 5, EnumRuneType.AIR); - this.addRune(components, -2, 0, 4, EnumRuneType.AIR); - this.addRune(components, -2, 0, 5, EnumRuneType.AIR); - this.addRune(components, 2, 0, -4, EnumRuneType.AIR); - this.addRune(components, 2, 0, -5, EnumRuneType.AIR); - this.addRune(components, -2, 0, -4, EnumRuneType.AIR); - this.addRune(components, -2, 0, -5, EnumRuneType.AIR); - this.addParallelRunes(components, 5, 0, EnumRuneType.DUSK); - this.addParallelRunes(components, 6, 0, EnumRuneType.EARTH); - this.addRune(components, -6, 0, 1, EnumRuneType.DUSK); - this.addRune(components, -6, 0, -1, EnumRuneType.DUSK); - this.addRune(components, 6, 0, 1, EnumRuneType.DUSK); - this.addRune(components, 6, 0, -1, EnumRuneType.DUSK); - this.addRune(components, 1, 0, 6, EnumRuneType.DUSK); - this.addRune(components, -1, 0, 6, EnumRuneType.DUSK); - this.addRune(components, 1, 0, -6, EnumRuneType.DUSK); - this.addRune(components, -1, 0, -6, EnumRuneType.DUSK); - this.addCornerRunes(components, 4, 0, EnumRuneType.FIRE); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualExpulsion(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualFeatheredKnife.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualFeatheredKnife.java deleted file mode 100644 index 20097edd..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualFeatheredKnife.java +++ /dev/null @@ -1,259 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.IBloodAltar; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSelfSacrifice; -import WayofTime.bloodmagic.registry.ModPotions; - -public class RitualFeatheredKnife extends Ritual -{ - public static final String ALTAR_RANGE = "altar"; - public static final String DAMAGE_RANGE = "damage"; - - public static double rawWillDrain = 0.05; - public static double destructiveWillDrain = 0.05; - public static double corrosiveWillThreshold = 10; - public static double steadfastWillThreshold = 10; - public static double vengefulWillThreshold = 10; - - public int refreshTime = 20; - public static int defaultRefreshTime = 20; - - public BlockPos altarOffsetPos = new BlockPos(0, 0, 0); //TODO: Save! - - public RitualFeatheredKnife() - { - super("ritualFeatheredKnife", 0, 25000, "ritual." + Constants.Mod.MODID + ".featheredKnifeRitual"); - addBlockRange(ALTAR_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-5, -10, -5), 11, 21, 11)); - addBlockRange(DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-15, -20, -15), 31, 41, 31)); - - setMaximumVolumeAndDistanceOfRange(ALTAR_RANGE, 0, 10, 15); - setMaximumVolumeAndDistanceOfRange(DAMAGE_RANGE, 0, 25, 15); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - List willConfig = masterRitualStone.getActiveWillConfig(); - - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - refreshTime = getRefreshTimeForRawWill(rawWill); - - boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - BlockPos altarPos = pos.add(altarOffsetPos); - - TileEntity tile = world.getTileEntity(altarPos); - - AreaDescriptor altarRange = getBlockRange(ALTAR_RANGE); - - if (!altarRange.isWithinArea(altarOffsetPos) || !(tile instanceof IBloodAltar)) - { - for (BlockPos newPos : altarRange.getContainedPositions(pos)) - { - TileEntity nextTile = world.getTileEntity(newPos); - if (nextTile instanceof IBloodAltar) - { - tile = nextTile; - altarOffsetPos = newPos.subtract(pos); - - altarRange.resetCache(); - break; - } - } - } - - boolean useIncense = corrosiveWill >= corrosiveWillThreshold; - - if (tile instanceof IBloodAltar) - { - IBloodAltar tileAltar = (IBloodAltar) tile; - - AreaDescriptor damageRange = getBlockRange(DAMAGE_RANGE); - AxisAlignedBB range = damageRange.getAABB(pos); - - double destructiveDrain = 0; - - List entities = world.getEntitiesWithinAABB(EntityPlayer.class, range); - - for (EntityPlayer player : entities) - { - float healthThreshold = steadfastWill >= steadfastWillThreshold ? 0.7f : 0.3f; - - if (vengefulWill >= vengefulWillThreshold && !player.getUniqueID().toString().equals(masterRitualStone.getOwner())) - { - healthThreshold = 0.1f; - } - - float health = player.getHealth(); - float maxHealth = player.getMaxHealth(); - - float sacrificedHealth = 1; - double lpModifier = 1; - - if ((health / player.getMaxHealth() > healthThreshold) && ((useIncense && !player.isPotionActive(ModPotions.soulFray)) || !useIncense)) - { - if (useIncense) - { - double incenseAmount = PlayerSacrificeHelper.getPlayerIncense(player); - - sacrificedHealth = health - maxHealth * healthThreshold; - lpModifier *= PlayerSacrificeHelper.getModifier(incenseAmount); - - PlayerSacrificeHelper.setPlayerIncense(player, 0); - player.addPotionEffect(new PotionEffect(ModPotions.soulFray, PlayerSacrificeHelper.soulFrayDuration)); - } - - if (destructiveWill >= destructiveWillDrain * sacrificedHealth) - { - lpModifier *= getLPModifierForWill(destructiveWill); - destructiveWill -= destructiveWillDrain * sacrificedHealth; - destructiveDrain += destructiveWillDrain * sacrificedHealth; - } - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.selfSacrifice", chestStack); - - if (upgrade instanceof LivingArmourUpgradeSelfSacrifice) - { - double modifier = ((LivingArmourUpgradeSelfSacrifice) upgrade).getSacrificeModifier(); - - lpModifier *= (1 + modifier); - } - } - } - - player.setHealth(health - sacrificedHealth); - - tileAltar.sacrificialDaggerCall((int) (ConfigHandler.sacrificialDaggerConversion * lpModifier * sacrificedHealth), false); - - totalEffects++; - - if (totalEffects >= maxEffects) - { - break; - } - - } - } - - if (destructiveDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, destructiveDrain, true); - } - } - - network.syphon(getRefreshCost() * totalEffects); - if (totalEffects > 0 && consumeRawWill) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawWillDrain, true); - } - } - - @Override - public int getRefreshTime() - { - return refreshTime; - } - - @Override - public int getRefreshCost() - { - return 20; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 1, 0, EnumRuneType.DUSK); - this.addParallelRunes(components, 2, -1, EnumRuneType.WATER); - this.addCornerRunes(components, 1, -1, EnumRuneType.AIR); - this.addOffsetRunes(components, 2, 4, -1, EnumRuneType.FIRE); - this.addOffsetRunes(components, 2, 4, 0, EnumRuneType.EARTH); - this.addOffsetRunes(components, 4, 3, 0, EnumRuneType.EARTH); - this.addCornerRunes(components, 3, 0, EnumRuneType.AIR); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualFeatheredKnife(); - } - - @Override - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") }; - } - - public double getLPModifierForWill(double destructiveWill) - { - return 1 + destructiveWill * 0.2 / 100; - } - - public int getRefreshTimeForRawWill(double rawWill) - { - if (rawWill >= rawWillDrain) - { - return 10; - } - - return defaultRefreshTime; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualFelling.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualFelling.java deleted file mode 100644 index e235c7ba..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualFelling.java +++ /dev/null @@ -1,133 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.util.Utils; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.Iterator; - -public class RitualFelling extends Ritual -{ - public static final String FELLING_RANGE = "fellingRange"; - public static final String CHEST_RANGE = "chest"; - - private ArrayList treePartsCache; - private Iterator blockPosIterator; - - private boolean cached = false; - private BlockPos currentPos; - - public RitualFelling() - { - super("ritualFelling", 0, 20000, "ritual." + Constants.Mod.MODID + ".fellingRitual"); - addBlockRange(FELLING_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-10, -3, -10), new BlockPos(11, 27, 11))); - addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(FELLING_RANGE, 14000, 15, 30); - setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); - - treePartsCache = new ArrayList(); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - BlockPos masterPos = masterRitualStone.getBlockPos(); - AreaDescriptor chestRange = getBlockRange(CHEST_RANGE); - TileEntity tileInventory = world.getTileEntity(chestRange.getContainedPositions(masterPos).get(0)); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - if (!cached || treePartsCache.isEmpty()) - { - for (BlockPos blockPos : getBlockRange(FELLING_RANGE).getContainedPositions(masterRitualStone.getBlockPos())) - { - if (!treePartsCache.contains(blockPos)) - if (!world.isAirBlock(blockPos) && (world.getBlockState(blockPos).getBlock().isWood(world, blockPos) || world.getBlockState(blockPos).getBlock().isLeaves(world.getBlockState(blockPos), world, blockPos))) - { - treePartsCache.add(blockPos); - } - } - - cached = true; - blockPosIterator = treePartsCache.iterator(); - } - - if (blockPosIterator.hasNext() && tileInventory != null && tileInventory instanceof IInventory) - { - network.syphon(getRefreshCost()); - currentPos = blockPosIterator.next(); - placeInInventory(world.getBlockState(currentPos), world, currentPos, chestRange.getContainedPositions(masterPos).get(0)); - world.setBlockToAir(currentPos); - blockPosIterator.remove(); - } - } - - @Override - public int getRefreshCost() - { - return 10; - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - addCornerRunes(components, 1, 0, EnumRuneType.EARTH); - addCornerRunes(components, 1, 1, EnumRuneType.EARTH); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualFelling(); - } - - private void placeInInventory(IBlockState blockState, World world, BlockPos blockPos, BlockPos tileEntityPos) - { - TileEntity tile = world.getTileEntity(tileEntityPos); - if (tile != null && blockState.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), 0) != null) - { - if (tile instanceof IInventory) - { - for (ItemStack stack : blockState.getBlock().getDrops(world, blockPos, world.getBlockState(blockPos), 0)) - { - ItemStack copyStack = stack.copy(); - Utils.insertStackIntoInventory(copyStack, (IInventory) tile, EnumFacing.DOWN); - if (copyStack.stackSize > 0) - { - world.spawnEntityInWorld(new EntityItem(world, blockPos.getX() + 0.4, blockPos.getY() + 2, blockPos.getZ() + 0.4, copyStack)); - } - } - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualForsakenSoul.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualForsakenSoul.java deleted file mode 100644 index 0659e5d4..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualForsakenSoul.java +++ /dev/null @@ -1,233 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.tile.TileDemonCrystal; - -public class RitualForsakenSoul extends Ritual -{ - public static final String CRYSTAL_RANGE = "crystal"; - public static final String DAMAGE_RANGE = "damage"; - public static final int MAX_UNIQUENESS = 10; - - public static final int HEALTH_THRESHOLD = 20; - - public double willBuffer = 0; - public double crystalBuffer = 0; - - public List keyList = new ArrayList(); - - public RitualForsakenSoul() - { - super("ritualForsakenSoul", 0, 40000, "ritual." + Constants.Mod.MODID + ".forsakenSoulRitual"); - addBlockRange(CRYSTAL_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-3, 2, -3), 7, 5, 7)); - addBlockRange(DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-10, -10, -10), 21)); - - setMaximumVolumeAndDistanceOfRange(CRYSTAL_RANGE, 250, 5, 7); - setMaximumVolumeAndDistanceOfRange(DAMAGE_RANGE, 0, 10, 10); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - willBuffer = tag.getDouble("willBuffer"); - crystalBuffer = tag.getDouble("crystalBuffer"); - - keyList.clear(); - for (int i = 0; i < MAX_UNIQUENESS; i++) - { - String key = "uniq" + i; - if (tag.hasKey(key)) - { - keyList.add(tag.getInteger(key)); - } - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - tag.setDouble("willBuffer", willBuffer); - tag.setDouble("crystalBuffer", crystalBuffer); - - for (int i = 0; i < Math.min(MAX_UNIQUENESS, keyList.size()); i++) - { - String key = "uniq" + i; - tag.setInteger(key, keyList.get(i)); - } - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - BlockPos pos = masterRitualStone.getBlockPos(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxEffects = 100; - int totalEffects = 0; - - List crystalList = new ArrayList(); - - AreaDescriptor crystalRange = getBlockRange(CRYSTAL_RANGE); - - crystalRange.resetIterator(); - while (crystalRange.hasNext()) - { - BlockPos nextPos = crystalRange.next().add(pos); - TileEntity tile = world.getTileEntity(nextPos); - if (tile instanceof TileDemonCrystal) - { - crystalList.add((TileDemonCrystal) tile); - } - } - - AreaDescriptor damageRange = getBlockRange(DAMAGE_RANGE); - AxisAlignedBB range = damageRange.getAABB(pos); - - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, range); - - for (EntityLivingBase entity : entities) - { - if (!ConfigHandler.wellOfSufferingBlacklist.contains(entity.getClass().getSimpleName())) - { - if (entity.isEntityAlive() && !(entity instanceof EntityPlayer)) - { - if (entity.attackEntityFrom(DamageSource.outOfWorld, 1)) - { - if (!entity.isEntityAlive()) - { - int uniqueness = calculateUniqueness(entity); - double modifier = 1; - if (entity instanceof EntityAnimal && !entity.isCollided) - { - modifier = 4; - } - - willBuffer += modifier * getWillForUniqueness(uniqueness) / HEALTH_THRESHOLD * entity.getMaxHealth(); - crystalBuffer += modifier * entity.getMaxHealth() / HEALTH_THRESHOLD; - - totalEffects++; - if (totalEffects >= maxEffects) - { - break; - } - } - } - } - } - } - - if (crystalList.size() > 0 && crystalBuffer > 0) - { - double growth = Math.min(crystalBuffer, 1); - double willSyphonAmount = growth * willBuffer / crystalBuffer; - TileDemonCrystal chosenCrystal = crystalList.get(world.rand.nextInt(crystalList.size())); - double percentageGrowth = chosenCrystal.growCrystalWithWillAmount(growth * willBuffer / crystalBuffer, growth); - if (percentageGrowth > 0) - { - crystalBuffer -= percentageGrowth; - willBuffer -= percentageGrowth * willSyphonAmount; - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - /** - * - * @param mob - * @return The amount of uniqueness to the last 10 mobs killed - */ - public int calculateUniqueness(EntityLivingBase mob) - { - int key = mob.getClass().hashCode(); - keyList.add(key); - if (keyList.size() > MAX_UNIQUENESS) - { - keyList.remove(0); - } - - List uniquenessList = new ArrayList(); - for (int value : keyList) - { - if (!uniquenessList.contains(value)) - { - uniquenessList.add(value); - } - } - - return Math.min(uniquenessList.size(), MAX_UNIQUENESS); - } - - public double getWillForUniqueness(int uniqueness) - { - return Math.max(50 - 15 * Math.sqrt(uniqueness), 0); - } - - @Override - public int getRefreshTime() - { - return 25; - } - - @Override - public int getRefreshCost() - { - return 2; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.AIR); - this.addParallelRunes(components, 1, -1, EnumRuneType.DUSK); - this.addParallelRunes(components, 1, 1, EnumRuneType.FIRE); - this.addParallelRunes(components, 2, 1, EnumRuneType.FIRE); - this.addParallelRunes(components, 3, 1, EnumRuneType.FIRE); - this.addOffsetRunes(components, 3, 1, 1, EnumRuneType.FIRE); - this.addCornerRunes(components, 3, 1, EnumRuneType.EARTH); - this.addCornerRunes(components, 3, 0, EnumRuneType.EARTH); - this.addOffsetRunes(components, 3, 2, 0, EnumRuneType.EARTH); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualForsakenSoul(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualFullStomach.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualFullStomach.java deleted file mode 100644 index 19c80230..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualFullStomach.java +++ /dev/null @@ -1,134 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.FoodStats; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualFullStomach extends Ritual -{ - public static final String FILL_RANGE = "fillRange"; - public static final String CHEST_RANGE = "chest"; - - public RitualFullStomach() - { - super("ritualFullStomach", 0, 100000, "ritual." + Constants.Mod.MODID + ".fullStomachRitual"); - addBlockRange(FILL_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-25, -25, -25), 51)); - addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(FILL_RANGE, 0, 25, 25); - setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - BlockPos pos = masterRitualStone.getBlockPos(); - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - AreaDescriptor chestRange = getBlockRange(CHEST_RANGE); - TileEntity tile = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); - if (!(tile instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tile; - - int lastSlot = 0; - - AreaDescriptor fillingRange = getBlockRange(FILL_RANGE); - - List playerList = world.getEntitiesWithinAABB(EntityPlayer.class, fillingRange.getAABB(pos)); - - for (EntityPlayer player : playerList) - { - FoodStats foodStats = player.getFoodStats(); - float satLevel = foodStats.getSaturationLevel(); - - for (int i = lastSlot; i < inventory.getSizeInventory(); i++) - { - ItemStack stack = inventory.getStackInSlot(i); - if (stack != null && stack.getItem() instanceof ItemFood) - { - ItemFood foodItem = (ItemFood) stack.getItem(); - - int healAmount = foodItem.getHealAmount(stack); - float saturationAmount = foodItem.getSaturationModifier(stack) * healAmount * 2.0f; - - if (saturationAmount + satLevel <= 20) - { - NBTTagCompound nbt = new NBTTagCompound(); - foodStats.writeNBT(nbt); - nbt.setFloat("foodSaturationLevel", saturationAmount + satLevel); - foodStats.readNBT(nbt); - - inventory.decrStackSize(i, 1); - totalEffects++; - lastSlot = i; - break; - } - } - } - - if (totalEffects >= maxEffects) - { - network.causeNausea(); - - break; - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - @Override - public int getRefreshTime() - { - return 20; - } - - @Override - public int getRefreshCost() - { - return 100; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 3, 0, EnumRuneType.FIRE); - this.addCornerRunes(components, 1, 0, EnumRuneType.AIR); - this.addOffsetRunes(components, 1, 2, 0, EnumRuneType.AIR); - this.addCornerRunes(components, 4, 0, EnumRuneType.WATER); - this.addOffsetRunes(components, 4, 3, 0, EnumRuneType.EARTH); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualFullStomach(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualGreenGrove.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualGreenGrove.java deleted file mode 100644 index 658357ec..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualGreenGrove.java +++ /dev/null @@ -1,339 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockFarmland; -import net.minecraft.block.IGrowable; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.util.Utils; - -public class RitualGreenGrove extends Ritual -{ - public static final String GROW_RANGE = "growing"; - public static final String LEECH_RANGE = "leech"; - public static final String HYDRATE_RANGE = "hydrate"; - - public static double corrosiveWillDrain = 0.2; - public static double rawWillDrain = 0.05; - public static double vengefulWillDrain = 0.05; - public static double steadfastWillDrain = 0.05; - - public int refreshTime = 20; - public static int defaultRefreshTime = 20; - - public static double defaultGrowthChance = 0.3; - - public static IBlockState farmlandState = Blocks.FARMLAND.getDefaultState().withProperty(BlockFarmland.MOISTURE, 7); - - public RitualGreenGrove() - { - super("ritualGreenGrove", 0, 5000, "ritual." + Constants.Mod.MODID + ".greenGroveRitual"); - addBlockRange(GROW_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, 2, -1), 3, 1, 3)); - addBlockRange(LEECH_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); - addBlockRange(HYDRATE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); - setMaximumVolumeAndDistanceOfRange(GROW_RANGE, 81, 4, 4); - setMaximumVolumeAndDistanceOfRange(LEECH_RANGE, 0, 15, 15); - setMaximumVolumeAndDistanceOfRange(HYDRATE_RANGE, 0, 15, 15); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - BlockPos pos = masterRitualStone.getBlockPos(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxGrowths = currentEssence / getRefreshCost(); - int totalGrowths = 0; - - List willConfig = masterRitualStone.getActiveWillConfig(); - - DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, pos); - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - refreshTime = getRefreshTimeForRawWill(rawWill); - double growthChance = getPlantGrowthChanceForWill(vengefulWill); - - boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; - boolean consumeVengefulWill = vengefulWill >= vengefulWillDrain && growthChance != defaultGrowthChance; - - double rawDrain = 0; - double vengefulDrain = 0; - - AreaDescriptor growingRange = getBlockRange(GROW_RANGE); - - int maxGrowthVolume = getMaxVolumeForRange(GROW_RANGE, willConfig, holder); - if (!growingRange.isWithinRange(getMaxVerticalRadiusForRange(GROW_RANGE, willConfig, holder), getMaxHorizontalRadiusForRange(GROW_RANGE, willConfig, holder)) || (maxGrowthVolume != 0 && growingRange.getVolume() > maxGrowthVolume)) - { - return; - } - - for (BlockPos newPos : growingRange.getContainedPositions(pos)) - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (!BloodMagicAPI.getGreenGroveBlacklist().contains(block)) - { - if (block instanceof IPlantable || block instanceof IGrowable) - { - if (world.rand.nextDouble() < growthChance) - { - block.updateTick(world, newPos, state, new Random()); - IBlockState newState = world.getBlockState(newPos); - if (!newState.equals(state)) - { - totalGrowths++; - if (consumeRawWill) - { - rawWill -= rawWillDrain; - rawDrain += rawWillDrain; - } - - if (consumeVengefulWill) - { - vengefulWill -= vengefulWillDrain; - vengefulDrain += vengefulWillDrain; - } - } - } - } - } - - if (totalGrowths >= maxGrowths || (consumeRawWill && rawWill < rawWillDrain) || (consumeVengefulWill && vengefulWill < vengefulWillDrain)) - { - break; - } - } - - if (rawDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrain, true); - } - - if (vengefulDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrain, true); - } - - AreaDescriptor hydrateRange = getBlockRange(HYDRATE_RANGE); - - double steadfastDrain = 0; - if (steadfastWill > steadfastWillDrain) - { - AxisAlignedBB aabb = hydrateRange.getAABB(pos); - steadfastDrain += steadfastWillDrain * Utils.plantSeedsInArea(world, aabb, 2, 1); - steadfastWill -= steadfastDrain; - - for (BlockPos newPos : hydrateRange.getContainedPositions(pos)) - { - if (steadfastWill < steadfastWillDrain) - { - break; - } - - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - boolean hydratedBlock = false; - if (block == Blocks.DIRT || block == Blocks.GRASS) - { - world.setBlockState(newPos, farmlandState); - hydratedBlock = true; - } else if (block == Blocks.FARMLAND) - { - int meta = block.getMetaFromState(state); - if (meta < 7) - { - world.setBlockState(newPos, farmlandState); - hydratedBlock = true; - } - } - - if (hydratedBlock) - { - steadfastWill -= steadfastWillDrain; - steadfastDrain += steadfastWillDrain; - } - } - } - - if (steadfastDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastDrain, true); - } - - double corrosiveDrain = 0; - if (corrosiveWill > corrosiveWillDrain) - { - AreaDescriptor leechRange = getBlockRange(LEECH_RANGE); - AxisAlignedBB mobArea = leechRange.getAABB(pos); - List entityList = world.getEntitiesWithinAABB(EntityLivingBase.class, mobArea); - for (EntityLivingBase entityLiving : entityList) - { - if (corrosiveWill < corrosiveWillDrain) - { - break; - } - - if (entityLiving instanceof EntityPlayer) - { - continue; - } - - if (entityLiving.isPotionActive(ModPotions.plantLeech) || !entityLiving.isPotionApplicable(new PotionEffect(ModPotions.plantLeech))) - { - continue; - } - - entityLiving.addPotionEffect(new PotionEffect(ModPotions.plantLeech, 200, 0)); - - corrosiveWill -= corrosiveWillDrain; - corrosiveDrain += corrosiveWillDrain; - } - - if (corrosiveDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveDrain, true); - } - } - - network.syphon(totalGrowths * getRefreshCost()); - } - - public double getPlantGrowthChanceForWill(double will) - { - if (will > 0) - { - return 0.3 + will / 200; - } - - return defaultGrowthChance; - } - - public int getRefreshTimeForRawWill(double rawWill) - { - if (rawWill > 0) - { - return 10; - } - - return defaultRefreshTime; - } - - @Override - public int getRefreshTime() - { - return refreshTime; - } - - @Override - public int getMaxVolumeForRange(String range, List activeTypes, DemonWillHolder holder) - { - if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) - { - double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); - if (destructiveWill > 0) - { - return 81 + (int) Math.pow(destructiveWill / 4, 1.5); - } - } - - return volumeRangeMap.get(range); - } - - @Override - public int getMaxVerticalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) - { - if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) - { - double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); - if (destructiveWill > 0) - { - return (int) (4 + destructiveWill / 10d); - } - } - - return verticalRangeMap.get(range); - } - - @Override - public int getMaxHorizontalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) - { - if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) - { - double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); - if (destructiveWill > 0) - { - return (int) (4 + destructiveWill / 10d); - } - } - - return horizontalRangeMap.get(range); - } - - @Override - public int getRefreshCost() - { - return 20; //TODO: Need to find a way to balance this - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.EARTH); - this.addParallelRunes(components, 1, 0, EnumRuneType.WATER); - - return components; - } - - @Override - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") }; - } - - @Override - public Ritual getNewCopy() - { - return new RitualGreenGrove(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java deleted file mode 100644 index ff366848..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java +++ /dev/null @@ -1,128 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.iface.IHarvestHandler; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.registry.HarvestRegistry; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; - -/** - * This ritual uses registered {@link IHarvestHandler}'s to harvest blocks. - * - * To register a new Handler for this ritual use - * {@link HarvestRegistry#registerHandler(IHarvestHandler)} - * - * This ritual includes a way to change the range based on what block is above - * the MasterRitualStone. You can use - * {@link HarvestRegistry#registerRangeAmplifier(BlockStack, int)} to register a - * new amplifier. - */ -public class RitualHarvest extends Ritual -{ - public static final String HARVEST_RANGE = "harvestRange"; - - public RitualHarvest() - { - super("ritualHarvest", 0, 20000, "ritual." + Constants.Mod.MODID + ".harvestRitual"); - addBlockRange(HARVEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-4, 1, -4), 9, 5, 9)); - setMaximumVolumeAndDistanceOfRange(HARVEST_RANGE, 0, 15, 15); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - World world = masterRitualStone.getWorldObj(); - BlockPos pos = masterRitualStone.getBlockPos(); - - if (network.getCurrentEssence() < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int harvested = 0; - - AreaDescriptor harvestArea = getBlockRange(HARVEST_RANGE); - - harvestArea.resetIterator(); - while (harvestArea.hasNext()) - { - BlockPos nextPos = harvestArea.next().add(pos); - if (harvestBlock(world, nextPos)) - { - harvested++; - } - } - - network.syphon(getRefreshCost() * harvested); - } - - @Override - public int getRefreshCost() - { - return 20; - } - - @Override - public int getRefreshTime() - { - return 5; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - components.add(new RitualComponent(new BlockPos(1, 0, 1), EnumRuneType.DUSK)); - components.add(new RitualComponent(new BlockPos(1, 0, -1), EnumRuneType.DUSK)); - components.add(new RitualComponent(new BlockPos(-1, 0, -1), EnumRuneType.DUSK)); - components.add(new RitualComponent(new BlockPos(-1, 0, 1), EnumRuneType.DUSK)); - components.add(new RitualComponent(new BlockPos(2, 0, 0), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-2, 0, 0), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(0, 0, 2), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(0, 0, -2), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(3, 0, 1), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(3, 0, -1), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-3, 0, 1), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-3, 0, -1), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(1, 0, 3), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-1, 0, 3), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(1, 0, -3), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(-1, 0, -3), EnumRuneType.EARTH)); - components.add(new RitualComponent(new BlockPos(2, 0, 3), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(3, 0, 2), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(2, 0, -3), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(-3, 0, 2), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(-2, 0, 3), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(3, 0, -2), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(-2, 0, -3), EnumRuneType.WATER)); - components.add(new RitualComponent(new BlockPos(-3, 0, -2), EnumRuneType.WATER)); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualHarvest(); - } - - public static boolean harvestBlock(World world, BlockPos pos) - { - BlockStack harvestStack = BlockStack.getStackFromPos(world, pos); - - for (IHarvestHandler handler : HarvestRegistry.getHandlerList()) - if (handler.harvestAndPlant(world, pos, harvestStack)) - return true; - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualInterdiction.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualInterdiction.java deleted file mode 100644 index a94d9f53..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualInterdiction.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; - -public class RitualInterdiction extends Ritual -{ - public static final String INTERDICTION_RANGE = "interdictionRange"; - - public RitualInterdiction() - { - super("ritualInterdiction", 0, 1000, "ritual." + Constants.Mod.MODID + ".interdictionRitual"); - addBlockRange(INTERDICTION_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, 0, -2), 5)); - setMaximumVolumeAndDistanceOfRange(INTERDICTION_RANGE, 0, 10, 10); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - AreaDescriptor interdictionRange = getBlockRange(INTERDICTION_RANGE); - - for (EntityLivingBase entity : world.getEntitiesWithinAABB(EntityLivingBase.class, interdictionRange.getAABB(masterRitualStone.getBlockPos()))) - { - if (entity instanceof EntityPlayer && (((EntityPlayer) entity).capabilities.isCreativeMode || PlayerHelper.getUUIDFromPlayer((EntityPlayer) entity).toString().equals(masterRitualStone.getOwner()))) - continue; - - double xDif = entity.posX - (masterRitualStone.getBlockPos().getX() + 0.5); - double yDif = entity.posY - masterRitualStone.getBlockPos().getY() + 1; - double zDif = entity.posZ - (masterRitualStone.getBlockPos().getZ() + 0.5); - - entity.motionX = 0.1 * xDif; - entity.motionY = 0.1 * yDif; - entity.motionZ = 0.1 * zDif; - entity.fallDistance = 0; - - if (entity instanceof EntityPlayer) - { - entity.velocityChanged = true; - } - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 1; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.AIR); - this.addParallelRunes(components, 1, 0, EnumRuneType.AIR); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualInterdiction(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualJumping.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualJumping.java deleted file mode 100644 index f5e2e7b4..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualJumping.java +++ /dev/null @@ -1,103 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.util.Utils; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualJumping extends Ritual -{ - public static final String JUMP_RANGE = "jumpRange"; - - public RitualJumping() - { - super("ritualJump", 0, 5000, "ritual." + Constants.Mod.MODID + ".jumpRitual"); - addBlockRange(JUMP_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, 1, -1), 3, 1, 3)); - setMaximumVolumeAndDistanceOfRange(JUMP_RANGE, 0, 5, 5); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - AreaDescriptor jumpRange = getBlockRange(JUMP_RANGE); - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, jumpRange.getAABB(masterRitualStone.getBlockPos())); - if (entities != null) - { - for (EntityLivingBase entity : entities) - { - if (totalEffects >= maxEffects) - { - break; - } - - double motionY = 1.5; - - entity.fallDistance = 0; - if (entity.isSneaking()) - { - continue; - } - - entity.motionY = motionY; - totalEffects++; - - if (entity instanceof EntityPlayer) - { - Utils.setPlayerSpeedFromServer((EntityPlayer) entity, entity.motionX, entity.motionY, entity.motionZ); - } - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 5; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - for (int i = -1; i <= 1; i++) - this.addCornerRunes(components, 1, i, EnumRuneType.AIR); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualJumping(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualLava.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualLava.java deleted file mode 100644 index 11bdb3b6..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualLava.java +++ /dev/null @@ -1,357 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.MobEffects; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -import net.minecraftforge.fluids.capability.IFluidHandler; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.util.Utils; - -public class RitualLava extends Ritual -{ - public static final String LAVA_RANGE = "lavaRange"; - public static final String FIRE_FUSE_RANGE = "fireFuse"; - public static final String FIRE_RESIST_RANGE = "fireResist"; - public static final String FIRE_DAMAGE_RANGE = "fireDamage"; - public static final String LAVA_TANK_RANGE = "lavaTank"; - - public static final double vengefulWillDrain = 1; - public static final double steadfastWillDrain = 0.5; - public static final double corrosiveWillDrain = 0.2; - - public int timer = 0; - public static final int corrosiveRefreshTime = 20; - - public RitualLava() - { - super("ritualLava", 0, 10000, "ritual." + Constants.Mod.MODID + ".lavaRitual"); - addBlockRange(LAVA_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - addBlockRange(FIRE_FUSE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, -2, -2), 5)); - addBlockRange(FIRE_RESIST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); - addBlockRange(FIRE_DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); - addBlockRange(LAVA_TANK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(LAVA_RANGE, 9, 3, 3); - setMaximumVolumeAndDistanceOfRange(FIRE_FUSE_RANGE, 0, 10, 10); - setMaximumVolumeAndDistanceOfRange(FIRE_RESIST_RANGE, 0, 10, 10); - setMaximumVolumeAndDistanceOfRange(FIRE_DAMAGE_RANGE, 0, 10, 10); - setMaximumVolumeAndDistanceOfRange(LAVA_TANK_RANGE, 1, 10, 10); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - timer++; - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - int lpDrain = 0; - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - List willConfig = masterRitualStone.getActiveWillConfig(); - - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double rawDrained = 0; - - DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, pos); - AreaDescriptor lavaRange = getBlockRange(LAVA_RANGE); - - int maxLavaVolume = getMaxVolumeForRange(LAVA_RANGE, willConfig, holder); - if (!lavaRange.isWithinRange(getMaxVerticalRadiusForRange(LAVA_RANGE, willConfig, holder), getMaxHorizontalRadiusForRange(LAVA_RANGE, willConfig, holder)) || (maxLavaVolume != 0 && lavaRange.getVolume() > maxLavaVolume)) - { - return; - } - - for (BlockPos newPos : lavaRange.getContainedPositions(pos)) - { - IBlockState state = world.getBlockState(newPos); - if (world.isAirBlock(newPos) || Utils.isFlowingLiquid(world, newPos, state)) - { - int lpCost = getLPCostForRawWill(rawWill); - if (currentEssence < lpCost) - { - break; - } - world.setBlockState(newPos, Blocks.FLOWING_LAVA.getDefaultState()); - currentEssence -= lpCost; - lpDrain += lpCost; - if (rawWill > 0) - { - double drain = getWillCostForRawWill(rawWill); - rawWill -= drain; - rawDrained += drain; - } - } - } - - if (rawWill > 0) - { - AreaDescriptor chestRange = getBlockRange(LAVA_TANK_RANGE); - TileEntity tile = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); - double drain = getWillCostForRawWill(rawWill); - int lpCost = getLPCostForRawWill(rawWill); - - if (rawWill >= drain && currentEssence >= lpCost) - { - if (tile != null) - { - if (tile.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null)) - { - IFluidHandler handler = tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null); - double filled = handler.fill(new FluidStack(FluidRegistry.LAVA, 1000), true); - - double ratio = filled / 1000; - - rawWill -= drain * ratio; - rawDrained += drain * ratio; - - currentEssence -= Math.ceil(lpCost * ratio); - lpDrain += Math.ceil(lpCost * ratio); - } - } - } - } - - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - - if (vengefulWill >= vengefulWillDrain) - { - double vengefulDrained = 0; - AreaDescriptor fuseRange = getBlockRange(FIRE_FUSE_RANGE); - - AxisAlignedBB fuseArea = fuseRange.getAABB(pos); - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, fuseArea); - - for (EntityLivingBase entity : entities) - { - if (vengefulWill < vengefulWillDrain) - { - break; - } - - if (entity instanceof EntityPlayer) - { - continue; - } - - if (!entity.isPotionActive(ModPotions.fireFuse)) - { - entity.addPotionEffect(new PotionEffect(ModPotions.fireFuse, 100, 0)); - - vengefulDrained += vengefulWillDrain; - vengefulWill -= vengefulWillDrain; - } - } - - if (vengefulDrained > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrained, true); - } - } - - if (steadfastWill >= steadfastWillDrain) - { - double steadfastDrained = 0; - AreaDescriptor resistRange = getBlockRange(FIRE_RESIST_RANGE); - - int duration = getFireResistForWill(steadfastWill); - - AxisAlignedBB resistArea = resistRange.getAABB(pos); - List entities = world.getEntitiesWithinAABB(EntityPlayer.class, resistArea); - - for (EntityPlayer entity : entities) - { - if (steadfastWill < steadfastWillDrain) - { - break; - } - if (!entity.isPotionActive(MobEffects.FIRE_RESISTANCE) || (entity.getActivePotionEffect(MobEffects.FIRE_RESISTANCE).getDuration() < 2)) - { - entity.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 100, 0)); - - steadfastDrained += steadfastWillDrain; - steadfastWill -= steadfastWillDrain; - } - } - - if (steadfastDrained > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastDrained, true); - } - } - - if (timer % corrosiveRefreshTime == 0 && corrosiveWill >= corrosiveWillDrain) - { - double corrosiveDrained = 0; - AreaDescriptor resistRange = getBlockRange(FIRE_DAMAGE_RANGE); - - float damage = getCorrosiveDamageForWill(corrosiveWill); - - AxisAlignedBB damageArea = resistRange.getAABB(pos); - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, damageArea); - - for (EntityLivingBase entity : entities) - { - if (corrosiveWill < corrosiveWillDrain) - { - break; - } - - if (!entity.isDead && entity.hurtTime <= 0 && Utils.isImmuneToFireDamage(entity)) - { - if (entity.attackEntityFrom(BloodMagicAPI.getDamageSource(), damage)) - { - corrosiveDrained += corrosiveWillDrain; - corrosiveWill -= corrosiveWillDrain; - } - } - } - - if (corrosiveDrained > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveDrained, true); - } - } - - if (rawDrained > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrained, true); - } - - network.syphon(lpDrain); - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 500; - } - - @Override - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") }; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 1, 0, EnumRuneType.FIRE); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualLava(); - } - - @Override - public int getMaxVolumeForRange(String range, List activeTypes, DemonWillHolder holder) - { - if (LAVA_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) - { - double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); - if (destructiveWill > 0) - { - return 9 + (int) Math.pow(destructiveWill / 10, 1.5); - } - } - - return volumeRangeMap.get(range); - } - - @Override - public int getMaxVerticalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) - { - if (LAVA_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) - { - double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); - if (destructiveWill > 0) - { - return (int) (3 + destructiveWill / 10d); - } - } - - return verticalRangeMap.get(range); - } - - @Override - public int getMaxHorizontalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) - { - if (LAVA_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) - { - double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); - if (destructiveWill > 0) - { - return (int) (3 + destructiveWill / 10d); - } - } - - return horizontalRangeMap.get(range); - } - - public int getFireResistForWill(double steadfastWill) - { - return (int) (200 + steadfastWill * 3); - } - - public float getCorrosiveDamageForWill(double corrosiveWill) - { - return (float) (1 + corrosiveWill * 0.05); - } - - public int getLPCostForRawWill(double raw) - { - return Math.max((int) (500 - raw), 0); - } - - public double getWillCostForRawWill(double raw) - { - return Math.min(1, raw / 500); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualLivingArmourDowngrade.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualLivingArmourDowngrade.java deleted file mode 100644 index f4d3244d..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualLivingArmourDowngrade.java +++ /dev/null @@ -1,250 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItemFrame; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.World; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe; -import WayofTime.bloodmagic.api.registry.LivingArmourDowngradeRecipeRegistry; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.Utils; - -public class RitualLivingArmourDowngrade extends Ritual -{ - public static final String DOWNGRADE_RANGE = "containmentRange"; - private int internalTimer = 0; - - public RitualLivingArmourDowngrade() - { - super("ritualDowngrade", 0, 10000, "ritual." + Constants.Mod.MODID + ".downgradeRitual"); - addBlockRange(DOWNGRADE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-3, 0, -3), 7)); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos masterPos = masterRitualStone.getBlockPos(); - - AreaDescriptor downgradeRange = getBlockRange(DOWNGRADE_RANGE); - - boolean isActivatorPresent = false; - for (EntityPlayer player : world.getEntitiesWithinAABB(EntityPlayer.class, downgradeRange.getAABB(masterRitualStone.getBlockPos()))) - { - if (player.getUniqueID().toString().equals(masterRitualStone.getOwner())) - { - isActivatorPresent = true; - ItemStack keyStack = getStackFromItemFrame(world, masterPos, masterRitualStone.getDirection()); - if (keyStack == null) - { - return; - } - - List textList = LivingArmourDowngradeRecipeRegistry.getDialogForProcessTick(keyStack, internalTimer); - if (textList != null) - { - ChatUtil.sendChat(player, textList.toArray(new ITextComponent[textList.size()])); - } - - internalTimer++; - - if (player.isSneaking()) - { - double distance2 = masterPos.offset(EnumFacing.UP).distanceSqToCenter(player.posX, player.posY, player.posZ); - if (distance2 > 1) - { - return; - } - - BlockPos chestPos = masterPos.offset(masterRitualStone.getDirection(), 2).offset(EnumFacing.UP); - TileEntity tile = world.getTileEntity(chestPos); - if (tile == null) - { - return; - } - IItemHandler inv = Utils.getInventory(tile, null); - if (inv != null) - { - List recipeList = new ArrayList(); - for (int i = 0; i < inv.getSlots(); i++) - { - ItemStack invStack = inv.getStackInSlot(i); - if (invStack != null) - { - recipeList.add(invStack); - } - } - - LivingArmourDowngradeRecipe recipe = LivingArmourDowngradeRecipeRegistry.getMatchingRecipe(keyStack, recipeList, world, masterPos); - if (recipe != null) - { - LivingArmourUpgrade upgrade = recipe.getRecipeOutput(); - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - if (armour.canApplyUpgrade(player, upgrade)) - { - if (armour.upgradeArmour(player, upgrade)) - { - ItemLivingArmour.setLivingArmour(chestStack, armour); - - recipe.consumeInventory(inv); - - EntityLightningBolt lightning = new EntityLightningBolt(world, chestPos.getX(), chestPos.getY(), chestPos.getZ(), true); - world.spawnEntityInWorld(lightning); - - masterRitualStone.setActive(false); - } - } else - { - //TODO: You are not able to receive my blessing... - //TODO: Need to add a timer that will stop it from working. - } - } - } - } - } - } - - return; - } - } - - if (!isActivatorPresent) - { - internalTimer = 0; - } - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - this.internalTimer = tag.getInteger("internalTimer"); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - tag.setInteger("internalTimer", internalTimer); - } - - public ItemStack getStackFromItemFrame(World world, BlockPos masterPos, EnumFacing direction) - { - BlockPos offsetPos = new BlockPos(0, 3, 0); - offsetPos = offsetPos.offset(direction, 2); - - AxisAlignedBB bb = new AxisAlignedBB(masterPos.add(offsetPos)); - List frames = world.getEntitiesWithinAABB(EntityItemFrame.class, bb); - for (EntityItemFrame frame : frames) - { - if (frame.getDisplayedItem() != null) - { - return frame.getDisplayedItem(); - } - } - - return null; - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 0; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addRune(components, 0, 0, -1, EnumRuneType.AIR); - this.addRune(components, 0, 0, -2, EnumRuneType.DUSK); - this.addRune(components, 0, 1, -3, EnumRuneType.DUSK); - this.addRune(components, 0, 2, -3, EnumRuneType.BLANK); - this.addRune(components, 0, 3, -3, EnumRuneType.BLANK); - this.addRune(components, 0, 1, -4, EnumRuneType.FIRE); - - for (int i = 1; i <= 3; i++) - this.addRune(components, 0, 0, i, EnumRuneType.AIR); - - for (int sgn = -1; sgn <= 1; sgn += 2) - { - this.addRune(components, sgn, 0, 4, EnumRuneType.AIR); - this.addRune(components, sgn * 2, 0, 2, EnumRuneType.AIR); - this.addRune(components, sgn * 3, 0, 2, EnumRuneType.AIR); - this.addRune(components, sgn * 3, 0, 3, EnumRuneType.AIR); - this.addRune(components, sgn * 1, 0, 0, EnumRuneType.EARTH); - this.addRune(components, sgn * 1, 0, 1, EnumRuneType.EARTH); - this.addRune(components, sgn * 2, 0, -1, EnumRuneType.FIRE); - this.addRune(components, sgn * 2, 0, -2, EnumRuneType.FIRE); - this.addRune(components, sgn * 3, 0, -2, EnumRuneType.FIRE); - this.addRune(components, sgn * 3, 0, -3, EnumRuneType.FIRE); - this.addRune(components, sgn * 3, 0, -4, EnumRuneType.FIRE); - this.addRune(components, sgn * 1, 1, -1, EnumRuneType.AIR); - this.addRune(components, sgn * 1, 1, -2, EnumRuneType.AIR); - this.addRune(components, sgn * 1, 1, -4, EnumRuneType.FIRE); - this.addRune(components, sgn * 2, 1, -4, EnumRuneType.FIRE); - this.addRune(components, sgn * 1, 0, -3, EnumRuneType.EARTH); - this.addRune(components, sgn * 1, 0, -4, EnumRuneType.EARTH); - this.addRune(components, sgn * 1, 0, -5, EnumRuneType.EARTH); - this.addRune(components, sgn * 1, 1, -5, EnumRuneType.EARTH); - this.addRune(components, sgn * 1, 2, -5, EnumRuneType.EARTH); - this.addRune(components, sgn * 1, 3, -5, EnumRuneType.EARTH); - - this.addRune(components, sgn * 1, 3, -4, EnumRuneType.EARTH); - } - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualLivingArmourDowngrade(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualMagnetic.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualMagnetic.java deleted file mode 100644 index 9f4ee548..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualMagnetic.java +++ /dev/null @@ -1,226 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockOre; -import net.minecraft.block.BlockRedstoneOre; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.util.Utils; - -public class RitualMagnetic extends Ritual -{ - private static final Map oreBlockCache = new HashMap(); - - public static final String PLACEMENT_RANGE = "placementRange"; -// public static final String SEARCH_RANGE = "searchRange"; - - public BlockPos lastPos; // An offset - - public RitualMagnetic() - { - super("ritualMagnetic", 0, 5000, "ritual." + Constants.Mod.MODID + ".magneticRitual"); - addBlockRange(PLACEMENT_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, 1, -1), 3)); - setMaximumVolumeAndDistanceOfRange(PLACEMENT_RANGE, 50, 4, 4); - } - - public static boolean isBlockOre(Block block, int meta) - { - if (block == null) - return false; - - if (block instanceof BlockOre || block instanceof BlockRedstoneOre) - return true; - - if (Item.getItemFromBlock(block) == null) - return false; - - BlockStack type = new BlockStack(block, meta); - Boolean result = oreBlockCache.get(type); - if (result == null) - { - result = computeIsItemOre(type); - oreBlockCache.put(type, result); - } - return result; - } - - private static boolean computeIsItemOre(BlockStack type) - { - ItemStack stack = new ItemStack(type.getBlock(), type.getMeta()); - return isBlockOre(stack); - } - - public static boolean isBlockOre(ItemStack stack) - { - if (stack == null) - { - return false; - } - - for (int id : OreDictionary.getOreIDs(stack)) - { - String oreName = OreDictionary.getOreName(id); - if (oreName.contains("ore")) - return true; - } - return false; - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - AreaDescriptor placementRange = getBlockRange(PLACEMENT_RANGE); - - BlockPos replacement = pos; - boolean replace = false; - - for (BlockPos offset : placementRange.getContainedPositions(pos)) - { - if (world.isAirBlock(offset)) - { - replacement = offset; - replace = true; - break; - } - } - - IBlockState downState = world.getBlockState(pos.down()); - Block downBlock = downState.getBlock(); - - int radius = getRadius(downBlock); - - if (replace) - { - int j = -1; - int i = -radius; - int k = -radius; - - if (lastPos != null) - { - j = lastPos.getY(); - i = Math.min(radius, Math.max(-radius, lastPos.getX())); - k = Math.min(radius, Math.max(-radius, lastPos.getZ())); - } - - while (j + pos.getY() >= 0) - { - while (i <= radius) - { - while (k <= radius) - { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - ItemStack checkStack = block.getItem(world, newPos, state); -// int meta = block.getMetaFromState(state); - - if (isBlockOre(checkStack)) - { - Utils.swapLocations(world, newPos, world, replacement); - network.syphon(getRefreshCost()); - k++; - this.lastPos = new BlockPos(i, j, k); - return; - } else - { - k++; - } - } - i++; - k = -radius; - } - j--; - i = -radius; - this.lastPos = new BlockPos(i, j, k); - return; - } - - j = -1; - this.lastPos = new BlockPos(i, j, k); - return; - } - - } - - public int getRadius(Block block) - { - if (block == Blocks.IRON_BLOCK) - { - return 7; - } - - if (block == Blocks.GOLD_BLOCK) - { - return 15; - } - - if (block == Blocks.DIAMOND_BLOCK) - { - return 31; - } - - return 3; - } - - @Override - public int getRefreshTime() - { - return 40; - } - - @Override - public int getRefreshCost() - { - return 50; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.EARTH); - this.addParallelRunes(components, 2, 1, EnumRuneType.EARTH); - this.addCornerRunes(components, 2, 1, EnumRuneType.AIR); - this.addParallelRunes(components, 2, 2, EnumRuneType.FIRE); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualMagnetic(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualMeteor.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualMeteor.java deleted file mode 100644 index 1ef24b08..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualMeteor.java +++ /dev/null @@ -1,170 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.entity.projectile.EntityMeteor; -import WayofTime.bloodmagic.meteor.MeteorRegistry; - -public class RitualMeteor extends Ritual -{ - public static final String ITEM_RANGE = "itemRange"; - public static final double destructiveWillDrain = 50; - - public RitualMeteor() - { - super("ritualMeteor", 0, 1000000, "ritual." + Constants.Mod.MODID + ".meteorRitual"); - addBlockRange(ITEM_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - setMaximumVolumeAndDistanceOfRange(ITEM_RANGE, 0, 10, 10); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - BlockPos pos = masterRitualStone.getBlockPos(); - - List willConfig = masterRitualStone.getActiveWillConfig(); - - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - AreaDescriptor itemDetectionRange = getBlockRange(ITEM_RANGE); - List itemList = world.getEntitiesWithinAABB(EntityItem.class, itemDetectionRange.getAABB(pos)); - - double radiusModifier = getRadiusModifier(rawWill); - double explosionModifier = getExplosionModifier(steadfastWill); - double fillerChance = getFillerChance(corrosiveWill); - - boolean successful = false; - - for (EntityItem entityItem : itemList) - { - ItemStack stack = entityItem.getEntityItem(); - if (MeteorRegistry.hasMeteorForItem(stack)) - { - EntityMeteor meteor = new EntityMeteor(world, pos.getX(), 260, pos.getZ(), 0, -0.1, 0, radiusModifier, explosionModifier, fillerChance); - meteor.setMeteorStack(stack.copy()); - world.spawnEntityInWorld(meteor); - - entityItem.setDead(); - - if (destructiveWill >= destructiveWillDrain && currentEssence >= 1000000000) - { - network.syphon(1000000); - } else - { - masterRitualStone.setActive(false); - } - successful = true; - break; - } - } - - if (successful) - { - if (rawWill > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawWill, true); - } - - if (corrosiveWill > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveWill, true); - } - - if (steadfastWill > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastWill, true); - } - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 0; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 2, 0, EnumRuneType.FIRE); - this.addOffsetRunes(components, 3, 1, 0, EnumRuneType.AIR); - this.addOffsetRunes(components, 4, 2, 0, EnumRuneType.AIR); - this.addOffsetRunes(components, 5, 3, 0, EnumRuneType.DUSK); - this.addCornerRunes(components, 4, 0, EnumRuneType.DUSK); - - for (int i = 4; i <= 6; i++) - { - this.addParallelRunes(components, 4, 0, EnumRuneType.EARTH); - } - - this.addParallelRunes(components, 8, 0, EnumRuneType.EARTH); - this.addParallelRunes(components, 8, 1, EnumRuneType.EARTH); - this.addParallelRunes(components, 7, 1, EnumRuneType.EARTH); - this.addParallelRunes(components, 7, 2, EnumRuneType.EARTH); - this.addParallelRunes(components, 6, 2, EnumRuneType.FIRE); - this.addParallelRunes(components, 6, 3, EnumRuneType.WATER); - this.addParallelRunes(components, 5, 3, EnumRuneType.WATER); - this.addParallelRunes(components, 5, 4, EnumRuneType.AIR); - - this.addOffsetRunes(components, 1, 4, 4, EnumRuneType.AIR); - this.addParallelRunes(components, 4, 4, EnumRuneType.AIR); - - this.addOffsetRunes(components, 2, 4, 4, EnumRuneType.WATER); - this.addOffsetRunes(components, 2, 3, 4, EnumRuneType.FIRE); - this.addCornerRunes(components, 3, 4, EnumRuneType.FIRE); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualMeteor(); - } - - public double getRadiusModifier(double rawWill) - { - return Math.pow(1 + rawWill / 100, 1 / 3); - } - - public double getFillerChance(double corrosiveWill) - { - return corrosiveWill / 200; - } - - public double getExplosionModifier(double steadfastWill) - { - return Math.max(Math.pow(0.4, steadfastWill / 100), 1); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java deleted file mode 100644 index f373eb83..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java +++ /dev/null @@ -1,149 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import net.minecraft.block.Block; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemBlock; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; - -import java.util.ArrayList; - -public class RitualPlacer extends Ritual -{ - public static final String PLACER_RANGE = "placerRange"; - public static final String CHEST_RANGE = "chest"; - - public RitualPlacer() - { - super("ritualPlacer", 0, 5000, "ritual." + Constants.Mod.MODID + ".placerRitual"); - addBlockRange(PLACER_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, 0, -2), 5, 1, 5)); - addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(PLACER_RANGE, 300, 7, 7); - setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - BlockPos masterPos = masterRitualStone.getBlockPos(); - AreaDescriptor chestRange = getBlockRange(CHEST_RANGE); - TileEntity tileEntity = world.getTileEntity(chestRange.getContainedPositions(masterPos).get(0)); - - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - AreaDescriptor areaDescriptor = getBlockRange(PLACER_RANGE); - IInventory iInventory; - - if (tileEntity != null) - { - // Using the new Forge inventory system - if (tileEntity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN)) - { - IItemHandler iItemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); - - if (iItemHandler.getSlots() <= 0) - { - return; - } - - for (BlockPos blockPos : areaDescriptor.getContainedPositions(masterRitualStone.getBlockPos())) - { - for (int inv = 0; inv < iItemHandler.getSlots(); inv++) - { - if (world.getBlockState(blockPos).getBlock().isReplaceable(world, blockPos) && iItemHandler.getStackInSlot(inv) != null && iItemHandler.getStackInSlot(inv).stackSize != 0) - { - if (iItemHandler.getStackInSlot(inv).getItem() instanceof ItemBlock && world.getBlockState(blockPos.down()) != null) - { - if (iItemHandler.extractItem(inv, 1, true) != null) - { - world.setBlockState(blockPos, Block.getBlockFromItem(iItemHandler.getStackInSlot(inv).getItem()).getStateFromMeta(iItemHandler.getStackInSlot(inv).getItemDamage())); - iItemHandler.extractItem(inv, 1, false); - tileEntity.markDirty(); - network.syphon(getRefreshCost()); - } - } - } - } - } - //Compatibility with the old system, as it still exists - } else if (tileEntity instanceof IInventory) - { - iInventory = (IInventory) tileEntity; - - if (iInventory.getSizeInventory() <= 0) - { - return; - } - - for (BlockPos blockPos : areaDescriptor.getContainedPositions(masterRitualStone.getBlockPos())) - { - for (int inv = 0; inv < iInventory.getSizeInventory(); inv++) - { - if (world.getBlockState(blockPos).getBlock().isReplaceable(world, blockPos) && iInventory.getStackInSlot(inv) != null && iInventory.getStackInSlot(inv).stackSize != 0) - { - if (iInventory.getStackInSlot(inv).getItem() instanceof ItemBlock && world.getBlockState(blockPos.down()) != null) - { - world.setBlockState(blockPos, Block.getBlockFromItem(iInventory.getStackInSlot(inv).getItem()).getStateFromMeta(iInventory.getStackInSlot(inv).getItemDamage())); - iInventory.decrStackSize(inv, 1); - iInventory.markDirty(); - network.syphon(getRefreshCost()); - break; - } - } - } - } - } - } - } - - @Override - public int getRefreshCost() - { - return 50; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - addRune(components, 3, 0, 3, EnumRuneType.EARTH); - addRune(components, 3, 0, -3, EnumRuneType.EARTH); - addRune(components, -3, 0, 3, EnumRuneType.EARTH); - addRune(components, -3, 0, -3, EnumRuneType.EARTH); - - addRune(components, 3, 0, 2, EnumRuneType.WATER); - addRune(components, 3, 0, -2, EnumRuneType.WATER); - addRune(components, 2, 0, 3, EnumRuneType.WATER); - addRune(components, 2, 0, -3, EnumRuneType.WATER); - addRune(components, -2, 0, 3, EnumRuneType.WATER); - addRune(components, -2, 0, -3, EnumRuneType.WATER); - addRune(components, -3, 0, 2, EnumRuneType.WATER); - addRune(components, -3, 0, -2, EnumRuneType.WATER); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualPlacer(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualPortal.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualPortal.java deleted file mode 100644 index 586943ea..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualPortal.java +++ /dev/null @@ -1,291 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.teleport.PortalLocation; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.ritual.portal.LocationsHandler; -import WayofTime.bloodmagic.tile.TileDimensionalPortal; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.ForgeRegistries; - -import java.util.ArrayList; - -public class RitualPortal extends Ritual -{ - - private NBTTagCompound portalRitualTag; - - public static final String PORTAL_NBT_TAG = "PortalRitualTag"; - public static final String PORTAL_ID_TAG = "PortalRitualID"; - - public RitualPortal() - { - super("ritualPortal", 0, 50000, "ritual." + Constants.Mod.MODID + ".portalRitual"); - portalRitualTag = new NBTTagCompound(); - } - - @Override - public boolean activateRitual(IMasterRitualStone masterRitualStone, EntityPlayer player, String owner) - { - World world = masterRitualStone.getWorldObj(); - int x = masterRitualStone.getBlockPos().getX(); - int y = masterRitualStone.getBlockPos().getY(); - int z = masterRitualStone.getBlockPos().getZ(); - EnumFacing direction = masterRitualStone.getDirection(); - - String name = owner; - IBlockState blockState; - - if (!world.isRemote) - { - portalRitualTag.removeTag(PORTAL_ID_TAG); - - if (direction == EnumFacing.NORTH || direction == EnumFacing.SOUTH) - { - for (int i = x - 3; i <= x + 3; i++) - { - for (int k = z - 2; k <= z + 2; k++) - { - if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.RITUAL_STONE)) - { - blockState = getBlockState(world, i, y, k); - name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState))); - } - } - } - for (int j = y + 1; j <= y + 5; j++) - { - if (!world.isAirBlock(new BlockPos(x - 3, j, z)) && !(getBlockState(world, x - 3, j, z).getBlock() == ModBlocks.RITUAL_STONE)) - { - blockState = getBlockState(world, x - 3, j, z); - name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState))); - } - } - for (int j = y + 1; j <= y + 5; j++) - { - if (!world.isAirBlock(new BlockPos(x + 3, j, z)) && !(getBlockState(world, x + 3, j, z) == ModBlocks.RITUAL_STONE)) - { - blockState = getBlockState(world, x + 3, j, z); - name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState))); - } - } - } else if (direction == EnumFacing.EAST || direction == EnumFacing.WEST) - { - for (int k = z - 3; k <= z + 3; k++) - { - for (int i = x - 2; i <= x + 2; i++) - { - if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.RITUAL_STONE)) - { - blockState = getBlockState(world, i, y, k); - name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState))); - } - } - } - for (int j = y + 1; j <= y + 5; j++) - { - if (!world.isAirBlock(new BlockPos(x, j, z - 3)) && !(getBlockState(world, x, j, z - 3).getBlock() == ModBlocks.RITUAL_STONE)) - { - blockState = getBlockState(world, x, j, z - 3); - name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState))); - } - } - for (int j = y + 1; j <= y + 5; j++) - { - if (!world.isAirBlock(new BlockPos(x, j, z + 3)) && !(getBlockState(world, x, j, z + 3).getBlock() == ModBlocks.RITUAL_STONE)) - { - blockState = getBlockState(world, x, j, z + 3); - name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState))); - } - } - } - - if (LocationsHandler.getLocationsHandler() != null) - { - if (LocationsHandler.getLocationsHandler().addLocation(name, new PortalLocation(x, y + 1, z, world.provider.getDimension()))) - { - portalRitualTag.setString(PORTAL_ID_TAG, name); - return true; - } - } - } - return false; - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - if (world.isRemote) - { - return; - } - - int x = masterRitualStone.getBlockPos().getX(); - int y = masterRitualStone.getBlockPos().getY(); - int z = masterRitualStone.getBlockPos().getZ(); - EnumFacing direction = masterRitualStone.getDirection(); - - if (direction == EnumFacing.NORTH || direction == EnumFacing.SOUTH) - { - for (int i = x - 1; i <= x + 1; i++) - { - for (int j = y + 1; j <= y + 3; j++) - { - BlockPos tempPos = new BlockPos(i, j, z); - - if (world.isAirBlock(tempPos)) - { - IBlockState blockState = ModBlocks.DIMENSIONAL_PORTAL.getStateFromMeta(0); - world.setBlockState(tempPos, blockState, 3); - - if (world.getTileEntity(tempPos) != null && world.getTileEntity(tempPos) instanceof TileDimensionalPortal) - { - TileDimensionalPortal tile = (TileDimensionalPortal) world.getTileEntity(tempPos); - tile.setMasterStonePos(masterRitualStone.getBlockPos()); - tile.portalID = portalRitualTag.getString(PORTAL_ID_TAG); - } - } - } - } - } else if (direction == EnumFacing.EAST || direction == EnumFacing.WEST) - { - for (int k = z - 1; k <= z + 1; k++) - { - for (int j = y + 1; j <= y + 3; j++) - { - BlockPos tempPos = new BlockPos(x, j, k); - if (world.isAirBlock(tempPos)) - { - IBlockState blockState = ModBlocks.DIMENSIONAL_PORTAL.getStateFromMeta(1); - world.setBlockState(tempPos, blockState, 3); - - if (world.getTileEntity(tempPos) != null && world.getTileEntity(tempPos) instanceof TileDimensionalPortal) - { - TileDimensionalPortal tile = (TileDimensionalPortal) world.getTileEntity(tempPos); - tile.setMasterStonePos(masterRitualStone.getBlockPos()); - tile.portalID = portalRitualTag.getString(PORTAL_ID_TAG); - } - } - } - } - } - - } - - @Override - public void stopRitual(IMasterRitualStone masterRitualStone, BreakType breakType) - { - World world = masterRitualStone.getWorldObj(); - int x = masterRitualStone.getBlockPos().getX(); - int y = masterRitualStone.getBlockPos().getY(); - int z = masterRitualStone.getBlockPos().getZ(); - EnumFacing direction = masterRitualStone.getDirection(); - - if (LocationsHandler.getLocationsHandler() != null) - { - LocationsHandler.getLocationsHandler().removeLocation(portalRitualTag.getString(PORTAL_ID_TAG), new PortalLocation(x, y + 1, z, world.provider.getDimension())); - } - - if (direction == EnumFacing.NORTH || direction == EnumFacing.SOUTH) - { - for (int i = x - 2; i <= x + 2; i++) - { - for (int j = y + 1; j <= y + 3; j++) - { - if (getBlockState(world, i, j, z).getBlock() == ModBlocks.DIMENSIONAL_PORTAL) - { - world.setBlockToAir(new BlockPos(i, j, z)); - } - } - } - } else if (direction == EnumFacing.EAST || direction == EnumFacing.WEST) - { - for (int k = z - 2; k <= z + 2; k++) - { - for (int j = y + 1; j <= y + 3; j++) - { - if (getBlockState(world, x, j, k).getBlock() == ModBlocks.DIMENSIONAL_PORTAL) - { - world.setBlockToAir(new BlockPos(x, j, k)); - } - } - } - } - - portalRitualTag.removeTag(PORTAL_ID_TAG); - } - - @Override - public int getRefreshCost() - { - return 0; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - addRune(components, 1, 0, 0, EnumRuneType.AIR); - addRune(components, 2, 0, 0, EnumRuneType.WATER); - addRune(components, -1, 0, 0, EnumRuneType.FIRE); - addRune(components, -2, 0, 0, EnumRuneType.EARTH); - addRune(components, 2, 1, 0, EnumRuneType.DUSK); - - addRune(components, 2, 2, 0, EnumRuneType.AIR); - addRune(components, 2, 3, 0, EnumRuneType.WATER); - addRune(components, 2, 4, 0, EnumRuneType.FIRE); - addRune(components, 1, 4, 0, EnumRuneType.EARTH); - addRune(components, 0, 4, 0, EnumRuneType.DUSK); - - addRune(components, -1, 4, 0, EnumRuneType.AIR); - addRune(components, -2, 4, 0, EnumRuneType.WATER); - addRune(components, -2, 3, 0, EnumRuneType.FIRE); - addRune(components, -2, 2, 0, EnumRuneType.EARTH); - addRune(components, -2, 1, 0, EnumRuneType.DUSK); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualPortal(); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - portalRitualTag = tag.getCompoundTag(PORTAL_NBT_TAG); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - tag.setTag(PORTAL_NBT_TAG, portalRitualTag); - } - - public IBlockState getBlockState(World world, int x, int y, int z) - { - return world.getBlockState(new BlockPos(x, y, z)); - } - - public String addStringToEnd(String input, String toAdd) - { - return input + toAdd; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualPump.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualPump.java deleted file mode 100644 index 5111d5f9..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualPump.java +++ /dev/null @@ -1,113 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import net.minecraft.block.BlockLiquid; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -import java.util.ArrayList; -import java.util.Iterator; - -public class RitualPump extends Ritual -{ - public static final String PUMP_RANGE = "pumpRange"; - - private ArrayList liquidsCache; - private Iterator blockPosIterator; - - private boolean cached = false; - private BlockPos currentPos; - - public RitualPump() - { - super("ritualPump", 0, 500, "ritual." + Constants.Mod.MODID + ".pumpRitual"); - addBlockRange(PUMP_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-16, -16, -16), new BlockPos(17, 17, 17))); - - setMaximumVolumeAndDistanceOfRange(PUMP_RANGE, 0, 16, 16); - liquidsCache = new ArrayList(); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - TileEntity tileEntity = world.getTileEntity(masterRitualStone.getBlockPos().up()); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - if (tileEntity != null && tileEntity instanceof IFluidHandler) - { - IFluidHandler fluidHandler = (IFluidHandler) tileEntity; - if (!cached || liquidsCache.isEmpty()) - { - if (fluidHandler.drain(EnumFacing.DOWN, 1000, false) != null) - { - FluidStack fluidStack = fluidHandler.drain(EnumFacing.DOWN, 1000, false); - for (BlockPos blockPos : getBlockRange(PUMP_RANGE).getContainedPositions(masterRitualStone.getBlockPos())) - { - if (!liquidsCache.contains(blockPos)) - { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock() == fluidStack.getFluid().getBlock() && world.getBlockState(blockPos).getValue(BlockLiquid.LEVEL) == 0) - { - liquidsCache.add(blockPos); - } - } - } - } - - cached = true; - blockPosIterator = liquidsCache.iterator(); - } - - if (blockPosIterator.hasNext()) - { - network.syphon(getRefreshCost()); - currentPos = blockPosIterator.next(); - fluidHandler.fill(EnumFacing.DOWN, fluidHandler.drain(EnumFacing.DOWN, 1000, false), true); - world.setBlockState(currentPos, Blocks.STONE.getDefaultState()); - blockPosIterator.remove(); - } - } - } - - @Override - public int getRefreshCost() - { - return 25; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - addRune(components, 1, 0, 1, EnumRuneType.WATER); - addRune(components, 1, 0, -1, EnumRuneType.EARTH); - addRune(components, -1, 0, -1, EnumRuneType.AIR); - addRune(components, -1, 0, 1, EnumRuneType.FIRE); - - addCornerRunes(components, 1, 1, EnumRuneType.DUSK); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualPump(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualRegeneration.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualRegeneration.java deleted file mode 100644 index fb03fa79..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualRegeneration.java +++ /dev/null @@ -1,219 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.util.Utils; - -public class RitualRegeneration extends Ritual -{ - public static final String HEAL_RANGE = "heal"; - public static final String VAMPIRE_RANGE = "vampire"; - - public static final int SACRIFICE_AMOUNT = 100; - - public static final double corrosiveWillDrain = 0.04; - - public RitualRegeneration() - { - super("ritualRegeneration", 0, 25000, "ritual." + Constants.Mod.MODID + ".regenerationRitual"); - addBlockRange(HEAL_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-15, -15, -15), 31)); - addBlockRange(VAMPIRE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-15, -15, -15), 31)); - - setMaximumVolumeAndDistanceOfRange(HEAL_RANGE, 0, 20, 20); - setMaximumVolumeAndDistanceOfRange(VAMPIRE_RANGE, 0, 20, 20); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - int totalCost = 0; - - List willConfig = masterRitualStone.getActiveWillConfig(); - - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - double vengefulDrain = 0; - double steadfastDrain = 0; - double destructiveDrain = 0; - double corrosiveDrain = 0; - - boolean syphonHealth = corrosiveWill >= corrosiveWillDrain; - boolean applyAbsorption = false; - float absorptionRate = 1; - int maxAbsorption = 20; - - AreaDescriptor healArea = getBlockRange(HEAL_RANGE); - AxisAlignedBB healRange = healArea.getAABB(pos); - - AreaDescriptor damageArea = getBlockRange(VAMPIRE_RANGE); - AxisAlignedBB damageRange = damageArea.getAABB(pos); - - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, healRange); - List players = world.getEntitiesWithinAABB(EntityPlayer.class, healRange); - List damagedEntities = world.getEntitiesWithinAABB(EntityLivingBase.class, damageRange); - - if (syphonHealth) - { - for (EntityPlayer player : players) - { - if (player.getHealth() <= player.getMaxHealth() - 1) - { - float syphonedHealthAmount = getSyphonAmountForWill(corrosiveWill); - Collections.shuffle(damagedEntities); - for (EntityLivingBase damagedEntity : damagedEntities) - { - if (damagedEntity instanceof EntityPlayer) - { - continue; - } - - float currentHealth = damagedEntity.getHealth(); - - damagedEntity.attackEntityFrom(BloodMagicAPI.getDamageSource(), Math.min(player.getMaxHealth() - player.getHealth(), syphonedHealthAmount)); - - float healthDifference = currentHealth - damagedEntity.getHealth(); - if (healthDifference > 0) - { - corrosiveDrain += corrosiveWillDrain; - corrosiveWill -= corrosiveWillDrain; - player.heal(healthDifference); - } - - break; - } - } - } - } - - for (EntityLivingBase entity : entities) - { - float health = entity.getHealth(); - if (health <= entity.getMaxHealth() - 1) - { - if (entity.isPotionApplicable(new PotionEffect(MobEffects.REGENERATION))) - { - if (entity instanceof EntityPlayer) - { - totalCost += getRefreshCost(); - currentEssence -= getRefreshCost(); - } else - { - totalCost += getRefreshCost() / 10; - currentEssence -= getRefreshCost() / 10; - } - - entity.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50, 0, false, false)); - - totalEffects++; - - if (totalEffects >= maxEffects) - { - break; - } - } - } - if (applyAbsorption && entity instanceof EntityPlayer) - { - if (applyAbsorption) - { - float added = Utils.addAbsorptionToMaximum(entity, absorptionRate, maxAbsorption, 1000); - } - } - } - - if (corrosiveDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveDrain, true); - } - - network.syphon(totalCost); - } - - @Override - public int getRefreshTime() - { - return 50; - } - - @Override - public int getRefreshCost() - { - return SACRIFICE_AMOUNT; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - components.add(new RitualComponent(new BlockPos(4, 0, 0), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(5, 0, -1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(5, 0, 1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(-4, 0, 0), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(-5, 0, -1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(-5, 0, 1), EnumRuneType.AIR)); - components.add(new RitualComponent(new BlockPos(0, 0, 4), EnumRuneType.FIRE)); - components.add(new RitualComponent(new BlockPos(1, 0, 5), EnumRuneType.FIRE)); - components.add(new RitualComponent(new BlockPos(-1, 0, 5), EnumRuneType.FIRE)); - components.add(new RitualComponent(new BlockPos(0, 0, -4), EnumRuneType.FIRE)); - components.add(new RitualComponent(new BlockPos(1, 0, -5), EnumRuneType.FIRE)); - components.add(new RitualComponent(new BlockPos(-1, 0, -5), EnumRuneType.FIRE)); - this.addOffsetRunes(components, 3, 5, 0, EnumRuneType.WATER); - this.addCornerRunes(components, 3, 0, EnumRuneType.DUSK); - this.addOffsetRunes(components, 4, 5, 0, EnumRuneType.EARTH); - this.addOffsetRunes(components, 4, 5, -1, EnumRuneType.EARTH); - this.addCornerRunes(components, 5, 0, EnumRuneType.EARTH); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualRegeneration(); - } - - public float getSyphonAmountForWill(double corrosiveWill) - { - return 1; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java deleted file mode 100644 index 12caf0bb..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java +++ /dev/null @@ -1,218 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.util.Utils; - -public class RitualSpeed extends Ritual -{ - public static final String SPEED_RANGE = "sanicRange"; - - public static final double vengefulWillDrain = 0.05; - public static final double destructiveWillDrain = 0.05; - public static final double rawWillDrain = 0.1; - - public RitualSpeed() - { - super("ritualSpeed", 0, 1000, "ritual." + Constants.Mod.MODID + ".speedRitual"); - addBlockRange(SPEED_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, 1, -2), new BlockPos(2, 5, 2))); - setMaximumVolumeAndDistanceOfRange(SPEED_RANGE, 0, 2, 5); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - List willConfig = masterRitualStone.getActiveWillConfig(); - - double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); - double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); - double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); - double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); - double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); - - AreaDescriptor speedRange = getBlockRange(SPEED_RANGE); - - double vengefulDrain = 0; - double destructiveDrain = 0; - double rawDrain = 0; - - if (rawWill < rawWillDrain) - { - rawWill = 0; //Simplifies later calculations - } - - for (EntityLivingBase entity : world.getEntitiesWithinAABB(EntityLivingBase.class, speedRange.getAABB(masterRitualStone.getBlockPos()))) - { - if (entity.isSneaking()) - continue; - - boolean transportChildren = destructiveWill < destructiveWillDrain; - boolean transportAdults = vengefulWill < vengefulWillDrain; - - if ((entity.isChild() && !transportChildren) || (!entity.isChild() && !transportAdults)) - { - continue; - } - - if (entity instanceof EntityPlayer && (transportChildren ^ transportAdults)) - { - continue; - } - - if (!transportChildren) - { - destructiveWill -= destructiveWillDrain; - destructiveDrain += destructiveWillDrain; - } - - if (!transportAdults) - { - vengefulWill -= vengefulWillDrain; - vengefulDrain += vengefulWillDrain; - } - - double motionY = getVerticalSpeedForWill(rawWill); - double speed = getHorizontalSpeedForWill(rawWill); - EnumFacing direction = masterRitualStone.getDirection(); - - if (rawWill >= rawWillDrain) - { - rawWill -= rawWillDrain; - rawDrain += rawWillDrain; - } - - entity.motionY = motionY; - entity.fallDistance = 0; - - switch (direction) - { - case NORTH: - entity.motionX = 0; - entity.motionY = motionY; - entity.motionZ = -speed; - break; - - case SOUTH: - entity.motionX = 0; - entity.motionY = motionY; - entity.motionZ = speed; - break; - - case WEST: - entity.motionX = -speed; - entity.motionY = motionY; - entity.motionZ = 0; - break; - - case EAST: - entity.motionX = speed; - entity.motionY = motionY; - entity.motionZ = 0; - break; - default: - break; - } - - if (entity instanceof EntityPlayer) - { - Utils.setPlayerSpeedFromServer((EntityPlayer) entity, entity.motionX, entity.motionY, entity.motionZ); - } - } - - if (rawDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrain, true); - } - - if (vengefulDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrain, true); - } - - if (destructiveDrain > 0) - { - WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DESTRUCTIVE, destructiveDrain, true); - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 5; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addRune(components, 0, 0, -2, EnumRuneType.DUSK); - this.addRune(components, 1, 0, -1, EnumRuneType.AIR); - this.addRune(components, -1, 0, -1, EnumRuneType.AIR); - for (int i = 0; i < 3; i++) - { - this.addRune(components, 2, 0, i, EnumRuneType.AIR); - this.addRune(components, -2, 0, i, EnumRuneType.AIR); - } - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualSpeed(); - } - - @Override - public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) - { - return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") }; - } - - public double getVerticalSpeedForWill(double rawWill) - { - return 1.2 + rawWill / 200; - } - - public double getHorizontalSpeedForWill(double rawWill) - { - return 3 + rawWill / 40; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualSuppression.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualSuppression.java deleted file mode 100644 index 99037752..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualSuppression.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.tile.TileSpectralBlock; -import WayofTime.bloodmagic.util.Utils; - -public class RitualSuppression extends Ritual -{ - public static final String SUPPRESSION_RANGE = "suppressionRange"; - - public RitualSuppression() - { - super("ritualSuppression", 0, 10000, "ritual." + Constants.Mod.MODID + ".suppressionRitual"); - addBlockRange(SUPPRESSION_RANGE, new AreaDescriptor.HemiSphere(new BlockPos(0, 0, 0), 10)); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - final int refresh = 100; - AreaDescriptor suppressionRange = getBlockRange(SUPPRESSION_RANGE); - - for (BlockPos blockPos : suppressionRange.getContainedPositions(masterRitualStone.getBlockPos())) - { - IBlockState state = world.getBlockState(blockPos); - - if (Utils.isBlockLiquid(state) && world.getTileEntity(blockPos) == null) - TileSpectralBlock.createSpectralBlock(world, blockPos, refresh); - else - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TileSpectralBlock) - ((TileSpectralBlock) tile).resetDuration(refresh); - } - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 2; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 2, 0, EnumRuneType.WATER); - this.addRune(components, -2, 0, -1, EnumRuneType.AIR); - this.addRune(components, -1, 0, -2, EnumRuneType.AIR); - this.addRune(components, -2, 0, 1, EnumRuneType.AIR); - this.addRune(components, 1, 0, -2, EnumRuneType.AIR); - this.addRune(components, 2, 0, 1, EnumRuneType.AIR); - this.addRune(components, 1, 0, 2, EnumRuneType.AIR); - this.addRune(components, 2, 0, -1, EnumRuneType.AIR); - this.addRune(components, -1, 0, 2, EnumRuneType.AIR); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualSuppression(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualUpgradeRemove.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualUpgradeRemove.java deleted file mode 100644 index c859c7f2..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualUpgradeRemove.java +++ /dev/null @@ -1,151 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.livingArmour.StatTracker; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.registry.ModItems; - -import com.google.common.collect.Iterables; - -public class RitualUpgradeRemove extends Ritual -{ - public static final String CHECK_RANGE = "fillRange"; - - public RitualUpgradeRemove() - { - super("ritualUpgradeRemove", 0, 25000, "ritual." + Constants.Mod.MODID + ".upgradeRemoveRitual"); - addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1)); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - - if (world.isRemote) - { - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - AreaDescriptor checkRange = getBlockRange(CHECK_RANGE); - - List playerList = world.getEntitiesWithinAABB(EntityPlayer.class, checkRange.getAABB(pos)); - - for (EntityPlayer player : playerList) - { - if (LivingArmour.hasFullSet(player)) - { - boolean removedUpgrade = false; - - ItemStack chestStack = Iterables.toArray(player.getArmorInventoryList(), ItemStack.class)[2]; - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - @SuppressWarnings("unchecked") - HashMap upgradeMap = (HashMap) armour.upgradeMap.clone(); - - for (Entry entry : upgradeMap.entrySet()) - { - LivingArmourUpgrade upgrade = entry.getValue(); - String upgradeKey = entry.getKey(); - - ItemStack upgradeStack = new ItemStack(ModItems.UPGRADE_TOME); - LivingUpgrades.setKey(upgradeStack, upgradeKey); - LivingUpgrades.setLevel(upgradeStack, upgrade.getUpgradeLevel()); - - boolean successful = armour.removeUpgrade(player, upgrade); - - if (successful) - { - removedUpgrade = true; - world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, upgradeStack)); - for (Entry trackerEntry : armour.trackerMap.entrySet()) - { - StatTracker tracker = trackerEntry.getValue(); - if (tracker != null) - { - if (tracker.providesUpgrade(upgradeKey)) - { - tracker.resetTracker(); //Resets the tracker if the upgrade corresponding to it was removed. - } - } - } - } - } - - if (removedUpgrade) - { - ((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true); - ItemLivingArmour.setLivingArmour(chestStack, armour); - armour.recalculateUpgradePoints(); - - masterRitualStone.setActive(false); - - world.spawnEntityInWorld(new EntityLightningBolt(world, pos.getX(), pos.getY() - 1, pos.getZ(), true)); - } - - } - } - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 0; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.DUSK); - this.addCornerRunes(components, 2, 0, EnumRuneType.FIRE); - this.addOffsetRunes(components, 1, 2, 0, EnumRuneType.FIRE); - this.addCornerRunes(components, 1, 1, EnumRuneType.WATER); - this.addParallelRunes(components, 4, 0, EnumRuneType.EARTH); - this.addCornerRunes(components, 1, 3, EnumRuneType.WATER); - this.addParallelRunes(components, 1, 4, EnumRuneType.AIR); - - for (int i = 0; i < 4; i++) - { - this.addCornerRunes(components, 3, i, EnumRuneType.EARTH); - } - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualUpgradeRemove(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualWater.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualWater.java deleted file mode 100644 index b359e788..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualWater.java +++ /dev/null @@ -1,86 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import net.minecraft.init.Blocks; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; - -public class RitualWater extends Ritual -{ - public static final String WATER_RANGE = "waterRange"; - - public RitualWater() - { - super("ritualWater", 0, 500, "ritual." + Constants.Mod.MODID + ".waterRitual"); - addBlockRange(WATER_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - setMaximumVolumeAndDistanceOfRange(WATER_RANGE, 9, 3, 3); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - AreaDescriptor waterRange = getBlockRange(WATER_RANGE); - - for (BlockPos newPos : waterRange.getContainedPositions(masterRitualStone.getBlockPos())) - { - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.FLOWING_WATER.getDefaultState()); - totalEffects++; - } - - if (totalEffects >= maxEffects) - { - break; - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 25; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.WATER); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualWater(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualWellOfSuffering.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualWellOfSuffering.java deleted file mode 100644 index df2f176f..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualWellOfSuffering.java +++ /dev/null @@ -1,161 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.ritual.*; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.tile.TileAltar; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualWellOfSuffering extends Ritual -{ - public static final String ALTAR_RANGE = "altar"; - public static final String DAMAGE_RANGE = "damage"; - - public static final int SACRIFICE_AMOUNT = 25; - - public BlockPos altarOffsetPos = new BlockPos(0, 0, 0); //TODO: Save! - - public RitualWellOfSuffering() - { - super("ritualWellOfSuffering", 0, 40000, "ritual." + Constants.Mod.MODID + ".wellOfSufferingRitual"); - addBlockRange(ALTAR_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-5, -10, -5), 11, 21, 11)); - addBlockRange(DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-10, -10, -10), 21)); - - setMaximumVolumeAndDistanceOfRange(ALTAR_RANGE, 0, 10, 15); - setMaximumVolumeAndDistanceOfRange(DAMAGE_RANGE, 0, 15, 15); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - BlockPos pos = masterRitualStone.getBlockPos(); - - int maxEffects = currentEssence / getRefreshCost(); - int totalEffects = 0; - - BlockPos altarPos = pos.add(altarOffsetPos); - - TileEntity tile = world.getTileEntity(altarPos); - - AreaDescriptor altarRange = getBlockRange(ALTAR_RANGE); - - if (!altarRange.isWithinArea(altarOffsetPos) || !(tile instanceof TileAltar)) - { - for (BlockPos newPos : altarRange.getContainedPositions(pos)) - { - TileEntity nextTile = world.getTileEntity(newPos); - if (nextTile instanceof TileAltar) - { - tile = nextTile; - altarOffsetPos = newPos.subtract(pos); - - altarRange.resetCache(); - break; - } - } - } - - if (tile instanceof TileAltar) - { - TileAltar tileAltar = (TileAltar) tile; - - AreaDescriptor damageRange = getBlockRange(DAMAGE_RANGE); - AxisAlignedBB range = damageRange.getAABB(pos); - - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, range); - - for (EntityLivingBase entity : entities) - { - if (ConfigHandler.wellOfSufferingBlacklist.contains(entity.getClass().getSimpleName())) - continue; - - String simpleClassName = entity.getClass().getSimpleName(); - if (BloodMagicAPI.getEntitySacrificeValues().containsKey(simpleClassName) && BloodMagicAPI.getEntitySacrificeValues().get(simpleClassName) <= 0) - continue; - - if (entity.isEntityAlive() && !(entity instanceof EntityPlayer)) - { - if (entity.attackEntityFrom(DamageSource.outOfWorld, 1)) - { - String entityName = entity.getClass().getSimpleName(); - - int lifeEssenceRatio = SACRIFICE_AMOUNT; - - if (ConfigHandler.entitySacrificeValues.containsKey(entityName)) - lifeEssenceRatio = ConfigHandler.entitySacrificeValues.get(entityName); - - if (BloodMagicAPI.getEntitySacrificeValues().containsKey(entityName)) - lifeEssenceRatio = BloodMagicAPI.getEntitySacrificeValues().get(entityName); - - tileAltar.sacrificialDaggerCall(lifeEssenceRatio, true); - - totalEffects++; - - if (totalEffects >= maxEffects) - { - break; - } - } - } - } - } - - network.syphon(getRefreshCost() * totalEffects); - } - - @Override - public int getRefreshTime() - { - return 25; - } - - @Override - public int getRefreshCost() - { - return 2; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addCornerRunes(components, 1, 0, EnumRuneType.FIRE); - this.addCornerRunes(components, 2, -1, EnumRuneType.FIRE); - this.addParallelRunes(components, 2, -1, EnumRuneType.EARTH); - this.addCornerRunes(components, -3, -1, EnumRuneType.DUSK); - this.addOffsetRunes(components, 2, 4, -1, EnumRuneType.WATER); - this.addOffsetRunes(components, 1, 4, 0, EnumRuneType.WATER); - this.addParallelRunes(components, 4, 1, EnumRuneType.AIR); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualWellOfSuffering(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualZephyr.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualZephyr.java deleted file mode 100644 index 7f45574d..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualZephyr.java +++ /dev/null @@ -1,122 +0,0 @@ -package WayofTime.bloodmagic.ritual; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.ritual.EnumRuneType; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.util.Utils; - -public class RitualZephyr extends Ritual -{ - public static final String ZEPHYR_RANGE = "zephyrRange"; - public static final String CHEST_RANGE = "chest"; - - public RitualZephyr() - { - super("ritualZephyr", 0, 1000, "ritual." + Constants.Mod.MODID + ".zephyrRitual"); - addBlockRange(ZEPHYR_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-5, -5, -5), 11)); - addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); - - setMaximumVolumeAndDistanceOfRange(ZEPHYR_RANGE, 0, 10, 10); - setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); - } - - @Override - public void performRitual(IMasterRitualStone masterRitualStone) - { - World world = masterRitualStone.getWorldObj(); - SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner()); - int currentEssence = network.getCurrentEssence(); - BlockPos masterPos = masterRitualStone.getBlockPos(); - AreaDescriptor chestRange = getBlockRange(CHEST_RANGE); - TileEntity tileInventory = world.getTileEntity(chestRange.getContainedPositions(masterPos).get(0)); - - if (!masterRitualStone.getWorldObj().isRemote && tileInventory != null) - { - if (currentEssence < getRefreshCost()) - { - network.causeNausea(); - return; - } - - AreaDescriptor zephyrRange = getBlockRange(ZEPHYR_RANGE); - - List itemList = world.getEntitiesWithinAABB(EntityItem.class, zephyrRange.getAABB(masterRitualStone.getBlockPos())); - int count = 0; - - if (itemList != null) - { - for (EntityItem entityItem : itemList) - { - if (entityItem.isDead) - { - continue; - } - - ItemStack copyStack = entityItem.getEntityItem().copy(); - int originalAmount = copyStack.stackSize; - ItemStack newStack = Utils.insertStackIntoTile(copyStack, tileInventory, EnumFacing.DOWN); - - if (newStack != null && newStack.stackSize < originalAmount) - { - count++; - if (newStack.stackSize <= 0) - entityItem.setDead(); - - entityItem.getEntityItem().stackSize = newStack.stackSize; - } - - if (newStack == null) - { - entityItem.setDead(); - } - } - } - - network.syphon(this.getRefreshCost() * Math.min(count, 100)); - } - } - - @Override - public int getRefreshTime() - { - return 1; - } - - @Override - public int getRefreshCost() - { - return 1; - } - - @Override - public ArrayList getComponents() - { - ArrayList components = new ArrayList(); - - this.addParallelRunes(components, 2, 0, EnumRuneType.AIR); - this.addCornerRunes(components, 1, 1, EnumRuneType.AIR); - this.addParallelRunes(components, 1, -1, EnumRuneType.AIR); - - return components; - } - - @Override - public Ritual getNewCopy() - { - return new RitualZephyr(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java deleted file mode 100644 index 74b5b1cd..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java +++ /dev/null @@ -1,82 +0,0 @@ -package WayofTime.bloodmagic.ritual.harvest; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.iface.IHarvestHandler; -import WayofTime.bloodmagic.api.registry.HarvestRegistry; -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; - -import java.util.List; - -/** - * Harvest handler for standard plantable crops such as Wheat, Potatoes, and - * Netherwart.
- * Register a new crop for this handler with - * {@link HarvestRegistry#registerStandardCrop(Block, int)} - */ -public class HarvestHandlerPlantable implements IHarvestHandler -{ - public HarvestHandlerPlantable() - { - HarvestRegistry.registerStandardCrop(Blocks.CARROTS, 7); - HarvestRegistry.registerStandardCrop(Blocks.WHEAT, 7); - HarvestRegistry.registerStandardCrop(Blocks.POTATOES, 7); - HarvestRegistry.registerStandardCrop(Blocks.BEETROOTS, 3); - HarvestRegistry.registerStandardCrop(Blocks.NETHER_WART, 3); - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack) - { - if (!HarvestRegistry.getStandardCrops().containsKey(blockStack.getBlock())) - return false; - - int matureMeta = HarvestRegistry.getStandardCrops().get(blockStack.getBlock()); - - if (blockStack.getMeta() < matureMeta) - return false; - - List drops = blockStack.getBlock().getDrops(world, pos, blockStack.getState(), 0); - boolean foundSeed = false; - - for (ItemStack stack : drops) - { - if (stack == null) - continue; - - if (stack.getItem() instanceof IPlantable) - { - if (stack.stackSize > 1) - stack.stackSize--; - else - drops.remove(stack); - - foundSeed = true; - break; - } - } - - if (foundSeed) - { - world.setBlockState(pos, blockStack.getBlock().getDefaultState()); - world.playEvent(2001, pos, Block.getStateId(blockStack.getState())); - for (ItemStack stack : drops) - { - if (!world.isRemote) - { - EntityItem toDrop = new EntityItem(world, pos.getX(), pos.getY() + 0.5, pos.getZ(), stack); - world.spawnEntityInWorld(toDrop); - } - } - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java deleted file mode 100644 index 16984fd4..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java +++ /dev/null @@ -1,70 +0,0 @@ -package WayofTime.bloodmagic.ritual.harvest; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.iface.IHarvestHandler; -import WayofTime.bloodmagic.api.registry.HarvestRegistry; -import net.minecraft.block.BlockStem; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.List; - -/** - * Harvest handler for crops with stems such as Pumpkins and Melons. - * {@link OreDictionary#WILDCARD_VALUE} is used as a wildcard to allow the crop - * to be harvested at any metadata. Rotation based crop blocks are a good reason - * to use this (see pumpkins).
- * Register a new crop for this handler with - * {@link HarvestRegistry#registerStemCrop(BlockStack, BlockStack)} - */ -public class HarvestHandlerStem implements IHarvestHandler -{ - public HarvestHandlerStem() - { - HarvestRegistry.registerStemCrop(new BlockStack(Blocks.PUMPKIN, OreDictionary.WILDCARD_VALUE), new BlockStack(Blocks.PUMPKIN_STEM, 7)); - HarvestRegistry.registerStemCrop(new BlockStack(Blocks.MELON_BLOCK), new BlockStack(Blocks.MELON_STEM, 7)); - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack) - { - boolean retFlag = false; - List drops = new ArrayList(); - BlockPos cropPos = pos; - if (HarvestRegistry.getStemCrops().containsKey(blockStack)) - { - EnumFacing cropDir = blockStack.getState().getValue(BlockStem.FACING); - - if (cropDir != EnumFacing.UP) - { - cropPos = pos.offset(cropDir); - BlockStack probableCrop = BlockStack.getStackFromPos(world, cropPos); - BlockStack regCrop = HarvestRegistry.getStemCrops().get(blockStack); - - if ((regCrop.getMeta() == OreDictionary.WILDCARD_VALUE && regCrop.getBlock() == probableCrop.getBlock()) || regCrop.equals(probableCrop)) - { - drops = probableCrop.getBlock().getDrops(world, cropPos, probableCrop.getState(), 0); - world.destroyBlock(cropPos, false); - retFlag = true; - } - } - } - - if (!world.isRemote) - { - for (ItemStack drop : drops) - { - EntityItem item = new EntityItem(world, cropPos.getX(), cropPos.getY() + 0.5, cropPos.getZ(), drop); - world.spawnEntityInWorld(item); - } - } - - return retFlag; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java deleted file mode 100644 index 8bcdecf8..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.bloodmagic.ritual.harvest; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.iface.IHarvestHandler; -import WayofTime.bloodmagic.api.registry.HarvestRegistry; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -/** - * Harvest handler for crops that grow vertically such as Sugar Cane and Cactus.
- * Register a new crop for this handler with - * {@link HarvestRegistry#registerTallCrop(BlockStack)} - */ -public class HarvestHandlerTall implements IHarvestHandler -{ - public HarvestHandlerTall() - { - HarvestRegistry.registerTallCrop(new BlockStack(Blocks.REEDS)); - HarvestRegistry.registerTallCrop(new BlockStack(Blocks.CACTUS)); - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack) - { - boolean retFlag = false; - - List drops = new ArrayList(); - if (HarvestRegistry.getTallCrops().contains(blockStack)) - { - BlockStack up = BlockStack.getStackFromPos(world, pos.up()); - if (up.equals(blockStack)) - { - drops = up.getBlock().getDrops(world, pos.up(), up.getState(), 0); - world.destroyBlock(pos.up(), false); - retFlag = true; - } - } - - if (!world.isRemote) - { - for (ItemStack drop : drops) - { - EntityItem item = new EntityItem(world, pos.getX(), pos.getY() + 0.5, pos.getZ(), drop); - world.spawnEntityInWorld(item); - } - } - - return retFlag; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/package-info.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/package-info.java deleted file mode 100644 index f6c9453d..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.ritual.harvest; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualDay.java b/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualDay.java deleted file mode 100644 index 3e9859bb..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualDay.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.ritual.imperfect; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; - -public class ImperfectRitualDay extends ImperfectRitual -{ - public ImperfectRitualDay() - { - super("day", new BlockStack(Blocks.GOLD_BLOCK), 5000, true, "ritual." + Constants.Mod.MODID + ".imperfect.day"); - } - - @Override - public boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player) - { - - if (!imperfectRitualStone.getRitualWorld().isRemote) - imperfectRitualStone.getRitualWorld().setWorldTime((imperfectRitualStone.getRitualWorld().getWorldTime() / 24000) * 24000); - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualNight.java b/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualNight.java deleted file mode 100644 index f09168d1..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualNight.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.ritual.imperfect; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; - -public class ImperfectRitualNight extends ImperfectRitual -{ - public ImperfectRitualNight() - { - super("night", new BlockStack(Blocks.LAPIS_BLOCK), 100, true, "ritual." + Constants.Mod.MODID + ".imperfect.night"); - } - - @Override - public boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player) - { - - if (!imperfectRitualStone.getRitualWorld().isRemote) - imperfectRitualStone.getRitualWorld().setWorldTime((imperfectRitualStone.getRitualWorld().getWorldTime() / 24000) * 24000 + 13800); - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualRain.java b/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualRain.java deleted file mode 100644 index 2ff4f07c..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualRain.java +++ /dev/null @@ -1,33 +0,0 @@ -package WayofTime.bloodmagic.ritual.imperfect; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; - -public class ImperfectRitualRain extends ImperfectRitual -{ - public ImperfectRitualRain() - { - super("rain", new BlockStack(Blocks.WATER), 5000, true, "ritual." + Constants.Mod.MODID + ".imperfect.rain"); - } - - @Override - public boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player) - { - if (!imperfectRitualStone.getRitualWorld().isRemote) - { - imperfectRitualStone.getRitualWorld().getWorldInfo().setRaining(true); - } - - if (imperfectRitualStone.getRitualWorld().isRemote) - { - imperfectRitualStone.getRitualWorld().setRainStrength(1.0F); - imperfectRitualStone.getRitualWorld().setThunderStrength(1.0F); - } - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualResistance.java b/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualResistance.java deleted file mode 100644 index 9e897e8e..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualResistance.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.bloodmagic.ritual.imperfect; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.MobEffects; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -public class ImperfectRitualResistance extends ImperfectRitual -{ - public ImperfectRitualResistance() - { - super("resistance", new BlockStack(Blocks.BEDROCK), 5000, "ritual." + Constants.Mod.MODID + ".imperfect.resistance"); - } - - @Override - public boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player) - { - - player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 1200, 1)); - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualZombie.java b/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualZombie.java deleted file mode 100644 index 362fe1b8..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/ImperfectRitualZombie.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.ritual.imperfect; - -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.MobEffects; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -public class ImperfectRitualZombie extends ImperfectRitual -{ - public ImperfectRitualZombie() - { - super("zombie", new BlockStack(Blocks.COAL_BLOCK), 5000, "ritual." + Constants.Mod.MODID + ".imperfect.zombie"); - } - - @Override - public boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player) - { - EntityZombie zombie = new EntityZombie(imperfectRitualStone.getRitualWorld()); - zombie.setPosition(imperfectRitualStone.getRitualPos().getX() + 0.5, imperfectRitualStone.getRitualPos().getY() + 2.1, imperfectRitualStone.getRitualPos().getZ() + 0.5); - zombie.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 2000)); - zombie.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 20000, 7)); - zombie.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 20000, 3)); - - if (!imperfectRitualStone.getRitualWorld().isRemote) - imperfectRitualStone.getRitualWorld().spawnEntityInWorld(zombie); - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/package-info.java b/src/main/java/WayofTime/bloodmagic/ritual/imperfect/package-info.java deleted file mode 100644 index 9b848792..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/imperfect/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.ritual.imperfect; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/ritual/package-info.java b/src/main/java/WayofTime/bloodmagic/ritual/package-info.java deleted file mode 100644 index 9305015f..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.ritual; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/ritual/portal/LocationsHandler.java b/src/main/java/WayofTime/bloodmagic/ritual/portal/LocationsHandler.java deleted file mode 100644 index 18ee3ad0..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/portal/LocationsHandler.java +++ /dev/null @@ -1,133 +0,0 @@ -package WayofTime.bloodmagic.ritual.portal; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.teleport.PortalLocation; -import net.minecraftforge.common.DimensionManager; - -import java.io.*; -import java.util.ArrayList; -import java.util.HashMap; - -public class LocationsHandler implements Serializable -{ - - public static final long serialVersionUID = 10102001; - private static final String fileName = String.valueOf(DimensionManager.getCurrentSaveRootDirectory()) + "/" + Constants.Mod.MODID + "/PortalLocations.dat"; - private static HashMap> portals; - private static LocationsHandler locationsHandler; - - private LocationsHandler() - { - portals = new HashMap>(); - } - - public static LocationsHandler getLocationsHandler() - { - if (locationsHandler == null || loadFile() == null) - { - locationsHandler = new LocationsHandler(); - return locationsHandler; - } else - { - portals = loadFile(); - return locationsHandler; - } - } - - private static HashMap> loadFile() - { - HashMap> map; - File file = new File(fileName); - try - { - if (!file.exists()) - { - if (file.getParentFile().mkdir()) - { - if (file.createNewFile()) - { - BloodMagicAPI.getLogger().info("Creating " + fileName + " in " + String.valueOf(DimensionManager.getCurrentSaveRootDirectory())); - } - } else if (file.createNewFile()) - { - BloodMagicAPI.getLogger().info("Creating " + fileName + " in " + String.valueOf(DimensionManager.getCurrentSaveRootDirectory())); - } - } - FileInputStream fileIn = new FileInputStream(file); - ObjectInputStream in = new ObjectInputStream(fileIn); - map = (HashMap>) in.readObject(); - in.close(); - fileIn.close(); - return map; - } catch (IOException e) - { - return null; - } catch (ClassNotFoundException e) - { - BloodMagicAPI.getLogger().error(String.valueOf(file) + " was not found in " + String.valueOf(DimensionManager.getCurrentSaveRootDirectory())); - return null; - } - } - - private static void updateFile(String file, HashMap> object) - { - try - { - FileOutputStream fos = new FileOutputStream(file); - ObjectOutputStream oos = new ObjectOutputStream(fos); - oos.writeObject(object); - oos.close(); - } catch (IOException e) - { - e.printStackTrace(); - } - } - - public boolean addLocation(String name, PortalLocation location) - { - ArrayList portalLocations = portals.get(name); - if (portalLocations == null) - { - portals.put(name, new ArrayList()); - updateFile(fileName, portals); - } - if (!portals.get(name).isEmpty() && portals.get(name).size() >= 2) - { - BloodMagicAPI.getLogger().info("Location " + name + " already exists."); - updateFile(fileName, portals); - return false; - } else - { - portals.get(name).add(location); - BloodMagicAPI.getLogger().info("Adding " + name); - updateFile(fileName, portals); - return true; - } - } - - public boolean removeLocation(String name, PortalLocation location) - { - if (portals.get(name) != null && !portals.get(name).isEmpty()) - { - if (portals.get(name).contains(location)) - { - portals.get(name).remove(location); - BloodMagicAPI.getLogger().info("Removing " + name); - updateFile(fileName, portals); - return true; - } else - { - BloodMagicAPI.getLogger().info("No location matching " + name); - updateFile(fileName, portals); - return false; - } - } - return false; - } - - public ArrayList getLinkedLocations(String name) - { - return portals.get(name); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/ritual/portal/Teleports.java b/src/main/java/WayofTime/bloodmagic/ritual/portal/Teleports.java deleted file mode 100644 index e3c035d1..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/portal/Teleports.java +++ /dev/null @@ -1,206 +0,0 @@ -package WayofTime.bloodmagic.ritual.portal; - -import WayofTime.bloodmagic.api.event.TeleposeEvent; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.teleport.Teleport; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import lombok.Getter; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.SoundEvents; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.SPacketUpdateHealth; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.FMLCommonHandler; - -public class Teleports -{ - - public static class TeleportSameDim extends Teleport - { - private final boolean teleposer; - - public TeleportSameDim(int x, int y, int z, Entity entity, String networkToDrain, boolean teleposer) - { - this(new BlockPos(x, y, z), entity, networkToDrain, teleposer); - } - - public TeleportSameDim(BlockPos blockPos, Entity entity, String networkToDrain, boolean teleposer) - { - super(blockPos, entity, networkToDrain); - this.teleposer = teleposer; - } - - @Override - public void teleport() - { - if (entity != null) - { - if (entity.timeUntilPortal <= 0) - { - if (entity instanceof EntityPlayer) - { - SoulNetwork network = NetworkHelper.getSoulNetwork(networkToDrain); - if (network.getCurrentEssence() < getTeleportCost()) - return; - - if (teleposer) - if (MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent(entity, entity.worldObj, entity.getPosition(), entity.worldObj, new BlockPos(x, y, z)))) - return; - - network.syphon(getTeleportCost()); - - EntityPlayerMP player = (EntityPlayerMP) entity; - - player.setPositionAndUpdate(x + 0.5, y + 0.5, z + 0.5); - player.worldObj.updateEntityWithOptionalForce(player, false); - player.connection.sendPacket(new SPacketUpdateHealth(player.getHealth(), player.getFoodStats().getFoodLevel(), player.getFoodStats().getSaturationLevel())); - player.timeUntilPortal = 150; - - player.worldObj.playSound(x, y, z, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false); - if (teleposer) - MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent.Post(entity, entity.worldObj, entity.getPosition(), entity.worldObj, new BlockPos(x, y, z))); - } else - { - SoulNetwork network = NetworkHelper.getSoulNetwork(networkToDrain); - if (network.getCurrentEssence() < (getTeleportCost() / 10)) - return; - - if (teleposer) - if (MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent(entity, entity.worldObj, entity.getPosition(), entity.worldObj, new BlockPos(x, y, z)))) - return; - - network.syphon(getTeleportCost() / 10); - - WorldServer world = (WorldServer) entity.worldObj; - - entity.setPosition(x + 0.5, y + 0.5, z + 0.5); - entity.timeUntilPortal = 150; - world.resetUpdateEntityTick(); - - entity.worldObj.playSound(x, y, z, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false); - if (teleposer) - MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent.Post(entity, entity.worldObj, entity.getPosition(), entity.worldObj, new BlockPos(x, y, z))); - } - } - } - } - - @Override - public int getTeleportCost() - { - return 1000; - } - } - - @Getter - public static class TeleportToDim extends Teleport - { - private World oldWorld; - private int newWorldID; - private boolean teleposer; - - public TeleportToDim(int x, int y, int z, Entity entity, String networkToDrain, World oldWorld, int newWorld, boolean teleposer) - { - this(new BlockPos(x, y, z), entity, networkToDrain, oldWorld, newWorld, teleposer); - } - - public TeleportToDim(BlockPos blockPos, Entity entity, String networkToDrain, World oldWorld, int newWorldID, boolean teleposer) - { - super(blockPos, entity, networkToDrain); - this.oldWorld = oldWorld; - this.newWorldID = newWorldID; - this.teleposer = teleposer; - } - - @Override - public void teleport() - { - if (entity != null) - { - if (entity.timeUntilPortal <= 0) - { - MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); - WorldServer oldWorldServer = server.worldServerForDimension(entity.dimension); - WorldServer newWorldServer = server.worldServerForDimension(newWorldID); - - if (entity instanceof EntityPlayer) - { - EntityPlayerMP player = (EntityPlayerMP) entity; - - if (!player.worldObj.isRemote) - { - SoulNetwork network = NetworkHelper.getSoulNetwork(networkToDrain); - if (network.getCurrentEssence() < getTeleportCost()) - return; - - if (teleposer) - if (MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent(entity, entity.worldObj, entity.getPosition(), newWorldServer, new BlockPos(x, y, z)))) - return; - - network.syphon(getTeleportCost()); - - player.changeDimension(newWorldID); //TODO: UNTESTED -// server.getConfigurationManager().transferPlayerToDimension(player, newWorldID, new TeleporterBloodMagic(newWorldServer)); - player.setPositionAndUpdate(x + 0.5, y + 0.5, z + 0.5); - player.worldObj.updateEntityWithOptionalForce(player, false); - player.connection.sendPacket(new SPacketUpdateHealth(player.getHealth(), player.getFoodStats().getFoodLevel(), player.getFoodStats().getSaturationLevel())); - if (teleposer) - MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent.Post(entity, entity.worldObj, entity.getPosition(), newWorldServer, new BlockPos(x, y, z))); - } - - } else if (!entity.worldObj.isRemote) - { - SoulNetwork network = NetworkHelper.getSoulNetwork(networkToDrain); - if (network.getCurrentEssence() < (getTeleportCost() / 10)) - return; - - if (teleposer) - if (MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent(entity, entity.worldObj, entity.getPosition(), newWorldServer, new BlockPos(x, y, z)))) - return; - - network.syphon(getTeleportCost() / 10); - - NBTTagCompound tag = new NBTTagCompound(); - - entity.writeToNBTOptional(tag); - entity.setDead(); - oldWorld.playSound(entity.posX, entity.posY, entity.posZ, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false); - - Entity teleportedEntity = EntityList.createEntityFromNBT(tag, newWorldServer); - if (teleportedEntity != null) - { - teleportedEntity.setLocationAndAngles(x + 0.5, y + 0.5, z + 0.5, entity.rotationYaw, entity.rotationPitch); - teleportedEntity.forceSpawn = true; - newWorldServer.spawnEntityInWorld(teleportedEntity); - teleportedEntity.setWorld(newWorldServer); - teleportedEntity.timeUntilPortal = teleportedEntity instanceof EntityPlayer ? 150 : 20; - } - - oldWorldServer.resetUpdateEntityTick(); - newWorldServer.resetUpdateEntityTick(); - if (teleposer) - MinecraftForge.EVENT_BUS.post(new TeleposeEvent.Ent.Post(entity, entity.worldObj, entity.getPosition(), newWorldServer, new BlockPos(x, y, z))); - } - entity.timeUntilPortal = entity instanceof EntityLiving ? 150 : 20; - newWorldServer.playSound(x, y, z, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false); - } - } - } - - @Override - public int getTeleportCost() - { - return 10000; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/ritual/portal/package-info.java b/src/main/java/WayofTime/bloodmagic/ritual/portal/package-info.java deleted file mode 100644 index f64d991e..00000000 --- a/src/main/java/WayofTime/bloodmagic/ritual/portal/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.ritual.portal; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java deleted file mode 100644 index 5e220868..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java +++ /dev/null @@ -1,137 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.util.Utils; - -/** - * This particular implementation of IItemFilter allows any item to be drained - * from or inputed to the connected inventory. Every stack is accepted here! - * We're basically Olive Gardens. - * - * @author WayofTime - * - */ -public class DefaultItemFilter implements IItemFilter -{ - protected TileEntity accessedTile; - protected IItemHandler itemHandler; - - /** - * Initializes the filter so that it knows what it wants to fulfill. - * - * @param filteredList - * - The list of ItemStacks that the filter is set to. - * @param inventory - * - The inventory that is being accessed. This inventory is either - * being pulled from or pushed to. - * @param side - * - The side that the inventory is being accessed from. Used for - * pulling/pushing from/to the inventory. - * @param isFilterOutput - * - Tells the filter what actions to expect. If true, it should be - * initialized as an output filter. If false, it should be - * initialized as an input filter. - */ - @Override - public void initializeFilter(List filteredList, TileEntity tile, IItemHandler itemHandler, boolean isFilterOutput) - { - this.accessedTile = tile; - this.itemHandler = itemHandler; - } - - /** - * This method is only called when the output inventory this filter is - * managing receives an ItemStack. Should only really be called by the Input - * filter via it's transfer method. - * - * @param inputStack - * - The stack to transfer - * - * @return - The remainder of the stack after it has been absorbed into the - * inventory. - */ - @Override - public ItemStack transferStackThroughOutputFilter(ItemStack inputStack) - { - int allowedAmount = inputStack.stackSize; //This is done to make the migration to a maximum amount transfered a lot easier - - if (allowedAmount <= 0) - { - return inputStack; - } - - ItemStack testStack = inputStack.copy(); - testStack.stackSize = allowedAmount; - ItemStack remainderStack = Utils.insertStackIntoTile(testStack, itemHandler); - - int changeAmount = allowedAmount - (remainderStack == null ? 0 : remainderStack.stackSize); - testStack = inputStack.copy(); - testStack.stackSize -= changeAmount; - - World world = accessedTile.getWorld(); - BlockPos pos = accessedTile.getPos(); - world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 3); - - return testStack; - } - - /** - * This method is only called on an input filter to transfer ItemStacks from - * the input inventory to the output inventory. - */ - @Override - public int transferThroughInputFilter(IItemFilter outputFilter, int maxTransfer) - { - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - ItemStack inputStack = itemHandler.getStackInSlot(slot); - if (inputStack == null || itemHandler.extractItem(slot, inputStack.stackSize, true) == null)//(accessedInventory instanceof ISidedInventory && !((ISidedInventory) accessedInventory).canExtractItem(slot, inputStack, accessedSide))) - { - continue; - } - - int allowedAmount = Math.min(itemHandler.extractItem(slot, inputStack.stackSize, true).stackSize, maxTransfer); - - ItemStack testStack = inputStack.copy(); - testStack.stackSize = allowedAmount; - ItemStack remainderStack = outputFilter.transferStackThroughOutputFilter(testStack); - int changeAmount = allowedAmount - (remainderStack == null ? 0 : remainderStack.stackSize); - - if (remainderStack != null && remainderStack.stackSize == allowedAmount) - { - //Nothing has changed. Moving on! - continue; - } - - maxTransfer -= changeAmount; - - itemHandler.extractItem(slot, changeAmount, false); - - World world = accessedTile.getWorld(); - BlockPos pos = accessedTile.getPos(); - world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 3); - - return changeAmount; - } - - return 0; - } - - @Override - public boolean doesStackMatchFilter(ItemStack testStack) - { - return true; - } - - @Override - public boolean doStacksMatch(ItemStack filterStack, ItemStack testStack) - { - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IInputItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/routing/IInputItemRoutingNode.java deleted file mode 100644 index b61db904..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IInputItemRoutingNode.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.util.EnumFacing; - -public interface IInputItemRoutingNode extends IItemRoutingNode -{ - boolean isInput(EnumFacing side); - - IItemFilter getInputFilterForSide(EnumFacing side); -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java deleted file mode 100644 index 872057ab..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.items.IItemHandler; - -public interface IItemFilter -{ - void initializeFilter(List filteredList, TileEntity tile, IItemHandler itemHandler, boolean isFilterOutput); - - /** - * This method is only called when the output inventory this filter is - * managing receives an ItemStack. Should only really be called by the Input - * filter via it's transfer method. - * - * @param inputStack - * - The stack to filter - * - * @return - The remainder of the stack after it has been absorbed into the - * inventory. - */ - ItemStack transferStackThroughOutputFilter(ItemStack inputStack); - - /** - * This method is only called on an input filter to transfer ItemStacks from - * the input inventory to the output inventory. - */ - int transferThroughInputFilter(IItemFilter outputFilter, int maxTransfer); - - boolean doesStackMatchFilter(ItemStack testStack); - - boolean doStacksMatch(ItemStack filterStack, ItemStack testStack); -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/routing/IItemRoutingNode.java deleted file mode 100644 index ed56109b..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IItemRoutingNode.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.util.EnumFacing; - -public interface IItemRoutingNode extends IRoutingNode -{ - boolean isInventoryConnectedToSide(EnumFacing side); - - int getPriority(EnumFacing side); -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IMasterRoutingNode.java b/src/main/java/WayofTime/bloodmagic/routing/IMasterRoutingNode.java deleted file mode 100644 index d3f825b1..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IMasterRoutingNode.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.util.math.BlockPos; - -import java.util.List; - -public interface IMasterRoutingNode extends IRoutingNode -{ - boolean isConnected(List path, BlockPos nodePos); - - void addNodeToList(IRoutingNode node); - - void addConnections(BlockPos pos, List connectionList); - - void addConnection(BlockPos pos1, BlockPos pos2); - - void removeConnection(BlockPos pos1, BlockPos pos2); -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IOutputItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/routing/IOutputItemRoutingNode.java deleted file mode 100644 index 091cebd2..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IOutputItemRoutingNode.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.util.EnumFacing; - -public interface IOutputItemRoutingNode extends IItemRoutingNode -{ - boolean isOutput(EnumFacing side); - - IItemFilter getOutputFilterForSide(EnumFacing side); -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IRoutingNode.java b/src/main/java/WayofTime/bloodmagic/routing/IRoutingNode.java deleted file mode 100644 index 4fe9e038..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IRoutingNode.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.List; - -public interface IRoutingNode -{ - void connectMasterToRemainingNode(World world, List alreadyChecked, IMasterRoutingNode master); - - BlockPos getBlockPos(); - - List getConnected(); - - BlockPos getMasterPos(); - - boolean isConnectionEnabled(BlockPos testPos); - - boolean isMaster(IMasterRoutingNode master); - - void addConnection(BlockPos pos1); - - void removeConnection(BlockPos pos1); - - void removeAllConnections(); -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/IgnoreNBTItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/IgnoreNBTItemFilter.java deleted file mode 100644 index cc0a9288..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/IgnoreNBTItemFilter.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.item.ItemStack; - -public class IgnoreNBTItemFilter extends TestItemFilter -{ - @Override - public boolean doesStackMatchFilter(ItemStack testStack) - { - for (ItemStack filterStack : requestList) - { - if (doStacksMatch(filterStack, testStack)) - { - return true; - } - } - - return false; - } - - @Override - public boolean doStacksMatch(ItemStack filterStack, ItemStack testStack) - { - return filterStack != null && testStack != null && filterStack.getItem() == testStack.getItem() && filterStack.getMetadata() == testStack.getMetadata(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/ModIdItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/ModIdItemFilter.java deleted file mode 100644 index 5d7157e4..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/ModIdItemFilter.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.common.registry.GameData; - -public class ModIdItemFilter extends TestItemFilter -{ - @Override - public boolean doStacksMatch(ItemStack filterStack, ItemStack testStack) - { - if (filterStack != null && testStack != null && filterStack.getItem() != null && testStack.getItem() != null) - { - String keyId = getModID(filterStack.getItem()); - String checkedId = getModID(testStack.getItem()); - return keyId.equals(checkedId); - } - - return false; - } - - public String getModID(Item item) - { - ResourceLocation resource = ForgeRegistries.ITEMS.getKey(item); - return resource.getResourceDomain(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/NodeHelper.java b/src/main/java/WayofTime/bloodmagic/routing/NodeHelper.java deleted file mode 100644 index 82bbc283..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/NodeHelper.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class NodeHelper -{ - public static boolean isNodeConnectionEnabled(World world, IRoutingNode node, BlockPos testPos) - { - if (!node.isConnectionEnabled(testPos)) - { - return false; - } - TileEntity tile = world.getTileEntity(testPos); - if (!(tile instanceof IRoutingNode)) - { - return false; - } - - IRoutingNode testNode = (IRoutingNode) tile; - - return testNode.isConnectionEnabled(node.getBlockPos()); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/OreDictItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/OreDictItemFilter.java deleted file mode 100644 index 2cde4909..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/OreDictItemFilter.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class OreDictItemFilter extends TestItemFilter -{ - @Override - public boolean doesStackMatchFilter(ItemStack testStack) - { - for (ItemStack filterStack : requestList) - { - if (doStacksMatch(filterStack, testStack)) - { - return true; - } - } - - return false; - } - - @Override - public boolean doStacksMatch(ItemStack filterStack, ItemStack testStack) - { - int[] filterIds = OreDictionary.getOreIDs(filterStack); - int[] testIds = OreDictionary.getOreIDs(testStack); - - if (filterIds.length <= 0 || testIds.length <= 0) - { - return false; - } - - for (int filterId : filterIds) - { - for (int testId : testIds) - { - if (filterId == testId) - { - return true; - } - } - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java deleted file mode 100644 index f0905745..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java +++ /dev/null @@ -1,267 +0,0 @@ -package WayofTime.bloodmagic.routing; - -import java.util.Iterator; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.util.Utils; - -/** - * This particular implementation of IItemFilter checks to make sure that a) as - * an output filter it will fill until the requested amount and b) as an input - * filter it will only syphon until the requested amount. - * - * @author WayofTime - * - */ -public class TestItemFilter implements IItemFilter -{ - /* - * This list acts as the way the filter keeps track of its contents. For the - * case of an output filter, it holds a list of ItemStacks that needs to be - * inserted in the inventory to finish its request. For the case of an input - * filter, it keeps track of how many can be removed. - */ - protected List requestList; - protected TileEntity accessedTile; - protected IItemHandler itemHandler; - - /** - * Initializes the filter so that it knows what it wants to fulfill. - * - * @param filteredList - * - The list of ItemStacks that the filter is set to. - * @param tile - * - The inventory that is being accessed. This inventory is either - * being pulled from or pushed to. - * @param itemHandler - * - The item handler - * @param side - * - The side that the inventory is being accessed from. Used for - * pulling/pushing from/to the inventory. - * @param isFilterOutput - * - Tells the filter what actions to expect. If true, it should be - * initialized as an output filter. If false, it should be - * initialized as an input filter. - */ - @Override - public void initializeFilter(List filteredList, TileEntity tile, IItemHandler itemHandler, boolean isFilterOutput) - { - this.accessedTile = tile; - this.itemHandler = itemHandler; - if (isFilterOutput) - { - requestList = filteredList; - - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - ItemStack checkedStack = itemHandler.getStackInSlot(slot); - if (checkedStack == null) - { - continue; - } - - int stackSize = checkedStack.stackSize; - - for (ItemStack filterStack : requestList) - { - if (filterStack.stackSize == 0) - { - continue; - } - - if (doStacksMatch(filterStack, checkedStack)) - { - filterStack.stackSize = Math.max(filterStack.stackSize - stackSize, 0); - } - } - } - } else - { - requestList = filteredList; - for (ItemStack filterStack : requestList) - { - filterStack.stackSize *= -1; //Invert the stack size so that - } - - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - ItemStack checkedStack = itemHandler.getStackInSlot(slot); - if (checkedStack == null) - { - continue; - } - - int stackSize = checkedStack.stackSize; - - for (ItemStack filterStack : filteredList) - { - if (doStacksMatch(filterStack, checkedStack)) - { - filterStack.stackSize += stackSize; - } - } - } - } - - Iterator iterator = requestList.iterator(); - while (iterator.hasNext()) - { - ItemStack filterStack = iterator.next(); - if (filterStack.stackSize <= 0) - { - iterator.remove(); - } - } - } - - /** - * This method is only called when the output inventory this filter is - * managing receives an ItemStack. Should only really be called by the Input - * filter via it's transfer method. - * - * @param inputStack - * - The stack to transfer - * @return - The remainder of the stack after it has been absorbed into the - * inventory. - */ - @Override - public ItemStack transferStackThroughOutputFilter(ItemStack inputStack) - { - int allowedAmount = 0; - for (ItemStack filterStack : requestList) - { - if (doStacksMatch(filterStack, inputStack)) - { - allowedAmount = Math.min(filterStack.stackSize, inputStack.stackSize); - break; - } - } - - if (allowedAmount <= 0) - { - return inputStack; - } - - ItemStack testStack = inputStack.copy(); - testStack.stackSize = allowedAmount; - ItemStack remainderStack = Utils.insertStackIntoTile(testStack, itemHandler); - - int changeAmount = allowedAmount - (remainderStack == null ? 0 : remainderStack.stackSize); - testStack = inputStack.copy(); - testStack.stackSize -= changeAmount; - - Iterator itr = requestList.iterator(); - while (itr.hasNext()) - { - ItemStack filterStack = itr.next(); - if (doStacksMatch(filterStack, inputStack)) - { - filterStack.stackSize -= changeAmount; - if (filterStack.stackSize <= 0) - { - itr.remove(); - } - } - } - - World world = accessedTile.getWorld(); - BlockPos pos = accessedTile.getPos(); - world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 3); - - return testStack; - } - - /** - * This method is only called on an input filter to transfer ItemStacks from - * the input inventory to the output inventory. - */ - @Override - public int transferThroughInputFilter(IItemFilter outputFilter, int maxTransfer) - { - for (int slot = 0; slot < itemHandler.getSlots(); slot++) - { - ItemStack inputStack = itemHandler.getStackInSlot(slot); - if (inputStack == null || itemHandler.extractItem(slot, inputStack.stackSize, true) == null)//(accessedInventory instanceof ISidedInventory && !((ISidedInventory) accessedInventory).canExtractItem(slot, inputStack, accessedSide))) - { - continue; - } - - int allowedAmount = 0; - for (ItemStack filterStack : requestList) - { - if (doStacksMatch(filterStack, inputStack)) - { - allowedAmount = Math.min(maxTransfer, Math.min(filterStack.stackSize, itemHandler.extractItem(slot, inputStack.stackSize, true).stackSize)); - break; - } - } - - if (allowedAmount <= 0) - { - continue; - } - - ItemStack testStack = inputStack.copy(); - testStack.stackSize = allowedAmount; - ItemStack remainderStack = outputFilter.transferStackThroughOutputFilter(testStack); - int changeAmount = allowedAmount - (remainderStack == null ? 0 : remainderStack.stackSize); - - if (remainderStack != null && remainderStack.stackSize == allowedAmount) - { - //Nothing has changed. Moving on! - continue; - } - - maxTransfer -= changeAmount; - - itemHandler.extractItem(slot, changeAmount, false); - - Iterator itr = requestList.iterator(); - while (itr.hasNext()) - { - ItemStack filterStack = itr.next(); - if (doStacksMatch(filterStack, inputStack)) - { - filterStack.stackSize -= changeAmount; - if (filterStack.stackSize <= 0) - { - itr.remove(); - } - } - } - - World world = accessedTile.getWorld(); - BlockPos pos = accessedTile.getPos(); - world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 3); - - return changeAmount; - } - - return 0; - } - - @Override - public boolean doesStackMatchFilter(ItemStack testStack) - { - for (ItemStack filterStack : requestList) - { - if (doStacksMatch(filterStack, testStack)) - { - return true; - } - } - - return false; - } - - @Override - public boolean doStacksMatch(ItemStack filterStack, ItemStack testStack) - { - return Utils.canCombine(filterStack, testStack); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/routing/package-info.java b/src/main/java/WayofTime/bloodmagic/routing/package-info.java deleted file mode 100644 index 0271d921..00000000 --- a/src/main/java/WayofTime/bloodmagic/routing/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.routing; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/structures/BuildTestStructure.java b/src/main/java/WayofTime/bloodmagic/structures/BuildTestStructure.java deleted file mode 100644 index 5618a689..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/BuildTestStructure.java +++ /dev/null @@ -1,60 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.Random; - -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.block.Block; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Mirror; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.ChunkPos; -import net.minecraft.world.WorldServer; -import net.minecraft.world.gen.structure.template.PlacementSettings; -import net.minecraft.world.gen.structure.template.Template; -import net.minecraft.world.gen.structure.template.TemplateManager; - -public class BuildTestStructure -{ - public boolean placeStructureAtPosition(Random rand, Rotation baseRotation, WorldServer world, BlockPos pos, int iteration) - { - if (pos == null) - return false; - - MinecraftServer minecraftserver = world.getMinecraftServer(); - TemplateManager templatemanager = world.getStructureTemplateManager(); - - ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "Corridor1"); - Template template = templatemanager.getTemplate(minecraftserver, resource); - - if (template == null) - { - System.out.println("Invalid template for location: " + resource); - return false; - } - - PlacementSettings settings = new PlacementSettings(); - settings.setMirror(Mirror.NONE); - - Rotation rot; - - rot = baseRotation; - if (rot == null) - rot = Rotation.NONE; - - settings.setRotation(rot); - settings.setIgnoreEntities(true); - settings.setChunk((ChunkPos) null); - settings.setReplacedBlock((Block) null); - settings.setIgnoreStructureBlock(false); - -// settings.func_189946_a(MathHelper.clamp_float(schema.integrity, 0.0F, 1.0F)); - - BlockPos offset = Template.transformedBlockPos(settings, new BlockPos(0, 0, 0)); - BlockPos finalPos = pos.add(offset); - template.addBlocksToWorldChunk(world, finalPos, settings); - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/Dungeon.java b/src/main/java/WayofTime/bloodmagic/structures/Dungeon.java deleted file mode 100644 index 0d640d3c..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/Dungeon.java +++ /dev/null @@ -1,185 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.ChunkPos; -import net.minecraft.world.WorldServer; -import net.minecraft.world.gen.structure.template.PlacementSettings; - -import org.apache.commons.lang3.tuple.Pair; - -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; - -public class Dungeon -{ - public static boolean placeStructureAtPosition(Random rand, WorldServer world, BlockPos pos) - { - long startTime = System.nanoTime(); - - Map> availableDoorMap = new HashMap>(); //Map of doors. The EnumFacing indicates what way this door faces. - List descriptorList = new ArrayList(); - Map> roomMap = new HashMap>(); // Placement positions in terms of actual positions - - PlacementSettings settings = new PlacementSettings(); - Mirror mir = Mirror.NONE; - - settings.setMirror(mir); - - Rotation rot = Rotation.NONE; - - settings.setRotation(rot); - settings.setIgnoreEntities(true); - settings.setChunk((ChunkPos) null); - settings.setReplacedBlock((Block) null); - settings.setIgnoreStructureBlock(false); - - DungeonRoom room = getRandomRoom(rand); - roomMap.put(pos, Pair.of(room, settings.copy())); - descriptorList.addAll(room.getAreaDescriptors(settings, pos)); - for (EnumFacing facing : EnumFacing.VALUES) - { - if (availableDoorMap.containsKey(facing)) - { - List doorList = availableDoorMap.get(facing); - doorList.addAll(room.getDoorOffsetsForFacing(settings, facing, pos)); - } else - { - List doorList = room.getDoorOffsetsForFacing(settings, facing, pos); - availableDoorMap.put(facing, doorList); - } - } - - //Initial AreaDescriptors and door positions are initialized. Time for fun! - for (int i = 0; i < 100; i++) - { - List facingList = new ArrayList(); - for (Entry> entry : availableDoorMap.entrySet()) - { - if (entry.getValue() != null && !entry.getValue().isEmpty()) - { - facingList.add(entry.getKey()); - } - } - - Collections.shuffle(facingList); //Shuffle the list so that it is random what is chosen - - Pair removedDoor1 = null; - Pair removedDoor2 = null; - BlockPos roomLocation = null; - - roomPlacement: for (EnumFacing doorFacing : facingList) - { - EnumFacing oppositeDoorFacing = doorFacing.getOpposite(); - List availableDoorList = availableDoorMap.get(doorFacing); //May need to copy here - Collections.shuffle(availableDoorList); - - settings.setRotation(Rotation.values()[rand.nextInt(Rotation.values().length)]); //Same for the Mirror - DungeonRoom testingRoom = getRandomRoom(rand); - - List otherDoorList = testingRoom.getDoorOffsetsForFacing(settings, oppositeDoorFacing, BlockPos.ORIGIN); - if (otherDoorList != null && !otherDoorList.isEmpty()) - { - //See if one of these doors works. - Collections.shuffle(otherDoorList); - BlockPos testDoor = otherDoorList.get(0); - testDoor: for (BlockPos availableDoor : availableDoorList) - { - //TODO: Test if it fits, then add the doors to the list. - roomLocation = availableDoor.subtract(testDoor).add(doorFacing.getDirectionVec()); - - List descriptors = testingRoom.getAreaDescriptors(settings, roomLocation); - for (AreaDescriptor testDesc : descriptors) - { - for (AreaDescriptor currentDesc : descriptorList) - { - if (testDesc.intersects(currentDesc)) - { - break testDoor; - } - } - } - - roomMap.put(roomLocation, Pair.of(testingRoom, settings.copy())); - descriptorList.addAll(descriptors); - removedDoor1 = Pair.of(doorFacing, availableDoor); - removedDoor2 = Pair.of(oppositeDoorFacing, testDoor.add(roomLocation)); - - room = testingRoom; - - break roomPlacement; - } - } - -// Collections.shuffle(otherDoorList); - } - - if (removedDoor1 != null) - { - for (EnumFacing facing : EnumFacing.VALUES) - { - if (availableDoorMap.containsKey(facing)) - { - List doorList = availableDoorMap.get(facing); - doorList.addAll(room.getDoorOffsetsForFacing(settings, facing, roomLocation)); - } else - { - List doorList = room.getDoorOffsetsForFacing(settings, facing, roomLocation); - availableDoorMap.put(facing, doorList); - } - } - - EnumFacing face = removedDoor1.getKey(); - if (availableDoorMap.containsKey(face)) - { - availableDoorMap.get(face).remove(removedDoor1); - } - - removedDoor1 = null; - } - - if (removedDoor2 != null) - { - EnumFacing face = removedDoor2.getKey(); - if (availableDoorMap.containsKey(face)) - { - availableDoorMap.get(face).remove(removedDoor2); - } - - removedDoor2 = null; - } - } - - long endTime = System.nanoTime(); - - long duration = (endTime - startTime); //divide by 1000000 to get milliseconds. - System.out.println("Duration: " + duration + "(ns), " + duration / 1000000 + "(ms)"); - - //Building what I've got - for (Entry> entry : roomMap.entrySet()) - { - BlockPos placementPos = entry.getKey(); - DungeonRoom placedRoom = entry.getValue().getKey(); - PlacementSettings placementSettings = entry.getValue().getValue(); - - placedRoom.placeStructureAtPosition(rand, placementSettings, world, placementPos); - } - - return false; - } - - public static DungeonRoom getRandomRoom(Random rand) - { - return DungeonRoomRegistry.getRandomDungeonRoom(rand); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/DungeonRoom.java b/src/main/java/WayofTime/bloodmagic/structures/DungeonRoom.java deleted file mode 100644 index ed72b577..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/DungeonRoom.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; - -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldServer; -import net.minecraft.world.gen.structure.template.PlacementSettings; -import net.minecraft.world.gen.structure.template.Template; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; - -public class DungeonRoom -{ - public int dungeonWeight = 1; - public Map structureMap = new HashMap(); - - public Map> doorMap = new HashMap>(); //Map of doors. The EnumFacing indicates what way this door faces. - public List descriptorList = new ArrayList(); - - public DungeonRoom(Map structureMap, Map> doorMap, List descriptorList) - { - this.structureMap = structureMap; - this.doorMap = doorMap; - this.descriptorList = descriptorList; - } - - public List getAreaDescriptors(PlacementSettings settings, BlockPos offset) - { - List newList = new ArrayList(); - - for (AreaDescriptor desc : descriptorList) - { - newList.add(desc.rotateDescriptor(settings).offset(offset)); - } - - return newList; - } - - public List getDoorOffsetsForFacing(PlacementSettings settings, EnumFacing facing, BlockPos offset) - { - List offsetList = new ArrayList(); - - EnumFacing originalFacing = DungeonUtil.reverseRotate(settings.getMirror(), settings.getRotation(), facing); - if (doorMap.containsKey(originalFacing)) - { - List doorList = doorMap.get(originalFacing); - for (BlockPos doorPos : doorList) - { - offsetList.add(Template.transformedBlockPos(settings, doorPos).add(offset)); - } - } - - return offsetList; - } - - public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, WorldServer world, BlockPos pos) - { - for (Entry entry : structureMap.entrySet()) - { - ResourceLocation location = new ResourceLocation(entry.getKey()); - DungeonStructure structure = new DungeonStructure(location); - BlockPos offsetPos = Template.transformedBlockPos(settings, entry.getValue()); - - structure.placeStructureAtPosition(rand, settings, world, pos.add(offsetPos)); - } - - return true; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/DungeonRoomLoader.java b/src/main/java/WayofTime/bloodmagic/structures/DungeonRoomLoader.java deleted file mode 100644 index 199a4763..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/DungeonRoomLoader.java +++ /dev/null @@ -1,99 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.Writer; -import java.net.URL; -import java.util.List; -import java.util.Random; - -import com.google.common.base.Charsets; -import com.google.common.io.Resources; -import com.google.common.reflect.TypeToken; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; - -import org.apache.commons.io.IOUtils; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.gson.Serializers; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -public class DungeonRoomLoader -{ - public static void saveDungeons() - { - for (DungeonRoom room : DungeonRoomRegistry.dungeonWeightMap.keySet()) - { - saveSingleDungeon(room); - } - } - - public static void saveSingleDungeon(DungeonRoom room) - { - String json = Serializers.GSON.toJson(room); - - Writer writer; - try - { - File file = new File("config/BloodMagic/schematics"); - file.mkdirs(); - - writer = new FileWriter("config/BloodMagic/schematics/" + new Random().nextInt() + ".json"); - writer.write(json); - writer.close(); - } catch (IOException e) - { - e.printStackTrace(); - } - } - - public static void loadDungeons() - { - try - { - URL schematicURL = DungeonRoomLoader.class.getResource(resLocToResourcePath(new ResourceLocation("bloodmagic:Schematics"))); - List schematics = Serializers.GSON.fromJson(Resources.toString(schematicURL, Charsets.UTF_8), new TypeToken>(){}.getType()); - for (String schematicKey : schematics) - { - ResourceLocation schematic = new ResourceLocation(schematicKey); - URL dungeonURL = DungeonRoomLoader.class.getResource(resLocToResourcePath(schematic)); - DungeonRoom dungeonRoom = Serializers.GSON.fromJson(Resources.toString(dungeonURL, Charsets.UTF_8), DungeonRoom.class); - DungeonRoomRegistry.registerDungeonRoom(dungeonRoom, Math.max(1, dungeonRoom.dungeonWeight)); - } - } catch (Exception e) - { - e.printStackTrace(); - } - } - - public static void test() - { - ResourceLocation id = new ResourceLocation(Constants.Mod.MODID, "testGson"); - String s = id.getResourceDomain(); - String s1 = id.getResourcePath(); - InputStream inputstream = null; - - try - { - inputstream = DungeonRoomLoader.class.getResourceAsStream("/assets/" + s + "/schematics/" + s1 + ".nbt"); -// this.readTemplateFromStream(s1, inputstream); - return; - } catch (Throwable var10) - { - - } finally - { - IOUtils.closeQuietly(inputstream); - } - } - - public static String resLocToResourcePath(ResourceLocation resourceLocation) - { - return "/assets/" + resourceLocation.getResourceDomain() + "/schematics/" + resourceLocation.getResourcePath() + ".json"; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/DungeonRoomRegistry.java b/src/main/java/WayofTime/bloodmagic/structures/DungeonRoomRegistry.java deleted file mode 100644 index bfd47d8b..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/DungeonRoomRegistry.java +++ /dev/null @@ -1,33 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; - -public class DungeonRoomRegistry -{ - public static Map dungeonWeightMap = new HashMap(); - private static int totalWeight = 0; - - public static void registerDungeonRoom(DungeonRoom room, int weight) - { - dungeonWeightMap.put(room, weight); - totalWeight += weight; - } - - public static DungeonRoom getRandomDungeonRoom(Random rand) - { - int wantedWeight = rand.nextInt(totalWeight); - for (Entry entry : dungeonWeightMap.entrySet()) - { - wantedWeight -= entry.getValue(); - if (wantedWeight < 0) - { - return entry.getKey(); - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/DungeonStructure.java b/src/main/java/WayofTime/bloodmagic/structures/DungeonStructure.java deleted file mode 100644 index 2c3aeeb8..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/DungeonStructure.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.Random; - -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldServer; -import net.minecraft.world.gen.structure.template.PlacementSettings; -import net.minecraft.world.gen.structure.template.Template; -import net.minecraft.world.gen.structure.template.TemplateManager; - -public class DungeonStructure -{ - public ResourceLocation resource; - - public DungeonStructure(ResourceLocation resource) - { - this.resource = resource; - } - - public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, WorldServer world, BlockPos pos) - { - if (pos == null) - return false; - - MinecraftServer minecraftserver = world.getMinecraftServer(); - TemplateManager templatemanager = world.getStructureTemplateManager(); - - Template template = templatemanager.getTemplate(minecraftserver, resource); - - if (template == null) - { - System.out.println("Invalid template for location: " + resource); - return false; - } - -// settings.func_189946_a(MathHelper.clamp_float(schema.integrity, 0.0F, 1.0F)); - - BlockPos offset = Template.transformedBlockPos(settings, new BlockPos(0, 0, 0)); - BlockPos finalPos = pos.add(offset); - template.addBlocksToWorldChunk(world, finalPos, settings); - - return true; - } - - public DungeonStructure copy() - { - return new DungeonStructure(resource); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/DungeonTester.java b/src/main/java/WayofTime/bloodmagic/structures/DungeonTester.java deleted file mode 100644 index 2cfcd8f3..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/DungeonTester.java +++ /dev/null @@ -1,85 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.Random; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldServer; - -public class DungeonTester -{ - public static void testDungeonGeneration(WorldServer world, BlockPos pos) - { - - } - - public static void testDungeonElementWithOutput(WorldServer world, BlockPos pos) - { - Dungeon.placeStructureAtPosition(new Random(), world, pos); -// ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "Corridor1"); -// -// DungeonStructure structure = new DungeonStructure(resource); -// Map structureMap = new HashMap(); -// structureMap.put(structure, new BlockPos(0, 0, 0)); -// -// Map> doorMap = new HashMap>(); -// List descriptorList = new ArrayList(); -// descriptorList.add(new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 5, 3, 7)); -// -// DungeonUtil.addRoom(doorMap, EnumFacing.NORTH, new BlockPos(3, 0, 0)); -// DungeonUtil.addRoom(doorMap, EnumFacing.SOUTH, new BlockPos(3, 0, 6)); -// DungeonUtil.addRoom(doorMap, EnumFacing.WEST, new BlockPos(0, 0, 3)); -// -// DungeonRoom room = new DungeonRoom(structureMap, doorMap, descriptorList); -// -// PlacementSettings settings = new PlacementSettings(); -// -// Mirror mir = Mirror.NONE; -// settings.setMirror(mir); -// -// Rotation rot = Rotation.NONE; -// settings.setRotation(rot); -// -// settings.setIgnoreEntities(true); -// settings.setChunk((ChunkPos) null); -// settings.setReplacedBlock((Block) null); -// settings.setIgnoreStructureBlock(false); -// -// int i = 0; -// -// for (Mirror mirror : Mirror.values()) -// { -// System.out.print("Mirror: " + mirror + '\n'); -// int j = 0; -// for (Rotation rotation : Rotation.values()) -// { -// System.out.print("Rotation: " + rot + '\n'); -// settings.setRotation(rotation); -// settings.setMirror(mirror); -// -// BlockPos offsetPos = pos.add(i * 16, 0, j * 16); -// room.placeStructureAtPosition(new Random(), settings, world, offsetPos); -// -//// List descriptors = structure.getAreaDescriptors(settings, offsetPos); -//// for (AreaDescriptor desc : descriptors) -//// { -//// List posList = desc.getContainedPositions(new BlockPos(0, 0, 0)); -//// for (BlockPos placePos : posList) -//// { -//// world.setBlockState(placePos, Blocks.REDSTONE_BLOCK.getDefaultState()); -//// } -//// } -// -//// for (EnumFacing facing : EnumFacing.HORIZONTALS) -//// { -//// List doorList = structure.getDoorOffsetsForFacing(settings, facing); -//// for (BlockPos doorPos : doorList) -//// { -//// System.out.print("Door at " + doorPos + " facing " + facing + '\n'); -//// } -//// } -// j++; -// } -// i++; -// } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/structures/DungeonUtil.java b/src/main/java/WayofTime/bloodmagic/structures/DungeonUtil.java deleted file mode 100644 index a6acf178..00000000 --- a/src/main/java/WayofTime/bloodmagic/structures/DungeonUtil.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.bloodmagic.structures; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import net.minecraft.util.EnumFacing; -import net.minecraft.util.Mirror; -import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.gen.structure.template.PlacementSettings; - -public class DungeonUtil -{ - public static EnumFacing rotate(Mirror mirror, Rotation rotation, EnumFacing original) - { - return rotation.rotate(mirror.mirror(original)); - } - - public static EnumFacing reverseRotate(Mirror mirror, Rotation rotation, EnumFacing original) - { - return mirror.mirror(getOppositeRotation(rotation).rotate(original)); - } - - public static EnumFacing getFacingForSettings(PlacementSettings settings, EnumFacing original) - { - return rotate(settings.getMirror(), settings.getRotation(), original); - } - - public static Rotation getOppositeRotation(Rotation rotation) - { - switch (rotation) - { - case CLOCKWISE_90: - return Rotation.COUNTERCLOCKWISE_90; - case COUNTERCLOCKWISE_90: - return Rotation.CLOCKWISE_90; - default: - return rotation; - } - } - - public static void addRoom(Map> doorMap, EnumFacing facing, BlockPos offsetPos) - { - if (doorMap.containsKey(facing)) - { - doorMap.get(facing).add(offsetPos); - } else - { - List doorList = new ArrayList(); - doorList.add(offsetPos); - doorMap.put(facing, doorList); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyArray.java b/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyArray.java deleted file mode 100644 index b9aade81..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyArray.java +++ /dev/null @@ -1,156 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyArrayEffect; -import WayofTime.bloodmagic.api.iface.IAlchemyArray; -import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; - -public class TileAlchemyArray extends TileInventory implements ITickable, IAlchemyArray -{ - public boolean isActive = false; - public int activeCounter = 0; - - @Getter - @Setter - public EnumFacing rotation = EnumFacing.HORIZONTALS[0];; - - private String key = "empty"; - private AlchemyArrayEffect arrayEffect; - - public TileAlchemyArray() - { - super(2, "alchemyArray"); - } - - public void onEntityCollidedWithBlock(IBlockState state, Entity entity) - { - if (arrayEffect != null) - { - arrayEffect.onEntityCollidedWithBlock(this, worldObj, pos, state, entity); - } - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - super.deserialize(tagCompound); - this.isActive = tagCompound.getBoolean("isActive"); - this.activeCounter = tagCompound.getInteger("activeCounter"); - this.key = tagCompound.getString("key"); - this.rotation = EnumFacing.HORIZONTALS[tagCompound.getInteger(Constants.NBT.DIRECTION)]; - - NBTTagCompound arrayTag = tagCompound.getCompoundTag("arrayTag"); - arrayEffect = AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(key); - if (arrayEffect != null) - { - arrayEffect.readFromNBT(arrayTag); - } - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - super.serialize(tagCompound); - tagCompound.setBoolean("isActive", isActive); - tagCompound.setInteger("activeCounter", activeCounter); - tagCompound.setString("key", "".equals(key) ? "empty" : key); - tagCompound.setInteger(Constants.NBT.DIRECTION, rotation.getHorizontalIndex()); - - NBTTagCompound arrayTag = new NBTTagCompound(); - if (arrayEffect != null) - { - arrayEffect.writeToNBT(arrayTag); - } - tagCompound.setTag("arrayTag", arrayTag); - - return tagCompound; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - @Override - public void update() - { - if (isActive && attemptCraft()) - { - activeCounter++; - } else - { - isActive = false; - activeCounter = 0; - arrayEffect = null; - key = "empty"; - } - } - - /** - * This occurs when the block is destroyed. - */ - @Override - public void dropItems() - { - super.dropItems(); - if (arrayEffect != null) - { - - } - } - - public boolean attemptCraft() - { - AlchemyArrayEffect effect = AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(this.getStackInSlot(0), this.getStackInSlot(1)); - if (effect != null) - { - if (arrayEffect == null) - { - arrayEffect = effect; - key = effect.getKey(); - } else - { - String effectKey = effect.getKey(); - if (effectKey.equals(key)) - { - //Good! Moving on. - } else - { - //Something has changed, therefore we have to move our stuffs. - //TODO: Add an AlchemyArrayEffect.onBreak(); ? - arrayEffect = effect; - key = effect.getKey(); - } - } - } else - { - return false; - } - - if (arrayEffect != null) - { - isActive = true; - - if (arrayEffect.update(this, this.activeCounter)) - { - this.decrStackSize(0, 1); - this.decrStackSize(1, 1); - this.worldObj.setBlockToAir(getPos()); - } - - return true; - } - - return false; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java b/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java deleted file mode 100644 index 2e1c3d1a..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java +++ /dev/null @@ -1,439 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import java.util.ArrayList; -import java.util.List; - -import lombok.Getter; -import net.minecraft.block.state.IBlockState; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.BlockPos; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.wrapper.SidedInvWrapper; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe; -import WayofTime.bloodmagic.api.registry.AlchemyTableRecipeRegistry; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; - -import com.google.common.base.Strings; - -@Getter -public class TileAlchemyTable extends TileInventory implements ISidedInventory, ITickable -{ - public static final int orbSlot = 6; - public static final int toolSlot = 7; - public static final int outputSlot = 8; - - public EnumFacing direction = EnumFacing.NORTH; - public boolean isSlave = false; - public int burnTime = 0; - public int ticksRequired = 1; - - public BlockPos connectedPos = BlockPos.ORIGIN; - public List blockedSlots = new ArrayList(); - - public TileAlchemyTable() - { - super(9, "alchemyTable"); - } - - public void setInitialTableParameters(EnumFacing direction, boolean isSlave, BlockPos connectedPos) - { - this.isSlave = isSlave; - this.connectedPos = connectedPos; - - if (!isSlave) - { - this.direction = direction; - } - } - - public boolean isInvisible() - { - return isSlave(); - } - - public boolean isInputSlotAccessible(int slot) - { - if (slot < 6 && slot >= 0) - { - return !blockedSlots.contains(slot); - } - - return true; - } - - public void toggleInputSlotAccessible(int slot) - { - if (slot < 6 && slot >= 0) - { - if (blockedSlots.contains(slot)) - { - blockedSlots.remove((Object) slot); - } else - { - blockedSlots.add(slot); - } - } - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - - isSlave = tag.getBoolean("isSlave"); - direction = EnumFacing.getFront(tag.getInteger(Constants.NBT.DIRECTION)); - connectedPos = new BlockPos(tag.getInteger(Constants.NBT.X_COORD), tag.getInteger(Constants.NBT.Y_COORD), tag.getInteger(Constants.NBT.Z_COORD)); - - burnTime = tag.getInteger("burnTime"); - ticksRequired = tag.getInteger("ticksRequired"); - - blockedSlots.clear(); - int[] blockedSlotArray = tag.getIntArray("blockedSlots"); - for (int blocked : blockedSlotArray) - { - blockedSlots.add(blocked); - } - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - - tag.setBoolean("isSlave", isSlave); - tag.setInteger(Constants.NBT.DIRECTION, direction.getIndex()); - tag.setInteger(Constants.NBT.X_COORD, connectedPos.getX()); - tag.setInteger(Constants.NBT.Y_COORD, connectedPos.getY()); - tag.setInteger(Constants.NBT.Z_COORD, connectedPos.getZ()); - - tag.setInteger("burnTime", burnTime); - tag.setInteger("ticksRequired", ticksRequired); - - int[] blockedSlotArray = new int[blockedSlots.size()]; - for (int i = 0; i < blockedSlots.size(); i++) - { - blockedSlotArray[i] = blockedSlots.get(i); - } - - tag.setIntArray("blockedSlots", blockedSlotArray); - return tag; - } - - @SuppressWarnings("unchecked") - @Override - public T getCapability(Capability capability, EnumFacing facing) - { - if (facing != null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) - { - if (this.isSlave()) - { - TileEntity tile = worldObj.getTileEntity(connectedPos); - if (tile instanceof TileAlchemyTable) - { - return (T) new SidedInvWrapper((TileAlchemyTable) tile, facing); - } - } else - { - return (T) new SidedInvWrapper(this, facing); - } - } - - return super.getCapability(capability, facing); - } - - @Override - public int[] getSlotsForFace(EnumFacing side) - { - switch (side) - { - case DOWN: - return new int[] { outputSlot }; - case UP: - return new int[] { orbSlot, toolSlot }; - default: - return new int[] { 0, 1, 2, 3, 4, 5 }; - } - } - - @Override - public boolean canInsertItem(int index, ItemStack stack, EnumFacing direction) - { - switch (direction) - { - case DOWN: - return index != outputSlot && index != orbSlot && index != toolSlot; - case UP: - if (index == orbSlot && stack != null && stack.getItem() instanceof IBloodOrb) - { - return true; - } else if (index == toolSlot) - { - return false; //TODO: - } else - { - return true; - } - default: - return getAccessibleInputSlots(direction).contains(index); - } - } - - @Override - public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) - { - switch (direction) - { - case DOWN: - return index == outputSlot; - case UP: - if (index == orbSlot && stack != null && stack.getItem() instanceof IBloodOrb) - { - return true; - } else if (index == toolSlot) - { - return true; //TODO: - } else - { - return true; - } - default: - return getAccessibleInputSlots(direction).contains(index); - } - } - - public List getAccessibleInputSlots(EnumFacing direction) - { - List list = new ArrayList(); - - for (int i = 0; i < 6; i++) - { - if (isInputSlotAccessible(i)) - { - list.add(i); - } - } - - return list; - } - - @Override - public void update() - { - if (isSlave()) - { - return; - } - - List inputList = new ArrayList(); - - for (int i = 0; i < 6; i++) - { - if (getStackInSlot(i) != null) - { - inputList.add(getStackInSlot(i)); - } - } - - int tier = getTierOfOrb(); - - AlchemyTableRecipe recipe = AlchemyTableRecipeRegistry.getMatchingRecipe(inputList, getWorld(), getPos()); - if (recipe != null && (burnTime > 0 || (!worldObj.isRemote && tier >= recipe.getTierRequired() && this.getContainedLp() >= recipe.getLpDrained()))) - { - if (burnTime == 1) - { - IBlockState state = worldObj.getBlockState(pos); - worldObj.notifyBlockUpdate(getPos(), state, state, 3); - } - - if (canCraft(inputList, recipe)) - { - ticksRequired = recipe.getTicksRequired(); - burnTime++; - - if (burnTime == ticksRequired) - { - if (!worldObj.isRemote) - { - int requiredLp = recipe.getLpDrained(); - if (requiredLp > 0) - { - if (!worldObj.isRemote) - { - consumeLp(requiredLp); - } - } - - if (!worldObj.isRemote) - { - craftItem(inputList, recipe); - } - } - - burnTime = 0; - - IBlockState state = worldObj.getBlockState(pos); - worldObj.notifyBlockUpdate(getPos(), state, state, 3); - } else if (burnTime > ticksRequired + 10) - { - burnTime = 0; - } - } else - { - burnTime = 0; - } - } else - { - burnTime = 0; - } - } - - public double getProgressForGui() - { - return ((double) burnTime) / ticksRequired; - } - - private boolean canCraft(List inputList, AlchemyTableRecipe recipe) - { - if (recipe == null) - { - return false; - } - - ItemStack outputStack = recipe.getRecipeOutput(inputList); - ItemStack currentOutputStack = getStackInSlot(outputSlot); - if (outputStack == null) - return false; - if (currentOutputStack == null) - return true; - if (!currentOutputStack.isItemEqual(outputStack)) - return false; - int result = currentOutputStack.stackSize + outputStack.stackSize; - return result <= getInventoryStackLimit() && result <= currentOutputStack.getMaxStackSize(); - - } - - public int getTierOfOrb() - { - ItemStack orbStack = getStackInSlot(orbSlot); - if (orbStack != null) - { - if (orbStack.getItem() instanceof IBloodOrb) - { - return ((IBloodOrb) orbStack.getItem()).getOrbLevel(orbStack.getMetadata()); - } - } - - return 0; - } - - public int getContainedLp() - { - ItemStack orbStack = getStackInSlot(orbSlot); - if (orbStack != null) - { - if (orbStack.getItem() instanceof IBloodOrb) - { - NBTTagCompound itemTag = orbStack.getTagCompound(); - - if (itemTag == null) - { - return 0; - } - - String ownerUUID = itemTag.getString(Constants.NBT.OWNER_UUID); - - if (Strings.isNullOrEmpty(ownerUUID)) - { - return 0; - } - - SoulNetwork network = NetworkHelper.getSoulNetwork(ownerUUID); - - return network.getCurrentEssence(); - } - } - - return 0; - } - - public void craftItem(List inputList, AlchemyTableRecipe recipe) - { - if (this.canCraft(inputList, recipe)) - { - ItemStack outputStack = recipe.getRecipeOutput(inputList); - ItemStack currentOutputStack = getStackInSlot(outputSlot); - - if (currentOutputStack == null) - { - setInventorySlotContents(outputSlot, outputStack); - } else if (currentOutputStack.getItem() == currentOutputStack.getItem()) - { - currentOutputStack.stackSize += outputStack.stackSize; - } - - consumeInventory(recipe); - } - } - - public int consumeLp(int requested) - { - ItemStack orbStack = getStackInSlot(orbSlot); - - if (orbStack != null) - { - if (orbStack.getItem() instanceof IBloodOrb) - { - if (NetworkHelper.syphonFromContainer(orbStack, requested)) - { - return requested; - } - } - } - - return 0; - } - - public void consumeInventory(AlchemyTableRecipe recipe) - { - ItemStack[] input = new ItemStack[6]; - - for (int i = 0; i < 6; i++) - { - input[i] = getStackInSlot(i); - } - - ItemStack[] result = recipe.getRemainingItems(input); - for (int i = 0; i < 6; i++) - { - setInventorySlotContents(i, result[i]); - } -// for (int i = 0; i < 6; i++) -// { -// ItemStack inputStack = getStackInSlot(i); -// if (inputStack != null) -// { -// if (inputStack.getItem().hasContainerItem(inputStack)) -// { -// setInventorySlotContents(i, inputStack.getItem().getContainerItem(inputStack)); -// continue; -// } -// -// inputStack.stackSize--; -// if (inputStack.stackSize <= 0) -// { -// setInventorySlotContents(i, null); -// continue; -// } -// } -// } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileAltar.java b/src/main/java/WayofTime/bloodmagic/tile/TileAltar.java deleted file mode 100644 index d1892d27..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileAltar.java +++ /dev/null @@ -1,224 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -import WayofTime.bloodmagic.altar.BloodAltar; -import WayofTime.bloodmagic.api.altar.EnumAltarTier; -import WayofTime.bloodmagic.api.altar.IBloodAltar; - -public class TileAltar extends TileInventory implements IBloodAltar, ITickable -{ - private BloodAltar bloodAltar; - - public TileAltar() - { - super(1, "altar"); - this.bloodAltar = new BloodAltar(this); - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - super.deserialize(tagCompound); - - NBTTagCompound altarTag = tagCompound.getCompoundTag("bloodAltar"); - - this.bloodAltar.readFromNBT(altarTag); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - super.serialize(tagCompound); - - NBTTagCompound altarTag = new NBTTagCompound(); - this.bloodAltar.writeToNBT(altarTag); - - tagCompound.setTag("bloodAltar", altarTag); - return tagCompound; - } - - @Override - public void update() - { - bloodAltar.update(); - } - - @Override - public void sacrificialDaggerCall(int amount, boolean isSacrifice) - { - bloodAltar.sacrificialDaggerCall(amount, isSacrifice); - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return slot == 0; - } - - @Override - public int getCapacity() - { - return bloodAltar.getCapacity(); - } - - @Override - public int getCurrentBlood() - { - return bloodAltar.getCurrentBlood(); - } - - @Override - public EnumAltarTier getTier() - { - return bloodAltar.getTier(); - } - - @Override - public int getProgress() - { - return bloodAltar.getProgress(); - } - - @Override - public float getSacrificeMultiplier() - { - return bloodAltar.getSacrificeMultiplier(); - } - - @Override - public float getSelfSacrificeMultiplier() - { - return bloodAltar.getSelfSacrificeMultiplier(); - } - - @Override - public float getOrbMultiplier() - { - return bloodAltar.getOrbMultiplier(); - } - - @Override - public float getDislocationMultiplier() - { - return bloodAltar.getDislocationMultiplier(); - } - - @Override - public float getConsumptionMultiplier() - { - return bloodAltar.getConsumptionMultiplier(); - } - - @Override - public float getConsumptionRate() - { - return bloodAltar.getConsumptionRate(); - } - - @Override - public int getLiquidRequired() - { - return bloodAltar.getLiquidRequired(); - } - - @Override - public int getBufferCapacity() - { - return bloodAltar.getBufferCapacity(); - } - - @Override - public void startCycle() - { - bloodAltar.startCycle(); - } - - @Override - public void checkTier() - { - bloodAltar.checkTier(); - } - - @Override - public void requestPauseAfterCrafting(int cooldown) - { - bloodAltar.requestPauseAfterCrafting(cooldown); - } - - @Override - public boolean isActive() - { - return bloodAltar.isActive(); - } - - @Override - public int fillMainTank(int amount) - { - return bloodAltar.fillMainTank(amount); - } - - @Override - public void setActive() - { - bloodAltar.setActive(); - } - - @Override - public int getChargingRate() - { - return bloodAltar.getChargingRate(); - } - - @Override - public int getTotalCharge() - { - return bloodAltar.getTotalCharge(); - } - - @Override - public int getChargingFrequency() - { - return bloodAltar.getChargingFrequency(); - } - - public EnumAltarTier getCurrentTierDisplayed() - { - return bloodAltar.getCurrentTierDisplayed(); - } - - public boolean setCurrentTierDisplayed(EnumAltarTier altarTier) - { - return bloodAltar.setCurrentTierDisplayed(altarTier); - } - - @Override - public boolean hasCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) - { - if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) - { - return true; - } - - return super.hasCapability(capability, facing); - } - - @SuppressWarnings("unchecked") - @Override - public T getCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) - { - if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) - { - return (T) bloodAltar; - } - - return super.getCapability(capability, facing); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java b/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java deleted file mode 100644 index 3f0001c3..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java +++ /dev/null @@ -1,92 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.base.TileBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; - -public class TileBloodTank extends TileBase -{ - public int capacity; - protected FluidTank tank; - - public static final int[] CAPACITIES = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65336, 131072, 262144, 524288 }; - - public TileBloodTank(int meta) - { - capacity = CAPACITIES[meta] * Fluid.BUCKET_VOLUME; - tank = new FluidTank(capacity); - } - - public TileBloodTank() - { - capacity = CAPACITIES[0] * Fluid.BUCKET_VOLUME; - tank = new FluidTank(capacity); - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - super.deserialize(tagCompound); - tank.readFromNBT(tagCompound.getCompoundTag(Constants.NBT.TANK)); - capacity = tagCompound.getInteger(Constants.NBT.ALTAR_CAPACITY); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - super.serialize(tagCompound); - if (tank.getFluidAmount() != 0) - tagCompound.setTag(Constants.NBT.TANK, tank.writeToNBT(new NBTTagCompound())); - tagCompound.setInteger(Constants.NBT.ALTAR_CAPACITY, capacity); - return tagCompound; - } - - public int getCapacity() - { - return capacity; - } - - public FluidTank getTank() - { - return tank; - } - - public Fluid getClientRenderFluid() - { - if (tank != null && tank.getFluid() != null) - return tank.getFluid().getFluid(); - return null; - } - - public float getRenderHeight() - { - if (tank != null && tank.getFluidAmount() > 0) - return (float) tank.getFluidAmount() / (float) getCapacity(); - return 0F; - } - - public int getComparatorOutput() - { - return tank.getFluidAmount() > 0 ? (int) (1 + ((double) tank.getFluidAmount() / (double) tank.getCapacity()) * 14) : 0; - } - - @Override - public boolean hasCapability(Capability capability, EnumFacing facing) - { - return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability, facing); - } - - @SuppressWarnings("unchecked") - @Override - public T getCapability(Capability capability, EnumFacing facing) - { - if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) - return (T) tank; - return super.getCapability(capability, facing); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrucible.java b/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrucible.java deleted file mode 100644 index e34b3c0f..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrucible.java +++ /dev/null @@ -1,263 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWillConduit; -import WayofTime.bloodmagic.api.soul.IDemonWillGem; -import WayofTime.bloodmagic.api.soul.IDiscreteDemonWill; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; - -import java.util.HashMap; -import java.util.Map.Entry; - -public class TileDemonCrucible extends TileInventory implements ITickable, IDemonWillConduit, ISidedInventory -{ - public HashMap willMap = new HashMap(); //TODO: Change to DemonWillHolder - public final int maxWill = 100; - public final double gemDrainRate = 10; - - public int internalCounter = 0; - - public TileDemonCrucible() - { - super(1, "demonCrucible"); - } - - @Override - public void update() - { - if (worldObj.isRemote) - { - return; - } - - internalCounter++; - - if (worldObj.isBlockPowered(getPos())) - { - //TODO: Fill the contained gem if it is there. - ItemStack stack = this.getStackInSlot(0); - if (stack != null) - { - if (stack.getItem() instanceof IDemonWillGem) - { - IDemonWillGem gemItem = (IDemonWillGem) stack.getItem(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - if (willMap.containsKey(type)) - { - double current = willMap.get(type); - double fillAmount = Math.min(gemDrainRate, current); - if (fillAmount > 0) - { - fillAmount = gemItem.fillWill(type, stack, fillAmount, true); - if (willMap.get(type) - fillAmount <= 0) - { - willMap.remove(type); - } else - { - willMap.put(type, willMap.get(type) - fillAmount); - } - } - } - } - } - } - } else - { - ItemStack stack = this.getStackInSlot(0); - if (stack != null) - { - if (stack.getItem() instanceof IDemonWillGem) - { - IDemonWillGem gemItem = (IDemonWillGem) stack.getItem(); - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - double currentAmount = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - double drainAmount = Math.min(maxWill - currentAmount, gemDrainRate); - double filled = WorldDemonWillHandler.fillWillToMaximum(worldObj, pos, type, drainAmount, maxWill, false); - filled = gemItem.drainWill(type, stack, filled, false); - if (filled > 0) - { - filled = gemItem.drainWill(type, stack, filled, true); - WorldDemonWillHandler.fillWillToMaximum(worldObj, pos, type, filled, maxWill, true); - } - } - } else if (stack.getItem() instanceof IDiscreteDemonWill) //TODO: Limit the speed of this process - { - IDiscreteDemonWill willItem = (IDiscreteDemonWill) stack.getItem(); - EnumDemonWillType type = willItem.getType(stack); - double currentAmount = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - double needed = maxWill - currentAmount; - double discreteAmount = willItem.getDiscretization(stack); - if (needed >= discreteAmount) - { - double filled = willItem.drainWill(stack, discreteAmount); - if (filled > 0) - { - WorldDemonWillHandler.fillWillToMaximum(worldObj, pos, type, filled, maxWill, true); - if (stack.stackSize <= 0) - { - this.setInventorySlotContents(0, null); - } - } - } - } - } - } - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - - willMap.clear(); - - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - double amount = tag.getDouble("EnumWill" + type.getName()); - if (amount > 0) - { - willMap.put(type, amount); - } - } - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - - for (Entry entry : willMap.entrySet()) - { - tag.setDouble("EnumWill" + entry.getKey().getName(), entry.getValue()); - } - return tag; - } - - // IDemonWillConduit - - @Override - public int getWeight() - { - return 10; - } - - @Override - public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) - { - if (amount <= 0) - { - return 0; - } - - if (!canFill(type)) - { - return 0; - } - - if (!doFill) - { - if (!willMap.containsKey(type)) - { - return Math.min(maxWill, amount); - } - - return Math.min(maxWill - willMap.get(type), amount); - } - - if (!willMap.containsKey(type)) - { - double max = Math.min(maxWill, amount); - - willMap.put(type, max); - - return max; - } - - double current = willMap.get(type); - double filled = maxWill - current; - - if (amount < filled) - { - willMap.put(type, current + amount); - filled = amount; - } else - { - willMap.put(type, (double) maxWill); - } - - return filled; - } - - @Override - public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) - { - if (!willMap.containsKey(type)) - { - return 0; - } - - double drained = amount; - double current = willMap.get(type); - if (current < drained) - { - drained = current; - } - - if (doDrain) - { - current -= drained; - if (current <= 0) - { - willMap.remove(type); - } else - { - willMap.put(type, current); - } - } - - return drained; - } - - @Override - public boolean canFill(EnumDemonWillType type) - { - return true; - } - - @Override - public boolean canDrain(EnumDemonWillType type) - { - return true; - } - - @Override - public double getCurrentWill(EnumDemonWillType type) - { - return willMap.containsKey(type) ? willMap.get(type) : 0; - } - - @Override - public int[] getSlotsForFace(EnumFacing side) - { - return new int[] { 0 }; - } - - @Override - public boolean canInsertItem(int index, ItemStack stack, EnumFacing direction) - { - return stack != null ? stack.getItem() instanceof IDemonWillGem || stack.getItem() instanceof IDiscreteDemonWill : false; - } - - @Override - public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrystal.java b/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrystal.java deleted file mode 100644 index 44fbc634..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrystal.java +++ /dev/null @@ -1,191 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.tile.base.TileTicking; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.MathHelper; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.block.BlockDemonCrystal; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; - -public class TileDemonCrystal extends TileTicking -{ - public DemonWillHolder holder = new DemonWillHolder(); - public final int maxWill = 100; - public final double drainRate = 1; - public static final double sameWillConversionRate = 50; - public static final double defaultWillConversionRate = 100; - public static final double timeDelayForWrongWill = 0.6; - - public double progressToNextCrystal = 0; - public int internalCounter = 0; - - @Getter - @Setter - public int crystalCount = 1; - @Getter - @Setter - public EnumFacing placement = EnumFacing.UP; //Side that this crystal is placed on. - - public TileDemonCrystal() - { - this.crystalCount = 1; - } - - @Override - public void onUpdate() - { - if (worldObj.isRemote) - { - return; - } - - internalCounter++; - - if (internalCounter % 20 == 0 && crystalCount < 7) - { - EnumDemonWillType type = EnumDemonWillType.values()[this.getBlockMetadata()]; - - double value = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - if (type != EnumDemonWillType.DEFAULT) - { - if (value >= 100) - { - double nextProgress = getCrystalGrowthPerSecond(value); - progressToNextCrystal += WorldDemonWillHandler.drainWill(worldObj, getPos(), type, nextProgress * sameWillConversionRate, true) / sameWillConversionRate; - } else - { - value = WorldDemonWillHandler.getCurrentWill(worldObj, pos, EnumDemonWillType.DEFAULT); - if (value > 0.5) - { - double nextProgress = getCrystalGrowthPerSecond(value) * timeDelayForWrongWill; - progressToNextCrystal += WorldDemonWillHandler.drainWill(worldObj, getPos(), EnumDemonWillType.DEFAULT, nextProgress * defaultWillConversionRate, true) / defaultWillConversionRate; - } - } - } else - { - if (value > 0.5) - { - double nextProgress = getCrystalGrowthPerSecond(value); - progressToNextCrystal += WorldDemonWillHandler.drainWill(worldObj, getPos(), type, nextProgress * sameWillConversionRate, true) / sameWillConversionRate; - } - } - - checkAndGrowCrystal(); - } - -// if (worldObj.getWorldTime() % 200 == 0) -// { -// crystalCount = Math.min(crystalCount + 1, 7); -// worldObj.markBlockForUpdate(pos); -// } - } - - /** - * Encourages the crystal to grow by a large percentage by telling it to - * drain will from the aura. - * - * @param willDrain - * The amount of drain that is needed for the crystal to grow - * successfully for the desired amount. Can be more than the base - * amount. - * @param progressPercentage - * @return percentage actually grown. - */ - public double growCrystalWithWillAmount(double willDrain, double progressPercentage) - { - if (crystalCount >= 7) - { - return 0; - } - - IBlockState state = worldObj.getBlockState(pos); - int meta = this.getBlockType().getMetaFromState(state); - EnumDemonWillType type = EnumDemonWillType.values()[meta]; - - double value = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - double percentDrain = willDrain <= 0 ? 1 : Math.min(1, value / willDrain); - if (percentDrain <= 0) - { - return 0; - } - - // Verification that you can actually drain the will from this chunk, for future proofing. - WorldDemonWillHandler.drainWill(worldObj, pos, type, percentDrain * willDrain, true); - progressToNextCrystal += percentDrain * progressPercentage; - - checkAndGrowCrystal(); - - return percentDrain * progressPercentage; - } - - public void checkAndGrowCrystal() - { - if (progressToNextCrystal >= 1) - { - progressToNextCrystal--; - crystalCount++; - IBlockState thisState = worldObj.getBlockState(pos); - worldObj.notifyBlockUpdate(pos, thisState, thisState, 3); - markDirty(); - } - } - - public double getMaxWillForCrystal() - { - return 50; - } - - public boolean dropSingleCrystal() - { - if (!worldObj.isRemote && crystalCount > 1) - { - IBlockState state = worldObj.getBlockState(pos); - EnumDemonWillType type = state.getValue(BlockDemonCrystal.TYPE); - ItemStack stack = BlockDemonCrystal.getItemStackDropped(type, 1); - if (stack != null) - { - crystalCount--; - worldObj.spawnEntityInWorld(new EntityItem(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack)); - return true; - } - } - - return false; - } - - public double getCrystalGrowthPerSecond(double will) - { - return 1.0 / 800 * Math.sqrt(will / 200); - } - - public int getCrystalCountForRender() - { - return MathHelper.clamp_int(crystalCount - 1, 0, 6); - } - - @Override - public void deserialize(NBTTagCompound tag) - { - holder.readFromNBT(tag, "Will"); - crystalCount = tag.getInteger("crystalCount"); - placement = EnumFacing.getFront(tag.getInteger("placement")); - progressToNextCrystal = tag.getDouble("progress"); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - holder.writeToNBT(tag, "Will"); - tag.setInteger("crystalCount", crystalCount); - tag.setInteger("placement", placement.getIndex()); - tag.setDouble("progress", progressToNextCrystal); - return tag; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrystallizer.java b/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrystallizer.java deleted file mode 100644 index cb088dd9..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileDemonCrystallizer.java +++ /dev/null @@ -1,168 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWillConduit; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.base.TileTicking; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; - -public class TileDemonCrystallizer extends TileTicking implements IDemonWillConduit -{ - //The whole purpose of this block is to grow a crystal initially. The acceleration and crystal growing is up to the crystal itself afterwards. - public DemonWillHolder holder = new DemonWillHolder(); - public static final int maxWill = 100; - public static final double drainRate = 1; - - public static final double willToFormCrystal = 99; - public static final double totalFormationTime = 1000; - public double internalCounter = 0; - - public TileDemonCrystallizer() - { - - } - - @Override - public void onUpdate() - { - if (worldObj.isRemote) - { - return; - } - - BlockPos offsetPos = pos.offset(EnumFacing.UP); - if (worldObj.isAirBlock(offsetPos)) //Room for a crystal to grow - { - EnumDemonWillType highestType = WorldDemonWillHandler.getHighestDemonWillType(worldObj, pos); - double amount = WorldDemonWillHandler.getCurrentWill(worldObj, pos, highestType); - if (amount >= willToFormCrystal) - { - internalCounter += getCrystalFormationRate(amount); - if (internalCounter >= totalFormationTime) - { - if (WorldDemonWillHandler.drainWill(worldObj, getPos(), highestType, willToFormCrystal, false) >= willToFormCrystal) - { - if (highestType == EnumDemonWillType.DEFAULT && formRandomSpecialCrystal(offsetPos) || formCrystal(highestType, offsetPos)) - { - WorldDemonWillHandler.drainWill(worldObj, getPos(), highestType, willToFormCrystal, true); - internalCounter = 0; - } - } - } - } - } - } - - public boolean formCrystal(EnumDemonWillType type, BlockPos position) - { - worldObj.setBlockState(position, ModBlocks.DEMON_CRYSTAL.getStateFromMeta(type.ordinal())); - TileEntity tile = worldObj.getTileEntity(position); - if (tile instanceof TileDemonCrystal) - { - ((TileDemonCrystal) tile).setPlacement(EnumFacing.UP); - return true; - } - - return false; - } - - public boolean formRandomSpecialCrystal(BlockPos position) - { - if (worldObj.rand.nextDouble() > 0.1) - { - return formCrystal(EnumDemonWillType.DEFAULT, position); - } - EnumDemonWillType crystalType = EnumDemonWillType.values()[worldObj.rand.nextInt(EnumDemonWillType.values().length - 1) + 1]; - return formCrystal(crystalType, position); - } - - public double getCrystalFormationRate(double currentWill) - { - return 1; - } - - @Override - public void deserialize(NBTTagCompound tag) - { - holder.readFromNBT(tag, "Will"); - internalCounter = tag.getDouble("internalCounter"); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - holder.writeToNBT(tag, "Will"); - tag.setDouble("internalCounter", internalCounter); - return tag; - } - - // IDemonWillConduit - - @Override - public int getWeight() - { - return 10; - } - - @Override - public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) - { - if (amount <= 0) - { - return 0; - } - - if (!canFill(type)) - { - return 0; - } - - if (!doFill) - { - return Math.min(maxWill - holder.getWill(type), amount); - } - - return holder.addWill(type, amount, maxWill); - } - - @Override - public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) - { - double drained = amount; - double current = holder.getWill(type); - if (current < drained) - { - drained = current; - } - - if (doDrain) - { - return holder.drainWill(type, amount); - } - - return drained; - } - - @Override - public boolean canFill(EnumDemonWillType type) - { - return true; - } - - @Override - public boolean canDrain(EnumDemonWillType type) - { - return true; - } - - @Override - public double getCurrentWill(EnumDemonWillType type) - { - return holder.getWill(type); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileDemonPylon.java b/src/main/java/WayofTime/bloodmagic/tile/TileDemonPylon.java deleted file mode 100644 index ca95170d..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileDemonPylon.java +++ /dev/null @@ -1,126 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWillConduit; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.tile.base.TileTicking; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; - -public class TileDemonPylon extends TileTicking implements IDemonWillConduit -{ - public DemonWillHolder holder = new DemonWillHolder(); - public final int maxWill = 100; - public final double drainRate = 1; - - public TileDemonPylon() - { - - } - - @Override - public void onUpdate() - { - if (worldObj.isRemote) - { - return; - } - - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - double currentAmount = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - - for (EnumFacing side : EnumFacing.HORIZONTALS) - { - BlockPos offsetPos = pos.offset(side, 16); - double sideAmount = WorldDemonWillHandler.getCurrentWill(worldObj, offsetPos, type); - if (sideAmount > currentAmount) - { - double drainAmount = Math.min((sideAmount - currentAmount) / 2, drainRate); - double drain = WorldDemonWillHandler.drainWill(worldObj, offsetPos, type, drainAmount, true); - WorldDemonWillHandler.fillWill(worldObj, pos, type, drain, true); - } - } - } - } - - @Override - public void deserialize(NBTTagCompound tag) - { - holder.readFromNBT(tag, "Will"); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - holder.writeToNBT(tag, "Will"); - return tag; - } - - // IDemonWillConduit - - @Override - public int getWeight() - { - return 10; - } - - @Override - public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) - { - if (amount <= 0) - { - return 0; - } - - if (!canFill(type)) - { - return 0; - } - - if (!doFill) - { - return Math.min(maxWill - holder.getWill(type), amount); - } - - return holder.addWill(type, amount, maxWill); - } - - @Override - public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) - { - double drained = amount; - double current = holder.getWill(type); - if (current < drained) - { - drained = current; - } - - if (doDrain) - { - return holder.drainWill(type, amount); - } - - return drained; - } - - @Override - public boolean canFill(EnumDemonWillType type) - { - return true; - } - - @Override - public boolean canDrain(EnumDemonWillType type) - { - return true; - } - - @Override - public double getCurrentWill(EnumDemonWillType type) - { - return holder.getWill(type); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileDimensionalPortal.java b/src/main/java/WayofTime/bloodmagic/tile/TileDimensionalPortal.java deleted file mode 100644 index f65977a2..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileDimensionalPortal.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.ritual.RitualPortal; -import WayofTime.bloodmagic.tile.base.TileBase; -import com.google.common.base.Strings; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; - -public class TileDimensionalPortal extends TileBase -{ - public String portalID = ""; - public int masterStoneX; - public int masterStoneY; - public int masterStoneZ; - - public TileDimensionalPortal() - { - ; - } - - public void deserialize(NBTTagCompound tagCompound) - { - portalID = tagCompound.getString(RitualPortal.PORTAL_ID_TAG); - - masterStoneX = tagCompound.getInteger("masterStoneX"); - masterStoneY = tagCompound.getInteger("masterStoneY"); - masterStoneZ = tagCompound.getInteger("masterStoneZ"); - } - - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - tagCompound.setString(RitualPortal.PORTAL_ID_TAG, Strings.isNullOrEmpty(portalID) ? "" : portalID); - - tagCompound.setInteger("masterStoneX", masterStoneX); - tagCompound.setInteger("masterStoneY", masterStoneY); - tagCompound.setInteger("masterStoneZ", masterStoneZ); - return tagCompound; - } - - public BlockPos getMasterStonePos() - { - return new BlockPos(masterStoneX, masterStoneY, masterStoneZ); - } - - public void setMasterStonePos(BlockPos blockPos) - { - this.masterStoneX = blockPos.getX(); - this.masterStoneY = blockPos.getY(); - this.masterStoneZ = blockPos.getZ(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileImperfectRitualStone.java b/src/main/java/WayofTime/bloodmagic/tile/TileImperfectRitualStone.java deleted file mode 100644 index 1bf00be6..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileImperfectRitualStone.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry; -import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone; -import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.tile.base.TileBase; -import lombok.NoArgsConstructor; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -@NoArgsConstructor -public class TileImperfectRitualStone extends TileBase implements IImperfectRitualStone -{ - // IImperfectRitualStone - - @Override - public boolean performRitual(World world, BlockPos pos, ImperfectRitual imperfectRitual, EntityPlayer player) - { - if (imperfectRitual != null && ImperfectRitualRegistry.ritualEnabled(imperfectRitual)) - { - if (!PlayerHelper.isFakePlayer(player) && !world.isRemote) - { - NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, imperfectRitual.getActivationCost()); - if (imperfectRitual.onActivate(this, player)) - { - if (imperfectRitual.isLightshow()) - getWorld().addWeatherEffect(new EntityLightningBolt(getWorld(), getPos().getX(), getPos().getY() + 2, getPos().getZ(), true)); - return true; - } - } - - return true; - } - - return false; - } - - @Override - public World getRitualWorld() - { - return getWorld(); - } - - @Override - public BlockPos getRitualPos() - { - return getPos(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileIncenseAltar.java b/src/main/java/WayofTime/bloodmagic/tile/TileIncenseAltar.java deleted file mode 100644 index f08dcf94..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileIncenseAltar.java +++ /dev/null @@ -1,193 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.incense.EnumTranquilityType; -import WayofTime.bloodmagic.api.incense.IIncensePath; -import WayofTime.bloodmagic.api.incense.IncenseTranquilityRegistry; -import WayofTime.bloodmagic.api.incense.TranquilityStack; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper; -import WayofTime.bloodmagic.incense.IncenseAltarHandler; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldServer; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -public class TileIncenseAltar extends TileInventory implements ITickable -{ - public AreaDescriptor incenseArea = new AreaDescriptor.Rectangle(new BlockPos(-5, -5, -5), 11); - public static int maxCheckRange = 5; - public Map tranquilityMap = new HashMap(); - - public double incenseAddition = 0; //Self-sacrifice is multiplied by 1 plus this value. - public double tranquility = 0; - public int roadDistance = 0; //Number of road blocks laid down - - public TileIncenseAltar() - { - super(1, "incenseAltar"); - } - - @Override - public void update() - { - AxisAlignedBB aabb = incenseArea.getAABB(getPos()); - List playerList = worldObj.getEntitiesWithinAABB(EntityPlayer.class, aabb); - if (playerList.isEmpty()) - { - return; - } - - if (worldObj.getTotalWorldTime() % 100 == 0) - { - recheckConstruction(); - } - - boolean hasPerformed = false; - - for (EntityPlayer player : playerList) - { - if (PlayerSacrificeHelper.incrementIncense(player, 0, incenseAddition, incenseAddition / 100)) - { - hasPerformed = true; - } - } - - if (hasPerformed) - { - if (worldObj.rand.nextInt(4) == 0 && worldObj instanceof WorldServer) - { - WorldServer server = (WorldServer) worldObj; - server.spawnParticle(EnumParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 1, 0.02, 0.03, 0.02, 0, new int[0]); - } - } - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - tranquility = tag.getDouble("tranquility"); - incenseAddition = tag.getDouble("incenseAddition"); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - tag.setDouble("tranquility", tranquility); - tag.setDouble("incenseAddition", incenseAddition); - return tag; - } - - public void recheckConstruction() - { - //TODO: Check the physical construction of the incense altar to determine the maximum length. - int maxLength = 11; //Max length of the path. The path starts two blocks away from the center block. - int yOffset = 0; - - Map tranquilityMap = new HashMap(); - - for (int currentDistance = 2; currentDistance < currentDistance + maxLength; currentDistance++) - { - boolean canFormRoad = false; - - for (int i = -maxCheckRange + yOffset; i <= maxCheckRange + yOffset; i++) - { - BlockPos verticalPos = pos.add(0, i, 0); - - canFormRoad = true; - level: for (EnumFacing horizontalFacing : EnumFacing.HORIZONTALS) - { - BlockPos facingOffsetPos = verticalPos.offset(horizontalFacing, currentDistance); - for (int j = -1; j <= 1; j++) - { - BlockPos offsetPos = facingOffsetPos.offset(horizontalFacing.rotateY(), j); - IBlockState state = worldObj.getBlockState(offsetPos); - Block block = state.getBlock(); - if (!(block instanceof IIncensePath && ((IIncensePath) block).getLevelOfPath(worldObj, offsetPos, state) >= currentDistance - 2)) - { - canFormRoad = false; - break level; - } - } - } - - if (canFormRoad) - { - yOffset = i; - break; - } - } - - if (canFormRoad) - { - for (int i = -currentDistance; i <= currentDistance; i++) - { - for (int j = -currentDistance; j <= currentDistance; j++) - { - if (Math.abs(i) != currentDistance && Math.abs(j) != currentDistance) - { - continue; //TODO: Can make this just set j to currentDistance to speed it up. - } - - for (int y = 0 + yOffset; y <= 2 + yOffset; y++) - { - BlockPos offsetPos = pos.add(i, y, j); - IBlockState state = worldObj.getBlockState(offsetPos); - Block block = state.getBlock(); - TranquilityStack stack = IncenseTranquilityRegistry.getTranquilityOfBlock(worldObj, offsetPos, block, state); - if (stack != null) - { - if (!tranquilityMap.containsKey(stack.type)) - { - tranquilityMap.put(stack.type, stack.value); - } else - { - tranquilityMap.put(stack.type, tranquilityMap.get(stack.type) + stack.value); - } - } - } - } - } - } else - { - roadDistance = currentDistance - 2; - break; - } - } - - this.tranquilityMap = tranquilityMap; - - double totalTranquility = 0; - for (Entry entry : tranquilityMap.entrySet()) - { - totalTranquility += entry.getValue(); - } - - if (totalTranquility < 0) - { - return; - } - - double appliedTranquility = 0; - for (Entry entry : tranquilityMap.entrySet()) - { - appliedTranquility += Math.sqrt(entry.getValue()); - } - - double bonus = IncenseAltarHandler.getIncenseBonusFromComponents(worldObj, pos, appliedTranquility, roadDistance); - incenseAddition = bonus; - this.tranquility = appliedTranquility; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileInventory.java b/src/main/java/WayofTime/bloodmagic/tile/TileInventory.java deleted file mode 100644 index 3e34ccdd..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileInventory.java +++ /dev/null @@ -1,296 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.tile.base.TileBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.inventory.InventoryHelper; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentString; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.InvWrapper; -import net.minecraftforge.items.wrapper.SidedInvWrapper; -import WayofTime.bloodmagic.util.helper.TextHelper; - -public class TileInventory extends TileBase implements IInventory -{ - protected int[] syncedSlots = new int[0]; - protected ItemStack[] inventory; - private int size; - private String name; - - public TileInventory(int size, String name) - { - this.inventory = new ItemStack[size]; - this.size = size; - this.name = name; - initializeItemHandlers(); - } - - protected boolean isSyncedSlot(int slot) - { - for (int s : this.syncedSlots) - { - if (s == slot) - { - return true; - } - } - return false; - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - super.deserialize(tagCompound); - NBTTagList tags = tagCompound.getTagList("Items", 10); - inventory = new ItemStack[getSizeInventory()]; - - for (int i = 0; i < tags.tagCount(); i++) - { - if (!isSyncedSlot(i)) - { - NBTTagCompound data = tags.getCompoundTagAt(i); - byte j = data.getByte("Slot"); - - if (j >= 0 && j < inventory.length) - { - inventory[j] = ItemStack.loadItemStackFromNBT(data); - } - } - } - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - super.serialize(tagCompound); - NBTTagList tags = new NBTTagList(); - - for (int i = 0; i < inventory.length; i++) - { - if ((inventory[i] != null) && !isSyncedSlot(i)) - { - NBTTagCompound data = new NBTTagCompound(); - data.setByte("Slot", (byte) i); - inventory[i].writeToNBT(data); - tags.appendTag(data); - } - } - - tagCompound.setTag("Items", tags); - return tagCompound; - } - - public void dropItems() - { - InventoryHelper.dropInventoryItems(getWorld(), getPos(), this); - } - - // IInventory - - @Override - public int getSizeInventory() - { - return size; - } - - @Override - public ItemStack getStackInSlot(int index) - { - return inventory[index]; - } - - @Override - public ItemStack decrStackSize(int index, int count) - { - if (inventory[index] != null) - { - if (!getWorld().isRemote) - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); - - if (inventory[index].stackSize <= count) - { - ItemStack itemStack = inventory[index]; - inventory[index] = null; - markDirty(); - return itemStack; - } - - ItemStack itemStack = inventory[index].splitStack(count); - if (inventory[index].stackSize == 0) - inventory[index] = null; - - markDirty(); - return itemStack; - } - - return null; - } - - @Override - public ItemStack removeStackFromSlot(int slot) - { - if (inventory[slot] != null) - { - ItemStack itemStack = inventory[slot]; - setInventorySlotContents(slot, null); - return itemStack; - } - return null; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack stack) - { - inventory[slot] = stack; - if (stack != null && stack.stackSize > getInventoryStackLimit()) - stack.stackSize = getInventoryStackLimit(); - markDirty(); - if (!getWorld().isRemote) - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer player) - { - return true; - } - - @Override - public void openInventory(EntityPlayer player) - { - - } - - @Override - public void closeInventory(EntityPlayer player) - { - - } - - @Override - public boolean isItemValidForSlot(int index, ItemStack stack) - { - return true; - } - - @Override - public int getField(int id) - { - return 0; - } - - @Override - public void setField(int id, int value) - { - - } - - @Override - public int getFieldCount() - { - return 0; - } - - @Override - public void clear() - { - this.inventory = new ItemStack[size]; - } - - // IWorldNameable - - @Override - public String getName() - { - return TextHelper.localize("tile.BloodMagic." + name + ".name"); - } - - @Override - public boolean hasCustomName() - { - return true; - } - - @Override - public ITextComponent getDisplayName() - { - return new TextComponentString(getName()); - } - - protected void initializeItemHandlers() - { - if (this instanceof ISidedInventory) - { - handlerDown = new SidedInvWrapper((ISidedInventory) this, EnumFacing.DOWN); - handlerUp = new SidedInvWrapper((ISidedInventory) this, EnumFacing.UP); - handlerNorth = new SidedInvWrapper((ISidedInventory) this, EnumFacing.NORTH); - handlerSouth = new SidedInvWrapper((ISidedInventory) this, EnumFacing.SOUTH); - handlerWest = new SidedInvWrapper((ISidedInventory) this, EnumFacing.WEST); - handlerEast = new SidedInvWrapper((ISidedInventory) this, EnumFacing.EAST); - } else - { - handlerDown = new InvWrapper(this); - handlerUp = handlerDown; - handlerNorth = handlerDown; - handlerSouth = handlerDown; - handlerWest = handlerDown; - handlerEast = handlerDown; - } - } - - IItemHandler handlerDown; - IItemHandler handlerUp; - IItemHandler handlerNorth; - IItemHandler handlerSouth; - IItemHandler handlerWest; - IItemHandler handlerEast; - - @SuppressWarnings("unchecked") - @Override - public T getCapability(Capability capability, EnumFacing facing) - { - if (facing != null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) - { - switch (facing) - { - case DOWN: - return (T) handlerDown; - case EAST: - return (T) handlerEast; - case NORTH: - return (T) handlerNorth; - case SOUTH: - return (T) handlerSouth; - case UP: - return (T) handlerUp; - case WEST: - return (T) handlerWest; - } - } else if (facing == null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) - { - return (T) handlerDown; - } - - return super.getCapability(capability, facing); - } - - @Override - public boolean hasCapability(Capability capability, EnumFacing facing) - { - return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileInversionPillar.java b/src/main/java/WayofTime/bloodmagic/tile/TileInversionPillar.java deleted file mode 100644 index 62bad390..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileInversionPillar.java +++ /dev/null @@ -1,437 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import java.util.Collections; -import java.util.List; -import java.util.Locale; - -import lombok.Getter; -import lombok.Setter; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; -import net.minecraftforge.common.animation.Event; -import net.minecraftforge.common.animation.ITimeValue; -import net.minecraftforge.common.animation.TimeValues.VariableValue; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.model.animation.CapabilityAnimation; -import net.minecraftforge.common.model.animation.IAnimationStateMachine; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.inversion.InversionPillarHandler; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.base.TileTicking; - -import com.google.common.collect.ImmutableMap; - -@Getter -@Setter -public class TileInversionPillar extends TileTicking -{ - public static double willPerOperation = 0.5; - public static double inversionPerOperation = 4; - public static double addedInversionPerFailedCheck = 1; - public static double inversionToIncreaseRadius = 100; - public static double inversionToAddPillar = 200; - public static double operationThreshold = 20; - public static double inversionToSpreadWill = 200; - public static double willPushRate = 1; - public static double inversionCostPerWillSpread = 4; - public static double minimumWillForChunkWhenSpreading = 100; - - private final IAnimationStateMachine asm; - private float animationOffsetValue = 0; - private final VariableValue animationOffset = new VariableValue(0); - private final VariableValue cycleLength = new VariableValue(4); - - public EnumDemonWillType type; - public double currentInversion = 0; - public int consecutiveFailedChecks = 0; //If you fail enough checks, increase the radius. - public int consecutiveFailedAirChecks = 0; - public int currentInfectionRadius = 1; - -// public int dormantCounter = 0; //Time that the pillar will - - public int counter = 0; - - public boolean isRegistered = false; - - public static final double maxWillForChunk = 1000; - - public TileInversionPillar() - { - this(EnumDemonWillType.DEFAULT); - } - - public TileInversionPillar(EnumDemonWillType type) - { - this.type = type; - asm = BloodMagic.proxy.load(new ResourceLocation(Constants.Mod.MODID.toLowerCase(), "asms/block/inversion_pillar.json"), ImmutableMap.of("offset", animationOffset, "cycle_length", cycleLength)); - animationOffsetValue = -1; - } - - @Override - public void onUpdate() - { - if (animationOffsetValue < 0) - { - animationOffsetValue = worldObj.getTotalWorldTime() * worldObj.rand.nextFloat(); - animationOffset.setValue(animationOffsetValue); - } - - if (worldObj.isRemote) - { - return; - } - - if (!isRegistered) - { - isRegistered = InversionPillarHandler.addPillarToMap(worldObj, getType(), getPos()); - } - - counter++; - - double currentWill = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - if (counter % 1 == 0) - { - List pillarList = getNearbyPillarsExcludingThis(); -// if (type == EnumDemonWillType.VENGEFUL) -// { -// System.out.println(pillarList.size() + " nearby pillars"); -// } - generateWillForNearbyPillars(currentWill, pillarList); - generateInversionForNearbyPillars(currentWill, pillarList); - int pollute = polluteNearbyBlocks(currentWill); - if (pollute == 1) - { - currentInversion += addedInversionPerFailedCheck; - consecutiveFailedChecks++; - } else if (pollute == 3) - { - currentInversion += addedInversionPerFailedCheck; - consecutiveFailedAirChecks++; - } else if (pollute == 0) - { - //We successfully found a block to replace! - consecutiveFailedChecks = 0; - consecutiveFailedAirChecks = 0; - } - - if (consecutiveFailedAirChecks > 100) - { - createObstructionsInAir(); - } - - if (currentInversion >= inversionToSpreadWill) - { - spreadWillToSurroundingChunks(); - } - - if (consecutiveFailedChecks > 5 * currentInfectionRadius && currentInversion >= inversionToIncreaseRadius) - { - currentInfectionRadius++; - consecutiveFailedChecks = 0; - currentInversion -= inversionToIncreaseRadius; - System.out.println("Increasing radius!"); - } else if (consecutiveFailedAirChecks > 25 * currentInfectionRadius) //Change this to require a number of "creations" with the orbs in the air. - { - currentInfectionRadius++; - consecutiveFailedChecks = 0; - currentInversion -= inversionToIncreaseRadius; - System.out.println("Increasing radius due to being in the air!"); - } - - if (currentInfectionRadius >= 8 && currentInversion >= inversionToAddPillar) - { - //TODO: Improve algorithm - List allConnectedPos = InversionPillarHandler.getAllConnectedPillars(worldObj, type, pos); - BlockPos candidatePos = findCandidatePositionForPillar(worldObj, type, pos, allConnectedPos, 5, 10); - if (!candidatePos.equals(BlockPos.ORIGIN)) - { - currentInversion = 0; - IBlockState pillarState = ModBlocks.INVERSION_PILLAR.getStateFromMeta(type.ordinal()); - IBlockState bottomState = ModBlocks.INVERSION_PILLAR_END.getStateFromMeta(type.ordinal() * 2); - IBlockState topState = ModBlocks.INVERSION_PILLAR_END.getStateFromMeta(type.ordinal() * 2 + 1); - worldObj.setBlockState(candidatePos, pillarState); - worldObj.setBlockState(candidatePos.down(), bottomState); - worldObj.setBlockState(candidatePos.up(), topState); - } - } - } - } - -// public static int getDormantTimeForConnectedPillarsOnSpawn() -// { -// return 0; -// } - - public void createObstructionsInAir() - { - if (currentInversion > 1000) - { - Vec3d vec = new Vec3d(worldObj.rand.nextDouble() * 2 - 1, worldObj.rand.nextDouble() * 2 - 1, worldObj.rand.nextDouble() * 2 - 1).normalize().scale(2 * currentInfectionRadius); - - BlockPos centralPos = pos.add(vec.xCoord, vec.yCoord, vec.zCoord); - - worldObj.setBlockState(centralPos, ModBlocks.DEMON_EXTRAS.getStateFromMeta(0)); - currentInversion -= 1000; - } - } - - public static BlockPos findCandidatePositionForPillar(World world, EnumDemonWillType type, BlockPos pos, List posList, double tooCloseDistance, double wantedAverageDistance) - { - int maxIterations = 100; - int heightCheckRange = 3; - - for (int i = 0; i < maxIterations; i++) - { - Collections.shuffle(posList); - BlockPos pillarPos = posList.get(0); - - Vec3d vec = new Vec3d(world.rand.nextDouble() * 2 - 1, world.rand.nextDouble() * 2 - 1, world.rand.nextDouble() * 2 - 1).normalize().scale(wantedAverageDistance); - - BlockPos centralPos = pillarPos.add(vec.xCoord, vec.yCoord, vec.zCoord); - BlockPos testPos = null; - candidateTest: for (int h = 0; h <= heightCheckRange; h++) - { - for (int sig = -1; sig <= 1; sig += (h > 0 ? 2 : 3)) - { - BlockPos candidatePos = centralPos.add(0, sig * h, 0); - if (world.isAirBlock(candidatePos) && world.isAirBlock(candidatePos.up()) && world.isAirBlock(candidatePos.down()) && !world.isAirBlock(candidatePos.down(2))) - { - testPos = candidatePos; - break candidateTest; - } - } - } - - if (testPos != null) - { - boolean isValid = true; - for (BlockPos pillarTestPos : posList) - { - if (pillarTestPos.distanceSq(testPos) <= tooCloseDistance * tooCloseDistance) - { - isValid = false; - break; - } - } - - if (isValid) - { - return testPos; - } - } - } - - return BlockPos.ORIGIN; - } - - public void spreadWillToSurroundingChunks() - { - double currentAmount = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - if (currentAmount <= minimumWillForChunkWhenSpreading) - { - return; - } - - for (EnumFacing side : EnumFacing.HORIZONTALS) - { - BlockPos offsetPos = pos.offset(side, 16); - double sideAmount = WorldDemonWillHandler.getCurrentWill(worldObj, offsetPos, type); - if (currentAmount > sideAmount) - { - double drainAmount = Math.min((currentAmount - sideAmount) / 2, willPushRate); - if (drainAmount < willPushRate / 2) - { - continue; - } - - double drain = WorldDemonWillHandler.drainWill(worldObj, pos, type, drainAmount, true); - drain = WorldDemonWillHandler.fillWillToMaximum(worldObj, offsetPos, type, drain, maxWillForChunk, true); - - currentInversion -= drain * inversionCostPerWillSpread; - } - } - } - - public void removePillarFromMap() - { - if (!worldObj.isRemote) - { - InversionPillarHandler.removePillarFromMap(worldObj, type, pos); - } - } - - public List getNearbyPillarsExcludingThis() - { - return InversionPillarHandler.getNearbyPillars(worldObj, type, pos); - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - - if (!tag.hasKey(Constants.NBT.WILL_TYPE)) - { - type = EnumDemonWillType.DEFAULT; - } - - type = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); - currentInversion = tag.getDouble("currentInversion"); - currentInfectionRadius = tag.getInteger("currentInfectionRadius"); - consecutiveFailedChecks = tag.getInteger("consecutiveFailedChecks"); - - animationOffsetValue = tag.getFloat("animationOffset"); - animationOffset.setValue(animationOffsetValue); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - - tag.setString(Constants.NBT.WILL_TYPE, type.toString()); - tag.setDouble("currentInversion", currentInversion); - tag.setInteger("currentInfectionRadius", currentInfectionRadius); - tag.setInteger("consecutiveFailedChecks", consecutiveFailedChecks); - tag.setFloat("animationOffset", animationOffsetValue); - - return tag; - } - - public void generateWillForNearbyPillars(double currentWillInChunk, List offsetPositions) - { - double totalGeneratedWill = 0; - double willFactor = currentWillInChunk / 1000; - - for (BlockPos offsetPos : offsetPositions) - { - double distanceSquared = offsetPos.distanceSq(pos); - - totalGeneratedWill += willFactor * 343 / (343 + Math.pow(distanceSquared, 3 / 2)); - } - - if (totalGeneratedWill > 0) - { - WorldDemonWillHandler.fillWillToMaximum(worldObj, pos, type, totalGeneratedWill, maxWillForChunk, true); - } - } - - public void generateInversionForNearbyPillars(double currentWillInChunk, List offsetPositions) - { - double willFactor = currentWillInChunk / 400; - double totalGeneratedInversion = willFactor; - - for (BlockPos offsetPos : offsetPositions) - { - double distanceSquared = offsetPos.distanceSq(pos); - - totalGeneratedInversion += 3125 / (3125 + Math.pow(distanceSquared, 5 / 2)); - } - - currentInversion = Math.max(0, currentInversion + totalGeneratedInversion); - } - - /** - * - * @param currentWillInChunk - * @return 0 if the block is successfully placed, 1 if the block is not - * placed due to the selected place being invalid, 2 if the block is - * not placed due to there not being enough Will or Inversion, 3 if - * the block is not placed due to the selected block being air. - */ - public int polluteNearbyBlocks(double currentWillInChunk) - { -// System.out.println("Hai! :D Current Inversion: " + currentInversion + ", Current Will: " + currentWillInChunk); - if (currentWillInChunk < operationThreshold || currentInversion < inversionPerOperation) - { - return 2; //Not enough Will or Inversion available - } - - for (int i = 0; i < currentInfectionRadius; i++) - { - double xOff = (worldObj.rand.nextBoolean() ? 1 : -1) * (worldObj.rand.nextGaussian() + 1) * (currentInfectionRadius); - double yOff = (worldObj.rand.nextBoolean() ? 1 : -1) * (worldObj.rand.nextGaussian() + 1) * (currentInfectionRadius); - double zOff = (worldObj.rand.nextBoolean() ? 1 : -1) * (worldObj.rand.nextGaussian() + 1) * (currentInfectionRadius); - double r2 = xOff * xOff + yOff * yOff + zOff * zOff; - int maxInfectionRadius2 = (9 * currentInfectionRadius * currentInfectionRadius); - if (r2 > maxInfectionRadius2) - { - double factor = Math.sqrt(maxInfectionRadius2 / r2); - xOff *= factor; - yOff *= factor; - zOff *= factor; - } - - BlockPos offsetPos = pos.add(xOff + 0.5, yOff + 0.5, zOff + 0.5); - if (offsetPos.equals(pos)) - { - return 1; //Invalid block (itself!) - } - - IBlockState state = worldObj.getBlockState(offsetPos); - if (!state.getBlock().isAir(state, worldObj, offsetPos)) - { - //Consume Will and set this block - Block block = state.getBlock(); - if (block == Blocks.DIRT || block == Blocks.STONE || block == Blocks.GRASS) - { - if (worldObj.setBlockState(offsetPos, ModBlocks.DEMON_EXTRAS.getStateFromMeta(0))) - { - WorldDemonWillHandler.drainWill(worldObj, pos, type, willPerOperation, true); - currentInversion -= inversionPerOperation; - - return 0; //Successfully placed - } - } - - return 1; //Invalid block - } - } - - return 3; //The block was air - } - - public void handleEvents(float time, Iterable pastEvents) - { - for (Event event : pastEvents) - { - System.out.println("Event: " + event.event() + " " + event.offset() + " " + getPos() + " " + time); - } - } - - @Override - public boolean hasFastRenderer() - { - return true; - } - - @Override - public boolean hasCapability(Capability capability, EnumFacing side) - { - if (capability == CapabilityAnimation.ANIMATION_CAPABILITY) - { - return true; - } - return super.hasCapability(capability, side); - } - - @Override - public T getCapability(Capability capability, EnumFacing side) - { - if (capability == CapabilityAnimation.ANIMATION_CAPABILITY) - { - return CapabilityAnimation.ANIMATION_CAPABILITY.cast(asm); - } - return super.getCapability(capability, side); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileMasterRitualStone.java b/src/main/java/WayofTime/bloodmagic/tile/TileMasterRitualStone.java deleted file mode 100644 index 58f0b59b..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileMasterRitualStone.java +++ /dev/null @@ -1,399 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import java.util.ArrayList; -import java.util.List; - -import WayofTime.bloodmagic.tile.base.TileTicking; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.RitualEvent; -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.IMasterRitualStone; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.api.util.helper.RitualHelper; -import WayofTime.bloodmagic.item.ItemActivationCrystal; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.ChatUtil; - -import com.google.common.base.Strings; - -@Getter -@NoArgsConstructor -public class TileMasterRitualStone extends TileTicking implements IMasterRitualStone -{ - private String owner; - private boolean active; - private boolean redstoned; - private int activeTime; - private int cooldown; - private Ritual currentRitual; - @Setter - private EnumFacing direction = EnumFacing.NORTH; - - private List currentActiveWillConfig = new ArrayList(); - - @Override - public void onUpdate() - { - if (worldObj.isRemote) - return; - - if (getWorld().isBlockPowered(getPos()) && isActive()) - { - active = false; - redstoned = true; - stopRitual(Ritual.BreakType.REDSTONE); - return; - } - - if (!isActive() && !getWorld().isBlockPowered(getPos()) && isRedstoned() && getCurrentRitual() != null) - { - active = true; - ItemStack crystalStack = NBTHelper.checkNBT(new ItemStack(ModItems.ACTIVATION_CRYSTAL, 1, getCurrentRitual().getCrystalLevel())); - crystalStack.getTagCompound().setString(Constants.NBT.OWNER_UUID, getOwner()); - activateRitual(crystalStack, null, getCurrentRitual()); - redstoned = false; - } - - if (getCurrentRitual() != null && isActive()) - { - if (activeTime % getCurrentRitual().getRefreshTime() == 0) - performRitual(getWorld(), getPos()); - - activeTime++; - } - } - - @Override - public void deserialize(NBTTagCompound tag) - { - owner = tag.getString(Constants.NBT.OWNER_UUID); - currentRitual = RitualRegistry.getRitualForId(tag.getString(Constants.NBT.CURRENT_RITUAL)); - if (currentRitual != null) - { - NBTTagCompound ritualTag = tag.getCompoundTag(Constants.NBT.CURRENT_RITUAL_TAG); - if (ritualTag != null) - { - currentRitual.readFromNBT(ritualTag); - } - } - active = tag.getBoolean(Constants.NBT.IS_RUNNING); - activeTime = tag.getInteger(Constants.NBT.RUNTIME); - direction = EnumFacing.VALUES[tag.getInteger(Constants.NBT.DIRECTION)]; - redstoned = tag.getBoolean(Constants.NBT.IS_REDSTONED); - - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - if (tag.getBoolean("EnumWill" + type)) - { - currentActiveWillConfig.add(type); - } - } - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - String ritualId = RitualRegistry.getIdForRitual(getCurrentRitual()); - tag.setString(Constants.NBT.OWNER_UUID, Strings.isNullOrEmpty(getOwner()) ? "" : getOwner()); - tag.setString(Constants.NBT.CURRENT_RITUAL, Strings.isNullOrEmpty(ritualId) ? "" : ritualId); - if (currentRitual != null) - { - NBTTagCompound ritualTag = new NBTTagCompound(); - currentRitual.writeToNBT(ritualTag); - tag.setTag(Constants.NBT.CURRENT_RITUAL_TAG, ritualTag); - } - tag.setBoolean(Constants.NBT.IS_RUNNING, isActive()); - tag.setInteger(Constants.NBT.RUNTIME, getActiveTime()); - tag.setInteger(Constants.NBT.DIRECTION, direction.getIndex()); - tag.setBoolean(Constants.NBT.IS_REDSTONED, redstoned); - - for (EnumDemonWillType type : currentActiveWillConfig) - { - tag.setBoolean("EnumWill" + type, true); - } - - return tag; - } - - @Override - public boolean activateRitual(ItemStack activationCrystal, EntityPlayer activator, Ritual ritual) - { - if (PlayerHelper.isFakePlayer(activator)) - return false; - - activationCrystal = NBTHelper.checkNBT(activationCrystal); - String crystalOwner = activationCrystal.getTagCompound().getString(Constants.NBT.OWNER_UUID); -// crystalOwner = PlayerHelper.getUUIDFromPlayer(activator).toString(); //Temporary patch job - - if (!Strings.isNullOrEmpty(crystalOwner) && ritual != null) - { - if (activationCrystal.getItem() instanceof ItemActivationCrystal) - { - int crystalLevel = ((ItemActivationCrystal) activationCrystal.getItem()).getCrystalLevel(activationCrystal); - if (RitualHelper.canCrystalActivate(ritual, crystalLevel)) - { - if (!getWorld().isRemote) - { - SoulNetwork network = NetworkHelper.getSoulNetwork(crystalOwner); - - if (!isRedstoned() && network.getCurrentEssence() < ritual.getActivationCost() && !activator.capabilities.isCreativeMode) - { - ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.weak"); - return false; - } - - if (currentRitual != null) - currentRitual.stopRitual(this, Ritual.BreakType.ACTIVATE); - - RitualEvent.RitualActivatedEvent event = new RitualEvent.RitualActivatedEvent(this, crystalOwner, ritual, activator, activationCrystal, crystalLevel); - - if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - { - ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.prevent"); - return false; - } - - if (ritual.activateRitual(this, activator, crystalOwner)) - { - if (!isRedstoned() && !activator.capabilities.isCreativeMode) - network.syphon(ritual.getActivationCost()); - - ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.activate"); - - this.active = true; - this.owner = crystalOwner; - this.currentRitual = ritual; - - notifyUpdate(); - return true; - } - } - - notifyUpdate(); - return true; - } - } - } else - { - ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.notValid"); - } - - return false; - } - - @Override - public void performRitual(World world, BlockPos pos) - { - if (!world.isRemote && getCurrentRitual() != null && RitualRegistry.ritualEnabled(getCurrentRitual())) - { - if (RitualHelper.checkValidRitual(getWorld(), getPos(), RitualRegistry.getIdForRitual(currentRitual), getDirection())) - { - RitualEvent.RitualRunEvent event = new RitualEvent.RitualRunEvent(this, getOwner(), getCurrentRitual()); - - if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - return; - - getCurrentRitual().performRitual(this); - } else - { - stopRitual(Ritual.BreakType.BREAK_STONE); - } - } - } - - @Override - public void stopRitual(Ritual.BreakType breakType) - { - if (!getWorld().isRemote && getCurrentRitual() != null) - { - RitualEvent.RitualStopEvent event = new RitualEvent.RitualStopEvent(this, getOwner(), getCurrentRitual(), breakType); - - if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - return; - - getCurrentRitual().stopRitual(this, breakType); - if (breakType != Ritual.BreakType.REDSTONE) - { - this.currentRitual = null; - this.active = false; - this.activeTime = 0; - } - notifyUpdate(); - } - } - - @Override - public int getCooldown() - { - return cooldown; - } - - @Override - public void setCooldown(int cooldown) - { - this.cooldown = cooldown; - } - - @Override - public void setActive(boolean active) - { - this.active = active; - } - - @Override - public EnumFacing getDirection() - { - return direction; - } - - @Override - public boolean areTanksEmpty() - { - return false; - } - - @Override - public int getRunningTime() - { - return activeTime; - } - - @Override - public String getOwner() - { - return owner; - } - - @Override - public World getWorld() - { - return super.getWorld(); - } - - @Override - public BlockPos getPos() - { - return super.getPos(); - } - - @Override - public World getWorldObj() - { - return getWorld(); - } - - @Override - public BlockPos getBlockPos() - { - return getPos(); - } - - @Override - public String getNextBlockRange(String range) - { - if (this.currentRitual != null) - { - return this.currentRitual.getNextBlockRange(range); - } - - return ""; - } - - @Override - public void provideInformationOfRitualToPlayer(EntityPlayer player) - { - if (this.currentRitual != null) - { - ChatUtil.sendNoSpam(player, this.currentRitual.provideInformationOfRitualToPlayer(player)); - } - } - - @Override - public void provideInformationOfRangeToPlayer(EntityPlayer player, String range) - { - if (this.currentRitual != null && this.currentRitual.getListOfRanges().contains(range)) - { - ChatUtil.sendNoSpam(player, this.currentRitual.provideInformationOfRangeToPlayer(player, range)); - } - } - - @Override - public void setActiveWillConfig(EntityPlayer player, List typeList) - { - this.currentActiveWillConfig = typeList; - } - - @Override - public boolean setBlockRangeByBounds(EntityPlayer player, String range, BlockPos offset1, BlockPos offset2) - { - if (this.currentRitual != null) - { - boolean allowed = this.currentRitual.setBlockRangeByBounds(range, this, offset1, offset2); - if (player != null && !allowed) - { - ChatUtil.sendNoSpam(player, this.currentRitual.getErrorForBlockRangeOnFail(player, range, this, offset1, offset2)); - } else - { - ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.blockRange.success")); - } - - return allowed; - } - - if (player != null) - { - ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.blockRange.inactive")); - } - - return false; - } - - @Override - public List getActiveWillConfig() - { - return new ArrayList(currentActiveWillConfig); - } - - @Override - public void provideInformationOfWillConfigToPlayer(EntityPlayer player, List typeList) - { - //There is probably an easier way to make expanded chat messages - if (typeList.size() >= 1) - { - Object[] translations = new TextComponentTranslation[typeList.size()]; - String constructedString = "%s"; - - for (int i = 1; i < typeList.size(); i++) - { - constructedString = constructedString + ", %s"; - } - - for (int i = 0; i < typeList.size(); i++) - { - translations[i] = new TextComponentTranslation("tooltip.BloodMagic.currentBaseType." + typeList.get(i).name.toLowerCase()); - } - - ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.willConfig.set", new TextComponentTranslation(constructedString, translations))); - } else - { - ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.willConfig.void")); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileMimic.java b/src/main/java/WayofTime/bloodmagic/tile/TileMimic.java deleted file mode 100644 index 122f3cff..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileMimic.java +++ /dev/null @@ -1,410 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import java.lang.reflect.Field; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityPotion; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryHelper; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.potion.PotionUtils; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.ReflectionHelper; -import WayofTime.bloodmagic.block.BlockMimic; -import WayofTime.bloodmagic.entity.mob.EntityMimic; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.Utils; - -public class TileMimic extends TileInventory implements ITickable -{ - private static Field _blockMetadata = ReflectionHelper.findField(TileEntity.class, "blockMetadata", "field_145847_g"); - - public boolean dropItemsOnBreak = true; - public NBTTagCompound tileTag = new NBTTagCompound(); - public TileEntity mimicedTile = null; - public int metaOfReplacedBlock = 0; - - public int playerCheckRadius = 5; - public int potionSpawnRadius = 5; - public int potionSpawnInterval = 40; - - private int internalCounter = 0; - - public TileMimic() - { - super(2, "mimic"); - } - - @Override - public void update() - { - if (worldObj.isRemote) - { - return; - } - - internalCounter++; - if (internalCounter % potionSpawnInterval == 0 && this.getBlockMetadata() != BlockMimic.sentientMimicMeta) - { - ItemStack potionStack = this.getStackInSlot(1); - if (potionStack != null) - { - AxisAlignedBB bb = new AxisAlignedBB(this.getPos()).expand(playerCheckRadius, playerCheckRadius, playerCheckRadius); - List playerList = worldObj.getEntitiesWithinAABB(EntityPlayer.class, bb); - - for (EntityPlayer player : playerList) - { - if (!player.capabilities.isCreativeMode) - { - double posX = this.pos.getX() + 0.5 + (2 * worldObj.rand.nextDouble() - 1) * potionSpawnRadius; - double posY = this.pos.getY() + 0.5 + (2 * worldObj.rand.nextDouble() - 1) * potionSpawnRadius; - double posZ = this.pos.getZ() + 0.5 + (2 * worldObj.rand.nextDouble() - 1) * potionSpawnRadius; - - ItemStack newStack = new ItemStack(potionStack.getItem() == ModItems.POTION_FLASK ? Items.SPLASH_POTION : potionStack.getItem()); - newStack.setTagCompound(potionStack.getTagCompound()); - - EntityPotion potionEntity = new EntityPotion(worldObj, posX, posY, posZ, newStack); - - worldObj.spawnEntityInWorld(potionEntity); - break; - } - } - } - } - - if (this.getBlockMetadata() == BlockMimic.sentientMimicMeta && worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && !(mimicedTile instanceof IInventory)) - { - AxisAlignedBB bb = new AxisAlignedBB(this.getPos()).expand(playerCheckRadius, playerCheckRadius, playerCheckRadius); - List playerList = worldObj.getEntitiesWithinAABB(EntityPlayer.class, bb); - - for (EntityPlayer player : playerList) - { - if (!player.capabilities.isCreativeMode && Utils.canEntitySeeBlock(worldObj, player, getPos())) - { - spawnMimicEntity(player); - break; - } - } - } - - } - - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side) - { - if (heldItem != null && player.capabilities.isCreativeMode) - { - List list = PotionUtils.getEffectsFromStack(heldItem); - if (list != null && !list.isEmpty()) - { - if (!world.isRemote) - { - setInventorySlotContents(1, heldItem.copy()); - world.notifyBlockUpdate(pos, state, state, 3); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionSet")); - } - return true; - } else if (heldItem.getItem() == ModItems.POTION_FLASK) - { - //The potion flask is empty, therefore we have to reset the stored potion. - if (!world.isRemote) - { - setInventorySlotContents(1, null); - world.notifyBlockUpdate(pos, state, state, 3); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionRemove")); - } - return true; - } - } - - if (performSpecialAbility(player, side)) - { - return true; - } - - if (player.isSneaking()) - return false; - - if (player.getHeldItem(hand) != null && player.getHeldItem(hand).getItem() == new ItemStack(ModBlocks.MIMIC).getItem()) - return false; - - if (getStackInSlot(0) != null && player.getHeldItem(hand) != null) - return false; - - if (!dropItemsOnBreak && !player.capabilities.isCreativeMode) - return false; - - Utils.insertItemToTile(this, player, 0); - this.refreshTileEntity(); - - if (player.capabilities.isCreativeMode) - { - dropItemsOnBreak = getStackInSlot(0) == null; - } - - world.notifyBlockUpdate(pos, state, state, 3); - return true; - } - - public boolean performSpecialAbility(EntityPlayer player, EnumFacing sideHit) - { - switch (this.getBlockMetadata()) - { - case BlockMimic.sentientMimicMeta: - if (player.capabilities.isCreativeMode) - { - if (player.isSneaking()) - { - playerCheckRadius = Math.max(playerCheckRadius - 1, 0); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.down", playerCheckRadius)); - } else - { - playerCheckRadius++; - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.up", playerCheckRadius)); - } - - return false; - } - - return spawnMimicEntity(player); - default: - if (!player.capabilities.isCreativeMode) - { - return false; - } - - if (player.getActiveItemStack() == null && getStackInSlot(1) != null) - { - switch (sideHit) - { - case EAST: //When the block is clicked on the EAST or WEST side, potionSpawnRadius is edited. - case WEST: - if (player.isSneaking()) - { - potionSpawnRadius = Math.max(potionSpawnRadius - 1, 0); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionSpawnRadius.down", potionSpawnRadius)); - } else - { - potionSpawnRadius++; - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionSpawnRadius.up", potionSpawnRadius)); - } - break; - case NORTH: //When the block is clicked on the NORTH or SOUTH side, detectRadius is edited. - case SOUTH: - if (player.isSneaking()) - { - playerCheckRadius = Math.max(playerCheckRadius - 1, 0); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.down", playerCheckRadius)); - } else - { - playerCheckRadius++; - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.up", playerCheckRadius)); - } - break; - case UP: //When the block is clicked on the UP or DOWN side, potionSpawnInterval is edited. - case DOWN: - if (player.isSneaking()) - { - potionSpawnInterval = Math.max(potionSpawnInterval - 1, 1); - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionInterval.down", potionSpawnInterval)); - } else - { - potionSpawnInterval++; - ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionInterval.up", potionSpawnInterval)); - } - break; - default: - break; - - } - - return true; - } - } - return false; - } - - public boolean spawnMimicEntity(EntityPlayer target) - { - if (this.worldObj.getDifficulty() == EnumDifficulty.PEACEFUL) - { - return false; - } - - if (this.getStackInSlot(0) == null || worldObj.isRemote) - { - return false; - } - - EntityMimic mimicEntity = new EntityMimic(worldObj); - mimicEntity.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); - - mimicEntity.initializeMimic(getStackInSlot(0), tileTag, dropItemsOnBreak, metaOfReplacedBlock, playerCheckRadius, pos); - tileTag = null; - mimicedTile = null; - this.setInventorySlotContents(0, null); - - worldObj.spawnEntityInWorld(mimicEntity); - if (target != null) - { - mimicEntity.setAttackTarget(target); - } - - worldObj.setBlockToAir(pos); - - return true; - } - - public void refreshTileEntity() - { - if (mimicedTile != null) - { - dropMimicedTileInventory(); - } - mimicedTile = getTileFromStackWithTag(worldObj, pos, getStackInSlot(0), tileTag, metaOfReplacedBlock); - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - - dropItemsOnBreak = tag.getBoolean("dropItemsOnBreak"); - tileTag = tag.getCompoundTag("tileTag"); - metaOfReplacedBlock = tag.getInteger("metaOfReplacedBlock"); - mimicedTile = getTileFromStackWithTag(worldObj, pos, getStackInSlot(0), tileTag, metaOfReplacedBlock); - playerCheckRadius = tag.getInteger("playerCheckRadius"); - potionSpawnRadius = tag.getInteger("potionSpawnRadius"); - potionSpawnInterval = Math.max(1, tag.getInteger("potionSpawnInterval")); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - - tag.setBoolean("dropItemsOnBreak", dropItemsOnBreak); - tag.setTag("tileTag", tileTag); - tag.setInteger("metaOfReplacedBlock", metaOfReplacedBlock); - tag.setInteger("playerCheckRadius", playerCheckRadius); - tag.setInteger("potionSpawnRadius", potionSpawnRadius); - tag.setInteger("potionSpawnInterval", potionSpawnInterval); - - return tag; - } - - public static void replaceMimicWithBlockActual(TileMimic mimic) - { - World world = mimic.getWorld(); - BlockPos pos = mimic.getPos(); - - replaceMimicWithBlockActual(world, pos, mimic.getStackInSlot(0), mimic.tileTag, mimic.metaOfReplacedBlock); - } - - public static boolean replaceMimicWithBlockActual(World world, BlockPos pos, ItemStack stack, NBTTagCompound tileTag, int replacedMeta) - { - if (stack != null && stack.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) stack.getItem()).getBlock(); - IBlockState state = block.getStateFromMeta(replacedMeta); - if (world.setBlockState(pos, state, 3)) - { - TileEntity tile = world.getTileEntity(pos); - if (tile != null) - { - tileTag.setInteger("x", pos.getX()); - tileTag.setInteger("y", pos.getY()); - tileTag.setInteger("z", pos.getZ()); - tile.readFromNBT(tileTag); - } - - return true; - } - } - - return false; - } - - public static TileEntity getTileFromStackWithTag(World world, BlockPos pos, ItemStack stack, NBTTagCompound tag, int replacementMeta) - { - if (stack != null && stack.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) stack.getItem()).getBlock(); - IBlockState state = block.getStateFromMeta(stack.getItemDamage()); - if (block.hasTileEntity(state)) - { - TileEntity tile = block.createTileEntity(world, state); - - if (tile == null) - return null; - - if (tag != null) - { - NBTTagCompound copyTag = (NBTTagCompound) (tag.copy()); - copyTag.setInteger("x", pos.getX()); - copyTag.setInteger("y", pos.getY()); - copyTag.setInteger("z", pos.getZ()); - tile.readFromNBT(copyTag); - } - - tile.setWorldObj(world); - - try - { - _blockMetadata.setInt(tile, replacementMeta); - } catch (IllegalArgumentException e) - { - e.printStackTrace(); - } catch (IllegalAccessException e) - { - e.printStackTrace(); - } - - return tile; - } - } - - return null; - } - - @Override - public void dropItems() - { - if (dropItemsOnBreak) - { - InventoryHelper.dropInventoryItems(getWorld(), getPos(), this); - } - - dropMimicedTileInventory(); - } - - public void dropMimicedTileInventory() - { - if (!worldObj.isRemote && mimicedTile instanceof IInventory) - { - InventoryHelper.dropInventoryItems(getWorld(), getPos(), (IInventory) mimicedTile); - } - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return slot == 0 && dropItemsOnBreak; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/TilePhantomBlock.java b/src/main/java/WayofTime/bloodmagic/tile/TilePhantomBlock.java deleted file mode 100644 index 4c5b8f76..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TilePhantomBlock.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.tile.base.TileTicking; -import lombok.NoArgsConstructor; -import net.minecraft.nbt.NBTTagCompound; - -@NoArgsConstructor -public class TilePhantomBlock extends TileTicking -{ - private int ticksRemaining = 10; - - public TilePhantomBlock(int ticksRemaining) - { - this.ticksRemaining = ticksRemaining; - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - this.ticksRemaining = tagCompound.getInteger(Constants.NBT.TICKS_REMAINING); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - tagCompound.setInteger(Constants.NBT.TICKS_REMAINING, ticksRemaining); - return tagCompound; - } - - @Override - public void onUpdate() - { - ticksRemaining--; - - if (ticksRemaining <= 0) - { - worldObj.setBlockToAir(getPos()); - worldObj.removeTileEntity(getPos()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TilePlinth.java b/src/main/java/WayofTime/bloodmagic/tile/TilePlinth.java deleted file mode 100644 index bb824969..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TilePlinth.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.tile; - -public class TilePlinth extends TileInventory -{ - public TilePlinth() - { - super(1, "plinth"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TilePurificationAltar.java b/src/main/java/WayofTime/bloodmagic/tile/TilePurificationAltar.java deleted file mode 100644 index 387f5562..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TilePurificationAltar.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import java.util.List; - -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldServer; -import WayofTime.bloodmagic.api.iface.IPurificationAsh; -import WayofTime.bloodmagic.api.ritual.AreaDescriptor; -import WayofTime.bloodmagic.api.util.helper.PurificationHelper; - -public class TilePurificationAltar extends TileInventory implements ITickable -{ - public AreaDescriptor purityArea = new AreaDescriptor.Rectangle(new BlockPos(-5, -5, -5), 11); - - public double totalPurity = 0; - public double maxPurity = 0; - public double purityRate = 0; - - public TilePurificationAltar() - { - super(1, "purificationAltar"); - } - - @Override - public void update() - { - if (totalPurity <= 0) - { - ItemStack stack = this.getStackInSlot(0); - if (stack != null && stack.getItem() instanceof IPurificationAsh) - { - totalPurity = ((IPurificationAsh) stack.getItem()).getTotalPurity(stack); - maxPurity = ((IPurificationAsh) stack.getItem()).getMaxPurity(stack); - purityRate = ((IPurificationAsh) stack.getItem()).getPurityRate(stack); - } - } else - { - return; - } - - AxisAlignedBB aabb = purityArea.getAABB(getPos()); - List animalList = worldObj.getEntitiesWithinAABB(EntityAnimal.class, aabb); - if (animalList.isEmpty()) - { - return; - } - - boolean hasPerformed = false; - - for (EntityAnimal animal : animalList) - { - double added = PurificationHelper.addPurity(animal, Math.min(purityRate, totalPurity), maxPurity); - if (added > 0) - { - totalPurity -= purityRate; - hasPerformed = true; - } - } - - if (hasPerformed) - { - if (worldObj.rand.nextInt(4) == 0 && worldObj instanceof WorldServer) - { - WorldServer server = (WorldServer) worldObj; - server.spawnParticle(EnumParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 1, 0.02, 0.03, 0.02, 0, new int[0]); - } - } - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - totalPurity = tag.getDouble("totalPurity"); - maxPurity = tag.getDouble("maxPurity"); - purityRate = tag.getDouble("purityRate"); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - - tag.setDouble("totalPurity", totalPurity); - tag.setDouble("maxPurity", maxPurity); - tag.setDouble("purityRate", purityRate); - - return tag; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java b/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java deleted file mode 100644 index 183f8516..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java +++ /dev/null @@ -1,339 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillConduit; -import WayofTime.bloodmagic.api.soul.IDemonWillGem; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ITickable; - -import java.util.ArrayList; -import java.util.List; - -public class TileSoulForge extends TileInventory implements ITickable, IDemonWillConduit -{ - public static final int ticksRequired = 100; - public static final double worldWillTransferRate = 1; - - public static final int soulSlot = 4; - public static final int outputSlot = 5; - - //Input slots are from 0 to 3. - - public int burnTime = 0; - - public TileSoulForge() - { - super(6, "soulForge"); - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - - burnTime = tag.getInteger(Constants.NBT.SOUL_FORGE_BURN); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - - tag.setInteger(Constants.NBT.SOUL_FORGE_BURN, burnTime); - return tag; - } - - @Override - public void update() - { - if (!worldObj.isRemote) - { - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - double willInWorld = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - double filled = Math.min(willInWorld, worldWillTransferRate); - - if (filled > 0) - { - filled = this.fillDemonWill(type, filled, false); - filled = WorldDemonWillHandler.drainWill(worldObj, pos, type, filled, false); - - if (filled > 0) - { - this.fillDemonWill(type, filled, true); - WorldDemonWillHandler.drainWill(worldObj, pos, type, filled, true); - } - } - } - } - - if (!hasSoulGemOrSoul()) - { - burnTime = 0; - return; - } - - double soulsInGem = getWill(EnumDemonWillType.DEFAULT); - - List inputList = new ArrayList(); - - for (int i = 0; i < 4; i++) - { - if (getStackInSlot(i) != null) - { - inputList.add(getStackInSlot(i)); - } - } - - TartaricForgeRecipe recipe = TartaricForgeRecipeRegistry.getMatchingRecipe(inputList, getWorld(), getPos()); - if (recipe != null && (soulsInGem >= recipe.getMinimumSouls() || burnTime > 0)) - { - if (canCraft(recipe)) - { - burnTime++; - - if (burnTime == ticksRequired) - { - if (!worldObj.isRemote) - { - double requiredSouls = recipe.getSoulsDrained(); - if (requiredSouls > 0) - { - if (!worldObj.isRemote && soulsInGem >= recipe.getMinimumSouls()) - { - consumeSouls(EnumDemonWillType.DEFAULT, requiredSouls); - } - } - - if (!worldObj.isRemote && soulsInGem >= recipe.getMinimumSouls()) - craftItem(recipe); - } - - burnTime = 0; - } else if (burnTime > ticksRequired + 10) - { - burnTime = 0; - } - } else - { - burnTime = 0; - } - } else - { - burnTime = 0; - } - } - - public double getProgressForGui() - { - return ((double) burnTime) / ticksRequired; - } - - private boolean canCraft(TartaricForgeRecipe recipe) - { - if (recipe == null) - { - return false; - } - - ItemStack outputStack = recipe.getRecipeOutput(); - ItemStack currentOutputStack = getStackInSlot(outputSlot); - if (outputStack == null) - return false; - if (currentOutputStack == null) - return true; - if (!currentOutputStack.isItemEqual(outputStack)) - return false; - int result = currentOutputStack.stackSize + outputStack.stackSize; - return result <= getInventoryStackLimit() && result <= currentOutputStack.getMaxStackSize(); - - } - - public void craftItem(TartaricForgeRecipe recipe) - { - if (this.canCraft(recipe)) - { - ItemStack outputStack = recipe.getRecipeOutput(); - ItemStack currentOutputStack = getStackInSlot(outputSlot); - - if (currentOutputStack == null) - { - setInventorySlotContents(outputSlot, outputStack); - } else if (currentOutputStack.getItem() == currentOutputStack.getItem()) - { - currentOutputStack.stackSize += outputStack.stackSize; - } - - consumeInventory(); - } - } - - public boolean hasSoulGemOrSoul() - { - ItemStack soulStack = getStackInSlot(soulSlot); - - if (soulStack != null) - { - if (soulStack.getItem() instanceof IDemonWill || soulStack.getItem() instanceof IDemonWillGem) - { - return true; - } - } - - return false; - } - - public double getWill(EnumDemonWillType type) - { - ItemStack soulStack = getStackInSlot(soulSlot); - - if (soulStack != null) - { - if (soulStack.getItem() instanceof IDemonWill && ((IDemonWill) soulStack.getItem()).getType(soulStack) == type) - { - IDemonWill soul = (IDemonWill) soulStack.getItem(); - return soul.getWill(type, soulStack); - } - - if (soulStack.getItem() instanceof IDemonWillGem) - { - IDemonWillGem soul = (IDemonWillGem) soulStack.getItem(); - return soul.getWill(type, soulStack); - } - } - - return 0; - } - - public double consumeSouls(EnumDemonWillType type, double requested) - { - ItemStack soulStack = getStackInSlot(soulSlot); - - if (soulStack != null) - { - if (soulStack.getItem() instanceof IDemonWill && ((IDemonWill) soulStack.getItem()).getType(soulStack) == type) - { - IDemonWill soul = (IDemonWill) soulStack.getItem(); - double souls = soul.drainWill(type, soulStack, requested); - if (soul.getWill(type, soulStack) <= 0) - { - setInventorySlotContents(soulSlot, null); - } - return souls; - } - - if (soulStack.getItem() instanceof IDemonWillGem) - { - IDemonWillGem soul = (IDemonWillGem) soulStack.getItem(); - return soul.drainWill(type, soulStack, requested, true); - } - } - - return 0; - } - - public void consumeInventory() - { - for (int i = 0; i < 4; i++) - { - ItemStack inputStack = getStackInSlot(i); - if (inputStack != null) - { - if (inputStack.getItem().hasContainerItem(inputStack)) - { - setInventorySlotContents(i, inputStack.getItem().getContainerItem(inputStack)); - continue; - } - - inputStack.stackSize--; - if (inputStack.stackSize <= 0) - { - setInventorySlotContents(i, null); - continue; - } - } - } - } - - @Override - public int getWeight() - { - return 50; - } - - @Override - public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) - { - if (amount <= 0) - { - return 0; - } - - if (!canFill(type)) - { - return 0; - } - - ItemStack stack = this.getStackInSlot(soulSlot); - if (stack == null || !(stack.getItem() instanceof IDemonWillGem)) - { - return 0; - } - - IDemonWillGem willGem = (IDemonWillGem) stack.getItem(); - - double filled = willGem.fillWill(type, stack, amount, doFill); - - return filled; - } - - @Override - public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) - { - ItemStack stack = this.getStackInSlot(soulSlot); - if (stack == null || !(stack.getItem() instanceof IDemonWillGem)) - { - return 0; - } - - IDemonWillGem willGem = (IDemonWillGem) stack.getItem(); - - double drained = amount; - double current = willGem.getWill(type, stack); - if (current < drained) - { - drained = current; - } - - if (doDrain) - { - drained = willGem.drainWill(type, stack, drained, true); - } - - return drained; - } - - @Override - public boolean canFill(EnumDemonWillType type) - { - return true; - } - - @Override - public boolean canDrain(EnumDemonWillType type) - { - return true; - } - - @Override - public double getCurrentWill(EnumDemonWillType type) - { - return 0; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileSpectralBlock.java b/src/main/java/WayofTime/bloodmagic/tile/TileSpectralBlock.java deleted file mode 100644 index c8eafe62..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileSpectralBlock.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.base.TileTicking; -import com.google.common.base.Strings; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.ForgeRegistries; - -public class TileSpectralBlock extends TileTicking -{ - private int ticksRemaining; - private String containedBlockName; - private int containedBlockMeta; - - public TileSpectralBlock() - { - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - ticksRemaining = tagCompound.getInteger(Constants.NBT.TICKS_REMAINING); - containedBlockName = tagCompound.getString(Constants.NBT.CONTAINED_BLOCK_NAME); - containedBlockMeta = tagCompound.getInteger(Constants.NBT.CONTAINED_BLOCK_META); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - tagCompound.setInteger(Constants.NBT.TICKS_REMAINING, ticksRemaining); - tagCompound.setString(Constants.NBT.CONTAINED_BLOCK_NAME, Strings.isNullOrEmpty(containedBlockName) ? "" : containedBlockName); - tagCompound.setInteger(Constants.NBT.CONTAINED_BLOCK_META, containedBlockMeta); - return tagCompound; - } - - @Override - public void onUpdate() - { - if (worldObj.isRemote) - { - return; - } - - ticksRemaining--; - - if (ticksRemaining <= 0) - { - returnContainedBlock(); - } - } - - private void setContainedBlockInfo(IBlockState blockState) - { - containedBlockName = blockState.getBlock().getRegistryName().toString(); - containedBlockMeta = blockState.getBlock().getMetaFromState(blockState); - } - - private void setDuration(int duration) - { - ticksRemaining = duration; - } - - public void resetDuration(int reset) - { - if (ticksRemaining < reset) - ticksRemaining = reset; - } - - public void returnContainedBlock() - { - Block block = null; - - if (!Strings.isNullOrEmpty(containedBlockName)) - block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(containedBlockName)); - - if (block != null && worldObj.setBlockState(pos, block.getStateFromMeta(containedBlockMeta))) - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); - } - - public static void createSpectralBlock(World world, BlockPos blockPos, int duration) - { - if (world.isAirBlock(blockPos)) - return; - IBlockState cachedState = world.getBlockState(blockPos); - world.setBlockState(blockPos, ModBlocks.SPECTRAL_BLOCK.getDefaultState()); - TileSpectralBlock tile = (TileSpectralBlock) world.getTileEntity(blockPos); - tile.setContainedBlockInfo(cachedState); - tile.setDuration(duration); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java b/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java deleted file mode 100644 index fc016bb3..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java +++ /dev/null @@ -1,155 +0,0 @@ -package WayofTime.bloodmagic.tile; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.TeleposeEvent; -import WayofTime.bloodmagic.api.teleport.TeleportQueue; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.block.BlockTeleposer; -import WayofTime.bloodmagic.item.ItemTelepositionFocus; -import WayofTime.bloodmagic.ritual.portal.Teleports; -import WayofTime.bloodmagic.util.Utils; -import com.google.common.base.Strings; -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; - -import java.util.List; - -public class TileTeleposer extends TileInventory implements ITickable -{ - //TODO FUTURE: Make AreaDescriptor for Teleposer perhaps? - public static final String TELEPOSER_RANGE = "teleposerRange"; - - private int previousInput; - - public TileTeleposer() - { - super(1, "teleposer"); - } - - @Override - public void deserialize(NBTTagCompound tagCompound) - { - super.deserialize(tagCompound); - previousInput = tagCompound.getInteger(Constants.NBT.PREVIOUS_INPUT); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - super.serialize(tagCompound); - tagCompound.setInteger(Constants.NBT.PREVIOUS_INPUT, previousInput); - return tagCompound; - } - - @Override - public void update() - { - if (!worldObj.isRemote) - { - int currentInput = worldObj.getStrongPower(pos); - - if (previousInput == 0 && currentInput != 0) - { - initiateTeleport(); - } - - previousInput = currentInput; - } - } - - public void initiateTeleport() - { - if (!worldObj.isRemote && worldObj.getTileEntity(pos) != null && worldObj.getTileEntity(pos) instanceof TileTeleposer && canInitiateTeleport((TileTeleposer) worldObj.getTileEntity(pos)) && worldObj.getBlockState(pos).getBlock() instanceof BlockTeleposer) - { - TileTeleposer teleposer = (TileTeleposer) worldObj.getTileEntity(pos); - ItemStack focusStack = NBTHelper.checkNBT(teleposer.getStackInSlot(0)); - ItemTelepositionFocus focus = (ItemTelepositionFocus) focusStack.getItem(); - BlockPos focusPos = focus.getBlockPos(teleposer.getStackInSlot(0)); - World focusWorld = focus.getWorld(teleposer.getStackInSlot(0)); - - if (focusWorld != null && focusWorld.getTileEntity(focusPos) instanceof TileTeleposer && !focusWorld.getTileEntity(focusPos).equals(this)) - { - final int focusLevel = (teleposer.getStackInSlot(0).getItemDamage() + 1); - final int lpToBeDrained = (int) (0.5F * Math.sqrt((pos.getX() - focusPos.getX()) * (pos.getX() - focusPos.getX()) + (pos.getY() - focusPos.getY() + 1) * (pos.getY() - focusPos.getY() + 1) + (pos.getZ() - focusPos.getZ()) * (pos.getZ() - focusPos.getZ()))); - - if (NetworkHelper.getSoulNetwork(focus.getOwnerUUID(focusStack)).syphonAndDamage(PlayerHelper.getPlayerFromUUID(focus.getOwnerUUID(focusStack)), lpToBeDrained * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1))) - { - int blocksTransported = 0; - - for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) - { - for (int j = 0; j <= (focusLevel * 2 - 2); j++) - { - for (int k = -(focusLevel - 1); k <= (focusLevel - 1); k++) - { - TeleposeEvent event = new TeleposeEvent(worldObj, pos.add(i, 1 + j, k), focusWorld, focusPos.add(i, 1 + j, k)); - if (Utils.swapLocations(event.initalWorld, event.initialBlockPos, event.finalWorld, event.finalBlockPos) && !MinecraftForge.EVENT_BUS.post(event)) - { - blocksTransported++; - } - } - } - } - - NetworkHelper.syphonFromContainer(focusStack, lpToBeDrained * blocksTransported); - - List originalWorldEntities; - List focusWorldEntities; - AxisAlignedBB originalArea = new AxisAlignedBB(pos.getX(), pos.getY() + 1, pos.getZ(), pos.getX() + 1, Math.min(focusWorld.getHeight(), pos.getY() + 2 * focusLevel), pos.getZ() + 1).expand(focusLevel - 1, 0, focusLevel - 1); - originalWorldEntities = worldObj.getEntitiesWithinAABB(Entity.class, originalArea); - AxisAlignedBB focusArea = new AxisAlignedBB(focusPos.getX(), focusPos.getY() + 1, focusPos.getZ(), focusPos.getX() + 1, Math.min(focusWorld.getHeight(), focusPos.getY() + 2 * focusLevel), focusPos.getZ() + 1).expand(focusLevel - 1, 0, focusLevel - 1); - focusWorldEntities = focusWorld.getEntitiesWithinAABB(Entity.class, focusArea); - - if (focusWorld.equals(worldObj)) - { - if (!originalWorldEntities.isEmpty()) - { - for (Entity entity : originalWorldEntities) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), true)); - } - } - - if (!focusWorldEntities.isEmpty()) - { - for (Entity entity : focusWorldEntities) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), true)); - } - } - } else - { - if (!originalWorldEntities.isEmpty()) - { - for (Entity entity : originalWorldEntities) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), worldObj, focusWorld.provider.getDimension(), true)); - } - } - - if (!focusWorldEntities.isEmpty()) - { - for (Entity entity : focusWorldEntities) - { - TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), focusWorld, worldObj.provider.getDimension(), true)); - } - } - } - } - } - } - } - - private boolean canInitiateTeleport(TileTeleposer teleposer) - { - return teleposer.getStackInSlot(0) != null && teleposer.getStackInSlot(0).getItem() instanceof ItemTelepositionFocus && !Strings.isNullOrEmpty(((ItemTelepositionFocus) teleposer.getStackInSlot(0).getItem()).getOwnerName(teleposer.getStackInSlot(0))); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/base/TileBase.java b/src/main/java/WayofTime/bloodmagic/tile/base/TileBase.java deleted file mode 100644 index 138d4719..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/base/TileBase.java +++ /dev/null @@ -1,124 +0,0 @@ -package WayofTime.bloodmagic.tile.base; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -/** - * Base tile class. - * - * Handles data syncing and core data writing/reading. - */ -public class TileBase extends TileEntity -{ - @Override - public final void readFromNBT(NBTTagCompound compound) - { - super.readFromNBT(compound); - deserializeBase(compound); - deserialize(compound); - } - - @Override - public final NBTTagCompound writeToNBT(NBTTagCompound compound) - { - super.writeToNBT(compound); - serializeBase(compound); - return serialize(compound); - } - - /** - * Called by {@link #readFromNBT(NBTTagCompound)} - * - * Internal data (such as coordinates) are handled for you. Just read the data you need. - * - * @param tagCompound - The tag compound to read from - */ - public void deserialize(NBTTagCompound tagCompound) - { - - } - - /** - * Package private method for reading base data from the tag compound. - * - * @see TileTicking - * - * @param tagCompound - The tag compound to read from - */ - void deserializeBase(NBTTagCompound tagCompound) - { - - } - - /** - * Called by {@link #writeToNBT(NBTTagCompound)} - * - * Internal data (such as coordinates) are handled for you. Just read the data you need. - * - * @param tagCompound - The tag compound to write to. - * @return the modified tag compound - */ - public NBTTagCompound serialize(NBTTagCompound tagCompound) - { - return tagCompound; - } - - - /** - * Package private method for writing base data to the tag compound. - * - * @see TileTicking - * - * @param tagCompound - The tag compound to write to. - * @return the modified tag compound - */ - NBTTagCompound serializeBase(NBTTagCompound tagCompound) - { - return tagCompound; - } - - public void notifyUpdate() { - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); - } - - // Data syncing - - @Override - public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) - { - return oldState.getBlock() != newState.getBlock(); - } - - @Override - public final SPacketUpdateTileEntity getUpdatePacket() - { - return new SPacketUpdateTileEntity(getPos(), -999, writeToNBT(new NBTTagCompound())); - } - - @Override - @SideOnly(Side.CLIENT) - public final void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) - { - super.onDataPacket(net, pkt); - readFromNBT(pkt.getNbtCompound()); - } - - @Override - public final NBTTagCompound getUpdateTag() - { - return writeToNBT(new NBTTagCompound()); - } - - @Override - public final void handleUpdateTag(NBTTagCompound tag) - { - readFromNBT(tag); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/base/TileTicking.java b/src/main/java/WayofTime/bloodmagic/tile/base/TileTicking.java deleted file mode 100644 index 83ccaab6..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/base/TileTicking.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.bloodmagic.tile.base; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ITickable; - -/** - * Base class for tiles that tick. Allows disabling the ticking programmatically. - */ -// TODO - Move implementations that depend on existed ticks to new methods from here. -public abstract class TileTicking extends TileBase implements ITickable -{ - private int ticksExisted; - private boolean shouldTick = true; - - @Override - public final void update() - { - if (shouldTick()) { - ticksExisted++; - onUpdate(); - } - } - - @Override - void deserializeBase(NBTTagCompound tagCompound) - { - this.ticksExisted = tagCompound.getInteger("ticksExisted"); - this.shouldTick = tagCompound.getBoolean("shouldTick"); - } - - @Override - NBTTagCompound serializeBase(NBTTagCompound tagCompound) - { - tagCompound.setInteger("ticksExisted", getTicksExisted()); - tagCompound.setBoolean("shouldTick", shouldTick()); - return tagCompound; - } - - /** - * Called every tick that {@link #shouldTick()} is true. - */ - public abstract void onUpdate(); - - public int getTicksExisted() - { - return ticksExisted; - } - - public void resetLifetime() - { - ticksExisted = 0; - } - - public boolean shouldTick() - { - return shouldTick; - } - - public void setShouldTick(boolean shouldTick) - { - this.shouldTick = shouldTick; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerAlchemyTable.java b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerAlchemyTable.java deleted file mode 100644 index 79e2923d..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerAlchemyTable.java +++ /dev/null @@ -1,149 +0,0 @@ -package WayofTime.bloodmagic.tile.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ClickType; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.tile.TileAlchemyTable; - -public class ContainerAlchemyTable extends Container -{ - private final IInventory tileTable; - - public ContainerAlchemyTable(InventoryPlayer inventoryPlayer, IInventory tileTable) - { - this.tileTable = tileTable; - this.addSlotToContainer(new Slot(tileTable, 0, 62, 15)); - this.addSlotToContainer(new Slot(tileTable, 1, 80, 51)); - this.addSlotToContainer(new Slot(tileTable, 2, 62, 87)); - this.addSlotToContainer(new Slot(tileTable, 3, 26, 87)); - this.addSlotToContainer(new Slot(tileTable, 4, 8, 51)); - this.addSlotToContainer(new Slot(tileTable, 5, 26, 15)); - this.addSlotToContainer(new Slot(tileTable, TileAlchemyTable.toolSlot, 152, 33)); - this.addSlotToContainer(new SlotOrb(tileTable, TileAlchemyTable.orbSlot, 152, 69)); - this.addSlotToContainer(new SlotOutput(tileTable, TileAlchemyTable.outputSlot, 44, 51)); - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 123 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 181)); - } - } - - @Override - public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) - { - InventoryPlayer inventoryPlayer = player.inventory; - - if (slotId < 6 && slotId >= 0) - { - Slot slot = this.getSlot(slotId); - if (!slot.getHasStack() && inventoryPlayer.getItemStack() == null) - { - ((TileAlchemyTable) tileTable).toggleInputSlotAccessible(slotId); - } - } - - return super.slotClick(slotId, dragType, clickTypeIn, player); - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) - { - ItemStack itemstack = null; - Slot slot = this.inventorySlots.get(index); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (index == 8) - { - if (!this.mergeItemStack(itemstack1, 9, 9 + 36, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } else if (index > 8) - { - if (itemstack1.getItem() instanceof IBloodOrb) - { - if (!this.mergeItemStack(itemstack1, 7, 8, false)) //TODO: Add alchemy tools to list - { - return null; - } - } else if (!this.mergeItemStack(itemstack1, 0, 6, false)) - { - return null; - } - } else if (!this.mergeItemStack(itemstack1, 9, 9 + 36, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack(null); - } else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(playerIn, itemstack1); - } - - return itemstack; - } - - @Override - public boolean canInteractWith(EntityPlayer playerIn) - { - return this.tileTable.isUseableByPlayer(playerIn); - } - - private class SlotOrb extends Slot - { - public SlotOrb(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof IBloodOrb; - } - } - - private class SlotOutput extends Slot - { - public SlotOutput(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack stack) - { - return false; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerItemRoutingNode.java deleted file mode 100644 index c422d24c..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerItemRoutingNode.java +++ /dev/null @@ -1,271 +0,0 @@ -package WayofTime.bloodmagic.tile.container; - -import javax.annotation.Nullable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ClickType; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.item.inventory.ItemInventory; -import WayofTime.bloodmagic.item.routing.IItemFilterProvider; -import WayofTime.bloodmagic.tile.routing.TileFilteredRoutingNode; -import WayofTime.bloodmagic.util.GhostItemHelper; - -public class ContainerItemRoutingNode extends Container -{ - private final IInventory tileItemRoutingNode; -// private final ItemInventory itemInventory; - private int slotsOccupied; - - private final TileFilteredRoutingNode inventory; - - public int lastGhostSlotClicked = -1; - - public ContainerItemRoutingNode(InventoryPlayer inventoryPlayer, IInventory tileItemRoutingNode) - { - this.tileItemRoutingNode = tileItemRoutingNode; - inventory = (TileFilteredRoutingNode) tileItemRoutingNode; - - this.addSlotToContainer(new SlotItemFilter(this, tileItemRoutingNode, 0, 8, 33)); - ItemInventory itemInventory = inventory.itemInventory; - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - { - addSlotToContainer(new SlotGhostItem(itemInventory, j + i * 3, 26 + j * 18, 15 + i * 18)); - } - } - - slotsOccupied = 10; - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 87 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 145)); - } - } - - public void resetItemInventory(ItemStack masterStack) - { - inventory.itemInventory.initializeInventory(masterStack); - } - - /** - * Overridden in order to handle ghost item slots. - */ - @Override - public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) - { - InventoryPlayer inventoryPlayer = player.inventory; -// if (!player.worldObj.isRemote) - { - if (slotId >= 0) - { - Slot slot = this.inventorySlots.get(slotId); - - if (slot instanceof SlotGhostItem) //TODO: make the slot clicking work! - { - lastGhostSlotClicked = slot.getSlotIndex(); - - if ((dragType == 0 || dragType == 1)) - { - ItemStack slotStack = slot.getStack(); - ItemStack heldStack = inventoryPlayer.getItemStack(); - - if (dragType == 0) //Left mouse click-eth - { - { - if (heldStack == null && slotStack != null) - { - //I clicked on the slot with an empty hand. Selecting! - } else if (heldStack != null && slotStack == null) - { - if (!((SlotGhostItem) slot).canBeAccessed()) - { - return super.slotClick(slotId, dragType, clickTypeIn, player); - } - - ItemStack copyStack = heldStack.copy(); - GhostItemHelper.setItemGhostAmount(copyStack, 0); - copyStack.stackSize = 1; - slot.putStack(copyStack); - } - } - } else - //Right mouse click-eth away - { - slot.putStack(null); - } - } - } - } - } - - return super.slotClick(slotId, dragType, clickTypeIn, player); - } - - @Override - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) - { - ItemStack itemstack = null; - Slot slot = this.inventorySlots.get(index); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (index == 0) - { - if (!this.mergeItemStack(itemstack1, slotsOccupied, slotsOccupied + 36, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } else if (index > 0) - { -// return null; - if (itemstack1.getItem() instanceof IItemFilterProvider) // Change to check item is a filter - { - if (!this.mergeItemStack(itemstack1, 0, 1, false)) - { - return null; - } - } - } else if (!this.mergeItemStack(itemstack1, 0 + slotsOccupied, 36 + slotsOccupied, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack(null); - } else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(playerIn, itemstack1); - } - - return itemstack; - } - - @Override - public boolean canInteractWith(EntityPlayer playerIn) - { - return this.tileItemRoutingNode.isUseableByPlayer(playerIn); - } - - private class SlotItemFilter extends Slot - { - public ContainerItemRoutingNode container; - public TileFilteredRoutingNode inventory; - - public SlotItemFilter(ContainerItemRoutingNode container, IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - this.container = container; - this.inventory = (TileFilteredRoutingNode) inventory; - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof IItemFilterProvider; //TODO: Create a new Item that holds the filter. - } - - @Override - public void onSlotChanged() - { - super.onSlotChanged(); - container.resetItemInventory(getStack()); - for (int i = 1; i <= 9; i++) - { - Slot slot = container.getSlot(i); - slot.onSlotChanged(); - } - } - - @Override - public ItemStack getStack() - { - return this.inventory.getStackInSlot(getActiveSlot()); - } - - @Override - public void putStack(@Nullable ItemStack stack) - { - this.inventory.setInventorySlotContents(getActiveSlot(), stack); - this.onSlotChanged(); - } - - @Override - public ItemStack decrStackSize(int amount) - { - return this.inventory.decrStackSize(getActiveSlot(), amount); - } - - public int getActiveSlot() - { - return inventory.currentActiveSlot; - } - } - - private class SlotGhostItem extends Slot - { - private ItemInventory itemInv; - - public SlotGhostItem(ItemInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - itemInv = inventory; - } - - @Override - public boolean isItemValid(ItemStack stack) - { - return false; - } - - @Override - public boolean canTakeStack(EntityPlayer playerIn) - { - return false; - } - -// @Override -// public boolean isHere(IInventory inv, int slotIn) -// { -// return itemInv.canInventoryBeManipulated() && super.isHere(inv, slotIn); -// } - - public boolean canBeAccessed() - { - return itemInv.canInventoryBeManipulated(); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerMasterRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerMasterRoutingNode.java deleted file mode 100644 index 77121ecf..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerMasterRoutingNode.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.tile.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; - -public class ContainerMasterRoutingNode extends Container -{ - private final IInventory tileMasterRoutingNode; - - public ContainerMasterRoutingNode(InventoryPlayer inventoryPlayer, IInventory tileMasterRoutingNode) - { - this.tileMasterRoutingNode = tileMasterRoutingNode; - - } - - @Override - public boolean canInteractWith(EntityPlayer playerIn) - { - return this.tileMasterRoutingNode.isUseableByPlayer(playerIn); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java deleted file mode 100644 index 85497373..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java +++ /dev/null @@ -1,129 +0,0 @@ -package WayofTime.bloodmagic.tile.container; - -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillGem; -import WayofTime.bloodmagic.tile.TileSoulForge; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerSoulForge extends Container -{ - private final IInventory tileForge; - - public ContainerSoulForge(InventoryPlayer inventoryPlayer, IInventory tileForge) - { - this.tileForge = tileForge; - this.addSlotToContainer(new Slot(tileForge, 0, 8, 15)); - this.addSlotToContainer(new Slot(tileForge, 1, 80, 15)); - this.addSlotToContainer(new Slot(tileForge, 2, 80, 87)); - this.addSlotToContainer(new Slot(tileForge, 3, 8, 87)); - this.addSlotToContainer(new SlotSoul(tileForge, TileSoulForge.soulSlot, 152, 51)); - this.addSlotToContainer(new SlotOutput(tileForge, TileSoulForge.outputSlot, 44, 51)); - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 123 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 181)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) - { - ItemStack itemstack = null; - Slot slot = this.inventorySlots.get(index); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (index == 5) - { - if (!this.mergeItemStack(itemstack1, 6, 6 + 36, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } else if (index > 5) - { - if (itemstack1.getItem() instanceof IDemonWill || itemstack1.getItem() instanceof IDemonWillGem) - { - if (!this.mergeItemStack(itemstack1, 4, 5, false)) - { - return null; - } - } else if (!this.mergeItemStack(itemstack1, 0, 4, false)) - { - return null; - } - } else if (!this.mergeItemStack(itemstack1, 6, 42, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack(null); - } else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(playerIn, itemstack1); - } - - return itemstack; - } - - @Override - public boolean canInteractWith(EntityPlayer playerIn) - { - return this.tileForge.isUseableByPlayer(playerIn); - } - - private class SlotSoul extends Slot - { - public SlotSoul(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof IDemonWillGem || itemStack.getItem() instanceof IDemonWill; - } - } - - private class SlotOutput extends Slot - { - public SlotOutput(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack stack) - { - return false; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerTeleposer.java b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerTeleposer.java deleted file mode 100644 index 2b3e93eb..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerTeleposer.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.bloodmagic.tile.container; - -import WayofTime.bloodmagic.item.ItemTelepositionFocus; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerTeleposer extends Container -{ - private final IInventory tileTeleposer; - - public ContainerTeleposer(InventoryPlayer inventoryPlayer, IInventory tileTeleposer) - { - this.tileTeleposer = tileTeleposer; - this.addSlotToContainer(new SlotTeleposer(tileTeleposer, 0, 80, 33)); - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 57 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 115)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slot) - { - ItemStack stack = null; - Slot slotObject = inventorySlots.get(slot); - int slots = inventorySlots.size(); - - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - - if (stack.getItem() instanceof ItemTelepositionFocus) - { - if (slot <= slots) - { - if (!this.mergeItemStack(stackInSlot, 0, slots, false)) - { - return null; - } - } else if (!this.mergeItemStack(stackInSlot, slots, 36 + slots, false)) - { - return null; - } - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } - - @Override - public boolean canInteractWith(EntityPlayer playerIn) - { - return this.tileTeleposer.isUseableByPlayer(playerIn); - } - - private class SlotTeleposer extends Slot - { - public SlotTeleposer(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof ItemTelepositionFocus; - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/package-info.java b/src/main/java/WayofTime/bloodmagic/tile/container/package-info.java deleted file mode 100644 index a249a1d0..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/container/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.tile.container; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/package-info.java b/src/main/java/WayofTime/bloodmagic/tile/package-info.java deleted file mode 100644 index 25a795be..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.tile; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/TileFilteredRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/routing/TileFilteredRoutingNode.java deleted file mode 100644 index a6ae7453..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/TileFilteredRoutingNode.java +++ /dev/null @@ -1,139 +0,0 @@ -package WayofTime.bloodmagic.tile.routing; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.EnumFacing; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.item.inventory.ItemInventory; -import WayofTime.bloodmagic.util.GhostItemHelper; - -public class TileFilteredRoutingNode extends TileRoutingNode implements ISidedInventory -{ - public int currentActiveSlot = 0; - public int[] priorities = new int[6]; - - public ItemInventory itemInventory = new ItemInventory(null, 9, ""); - - public TileFilteredRoutingNode(int size, String name) - { - super(size, name); - } - - public ItemStack getFilterStack(EnumFacing side) - { - int index = side.getIndex(); - - return getStackInSlot(index); - } - - public void setGhostItemAmount(int ghostItemSlot, int amount) - { - ItemStack stack = itemInventory.getStackInSlot(ghostItemSlot); - if (stack != null) - { - GhostItemHelper.setItemGhostAmount(stack, amount); - } - - this.markDirty(); - } - - @Override - public boolean isInventoryConnectedToSide(EnumFacing side) - { - return true; - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - currentActiveSlot = tag.getInteger("currentSlot"); - priorities = tag.getIntArray(Constants.NBT.ROUTING_PRIORITY); - if (priorities.length != 6) - { - priorities = new int[6]; - } - - if (!tag.getBoolean("updated")) - { - NBTTagList tags = tag.getTagList("Items", 10); - inventory = new ItemStack[getSizeInventory()]; - for (int i = 0; i < tags.tagCount(); i++) - { - if (!isSyncedSlot(i)) - { - NBTTagCompound data = tags.getCompoundTagAt(i); - byte j = data.getByte("Slot"); - - if (j == 0) - { - inventory[currentActiveSlot] = ItemStack.loadItemStackFromNBT(data); - } else if (j >= 1 && j < inventory.length + 1) - { - inventory[j - 1] = ItemStack.loadItemStackFromNBT(data); - } - } - } - } - - itemInventory = new ItemInventory(getStackInSlot(currentActiveSlot), 9, ""); - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - tag.setInteger("currentSlot", currentActiveSlot); - tag.setIntArray(Constants.NBT.ROUTING_PRIORITY, priorities); - tag.setBoolean("updated", true); - return tag; - } - - public void swapFilters(int requestedSlot) - { - currentActiveSlot = requestedSlot; - itemInventory.initializeInventory(getStackInSlot(currentActiveSlot)); - this.markDirty(); - } - - @Override - public int[] getSlotsForFace(EnumFacing side) - { - return new int[0]; - } - - @Override - public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) - { - return false; - } - - @Override - public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) - { - return false; - } - - @Override - public int getPriority(EnumFacing side) - { - return priorities[side.getIndex()]; - } - - public void incrementCurrentPriotiryToMaximum(int max) - { - priorities[currentActiveSlot] = Math.min(priorities[currentActiveSlot] + 1, max); - IBlockState state = worldObj.getBlockState(pos); - worldObj.notifyBlockUpdate(pos, state, state, 3); - } - - public void decrementCurrentPriority() - { - priorities[currentActiveSlot] = Math.max(priorities[currentActiveSlot] - 1, 0); - IBlockState state = worldObj.getBlockState(pos); - worldObj.notifyBlockUpdate(pos, state, state, 3); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/TileInputRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/routing/TileInputRoutingNode.java deleted file mode 100644 index 3ac56f0b..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/TileInputRoutingNode.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.bloodmagic.tile.routing; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.item.routing.IItemFilterProvider; -import WayofTime.bloodmagic.routing.DefaultItemFilter; -import WayofTime.bloodmagic.routing.IInputItemRoutingNode; -import WayofTime.bloodmagic.routing.IItemFilter; -import WayofTime.bloodmagic.util.Utils; - -public class TileInputRoutingNode extends TileFilteredRoutingNode implements IInputItemRoutingNode -{ - public TileInputRoutingNode() - { - super(6, "inputNode"); - } - - @Override - public boolean isInput(EnumFacing side) - { - return true; - } - - @Override - public IItemFilter getInputFilterForSide(EnumFacing side) - { - TileEntity tile = worldObj.getTileEntity(pos.offset(side)); - if (tile != null) - { - IItemHandler handler = Utils.getInventory(tile, side.getOpposite()); - if (handler != null) - { - ItemStack filterStack = this.getFilterStack(side); - - if (filterStack == null || !(filterStack.getItem() instanceof IItemFilterProvider)) - { - IItemFilter filter = new DefaultItemFilter(); - filter.initializeFilter(null, tile, handler, false); - return filter; - } - - IItemFilterProvider filter = (IItemFilterProvider) filterStack.getItem(); - return filter.getInputItemFilter(filterStack, tile, handler); - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/TileItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/routing/TileItemRoutingNode.java deleted file mode 100644 index 01ef2372..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/TileItemRoutingNode.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.bloodmagic.tile.routing; - -public class TileItemRoutingNode extends TileRoutingNode -{ - public TileItemRoutingNode() - { - super(0, "itemNode"); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/TileMasterRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/routing/TileMasterRoutingNode.java deleted file mode 100644 index 0bebb147..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/TileMasterRoutingNode.java +++ /dev/null @@ -1,416 +0,0 @@ -package WayofTime.bloodmagic.tile.routing; - -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.TreeMap; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.routing.IInputItemRoutingNode; -import WayofTime.bloodmagic.routing.IItemFilter; -import WayofTime.bloodmagic.routing.IMasterRoutingNode; -import WayofTime.bloodmagic.routing.IOutputItemRoutingNode; -import WayofTime.bloodmagic.routing.IRoutingNode; -import WayofTime.bloodmagic.routing.NodeHelper; -import WayofTime.bloodmagic.tile.TileInventory; - -public class TileMasterRoutingNode extends TileInventory implements IMasterRoutingNode, ITickable -{ - private int currentInput; - - public TileMasterRoutingNode() - { - super(0, "masterRoutingNode"); - } - - // A list of connections - private TreeMap> connectionMap = new TreeMap>(); - private List generalNodeList = new LinkedList(); - private List outputNodeList = new LinkedList(); - private List inputNodeList = new LinkedList(); - - public static final int tickRate = 20; - - @Override - public void update() - { - if (!worldObj.isRemote) - { -// currentInput = worldObj.isBlockIndirectlyGettingPowered(pos); - currentInput = worldObj.getStrongPower(pos); - -// System.out.println(currentInput); - } - - if (worldObj.isRemote || worldObj.getTotalWorldTime() % tickRate != 0) //Temporary tick rate solver - { - return; - } - - Map> outputMap = new TreeMap>(); - - for (BlockPos outputPos : outputNodeList) - { - TileEntity outputTile = worldObj.getTileEntity(outputPos); - if (outputTile instanceof IOutputItemRoutingNode && this.isConnected(new LinkedList(), outputPos)) - { - IOutputItemRoutingNode outputNode = (IOutputItemRoutingNode) outputTile; - - for (EnumFacing facing : EnumFacing.VALUES) - { - if (!outputNode.isInventoryConnectedToSide(facing) || !outputNode.isOutput(facing)) - { - continue; - } - - IItemFilter filter = outputNode.getOutputFilterForSide(facing); - if (filter != null) - { - int priority = outputNode.getPriority(facing); - if (outputMap.containsKey(priority)) - { - outputMap.get(priority).add(filter); - } else - { - List filterList = new LinkedList(); - filterList.add(filter); - outputMap.put(priority, filterList); - } - } - } - } - } - - Map> inputMap = new TreeMap>(); - - for (BlockPos inputPos : inputNodeList) - { - TileEntity inputTile = worldObj.getTileEntity(inputPos); - if (inputTile instanceof IInputItemRoutingNode && this.isConnected(new LinkedList(), inputPos)) - { - IInputItemRoutingNode inputNode = (IInputItemRoutingNode) inputTile; - - for (EnumFacing facing : EnumFacing.VALUES) - { - if (!inputNode.isInventoryConnectedToSide(facing) || !inputNode.isInput(facing)) - { - continue; - } - - IItemFilter filter = inputNode.getInputFilterForSide(facing); - if (filter != null) - { - int priority = inputNode.getPriority(facing); - if (inputMap.containsKey(priority)) - { - inputMap.get(priority).add(filter); - } else - { - List filterList = new LinkedList(); - filterList.add(filter); - inputMap.put(priority, filterList); - } - } - } - } - } - - int maxTransfer = this.getMaxTransferForDemonWill(WorldDemonWillHandler.getCurrentWill(worldObj, pos, EnumDemonWillType.DEFAULT)); - - for (Entry> outputEntry : outputMap.entrySet()) - { - List outputList = outputEntry.getValue(); - for (IItemFilter outputFilter : outputList) - { - for (Entry> inputEntry : inputMap.entrySet()) - { - List inputList = inputEntry.getValue(); - for (IItemFilter inputFilter : inputList) - { - maxTransfer -= inputFilter.transferThroughInputFilter(outputFilter, maxTransfer); - if (maxTransfer <= 0) - { - return; - } - } - } - } - } - } - - public int getMaxTransferForDemonWill(double will) - { - return 8; - } - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - NBTTagList tags = new NBTTagList(); - for (BlockPos pos : generalNodeList) - { - NBTTagCompound posTag = new NBTTagCompound(); - posTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - posTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - posTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - tags.appendTag(posTag); - } - tag.setTag(Constants.NBT.ROUTING_MASTER_GENERAL, tags); - - tags = new NBTTagList(); - for (BlockPos pos : inputNodeList) - { - NBTTagCompound posTag = new NBTTagCompound(); - posTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - posTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - posTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - tags.appendTag(posTag); - } - tag.setTag(Constants.NBT.ROUTING_MASTER_INPUT, tags); - - tags = new NBTTagList(); - for (BlockPos pos : outputNodeList) - { - NBTTagCompound posTag = new NBTTagCompound(); - posTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - posTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - posTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - tags.appendTag(posTag); - } - tag.setTag(Constants.NBT.ROUTING_MASTER_OUTPUT, tags); - return tag; - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - - NBTTagList tags = tag.getTagList(Constants.NBT.ROUTING_MASTER_GENERAL, 10); - for (int i = 0; i < tags.tagCount(); i++) - { - NBTTagCompound blockTag = tags.getCompoundTagAt(i); - BlockPos newPos = new BlockPos(blockTag.getInteger(Constants.NBT.X_COORD), blockTag.getInteger(Constants.NBT.Y_COORD), blockTag.getInteger(Constants.NBT.Z_COORD)); - generalNodeList.add(newPos); - } - - tags = tag.getTagList(Constants.NBT.ROUTING_MASTER_INPUT, 10); - for (int i = 0; i < tags.tagCount(); i++) - { - NBTTagCompound blockTag = tags.getCompoundTagAt(i); - BlockPos newPos = new BlockPos(blockTag.getInteger(Constants.NBT.X_COORD), blockTag.getInteger(Constants.NBT.Y_COORD), blockTag.getInteger(Constants.NBT.Z_COORD)); - inputNodeList.add(newPos); - } - - tags = tag.getTagList(Constants.NBT.ROUTING_MASTER_OUTPUT, 10); - for (int i = 0; i < tags.tagCount(); i++) - { - NBTTagCompound blockTag = tags.getCompoundTagAt(i); - BlockPos newPos = new BlockPos(blockTag.getInteger(Constants.NBT.X_COORD), blockTag.getInteger(Constants.NBT.Y_COORD), blockTag.getInteger(Constants.NBT.Z_COORD)); - outputNodeList.add(newPos); - } - } - - @Override - public boolean isConnected(List path, BlockPos nodePos) - { - //TODO: Figure out how to make it so the path is obtained -// if (!connectionMap.containsKey(nodePos)) -// { -// return false; -// } - TileEntity tile = worldObj.getTileEntity(nodePos); - if (!(tile instanceof IRoutingNode)) - { -// connectionMap.remove(nodePos); - return false; - } - - IRoutingNode node = (IRoutingNode) tile; - List connectionList = node.getConnected(); -// List testPath = path.subList(0, path.size()); - path.add(nodePos); - for (BlockPos testPos : connectionList) - { - if (path.contains(testPos)) - { - continue; - } - - if (testPos.equals(this.getPos()) && node.isConnectionEnabled(testPos)) - { -// path.clear(); -// path.addAll(testPath); - return true; - } else if (NodeHelper.isNodeConnectionEnabled(worldObj, node, testPos)) - { - if (isConnected(path, testPos)) - { -// path.clear(); -// path.addAll(testPath); - return true; - } - } - } - - return false; - } - - @Override - public boolean isConnectionEnabled(BlockPos testPos) - { - return currentInput <= 0; - } - - @Override - public void addNodeToList(IRoutingNode node) - { - BlockPos newPos = node.getBlockPos(); - if (!generalNodeList.contains(newPos)) - { - generalNodeList.add(newPos); - } - if (node instanceof IInputItemRoutingNode && !inputNodeList.contains(newPos)) - { - inputNodeList.add(newPos); - } - if (node instanceof IOutputItemRoutingNode && !outputNodeList.contains(newPos)) - { - outputNodeList.add(newPos); - } - } - - @Override - public void addConnections(BlockPos pos, List connectionList) - { - for (BlockPos testPos : connectionList) - { - addConnection(pos, testPos); - } - } - - @Override - public void addConnection(BlockPos pos1, BlockPos pos2) - { - if (connectionMap.containsKey(pos1) && !connectionMap.get(pos1).contains(pos2)) - { - connectionMap.get(pos1).add(pos2); - } else - { - List list = new LinkedList(); - list.add(pos2); - connectionMap.put(pos1, list); - } - - if (connectionMap.containsKey(pos2) && !connectionMap.get(pos2).contains(pos1)) - { - connectionMap.get(pos2).add(pos1); - } else - { - List list = new LinkedList(); - list.add(pos1); - connectionMap.put(pos2, list); - } - } - - @Override - public void removeConnection(BlockPos pos1, BlockPos pos2) - { - if (connectionMap.containsKey(pos1)) - { - List posList = connectionMap.get(pos1); - posList.remove(pos2); - if (posList.isEmpty()) - { - connectionMap.remove(pos1); - } - } - - if (connectionMap.containsKey(pos2)) - { - List posList = connectionMap.get(pos2); - posList.remove(pos1); - if (posList.isEmpty()) - { - connectionMap.remove(pos2); - } - } - } - - @Override - public void connectMasterToRemainingNode(World world, List alreadyChecked, IMasterRoutingNode master) - { - return; - } - - @Override - public BlockPos getBlockPos() - { - return this.getPos(); - } - - @Override - public List getConnected() - { - return new LinkedList(); - } - - @Override - public BlockPos getMasterPos() - { - return this.getPos(); - } - - @Override - public boolean isMaster(IMasterRoutingNode master) - { - return false; - } - - @Override - public void addConnection(BlockPos pos1) - { - // Empty - } - - @Override - public void removeConnection(BlockPos pos1) - { - generalNodeList.remove(pos1); - inputNodeList.remove(pos1); - outputNodeList.remove(pos1); - } - - @Override - public void removeAllConnections() - { - List list = generalNodeList.subList(0, generalNodeList.size()); - Iterator itr = list.iterator(); - while (itr.hasNext()) - { - BlockPos testPos = itr.next(); - TileEntity tile = worldObj.getTileEntity(testPos); - if (tile instanceof IRoutingNode) - { - ((IRoutingNode) tile).removeConnection(pos); - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(testPos), getWorld().getBlockState(testPos), 3); - } - - itr.remove(); - inputNodeList.remove(testPos); - outputNodeList.remove(testPos); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/TileOutputRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/routing/TileOutputRoutingNode.java deleted file mode 100644 index a538eebb..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/TileOutputRoutingNode.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.bloodmagic.tile.routing; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.items.IItemHandler; -import WayofTime.bloodmagic.item.routing.IItemFilterProvider; -import WayofTime.bloodmagic.routing.DefaultItemFilter; -import WayofTime.bloodmagic.routing.IItemFilter; -import WayofTime.bloodmagic.routing.IOutputItemRoutingNode; -import WayofTime.bloodmagic.util.Utils; - -public class TileOutputRoutingNode extends TileFilteredRoutingNode implements IOutputItemRoutingNode -{ - public TileOutputRoutingNode() - { - super(6, "outputNode"); - } - - @Override - public boolean isOutput(EnumFacing side) - { - return true; - } - - @Override - public IItemFilter getOutputFilterForSide(EnumFacing side) - { - TileEntity tile = worldObj.getTileEntity(pos.offset(side)); - if (tile != null) - { - IItemHandler handler = Utils.getInventory(tile, side.getOpposite()); - if (handler != null) - { - ItemStack filterStack = this.getFilterStack(side); - - if (filterStack == null || !(filterStack.getItem() instanceof IItemFilterProvider)) - { - IItemFilter filter = new DefaultItemFilter(); - filter.initializeFilter(null, tile, handler, true); - return filter; - } - - IItemFilterProvider filter = (IItemFilterProvider) filterStack.getItem(); - return filter.getOutputItemFilter(filterStack, tile, handler); - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/TileRoutingNode.java b/src/main/java/WayofTime/bloodmagic/tile/routing/TileRoutingNode.java deleted file mode 100644 index 2dfadd98..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/TileRoutingNode.java +++ /dev/null @@ -1,206 +0,0 @@ -package WayofTime.bloodmagic.tile.routing; - -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.routing.IItemRoutingNode; -import WayofTime.bloodmagic.routing.IMasterRoutingNode; -import WayofTime.bloodmagic.routing.IRoutingNode; -import WayofTime.bloodmagic.tile.TileInventory; - -public class TileRoutingNode extends TileInventory implements IRoutingNode, IItemRoutingNode, ITickable -{ - private int currentInput; - - public TileRoutingNode(int size, String name) - { - super(size, name); - } - - @Override - public void update() - { - if (!worldObj.isRemote) - { - currentInput = worldObj.isBlockIndirectlyGettingPowered(pos); -// currentInput = worldObj.getStrongPower(pos); - } - } - - private BlockPos masterPos = BlockPos.ORIGIN; - private List connectionList = new LinkedList(); - - @Override - public NBTTagCompound serialize(NBTTagCompound tag) - { - super.serialize(tag); - NBTTagCompound masterTag = new NBTTagCompound(); - masterTag.setInteger(Constants.NBT.X_COORD, masterPos.getX()); - masterTag.setInteger(Constants.NBT.Y_COORD, masterPos.getY()); - masterTag.setInteger(Constants.NBT.Z_COORD, masterPos.getZ()); - tag.setTag(Constants.NBT.ROUTING_MASTER, masterTag); - - NBTTagList tags = new NBTTagList(); - for (BlockPos pos : connectionList) - { - NBTTagCompound posTag = new NBTTagCompound(); - posTag.setInteger(Constants.NBT.X_COORD, pos.getX()); - posTag.setInteger(Constants.NBT.Y_COORD, pos.getY()); - posTag.setInteger(Constants.NBT.Z_COORD, pos.getZ()); - tags.appendTag(posTag); - } - tag.setTag(Constants.NBT.ROUTING_CONNECTION, tags); - return tag; - } - - @Override - public void deserialize(NBTTagCompound tag) - { - super.deserialize(tag); - connectionList.clear(); - NBTTagCompound masterTag = tag.getCompoundTag(Constants.NBT.ROUTING_MASTER); - masterPos = new BlockPos(masterTag.getInteger(Constants.NBT.X_COORD), masterTag.getInteger(Constants.NBT.Y_COORD), masterTag.getInteger(Constants.NBT.Z_COORD)); - - NBTTagList tags = tag.getTagList(Constants.NBT.ROUTING_CONNECTION, 10); - for (int i = 0; i < tags.tagCount(); i++) - { - NBTTagCompound blockTag = tags.getCompoundTagAt(i); - BlockPos newPos = new BlockPos(blockTag.getInteger(Constants.NBT.X_COORD), blockTag.getInteger(Constants.NBT.Y_COORD), blockTag.getInteger(Constants.NBT.Z_COORD)); - connectionList.add(newPos); - } - } - - @Override - public void removeAllConnections() - { - TileEntity testTile = worldObj.getTileEntity(getMasterPos()); - if (testTile instanceof IMasterRoutingNode) - { - ((IMasterRoutingNode) testTile).removeConnection(pos); // Remove this node from the master - } - for (BlockPos testPos : connectionList) - { - TileEntity tile = worldObj.getTileEntity(testPos); - if (tile instanceof IRoutingNode) - { - ((IRoutingNode) tile).removeConnection(pos); - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(testPos), getWorld().getBlockState(testPos), 3); - } - } - - connectionList.clear(); - } - - @Override - public void connectMasterToRemainingNode(World world, List alreadyChecked, IMasterRoutingNode master) - { - this.masterPos = master.getBlockPos(); - List connectedList = this.getConnected(); - for (BlockPos testPos : connectedList) - { - if (alreadyChecked.contains(testPos)) - { - continue; - } - alreadyChecked.add(testPos); - TileEntity tile = world.getTileEntity(testPos); - if (!(tile instanceof IRoutingNode)) - { - continue; - } - IRoutingNode node = (IRoutingNode) tile; - if (node.getMasterPos().equals(BlockPos.ORIGIN)) //If getMasterPos() returns the origin, the node is not connected to any master. - { - master.addNodeToList(node); - node.connectMasterToRemainingNode(world, alreadyChecked, master); - } - } - - master.addConnections(this.getBlockPos(), connectedList); - } - - @Override - public BlockPos getBlockPos() - { - return this.getPos(); - } - - @Override - public List getConnected() - { - return connectionList; - } - - @Override - public BlockPos getMasterPos() - { - return masterPos; - } - - @Override - public boolean isMaster(IMasterRoutingNode master) - { - BlockPos checkPos = master.getBlockPos(); - return checkPos.equals(getMasterPos()); - } - - @Override - public boolean isConnectionEnabled(BlockPos testPos) - { - return currentInput <= 0; - } - - @Override - public void addConnection(BlockPos pos1) - { - if (!connectionList.contains(pos1)) - { - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); - connectionList.add(pos1); - } - } - - @Override - public void removeConnection(BlockPos pos1) - { - if (connectionList.contains(pos1)) - { - connectionList.remove(pos1); - getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); - } - - if (pos1.equals(masterPos)) - { - this.masterPos = BlockPos.ORIGIN; - } - } - - @Override - public boolean isInventoryConnectedToSide(EnumFacing side) - { - return false; - } - - @Override - public int getPriority(EnumFacing side) - { - return 0; - } - - @Override - @SideOnly(Side.CLIENT) - public double getMaxRenderDistanceSquared() - { - return 10000; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/tile/routing/package-info.java b/src/main/java/WayofTime/bloodmagic/tile/routing/package-info.java deleted file mode 100644 index 6156b264..00000000 --- a/src/main/java/WayofTime/bloodmagic/tile/routing/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.tile.routing; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/util/ChatUtil.java b/src/main/java/WayofTime/bloodmagic/util/ChatUtil.java deleted file mode 100644 index d3b022e4..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/ChatUtil.java +++ /dev/null @@ -1,270 +0,0 @@ -package WayofTime.bloodmagic.util; - -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.util.helper.TextHelper; -import io.netty.buffer.ByteBuf; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiNewChat; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentString; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraftforge.fml.common.network.ByteBufUtils; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; - -public class ChatUtil -{ - private static final int DELETION_ID = 2525277; - private static int lastAdded; - - private static void sendNoSpamMessages(ITextComponent[] messages) - { - GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); - for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++) - { - chat.deleteChatLine(i); - } - for (int i = 0; i < messages.length; i++) - { - chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i); - } - lastAdded = DELETION_ID + messages.length - 1; - } - - /** - * Returns a standard {@link TextComponentString} for the given - * {@link String} . - * - * @param s - * The string to wrap. - * - * @return An {@link ITextComponent} containing the string. - */ - public static ITextComponent wrap(String s) - { - return new TextComponentString(s); - } - - /** - * @see #wrap(String) - */ - public static ITextComponent[] wrap(String... s) - { - ITextComponent[] ret = new ITextComponent[s.length]; - for (int i = 0; i < ret.length; i++) - { - ret[i] = wrap(s[i]); - } - return ret; - } - - /** - * Returns a translatable chat component for the given string and format - * args. - * - * @param s - * The string to format - * @param args - * The args to apply to the format - */ - public static ITextComponent wrapFormatted(String s, Object... args) - { - return new TextComponentTranslation(s, args); - } - - /** - * Simply sends the passed lines to the player in a chat message. - * - * @param player - * The player to send the chat to - * @param lines - * The lines to send - */ - public static void sendChat(EntityPlayer player, String... lines) - { - sendChat(player, wrap(lines)); - } - - /** - * Localizes the lines before sending them. - * - * @see #sendChat(EntityPlayer, String...) - */ - public static void sendChatUnloc(EntityPlayer player, String... unlocLines) - { - sendChat(player, TextHelper.localizeAll(unlocLines)); - } - - /** - * Sends all passed chat components to the player. - * - * @param player - * The player to send the chat lines to. - * @param lines - * The {@link ITextComponent chat components} to send.yes - */ - public static void sendChat(EntityPlayer player, ITextComponent... lines) - { - for (ITextComponent c : lines) - { - player.addChatComponentMessage(c); - } - } - - /** - * Localizes the strings before sending them. - * - * @see #sendNoSpamClient(String...) - */ - public static void sendNoSpamClientUnloc(String... unlocLines) - { - sendNoSpamClient(TextHelper.localizeAll(unlocLines)); - } - - /** - * Same as {@link #sendNoSpamClient(ITextComponent...)}, but wraps the - * Strings automatically. - * - * @param lines - * The chat lines to send - * - * @see #wrap(String) - */ - public static void sendNoSpamClient(String... lines) - { - sendNoSpamClient(wrap(lines)); - } - - /** - * Skips the packet sending, unsafe to call on servers. - * - * @see #sendNoSpam(EntityPlayerMP, ITextComponent...) - */ - public static void sendNoSpamClient(ITextComponent... lines) - { - sendNoSpamMessages(lines); - } - - /** - * Localizes the strings before sending them. - * - * @see #sendNoSpam(EntityPlayer, String...) - */ - public static void sendNoSpamUnloc(EntityPlayer player, String... unlocLines) - { - sendNoSpam(player, TextHelper.localizeAll(unlocLines)); - } - - /** - * @see #wrap(String) - * @see #sendNoSpam(EntityPlayer, ITextComponent...) - */ - public static void sendNoSpam(EntityPlayer player, String... lines) - { - sendNoSpam(player, wrap(lines)); - } - - /** - * First checks if the player is instanceof {@link EntityPlayerMP} before - * casting. - * - * @see #sendNoSpam(EntityPlayerMP, ITextComponent...) - */ - public static void sendNoSpam(EntityPlayer player, ITextComponent... lines) - { - if (player instanceof EntityPlayerMP) - { - sendNoSpam((EntityPlayerMP) player, lines); - } - } - - /** - * Localizes the strings before sending them. - * - * @see #sendNoSpam(EntityPlayerMP, String...) - */ - public static void sendNoSpamUnloc(EntityPlayerMP player, String... unlocLines) - { - sendNoSpam(player, TextHelper.localizeAll(unlocLines)); - } - - /** - * @see #wrap(String) - * @see #sendNoSpam(EntityPlayerMP, ITextComponent...) - */ - public static void sendNoSpam(EntityPlayerMP player, String... lines) - { - sendNoSpam(player, wrap(lines)); - } - - /** - * Sends a chat message to the client, deleting past messages also sent via - * this method. - * - * Credit to RWTema for the idea - * - * @param player - * The player to send the chat message to - * @param lines - * The chat lines to send. - */ - public static void sendNoSpam(EntityPlayerMP player, ITextComponent... lines) - { - if (lines.length > 0) - BloodMagicPacketHandler.INSTANCE.sendTo(new PacketNoSpamChat(lines), player); - } - - /** - * @author tterrag1098 - * - * Ripped from EnderCore (and slightly altered) - */ - public static class PacketNoSpamChat implements IMessage - { - private ITextComponent[] chatLines; - - public PacketNoSpamChat() - { - chatLines = new ITextComponent[0]; - } - - private PacketNoSpamChat(ITextComponent... lines) - { - // this is guaranteed to be >1 length by accessing methods - this.chatLines = lines; - } - - @Override - public void toBytes(ByteBuf buf) - { - buf.writeInt(chatLines.length); - for (ITextComponent c : chatLines) - { - ByteBufUtils.writeUTF8String(buf, ITextComponent.Serializer.componentToJson(c)); - } - } - - @Override - public void fromBytes(ByteBuf buf) - { - chatLines = new ITextComponent[buf.readInt()]; - for (int i = 0; i < chatLines.length; i++) - { - chatLines[i] = ITextComponent.Serializer.jsonToComponent(ByteBufUtils.readUTF8String(buf)); - } - } - - public static class Handler implements IMessageHandler - { - @Override - public IMessage onMessage(PacketNoSpamChat message, MessageContext ctx) - { - sendNoSpamMessages(message.chatLines); - return null; - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/GhostItemHelper.java b/src/main/java/WayofTime/bloodmagic/util/GhostItemHelper.java deleted file mode 100644 index 4b899b49..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/GhostItemHelper.java +++ /dev/null @@ -1,66 +0,0 @@ -package WayofTime.bloodmagic.util; - -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GhostItemHelper -{ - public static void setItemGhostAmount(ItemStack stack, int amount) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - tag.setInteger(Constants.NBT.GHOST_STACK_SIZE, amount); - } - - public static int getItemGhostAmount(ItemStack stack) - { - NBTHelper.checkNBT(stack); - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getInteger(Constants.NBT.GHOST_STACK_SIZE); - } - - public static boolean hasGhostAmount(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - return false; - } - - NBTTagCompound tag = stack.getTagCompound(); - return tag.hasKey(Constants.NBT.GHOST_STACK_SIZE); - } - - public static void incrementGhostAmout(ItemStack stack, int value) - { - int amount = getItemGhostAmount(stack); - amount += value; - setItemGhostAmount(stack, amount); - } - - public static void decrementGhostAmount(ItemStack stack, int value) - { - int amount = getItemGhostAmount(stack); - amount -= value; - setItemGhostAmount(stack, amount); - } - - public static ItemStack getStackFromGhost(ItemStack ghostStack) - { - ItemStack newStack = ghostStack.copy(); - NBTHelper.checkNBT(newStack); - NBTTagCompound tag = newStack.getTagCompound(); - int amount = getItemGhostAmount(ghostStack); - tag.removeTag(Constants.NBT.GHOST_STACK_SIZE); - if (tag.hasNoTags()) - { - newStack.setTagCompound(null); - } - newStack.stackSize = amount; - - return newStack; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/Utils.java b/src/main/java/WayofTime/bloodmagic/util/Utils.java deleted file mode 100644 index 5d3e89d6..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/Utils.java +++ /dev/null @@ -1,1189 +0,0 @@ -package WayofTime.bloodmagic.util; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Set; -import java.util.UUID; - -import javax.annotation.Nullable; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockLiquid; -import net.minecraft.block.BlockPortal; -import net.minecraft.block.state.IBlockState; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.init.MobEffects; -import net.minecraft.init.SoundEvents; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fluids.IFluidBlock; -import net.minecraftforge.fml.common.discovery.ASMDataTable; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.InvWrapper; -import net.minecraftforge.items.wrapper.SidedInvWrapper; -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.api.BlockStack; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.altar.EnumAltarComponent; -import WayofTime.bloodmagic.api.iface.IDemonWillViewer; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.network.PlayerVelocityPacketProcessor; -import WayofTime.bloodmagic.registry.ModBlocks; -import WayofTime.bloodmagic.tile.TileInventory; - -import com.google.common.collect.Iterables; - -public class Utils -{ - public static float addAbsorptionToMaximum(EntityLivingBase entity, float added, int maximum, int duration) - { - float currentAmount = entity.getAbsorptionAmount(); - added = Math.min(maximum - currentAmount, added); - - if (added <= 0) - { - return 0; - } - - if (duration > 0) - { - int potionLevel = (int) ((currentAmount + added) / 4); - entity.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, duration, potionLevel, true, false)); - } - - entity.setAbsorptionAmount(currentAmount + added); - - return added; - } - - public static Item getItem(ResourceLocation resource) - { - return Item.REGISTRY.getObject(resource); - } - - public static Block getBlock(ResourceLocation resource) - { - return Block.REGISTRY.getObject(resource); - } - - public static ResourceLocation getResourceForItem(ItemStack stack) - { - if (stack != null) - { - if (stack.getItem() instanceof ItemBlock) - { - return Block.REGISTRY.getNameForObject(((ItemBlock) stack.getItem()).getBlock()); - } else - { - return Item.REGISTRY.getNameForObject(stack.getItem()); - } - } - - return null; - } - - public static boolean isImmuneToFireDamage(EntityLivingBase entity) - { - return entity.isImmuneToFire() || entity.isPotionActive(MobEffects.FIRE_RESISTANCE); - } - - public static boolean isPlayerBesideSolidBlockFace(EntityPlayer player) - { - World world = player.worldObj; - double minimumDistanceFromAxis = 0.7; - BlockPos centralPos = player.getPosition(); - for (EnumFacing facing : EnumFacing.HORIZONTALS) - { - BlockPos offsetPos = centralPos.offset(facing); - double distance = Math.min(offsetPos.getX() + 0.5 - player.posX, offsetPos.getZ() + 0.5 - player.posZ); - if (distance > minimumDistanceFromAxis) - { - continue; - } - IBlockState state = world.getBlockState(offsetPos); - if (state.isSideSolid(world, offsetPos, facing.getOpposite())) - { - return true; - } - } - - return false; - } - - public static boolean canPlayerSeeDemonWill(EntityPlayer player) - { - ItemStack[] mainInventory = player.inventory.mainInventory; - - for (ItemStack stack : mainInventory) - { - if (stack == null) - { - continue; - } - - if (stack.getItem() instanceof IDemonWillViewer && ((IDemonWillViewer) stack.getItem()).canSeeDemonWillAura(player.worldObj, stack, player)) - { - return true; - } - } - - return false; - } - - public static boolean canEntitySeeBlock(World world, Entity entity, BlockPos pos) - { - Vec3d relativePosition = new Vec3d(entity.posX - pos.getX() - 0.5, entity.posY + (double) entity.getEyeHeight() - pos.getY() - 0.5, entity.posZ - pos.getZ() - 0.5); - EnumFacing dir = EnumFacing.getFacingFromVector((float) relativePosition.xCoord, (float) relativePosition.yCoord, (float) relativePosition.zCoord); - RayTraceResult result = world.rayTraceBlocks(new Vec3d(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ), new Vec3d(pos.getX() + 0.5 + dir.getFrontOffsetX() * 0.4, pos.getY() + 0.5 + dir.getFrontOffsetY() * 0.4, pos.getZ() + 0.5 + dir.getFrontOffsetZ() * 0.4), false, true, true); - if (result != null) - { - return pos.equals(result.getBlockPos()); - } - - return result != null; - } - - public static int plantSeedsInArea(World world, AxisAlignedBB aabb, int horizontalRadius, int verticalRadius) - { - int placedBlocks = 0; - List itemEntities = world.getEntitiesWithinAABB(EntityItem.class, aabb); - - for (EntityItem itemEntity : itemEntities) - { - placedBlocks += plantEntityItem(itemEntity, horizontalRadius, verticalRadius); - } - - return placedBlocks; - } - - public static int plantItemStack(World world, BlockPos centralPos, ItemStack stack, int horizontalRadius, int verticalRadius) - { - if (stack == null || stack.stackSize <= 0) - { - return 0; - } - - Item item = stack.getItem(); - if (!(item instanceof IPlantable)) - { - return 0; - } - - int planted = 0; - - for (int hR = 0; hR <= horizontalRadius; hR++) - { - for (int vR = 0; vR <= verticalRadius; vR++) - { - for (int i = -hR; i <= hR; i++) - { - for (int k = -hR; k <= hR; k++) - { - for (int j = -vR; j <= vR; j += 2 * vR + (vR > 0 ? 0 : 1)) - { - if (!(Math.abs(i) == hR || Math.abs(k) == hR)) - { - continue; - } - - BlockPos newPos = centralPos.add(i, j, k); - if (world.isAirBlock(newPos)) - { - BlockPos offsetPos = newPos.offset(EnumFacing.DOWN); - IBlockState state = world.getBlockState(offsetPos); - if (state.getBlock().canSustainPlant(state, world, offsetPos, EnumFacing.UP, (IPlantable) item)) - { - IBlockState plantState = ((IPlantable) item).getPlant(world, newPos); - world.setBlockState(newPos, plantState, 3); - world.playEvent(2001, newPos, Block.getIdFromBlock(plantState.getBlock()) + (plantState.getBlock().getMetaFromState(plantState) << 12)); - stack.stackSize--; - planted++; - if (stack.stackSize <= 0) - { - return planted; - } - } - } - } - } - } - } - } - - return planted; - } - - public static int plantEntityItem(EntityItem itemEntity, int horizontalRadius, int verticalRadius) - { - if (itemEntity == null || itemEntity.isDead) - { - return 0; - } - - World world = itemEntity.worldObj; - BlockPos pos = itemEntity.getPosition(); - ItemStack stack = itemEntity.getEntityItem(); - - int planted = plantItemStack(world, pos, stack, horizontalRadius, verticalRadius); - - if (stack.stackSize <= 0) - { - itemEntity.setDead(); - } - - return planted; - } - - public static int getDemonWillResolution(EntityPlayer player) - { - ItemStack[] mainInventory = player.inventory.mainInventory; - - for (ItemStack stack : mainInventory) - { - if (stack == null) - { - continue; - } - - if (stack.getItem() instanceof IDemonWillViewer && ((IDemonWillViewer) stack.getItem()).canSeeDemonWillAura(player.worldObj, stack, player)) - { - return ((IDemonWillViewer) stack.getItem()).getDemonWillAuraResolution(player.worldObj, stack, player); - } - } - - return 1; - } - - public static NBTTagCompound getPersistentDataTag(EntityPlayer player) - { - NBTTagCompound forgeData = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); - NBTTagCompound beaconData = forgeData.getCompoundTag("BloodMagic"); - - //Creates/sets the tags if they don't exist - if (!forgeData.hasKey("BloodMagic")) - forgeData.setTag("BloodMagic", beaconData); - if (!player.getEntityData().hasKey(EntityPlayer.PERSISTED_NBT_TAG)) - player.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, forgeData); - - return beaconData; - } - - public static void setPlayerSpeedFromServer(EntityPlayer player, double motionX, double motionY, double motionZ) - { - if (!player.worldObj.isRemote && player instanceof EntityPlayerMP) - { - BloodMagicPacketHandler.sendTo(new PlayerVelocityPacketProcessor(motionX, motionY, motionZ), (EntityPlayerMP) player); - } - } - - public static boolean isInteger(String integer) - { - try - { - Integer.parseInt(integer); - } catch (NumberFormatException e) - { - return false; - } catch (NullPointerException e) - { - return false; - } - // only got here if we didn't return false - return true; - } - - public static String toFancyCasing(String input) - { - return String.valueOf(input.charAt(0)).toUpperCase(Locale.ENGLISH) + input.substring(1); - } - - public static String prettifyBlockPosString(BlockPos pos) - { - return "[" + pos.getX() + ", " + pos.getY() + ", " + pos.getZ() + "]"; - } - - /** - * @param tile - * - The {@link TileInventory} to input the item to - * @param player - * - The player to take the item from. - * @return {@code true} if the ItemStack is inserted, {@code false} - * otherwise - * @see #insertItemToTile(TileInventory, EntityPlayer, int) - */ - public static boolean insertItemToTile(TileInventory tile, EntityPlayer player) - { - return insertItemToTile(tile, player, 0); - } - - /** - * Used for inserting an ItemStack with a stacksize of 1 to a tile's - * inventory at slot 0 - *

- * EG: Block Altar - * - * @param tile - * - The {@link TileInventory} to input the item to - * @param player - * - The player to take the item from. - * @param slot - * - The slot to attempt to insert to - * @return {@code true} if the ItemStack is inserted, {@code false} - * otherwise - */ - public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot) - { - if (tile.getStackInSlot(slot) == null && player.getHeldItemMainhand() != null) - { - ItemStack input = player.getHeldItemMainhand().copy(); - input.stackSize = 1; - player.getHeldItemMainhand().stackSize--; - tile.setInventorySlotContents(slot, input); - return true; - } else if (tile.getStackInSlot(slot) != null && player.getHeldItemMainhand() == null) - { - if (!tile.getWorld().isRemote) - { - EntityItem invItem = new EntityItem(tile.getWorld(), player.posX, player.posY + 0.25, player.posZ, tile.getStackInSlot(slot)); - tile.getWorld().spawnEntityInWorld(invItem); - } - tile.clear(); - return false; - } - - return false; - } - - public static double calculateStandardProgress(Number currentValue, int[] requiredValues, int currentLevel) - { - int nextLevel = currentLevel + 1; - if (nextLevel >= requiredValues.length) - return 1.0D; - - int required = requiredValues[nextLevel]; - return Double.parseDouble("" + currentValue) / (double) required; - } - - @Nullable - public static IItemHandler getInventory(TileEntity tile, @Nullable EnumFacing facing) - { - if (facing == null) - facing = EnumFacing.DOWN; - - IItemHandler itemHandler = null; - - if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing)) - itemHandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing); - else if (tile instanceof ISidedInventory) - itemHandler = ((ISidedInventory) tile).getSlotsForFace(facing).length != 0 ? new SidedInvWrapper((ISidedInventory) tile, facing) : null; - else if (tile instanceof IInventory) - itemHandler = new InvWrapper((IInventory) tile); - - return itemHandler; - } - - public static ItemStack setUnbreakable(ItemStack stack) - { - NBTHelper.checkNBT(stack); - stack.getTagCompound().setBoolean("Unbreakable", true); - return stack; - } - - /** - * Gets a default block for each type of {@link EnumAltarComponent} - * - * @param component - * - The Component to provide a block for. - * @return The default Block for the EnumAltarComponent - */ - public static Block getBlockForComponent(EnumAltarComponent component) - { - switch (component) - { - case GLOWSTONE: - return Blocks.GLOWSTONE; - case BLOODSTONE: - return ModBlocks.BLOOD_STONE; - case BEACON: - return Blocks.BEACON; - case BLOODRUNE: - return ModBlocks.BLOOD_RUNE; - case CRYSTAL: - return ModBlocks.CRYSTAL; - case NOTAIR: - return Blocks.STONEBRICK; - default: - return Blocks.AIR; - } - } - - public static float getModifiedDamage(EntityLivingBase attackedEntity, DamageSource source, float amount) - { - if (!attackedEntity.isEntityInvulnerable(source)) - { - if (amount <= 0) - return 0; - - amount = applyArmor(attackedEntity, Iterables.toArray(attackedEntity.getEquipmentAndArmor(), ItemStack.class), source, amount); - if (amount <= 0) - return 0; - amount = applyPotionDamageCalculations(attackedEntity, source, amount); - - return amount; - } - - return 0; - } - - public static float applyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage) - { - damage *= 25; - ArrayList dmgVals = new ArrayList(); - for (int x = 0; x < inventory.length; x++) - { - ItemStack stack = inventory[x]; - if (stack == null) - { - continue; - } - ArmorProperties prop = null; - if (stack.getItem() instanceof ISpecialArmor) - { - ISpecialArmor armor = (ISpecialArmor) stack.getItem(); - prop = armor.getProperties(entity, stack, source, damage / 25D, x).copy(); - } else if (stack.getItem() instanceof ItemArmor && !source.isUnblockable()) - { - ItemArmor armor = (ItemArmor) stack.getItem(); - prop = new ArmorProperties(0, armor.damageReduceAmount / 25D, Integer.MAX_VALUE); - } - if (prop != null) - { - prop.Slot = x; - dmgVals.add(prop); - } - } - if (dmgVals.size() > 0) - { - ArmorProperties[] props = dmgVals.toArray(new ArmorProperties[dmgVals.size()]); - int level = props[0].Priority; - double ratio = 0; - for (ArmorProperties prop : props) - { - if (level != prop.Priority) - { - damage -= (damage * ratio); - ratio = 0; - level = prop.Priority; - } - ratio += prop.AbsorbRatio; - - } - damage -= (damage * ratio); - } - - return (float) (damage / 25.0F); - } - - public static float applyPotionDamageCalculations(EntityLivingBase attackedEntity, DamageSource source, float damage) - { - Potion resistance = MobEffects.RESISTANCE; - - if (source.isDamageAbsolute()) - { - return damage; - } else - { - if (attackedEntity.isPotionActive(resistance) && source != DamageSource.outOfWorld) - { - int i = (attackedEntity.getActivePotionEffect(resistance).getAmplifier() + 1) * 5; - int j = 25 - i; - float f = damage * (float) j; - damage = f / 25.0F; - } - - if (damage <= 0.0F) - { - return 0.0F; - } else - { - int k = EnchantmentHelper.getEnchantmentModifierDamage(attackedEntity.getArmorInventoryList(), source); - - if (k > 20) - { - k = 20; - } - - if (k > 0 && k <= 20) - { - int l = 25 - k; - float f1 = damage * (float) l; - damage = f1 / 25.0F; - } - - return damage; - } - } - } - - /** - * Used to determine if stack1 can be placed into stack2. If stack2 is null - * and stack1 isn't null, returns true. Ignores stack size - * - * @param stack1 - * Stack that is placed into a slot - * @param stack2 - * Slot content that stack1 is placed into - * @return True if they can be combined - */ - public static boolean canCombine(ItemStack stack1, ItemStack stack2) - { - if (stack1 == null || stack1.isItemStackDamageable() ^ stack2.isItemStackDamageable()) - { - return false; - } - - if (stack2 == null) - { - return true; - } - - return stack1.getItem() == stack2.getItem() && stack1.getItemDamage() == stack2.getItemDamage() && ItemStack.areItemStackTagsEqual(stack1, stack2); - } - - /** - * @param stack1 - * Stack that is placed into a slot - * @param stack2 - * Slot content that stack1 is placed into - * @return Stacks after stacking - */ - public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2, int transferMax) - { - ItemStack[] returned = new ItemStack[2]; - - if (canCombine(stack1, stack2)) - { - int transferedAmount = Math.min(transferMax, stack2 == null ? stack1.stackSize : Math.min(stack2.getMaxStackSize() - stack2.stackSize, stack1.stackSize)); - if (transferedAmount > 0) - { - ItemStack copyStack = stack1.splitStack(transferedAmount); - if (stack2 == null) - { - stack2 = copyStack; - } else - { - stack2.stackSize += transferedAmount; - } - } - } - - returned[0] = stack1; - returned[1] = stack2; - - return returned; - } - - /** - * @param stack1 - * Stack that is placed into a slot - * @param stack2 - * Slot content that stack1 is placed into - * @return Stacks after stacking - */ - public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2) - { - ItemStack[] returned = new ItemStack[2]; - - if (canCombine(stack1, stack2)) - { - int transferedAmount = stack2 == null ? stack1.stackSize : Math.min(stack2.getMaxStackSize() - stack2.stackSize, stack1.stackSize); - if (transferedAmount > 0) - { - ItemStack copyStack = stack1.splitStack(transferedAmount); - if (stack2 == null) - { - stack2 = copyStack; - } else - { - stack2.stackSize += transferedAmount; - } - } - } - - returned[0] = stack1; - returned[1] = stack2; - - return returned; - } - - public static ItemStack insertStackIntoTile(ItemStack stack, TileEntity tile, EnumFacing dir) - { - if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir)) - { - IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir); - - return insertStackIntoTile(stack, handler); - } else if (tile instanceof IInventory) - { - return insertStackIntoInventory(stack, (IInventory) tile, dir); - } - - return stack; - } - - public static int getNumberOfFreeSlots(TileEntity tile, EnumFacing dir) - { - int slots = 0; - - if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir)) - { - IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir); - - for (int i = 0; i < handler.getSlots(); i++) - { - if (handler.getStackInSlot(i) == null) - { - slots++; - } - } - } else if (tile instanceof IInventory) - { - for (int i = 0; i < ((IInventory) tile).getSizeInventory(); i++) - { - if (((IInventory) tile).getStackInSlot(i) == null) - { - slots++; - } - } - } - - return slots; - } - - public static ItemStack insertStackIntoTile(ItemStack stack, IItemHandler handler) - { - int numberOfSlots = handler.getSlots(); - - ItemStack copyStack = stack.copy(); - - for (int slot = 0; slot < numberOfSlots; slot++) - { - copyStack = handler.insertItem(slot, copyStack, false); - if (copyStack == null) - { - return null; - } - } - - return copyStack; - } - - /** - * Inserts the desired stack into the tile up to a limit for the tile. - * Respects capabilities. - * - * @param stack - * @param tile - * @param dir - * @param limit - * @return - */ - public static ItemStack insertStackIntoTile(ItemStack stack, TileEntity tile, EnumFacing dir, int limit) - { - if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir)) - { - IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir); - int numberOfSlots = handler.getSlots(); - - ItemStack copyStack = stack.copy(); - - int numberMatching = 0; - - for (int slot = 0; slot < numberOfSlots; slot++) - { - ItemStack invStack = handler.getStackInSlot(slot); - - if (invStack != null && canCombine(stack, invStack)) - { - numberMatching += invStack.stackSize; - } - } - - if (numberMatching >= limit) - { - return stack; - } - - int newLimit = limit - numberMatching; - - for (int slot = 0; slot < numberOfSlots; slot++) - { - ItemStack newCopyStack = copyStack.copy(); - newCopyStack.stackSize = Math.min(copyStack.stackSize, newLimit); - - newCopyStack = handler.insertItem(slot, newCopyStack, false); - - if (newCopyStack == null) - { - return null; - } - - newLimit -= (copyStack.stackSize - newCopyStack.stackSize); - - if (newLimit <= 0) - { - return null; //TODO - } - - copyStack.stackSize -= (copyStack.stackSize - newCopyStack.stackSize); - } - - return copyStack; - } else if (tile instanceof IInventory) - { - return insertStackIntoInventory(stack, (IInventory) tile, dir, limit); - } - - return stack; - } - - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) - { - if (stack == null) - { - return null; - } - - boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; - - if (inventory instanceof ISidedInventory) - { - int[] array = ((ISidedInventory) inventory).getSlotsForFace(dir); - for (int in : array) - { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory) inventory).canInsertItem(in, stack, dir); - } - } else - { - for (int i = 0; i < canBeInserted.length; i++) - { - canBeInserted[i] = inventory.isItemValidForSlot(i, stack); - } - } - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - if (!canBeInserted[i]) - { - continue; - } - - ItemStack[] combinedStacks = combineStacks(stack, inventory.getStackInSlot(i)); - stack = combinedStacks[0]; - inventory.setInventorySlotContents(i, combinedStacks[1]); - - if (stack.stackSize <= 0) - { - return stack; - } - } - - return stack; - } - - public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) - { - return canInsertStackFullyIntoInventory(stack, inventory, dir, false, 0); - } - - public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir, boolean fillToLimit, int limit) - { - if (stack == null) - { - return true; - } - - int itemsLeft = stack.stackSize; - - boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; - - if (inventory instanceof ISidedInventory) - { - int[] array = ((ISidedInventory) inventory).getSlotsForFace(dir); - for (int in : array) - { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory) inventory).canInsertItem(in, stack, dir); - } - } else - { - for (int i = 0; i < canBeInserted.length; i++) - { - canBeInserted[i] = inventory.isItemValidForSlot(i, stack); - } - } - - int numberMatching = 0; - - if (fillToLimit) - { - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - if (!canBeInserted[i]) - { - continue; - } - - ItemStack invStack = inventory.getStackInSlot(i); - - if (invStack != null && canCombine(stack, invStack)) - { - numberMatching += invStack.stackSize; - } - } - } - - if (fillToLimit && limit < stack.stackSize + numberMatching) - { - return false; - } - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - if (!canBeInserted[i]) - { - continue; - } - - ItemStack invStack = inventory.getStackInSlot(i); - boolean canCombine = canCombine(stack, invStack); - if (canCombine) - { - if (invStack == null) - { - itemsLeft = 0; - } else - { - itemsLeft -= (invStack.getMaxStackSize() - invStack.stackSize); - } - } - - if (itemsLeft <= 0) - { - return true; - } - } - - return false; - } - - /** - * Inserts the desired stack into the inventory up to a limit for the - * inventory. - * - * @param stack - * @param inventory - * @param dir - * @param limit - * @return - */ - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir, int limit) - { - if (stack == null) - { - return null; - } - - boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; - - if (inventory instanceof ISidedInventory) - { - int[] array = ((ISidedInventory) inventory).getSlotsForFace(dir); - for (int in : array) - { - canBeInserted[in] = ((ISidedInventory) inventory).canInsertItem(in, stack, dir); - } - } else - { - for (int i = 0; i < canBeInserted.length; i++) - { - canBeInserted[i] = true; - } - } - - int numberMatching = 0; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - if (!canBeInserted[i]) - { - continue; - } - - ItemStack invStack = inventory.getStackInSlot(i); - - if (invStack != null && canCombine(stack, invStack)) - { - numberMatching += invStack.stackSize; - } - } - - if (numberMatching >= limit) - { - return stack; - } - - int newLimit = limit - numberMatching; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - if (!canBeInserted[i]) - { - continue; - } - - int prevStackSize = stack.stackSize; - - ItemStack[] combinedStacks = combineStacks(stack, inventory.getStackInSlot(i), newLimit); - stack = combinedStacks[0]; - inventory.setInventorySlotContents(i, combinedStacks[1]); //TODO - - newLimit -= (prevStackSize - stack.stackSize); - - if (newLimit <= 0 || stack.stackSize <= 0) - { - return stack; - } - } - - return stack; - } - - public static boolean isBlockLiquid(IBlockState state) - { - return (state instanceof IFluidBlock || state.getMaterial().isLiquid()); - } - - public static boolean isFlowingLiquid(World world, BlockPos pos, IBlockState state) - { - Block block = state.getBlock(); - return ((block instanceof IFluidBlock && Math.abs(((IFluidBlock) block).getFilledPercentage(world, pos)) == 1) || (block instanceof BlockLiquid && block.getMetaFromState(state) != 0)); - } - - public static boolean spawnStackAtBlock(World world, BlockPos pos, @Nullable EnumFacing pushDirection, ItemStack stack) - { - EntityItem entityItem = new EntityItem(world); - BlockPos spawnPos = new BlockPos(pos); - double velocity = 0.15D; - if (pushDirection != null) - { - spawnPos.offset(pushDirection); - - switch (pushDirection) - { - case DOWN: - { - entityItem.motionY = -velocity; - entityItem.setPosition(spawnPos.getX() + 0.5D, spawnPos.getY() - 1.0D, spawnPos.getZ() + 0.5D); - break; - } - case UP: - { - entityItem.motionY = velocity; - entityItem.setPosition(spawnPos.getX() + 0.5D, spawnPos.getY() + 1.0D, spawnPos.getZ() + 0.5D); - break; - } - case NORTH: - { - entityItem.motionZ = -velocity; - entityItem.setPosition(spawnPos.getX() + 0.5D, spawnPos.getY() + 0.5D, spawnPos.getZ() - 1.0D); - break; - } - case SOUTH: - { - entityItem.motionZ = velocity; - entityItem.setPosition(spawnPos.getX() + 0.5D, spawnPos.getY() + 0.5D, spawnPos.getZ() + 1.0D); - break; - } - case WEST: - { - entityItem.motionX = -velocity; - entityItem.setPosition(spawnPos.getX() - 1.0D, spawnPos.getY() + 0.5D, spawnPos.getZ() + 0.5D); - break; - } - case EAST: - { - entityItem.motionX = velocity; - entityItem.setPosition(spawnPos.getX() + 1.0D, spawnPos.getY() + 0.5D, spawnPos.getZ() + 0.5D); - break; - } - } - } - - entityItem.setEntityItemStack(stack); - return world.spawnEntityInWorld(entityItem); - } - - public static boolean swapLocations(World initialWorld, BlockPos initialPos, World finalWorld, BlockPos finalPos) - { - return swapLocations(initialWorld, initialPos, finalWorld, finalPos, true); - } - - public static boolean swapLocations(World initialWorld, BlockPos initialPos, World finalWorld, BlockPos finalPos, boolean playSound) - { - TileEntity initialTile = initialWorld.getTileEntity(initialPos); - TileEntity finalTile = finalWorld.getTileEntity(finalPos); - NBTTagCompound initialTag = new NBTTagCompound(); - NBTTagCompound finalTag = new NBTTagCompound(); - if (initialTile != null) - initialTile.writeToNBT(initialTag); - if (finalTile != null) - finalTile.writeToNBT(finalTag); - - BlockStack initialStack = BlockStack.getStackFromPos(initialWorld, initialPos); - BlockStack finalStack = BlockStack.getStackFromPos(finalWorld, finalPos); - - if ((initialStack.getBlock().equals(Blocks.AIR) && finalStack.getBlock().equals(Blocks.AIR)) || initialStack.getBlock() instanceof BlockPortal || finalStack.getBlock() instanceof BlockPortal) - return false; - - if (playSound) - { - initialWorld.playSound(initialPos.getX(), initialPos.getY(), initialPos.getZ(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false); - finalWorld.playSound(finalPos.getX(), finalPos.getY(), finalPos.getZ(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false); - } - - //Finally, we get to do something! (CLEARING TILES) - if (finalStack.getBlock() != null) - finalWorld.removeTileEntity(finalPos); - if (initialStack.getBlock() != null) - initialWorld.removeTileEntity(initialPos); - - //TILES CLEARED - IBlockState initialBlockState = initialWorld.getBlockState(initialPos); - IBlockState finalBlockState = finalWorld.getBlockState(finalPos); - finalWorld.setBlockState(finalPos, initialBlockState, 3); - - if (initialTile != null) - { - TileEntity newTileInitial = BloodMagic.getCrossVersionProxy().createTileFromData(finalWorld, initialTag); - - finalWorld.setTileEntity(finalPos, newTileInitial); - newTileInitial.setPos(finalPos); - newTileInitial.setWorldObj(finalWorld); - } - - initialWorld.setBlockState(initialPos, finalBlockState, 3); - - if (finalTile != null) - { - TileEntity newTileFinal = BloodMagic.getCrossVersionProxy().createTileFromData(initialWorld, finalTag); - - initialWorld.setTileEntity(initialPos, newTileFinal); - newTileFinal.setPos(initialPos); - newTileFinal.setWorldObj(initialWorld); - } - - initialWorld.notifyNeighborsOfStateChange(initialPos, finalStack.getBlock()); - finalWorld.notifyNeighborsOfStateChange(finalPos, initialStack.getBlock()); - - return true; - } - - //Shamelessly ripped off of CoFH Lib - public static ItemStack consumeItem(ItemStack stack) - { - Item item = stack.getItem(); - boolean largerStack = stack.stackSize > 1; - if (largerStack) - { - stack.stackSize -= 1; - } - if (item.hasContainerItem(stack)) - { - ItemStack ret = item.getContainerItem(stack); - if (ret == null) - { - return null; - } - if (ret.isItemStackDamageable() && ret.getItemDamage() > ret.getMaxDamage()) - { - ret = null; - } - return ret; - } - return largerStack ? stack : null; - } - - public static void registerHandlers(Set eventHandlers) - { - for (ASMDataTable.ASMData data : eventHandlers) - { - try - { - Class handlerClass = Class.forName(data.getClassName()); - Object handlerImpl = handlerClass.newInstance(); - MinecraftForge.EVENT_BUS.register(handlerImpl); - BloodMagic.instance.getLogger().debug("Registering event handler for class {}", data.getClassName()); - } catch (Exception e) - { - // No-op - } - } - } - - public static boolean hasUUID(ItemStack stack) - { - return stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.MOST_SIG) && stack.getTagCompound().hasKey(Constants.NBT.LEAST_SIG); - } - - public static UUID getUUID(ItemStack stack) - { - if (!hasUUID(stack)) - { - return null; - } - - return new UUID(stack.getTagCompound().getLong(Constants.NBT.MOST_SIG), stack.getTagCompound().getLong(Constants.NBT.LEAST_SIG)); - } - - public static void setUUID(ItemStack stack) - { - stack = NBTHelper.checkNBT(stack); - - if (!stack.getTagCompound().hasKey(Constants.NBT.MOST_SIG) && !stack.getTagCompound().hasKey(Constants.NBT.LEAST_SIG)) - { - UUID itemUUID = UUID.randomUUID(); - stack.getTagCompound().setLong(Constants.NBT.MOST_SIG, itemUUID.getMostSignificantBits()); - stack.getTagCompound().setLong(Constants.NBT.LEAST_SIG, itemUUID.getLeastSignificantBits()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java deleted file mode 100644 index 5f0dccf6..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.bloodmagic.util.handler; - -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.util.Utils; -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.event.FMLInterModComms; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.common.registry.GameRegistry; - -public class IMCHandler -{ - - public static void handleIMC(FMLInterModComms.IMCEvent event) - { - for (FMLInterModComms.IMCMessage message : event.getMessages()) - { - if (message.key.equals("teleposerBlacklist") && message.isItemStackMessage()) - { - ItemStack stack = message.getItemStackValue(); - if (stack.getItem() instanceof ItemBlock) - { - Block block = Block.getBlockFromItem(stack.getItem()); - BloodMagicAPI.addToTeleposerBlacklist(block, stack.getItemDamage()); - } - } - - if (message.key.equals("transpositionBlacklist") && message.isItemStackMessage()) - { - ItemStack stack = message.getItemStackValue(); - if (stack.getItem() instanceof ItemBlock) - { - Block block = Block.getBlockFromItem(stack.getItem()); - BloodMagicAPI.addToTranspositionBlacklist(block, stack.getItemDamage()); - } - } - - if (message.key.equals("sacrificeValue") && message.isStringMessage()) - { - String[] splitInfo = message.getStringValue().split(";"); - if (splitInfo.length == 2 && Utils.isInteger(splitInfo[1])) - BloodMagicAPI.setEntitySacrificeValue(splitInfo[0], Integer.parseInt(splitInfo[1])); - } - - if (message.key.equals("greenGroveBlacklist") && message.isStringMessage()) - { - String[] splitInfo = message.getStringValue().split(":"); - if (splitInfo.length == 2) - { - Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(splitInfo[0], splitInfo[1])); - if (block != null) - BloodMagicAPI.blacklistFromGreenGrove(block); - } - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/ClientHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/ClientHandler.java deleted file mode 100644 index eeead4a8..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/ClientHandler.java +++ /dev/null @@ -1,489 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.annotation.Nullable; - -import WayofTime.bloodmagic.client.key.KeyBindings; -import WayofTime.bloodmagic.client.render.model.CustomModelFactory; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.block.model.*; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.client.event.ModelBakeEvent; -import net.minecraftforge.client.event.MouseEvent; -import net.minecraftforge.client.event.RenderGameOverlayEvent; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.client.event.sound.PlaySoundEvent; -import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.InputEvent; -import net.minecraftforge.fml.relauncher.ReflectionHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.opengl.GL11; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.registry.RitualRegistry; -import WayofTime.bloodmagic.api.ritual.Ritual; -import WayofTime.bloodmagic.api.ritual.RitualComponent; -import WayofTime.bloodmagic.client.hud.HUDElement; -import WayofTime.bloodmagic.client.render.block.RenderFakeBlocks; -import WayofTime.bloodmagic.item.ItemRitualDiviner; -import WayofTime.bloodmagic.item.sigil.ItemSigilHolding; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.network.SigilHoldingPacketProcessor; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.tile.TileMasterRitualStone; -import WayofTime.bloodmagic.util.GhostItemHelper; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.base.Stopwatch; -import com.google.common.collect.SetMultimap; - -@Handler -@SideOnly(Side.CLIENT) -public class ClientHandler -{ - // Quick toggle for error suppression. Set to false if you wish to hide model errors. - public static final boolean SUPPRESS_ASSET_ERRORS = true; - - public static TextureAtlasSprite ritualStoneBlank; - public static TextureAtlasSprite ritualStoneWater; - public static TextureAtlasSprite ritualStoneFire; - public static TextureAtlasSprite ritualStoneEarth; - public static TextureAtlasSprite ritualStoneAir; - public static TextureAtlasSprite ritualStoneDawn; - public static TextureAtlasSprite ritualStoneDusk; - - public static TextureAtlasSprite blankBloodRune; - public static TextureAtlasSprite stoneBrick; - public static TextureAtlasSprite glowstone; - public static TextureAtlasSprite bloodStoneBrick; - public static TextureAtlasSprite beacon; - public static TextureAtlasSprite crystalCluster; - - public static Minecraft minecraft = Minecraft.getMinecraft(); - public static final List hudElements = new ArrayList(); - - private static TileMasterRitualStone mrsHoloTile; - private static Ritual mrsHoloRitual; - private static EnumFacing mrsHoloDirection; - private static boolean mrsHoloDisplay; - - boolean doCrystalRenderTest = true; - public static ResourceLocation crystalResource = new ResourceLocation(Constants.Mod.DOMAIN + "textures/entities/defaultCrystalLayer.png"); - - @SubscribeEvent - public void onTooltipEvent(ItemTooltipEvent event) - { - ItemStack stack = event.getItemStack(); - if (stack == null) - { - return; - } - - if (GhostItemHelper.hasGhostAmount(stack)) - { - int amount = GhostItemHelper.getItemGhostAmount(stack); - if (amount == 0) - { - event.getToolTip().add(TextHelper.localize("tooltip.BloodMagic.ghost.everything")); - } else - { - event.getToolTip().add(TextHelper.localize("tooltip.BloodMagic.ghost.amount", amount)); - } - } - } - - @SubscribeEvent - public void onSoundEvent(PlaySoundEvent event) - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - if (player != null && player.isPotionActive(ModPotions.deafness)) - { - event.setResultSound(null); - } - } - - @SubscribeEvent - public void onTextureStitch(TextureStitchEvent.Pre event) - { - final String BLOCKS = "blocks"; - - ritualStoneBlank = forName(event.getMap(), "RitualStone", BLOCKS); - ritualStoneWater = forName(event.getMap(), "WaterRitualStone", BLOCKS); - ritualStoneFire = forName(event.getMap(), "FireRitualStone", BLOCKS); - ritualStoneEarth = forName(event.getMap(), "EarthRitualStone", BLOCKS); - ritualStoneAir = forName(event.getMap(), "AirRitualStone", BLOCKS); - ritualStoneDawn = forName(event.getMap(), "LightRitualStone", BLOCKS); - ritualStoneDusk = forName(event.getMap(), "DuskRitualStone", BLOCKS); - - blankBloodRune = forName(event.getMap(), "BlankRune", BLOCKS); - stoneBrick = event.getMap().registerSprite(new ResourceLocation("minecraft:blocks/stonebrick")); - glowstone = event.getMap().registerSprite(new ResourceLocation("minecraft:blocks/glowstone")); - bloodStoneBrick = forName(event.getMap(), "BloodStoneBrick", BLOCKS); - beacon = event.getMap().registerSprite(new ResourceLocation("minecraft:blocks/beacon")); - crystalCluster = forName(event.getMap(), "ShardCluster", BLOCKS); - } - - @SubscribeEvent - public void render(RenderWorldLastEvent event) - { - EntityPlayerSP player = minecraft.thePlayer; - World world = player.worldObj; - - if (mrsHoloTile != null) - { - if (world.getTileEntity(mrsHoloTile.getPos()) instanceof TileMasterRitualStone) - { - if (mrsHoloDisplay) - renderRitualStones(mrsHoloTile, event.getPartialTicks()); - else - ClientHandler.setRitualHoloToNull(); - } else - { - ClientHandler.setRitualHoloToNull(); - } - } - - if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != RayTraceResult.Type.BLOCK) - return; - - TileEntity tileEntity = world.getTileEntity(minecraft.objectMouseOver.getBlockPos()); - - if (tileEntity instanceof TileMasterRitualStone && player.getHeldItemMainhand() != null && player.getHeldItemMainhand().getItem() instanceof ItemRitualDiviner) - renderRitualStones(player, event.getPartialTicks()); - } - - @SubscribeEvent - public void onMouseEvent(MouseEvent event) - { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - - if (event.getDwheel() != 0 && player != null && player.isSneaking()) - { - ItemStack stack = player.getHeldItemMainhand(); - - if (stack != null) - { - Item item = stack.getItem(); - - if (item instanceof ItemSigilHolding) - { - cycleSigil(stack, player, event.getDwheel()); - event.setCanceled(true); - } - } - } - } - - @SubscribeEvent - public void onKey(InputEvent event) - { - if (!minecraft.inGameHasFocus) - return; - - for (KeyBindings keyBinding : KeyBindings.values()) - if (keyBinding.getKey().isPressed()) - keyBinding.handleKeybind(); - } - - @SubscribeEvent - public void onHudRender(RenderGameOverlayEvent.Pre event) - { - for (HUDElement element : hudElements) - if (element.getElementType() == event.getType() && element.shouldRender(minecraft)) - element.render(minecraft, event.getResolution(), event.getPartialTicks()); - } - - // Stolen from Chisel - @SubscribeEvent - public void onModelBake(ModelBakeEvent event) - { - ModelResourceLocation location = new ModelResourceLocation("bloodmagic:BlockBloodTank", "inventory"); - IBakedModel model = event.getModelRegistry().getObject(location); - - if (model instanceof IBakedModel) - event.getModelRegistry().putObject(location, new CustomModelFactory(model)); - - if (BloodMagic.isDev() && SUPPRESS_ASSET_ERRORS) - return; - - Stopwatch stopwatch = Stopwatch.createStarted(); - Map modelErrors = ReflectionHelper.getPrivateValue(ModelLoader.class, event.getModelLoader(), "loadingExceptions"); - Set missingVariants = ReflectionHelper.getPrivateValue(ModelLoader.class, event.getModelLoader(), "missingVariants"); - - // Collect all Blood Magic model errors - List errored = new ArrayList(); - for (ResourceLocation modelError : modelErrors.keySet()) - if (modelError.getResourceDomain().equalsIgnoreCase(Constants.Mod.MODID)) - errored.add(modelError); - - // Collect all Blood Magic variant errors - List missing = new ArrayList(); - for (ModelResourceLocation missingVariant : missingVariants) - if (missingVariant.getResourceDomain().equalsIgnoreCase(Constants.Mod.MODID)) - missing.add(missingVariant); - - // Remove discovered model errors - for (ResourceLocation modelError : errored) - modelErrors.remove(modelError); - - // Remove discovered variant errors - missingVariants.removeAll(missing); - - if (errored.size() > 0) - BloodMagic.instance.getLogger().info("Suppressed {} model errors from Blood Magic.", errored.size()); - if (missing.size() > 0) - BloodMagic.instance.getLogger().info("Suppressed {} variant errors from Blood Magic.", missing.size()); - BloodMagic.instance.getLogger().debug("Suppressed discovered model/variant errors in {}", stopwatch.stop()); - } - - // For some reason, we need some bad textures to be listed in the Crystal and Node models. This will hide that from the end user. - @SubscribeEvent - public void onTextureStitch(TextureStitchEvent.Post event) - { - if (BloodMagic.isDev() && SUPPRESS_ASSET_ERRORS) - return; - - Stopwatch stopwatch = Stopwatch.createStarted(); - SetMultimap missingTextures = ReflectionHelper.getPrivateValue(FMLClientHandler.class, FMLClientHandler.instance(), "missingTextures"); - Set badTextureDomains = ReflectionHelper.getPrivateValue(FMLClientHandler.class, FMLClientHandler.instance(), "badTextureDomains"); - - String mc = "minecraft"; - String format = "textures/%s.png"; - Set toRemove = new HashSet(); - - // Find our missing textures and mark them for removal. Cannot directly remove as it would cause a CME - if (missingTextures.containsKey(mc)) - { - Set missingMCTextures = missingTextures.get(mc); - for (ResourceLocation texture : missingMCTextures) - if (texture.getResourcePath().equalsIgnoreCase(String.format(format, "node")) || texture.getResourcePath().equalsIgnoreCase(String.format(format, "crystal"))) - toRemove.add(texture); - } - - // Remove all our found errors - missingTextures.get(mc).removeAll(toRemove); - - // Make sure to only remove the bad MC domain if no other textures are missing - if (missingTextures.get(mc).isEmpty()) - { - missingTextures.keySet().remove(mc); - badTextureDomains.remove(mc); - } - BloodMagic.instance.getLogger().debug("Suppressed required texture errors in {}", stopwatch.stop()); - } - - public static void cycleSigil(ItemStack stack, EntityPlayer player, int dWheel) - { - int mode = dWheel; - if (!ConfigHandler.sigilHoldingSkipsEmptySlots) - { - mode = ItemSigilHolding.getCurrentItemOrdinal(stack); - mode = dWheel < 0 ? ItemSigilHolding.next(mode) : ItemSigilHolding.prev(mode); - } - - ItemSigilHolding.cycleToNextSigil(stack, mode); - BloodMagicPacketHandler.INSTANCE.sendToServer(new SigilHoldingPacketProcessor(player.inventory.currentItem, mode)); - ItemStack newStack = ItemSigilHolding.getItemStackInSlot(stack, ItemSigilHolding.getCurrentItemOrdinal(stack)); - if (newStack != null) - Minecraft.getMinecraft().ingameGUI.setRecordPlaying(newStack.getDisplayName(), false); - } - - private static TextureAtlasSprite forName(TextureMap textureMap, String name, String dir) - { - return textureMap.registerSprite(new ResourceLocation(Constants.Mod.DOMAIN + dir + "/" + name)); - } - - private void renderRitualStones(EntityPlayerSP player, float partialTicks) - { - World world = player.worldObj; - ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem(); - EnumFacing direction = ritualDiviner.getDirection(player.inventory.getCurrentItem()); - Ritual ritual = RitualRegistry.getRitualForId(ritualDiviner.getCurrentRitual(player.inventory.getCurrentItem())); - - if (ritual == null) - return; - - GlStateManager.pushMatrix(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GlStateManager.color(1F, 1F, 1F, 0.6125F); - - BlockPos vec3, vX; - vec3 = minecraft.objectMouseOver.getBlockPos(); - double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks; - double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks; - double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks; - - for (RitualComponent ritualComponent : ritual.getComponents()) - { - vX = vec3.add(ritualComponent.getOffset(direction)); - double minX = vX.getX() - posX; - double minY = vX.getY() - posY; - double minZ = vX.getZ() - posZ; - - if (!world.getBlockState(vX).isOpaqueCube()) - { - TextureAtlasSprite texture = null; - - switch (ritualComponent.getRuneType()) - { - case BLANK: - texture = ritualStoneBlank; - break; - case WATER: - texture = ritualStoneWater; - break; - case FIRE: - texture = ritualStoneFire; - break; - case EARTH: - texture = ritualStoneEarth; - break; - case AIR: - texture = ritualStoneAir; - break; - case DAWN: - texture = ritualStoneDawn; - break; - case DUSK: - texture = ritualStoneDusk; - break; - } - - RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ); - } - } - - GlStateManager.popMatrix(); - } - - public static void renderRitualStones(TileMasterRitualStone masterRitualStone, float partialTicks) - { - EntityPlayerSP player = minecraft.thePlayer; - World world = player.worldObj; - EnumFacing direction = mrsHoloDirection; - Ritual ritual = mrsHoloRitual; - - if (ritual == null) - return; - - GlStateManager.pushMatrix(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GlStateManager.color(1F, 1F, 1F, 0.5F); - - BlockPos vec3, vX; - vec3 = masterRitualStone.getPos(); - double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks; - double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks; - double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks; - - for (RitualComponent ritualComponent : ritual.getComponents()) - { - vX = vec3.add(ritualComponent.getOffset(direction)); - double minX = vX.getX() - posX; - double minY = vX.getY() - posY; - double minZ = vX.getZ() - posZ; - - if (!world.getBlockState(vX).isOpaqueCube()) - { - TextureAtlasSprite texture = null; - - switch (ritualComponent.getRuneType()) - { - case BLANK: - texture = ritualStoneBlank; - break; - case WATER: - texture = ritualStoneWater; - break; - case FIRE: - texture = ritualStoneFire; - break; - case EARTH: - texture = ritualStoneEarth; - break; - case AIR: - texture = ritualStoneAir; - break; - case DAWN: - texture = ritualStoneDawn; - break; - case DUSK: - texture = ritualStoneDusk; - break; - } - - RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ); - } - } - - GlStateManager.popMatrix(); - } - - public static void setRitualHolo(TileMasterRitualStone masterRitualStone, Ritual ritual, EnumFacing direction, boolean displayed) - { - mrsHoloDisplay = displayed; - mrsHoloTile = masterRitualStone; - mrsHoloRitual = ritual; - mrsHoloDirection = direction; - } - - public static void setRitualHoloToNull() - { - mrsHoloDisplay = false; - mrsHoloTile = null; - mrsHoloRitual = null; - mrsHoloDirection = EnumFacing.NORTH; - } - - protected void renderHotbarItem(int x, int y, float partialTicks, EntityPlayer player, @Nullable ItemStack stack) - { - if (stack != null) - { - float animation = (float) stack.animationsToGo - partialTicks; - - if (animation > 0.0F) - { - GlStateManager.pushMatrix(); - float f1 = 1.0F + animation / 5.0F; - GlStateManager.translate((float) (x + 8), (float) (y + 12), 0.0F); - GlStateManager.scale(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F); - GlStateManager.translate((float) (-(x + 8)), (float) (-(y + 12)), 0.0F); - } - - minecraft.getRenderItem().renderItemAndEffectIntoGUI(player, stack, x, y); - - if (animation > 0.0F) - GlStateManager.popMatrix(); - - minecraft.getRenderItem().renderItemOverlays(minecraft.fontRendererObj, stack, x, y); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/CraftingHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/CraftingHandler.java deleted file mode 100644 index 0aa39f1d..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/CraftingHandler.java +++ /dev/null @@ -1,156 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.init.Items; -import net.minecraft.item.EnumDyeColor; -import net.minecraft.item.ItemBanner; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeModContainer; -import net.minecraftforge.event.AnvilUpdateEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.AltarCraftedEvent; -import WayofTime.bloodmagic.api.iface.IUpgradeTrainer; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.util.helper.ItemHelper; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.item.ItemInscriptionTool; -import WayofTime.bloodmagic.registry.ModItems; - -@Handler -public class CraftingHandler -{ - - // Sets the uses of crafted Inscription Tools to 10 - @SubscribeEvent - public void onAltarCrafted(AltarCraftedEvent event) - { - if (event.getOutput() == null) - { - return; - } - - if (event.getOutput().getItem() instanceof ItemInscriptionTool) - { - NBTHelper.checkNBT(event.getOutput()); - event.getOutput().getTagCompound().setInteger(Constants.NBT.USES, 10); - } - - if (event.getOutput().getItem() == ForgeModContainer.getInstance().universalBucket && event.getAltarRecipe().getSyphon() == 1000) - { - NBTTagCompound bucketTags = BloodMagicAPI.getLifeEssenceBucket().getTagCompound(); - event.getOutput().setTagCompound(bucketTags); - } - } - - // Handles crafting of: Revealing Upgrade Tome, Elytra Upgrade Tome, Combining Upgrade Tomes, Setting Upgrade for Trainer - @SubscribeEvent - public void onAnvil(AnvilUpdateEvent event) - { - if (ConfigHandler.thaumcraftGogglesUpgrade) - { - if (event.getLeft().getItem() == ModItems.LIVING_ARMOUR_HELMET && event.getRight().getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.getRight().isItemDamaged()) - { - ItemStack output = new ItemStack(ModItems.UPGRADE_TOME); - output = NBTHelper.checkNBT(output); - ItemHelper.LivingUpgrades.setKey(output, Constants.Mod.MODID + ".upgrade.revealing"); - ItemHelper.LivingUpgrades.setLevel(output, 1); - event.setCost(1); - - event.setOutput(output); - - return; - } - } - - if (event.getLeft().getItem() == ModItems.SIGIL_HOLDING) - { - if (event.getRight().getItem() == Items.NAME_TAG) - { - ItemStack output = event.getLeft().copy(); - if (!output.hasTagCompound()) - output.setTagCompound(new NBTTagCompound()); - output.getTagCompound().setString(Constants.NBT.COLOR, event.getRight().getDisplayName()); - event.setCost(1); - - event.setOutput(output); - - return; - } - - if (event.getRight().getItem() == Items.DYE) - { - EnumDyeColor dyeColor = ItemBanner.getBaseColor(event.getRight()); - ItemStack output = event.getLeft().copy(); - if (!output.hasTagCompound()) - output.setTagCompound(new NBTTagCompound()); - output.getTagCompound().setString(Constants.NBT.COLOR, String.valueOf(dyeColor.getMapColor().colorValue)); - event.setCost(1); - - event.setOutput(output); - - return; - } - } - - if (event.getLeft().getItem() == Items.BOOK && event.getRight().getItem() == Items.ELYTRA && !event.getRight().isItemDamaged()) - { - ItemStack output = new ItemStack(ModItems.UPGRADE_TOME); - output = NBTHelper.checkNBT(output); - ItemHelper.LivingUpgrades.setKey(output, Constants.Mod.MODID + ".upgrade.elytra"); - ItemHelper.LivingUpgrades.setLevel(output, 1); - event.setCost(30); - - event.setOutput(output); - - return; - } - - if (event.getLeft().getItem() == ModItems.UPGRADE_TOME && event.getRight().getItem() == ModItems.UPGRADE_TOME) - { - LivingArmourUpgrade leftUpgrade = ItemHelper.LivingUpgrades.getUpgrade(event.getLeft()); - if (leftUpgrade != null && !leftUpgrade.isDowngrade() && ItemHelper.LivingUpgrades.getKey(event.getLeft()).equals(ItemHelper.LivingUpgrades.getKey(event.getRight()))) - { - int leftLevel = ItemHelper.LivingUpgrades.getLevel(event.getLeft()); - int rightLevel = ItemHelper.LivingUpgrades.getLevel(event.getRight()); - - if (leftLevel == rightLevel && leftLevel < leftUpgrade.getMaxTier() - 1) - { - ItemStack outputStack = event.getLeft().copy(); - ItemHelper.LivingUpgrades.setLevel(outputStack, leftLevel + 1); - event.setCost(leftLevel + 2); - - event.setOutput(outputStack); - - return; - } - } - } - - if (event.getLeft().getItem() instanceof IUpgradeTrainer && event.getRight().getItem() == ModItems.UPGRADE_TOME) - { - LivingArmourUpgrade rightUpgrade = ItemHelper.LivingUpgrades.getUpgrade(event.getRight()); - if (rightUpgrade != null) - { - String key = ItemHelper.LivingUpgrades.getKey(event.getRight()); - ItemStack outputStack = event.getLeft().copy(); - List keyList = new ArrayList(); - keyList.add(key); - if (((IUpgradeTrainer) event.getLeft().getItem()).setTrainedUpgrades(outputStack, keyList)) - { - event.setCost(1); - - event.setOutput(outputStack); - - return; - } - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java deleted file mode 100644 index 2d269a0b..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java +++ /dev/null @@ -1,513 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIAttackMelee; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAITarget; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Enchantments; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.item.ItemTossEvent; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; -import net.minecraftforge.event.entity.living.LivingFallEvent; -import net.minecraftforge.event.entity.living.LivingHurtEvent; -import net.minecraftforge.event.entity.player.PlayerEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.event.entity.player.PlayerPickupXpEvent; -import net.minecraftforge.event.world.ExplosionEvent; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import WayofTime.bloodmagic.ConfigHandler; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.BloodMagicAPI; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.event.ItemBindEvent; -import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent; -import WayofTime.bloodmagic.api.event.TeleposeEvent; -import WayofTime.bloodmagic.api.iface.IBindable; -import WayofTime.bloodmagic.api.iface.ISentientTool; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.orb.IBloodOrb; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.util.helper.BindableHelper; -import WayofTime.bloodmagic.api.util.helper.ItemHelper; -import WayofTime.bloodmagic.api.util.helper.NBTHelper; -import WayofTime.bloodmagic.api.util.helper.NetworkHelper; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import WayofTime.bloodmagic.block.BlockAltar; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.entity.mob.EntitySentientSpecter; -import WayofTime.bloodmagic.item.ItemAltarMaker; -import WayofTime.bloodmagic.item.ItemExperienceBook; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.item.gear.ItemPackSacrifice; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeBattleHungry; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSelfSacrifice; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSelfSacrifice; -import WayofTime.bloodmagic.network.BloodMagicPacketHandler; -import WayofTime.bloodmagic.network.DemonAuraPacketProcessor; -import WayofTime.bloodmagic.potion.BMPotionUtils; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.registry.ModPotions; -import WayofTime.bloodmagic.util.ChatUtil; -import WayofTime.bloodmagic.util.Utils; -import WayofTime.bloodmagic.util.helper.TextHelper; - -import com.google.common.base.Strings; - -@Handler -public class GenericHandler -{ - public static Map bounceMap = new HashMap(); - public static Map filledHandMap = new HashMap(); - - @SubscribeEvent - public void onEntityFall(LivingFallEvent event) - { - if (event.getEntityLiving() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.getEntityLiving(); - if (player.isPotionActive(ModPotions.bounce) && !player.isSneaking() && event.getDistance() > 2) - { - event.setDamageMultiplier(0); - - if (player.worldObj.isRemote) - { - player.motionY *= -0.9; - player.fallDistance = 0; - bounceMap.put(player, player.motionY); - } else - { - player.fallDistance = 0; - event.setCanceled(true); - } - } - } - } - - @SubscribeEvent - public void playerTickPost(TickEvent.PlayerTickEvent event) - { - if (event.phase == TickEvent.Phase.END && bounceMap.containsKey(event.player)) - { - event.player.motionY = bounceMap.remove(event.player); - } - - if (event.phase == TickEvent.Phase.END) - { - if (filledHandMap.containsKey(event.player)) - { - int value = filledHandMap.get(event.player) - 1; - if (value <= 0) - { - filledHandMap.remove(event.player); - } else - { - filledHandMap.put(event.player, value); - } - } - } - } - - @SubscribeEvent - public void onPlayerClick(PlayerInteractEvent event) - { - if (event.isCancelable() && event.getEntityPlayer().isPotionActive(ModPotions.constrict)) - { - EntityPlayer player = event.getEntityPlayer(); - int level = player.getActivePotionEffect(ModPotions.constrict).getAmplifier(); - if (event.getHand() == EnumHand.OFF_HAND || level > 1) - { - event.setCanceled(true); - } - } - } - - @SubscribeEvent - public void onPlayerDropItem(ItemTossEvent event) - { - EntityItem itemEntity = event.getEntityItem(); - if (itemEntity != null) - { - ItemStack stack = itemEntity.getEntityItem(); - Item item = stack.getItem(); - if (stack.hasTagCompound() && item instanceof ISentientTool) - { - if (((ISentientTool) item).spawnSentientEntityOnDrop(stack, event.getPlayer())) - { - event.setCanceled(true); - } - } - } - } - - @SubscribeEvent - public void onExplosion(ExplosionEvent.Start event) - { - World world = event.getWorld(); - Explosion exp = event.getExplosion(); - Vec3d position = exp.getPosition(); - double radius = 3; - - AxisAlignedBB bb = new AxisAlignedBB(position.xCoord - radius, position.yCoord - radius, position.zCoord - radius, position.xCoord + radius, position.yCoord + radius, position.zCoord + radius); - List specterList = world.getEntitiesWithinAABB(EntitySentientSpecter.class, bb); - if (!specterList.isEmpty()) - { - for (EntitySentientSpecter specter : specterList) - { - if (specter.absorbExplosion(exp)) - { - event.setCanceled(true); - return; - } - } - } - } - - @SubscribeEvent - public void onEntityHurt(LivingHurtEvent event) - { - if (event.getEntity().worldObj.isRemote) - return; - - if (event.getSource().getEntity() instanceof EntityPlayer && !PlayerHelper.isFakePlayer((EntityPlayer) event.getSource().getEntity())) - { - EntityPlayer player = (EntityPlayer) event.getSource().getEntity(); - - if (player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null && player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem() instanceof ItemPackSacrifice) - { - ItemPackSacrifice pack = (ItemPackSacrifice) player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem(); - - boolean shouldSyphon = pack.getStoredLP(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST)) < pack.CAPACITY; - float damageDone = event.getEntityLiving().getHealth() < event.getAmount() ? event.getAmount() - event.getEntityLiving().getHealth() : event.getAmount(); - int totalLP = Math.round(damageDone * ConfigHandler.sacrificialPackConversion); - - if (shouldSyphon) - ItemHelper.LPContainer.addLPToItem(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST), totalLP, pack.CAPACITY); - } - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.battleHunger", chestStack); - if (upgrade instanceof LivingArmourUpgradeBattleHungry) - { - ((LivingArmourUpgradeBattleHungry) upgrade).resetTimer(); - } - } - } - } - } - - private static Map targetTaskMap = new HashMap(); - private static Map attackTaskMap = new HashMap(); - - // Handles sending the client the Demon Will Aura updates - @SubscribeEvent - public void onLivingUpdate(LivingUpdateEvent event) - { - if (!event.getEntityLiving().worldObj.isRemote) - { - EntityLivingBase entity = event.getEntityLiving(); - if (entity instanceof EntityPlayer && entity.ticksExisted % 50 == 0) //TODO: Change to an incremental counter - { - sendPlayerDemonWillAura((EntityPlayer) entity); - } - - if (event.getEntityLiving() instanceof EntityAnimal) - { - EntityAnimal animal = (EntityAnimal) event.getEntityLiving(); - if (animal.isPotionActive(ModPotions.sacrificialLamb)) - { - if (!targetTaskMap.containsKey(animal)) - { - EntityAITarget task = new EntityAINearestAttackableTarget(animal, EntityMob.class, false); - EntityAIBase attackTask = new EntityAIAttackMelee(animal, 1.0D, false); - animal.targetTasks.addTask(1, task); - animal.tasks.addTask(1, attackTask); - targetTaskMap.put(animal, task); - attackTaskMap.put(animal, attackTask); - } - - if (animal.getAttackTarget() != null && animal.getDistanceSqToEntity(animal.getAttackTarget()) < 4) - { - animal.worldObj.createExplosion(null, animal.posX, animal.posY + (double) (animal.height / 16.0F), animal.posZ, 2 + animal.getActivePotionEffect(ModPotions.sacrificialLamb).getAmplifier() * 1.5f, false); - targetTaskMap.remove(animal); - attackTaskMap.remove(animal); - } - } else if (targetTaskMap.containsKey(animal)) - { - targetTaskMap.remove(animal); - attackTaskMap.remove(animal); - } - } - } - - EntityLivingBase entity = event.getEntityLiving(); - - if (entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - if (player.isSneaking() && player.isPotionActive(ModPotions.cling) && Utils.isPlayerBesideSolidBlockFace(player) && !player.onGround) - { - if (player.worldObj.isRemote) - { - player.motionY = 0; - player.motionX *= 0.8; - player.motionZ *= 0.8; - } else - { - player.fallDistance = 0; - } - } - } - - if (entity.isPotionActive(MobEffects.NIGHT_VISION)) - { - int duration = entity.getActivePotionEffect(MobEffects.NIGHT_VISION).getDuration(); - if (duration == Constants.Misc.NIGHT_VISION_CONSTANT_END) - { - entity.removePotionEffect(MobEffects.NIGHT_VISION); - } - } - - if (entity.isPotionActive(ModPotions.fireFuse)) - { - entity.worldObj.spawnParticle(EnumParticleTypes.FLAME, entity.posX + entity.worldObj.rand.nextDouble() * 0.3, entity.posY + entity.worldObj.rand.nextDouble() * 0.3, entity.posZ + entity.worldObj.rand.nextDouble() * 0.3, 0, 0.06d, 0); - - int r = entity.getActivePotionEffect(ModPotions.fireFuse).getAmplifier(); - int radius = 1 * r + 1; - - if (entity.getActivePotionEffect(ModPotions.fireFuse).getDuration() <= 3) - { - entity.worldObj.createExplosion(null, entity.posX, entity.posY, entity.posZ, radius, false); - } - } - - if (entity.isPotionActive(ModPotions.plantLeech)) - { - int amplifier = entity.getActivePotionEffect(ModPotions.plantLeech).getAmplifier(); - int timeRemaining = entity.getActivePotionEffect(ModPotions.plantLeech).getDuration(); - if (timeRemaining % 10 == 0) - { - BMPotionUtils.damageMobAndGrowSurroundingPlants(entity, 2 + amplifier, 1, 0.5 * 3 / (amplifier + 3), 25 * (1 + amplifier)); - } - } - } - -// @SideOnly(Side.SERVER) - public void sendPlayerDemonWillAura(EntityPlayer player) - { - if (player instanceof EntityPlayerMP) - { - BlockPos pos = player.getPosition(); - DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(player.worldObj.provider.getDimension(), pos.getX() >> 4, pos.getZ() >> 4); - if (holder != null) - { - BloodMagicPacketHandler.sendTo(new DemonAuraPacketProcessor(holder), (EntityPlayerMP) player); - } else - { - BloodMagicPacketHandler.sendTo(new DemonAuraPacketProcessor(new DemonWillHolder()), (EntityPlayerMP) player); - } - } - } - - // Handles destroying altar - @SubscribeEvent - public void harvestEvent(PlayerEvent.HarvestCheck event) - { - IBlockState state = event.getTargetBlock(); - Block block = state.getBlock(); - if (block != null && block instanceof BlockAltar && event.getEntityPlayer() != null && event.getEntityPlayer() instanceof EntityPlayerMP && event.getEntityPlayer().getHeldItemMainhand() != null && event.getEntityPlayer().getHeldItemMainhand().getItem() instanceof ItemAltarMaker) - { - ItemAltarMaker altarMaker = (ItemAltarMaker) event.getEntityPlayer().getHeldItemMainhand().getItem(); - ChatUtil.sendNoSpam(event.getEntityPlayer(), TextHelper.localizeEffect("chat.BloodMagic.altarMaker.destroy", altarMaker.destroyAltar(event.getEntityPlayer()))); - } - } - - // Handle Teleposer block blacklist - @SubscribeEvent - public void onTelepose(TeleposeEvent event) - { - if (ConfigHandler.teleposerBlacklist.contains(event.initialStack) || ConfigHandler.teleposerBlacklist.contains(event.finalStack)) - event.setCanceled(true); - - if (BloodMagicAPI.getTeleposerBlacklist().contains(event.initialStack) || BloodMagicAPI.getTeleposerBlacklist().contains(event.finalStack)) - event.setCanceled(true); - } - - // Handle Teleposer entity blacklist - @SubscribeEvent - public void onTeleposeEntity(TeleposeEvent.Ent event) - { - if (ConfigHandler.teleposerBlacklistEntity.contains(event.entity.getClass().getSimpleName())) - event.setCanceled(true); - } - - // Sets teleport cooldown for Teleposed entities to 5 ticks (1/4 second) instead of 150 (7.5 seconds) - @SubscribeEvent - public void onTeleposeEntityPost(TeleposeEvent.Ent.Post event) - { - event.entity.timeUntilPortal = 5; - } - - // Handles binding of IBindable's as well as setting a player's highest orb tier - @SubscribeEvent - public void onInteract(PlayerInteractEvent.RightClickItem event) - { - if (event.getWorld().isRemote) - return; - - EntityPlayer player = event.getEntityPlayer(); - - if (PlayerHelper.isFakePlayer(player)) - return; - - ItemStack held = event.getItemStack(); - if (held != null && held.getItem() instanceof IBindable) - { - held = NBTHelper.checkNBT(held); - IBindable bindable = (IBindable) held.getItem(); - if (Strings.isNullOrEmpty(bindable.getOwnerUUID(held))) - { - if (bindable.onBind(player, held)) - { - String uuid = PlayerHelper.getUUIDFromPlayer(player).toString(); - ItemBindEvent toPost = new ItemBindEvent(player, uuid, held); - if (MinecraftForge.EVENT_BUS.post(toPost) || toPost.getResult() == Result.DENY) - return; - - BindableHelper.setItemOwnerUUID(held, uuid); - BindableHelper.setItemOwnerName(held, player.getDisplayNameString()); - } - } else if (bindable.getOwnerUUID(held).equals(PlayerHelper.getUUIDFromPlayer(player).toString()) && !bindable.getOwnerName(held).equals(player.getDisplayNameString())) - BindableHelper.setItemOwnerName(held, player.getDisplayNameString()); - } - - if (held != null && held.getItem() instanceof IBloodOrb) - { - held = NBTHelper.checkNBT(held); - IBloodOrb bloodOrb = (IBloodOrb) held.getItem(); - SoulNetwork network = NetworkHelper.getSoulNetwork(player); - - if (bloodOrb.getOrbLevel(held.getItemDamage()) > network.getOrbTier()) - network.setOrbTier(bloodOrb.getOrbLevel(held.getItemDamage())); - } - } - - @SubscribeEvent - public void selfSacrificeEvent(SacrificeKnifeUsedEvent event) - { - EntityPlayer player = event.player; - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - StatTrackerSelfSacrifice.incrementCounter(armour, event.healthDrained / 2); - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.selfSacrifice", chestStack); - - if (upgrade instanceof LivingArmourUpgradeSelfSacrifice) - { - double modifier = ((LivingArmourUpgradeSelfSacrifice) upgrade).getSacrificeModifier(); - - event.lpAdded = (int) (event.lpAdded * (1 + modifier)); - } - } - } - } - - // Drop Blood Shards - @SubscribeEvent - public void onLivingDrops(LivingDropsEvent event) - { - EntityLivingBase attackedEntity = event.getEntityLiving(); - DamageSource source = event.getSource(); - Entity entity = source.getEntity(); - - if (entity != null && entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - ItemStack heldStack = player.getHeldItemMainhand(); - - if (heldStack != null && heldStack.getItem() == ModItems.BOUND_SWORD && !(attackedEntity instanceof EntityAnimal)) - for (int i = 0; i <= EnchantmentHelper.getLootingModifier(player); i++) - if (attackedEntity.getEntityWorld().rand.nextDouble() < 0.2) - event.getDrops().add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, new ItemStack(ModItems.BLOOD_SHARD, 1, 0))); - } - } - - // Experience Tome - @SubscribeEvent(priority = EventPriority.LOWEST) - public void onExperiencePickup(PlayerPickupXpEvent event) - { - EntityPlayer player = event.getEntityPlayer(); - ItemStack itemstack = EnchantmentHelper.getEnchantedItem(Enchantments.MENDING, player); - - if (itemstack != null && itemstack.isItemDamaged()) - { - int i = Math.min(xpToDurability(event.getOrb().xpValue), itemstack.getItemDamage()); - event.getOrb().xpValue -= durabilityToXp(i); - itemstack.setItemDamage(itemstack.getItemDamage() - i); - } - - if (!player.worldObj.isRemote) - { - for (ItemStack stack : player.inventory.mainInventory) - { - if (stack != null && stack.getItem() instanceof ItemExperienceBook) - { - ItemExperienceBook.addExperience(stack, event.getOrb().xpValue); - event.getOrb().xpValue = 0; - break; - } - } - } - } - - private int xpToDurability(int xp) - { - return xp * 2; - } - - private int durabilityToXp(int durability) - { - return durability / 2; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/LivingArmourHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/LivingArmourHandler.java deleted file mode 100644 index 727e3f75..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/LivingArmourHandler.java +++ /dev/null @@ -1,377 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Enchantments; -import net.minecraft.init.Items; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemArrow; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; -import net.minecraftforge.event.entity.EntityJoinWorldEvent; -import net.minecraftforge.event.entity.living.LivingDeathEvent; -import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.event.entity.living.LivingHealEvent; -import net.minecraftforge.event.entity.player.ArrowLooseEvent; -import net.minecraftforge.event.entity.player.PlayerEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeCrippledArm; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeQuenched; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeSlowHeal; -import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeStormTrooper; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerArrowShot; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGrimReaperSprint; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerJump; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowShot; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGrimReaperSprint; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeJump; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSpeed; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeStepAssist; -import WayofTime.bloodmagic.registry.ModPotions; - -@Handler -public class LivingArmourHandler -{ - @SubscribeEvent - public void onEntityHealed(LivingHealEvent event) - { - if (event.getEntityLiving() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.getEntity(); - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - double modifier = 1; - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.slowHeal", chestStack); - - if (upgrade instanceof LivingArmourUpgradeSlowHeal) - { - modifier *= ((LivingArmourUpgradeSlowHeal) upgrade).getHealingModifier(); - } - - if (modifier != 1) - { - event.setAmount((float) (event.getAmount() * modifier)); - } - } - } - } - } - - @SubscribeEvent - public void onMiningSpeedCheck(PlayerEvent.BreakSpeed event) - { - EntityPlayer player = event.getEntityPlayer(); - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - double modifier = 1; - for (LivingArmourUpgrade upgrade : armour.upgradeMap.values()) - { - modifier *= upgrade.getMiningSpeedModifier(player); - } - - if (modifier != 1) - { - event.setNewSpeed((float) (event.getOriginalSpeed() * modifier)); - } - } - } - } - - // Applies: Storm Trooper - @SubscribeEvent - public void onEntityJoinedWorld(EntityJoinWorldEvent event) - { - Entity owner = null; - if (event.getEntity() instanceof EntityArrow) - { - owner = ((EntityArrow) event.getEntity()).shootingEntity; - } else if (event.getEntity() instanceof EntityThrowable) - { - owner = ((EntityThrowable) event.getEntity()).getThrower(); - } - - if (owner instanceof EntityPlayer) - { - Entity projectile = event.getEntity(); - EntityPlayer player = (EntityPlayer) owner; - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.stormTrooper", chestStack); - - if (upgrade instanceof LivingArmourUpgradeStormTrooper) - { - float velocityModifier = (float) (((LivingArmourUpgradeStormTrooper) upgrade).getArrowJiggle(player) * Math.sqrt(projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ)); - - projectile.motionX += 2 * (event.getWorld().rand.nextDouble() - 0.5) * velocityModifier; - projectile.motionY += 2 * (event.getWorld().rand.nextDouble() - 0.5) * velocityModifier; - projectile.motionZ += 2 * (event.getWorld().rand.nextDouble() - 0.5) * velocityModifier; - } - } - } - } - } - - @SubscribeEvent - public void onPlayerClick(PlayerInteractEvent event) - { - if (event.isCancelable()) - { - EntityPlayer player = event.getEntityPlayer(); - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - if (event.getHand() == EnumHand.OFF_HAND) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.crippledArm", chestStack); - - if (upgrade instanceof LivingArmourUpgradeCrippledArm) - { - event.setCanceled(true); - } - } - - if (event.getItemStack() != null && event.getItemStack().getItemUseAction() == EnumAction.DRINK) - { - ItemStack drinkStack = event.getItemStack(); - - //TODO: See if the item is a splash potion? Those should be usable. - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.quenched", chestStack); - - if (upgrade instanceof LivingArmourUpgradeQuenched) - { - event.setCanceled(true); - } - } - } - } - } - } - - // Applies: Grim Reaper - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onEntityDeath(LivingDeathEvent event) - { - if (event.getEntityLiving() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.getEntityLiving(); - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - StatTrackerGrimReaperSprint.incrementCounter(armour); - - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.grimReaper", chestStack); - - if (upgrade instanceof LivingArmourUpgradeGrimReaperSprint && ((LivingArmourUpgradeGrimReaperSprint) upgrade).canSavePlayer(player)) - { - ((LivingArmourUpgradeGrimReaperSprint) upgrade).applyEffectOnRebirth(player); - event.setCanceled(true); - event.setResult(Event.Result.DENY); - } - - armour.writeDirtyToNBT(ItemLivingArmour.getArmourTag(chestStack)); - } - } - } - } - - // Applies: Jump - @SubscribeEvent - public void onJumpEvent(LivingEvent.LivingJumpEvent event) - { - if (event.getEntityLiving() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.getEntityLiving(); - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - StatTrackerJump.incrementCounter(armour); - - if (!player.isSneaking()) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgradeFromNBT(Constants.Mod.MODID + ".upgrade.jump", chestStack); - - if (upgrade instanceof LivingArmourUpgradeJump) - { - player.motionY += ((LivingArmourUpgradeJump) upgrade).getJumpModifier(); - } - } - } - } - } - } - - // Applies: Step Assist, Speed Boost - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onEntityUpdate(LivingEvent.LivingUpdateEvent event) - { - if (event.getEntityLiving() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.getEntityLiving(); - boolean hasAssist = false; - if (event.getEntityLiving().isPotionActive(ModPotions.boost)) - { - hasAssist = true; - player.stepHeight = Constants.Misc.ALTERED_STEP_HEIGHT; - } else - { - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmourFromStack(chestStack); - if (armour != null) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.stepAssist", chestStack); - - if (upgrade instanceof LivingArmourUpgradeStepAssist) - { - player.stepHeight = ((LivingArmourUpgradeStepAssist) upgrade).getStepAssist(); - hasAssist = true; - } - } - } - } - - if (!hasAssist && player.stepHeight == Constants.Misc.ALTERED_STEP_HEIGHT) - player.stepHeight = 0.6f; - - float percentIncrease = 0; - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmourFromStack(chestStack); - if (armour != null) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgradeFromNBT(Constants.Mod.MODID + ".upgrade.movement", chestStack); - - if (upgrade instanceof LivingArmourUpgradeSpeed) - { - percentIncrease += 0.1f * ((LivingArmourUpgradeSpeed) upgrade).getSpeedModifier(); - } - } - } - - if (event.getEntityLiving().isPotionActive(ModPotions.boost)) - { - int i = event.getEntityLiving().getActivePotionEffect(ModPotions.boost).getAmplifier(); - { - percentIncrease += (i + 1) * 0.05f; - } - } - - if (percentIncrease > 0 && (player.onGround || player.capabilities.isFlying) && (Math.abs(player.moveForward) > 0 || Math.abs(player.moveStrafing) > 0)) - { - player.moveRelative(player.moveStrafing, player.moveForward, player.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease); - } - } - } - - // Applies: Arrow Shot - // Tracks: Arrow Shot - @SubscribeEvent - public void onArrowFire(ArrowLooseEvent event) - { - World world = event.getEntityPlayer().worldObj; - ItemStack stack = event.getBow(); - EntityPlayer player = event.getEntityPlayer(); - - if (world.isRemote) - return; - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - StatTrackerArrowShot.incrementCounter(armour); - - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.arrowShot", chestStack); - if (upgrade instanceof LivingArmourUpgradeArrowShot) - { - int charge = event.getCharge(); - float velocity = (float) charge / 20.0F; - velocity = (velocity * velocity + velocity * 2.0F) / 3.0F; - - if ((double) velocity < 0.1D) - return; - - if (velocity > 1.0F) - velocity = 1.0F; - - int extraArrows = ((LivingArmourUpgradeArrowShot) upgrade).getExtraArrows(); - for (int n = 0; n < extraArrows; n++) - { - ItemStack arrowStack = new ItemStack(Items.ARROW); - ItemArrow itemarrow = (ItemArrow) ((stack.getItem() instanceof ItemArrow ? arrowStack.getItem() : Items.ARROW)); - EntityArrow entityarrow = itemarrow.createArrow(world, arrowStack, player); - entityarrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, velocity * 3.0F, 1.0F); - - float velocityModifier = 0.6f * velocity; - - entityarrow.motionX += (event.getWorld().rand.nextDouble() - 0.5) * velocityModifier; - entityarrow.motionY += (event.getWorld().rand.nextDouble() - 0.5) * velocityModifier; - entityarrow.motionZ += (event.getWorld().rand.nextDouble() - 0.5) * velocityModifier; - - if (velocity == 1.0F) - entityarrow.setIsCritical(true); - - int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack); - - if (powerLevel > 0) - entityarrow.setDamage(entityarrow.getDamage() + (double) powerLevel * 0.5D + 0.5D); - - int punchLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack); - - if (punchLevel > 0) - entityarrow.setKnockbackStrength(punchLevel); - - if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack) > 0) - entityarrow.setFire(100); - - entityarrow.pickupStatus = EntityArrow.PickupStatus.CREATIVE_ONLY; - - world.spawnEntityInWorld(entityarrow); - } - } - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/MigrateNetworkDataHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/MigrateNetworkDataHandler.java deleted file mode 100644 index b06b7bf8..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/MigrateNetworkDataHandler.java +++ /dev/null @@ -1,66 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.saving.BMWorldSavedData; -import WayofTime.bloodmagic.api.saving.SoulNetwork; -import WayofTime.bloodmagic.api.util.helper.PlayerHelper; -import com.google.common.base.Stopwatch; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.event.entity.EntityJoinWorldEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.apache.commons.io.FileUtils; - -import java.io.File; -import java.io.IOException; -import java.util.UUID; - -// Migrates from the old data storage system to the cleaner new one -@Handler -public class MigrateNetworkDataHandler -{ - - @SubscribeEvent - public void playerJoin(EntityJoinWorldEvent event) - { - if (!event.getWorld().isRemote && event.getEntity() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.getEntity(); - UUID playerId = PlayerHelper.getUUIDFromPlayer(player); - Stopwatch stopwatch = Stopwatch.createStarted(); - - if (event.getWorld().getMapStorage() == null) - return; - - BMWorldSavedData saveData = (BMWorldSavedData) event.getWorld().getMapStorage().getOrLoadData(BMWorldSavedData.class, BMWorldSavedData.ID); - WayofTime.bloodmagic.api.network.SoulNetwork oldData = (WayofTime.bloodmagic.api.network.SoulNetwork) event.getWorld().getMapStorage().getOrLoadData(WayofTime.bloodmagic.api.network.SoulNetwork.class, playerId.toString()); - - if (saveData == null) - { - saveData = new BMWorldSavedData(); - event.getWorld().getMapStorage().setData(BMWorldSavedData.ID, saveData); - } - - if (oldData == null) - return; - - SoulNetwork network = saveData.getNetwork(playerId); - if (oldData.getOrbTier() > network.getOrbTier()) - network.setOrbTier(oldData.getOrbTier()); - if (oldData.getCurrentEssence() > network.getCurrentEssence()) - network.setCurrentEssence(oldData.getCurrentEssence()); - - File oldDataFile = event.getWorld().getSaveHandler().getMapFileFromName(playerId.toString()); - try - { - FileUtils.forceDelete(oldDataFile); - } catch (IOException e) - { - BloodMagic.instance.getLogger().error("Error deleting data file {}.", oldDataFile); - BloodMagic.instance.getLogger().error(e.getLocalizedMessage()); - } - stopwatch.stop(); - BloodMagic.instance.getLogger().info("Migration completed for {} ({}) in {}.", player.getDisplayNameString(), playerId, stopwatch); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/StatTrackerHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/StatTrackerHandler.java deleted file mode 100644 index 7089d682..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/StatTrackerHandler.java +++ /dev/null @@ -1,212 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.math.MathHelper; -import net.minecraftforge.event.entity.living.LivingHealEvent; -import net.minecraftforge.event.entity.living.LivingHurtEvent; -import net.minecraftforge.event.entity.player.AttackEntityEvent; -import net.minecraftforge.event.entity.player.PlayerPickupXpEvent; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.item.armour.ItemLivingArmour; -import WayofTime.bloodmagic.item.armour.ItemSentientArmour; -import WayofTime.bloodmagic.livingArmour.LivingArmour; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerArrowProtect; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerCriticalStrike; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerDigging; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerExperience; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerFallProtect; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGraveDigger; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerHealthboost; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerMeleeDamage; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerNightSight; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerPhysicalProtect; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSolarPowered; -import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSprintAttack; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeDigging; -import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeExperience; -import WayofTime.bloodmagic.util.Utils; - -@Handler -public class StatTrackerHandler -{ - - private static float lastPlayerSwingStrength = 0; - - // Tracks: Digging, DigSlowdown - @SubscribeEvent - public void blockBreakEvent(BlockEvent.BreakEvent event) - { - EntityPlayer player = event.getPlayer(); - if (player != null) - { - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - if (chestStack != null && chestStack.getItem() instanceof ItemLivingArmour) - { - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - - if (armour != null) - { - StatTrackerDigging.incrementCounter(armour); - LivingArmourUpgradeDigging.hasDug(armour); - } - } - } - } - } - - // Tracks: Health Boost - @SubscribeEvent - public void onEntityHealed(LivingHealEvent event) - { - EntityLivingBase healedEntity = event.getEntityLiving(); - if (!(healedEntity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer player = (EntityPlayer) healedEntity; - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - StatTrackerHealthboost.incrementCounter(armour, event.getAmount()); - if (player.worldObj.canSeeSky(player.getPosition()) && player.worldObj.provider.isDaytime()) - { - StatTrackerSolarPowered.incrementCounter(armour, event.getAmount()); - } - } - } - } - - @SubscribeEvent - public void onLivingAttack(AttackEntityEvent event) - { - lastPlayerSwingStrength = event.getEntityPlayer().getCooledAttackStrength(0); - } - - // Tracks: Fall Protect, Arrow Protect, Physical Protect, Grave Digger, Sprint Attack, Critical Strike, Nocturnal Prowess - @SubscribeEvent - public void entityHurt(LivingHurtEvent event) - { - DamageSource source = event.getSource(); - Entity sourceEntity = event.getSource().getEntity(); - EntityLivingBase attackedEntity = event.getEntityLiving(); - - if (attackedEntity instanceof EntityPlayer) - { - EntityPlayer attackedPlayer = (EntityPlayer) attackedEntity; - - // Living Armor Handling - if (LivingArmour.hasFullSet(attackedPlayer)) - { - float amount = Math.min(Utils.getModifiedDamage(attackedPlayer, event.getSource(), event.getAmount()), attackedPlayer.getHealth()); - ItemStack chestStack = attackedPlayer.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - if (sourceEntity != null && !source.isMagicDamage() && !source.isProjectile()) - StatTrackerPhysicalProtect.incrementCounter(armour, amount); - - if (source.equals(DamageSource.fall)) - StatTrackerFallProtect.incrementCounter(armour, amount); - - if (source.isProjectile()) - StatTrackerArrowProtect.incrementCounter(armour, amount); - } - } else - { - ItemStack chestStack = attackedPlayer.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - if (chestStack != null && chestStack.getItem() instanceof ItemSentientArmour) - { - ItemSentientArmour armour = (ItemSentientArmour) chestStack.getItem(); - armour.onPlayerAttacked(chestStack, source, attackedPlayer); - } - } - } - - if (sourceEntity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) sourceEntity; - - // Living Armor Handling - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - ItemStack mainWeapon = player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND); - - event.setAmount((float) (event.getAmount() + lastPlayerSwingStrength * armour.getAdditionalDamageOnHit(event.getAmount(), player, attackedEntity, mainWeapon))); - - float amount = Math.min(Utils.getModifiedDamage(attackedEntity, event.getSource(), event.getAmount()), attackedEntity.getHealth()); - - if (!source.isProjectile()) - { - StatTrackerMeleeDamage.incrementCounter(armour, amount); - - if (player.worldObj.getLight(player.getPosition()) <= 9) - StatTrackerNightSight.incrementCounter(armour, amount); - - if (mainWeapon != null && mainWeapon.getItem() instanceof ItemSpade) - StatTrackerGraveDigger.incrementCounter(armour, amount); - - if (player.isSprinting()) - StatTrackerSprintAttack.incrementCounter(armour, amount); - - boolean isCritical = lastPlayerSwingStrength > 0.9 && player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(MobEffects.BLINDNESS) && !player.isRiding() && !player.isSprinting(); - if (isCritical) - StatTrackerCriticalStrike.incrementCounter(armour, amount); - - double kb = armour.getKnockbackOnHit(player, attackedEntity, mainWeapon); - if (kb > 0) - attackedEntity.knockBack(player, (float) kb * 0.5F, (double) MathHelper.sin(player.rotationYaw * 0.017453292F), (double) (-MathHelper.cos(player.rotationYaw * 0.017453292F))); - } - } - } - } - } - - // Tracks: Experienced - @SubscribeEvent(priority = EventPriority.LOW) - public void onExperiencePickup(PlayerPickupXpEvent event) - { - EntityPlayer player = event.getEntityPlayer(); - - if (LivingArmour.hasFullSet(player)) - { - ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST); - LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); - if (armour != null) - { - LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(Constants.Mod.MODID + ".upgrade.experienced", chestStack); - if (upgrade instanceof LivingArmourUpgradeExperience) - { - double modifier = ((LivingArmourUpgradeExperience) upgrade).getExperienceModifier(); - double exp = event.getOrb().xpValue * (1 + modifier); - - event.getOrb().xpValue = (int) Math.floor(exp) + (Math.random() < exp % 1 ? 1 : 0); - } - - StatTrackerExperience.incrementCounter(armour, event.getOrb().xpValue); - } - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/WillHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/WillHandler.java deleted file mode 100644 index 0192e3a6..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/WillHandler.java +++ /dev/null @@ -1,193 +0,0 @@ -package WayofTime.bloodmagic.util.handler.event; - -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EntityDamageSourceIndirect; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.ChunkPos; -import net.minecraft.world.EnumDifficulty; -import net.minecraftforge.event.entity.living.LivingDeathEvent; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.player.EntityItemPickupEvent; -import net.minecraftforge.event.world.ChunkDataEvent; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import WayofTime.bloodmagic.annot.Handler; -import WayofTime.bloodmagic.api.soul.DemonWillHolder; -import WayofTime.bloodmagic.api.soul.EnumDemonWillType; -import WayofTime.bloodmagic.api.soul.IDemonWill; -import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; -import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -import WayofTime.bloodmagic.demonAura.PosXY; -import WayofTime.bloodmagic.demonAura.WillChunk; -import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; -import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; -import WayofTime.bloodmagic.registry.ModItems; -import WayofTime.bloodmagic.registry.ModPotions; - -@Handler -public class WillHandler -{ - - private final HashMap serverTicks = new HashMap(); - - // Adds Will to player - @SubscribeEvent - public void onItemPickup(EntityItemPickupEvent event) - { - ItemStack stack = event.getItem().getEntityItem(); - if (stack != null && stack.getItem() instanceof IDemonWill) - { - EntityPlayer player = event.getEntityPlayer(); - EnumDemonWillType pickupType = ((IDemonWill) stack.getItem()).getType(stack); - ItemStack remainder = PlayerDemonWillHandler.addDemonWill(player, stack); - - if (remainder == null || ((IDemonWill) stack.getItem()).getWill(pickupType, stack) < 0.0001 || PlayerDemonWillHandler.isDemonWillFull(pickupType, player)) - { - stack.stackSize = 0; - event.setResult(Event.Result.ALLOW); - } - } - } - - @SubscribeEvent - public void onEntityAttacked(LivingDeathEvent event) - { - if (event.getSource() instanceof EntityDamageSourceIndirect) - { - Entity sourceEntity = ((EntityDamageSourceIndirect) event.getSource()).getSourceOfDamage(); - - if (sourceEntity instanceof EntitySentientArrow) - { - ((EntitySentientArrow) sourceEntity).reimbursePlayer(event.getEntityLiving(), event.getEntityLiving().getMaxHealth()); - } - } - } - - // Add/Drop Demon Will for Player - @SubscribeEvent - public void onLivingDrops(LivingDropsEvent event) - { - EntityLivingBase attackedEntity = event.getEntityLiving(); - DamageSource source = event.getSource(); - Entity entity = source.getEntity(); - - if (attackedEntity.isPotionActive(ModPotions.soulSnare) && (attackedEntity instanceof EntityMob || attackedEntity.worldObj.getDifficulty() == EnumDifficulty.PEACEFUL)) - { - PotionEffect eff = attackedEntity.getActivePotionEffect(ModPotions.soulSnare); - int lvl = eff.getAmplifier(); - - double amountOfSouls = attackedEntity.getEntityWorld().rand.nextDouble() * (lvl + 1) * (lvl + 1) * 5; - ItemStack soulStack = ((IDemonWill) ModItems.MONSTER_SOUL).createWill(0, amountOfSouls); - event.getDrops().add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, soulStack)); - } - - if (entity != null && entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - ItemStack heldStack = player.getHeldItemMainhand(); - if (heldStack != null && heldStack.getItem() instanceof IDemonWillWeapon && !player.worldObj.isRemote) - { - IDemonWillWeapon demonWillWeapon = (IDemonWillWeapon) heldStack.getItem(); - List droppedSouls = demonWillWeapon.getRandomDemonWillDrop(attackedEntity, player, heldStack, event.getLootingLevel()); - if (!droppedSouls.isEmpty()) - { - ItemStack remainder; - for (ItemStack willStack : droppedSouls) - { - remainder = PlayerDemonWillHandler.addDemonWill(player, willStack); - - if (remainder != null) - { - EnumDemonWillType pickupType = ((IDemonWill) remainder.getItem()).getType(remainder); - if (((IDemonWill) remainder.getItem()).getWill(pickupType, remainder) >= 0.0001) - { - event.getDrops().add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, remainder)); - } - } - } - player.inventoryContainer.detectAndSendChanges(); - } - } - } - } - - @SubscribeEvent - public void onServerWorldTick(TickEvent.WorldTickEvent event) - { - if (event.world.isRemote) - return; - - int dim = event.world.provider.getDimension(); - if (event.phase == TickEvent.Phase.END) - { - if (!this.serverTicks.containsKey(dim)) - this.serverTicks.put(dim, 0); - - int ticks = (this.serverTicks.get(dim)); - - if (ticks % 20 == 0) - { - CopyOnWriteArrayList dirtyChunks = WorldDemonWillHandler.dirtyChunks.get(dim); - if ((dirtyChunks != null) && (dirtyChunks.size() > 0)) - { - for (PosXY pos : dirtyChunks) - event.world.markChunkDirty(new BlockPos(pos.x * 16, 5, pos.y * 16), null); - - dirtyChunks.clear(); - } - } - - this.serverTicks.put(dim, ticks + 1); - } - - } - - @SubscribeEvent - public void chunkSave(ChunkDataEvent.Save event) - { - int dim = event.getWorld().provider.getDimension(); - ChunkPos loc = event.getChunk().getChunkCoordIntPair(); - - NBTTagCompound nbt = new NBTTagCompound(); - event.getData().setTag("BloodMagic", nbt); - - WillChunk ac = WorldDemonWillHandler.getWillChunk(dim, loc.chunkXPos, loc.chunkZPos); - if (ac != null) - { - nbt.setShort("base", ac.getBase()); - ac.getCurrentWill().writeToNBT(nbt, "current"); - if (!event.getChunk().isLoaded()) - WorldDemonWillHandler.removeWillChunk(dim, loc.chunkXPos, loc.chunkZPos); - } - } - - @SubscribeEvent - public void chunkLoad(ChunkDataEvent.Load event) - { - int dim = event.getWorld().provider.getDimension(); - if (event.getData().getCompoundTag("BloodMagic").hasKey("base")) - { - NBTTagCompound nbt = event.getData().getCompoundTag("BloodMagic"); - short base = nbt.getShort("base"); - DemonWillHolder current = new DemonWillHolder(); - current.readFromNBT(nbt, "current"); - WorldDemonWillHandler.addWillChunk(dim, event.getChunk(), base, current); - } else - { - WorldDemonWillHandler.generateWill(event.getChunk()); - } - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/package-info.java b/src/main/java/WayofTime/bloodmagic/util/handler/package-info.java deleted file mode 100644 index f5a9d369..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/handler/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.util.handler; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java b/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java deleted file mode 100644 index 28b769ad..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java +++ /dev/null @@ -1,181 +0,0 @@ -package WayofTime.bloodmagic.util.helper; - -import WayofTime.bloodmagic.api.Constants; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelBakery; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.client.renderer.block.statemap.StateMapperBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.ModelLoader; - -/** - * @author TehNut - * - * The goal of this class is to make registering the inventory renders - * for your Items/Blocks a much simpler and easier process. - * - * You must call this at the post initialization stage on the clientside - * only. - * - * If you pass a Block through here that uses the default ItemBlock, you - * should specify a custom name. - * - * @deprecated in favor of {@link InventoryRenderHelperV2} - */ -@Deprecated -public class InventoryRenderHelper -{ - /** - * This is the base string for your resources. It will usually be your modid - * in all lowercase with a colon at the end. - */ - private final String domain; - - public InventoryRenderHelper(String domain) - { - this.domain = domain; - } - - /** - * Registers a Model for the given Item and meta. - * - * @param item - * - Item to register Model for - * @param meta - * - Meta of Item - * @param name - * - Name of the model JSON - */ - public void itemRender(Item item, int meta, String name) - { - ResourceLocation resName = new ResourceLocation(domain + name); - - ModelBakery.registerItemVariants(item, resName); - ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(resName, "inventory")); - } - - /** - * Registers a Model for the given Item and meta. This does not call - * setCustomModelResourceLocation, to allow the implementation of - * ItemMeshDefinition. - * - * @param item - * - Item to register Model for - * @param meta - * - Meta of Item - * @param name - * - Name of the model JSON - */ - public void customItemRender(Item item, int meta, String name) - { - ResourceLocation resName = new ResourceLocation(domain + name); - - ModelBakery.registerItemVariants(item, resName); - } - - /** - * Shorthand of {@code itemRender(Item, int, String)} - * - * @param item - * - Item to register Model for - * @param meta - * - Meta of Item - */ - public void itemRender(Item item, int meta) - { - itemRender(item, meta, getClassName(item) + meta); - } - - public void customItemRender(Item item, int meta) - { - customItemRender(item, meta, getClassName(item) + meta); - } - - public void itemRender(Item item, String name) - { - itemRender(item, 0, name); - } - - /** - * Shorthand of {@code itemRender(Item, int)} - * - * @param item - * - Item to register Model for - */ - public void itemRender(Item item) - { - itemRender(item, 0, getClassName(item)); - } - - /** - * Registers a model for the item across all Meta's that get used for the - * item - * - * @param item - * - Item to register Model for - */ - public void itemRenderAll(Item item) - { - final Item toRender = item; - - ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition() - { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - return new ModelResourceLocation(domain + getClassName(toRender), "inventory"); - } - }); - } - - public void fluidRender(Block block) - { - - final Block toRender = block; - - ModelBakery.registerItemVariants(InventoryRenderHelper.getItemFromBlock(block)); - ModelLoader.setCustomMeshDefinition(InventoryRenderHelper.getItemFromBlock(block), new ItemMeshDefinition() - { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - return new ModelResourceLocation(Constants.Mod.DOMAIN + toRender.getClass().getSimpleName(), "fluid"); - } - }); - ModelLoader.setCustomStateMapper(block, new StateMapperBase() - { - @Override - protected ModelResourceLocation getModelResourceLocation(IBlockState state) - { - return new ModelResourceLocation(domain + toRender.getClass().getSimpleName(), "fluid"); - } - }); - } - - /** - * @param block - * - Block to get Item of - * - * @return - The ItemBlock that corresponds to the Block. - */ - public static Item getItemFromBlock(Block block) - { - return Item.getItemFromBlock(block); - } - - /** - * Finds the class name of the given Item. If handed an ItemBlock, it will - * use the class name of the contained Block. - * - * @return The class name of the given Item - */ - public static String getClassName(Item item) - { - return item instanceof ItemBlock ? Block.getBlockFromItem(item).getClass().getSimpleName() : item.getClass().getSimpleName(); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java b/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java deleted file mode 100644 index 2b8414b5..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java +++ /dev/null @@ -1,64 +0,0 @@ -package WayofTime.bloodmagic.util.helper; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.ModelLoader; - -public class InventoryRenderHelperV2 -{ - - private final String domain; - - public InventoryRenderHelperV2(String domain) - { - this.domain = domain.endsWith(":") ? domain.replace(":", "") : domain; - } - - public void registerMesher(Item item, ItemMeshDefinition meshDefinition) - { - ModelLoader.setCustomMeshDefinition(item, meshDefinition); - } - - public void registerRender(Item item, int meta, String name, String variant) - { - ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(new ResourceLocation(domain, "item/" + name), "type=" + variant)); - } - - public void registerRender(Item item, int meta, String variant) - { - registerRender(item, meta, item.getRegistryName().getResourcePath(), variant); - } - - public void registerRender(Item item, String name, String variant) - { - registerRender(item, 0, name, variant); - } - - public void registerRender(Item item, String variant) - { - registerRender(item, item.getRegistryName().getResourcePath(), variant); - } - - public void registerRender(Block block, int meta, String name, String variant) - { - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(new ResourceLocation(domain, name), variant)); - } - - public void registerRender(Block block, int meta, String variant) - { - registerRender(block, meta, block.getRegistryName().getResourcePath(), variant); - } - - public void registerRender(Block block, String name, String variant) - { - registerRender(block, 0, name, variant); - } - - public void registerRender(Block block, String variant) - { - registerRender(block, block.getRegistryName().getResourcePath(), variant); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/NumeralHelper.java b/src/main/java/WayofTime/bloodmagic/util/helper/NumeralHelper.java deleted file mode 100644 index 8cea0dfa..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/helper/NumeralHelper.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.bloodmagic.util.helper; - -import java.util.TreeMap; - -public class NumeralHelper -{ - - private static final TreeMap romanNumerals = new TreeMap(); - - static - { - romanNumerals.put(1000, "M"); - romanNumerals.put(900, "CM"); - romanNumerals.put(500, "D"); - romanNumerals.put(400, "CD"); - romanNumerals.put(100, "C"); - romanNumerals.put(90, "XC"); - romanNumerals.put(50, "L"); - romanNumerals.put(40, "XL"); - romanNumerals.put(10, "X"); - romanNumerals.put(9, "IX"); - romanNumerals.put(5, "V"); - romanNumerals.put(4, "IV"); - romanNumerals.put(1, "I"); - } - - public static String toRoman(int arabic) - { - int convert = romanNumerals.floorKey(arabic); - if (arabic == convert) - return romanNumerals.get(convert); - - return romanNumerals.get(convert) + toRoman(arabic - convert); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/RecipeHelper.java b/src/main/java/WayofTime/bloodmagic/util/helper/RecipeHelper.java deleted file mode 100644 index 6f8d121c..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/helper/RecipeHelper.java +++ /dev/null @@ -1,71 +0,0 @@ -package WayofTime.bloodmagic.util.helper; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; -import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; - -public class RecipeHelper -{ - public static IRecipe getRecipeForOutput(ItemStack stack) - { - for (IRecipe recipe : CraftingManager.getInstance().getRecipeList()) - { - if (recipe != null) - { - ItemStack resultStack = recipe.getRecipeOutput(); - if (resultStack != null && resultStack.getItem() != null) - { - if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage()) - { - return recipe; - } - } - } - } - - return null; - } - - public static AltarRecipeRegistry.AltarRecipe getAltarRecipeForOutput(ItemStack stack) - { - for (AltarRecipeRegistry.AltarRecipe recipe : AltarRecipeRegistry.getRecipes().values()) - { - if (recipe != null) - { - ItemStack resultStack = recipe.getOutput(); - if (resultStack != null && resultStack.getItem() != null) - { - if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage()) - { - return recipe; - } - } - } - } - - return null; - } - - public static TartaricForgeRecipe getForgeRecipeForOutput(ItemStack stack) - { - for (TartaricForgeRecipe recipe : TartaricForgeRecipeRegistry.getRecipeList()) - { - if (recipe != null) - { - ItemStack resultStack = recipe.getRecipeOutput(); - if (resultStack != null && resultStack.getItem() != null) - { - if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage()) - { - return recipe; - } - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/TextHelper.java b/src/main/java/WayofTime/bloodmagic/util/helper/TextHelper.java deleted file mode 100644 index 08da2246..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/helper/TextHelper.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.bloodmagic.util.helper; - -import net.minecraft.util.text.translation.I18n; -import org.apache.commons.lang3.text.WordUtils; - -import java.util.ArrayList; -import java.util.List; - -public class TextHelper -{ - public static String getFormattedText(String string) - { - return string.replaceAll("&", "\u00A7"); - } - - public static String localize(String input, Object... format) - { - return I18n.translateToLocalFormatted(input, format); - } - - public static String localizeEffect(String input, Object... format) - { - return getFormattedText(localize(input, format)); - } - - public static String[] localizeAll(String[] input) - { - String[] ret = new String[input.length]; - for (int i = 0; i < input.length; i++) - ret[i] = localize(input[i]); - - return ret; - } - - public static String[] localizeAllEffect(String[] input) - { - String[] ret = new String[input.length]; - for (int i = 0; i < input.length; i++) - ret[i] = localizeEffect(input[i]); - - return ret; - } - - public static ArrayList localizeAll(List input) - { - ArrayList ret = new ArrayList(input.size()); - for (int i = 0; i < input.size(); i++) - ret.add(i, localize(input.get(i))); - - return ret; - } - - public static ArrayList localizeAllEffect(List input) - { - ArrayList ret = new ArrayList(input.size()); - for (int i = 0; i < input.size(); i++) - ret.add(i, localizeEffect(input.get(i))); - - return ret; - } - - public static String[] cutLongString(String string, int characters) - { - return WordUtils.wrap(string, characters, "/cut", false).split("/cut"); - } - - public static String[] cutLongString(String string) - { - return cutLongString(string, 30); - } - - public static boolean canTranslate(String key) - { - return I18n.canTranslate(key); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/package-info.java b/src/main/java/WayofTime/bloodmagic/util/helper/package-info.java deleted file mode 100644 index 338a7367..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/helper/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.util.helper; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/util/package-info.java b/src/main/java/WayofTime/bloodmagic/util/package-info.java deleted file mode 100644 index f2d1940d..00000000 --- a/src/main/java/WayofTime/bloodmagic/util/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@MethodsReturnNonnullByDefault -package WayofTime.bloodmagic.util; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/BloodMagic.java b/src/main/java/wayoftime/bloodmagic/BloodMagic.java new file mode 100644 index 00000000..a59eb766 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/BloodMagic.java @@ -0,0 +1,319 @@ +package wayoftime.bloodmagic; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.google.gson.Gson; + +import net.minecraft.block.Block; +import net.minecraft.data.DataGenerator; +import net.minecraft.fluid.Fluid; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.potion.Effect; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.ColorHandlerEvent; +import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.model.ModelLoaderRegistry; +import net.minecraftforge.client.model.generators.ItemModelProvider; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.crafting.CraftingHelper; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.config.ModConfig; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; +import net.minecraftforge.fml.event.lifecycle.GatherDataEvent; +import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; +import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent; +import net.minecraftforge.fml.event.server.FMLServerStartingEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import wayoftime.bloodmagic.client.ClientEvents; +import wayoftime.bloodmagic.client.hud.Elements; +import wayoftime.bloodmagic.client.key.BloodMagicKeyHandler; +import wayoftime.bloodmagic.client.key.KeyBindings; +import wayoftime.bloodmagic.client.model.MimicModelLoader; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.data.GeneratorBaseRecipes; +import wayoftime.bloodmagic.common.data.GeneratorBlockStates; +import wayoftime.bloodmagic.common.data.GeneratorBlockTags; +import wayoftime.bloodmagic.common.data.GeneratorFluidTags; +import wayoftime.bloodmagic.common.data.GeneratorItemModels; +import wayoftime.bloodmagic.common.data.GeneratorItemTags; +import wayoftime.bloodmagic.common.data.GeneratorLanguage; +import wayoftime.bloodmagic.common.data.GeneratorLootTable; +import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeProvider; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; +import wayoftime.bloodmagic.common.registries.BloodMagicRecipeSerializers; +import wayoftime.bloodmagic.core.AnointmentRegistrar; +import wayoftime.bloodmagic.core.LivingArmorRegistrar; +import wayoftime.bloodmagic.core.recipe.IngredientBloodOrb; +import wayoftime.bloodmagic.core.registry.AlchemyArrayRegistry; +import wayoftime.bloodmagic.core.registry.OrbRegistry; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.impl.BloodMagicCorePlugin; +import wayoftime.bloodmagic.loot.GlobalLootModifier; +import wayoftime.bloodmagic.network.BloodMagicPacketHandler; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.ritual.ModRituals; +import wayoftime.bloodmagic.ritual.RitualManager; +import wayoftime.bloodmagic.structures.ModDungeons; +import wayoftime.bloodmagic.tile.TileAlchemicalReactionChamber; +import wayoftime.bloodmagic.tile.TileAlchemyArray; +import wayoftime.bloodmagic.tile.TileAlchemyTable; +import wayoftime.bloodmagic.tile.TileAltar; +import wayoftime.bloodmagic.tile.TileDeforesterCharge; +import wayoftime.bloodmagic.tile.TileDemonCrucible; +import wayoftime.bloodmagic.tile.TileDemonCrystal; +import wayoftime.bloodmagic.tile.TileDemonCrystallizer; +import wayoftime.bloodmagic.tile.TileFungalCharge; +import wayoftime.bloodmagic.tile.TileIncenseAltar; +import wayoftime.bloodmagic.tile.TileMasterRitualStone; +import wayoftime.bloodmagic.tile.TileMimic; +import wayoftime.bloodmagic.tile.TileShapedExplosive; +import wayoftime.bloodmagic.tile.TileSoulForge; +import wayoftime.bloodmagic.tile.TileVeinMineCharge; +import wayoftime.bloodmagic.util.handler.event.GenericHandler; +import wayoftime.bloodmagic.util.handler.event.WillHandler; + +@Mod("bloodmagic") +//@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) +public class BloodMagic +{ + public static final String MODID = "bloodmagic"; + // Directly reference a log4j logger. + public static final Logger LOGGER = LogManager.getLogger(); + + private static Gson GSON = null; + + public static final BloodMagicPacketHandler packetHandler = new BloodMagicPacketHandler(); + public static final RitualManager RITUAL_MANAGER = new RitualManager(); + + public BloodMagic() + { + IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus(); + + modBus.addListener(this::setup); + modBus.addListener(this::onLoadComplete); + + BloodMagicBlocks.BLOCKS.register(modBus); + BloodMagicItems.ITEMS.register(modBus); +// RegistrarBloodMagic.BLOOD_ORBS.createAndRegister(modBus, "bloodorbs"); + BloodMagicItems.BLOOD_ORBS.createAndRegister(modBus, "bloodorbs"); + LivingArmorRegistrar.UPGRADES.createAndRegister(modBus, "upgrades"); + AnointmentRegistrar.ANOINTMENTS.createAndRegister(modBus, "anointments"); + BloodMagicItems.BASICITEMS.register(modBus); + BloodMagicBlocks.BASICBLOCKS.register(modBus); + BloodMagicBlocks.DUNGEONBLOCKS.register(modBus); + BloodMagicBlocks.FLUIDS.register(modBus); + BloodMagicBlocks.CONTAINERS.register(modBus); + BloodMagicEntityTypes.ENTITY_TYPES.register(modBus); + + GlobalLootModifier.GLM.register(modBus); + + BloodMagicRecipeSerializers.RECIPE_SERIALIZERS.register(modBus); + + // Register the setup method for modloading + modBus.addListener(this::setup); + // Register the enqueueIMC method for modloading + modBus.addListener(this::enqueueIMC); + // Register the processIMC method for modloading + modBus.addListener(this::processIMC); + // Register the doClientStuff method for modloading + modBus.addListener(this::doClientStuff); + modBus.addListener(this::loadModels); + modBus.addListener(this::gatherData); + + modBus.addGenericListener(Fluid.class, this::registerFluids); + modBus.addGenericListener(TileEntityType.class, this::registerTileEntityTypes); + modBus.addGenericListener(IRecipeSerializer.class, this::registerRecipes); + modBus.addGenericListener(Effect.class, BloodMagicPotions::registerPotions); + + MinecraftForge.EVENT_BUS.register(new GenericHandler()); +// MinecraftForge.EVENT_BUS.register(new ClientHandler()); + modBus.addListener(this::registerColors); + + MinecraftForge.EVENT_BUS.register(new WillHandler()); +// MinecraftForge.EVENT_BUS.register(new BloodMagicBlocks()); +// MinecraftForge.EVENT_BUS.addListener(this::commonSetup); + + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); + + ModLoadingContext context = ModLoadingContext.get(); + context.registerConfig(ModConfig.Type.CLIENT, ConfigManager.CLIENT_SPEC); + + ModDungeons.init(); + } + + private void registerRecipes(RegistryEvent.Register> event) + { +// System.out.println("Registering IngredientBloodOrb Serializer."); + CraftingHelper.register(IngredientBloodOrb.NAME, IngredientBloodOrb.Serializer.INSTANCE); + +// event.getRegistry().registerAll( +// new SewingRecipe.Serializer().setRegistryName("sewing") +// ); + } + + public static ResourceLocation rl(String name) + { + return new ResourceLocation(BloodMagic.MODID, name); + } + + public void registerFluids(RegistryEvent.Register event) + { + + } + + public void onLoadComplete(FMLLoadCompleteEvent event) + { + OrbRegistry.tierMap.put(BloodMagicItems.ORB_WEAK.get().getTier(), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get())); + OrbRegistry.tierMap.put(BloodMagicItems.ORB_APPRENTICE.get().getTier(), new ItemStack(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())); + OrbRegistry.tierMap.put(BloodMagicItems.ORB_MAGICIAN.get().getTier(), new ItemStack(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())); + OrbRegistry.tierMap.put(BloodMagicItems.ORB_MASTER.get().getTier(), new ItemStack(BloodMagicItems.MASTER_BLOOD_ORB.get())); + BloodMagicCorePlugin.INSTANCE.register(BloodMagicAPI.INSTANCE); + RITUAL_MANAGER.discover(); + ModRituals.initHarvestHandlers(); + LivingArmorRegistrar.register(); + AnointmentRegistrar.register(); + AlchemyArrayRegistry.registerBaseArrays(); + } + + public void registerTileEntityTypes(RegistryEvent.Register> event) + { + LOGGER.info("Attempting to register Tile Entities"); + event.getRegistry().register(TileEntityType.Builder.create(TileAltar::new, BloodMagicBlocks.BLOOD_ALTAR.get()).build(null).setRegistryName("altar")); + event.getRegistry().register(TileEntityType.Builder.create(TileAlchemyArray::new, BloodMagicBlocks.ALCHEMY_ARRAY.get()).build(null).setRegistryName("alchemyarray")); + event.getRegistry().register(TileEntityType.Builder.create(TileSoulForge::new, BloodMagicBlocks.SOUL_FORGE.get()).build(null).setRegistryName("soulforge")); + event.getRegistry().register(TileEntityType.Builder.create(TileMasterRitualStone::new, BloodMagicBlocks.MASTER_RITUAL_STONE.get()).build(null).setRegistryName("masterritualstone")); + event.getRegistry().register(TileEntityType.Builder.create(TileAlchemicalReactionChamber::new, BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()).build(null).setRegistryName("alchemicalreactionchamber")); + event.getRegistry().register(TileEntityType.Builder.create(TileAlchemyTable::new, BloodMagicBlocks.ALCHEMY_TABLE.get()).build(null).setRegistryName("alchemytable")); + event.getRegistry().register(TileEntityType.Builder.create(TileDemonCrystal::new, BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(), BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get(), BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get(), BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get(), BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get()).build(null).setRegistryName("demoncrystal")); + event.getRegistry().register(TileEntityType.Builder.create(TileDemonCrucible::new, BloodMagicBlocks.DEMON_CRUCIBLE.get()).build(null).setRegistryName("demoncrucible")); + event.getRegistry().register(TileEntityType.Builder.create(TileDemonCrystallizer::new, BloodMagicBlocks.DEMON_CRYSTALLIZER.get()).build(null).setRegistryName("demoncrystallizer")); + event.getRegistry().register(TileEntityType.Builder.create(TileIncenseAltar::new, BloodMagicBlocks.INCENSE_ALTAR.get()).build(null).setRegistryName("incensealtar")); + event.getRegistry().register(TileEntityType.Builder.create(TileMimic::new, BloodMagicBlocks.MIMIC.get(), BloodMagicBlocks.ETHEREAL_MIMIC.get()).build(null).setRegistryName("mimic")); + event.getRegistry().register(TileEntityType.Builder.create(TileShapedExplosive::new, BloodMagicBlocks.SHAPED_CHARGE.get()).build(null).setRegistryName("shaped_explosive")); + event.getRegistry().register(TileEntityType.Builder.create(TileDeforesterCharge::new, BloodMagicBlocks.DEFORESTER_CHARGE.get()).build(null).setRegistryName("deforester_charge")); + event.getRegistry().register(TileEntityType.Builder.create(TileVeinMineCharge::new, BloodMagicBlocks.VEINMINE_CHARGE.get()).build(null).setRegistryName("veinmine_charge")); + event.getRegistry().register(TileEntityType.Builder.create(TileFungalCharge::new, BloodMagicBlocks.FUNGAL_CHARGE.get()).build(null).setRegistryName("fungal_charge")); + + } + + @SubscribeEvent + public void gatherData(GatherDataEvent event) + { +// GSON = new GsonBuilder().registerTypeAdapter(Variant.class, new Variant.Deserializer()).registerTypeAdapter(ItemCameraTransforms.class, new ItemCameraTransforms.Deserializer()).registerTypeAdapter(ItemTransformVec3f.class, new ItemTransformVec3f.Deserializer()).create(); + + DataGenerator gen = event.getGenerator(); + +// if(event.includeClient()) + { + ItemModelProvider itemModels = new GeneratorItemModels(gen, event.getExistingFileHelper()); + gen.addProvider(itemModels); + gen.addProvider(new GeneratorBlockStates(gen, itemModels.existingFileHelper)); + gen.addProvider(new GeneratorLanguage(gen)); + gen.addProvider(new BloodMagicRecipeProvider(gen)); + gen.addProvider(new GeneratorBaseRecipes(gen)); + gen.addProvider(new GeneratorLootTable(gen)); + + GeneratorBlockTags bmBlockTags = new GeneratorBlockTags(gen, event.getExistingFileHelper()); + gen.addProvider(bmBlockTags); + gen.addProvider(new GeneratorItemTags(gen, bmBlockTags, event.getExistingFileHelper())); + gen.addProvider(new GeneratorFluidTags(gen, event.getExistingFileHelper())); + + } + } + + private void loadModels(final ModelRegistryEvent event) + { + ModelLoaderRegistry.registerLoader(BloodMagic.rl("mimicloader"), new MimicModelLoader(BloodMagic.rl("block/solidopaquemimic"))); + ModelLoaderRegistry.registerLoader(BloodMagic.rl("mimicloader_ethereal"), new MimicModelLoader(BloodMagic.rl("block/etherealopaquemimic"))); + } + + private void setup(final FMLCommonSetupEvent event) + { + // some preinit code +// LOGGER.info("HELLO FROM PREINIT"); +// LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); + packetHandler.initialize(); + } + +// @OnlyIn(Dist.CLIENT) + private void doClientStuff(final FMLClientSetupEvent event) + { + // do something that can only be done on the client +// LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings); + + ClientEvents.initClientEvents(event); + Elements.registerElements(); + MinecraftForge.EVENT_BUS.register(new ClientEvents()); + KeyBindings.initializeKeys(); + new BloodMagicKeyHandler(); +// IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus(); +// + + } + + private void registerColors(final ColorHandlerEvent event) + { + if (event instanceof ColorHandlerEvent.Item) + ClientEvents.colorHandlerEvent((ColorHandlerEvent.Item) event); + } + + private void enqueueIMC(final InterModEnqueueEvent event) + { + // some example code to dispatch IMC to another mod +// InterModComms.sendTo("examplemod", "helloworld", () -> { +// LOGGER.info("Hello world from the MDK"); +// return "Hello world"; +// }); + } + + private void processIMC(final InterModProcessEvent event) + { + // some example code to receive and process InterModComms from other mods +// LOGGER.info("Got IMC {}", event.getIMCStream().map(m -> m.getMessageSupplier().get()).collect(Collectors.toList())); + } + + // You can use SubscribeEvent and let the Event Bus discover methods to call + @SubscribeEvent + public void onServerStarting(FMLServerStartingEvent event) + { + // do something when the server starts +// LOGGER.info("HELLO from server starting"); + } + + // You can use EventBusSubscriber to automatically subscribe events on the + // contained class (this is subscribing to the MOD + // Event bus for receiving Registry Events) + @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) + public static class RegistryEvents + { + @SubscribeEvent + public static void onBlocksRegistry(final RegistryEvent.Register blockRegistryEvent) + { + // register a new block here +// LOGGER.info("HELLO from Register Block"); + } + } + + // Custom ItemGroup TAB + public static final ItemGroup TAB = new ItemGroup("bloodmagictab") + { + @Override + public ItemStack createIcon() + { + return new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get()); + } + }; + public static final String NAME = "Blood Magic: Alchemical Wizardry"; +} diff --git a/src/main/java/wayoftime/bloodmagic/ConfigHandler.java b/src/main/java/wayoftime/bloodmagic/ConfigHandler.java new file mode 100644 index 00000000..ef072b52 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ConfigHandler.java @@ -0,0 +1,135 @@ +package wayoftime.bloodmagic; + +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID) +public class ConfigHandler +{ + // Most of this stuff is commented out because a proper replacement for the + // ConfigHandler is not yet implemented. + +// @Config.Comment( +// { "General settings" }) +// public static ConfigGeneral general = new ConfigGeneral(); +// @Config.Comment( +// { "Blacklist options for various features" }) +// public static ConfigBlacklist blacklist = new ConfigBlacklist(); +// @Config.Comment( +// { "Value modifiers for various features" }) +// public static ConfigValues values = new ConfigValues(); +// @Config.Comment( +// { "Settings that only pertain to the client" }) +// public static ConfigClient client = new ConfigClient(); +// @Config.Comment( +// { "Compatibility settings" }) +// public static ConfigCompat compat = new ConfigCompat(); +// +// @SubscribeEvent +// public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) +// { +// if (event.getModID().equals(BloodMagic.MODID)) +// { +// ConfigManager.sync(event.getModID(), Config.Type.INSTANCE); // Sync config values +// BloodMagic.RITUAL_MANAGER.syncConfig(); +// MeteorConfigHandler.handleMeteors(false); // Reload meteors +// } +// } +// +// public static class ConfigGeneral +// { +// @Config.Comment( +// { "Enables extra information to be printed to the log.", "Warning: May drastically increase log size." }) +// public boolean enableDebugLogging = false; +// @Config.Comment( +// { "Enables extra information to be printed to the log." }) +// public boolean enableAPILogging = false; +// @Config.Comment( +// { "Enables extra information to be printed to the log.", "Warning: May drastically increase log size." }) +// public boolean enableVerboseAPILogging = false; +// @Config.Comment( +// { "Enables tier 6 related registrations. This is for pack makers." }) +// @Config.RequiresMcRestart +// public boolean enableTierSixEvenThoughThereIsNoContent = false; +// } +// +// public static class ConfigBlacklist +// { +// @Config.Comment( +// { "Stops listed blocks and entities from being teleposed.", +// "Use the registry name of the block or entity. Vanilla objects do not require the modid.", +// "If a block is specified, you can list the variants to only blacklist a given state." }) +// public String[] teleposer = +// { "bedrock", "mob_spawner" }; +// @Config.Comment( +// { "Stops listed blocks from being transposed.", +// "Use the registry name of the block. Vanilla blocks do not require the modid." }) +// public String[] transposer = +// { "bedrock", "mob_spawner" }; +// @Config.Comment( +// { "Stops the listed entities from being used in the Well of Suffering.", +// "Use the registry name of the entity. Vanilla entities do not require the modid." }) +// public String[] wellOfSuffering = +// {}; +// } +// +// public static class ConfigValues +// { +// @Config.Comment( +// { "Declares the amount of LP gained per HP sacrificed for the given entity.", +// "Setting the value to 0 will blacklist it.", +// "Use the registry name of the entity followed by a ';' and then the value you want.", +// "Vanilla entities do not require the modid." }) +// public String[] sacrificialValues = +// { "villager;100", "slime;15", "enderman;10", "cow;100", "chicken;100", "horse;100", "sheep;100", "wolf;100", +// "ocelot;100", "pig;100", "rabbit;100" }; +// @Config.Comment( +// { "Amount of LP the Coat of Arms should provide for each damage dealt." }) +// @Config.RangeInt(min = 0, max = 100) +// public int coatOfArmsConversion = 20; +// @Config.Comment( +// { "Amount of LP the Sacrificial Dagger should provide for each damage dealt." }) +// @Config.RangeInt(min = 0, max = 10000) +// public int sacrificialDaggerConversion = 100; +// @Config.Comment( +// { "Will rewrite any default meteor types with new versions.", +// "Disable this if you want any of your changes to stay, or do not want default meteor types regenerated." }) +// public boolean shouldResyncMeteors = true; +// @Config.Comment( +// { "Should mobs that die through the Well of Suffering Ritual drop items?" }) +// public boolean wellOfSufferingDrops = true; +// } +// +// public static class ConfigClient +// { +// @Config.Comment( +// { "Always render the beams between routing nodes.", +// "If disabled, the beams will only render while the Node Router is held." }) +// public boolean alwaysRenderRoutingLines = false; +// @Config.Comment( +// { "Completely hide spectral blocks from view.", "If disabled, a transparent block will be displayed." }) +// public boolean invisibleSpectralBlocks = true; +// @Config.Comment( +// { "When cycling through slots, the Sigil of Holding will skip over empty slots and move to the next occupied one.", +// "If disabled, it will behave identically to the default hotbar." }) +// public boolean sigilHoldingSkipsEmptySlots = false; +// } +// +// public static class ConfigCompat +// { +// @Config.Comment( +// { "The display mode to use when looking at a Blood Altar.", "ALWAYS - Always display information.", +// "SIGIL_HELD - Only display information when a Divination or Seers sigil is held in either hand.", +// "SIGIL_CONTAINED - Only display information when a Divination or Seers sigil is somewhere in the inventory." }) +// public AltarDisplayMode wailaAltarDisplayMode = AltarDisplayMode.SIGIL_HELD; +// +// public enum AltarDisplayMode +// { +// ALWAYS, SIGIL_HELD, SIGIL_CONTAINED,; +// } +// } + + public static class values + { + public static int sacrificialDaggerConversion = 100; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ConfigManager.java b/src/main/java/wayoftime/bloodmagic/ConfigManager.java new file mode 100644 index 00000000..6863c46b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ConfigManager.java @@ -0,0 +1,36 @@ +package wayoftime.bloodmagic; + +import org.apache.commons.lang3.tuple.Pair; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import net.minecraftforge.common.ForgeConfigSpec; + +public class ConfigManager +{ + private static final Logger LOGGER = LogManager.getLogger(); + + public static final ClientConfig CLIENT; + public static final ForgeConfigSpec CLIENT_SPEC; + + static + { + final Pair specPair = new ForgeConfigSpec.Builder().configure(ClientConfig::new); + CLIENT_SPEC = specPair.getRight(); + CLIENT = specPair.getLeft(); + } + + public static class ClientConfig + { + public final ForgeConfigSpec.DoubleValue demonWillGaugeX; + public final ForgeConfigSpec.DoubleValue demonWillGaugeY; + + ClientConfig(ForgeConfigSpec.Builder builder) + { + builder.comment("Settings for the position of the Demon Will Gauge HUD element.").push("hud"); + demonWillGaugeX = builder.defineInRange("DemonWillGaugePosX", 0.01, 0, 1); + demonWillGaugeY = builder.defineInRange("DemonWillGaugePosY", 0.01, 0, 1); + builder.pop(); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/altar/AltarComponent.java b/src/main/java/wayoftime/bloodmagic/altar/AltarComponent.java new file mode 100644 index 00000000..bb9b4562 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/AltarComponent.java @@ -0,0 +1,62 @@ +package wayoftime.bloodmagic.altar; + +import net.minecraft.util.math.BlockPos; + +/** + * Used for building the altar structure. + */ +public class AltarComponent +{ + private final BlockPos offset; + private final ComponentType component; + private boolean upgradeSlot; + + /** + * Sets a component location for the altar. + * + * @param offset - Where the block should be in relation to the Altar + * @param component - The type of Component the location should contain + */ + public AltarComponent(BlockPos offset, ComponentType component) + { + this.offset = offset; + this.component = component; + } + + /** + * Use for setting a location at which there must be a block, but the type of + * block does not matter. + * + * @param offset - Where the block should be in relation to the Altar + */ + public AltarComponent(BlockPos offset) + { + this(offset, ComponentType.NOTAIR); + } + + /** + * Sets the location to an upgrade slot. + * + * @return the current instance for further use. + */ + public AltarComponent setUpgradeSlot() + { + this.upgradeSlot = true; + return this; + } + + public BlockPos getOffset() + { + return offset; + } + + public boolean isUpgradeSlot() + { + return upgradeSlot; + } + + public ComponentType getComponent() + { + return component; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/altar/AltarTier.java b/src/main/java/wayoftime/bloodmagic/altar/AltarTier.java new file mode 100644 index 00000000..7ab6c3ff --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/AltarTier.java @@ -0,0 +1,172 @@ +package wayoftime.bloodmagic.altar; + +import java.util.List; +import java.util.function.Consumer; + +import com.google.common.collect.Lists; + +import net.minecraft.util.math.BlockPos; + +public enum AltarTier +{ + ONE() + { + @Override + public void buildComponents(Consumer components) + { + // Nada + } + }, + TWO() + { + @Override + public void buildComponents(Consumer components) + { + components.accept(new AltarComponent(new BlockPos(-1, -1, -1), ComponentType.BLOODRUNE)); + components.accept(new AltarComponent(new BlockPos(0, -1, -1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(1, -1, -1), ComponentType.BLOODRUNE)); + components.accept(new AltarComponent(new BlockPos(-1, -1, 0), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(1, -1, 0), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-1, -1, 1), ComponentType.BLOODRUNE)); + components.accept(new AltarComponent(new BlockPos(0, -1, 1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(1, -1, 1), ComponentType.BLOODRUNE)); + } + }, + THREE() + { + @Override + public void buildComponents(Consumer components) + { + // Doesn't pull from tier 2 because upgrades slots are different + components.accept(new AltarComponent(new BlockPos(-1, -1, -1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(0, -1, -1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(1, -1, -1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-1, -1, 0), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(1, -1, 0), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-1, -1, 1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(0, -1, 1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(1, -1, 1), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-3, -1, -3))); + components.accept(new AltarComponent(new BlockPos(-3, 0, -3))); + components.accept(new AltarComponent(new BlockPos(3, -1, -3))); + components.accept(new AltarComponent(new BlockPos(3, 0, -3))); + components.accept(new AltarComponent(new BlockPos(-3, -1, 3))); + components.accept(new AltarComponent(new BlockPos(-3, 0, 3))); + components.accept(new AltarComponent(new BlockPos(3, -1, 3))); + components.accept(new AltarComponent(new BlockPos(3, 0, 3))); + components.accept(new AltarComponent(new BlockPos(-3, 1, -3), ComponentType.GLOWSTONE)); + components.accept(new AltarComponent(new BlockPos(3, 1, -3), ComponentType.GLOWSTONE)); + components.accept(new AltarComponent(new BlockPos(-3, 1, 3), ComponentType.GLOWSTONE)); + components.accept(new AltarComponent(new BlockPos(3, 1, 3), ComponentType.GLOWSTONE)); + + for (int i = -2; i <= 2; i++) + { + components.accept(new AltarComponent(new BlockPos(3, -2, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-3, -2, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -2, 3), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -2, -3), ComponentType.BLOODRUNE).setUpgradeSlot()); + } + } + }, + FOUR() + { + @Override + public void buildComponents(Consumer components) + { + THREE.getAltarComponents().forEach(components); + + for (int i = -3; i <= 3; i++) + { + components.accept(new AltarComponent(new BlockPos(5, -3, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-5, -3, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -3, 5), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -3, -5), ComponentType.BLOODRUNE).setUpgradeSlot()); + } + + for (int i = -2; i <= 1; i++) + { + components.accept(new AltarComponent(new BlockPos(5, i, 5))); + components.accept(new AltarComponent(new BlockPos(5, i, -5))); + components.accept(new AltarComponent(new BlockPos(-5, i, -5))); + components.accept(new AltarComponent(new BlockPos(-5, i, 5))); + } + + components.accept(new AltarComponent(new BlockPos(5, 2, 5), ComponentType.BLOODSTONE)); + components.accept(new AltarComponent(new BlockPos(5, 2, -5), ComponentType.BLOODSTONE)); + components.accept(new AltarComponent(new BlockPos(-5, 2, -5), ComponentType.BLOODSTONE)); + components.accept(new AltarComponent(new BlockPos(-5, 2, 5), ComponentType.BLOODSTONE)); + } + }, + FIVE() + { + @Override + public void buildComponents(Consumer components) + { + FOUR.getAltarComponents().forEach(components); + components.accept(new AltarComponent(new BlockPos(-8, -3, 8), ComponentType.BEACON)); + components.accept(new AltarComponent(new BlockPos(-8, -3, -8), ComponentType.BEACON)); + components.accept(new AltarComponent(new BlockPos(8, -3, -8), ComponentType.BEACON)); + components.accept(new AltarComponent(new BlockPos(8, -3, 8), ComponentType.BEACON)); + + for (int i = -6; i <= 6; i++) + { + components.accept(new AltarComponent(new BlockPos(8, -4, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-8, -4, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -4, 8), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -4, -8), ComponentType.BLOODRUNE).setUpgradeSlot()); + } + } + }, + SIX() + { + @Override + public void buildComponents(Consumer components) + { + FIVE.getAltarComponents().forEach(components); + + for (int i = -4; i <= 2; i++) + { + components.accept(new AltarComponent(new BlockPos(11, i, 11))); + components.accept(new AltarComponent(new BlockPos(-11, i, -11))); + components.accept(new AltarComponent(new BlockPos(11, i, -11))); + components.accept(new AltarComponent(new BlockPos(-11, i, 11))); + } + + components.accept(new AltarComponent(new BlockPos(11, 3, 11), ComponentType.CRYSTAL)); + components.accept(new AltarComponent(new BlockPos(-11, 3, -11), ComponentType.CRYSTAL)); + components.accept(new AltarComponent(new BlockPos(11, 3, -11), ComponentType.CRYSTAL)); + components.accept(new AltarComponent(new BlockPos(-11, 3, 11), ComponentType.CRYSTAL)); + + for (int i = -9; i <= 9; i++) + { + components.accept(new AltarComponent(new BlockPos(11, -5, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(-11, -5, i), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -5, 11), ComponentType.BLOODRUNE).setUpgradeSlot()); + components.accept(new AltarComponent(new BlockPos(i, -5, -11), ComponentType.BLOODRUNE).setUpgradeSlot()); + } + } + }; + + public static final int MAXTIERS = values().length; + + private List altarComponents; + + AltarTier() + { + this.altarComponents = Lists.newArrayList(); + + buildComponents(altarComponents::add); + } + + public abstract void buildComponents(Consumer components); + + public int toInt() + { + return ordinal() + 1; + } + + public List getAltarComponents() + { + return altarComponents; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/altar/AltarUpgrade.java b/src/main/java/wayoftime/bloodmagic/altar/AltarUpgrade.java new file mode 100644 index 00000000..f7d9cc43 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/AltarUpgrade.java @@ -0,0 +1,29 @@ +package wayoftime.bloodmagic.altar; + +import java.util.EnumMap; + +import com.google.common.collect.Maps; + +import wayoftime.bloodmagic.block.enums.BloodRuneType; + +public class AltarUpgrade +{ + + private final EnumMap upgradeLevels; + + public AltarUpgrade() + { + this.upgradeLevels = Maps.newEnumMap(BloodRuneType.class); + } + + public AltarUpgrade upgrade(BloodRuneType rune) + { + upgradeLevels.compute(rune, (r, l) -> l == null ? 1 : l + 1); + return this; + } + + public int getLevel(BloodRuneType rune) + { + return upgradeLevels.getOrDefault(rune, 0); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java b/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java new file mode 100644 index 00000000..b02d469a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java @@ -0,0 +1,95 @@ +package wayoftime.bloodmagic.altar; + +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.common.block.BlockBloodRune; +import wayoftime.bloodmagic.tile.TileAltar; + +public class AltarUtil +{ + + @Nonnull + public static AltarTier getTier(World world, BlockPos pos) + { + TileEntity tile = world.getTileEntity(pos); + if (!(tile instanceof TileAltar)) + return AltarTier.ONE; + + AltarTier lastCheck = AltarTier.ONE; + for (AltarTier tier : AltarTier.values()) + { + for (AltarComponent component : tier.getAltarComponents()) + { + BlockPos componentPos = pos.add(component.getOffset()); + BlockState worldState = world.getBlockState(componentPos); + + if (component.getComponent() == ComponentType.NOTAIR && worldState.getMaterial() != Material.AIR + && !worldState.getMaterial().isLiquid()) + continue; + + List validStates = BloodMagicAPI.INSTANCE.getComponentStates(component.getComponent()); + if (!validStates.contains(worldState)) + return lastCheck; + } + + lastCheck = tier; + } + + return lastCheck; + } + + @Nonnull + public static AltarUpgrade getUpgrades(World world, BlockPos pos, AltarTier currentTier) + { + AltarUpgrade upgrades = new AltarUpgrade(); + + for (AltarComponent component : currentTier.getAltarComponents()) + { + if (!component.isUpgradeSlot() || component.getComponent() != ComponentType.BLOODRUNE) + continue; + + BlockPos componentPos = pos.add(component.getOffset()); + BlockState state = world.getBlockState(componentPos); + if (state.getBlock() instanceof BlockBloodRune) + upgrades.upgrade(((BlockBloodRune) state.getBlock()).getBloodRune(world, componentPos)); + } + + return upgrades; + } + + @Nullable + public static Pair getFirstMissingComponent(World world, BlockPos pos, int altarTier) + { + if (altarTier >= AltarTier.MAXTIERS) + return null; + + for (AltarTier tier : AltarTier.values()) + { + for (AltarComponent component : tier.getAltarComponents()) + { + BlockPos componentPos = pos.add(component.getOffset()); + BlockState worldState = world.getBlockState(componentPos); + if (component.getComponent() == ComponentType.NOTAIR && worldState.getMaterial() != Material.AIR + && !worldState.getMaterial().isLiquid()) + continue; + + List validStates = BloodMagicAPI.INSTANCE.getComponentStates(component.getComponent()); + if (!validStates.contains(worldState)) + return Pair.of(componentPos, component.getComponent()); + } + } + + return null; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/altar/BloodAltar.java b/src/main/java/wayoftime/bloodmagic/altar/BloodAltar.java new file mode 100644 index 00000000..45d0f645 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/BloodAltar.java @@ -0,0 +1,810 @@ +package wayoftime.bloodmagic.altar; + +import com.google.common.base.Enums; + +import net.minecraft.block.BlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.particles.RedstoneParticleData; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidAttributes; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.templates.FluidTank; +import net.minecraftforge.items.ItemHandlerHelper; +import wayoftime.bloodmagic.api.event.BloodMagicCraftedEvent; +import wayoftime.bloodmagic.block.enums.BloodRuneType; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodOrb; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.common.item.IBloodOrb; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.tile.TileAltar; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NetworkHelper; + +public class BloodAltar// implements IFluidHandler +{ + + public boolean isActive; + + protected FluidStack fluidOutput = new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), 0); // TODO: Fix + protected FluidStack fluidInput = new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), 0); + + protected FluidTank tank = new FluidTank(FluidAttributes.BUCKET_VOLUME); + + private final LazyOptional holder = LazyOptional.of(() -> tank); + + private TileAltar tileAltar; + private int internalCounter = 0; + private AltarTier altarTier = AltarTier.ONE; + private AltarUpgrade upgrade; + private int capacity = FluidAttributes.BUCKET_VOLUME * 10; + private FluidStack fluid = new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), 0); + private int liquidRequired; // mB + private boolean canBeFilled; + private int consumptionRate; + private int drainRate; + private float consumptionMultiplier; + private float efficiencyMultiplier; + private float sacrificeEfficiencyMultiplier; + private float selfSacrificeEfficiencyMultiplier; + private float capacityMultiplier = 1; + private float orbCapacityMultiplier; + private float dislocationMultiplier; + private int accelerationUpgrades; + private boolean isUpgraded; + private boolean isResultBlock; + private int bufferCapacity = FluidAttributes.BUCKET_VOLUME; + private int progress; + private int lockdownDuration; + private int demonBloodDuration; + private int totalCharge = 0; // TODO save + private int chargingRate = 0; + private int chargingFrequency = 0; + private int maxCharge = 0; + private int cooldownAfterCrafting = 60; + private RecipeBloodAltar recipe; + private AltarTier currentTierDisplayed = AltarTier.ONE; + + public BloodAltar(TileAltar tileAltar) + { + this.tileAltar = tileAltar; + } + + public void readFromNBT(CompoundNBT tagCompound) + { + if (!tagCompound.contains(Constants.NBT.EMPTY)) + { + FluidStack fluid = FluidStack.loadFluidStackFromNBT(tagCompound); + + if (fluid != null) + { + setMainFluid(new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), fluid.getAmount())); +// setMainFluid(fluid); + } else + { +// setMainFluid(new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), fluid.getAmount())); + } + + FluidStack fluidOut = new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), tagCompound.getInt(Constants.NBT.OUTPUT_AMOUNT)); + setOutputFluid(fluidOut); + + FluidStack fluidIn = new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), tagCompound.getInt(Constants.NBT.INPUT_AMOUNT)); + setInputFluid(fluidIn); + } + + internalCounter = tagCompound.getInt("internalCounter"); + altarTier = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_TIER)).or(AltarTier.ONE); + isActive = tagCompound.getBoolean(Constants.NBT.ALTAR_ACTIVE); + liquidRequired = tagCompound.getInt(Constants.NBT.ALTAR_LIQUID_REQ); + canBeFilled = tagCompound.getBoolean(Constants.NBT.ALTAR_FILLABLE); + isUpgraded = tagCompound.getBoolean(Constants.NBT.ALTAR_UPGRADED); + consumptionRate = tagCompound.getInt(Constants.NBT.ALTAR_CONSUMPTION_RATE); + drainRate = tagCompound.getInt(Constants.NBT.ALTAR_DRAIN_RATE); + consumptionMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER); + efficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER); + selfSacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER); + sacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER); + capacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER); + orbCapacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER); + dislocationMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER); + capacity = tagCompound.getInt(Constants.NBT.ALTAR_CAPACITY); + bufferCapacity = tagCompound.getInt(Constants.NBT.ALTAR_BUFFER_CAPACITY); + progress = tagCompound.getInt(Constants.NBT.ALTAR_PROGRESS); + isResultBlock = tagCompound.getBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK); + lockdownDuration = tagCompound.getInt(Constants.NBT.ALTAR_LOCKDOWN_DURATION); + accelerationUpgrades = tagCompound.getInt(Constants.NBT.ALTAR_ACCELERATION_UPGRADES); + demonBloodDuration = tagCompound.getInt(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION); + cooldownAfterCrafting = tagCompound.getInt(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING); + chargingRate = tagCompound.getInt(Constants.NBT.ALTAR_CHARGE_RATE); + chargingFrequency = tagCompound.getInt(Constants.NBT.ALTAR_CHARGE_FREQUENCY); + totalCharge = tagCompound.getInt(Constants.NBT.ALTAR_TOTAL_CHARGE); + maxCharge = tagCompound.getInt(Constants.NBT.ALTAR_MAX_CHARGE); + currentTierDisplayed = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED)).or(AltarTier.ONE); + } + + public void writeToNBT(CompoundNBT tagCompound) + { + + if (fluid != null) + fluid.writeToNBT(tagCompound); + else + tagCompound.putString(Constants.NBT.EMPTY, ""); + + if (fluidOutput != null) + tagCompound.putInt(Constants.NBT.OUTPUT_AMOUNT, fluidOutput.getAmount()); + + if (fluidInput != null) + tagCompound.putInt(Constants.NBT.INPUT_AMOUNT, fluidInput.getAmount()); + + tagCompound.putInt("internalCounter", internalCounter); + tagCompound.putString(Constants.NBT.ALTAR_TIER, altarTier.name()); + tagCompound.putBoolean(Constants.NBT.ALTAR_ACTIVE, isActive); + tagCompound.putInt(Constants.NBT.ALTAR_LIQUID_REQ, liquidRequired); + tagCompound.putBoolean(Constants.NBT.ALTAR_FILLABLE, canBeFilled); + tagCompound.putBoolean(Constants.NBT.ALTAR_UPGRADED, isUpgraded); + tagCompound.putInt(Constants.NBT.ALTAR_CONSUMPTION_RATE, consumptionRate); + tagCompound.putInt(Constants.NBT.ALTAR_DRAIN_RATE, drainRate); + tagCompound.putFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER, consumptionMultiplier); + tagCompound.putFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER, efficiencyMultiplier); + tagCompound.putFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER, sacrificeEfficiencyMultiplier); + tagCompound.putFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER, selfSacrificeEfficiencyMultiplier); + tagCompound.putBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK, isResultBlock); + tagCompound.putFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER, capacityMultiplier); + tagCompound.putFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER, orbCapacityMultiplier); + tagCompound.putFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER, dislocationMultiplier); + tagCompound.putInt(Constants.NBT.ALTAR_CAPACITY, capacity); + tagCompound.putInt(Constants.NBT.ALTAR_PROGRESS, progress); + tagCompound.putInt(Constants.NBT.ALTAR_BUFFER_CAPACITY, bufferCapacity); + tagCompound.putInt(Constants.NBT.ALTAR_LOCKDOWN_DURATION, lockdownDuration); + tagCompound.putInt(Constants.NBT.ALTAR_ACCELERATION_UPGRADES, accelerationUpgrades); + tagCompound.putInt(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION, demonBloodDuration); + tagCompound.putInt(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING, cooldownAfterCrafting); + tagCompound.putInt(Constants.NBT.ALTAR_CHARGE_RATE, chargingRate); + tagCompound.putInt(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency); + tagCompound.putInt(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge); + tagCompound.putInt(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge); + tagCompound.putString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name()); + } + + public void startCycle() + { + if (tileAltar.getWorld() != null) + tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); + + checkTier(); + + // Temporary thing to test the recipes. +// fluid.setAmount(10000); +// this.setMainFluid(new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), 10000)); + + if ((fluid == null || fluid.getAmount() <= 0) && totalCharge <= 0) + return; + + if (!isActive) + progress = 0; + + ItemStack input = tileAltar.getStackInSlot(0); + + if (!input.isEmpty()) + { + // Do recipes + RecipeBloodAltar recipe = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getBloodAltar(tileAltar.getWorld(), input); + if (recipe != null) + { + if (recipe.getMinimumTier() <= altarTier.ordinal()) + { + this.isActive = true; + this.recipe = recipe; + this.liquidRequired = recipe.getSyphon(); + this.consumptionRate = recipe.getConsumeRate(); + this.drainRate = recipe.getDrainRate(); + this.canBeFilled = false; + return; + } + } else if (input.getItem() instanceof IBloodOrb) + { + this.isActive = true; + this.canBeFilled = true; + return; + } + } + + isActive = false; + } + + public void update() + { +// World world = tileAltar.getWorld(); +// +// RecipeBloodAltar recipe = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getBloodAltar(world, new ItemStack(Items.DIAMOND)); +// +// if (recipe != null) +// { +// System.out.println("Found a recipe!"); +// } +// +// List altarRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ALTAR); +// +// System.out.println("There are currently " + altarRecipes.size() + " Altar Recipes loaded."); +// +// this.fluidInput = new FluidStack(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), 1000); + +// System.out.println(this.fluidOutput.getAmount()); + + World world = tileAltar.getWorld(); + BlockPos pos = tileAltar.getPos(); + + if (world.isRemote) + return; + + // Used instead of the world time for checks that do not happen every tick + internalCounter++; + + if (lockdownDuration > 0) + lockdownDuration--; + + if (internalCounter % 20 == 0) + { + for (Direction facing : Direction.values()) + { + BlockPos newPos = pos.offset(facing); + BlockState block = world.getBlockState(newPos); + block.getBlock().onNeighborChange(block, world, newPos, pos); + } + } + if (internalCounter % (Math.max(20 - this.accelerationUpgrades, 1)) == 0) + { + int syphonMax = (int) (20 * this.dislocationMultiplier); + int fluidInputted; + int fluidOutputted; + fluidInputted = Math.min(syphonMax, -this.fluid.getAmount() + capacity); + fluidInputted = Math.min(this.fluidInput.getAmount(), fluidInputted); + this.fluid.setAmount(this.fluid.getAmount() + fluidInputted); + this.fluidInput.setAmount(this.fluidInput.getAmount() - fluidInputted); + fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.getAmount()); + fluidOutputted = Math.min(this.fluid.getAmount(), fluidOutputted); + this.fluidOutput.setAmount(this.fluidOutput.getAmount() + fluidOutputted); + this.fluid.setAmount(this.fluid.getAmount() - fluidOutputted); + tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); + } + + if (internalCounter % this.getChargingFrequency() == 0 && !this.isActive) + { + int chargeInputted = Math.min(chargingRate, this.fluid.getAmount()); + chargeInputted = Math.min(chargeInputted, maxCharge - totalCharge); + totalCharge += chargeInputted; + this.fluid.setAmount(this.fluid.getAmount() - chargeInputted); + tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); + } + + if (internalCounter % 100 == 0 && (this.isActive || this.cooldownAfterCrafting <= 0)) + startCycle(); + + updateAltar(); + } + + private void updateAltar() + { +// System.out.println("Updating altar."); + if (!isActive) + { + if (cooldownAfterCrafting > 0) + cooldownAfterCrafting--; + return; + } + + if (!canBeFilled && recipe == null) + { + startCycle(); + return; + } + + ItemStack input = tileAltar.getStackInSlot(0); + + if (input.isEmpty()) + return; + + World world = tileAltar.getWorld(); + BlockPos pos = tileAltar.getPos(); + + if (world.isRemote) + return; + + if (!canBeFilled) + { + boolean hasOperated = false; + int stackSize = input.getCount(); + + if (totalCharge > 0) + { + int chargeDrained = Math.min(liquidRequired * stackSize - progress, totalCharge); + + totalCharge -= chargeDrained; + progress += chargeDrained; + hasOperated = true; + } + if (fluid != null && fluid.getAmount() >= 1) + { +// int liquidDrained = Math.min((int) (altarTier.ordinal() >= 1 +// ? consumptionRate * (1 + consumptionMultiplier) +// : consumptionRate), fluid.getAmount()); + int liquidDrained = Math.min((int) (consumptionRate * (1 + consumptionMultiplier)), fluid.getAmount()); + + if (liquidDrained > (liquidRequired * stackSize - progress)) + liquidDrained = liquidRequired * stackSize - progress; + + fluid.setAmount(fluid.getAmount() - liquidDrained); + progress += liquidDrained; + + hasOperated = true; + + if (internalCounter % 4 == 0 && world instanceof ServerWorld) + { + ServerWorld server = (ServerWorld) world; +// server.spawnParticle(ParticleTypes.SPLASH, (double) pos.getX() +// + worldIn.rand.nextDouble(), (double) (pos.getY() + 1), (double) pos.getZ() +// + worldIn.rand.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); + server.spawnParticle(RedstoneParticleData.REDSTONE_DUST, pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5, 1, 0.2, 0.0, 0.2, 0.0); + } + + } else if (!hasOperated && progress > 0) + { + progress -= (int) (efficiencyMultiplier * drainRate); + + if (internalCounter % 2 == 0 && world instanceof ServerWorld) + { + ServerWorld server = (ServerWorld) world; + server.spawnParticle(ParticleTypes.LARGE_SMOKE, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0.1, 0, 0.1, 0); + } + } + + if (hasOperated) + { + if (progress >= liquidRequired * stackSize) + { + ItemStack result = ItemHandlerHelper.copyStackWithSize(recipe.getOutput(), stackSize); + + BloodMagicCraftedEvent.Altar event = new BloodMagicCraftedEvent.Altar(result, input.copy()); + MinecraftForge.EVENT_BUS.post(event); + tileAltar.setInventorySlotContents(0, event.getOutput()); + progress = 0; + + if (world instanceof ServerWorld) + { + ServerWorld server = (ServerWorld) world; + server.spawnParticle(RedstoneParticleData.REDSTONE_DUST, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 40, 0.3, 0, 0.3, 0); + } + + this.cooldownAfterCrafting = 30; + this.isActive = false; + } + } + } else + { + ItemStack contained = tileAltar.getStackInSlot(0); + + if (contained.isEmpty() || !(contained.getItem() instanceof IBloodOrb) || !(contained.getItem() instanceof IBindable)) + return; + + BloodOrb orb = ((IBloodOrb) contained.getItem()).getOrb(contained); + Binding binding = ((IBindable) contained.getItem()).getBinding(contained); + + if (binding == null || orb == null) + return; + + if (fluid != null && fluid.getAmount() >= 1) + { +// int liquidDrained = Math.min((int) (altarTier.ordinal() >= 2 +// ? orb.getFillRate() * (1 + consumptionMultiplier) +// : orb.getFillRate()), fluid.getAmount()); + int liquidDrained = Math.min((int) (orb.getFillRate() * (1 + consumptionMultiplier)), fluid.getAmount()); + int drain = NetworkHelper.getSoulNetwork(binding).add(liquidDrained, (int) (orb.getCapacity() * this.orbCapacityMultiplier)); + fluid.setAmount(fluid.getAmount() - drain); + + if (drain > 0 && internalCounter % 4 == 0 && world instanceof ServerWorld) + { + ServerWorld server = (ServerWorld) world; + server.spawnParticle(ParticleTypes.WITCH, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0, 0, 0, 0.001); + } + } + } + + tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); + } + + public void checkTier() + { + AltarTier tier = AltarUtil.getTier(tileAltar.getWorld(), tileAltar.getPos()); + this.altarTier = tier; + + upgrade = AltarUtil.getUpgrades(tileAltar.getWorld(), tileAltar.getPos(), tier); + + if (tier.equals(currentTierDisplayed)) + currentTierDisplayed = AltarTier.ONE; + + if (tier.equals(AltarTier.ONE)) + { + upgrade = null; + isUpgraded = false; + this.consumptionMultiplier = 0; + this.efficiencyMultiplier = 1; + this.sacrificeEfficiencyMultiplier = 0; + this.selfSacrificeEfficiencyMultiplier = 0; + this.capacityMultiplier = 1; + this.orbCapacityMultiplier = 1; + this.dislocationMultiplier = 1; + this.accelerationUpgrades = 0; + this.chargingFrequency = 20; + this.chargingRate = 0; + this.maxCharge = 0; + this.totalCharge = 0; + return; + } else if (!tier.equals(AltarTier.ONE)) + { + this.isUpgraded = true; + this.accelerationUpgrades = upgrade.getLevel(BloodRuneType.ACCELERATION); + this.consumptionMultiplier = (float) (0.20 * upgrade.getLevel(BloodRuneType.SPEED)); + this.efficiencyMultiplier = (float) Math.pow(0.85, upgrade.getLevel(BloodRuneType.EFFICIENCY)); + this.sacrificeEfficiencyMultiplier = (float) (0.10 * upgrade.getLevel(BloodRuneType.SACRIFICE)); + this.selfSacrificeEfficiencyMultiplier = (float) (0.10 * upgrade.getLevel(BloodRuneType.SELF_SACRIFICE)); + int cap = upgrade.getLevel(BloodRuneType.CAPACITY); + int cap_aug = upgrade.getLevel(BloodRuneType.AUGMENTED_CAPACITY); + this.capacityMultiplier = (float) ((1 + 0.20 * cap) * Math.pow(1.1, cap_aug * Math.pow(0.99, Math.abs(cap_aug - cap)))); + this.dislocationMultiplier = (float) (Math.pow(1.2, upgrade.getLevel(BloodRuneType.DISPLACEMENT))); + this.orbCapacityMultiplier = (float) (1 + 0.02 * upgrade.getLevel(BloodRuneType.ORB)); + this.chargingFrequency = Math.max(20 - accelerationUpgrades, 1); + this.chargingRate = (int) (10 * upgrade.getLevel(BloodRuneType.CHARGING) * (1 + consumptionMultiplier / 2)); + this.maxCharge = (int) (FluidAttributes.BUCKET_VOLUME * Math.max(0.5 * capacityMultiplier, 1) * upgrade.getLevel(BloodRuneType.CHARGING)); + } + + this.capacity = (int) (FluidAttributes.BUCKET_VOLUME * 10 * capacityMultiplier); + this.bufferCapacity = (int) (FluidAttributes.BUCKET_VOLUME * 1 * capacityMultiplier); + + if (this.fluid.getAmount() > this.capacity) + this.fluid.setAmount(this.capacity); + if (this.fluidOutput.getAmount() > this.bufferCapacity) + this.fluidOutput.setAmount(this.bufferCapacity); + if (this.fluidInput.getAmount() > this.bufferCapacity) + this.fluidInput.setAmount(this.bufferCapacity); + if (this.totalCharge > this.maxCharge) + this.totalCharge = this.maxCharge; + + tileAltar.getWorld().notifyBlockUpdate(tileAltar.getPos(), tileAltar.getWorld().getBlockState(tileAltar.getPos()), tileAltar.getWorld().getBlockState(tileAltar.getPos()), 3); + } + + public int fillMainTank(int amount) + { + int filledAmount = Math.min(capacity - fluid.getAmount(), amount); + fluid.setAmount(fluid.getAmount() + filledAmount); + + return filledAmount; + } + + public void sacrificialDaggerCall(int amount, boolean isSacrifice) + { + if (this.lockdownDuration > 0) + { + int amt = (int) Math.min(bufferCapacity - fluidInput.getAmount(), (isSacrifice + ? 1 + sacrificeEfficiencyMultiplier + : 1 + selfSacrificeEfficiencyMultiplier) * amount); + fluidInput.setAmount(fluidInput.getAmount() + amt); + } else + { + fluid.setAmount((int) (fluid.getAmount() + Math.min(capacity - fluid.getAmount(), (isSacrifice + ? 1 + sacrificeEfficiencyMultiplier + : 1 + selfSacrificeEfficiencyMultiplier) * amount))); + } + } + + public void setMainFluid(FluidStack fluid) + { + this.fluid = fluid; + } + + public void setOutputFluid(FluidStack fluid) + { + this.fluidOutput = fluid; + } + + public void setInputFluid(FluidStack fluid) + { + this.fluidInput = fluid; + } + + public AltarUpgrade getUpgrade() + { + return upgrade; + } + + public void setUpgrade(AltarUpgrade upgrade) + { + this.upgrade = upgrade; + } + + public int getCapacity() + { + return capacity; + } + + public FluidStack getFluid() + { + return fluid; + } + + public int getFluidAmount() + { + return fluid.getAmount(); + } + + public int getCurrentBlood() + { + return getFluidAmount(); + } + + public AltarTier getTier() + { + return altarTier; + } + + public void setTier(AltarTier tier) + { + this.altarTier = tier; + } + + public int getProgress() + { + return progress; + } + + public float getSacrificeMultiplier() + { + return sacrificeEfficiencyMultiplier; + } + + public float getSelfSacrificeMultiplier() + { + return selfSacrificeEfficiencyMultiplier; + } + + public float getOrbMultiplier() + { + return orbCapacityMultiplier; + } + + public float getDislocationMultiplier() + { + return dislocationMultiplier; + } + + public float getConsumptionMultiplier() + { + return consumptionMultiplier; + } + + public float getConsumptionRate() + { + return consumptionRate; + } + + public int getLiquidRequired() + { + return liquidRequired; + } + + public int getBufferCapacity() + { + return bufferCapacity; + } + + public boolean setCurrentTierDisplayed(AltarTier altarTier) + { + if (currentTierDisplayed == altarTier) + return false; + else + currentTierDisplayed = altarTier; + return true; + } + + public void addToDemonBloodDuration(int dur) + { + this.demonBloodDuration += dur; + } + + public boolean hasDemonBlood() + { + return this.demonBloodDuration > 0; + } + + public void decrementDemonBlood() + { + this.demonBloodDuration = Math.max(0, this.demonBloodDuration - 1); + } + + public void setActive() + { +// if (tileAltar.getStackInSlot(0).isEmpty()) +// { +// isActive = false; +// } + } + + public boolean isActive() + { + return isActive; + } + + public void requestPauseAfterCrafting(int amount) + { + if (this.isActive) + { + this.cooldownAfterCrafting = amount; + } + } + + public int getChargingRate() + { + return chargingRate; + } + + public int getTotalCharge() + { + return totalCharge; + } + + public int getChargingFrequency() + { + return chargingFrequency == 0 ? 1 : chargingFrequency; + } + + public int fill(FluidStack resource, boolean doFill) + { + if (resource == null || resource.getFluid() != BloodMagicBlocks.LIFE_ESSENCE_FLUID.get()) + { + return 0; + } + + if (!doFill) + { + if (fluidInput == null || fluidInput.isEmpty()) + { + return Math.min(bufferCapacity, resource.getAmount()); + } + + if (!fluidInput.isFluidEqual(resource)) + { + return 0; + } + + return Math.min(bufferCapacity - fluidInput.getAmount(), resource.getAmount()); + } + + if (fluidInput == null || fluidInput.isEmpty()) + { + fluidInput = new FluidStack(resource, Math.min(bufferCapacity, resource.getAmount())); + + return fluidInput.getAmount(); + } + + if (!fluidInput.isFluidEqual(resource)) + { + return 0; + } + int filled = bufferCapacity - fluidInput.getAmount(); + + if (resource.getAmount() < filled) + { + fluidInput.setAmount(fluidInput.getAmount() + resource.getAmount()); + filled = resource.getAmount(); + } else + { + fluidInput.setAmount(bufferCapacity); + } + + return filled; + } + + public FluidStack drain(FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(fluidOutput)) + { + return FluidStack.EMPTY; + } + return drain(resource.getAmount(), doDrain); + } + + public FluidStack drain(int maxDrain, boolean doDrain) + { + if (fluidOutput == null) + { + return FluidStack.EMPTY; + } + + int drained = maxDrain; + if (fluidOutput.getAmount() < drained) + { + drained = fluidOutput.getAmount(); + } + + FluidStack stack = new FluidStack(fluidOutput, drained); + if (doDrain) + { + fluidOutput.setAmount(fluidOutput.getAmount() - drained); + } + return stack; + } + +// @Override +// public IFluidTankProperties[] getTankProperties() +// { +// return new IFluidTankProperties[] +// { new FluidTankPropertiesWrapper(new FluidTank(fluid, capacity)) }; +// } + + public AltarTier getCurrentTierDisplayed() + { + return currentTierDisplayed; + } + + public static class VariableSizeFluidHandler implements IFluidHandler + { + BloodAltar altar; + + public VariableSizeFluidHandler(BloodAltar altar) + { + this.altar = altar; + } + + @Override + public int getTanks() + { + // TODO Auto-generated method stub + return 1; + } + + @Override + public FluidStack getFluidInTank(int tank) + { + return altar.fluid; + } + + @Override + public int getTankCapacity(int tank) + { + return altar.getCapacity(); + } + + @Override + public boolean isFluidValid(int tank, FluidStack stack) + { + return stack.getFluid() == BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(); + } + + @Override + public int fill(FluidStack resource, FluidAction action) + { + return altar.fill(resource, action == FluidAction.EXECUTE); + } + + @Override + public FluidStack drain(FluidStack resource, FluidAction action) + { + return altar.drain(resource, action == FluidAction.EXECUTE); + } + + @Override + public FluidStack drain(int maxDrain, FluidAction action) + { + return altar.drain(maxDrain, action == FluidAction.EXECUTE); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/altar/ComponentType.java b/src/main/java/wayoftime/bloodmagic/altar/ComponentType.java new file mode 100644 index 00000000..30cae9dc --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/ComponentType.java @@ -0,0 +1,37 @@ +package wayoftime.bloodmagic.altar; + +import java.util.Locale; + +/** + * List of different components used to construct different tiers of altars. + */ +public enum ComponentType +{ + GLOWSTONE, BLOODSTONE, BEACON, BLOODRUNE, CRYSTAL, NOTAIR; + + private static final String BASE = "chat.bloodmagic.altar.comp."; + private String key; + + ComponentType() + { + this.key = BASE + name().toLowerCase(Locale.ENGLISH); + } + + public String getKey() + { + return key; + } + + public static ComponentType getType(String type) + { + for (ComponentType t : values()) + { + if (t.name().equalsIgnoreCase(type)) + { + return t; + } + } + + return null; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/altar/IBloodAltar.java b/src/main/java/wayoftime/bloodmagic/altar/IBloodAltar.java new file mode 100644 index 00000000..08f8253c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/IBloodAltar.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.altar; + +/** + * Any Tile that implements this will be considered to be a Blood Altar + */ +public interface IBloodAltar +{ + int getCapacity(); + + int getCurrentBlood(); + + /** + * @return - The actual human-readable tier (ordinal + 1) of the altar + */ + int getTier(); + + int getProgress(); + + float getSacrificeMultiplier(); + + float getSelfSacrificeMultiplier(); + + float getOrbMultiplier(); + + float getDislocationMultiplier(); + + float getConsumptionMultiplier(); + + float getConsumptionRate(); + + int getChargingRate(); + + int getChargingFrequency(); + + int getTotalCharge(); + + int getLiquidRequired(); + + int getBufferCapacity(); + + void sacrificialDaggerCall(int amount, boolean isSacrifice); + + void startCycle(); + + void checkTier(); + + boolean isActive(); + + void setActive(); + + int fillMainTank(int amount); + + /** + * Will set the altar to initiate a cooldown cycle after it crafts before + * starting to craft again, giving the user time to interact with the altar. + * This can only be set while the altar is not active. + * + * @param cooldown - How long the cooldown should last + */ + void requestPauseAfterCrafting(int cooldown); +} diff --git a/src/main/java/wayoftime/bloodmagic/altar/IBloodRune.java b/src/main/java/wayoftime/bloodmagic/altar/IBloodRune.java new file mode 100644 index 00000000..e5cde2ba --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/altar/IBloodRune.java @@ -0,0 +1,16 @@ +package wayoftime.bloodmagic.altar; + +import javax.annotation.Nullable; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.block.enums.BloodRuneType; + +/** + * Any Block that implements this interface wil be considered as Blood Runes for the Blood Altar + */ +public interface IBloodRune +{ + @Nullable + BloodRuneType getBloodRune(World world, BlockPos pos); +} diff --git a/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java b/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java new file mode 100644 index 00000000..1476eb9c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java @@ -0,0 +1,317 @@ +package wayoftime.bloodmagic.anointment; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; +import java.util.function.Consumer; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Maps; +import com.google.common.collect.Multimap; +import com.google.common.collect.Sets; +import com.google.common.reflect.TypeToken; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.annotations.JsonAdapter; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.ListNBT; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Util; +import net.minecraft.util.registry.Registry; +import net.minecraftforge.registries.ForgeRegistryEntry; +import wayoftime.bloodmagic.core.living.LivingUpgrade.Level; + +@JsonAdapter(Anointment.Deserializer.class) +public class Anointment extends ForgeRegistryEntry +{ + public static final Anointment DUMMY = new Anointment(new ResourceLocation("dummy")); + + private final ResourceLocation key; + private final Set incompatible; + private String translationKey = null; + private final Map bonuses; + private IAttributeProvider attributeProvider; + private IDamageProvider damageProvider; + private boolean consumeOnAttack = false; + private boolean consumeOnUseFinish = false; + private boolean consumeOnHarvest = false; + + public Anointment(ResourceLocation key) + { + this.key = key; + this.incompatible = Sets.newHashSet(); + this.bonuses = Maps.newHashMap(); + } + + public Anointment withBonusSet(String id, Consumer> modifiers) + { +// List values = DefaultedList.of(); + + List values = new ArrayList(); + modifiers.accept(values); + + bonuses.put(id, new Bonus(id, values)); + return this; + } + + public Number getBonusValue(String id, int level) + { + List modifiers = bonuses.getOrDefault(id, Bonus.DEFAULT).modifiers; + if (modifiers.isEmpty() || level == 0) + return 0; + + return level <= modifiers.size() ? modifiers.get(level - 1) : modifiers.get(modifiers.size() - 1); + } + + public ResourceLocation getKey() + { + return key; + } + + @Override + public String toString() + { + return key.toString(); + } + + public boolean applyAnointment(AnointmentHolder holder, ItemStack stack, int level) + { + if (level < 0) + { + return false; + } + + IAttributeProvider prov = this.getAttributeProvider(); + if (prov == null) + { + return true; + } + + Multimap modifiers = HashMultimap.create(); + modifiers.putAll(stack.getItem().getAttributeModifiers(EquipmentSlotType.MAINHAND, stack)); + + this.getAttributeProvider().handleAttributes(holder, modifiers, UUID.nameUUIDFromBytes(this.getKey().toString().getBytes()), this, level); + + for (Entry entry : modifiers.entries()) + { + stack.addAttributeModifier(entry.getKey(), entry.getValue(), EquipmentSlotType.MAINHAND); + } + + return true; + } + + public boolean removeAnointment(AnointmentHolder holder, ItemStack stack, EquipmentSlotType slot) + { + IAttributeProvider provider = this.getAttributeProvider(); + if (provider != null) + { + Multimap modifiers = HashMultimap.create(); + this.getAttributeProvider().handleAttributes(holder, modifiers, UUID.nameUUIDFromBytes(this.getKey().toString().getBytes()), this, 1); + + if (stack.hasTag() && stack.getTag().contains("AttributeModifiers", 9)) + { +// multimap = HashMultimap.create(); + ListNBT listnbt = stack.getTag().getList("AttributeModifiers", 10); + List removeList = new ArrayList(); + + for (int i = 0; i < listnbt.size(); i++) + { + CompoundNBT compoundnbt = listnbt.getCompound(i); + if (!compoundnbt.contains("Slot", 8) || compoundnbt.getString("Slot").equals(slot.getName())) + { + Optional optional = Registry.ATTRIBUTE.getOptional(ResourceLocation.tryCreate(compoundnbt.getString("AttributeName"))); + if (optional.isPresent()) + { + AttributeModifier attributemodifier = AttributeModifier.read(compoundnbt); + if (attributemodifier != null && attributemodifier.getID().getLeastSignificantBits() != 0L && attributemodifier.getID().getMostSignificantBits() != 0L) + { + for (Entry entry : modifiers.entries()) + { + if (entry.getKey().equals(optional.get()) && entry.getValue().getID().equals(attributemodifier.getID())) + { + removeList.add(i); + } + } +// multimap.put(optional.get(), attributemodifier); + } + } + } + } + + for (int index : removeList) + { + listnbt.remove(index); + } + + if (removeList.size() >= 1) + { + stack.getTag().put("AttributeModifiers", listnbt); + if (listnbt.isEmpty()) + { + stack.getTag().remove("AttributeModifiers"); + } + } + } + +// for (Entry entry : modifiers.entries()) +// { +// +// } + } + return false; + } + + public boolean isCompatible(ResourceLocation otherUpgrade) + { + return !incompatible.contains(otherUpgrade); + } + + public Anointment addIncompatibility(ResourceLocation key, ResourceLocation... otherKeys) + { + incompatible.add(key); + Collections.addAll(incompatible, otherKeys); + return this; + } + + public String getTranslationKey() + { + return translationKey == null ? translationKey = Util.makeTranslationKey("anointment", key) : translationKey; + } + + public Anointment setConsumeOnAttack() + { + this.consumeOnAttack = true; + return this; + } + + public boolean consumeOnAttack() + { + return this.consumeOnAttack; + } + + public Anointment setConsumeOnUseFinish() + { + this.consumeOnUseFinish = true; + return this; + } + + public boolean consumeOnUseFinish() + { + return this.consumeOnUseFinish; + } + + public Anointment setConsumeOnHarvest() + { + this.consumeOnHarvest = true; + return this; + } + + public boolean consumeOnHarvest() + { + return this.consumeOnHarvest; + } + + public Anointment withAttributeProvider(IAttributeProvider attributeProvider) + { + this.attributeProvider = attributeProvider; + return this; + } + + public IAttributeProvider getAttributeProvider() + { + return attributeProvider; + } + + public Anointment withDamageProvider(IDamageProvider damageProvider) + { + this.damageProvider = damageProvider; + return this; + } + + public IDamageProvider getDamageProvider() + { + return damageProvider; + } + + public interface IAttributeProvider + { + void handleAttributes(AnointmentHolder holder, Multimap modifiers, UUID uuid, Anointment anoint, int level); + } + + public interface IDamageProvider + { + double getAdditionalDamage(PlayerEntity player, ItemStack weapon, double damage, AnointmentHolder holder, LivingEntity attacked, Anointment anoint, int level); + } + + public static class Bonus + { + private static final Bonus DEFAULT = new Bonus("null", Collections.emptyList()); + + private final String id; + private final List modifiers; + + public Bonus(String id, List modifiers) + { + this.id = id; + this.modifiers = modifiers; + } + + public String getId() + { + return id; + } + } + + public static class Deserializer implements JsonDeserializer + { + @Override + public Anointment deserialize(JsonElement element, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + JsonObject json = element.getAsJsonObject(); + ResourceLocation id = new ResourceLocation(json.getAsJsonPrimitive("id").getAsString()); + List levels = context.deserialize(json.getAsJsonArray("levels"), new TypeToken>() + { + }.getType()); + boolean negative = json.has("negative") && json.getAsJsonPrimitive("negative").getAsBoolean(); + + Anointment upgrade = new Anointment(id); +// if (negative) +// upgrade.asDowngrade(); + +// if (json.has("incompatibilities")) +// { +// String[] incompatibilities = context.deserialize(json.getAsJsonArray("incompatibilities"), String[].class); +// for (String incompatible : incompatibilities) +// upgrade.addIncompatibility(new ResourceLocation(incompatible)); +// } + + if (json.has("bonuses")) + { + Map bonuses = context.deserialize(json.getAsJsonObject("bonuses"), new TypeToken>() + { + }.getType()); + bonuses.forEach((k, v) -> upgrade.withBonusSet(k, numbers -> Collections.addAll(numbers, v))); + } + + return upgrade; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/anointment/AnointmentColor.java b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentColor.java new file mode 100644 index 00000000..d8c3c248 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentColor.java @@ -0,0 +1,19 @@ +package wayoftime.bloodmagic.anointment; + +import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.item.ItemStack; +import wayoftime.bloodmagic.common.item.ItemAnointmentProvider; + +public class AnointmentColor implements IItemColor +{ + @Override + public int getColor(ItemStack stack, int layer) + { + if (layer == 1 && stack.getItem() instanceof ItemAnointmentProvider) + { + return ((ItemAnointmentProvider) stack.getItem()).getColor(); + } + + return 0xFFFFFF; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/anointment/AnointmentData.java b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentData.java new file mode 100644 index 00000000..5f23678a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentData.java @@ -0,0 +1,45 @@ +package wayoftime.bloodmagic.anointment; + +public class AnointmentData +{ + private int level; + private int damage; + private int maxDamage; + + public AnointmentData(int level, int damage, int maxDamage) + { + this.level = level; + this.damage = damage; + this.maxDamage = maxDamage; + } + + public int getLevel() + { + return this.level; + } + + public int getDamage() + { + return this.damage; + } + + public int getMaxDamage() + { + return this.maxDamage; + } + + public void damage(int amount) + { + this.damage = Math.min(damage + amount, maxDamage); + } + + public boolean isMaxDamage() + { + return damage >= maxDamage; + } + + public String getDamageString() + { + return "" + (maxDamage - damage) + "/" + maxDamage; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java new file mode 100644 index 00000000..fe8e19fc --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java @@ -0,0 +1,316 @@ +package wayoftime.bloodmagic.anointment; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; + +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.ListNBT; +import net.minecraft.util.Hand; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.anointment.Anointment.IDamageProvider; +import wayoftime.bloodmagic.core.AnointmentRegistrar; +import wayoftime.bloodmagic.util.Constants; + +public class AnointmentHolder +{ + private final Map anointments; + + public AnointmentHolder(Map anointments) + { + this.anointments = anointments; + } + + public AnointmentHolder() + { + this(Maps.newHashMap()); + } + + public boolean isEmpty() + { + return anointments.isEmpty(); + } + + // Returns true if the anointment is applied successfully. + public boolean applyAnointment(ItemStack stack, Anointment anointment, AnointmentData data) + { + if (canApplyAnointment(stack, anointment, data)) + { + anointments.put(anointment, data); + anointment.applyAnointment(this, stack, data.getLevel()); + return true; + } + + return false; + } + + public boolean canApplyAnointment(ItemStack stack, Anointment anointment, AnointmentData data) + { + ResourceLocation key = anointment.getKey(); + for (Anointment containedAnoint : anointments.keySet()) + { + ResourceLocation containedKey = containedAnoint.getKey(); + if (!anointment.isCompatible(containedKey) || !containedAnoint.isCompatible(key)) + { + return false; + } + } + + if (anointments.containsKey(anointment)) + { + AnointmentData prevData = anointments.get(anointment); + int level = prevData.getLevel(); + int remainingDur = prevData.getMaxDamage() - prevData.getDamage(); + if (level < data.getLevel() || (level == data.getLevel() && remainingDur < (data.getMaxDamage() - data.getDamage()))) + { + return true; + } else + { + return false; + } + } + + return true; + } + + public int getAnointmentLevel(Anointment anointment) + { + if (anointments.containsKey(anointment)) + { + return anointments.get(anointment).getLevel(); + } + + return 0; + } + + public boolean consumeAnointmentDurabilityOnHit(ItemStack weaponStack, EquipmentSlotType type) + { +// System.out.println("Attempting consumption"); + boolean didConsume = false; + List removedAnointments = new ArrayList(); + for (Entry entry : anointments.entrySet()) + { + Anointment annointment = entry.getKey(); + if (annointment.consumeOnAttack()) + { + AnointmentData data = entry.getValue(); + data.damage(1); + didConsume = true; + if (data.isMaxDamage()) + { + removedAnointments.add(annointment); + } + } + } + + for (Anointment anointment : removedAnointments) + { + removeAnointment(weaponStack, type, anointment); + } + + return didConsume; + } + + public boolean consumeAnointmentDurabilityOnUseFinish(ItemStack weaponStack, EquipmentSlotType type) + { + boolean didConsume = false; + List removedAnointments = new ArrayList(); + for (Entry entry : anointments.entrySet()) + { + Anointment annointment = entry.getKey(); + if (annointment.consumeOnUseFinish()) + { + AnointmentData data = entry.getValue(); + data.damage(1); + didConsume = true; + if (data.isMaxDamage()) + { + removedAnointments.add(annointment); + } + } + } + + for (Anointment anointment : removedAnointments) + { + removeAnointment(weaponStack, type, anointment); + } + + return didConsume; + } + + public boolean consumeAnointmentDurabilityOnHarvest(ItemStack weaponStack, EquipmentSlotType type) + { + boolean didConsume = false; + List removedAnointments = new ArrayList(); + for (Entry entry : anointments.entrySet()) + { + Anointment annointment = entry.getKey(); + if (annointment.consumeOnHarvest()) + { + AnointmentData data = entry.getValue(); + data.damage(1); + didConsume = true; + if (data.isMaxDamage()) + { + removedAnointments.add(annointment); + } + } + } + + for (Anointment anointment : removedAnointments) + { + removeAnointment(weaponStack, type, anointment); + } + + return didConsume; + } + + // Called when the specified anointment is to be removed. Occurs if the + // anointment runs out of uses or if removed via another source. + public boolean removeAnointment(ItemStack weaponStack, EquipmentSlotType type, Anointment anointment) + { + anointments.remove(anointment); + anointment.removeAnointment(this, weaponStack, type); + return true; + } + + public Map getAnointments() + { + return ImmutableMap.copyOf(anointments); + } + + public double getAdditionalDamage(PlayerEntity player, ItemStack weapon, double damage, LivingEntity attacked) + { + double additionalDamage = 0; + for (Entry entry : anointments.entrySet()) + { + IDamageProvider prov = entry.getKey().getDamageProvider(); + if (prov != null) + { + additionalDamage += prov.getAdditionalDamage(player, weapon, damage, this, attacked, entry.getKey(), entry.getValue().getLevel()); + } + } + return additionalDamage; + } + + public CompoundNBT serialize() + { + CompoundNBT compound = new CompoundNBT(); + ListNBT statList = new ListNBT(); + anointments.forEach((k, v) -> { + CompoundNBT anoint = new CompoundNBT(); + anoint.putString("key", k.getKey().toString()); + anoint.putInt("level", v.getLevel()); + anoint.putInt("damage", v.getDamage()); + anoint.putInt("max_damage", v.getMaxDamage()); + statList.add(anoint); + }); + compound.put("anointments", statList); +// +// compound.putInt("maxPoints", maxPoints); + + return compound; + } + + public void deserialize(CompoundNBT nbt) + { + ListNBT statList = nbt.getList("anointments", 10); + statList.forEach(tag -> { + if (!(tag instanceof CompoundNBT)) + return; + Anointment anoint = AnointmentRegistrar.ANOINTMENT_MAP.getOrDefault(new ResourceLocation(((CompoundNBT) tag).getString("key")), Anointment.DUMMY); +// LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADE_MAP.getOrDefault(new ResourceLocation(((CompoundNBT) tag).getString("key")), LivingUpgrade.DUMMY); + if (anoint == Anointment.DUMMY) + return; +// double experience = ((CompoundNBT) tag).getDouble("exp"); + AnointmentData data = new AnointmentData(((CompoundNBT) tag).getInt("level"), ((CompoundNBT) tag).getInt("damage"), ((CompoundNBT) tag).getInt("max_damage")); + anointments.put(anoint, data); + }); +// +// maxPoints = nbt.getInt("maxPoints"); + } + + public static AnointmentHolder fromNBT(CompoundNBT holderTag) + { + AnointmentHolder holder = new AnointmentHolder(); + holder.deserialize(holderTag); + return holder; + } + + public static AnointmentHolder fromItemStack(ItemStack stack) + { + CompoundNBT nbtTag = stack.getTag(); + if (nbtTag == null) + { + return null; + } + + CompoundNBT holderTag = nbtTag.getCompound(Constants.NBT.ANOINTMENTS); + if (holderTag != null) + { + return fromNBT(holderTag); + } + + return null; + } + + public void toItemStack(ItemStack stack) + { + CompoundNBT nbtTag = stack.getOrCreateTag(); + CompoundNBT childTag = this.serialize(); + + nbtTag.put(Constants.NBT.ANOINTMENTS, childTag); + } + + public static AnointmentHolder fromPlayer(PlayerEntity player, Hand hand) + { + return fromPlayer(player, hand, false); + } + + public static AnointmentHolder fromPlayer(PlayerEntity player, Hand hand, boolean createNew) + { + ItemStack heldItem = player.getHeldItem(hand); + + AnointmentHolder holder = fromItemStack(heldItem); + return holder == null && createNew ? new AnointmentHolder() : holder; + } + + public static void toPlayer(PlayerEntity player, Hand hand, AnointmentHolder holder) + { + ItemStack heldItem = player.getHeldItem(hand); + holder.toItemStack(heldItem); + } + + public static void appendAnointmentTooltip(AnointmentHolder holder, List tooltip) + { + if (holder != null) + { +// System.out.println("Holder is not null. Size: " + holder.getAnointments().size()); +// if (trainable) +// tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.livingarmour.upgrade.points", stats.getUsedPoints(), stats.getMaxPoints()).mergeStyle(TextFormatting.GOLD)); + + holder.getAnointments().forEach((k, v) -> { + +// if (k.getLevel(v.intValue()) <= 0) +// return; + boolean sneaking = Screen.hasShiftDown(); +// if (!InputUtil.isKeyPressed(MinecraftClient.getInstance().getWindow().getHandle(), 340) || k.getNextRequirement(v) == 0) + if (!sneaking) + tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), new TranslationTextComponent("enchantment.level." + v.getLevel()))); + else + tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), (": (" + v.getDamageString() + ")"))); + }); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/anointment/AnointmentUtil.java b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentUtil.java new file mode 100644 index 00000000..71ff1ed1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentUtil.java @@ -0,0 +1,6 @@ +package wayoftime.bloodmagic.anointment; + +public class AnointmentUtil +{ + +} diff --git a/src/main/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java b/src/main/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java new file mode 100644 index 00000000..d0f85ddb --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java @@ -0,0 +1,143 @@ +package wayoftime.bloodmagic.api; + +import java.util.function.Predicate; + +import javax.annotation.Nonnull; + +import org.apache.logging.log4j.LogManager; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.LazyValue; + +/** + * The main interface between a plugin and Blood Magic's internals. + * + * This API is intended for compatibility between other mods and Blood + * Magic. More advanced integration is out of the scope of this API and are + * considered "addons". + * + * Use INSTANCE to get an instance of the API without actually implementing + * anything + */ +public interface IBloodMagicAPI +{ + LazyValue INSTANCE = new LazyValue<>(() -> { + try + { + return (IBloodMagicAPI) Class.forName("wayoftime.bloodmagic.impl.BloodMagicAPI").getDeclaredField("INSTANCE").get(null); + } catch (ReflectiveOperationException e) + { + LogManager.getLogger().warn("Unable to find BloodMagicAPI, using a dummy instance instead..."); + return new IBloodMagicAPI() + { + }; + } + }); + + /** + * Retrieves the instance of the blacklist. + * + * @return the active {@link IBloodMagicBlacklist} instance + */ + @Nonnull + default IBloodMagicBlacklist getBlacklist() + { + return new IBloodMagicBlacklist() + { + }; + }; + + /** + * Retrieves the instance of the value manager. + * + * @return the active {@link IBloodMagicValueManager} instance + */ + @Nonnull + default IBloodMagicValueManager getValueManager() + { + return new IBloodMagicValueManager() + { + }; + } + + /** + * Registers a {@link BlockState} as a given component for the Blood Altar. + *

+ * Valid component types: + *

    + *
  • GLOWSTONE
  • + *
  • BLOODSTONE
  • + *
  • BEACON
  • + *
  • BLOODRUNE
  • + *
  • CRYSTAL
  • + *
  • NOTAIR
  • + *
+ * + * @param state The state to register + * @param componentType The type of Blood Altar component to register as. + */ + default void registerAltarComponent(@Nonnull BlockState state, @Nonnull String componentType) + { + } + + /** + * Removes a {@link BlockState} from the component mappings + *

+ * Valid component types: + *

    + *
  • GLOWSTONE
  • + *
  • BLOODSTONE
  • + *
  • BEACON
  • + *
  • BLOODRUNE
  • + *
  • CRYSTAL
  • + *
  • NOTAIR
  • + *
+ * + * @param state The state to unregister + * @param componentType The type of Blood Altar component to unregister from. + */ + default void unregisterAltarComponent(@Nonnull BlockState state, @Nonnull String componentType) + { + } + + /** + * Registers a {@link Predicate} for tranquility handling + *

+ * Valid tranquility types: + *

    + *
  • PLANT
  • + *
  • CROP
  • + *
  • TREE
  • + *
  • EARTHEN
  • + *
  • WATER
  • + *
  • FIRE
  • + *
  • LAVA
  • + *
+ * + * @param predicate Predicate to be used for the handler (goes to + * ITranquilityHandler) + * @param tranquilityType Tranquility type that the handler holds + * @param value The amount of tranquility that the handler has + */ + default void registerTranquilityHandler(Predicate predicate, String tranquilityType, double value) + { + } + + /** + * Gets the total Will that a Player contains + *

+ * Valid tranquility types: + *

    + *
  • DEFAULT
  • + *
  • CORROSIVE
  • + *
  • DESTRUCTIVE
  • + *
  • VENGEFUL
  • + *
  • STEADFAST
  • + *
+ */ + default double getTotalDemonWill(String willType, PlayerEntity player) + { + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/IBloodMagicBlacklist.java b/src/main/java/wayoftime/bloodmagic/api/IBloodMagicBlacklist.java new file mode 100644 index 00000000..57ac89b2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/IBloodMagicBlacklist.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.api; + +import javax.annotation.Nonnull; + +import net.minecraft.block.BlockState; +import net.minecraft.util.ResourceLocation; + +/** + * Allows blacklisting of various objects from different Blood Magic systems. + */ +public interface IBloodMagicBlacklist +{ + + /** + * Blacklists a given {@link BlockState} from being teleposed. + * + * @param state The {@link BlockState} to blacklist. + */ + default void addTeleposer(@Nonnull BlockState state) + { + }; + + /** + * Blacklists a {@link net.minecraft.entity.Entity} from being teleposed based + * on the given registry name. + * + * @param entityId The registry name to blacklist. + */ + default void addTeleposer(@Nonnull ResourceLocation entityId) + { + }; + + /** + * Blacklists a given {@link BlockState} from being transposed. + * + * @param state The {@link BlockState} to blacklist. + */ + default void addTransposition(@Nonnull BlockState state) + { + }; + + /** + * Blacklists a given {@link BlockState} from being accelerated by the growth + * enhancement ritual and sigil. + * + * @param state The {@link BlockState} to blacklist. + */ + default void addGreenGrove(@Nonnull BlockState state) + { + }; + + /** + * Blacklists a {@link net.minecraft.entity.Entity} from being sacrificed via + * the Well of Suffering ritual. + * + * @param entityId The registry name to blacklist. + */ + default void addWellOfSuffering(@Nonnull ResourceLocation entityId) + { + }; +} diff --git a/src/main/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java b/src/main/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java new file mode 100644 index 00000000..da1676d6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java @@ -0,0 +1,45 @@ +package wayoftime.bloodmagic.api; + +import javax.annotation.Nonnegative; +import javax.annotation.Nonnull; + +import net.minecraft.block.BlockState; +import net.minecraft.util.ResourceLocation; + +/** + * Allows value modification for various features of Blood Magic such as + * Sacrificial values. + */ +public interface IBloodMagicValueManager +{ + + /** + * Sets the amount of LP received per health point from sacrificing the given + * entity. By default, this is 25. Setting the value to 0 effectively disables + * sacrificing. + * + * @param entityId The registry name of the entity. + * @param value The amount of LP per health point to receive upon sacrifice. + */ + default void setSacrificialValue(@Nonnull ResourceLocation entityId, @Nonnegative int value) {} + + /** + * Sets the Tranquility value of a given {@link BlockState}. + *

+ * Valid tranquility types: + *

    + *
  • PLANT
  • + *
  • CROP
  • + *
  • TREE
  • + *
  • EARTHEN
  • + *
  • WATER
  • + *
  • FIRE
  • + *
  • LAVA
  • + *
+ * + * @param state The {@link BlockState} to set the value of. + * @param tranquilityType The type of Tranquility this block should provide. + * @param value The amount of tranquility this block should provide. + */ + default void setTranquility(@Nonnull BlockState state, @Nonnull String tranquilityType, double value) {} +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/EnumDemonWillType.java b/src/main/java/wayoftime/bloodmagic/api/compat/EnumDemonWillType.java new file mode 100644 index 00000000..87829daf --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/EnumDemonWillType.java @@ -0,0 +1,46 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.util.IStringSerializable; + +import java.util.Locale; + +public enum EnumDemonWillType implements IStringSerializable +{ + DEFAULT("default"), + CORROSIVE("corrosive"), + DESTRUCTIVE("destructive"), + VENGEFUL("vengeful"), + STEADFAST("steadfast"); + + public final String name; + + EnumDemonWillType(String name) + { + this.name = name; + } + + @Override + public String toString() + { + return name().toLowerCase(Locale.ENGLISH); + } + + @Override + public String getString() + { + return this.toString(); + } + + public static EnumDemonWillType getType(String type) + { + for (EnumDemonWillType t : values()) + { + if (t.name().equalsIgnoreCase(type)) + { + return t; + } + } + + return null; + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IAltarReader.java b/src/main/java/wayoftime/bloodmagic/api/compat/IAltarReader.java similarity index 76% rename from src/main/java/WayofTime/bloodmagic/api/iface/IAltarReader.java rename to src/main/java/wayoftime/bloodmagic/api/compat/IAltarReader.java index e17ae4e4..7eb672fd 100644 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IAltarReader.java +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IAltarReader.java @@ -1,4 +1,4 @@ -package WayofTime.bloodmagic.api.iface; +package wayoftime.bloodmagic.api.compat; /** * Any item that implements this interface will not be pulled into the Altar on @@ -7,4 +7,4 @@ package WayofTime.bloodmagic.api.iface; public interface IAltarReader { -} +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/ICustomAlchemyConsumable.java b/src/main/java/wayoftime/bloodmagic/api/compat/ICustomAlchemyConsumable.java new file mode 100644 index 00000000..10822cee --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/ICustomAlchemyConsumable.java @@ -0,0 +1,12 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.item.ItemStack; + +/** + * An interface for items that have custom drainage behaviour when used in + * certain alchemy recipes. + */ +public interface ICustomAlchemyConsumable +{ + ItemStack drainUseOnAlchemyCraft(ItemStack stack); +} diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWill.java b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWill.java new file mode 100644 index 00000000..0957789f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWill.java @@ -0,0 +1,47 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.item.ItemStack; + +/** + * Interface for Items that contain Will + */ +public interface IDemonWill +{ + /** + * Obtains the amount of Will an ItemStack contains. + * + * @param willStack - The stack to retrieve the Will from + * @return - The amount of Will an ItemStack contains + */ + double getWill(EnumDemonWillType type, ItemStack willStack); + + /** + * Sets the amount of Will in a given ItemStack. + * + * @param willStack - The ItemStack of the Will + * @param will - The amount of will to set the stack to + * @return True if successfully set. + */ + boolean setWill(EnumDemonWillType type, ItemStack willStack, double will); + + /** + * Drains the demonic will from the willStack. If all of the will is drained, + * the willStack will be removed. + * + * @param willStack - The ItemStack of the will + * @param drainAmount - The amount of Will to drain + * @return The amount of will drained. + */ + double drainWill(EnumDemonWillType type, ItemStack willStack, double drainAmount); + + /** + * Creates a new ItemStack with the specified number of will. Implementation + * should respect the number requested. + * + * @param number - The amount of Will to create the Stack with. + * @return - An ItemStack with the set amount of Will + */ + ItemStack createWill(double number); + + EnumDemonWillType getType(ItemStack stack); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillConduit.java b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillConduit.java new file mode 100644 index 00000000..b069377b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillConduit.java @@ -0,0 +1,19 @@ +package wayoftime.bloodmagic.api.compat; + +/** + * Implement this interface on a Block that can accept and store Demonic Will. + */ +public interface IDemonWillConduit +{ + int getWeight(); + + double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill); + + double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain); + + boolean canFill(EnumDemonWillType type); + + boolean canDrain(EnumDemonWillType type); + + double getCurrentWill(EnumDemonWillType type); +} diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillGem.java b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillGem.java new file mode 100644 index 00000000..2e0ef4e9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillGem.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.item.ItemStack; + +/** + * Interface for Items that store Will + */ +public interface IDemonWillGem +{ + /** + * @param willGemStack - The ItemStack for this demon will gem. + * @param willStack - The ItemStack for the will. Item should extend + * IDemonWill + * @return - The remainder willStack after the will has been absorbed into the + * gem. Return null if there is no will left in the stack. + */ + ItemStack fillDemonWillGem(ItemStack willGemStack, ItemStack willStack); + + /** + * Returns the number of souls that are left in the soul gem. Returns a double + * because souls can be fractionally drained. + */ + double getWill(EnumDemonWillType type, ItemStack willGemStack); + + void setWill(EnumDemonWillType type, ItemStack willGemStack, double amount); + + int getMaxWill(EnumDemonWillType type, ItemStack willGemStack); + + double drainWill(EnumDemonWillType type, ItemStack stack, double drainAmount, boolean doDrain); + + double fillWill(EnumDemonWillType type, ItemStack stack, double fillAmount, boolean doFill); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillViewer.java b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillViewer.java new file mode 100644 index 00000000..7f646c72 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillViewer.java @@ -0,0 +1,15 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * Interface for Items that allow players to see Will inside of chunks + */ +public interface IDemonWillViewer +{ + boolean canSeeDemonWillAura(World world, ItemStack stack, PlayerEntity player); + + int getDemonWillAuraResolution(World world, ItemStack stack, PlayerEntity player); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillWeapon.java b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillWeapon.java new file mode 100644 index 00000000..95a894c7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IDemonWillWeapon.java @@ -0,0 +1,14 @@ +package wayoftime.bloodmagic.api.compat; + +import java.util.List; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.item.ItemStack; + +/** + * Interface for weapons that drop will when a LivingEntity is killed + */ +public interface IDemonWillWeapon +{ + List getRandomDemonWillDrop(LivingEntity killedEntity, LivingEntity attackingEntity, ItemStack stack, int looting); +} diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IDiscreteDemonWill.java b/src/main/java/wayoftime/bloodmagic/api/compat/IDiscreteDemonWill.java new file mode 100644 index 00000000..2b79fbb4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IDiscreteDemonWill.java @@ -0,0 +1,44 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.item.ItemStack; + +/** + * Interface for Items that contain a discrete amount of Will + */ +public interface IDiscreteDemonWill +{ + /** + * Obtains the amount of Will an ItemStack contains. + * + * @param soulStack - The stack to retrieve the Will from + * @return - The amount of Will an ItemStack contains + */ + double getWill(ItemStack soulStack); + + /** + * Drains the demonic will from the willStack. If all of the will is drained, + * the willStack will be removed. Will only drain in discrete amounts, + * determined by getDiscretization. + * + * @param willStack - The ItemStack of the will + * @param drainAmount - The amount of Will to drain + * @return The amount of will drained. + */ + double drainWill(ItemStack willStack, double drainAmount); + + /** + * Gets the discrete number for this demonic will. + * + * @param willStack - The ItemStack of the will + * @return - The discrete number for the given stack. + */ + double getDiscretization(ItemStack willStack); + + /** + * Obtains the type of will this is. + * + * @param willStack - The ItemStack of the will + * @return - The type of will this is. + */ + EnumDemonWillType getType(ItemStack willStack); +} diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IIncensePath.java b/src/main/java/wayoftime/bloodmagic/api/compat/IIncensePath.java new file mode 100644 index 00000000..2ba87a7d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IIncensePath.java @@ -0,0 +1,18 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.block.BlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +/** + * Any Block that implements this will be considered to be a valid path block for the Incense Altar + */ +public interface IIncensePath +{ + /** + * Goes from 0 to however far this path block can be from the altar while still + * functioning. 0 represents a block that can work when it is two blocks + * horizontally away from the altar. + */ + int getLevelOfPath(World world, BlockPos pos, BlockState state); +} diff --git a/src/main/java/wayoftime/bloodmagic/api/compat/IMultiWillTool.java b/src/main/java/wayoftime/bloodmagic/api/compat/IMultiWillTool.java new file mode 100644 index 00000000..790dbf62 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/compat/IMultiWillTool.java @@ -0,0 +1,11 @@ +package wayoftime.bloodmagic.api.compat; + +import net.minecraft.item.ItemStack; + +/** + * Interface for Items that can contain multiple Will types + */ +public interface IMultiWillTool +{ + EnumDemonWillType getCurrentType(ItemStack stack); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/api/event/BloodMagicCraftedEvent.java b/src/main/java/wayoftime/bloodmagic/api/event/BloodMagicCraftedEvent.java new file mode 100644 index 00000000..335abe96 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/api/event/BloodMagicCraftedEvent.java @@ -0,0 +1,84 @@ +package wayoftime.bloodmagic.api.event; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.eventbus.api.Event; + +public class BloodMagicCraftedEvent extends Event +{ + + private final boolean modifiable; + private final ItemStack[] inputs; + private ItemStack output; + + public BloodMagicCraftedEvent(ItemStack output, ItemStack[] inputs, boolean modifiable) + { + this.modifiable = modifiable; + this.inputs = inputs; + this.output = output; + } + + public boolean isModifiable() + { + return modifiable; + } + + public ItemStack[] getInputs() + { + return inputs; + } + + public ItemStack getOutput() + { + return output; + } + + public void setOutput(ItemStack output) + { + if (isModifiable()) + this.output = output; + } + + /** + * Fired whenever a craft is completed in a Blood Altar. + * + * It is not cancelable, however you can modify the output stack. + */ + public static class Altar extends BloodMagicCraftedEvent + { + + public Altar(ItemStack output, ItemStack input) + { + super(output, new ItemStack[] + { input }, true); + } + } + + /** + * Fired whenever a craft is completed in a Soul Forge. + * + * It is not cancelable, however you can modify the output stack. + */ + public static class SoulForge extends BloodMagicCraftedEvent + { + + public SoulForge(ItemStack output, ItemStack[] inputs) + { + super(output, inputs, true); + } + } + + /** + * Fired whenever a craft is completed in an Alchemy Table. + * + * It is not cancelable, however you can modify the output stack. + */ + public static class AlchemyTable extends BloodMagicCraftedEvent + { + + public AlchemyTable(ItemStack output, ItemStack[] inputs) + { + super(output, inputs, true); + } + } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/block/enums/BloodRuneType.java b/src/main/java/wayoftime/bloodmagic/block/enums/BloodRuneType.java new file mode 100644 index 00000000..cce55391 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/block/enums/BloodRuneType.java @@ -0,0 +1,37 @@ +package wayoftime.bloodmagic.block.enums; + +import java.util.Locale; + +import net.minecraft.util.IStringSerializable; + +public enum BloodRuneType implements IStringSerializable +{ + BLANK, + SPEED, + EFFICIENCY, + SACRIFICE, + SELF_SACRIFICE, + DISPLACEMENT, + CAPACITY, + AUGMENTED_CAPACITY, + ORB, + ACCELERATION, + CHARGING; + + @Override + public String toString() + { + return name().toLowerCase(Locale.ENGLISH); + } + + /** + * getName() + * + * @return + */ + @Override + public String getString() + { + return this.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/block/enums/EnumRitualController.java b/src/main/java/wayoftime/bloodmagic/block/enums/EnumRitualController.java new file mode 100644 index 00000000..29948a7a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/block/enums/EnumRitualController.java @@ -0,0 +1,23 @@ +package wayoftime.bloodmagic.block.enums; + +import java.util.Locale; + +import net.minecraft.util.IStringSerializable; + +//TODO: Will want to probably discontinue this due to The Flattening +public enum EnumRitualController implements IStringSerializable +{ + MASTER, IMPERFECT, INVERTED,; + + @Override + public String toString() + { + return name().toLowerCase(Locale.ENGLISH); + } + + @Override + public String getString() + { + return this.toString(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java b/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java new file mode 100644 index 00000000..06f7c598 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java @@ -0,0 +1,240 @@ +package wayoftime.bloodmagic.client; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; +import net.minecraft.client.gui.ScreenManager; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.IItemPropertyGetter; +import net.minecraft.item.Item; +import net.minecraft.item.ItemModelsProperties; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.StringTextComponent; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.ColorHandlerEvent; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.DeferredWorkQueue; +import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.client.registry.RenderingRegistry; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.anointment.AnointmentColor; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.client.model.MimicColor; +import wayoftime.bloodmagic.client.render.alchemyarray.BeaconAlchemyCircleRenderer; +import wayoftime.bloodmagic.client.render.alchemyarray.DayAlchemyCircleRenderer; +import wayoftime.bloodmagic.client.render.alchemyarray.LowStaticAlchemyCircleRenderer; +import wayoftime.bloodmagic.client.render.alchemyarray.NightAlchemyCircleRenderer; +import wayoftime.bloodmagic.client.render.alchemyarray.StaticAlchemyCircleRenderer; +import wayoftime.bloodmagic.client.render.block.RenderAlchemyArray; +import wayoftime.bloodmagic.client.render.block.RenderAltar; +import wayoftime.bloodmagic.client.render.block.RenderDemonCrucible; +import wayoftime.bloodmagic.client.render.entity.BloodLightRenderer; +import wayoftime.bloodmagic.client.render.entity.EntityShapedChargeRenderer; +import wayoftime.bloodmagic.client.render.entity.EntityThrowingDaggerRenderer; +import wayoftime.bloodmagic.client.render.entity.SoulSnareRenderer; +import wayoftime.bloodmagic.client.screens.ScreenAlchemicalReactionChamber; +import wayoftime.bloodmagic.client.screens.ScreenAlchemyTable; +import wayoftime.bloodmagic.client.screens.ScreenHolding; +import wayoftime.bloodmagic.client.screens.ScreenSoulForge; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.item.ItemSacrificialDagger; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilToggleable; +import wayoftime.bloodmagic.common.item.soul.ItemSentientSword; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; +import wayoftime.bloodmagic.core.registry.AlchemyArrayRendererRegistry; +import wayoftime.bloodmagic.network.BloodMagicPacketHandler; +import wayoftime.bloodmagic.network.SigilHoldingPacket; +import wayoftime.bloodmagic.tile.TileAlchemyArray; +import wayoftime.bloodmagic.tile.TileAltar; +import wayoftime.bloodmagic.tile.TileDemonCrucible; + +@Mod.EventBusSubscriber(value = Dist.CLIENT, modid = BloodMagic.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class ClientEvents +{ + @SubscribeEvent + public static void registerModels(ModelRegistryEvent event) + { + ClientRegistry.bindTileEntityRenderer(TileAltar.TYPE, RenderAltar::new); + ClientRegistry.bindTileEntityRenderer(TileAlchemyArray.TYPE, RenderAlchemyArray::new); + ClientRegistry.bindTileEntityRenderer(TileDemonCrucible.TYPE, RenderDemonCrucible::new); +// ClientRegistry.bindTileEntityRenderer(TileSoulForge.TYPE, RenderAlchemyArray::new); + } + + public static void registerContainerScreens() + { + ScreenManager.registerFactory(BloodMagicBlocks.SOUL_FORGE_CONTAINER.get(), ScreenSoulForge::new); + ScreenManager.registerFactory(BloodMagicBlocks.ARC_CONTAINER.get(), ScreenAlchemicalReactionChamber::new); + ScreenManager.registerFactory(BloodMagicBlocks.ALCHEMY_TABLE_CONTAINER.get(), ScreenAlchemyTable::new); + ScreenManager.registerFactory(BloodMagicBlocks.HOLDING_CONTAINER.get(), ScreenHolding::new); + } + + public static void colorHandlerEvent(ColorHandlerEvent.Item event) + { + event.getItemColors().register(new AnointmentColor(), BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get(), BloodMagicItems.SILK_TOUCH_ANOINTMENT.get(), BloodMagicItems.FORTUNE_ANOINTMENT.get(), BloodMagicItems.HOLY_WATER_ANOINTMENT.get(), BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get(), BloodMagicItems.QUICK_DRAW_ANOINTMENT.get(), BloodMagicItems.LOOTING_ANOINTMENT.get(), BloodMagicItems.BOW_POWER_ANOINTMENT.get(), BloodMagicItems.WILL_POWER_ANOINTMENT.get(), BloodMagicItems.SMELTING_ANOINTMENT.get()); + } + + public static void cycleSigil(ItemStack stack, PlayerEntity player, int dWheel) + { + int mode = dWheel; + if (true) + { + mode = ItemSigilHolding.getCurrentItemOrdinal(stack); + mode = dWheel < 0 ? ItemSigilHolding.next(mode) : ItemSigilHolding.prev(mode); + } + + ItemSigilHolding.cycleToNextSigil(stack, mode); + BloodMagicPacketHandler.INSTANCE.sendToServer(new SigilHoldingPacket(player.inventory.currentItem, mode)); + ItemStack newStack = ItemSigilHolding.getItemStackInSlot(stack, ItemSigilHolding.getCurrentItemOrdinal(stack)); + player.sendStatusMessage(newStack.isEmpty() ? new StringTextComponent("") : newStack.getTextComponent(), true); + } + + @SubscribeEvent + public void onMouseEvent(InputEvent.MouseScrollEvent event) + { + ClientPlayerEntity player = Minecraft.getInstance().player; + + if (event.getScrollDelta() != 0 && player != null && player.isSneaking()) + { + ItemStack stack = player.getHeldItemMainhand(); + + if (!stack.isEmpty()) + { + Item item = stack.getItem(); + + if (item instanceof ItemSigilHolding) + { + cycleSigil(stack, player, event.getScrollDelta() > 0 ? 1 : -1); + event.setCanceled(true); + } + } + } + } + + @SubscribeEvent + public void appendTooltip(ItemTooltipEvent event) + { + ItemStack stack = event.getItemStack(); + AnointmentHolder holder = AnointmentHolder.fromItemStack(stack); + AnointmentHolder.appendAnointmentTooltip(holder, event.getToolTip()); + } + + @SuppressWarnings("deprecation") + public static void initClientEvents(FMLClientSetupEvent event) + { + RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.SNARE.getEntityType(), SoulSnareRenderer::new); + RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.THROWING_DAGGER.getEntityType(), EntityThrowingDaggerRenderer::new); + RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.BLOOD_LIGHT.getEntityType(), BloodLightRenderer::new); + RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.SHAPED_CHARGE.getEntityType(), EntityShapedChargeRenderer::new); + + DeferredWorkQueue.runLater(() -> { + RenderType rendertype = RenderType.getCutoutMipped(); + RenderTypeLookup.setRenderLayer(BloodMagicBlocks.ALCHEMY_TABLE.get(), rendertype); + RenderTypeLookup.setRenderLayer(BloodMagicBlocks.GROWING_DOUBT.get(), rendertype); + + ClientEvents.registerContainerScreens(); + + registerToggleableProperties(BloodMagicItems.GREEN_GROVE_SIGIL.get()); + registerToggleableProperties(BloodMagicItems.FAST_MINER_SIGIL.get()); + registerToggleableProperties(BloodMagicItems.MAGNETISM_SIGIL.get()); + registerToggleableProperties(BloodMagicItems.ICE_SIGIL.get()); + registerMultiWillTool(BloodMagicItems.SENTIENT_SWORD.get()); + registerMultiWillTool(BloodMagicItems.SENTIENT_AXE.get()); + registerMultiWillTool(BloodMagicItems.SENTIENT_PICKAXE.get()); + registerMultiWillTool(BloodMagicItems.SENTIENT_SHOVEL.get()); + registerMultiWillTool(BloodMagicItems.SENTIENT_SCYTHE.get()); + registerMultiWillTool(BloodMagicItems.PETTY_GEM.get()); + registerMultiWillTool(BloodMagicItems.LESSER_GEM.get()); + registerMultiWillTool(BloodMagicItems.COMMON_GEM.get()); + registerMultiWillTool(BloodMagicItems.GREATER_GEM.get()); + registerSacrificialKnife(BloodMagicItems.SACRIFICIAL_DAGGER.get()); + + ItemModelsProperties.registerProperty(BloodMagicItems.SENTIENT_SWORD.get(), BloodMagic.rl("active"), new IItemPropertyGetter() + { + @Override + public float call(ItemStack stack, ClientWorld world, LivingEntity entity) + { + return ((ItemSentientSword) stack.getItem()).getActivated(stack) ? 1 : 0; + } + }); + + Minecraft.getInstance().getBlockColors().register(new MimicColor(), BloodMagicBlocks.MIMIC.get()); + RenderTypeLookup.setRenderLayer(BloodMagicBlocks.MIMIC.get(), (RenderType) -> true); + }); + + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/movement"), new StaticAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/movementarray.png"))); + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/updraft"), new BeaconAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/updraftarray.png"))); + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/spike"), new LowStaticAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/spikearray.png"))); + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/day"), new DayAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/sunarray.png"), BloodMagic.rl("textures/models/alchemyarrays/sunarrayspikes.png"), BloodMagic.rl("textures/models/alchemyarrays/sunarraycircle.png"))); + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/night"), new NightAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/moonarrayoutside.png"), BloodMagic.rl("textures/models/alchemyarrays/moonarraysymbols.png"), BloodMagic.rl("textures/models/alchemyarrays/moonarrayinside.png"))); + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/grove"), new BeaconAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/growthsigil.png"))); + AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/bounce"), new LowStaticAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/bouncearray.png"))); + + } + + public static void registerItemModelProperties(FMLClientSetupEvent event) + { + + } + + public static void registerToggleableProperties(Item item) + { + ItemModelsProperties.registerProperty(item, BloodMagic.rl("active"), new IItemPropertyGetter() + { + @Override + public float call(ItemStack stack, ClientWorld world, LivingEntity entity) + { + Item item = stack.getItem(); + if (item instanceof ItemSigilToggleable) + { + return ((ItemSigilToggleable) item).getActivated(stack) ? 1 : 0; + } + return 0; + } + }); + } + + public static void registerMultiWillTool(Item item) + { + ItemModelsProperties.registerProperty(item, BloodMagic.rl("type"), new IItemPropertyGetter() + { + @Override + public float call(ItemStack stack, ClientWorld world, LivingEntity entity) + { + Item item = stack.getItem(); + if (item instanceof IMultiWillTool) + { + return ((IMultiWillTool) item).getCurrentType(stack).ordinal(); + } + return 0; + } + }); + } + + public static void registerSacrificialKnife(Item item) + { + ItemModelsProperties.registerProperty(item, BloodMagic.rl("incense"), new IItemPropertyGetter() + { + @Override + public float call(ItemStack stack, ClientWorld world, LivingEntity entity) + { + Item item = stack.getItem(); + if (item instanceof ItemSacrificialDagger) + { + return ((ItemSacrificialDagger) item).canUseForSacrifice(stack) ? 1 : 0; + } + return 0; + } + }); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/Sprite.java b/src/main/java/wayoftime/bloodmagic/client/Sprite.java new file mode 100644 index 00000000..8b637fe1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/Sprite.java @@ -0,0 +1,57 @@ +package wayoftime.bloodmagic.client; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.AbstractGui; +import net.minecraft.util.ResourceLocation; + +public class Sprite +{ + + private final ResourceLocation textureLocation; + private final int textureX; + private final int textureY; + private final int textureWidth; + private final int textureHeight; + + public Sprite(ResourceLocation textureLocation, int textureX, int textureY, int textureWidth, int textureHeight) + { + this.textureLocation = textureLocation; + this.textureX = textureX; + this.textureY = textureY; + this.textureWidth = textureWidth; + this.textureHeight = textureHeight; + } + + public ResourceLocation getTextureLocation() + { + return textureLocation; + } + + public int getTextureX() + { + return textureX; + } + + public int getTextureY() + { + return textureY; + } + + public int getTextureWidth() + { + return textureWidth; + } + + public int getTextureHeight() + { + return textureHeight; + } + + public void draw(MatrixStack matrixStack, int x, int y) + { + Minecraft.getInstance().getTextureManager().bindTexture(getTextureLocation()); + AbstractGui.blit(matrixStack, x, y, 0, getTextureX(), getTextureY(), getTextureWidth(), getTextureHeight(), 256, 256); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/ElementInfo.java b/src/main/java/wayoftime/bloodmagic/client/hud/ElementInfo.java new file mode 100644 index 00000000..1a21439d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/ElementInfo.java @@ -0,0 +1,45 @@ +package wayoftime.bloodmagic.client.hud; + +import net.minecraft.util.math.vector.Vector2f; + +public class ElementInfo +{ + public static final ElementInfo DUMMY = new ElementInfo(new Vector2f(0F, 0F), ElementRegistry.getRandomColor()); + + private final Vector2f defaultPosition; + private final int boxColor; + private Vector2f currentPosition; + + public ElementInfo(Vector2f defaultPosition, int boxColor) + { + this.defaultPosition = defaultPosition; + this.boxColor = boxColor; + this.currentPosition = defaultPosition; + } + + public Vector2f getDefaultPosition() + { + return defaultPosition; + } + + public int getBoxColor() + { + return boxColor; + } + + public ElementInfo setPosition(Vector2f position) + { + this.currentPosition = position; + return this; + } + + public Vector2f getPosition() + { + return currentPosition; + } + + public void resetPosition() + { + this.currentPosition = defaultPosition; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/ElementRegistry.java b/src/main/java/wayoftime/bloodmagic/client/hud/ElementRegistry.java new file mode 100644 index 00000000..427d9505 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/ElementRegistry.java @@ -0,0 +1,185 @@ +package wayoftime.bloodmagic.client.hud; + +import java.awt.Color; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Maps; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; + +import net.minecraft.client.MainWindow; +import net.minecraft.client.Minecraft; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Vector2f; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.loading.FMLPaths; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.client.hud.element.HUDElement; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID, value = Dist.CLIENT) +public class ElementRegistry +{ + +// private static final File CORNFIG = new File(Loader.instance().getConfigDir(), BloodMagic.MODID + "/hud_elements.json"); + private static final File CONFIG = FMLPaths.CONFIGDIR.get().resolve(BloodMagic.MODID).resolve("hud_elements.json").toFile(); + + private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); + private static final Map HUD_ELEMENTS = Maps.newLinkedHashMap(); + private static final Map REVERSE = Maps.newHashMap(); + private static final Map ELEMENT_INFO = Maps.newHashMap(); + + public static void registerHandler(ResourceLocation key, HUDElement element, Vector2f defaultPosition) + { + HUD_ELEMENTS.put(key, element); + REVERSE.put(element, key); + + ELEMENT_INFO.put(key, new ElementInfo(defaultPosition, getRandomColor())); + } + + public static void resetPos() + { + ELEMENT_INFO.values().forEach(ElementInfo::resetPosition); + } + + public static List getElements() + { + return ImmutableList.copyOf(HUD_ELEMENTS.values()); + } + + public static ResourceLocation getKey(HUDElement element) + { + return REVERSE.get(element); + } + + public static int getColor(ResourceLocation element) + { + return ELEMENT_INFO.getOrDefault(element, ElementInfo.DUMMY).getBoxColor(); + } + + public static Vector2f getPosition(ResourceLocation element) + { + return ELEMENT_INFO.get(element).getPosition(); + } + + public static void setPosition(ResourceLocation element, Vector2f point) + { + ELEMENT_INFO.compute(element, (resourceLocation, elementInfo) -> { + if (elementInfo == null) + return new ElementInfo(point, getRandomColor()); + + elementInfo.setPosition(point); + return elementInfo; + }); + } + + public static void save(Map newLocations) + { + newLocations.forEach((k, v) -> { + ElementInfo info = ELEMENT_INFO.get(k); + if (info != null) + info.setPosition(v); + }); + + Map toWrite = Maps.newHashMap(); + for (Map.Entry entry : ELEMENT_INFO.entrySet()) + toWrite.put(entry.getKey().toString(), entry.getValue().getPosition()); + + String json = GSON.toJson(toWrite); + try (FileWriter writer = new FileWriter(CONFIG)) + { + writer.write(json); + } catch (Exception e) + { + e.printStackTrace(); + } + } + + public static void readConfig() + { + if (!CONFIG.exists()) + return; + + try (FileReader reader = new FileReader(CONFIG)) + { + Map toLoad = GSON.fromJson(reader, new TypeToken>() + { + }.getType()); + for (Map.Entry entry : toLoad.entrySet()) + { + ElementInfo info = ELEMENT_INFO.get(new ResourceLocation(entry.getKey())); + if (info != null) + info.setPosition(entry.getValue()); + } + } catch (Exception e) + { + e.printStackTrace(); + } + } + + @OnlyIn(Dist.CLIENT) + @SubscribeEvent + public static void onRenderOverlay(RenderGameOverlayEvent.Pre event) + { + if (event.getType() == RenderGameOverlayEvent.ElementType.HOTBAR) + { + MainWindow window = event.getWindow(); + + for (HUDElement element : HUD_ELEMENTS.values()) + { + if (!element.shouldRender(Minecraft.getInstance())) + continue; + +// Vector2f position = ELEMENT_INFO.get(getKey(element)).getPosition(); +// int xPos = (int) (resolution.getScaledWidth_double() * position.x); +// if (xPos - element.getWidth() < 0) +// xPos *= 2; +// if (xPos + element.getWidth() > resolution.getScaledWidth()) +// xPos -= element.getWidth(); +// +// int yPos = (int) (resolution.getScaledHeight_double() * position.y); +// if (yPos - element.getHeight() < 0) +// yPos *= 2; +// if (yPos + element.getHeight() > resolution.getScaledHeight()) +// yPos -= element.getHeight(); +// +// element.draw(event.getResolution(), event.getPartialTicks(), xPos, yPos); + + Vector2f position = ELEMENT_INFO.get(getKey(element)).getPosition(); + int xPos = (int) (window.getScaledWidth() * position.x); + if (xPos - element.getWidth() < 0) + xPos *= 2; + if (xPos + element.getWidth() > window.getScaledWidth()) + xPos -= element.getWidth(); + + int yPos = (int) (window.getScaledHeight() * position.y); + if (yPos - element.getHeight() < 0) + yPos *= 2; + if (yPos + element.getHeight() > window.getScaledHeight()) + yPos -= element.getHeight(); + + element.draw(event.getMatrixStack(), event.getPartialTicks(), xPos, yPos); + } + } + } + + public static int getRandomColor() + { + Random rand = new Random(); + float r = rand.nextFloat() / 2F + 0.5F; + float g = rand.nextFloat() / 2F + 0.5F; + float b = rand.nextFloat() / 2F + 0.5F; + float a = 0.5F; + return new Color(r, g, b, a).getRGB(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/Elements.java b/src/main/java/wayoftime/bloodmagic/client/hud/Elements.java new file mode 100644 index 00000000..cff7e3a0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/Elements.java @@ -0,0 +1,93 @@ +package wayoftime.bloodmagic.client.hud; + +import java.util.function.Consumer; +import java.util.function.Function; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.client.resources.I18n; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Vector2f; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ConfigManager; +import wayoftime.bloodmagic.client.Sprite; +import wayoftime.bloodmagic.client.hud.element.ElementDemonAura; +import wayoftime.bloodmagic.client.hud.element.ElementDivinedInformation; +import wayoftime.bloodmagic.client.hud.element.ElementHolding; +import wayoftime.bloodmagic.tile.TileAltar; +import wayoftime.bloodmagic.tile.TileIncenseAltar; +import wayoftime.bloodmagic.util.helper.NumeralHelper; + +public class Elements +{ + public static void registerElements() + { + ElementRegistry.registerHandler(new ResourceLocation(BloodMagic.MODID, "demon_will_aura"), new ElementDemonAura(), new Vector2f(ConfigManager.CLIENT.demonWillGaugeX.get().floatValue(), ConfigManager.CLIENT.demonWillGaugeY.get().floatValue())); + + ElementRegistry.registerHandler(BloodMagic.rl("blood_altar"), new ElementDivinedInformation(2, true, TileAltar.class) + { + @Override + public void gatherInformation(Consumer>> information) + { + // Current tier + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 0, 46, 16, 16), altar -> altar == null + ? "IV" + : NumeralHelper.toRoman(altar.getTier()))); + // Stored/Capacity + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 16, 46, 16, 16), altar -> String.format("%d/%d", altar == null + ? 0 + : altar.getCurrentBlood(), altar == null ? 10000 : altar.getCapacity()))); + } + }, new Vector2f(0.01F, 0.01F)); + + ElementRegistry.registerHandler(new ResourceLocation(BloodMagic.MODID, "blood_altar_adv"), new ElementDivinedInformation(5, false, TileAltar.class) + { + @Override + public void gatherInformation(Consumer>> information) + { + // Current tier + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 0, 46, 16, 16), altar -> altar == null + ? "IV" + : NumeralHelper.toRoman(altar.getTier()))); + // Stored/Capacity + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 16, 46, 16, 16), altar -> String.format("%d/%d", altar == null + ? 0 + : altar.getCurrentBlood(), altar == null ? 10000 : altar.getCapacity()))); + // Crafting progress/Crafting requirement + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 32, 46, 16, 16), altar -> { + if (altar == null || !altar.isActive()) + return I18n.format("hud.bloodmagic.inactive"); + int progress = altar.getProgress(); + int totalLiquidRequired = altar.getLiquidRequired() * altar.getStackInSlot(0).getCount(); + return String.format("%d/%d", progress, totalLiquidRequired); + })); + // Consumption rate + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 48, 46, 16, 16), altar -> altar == null + ? "0" + : String.valueOf((int) (altar.getConsumptionRate() * (altar.getConsumptionMultiplier() + 1))))); + // Total charge + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 64, 46, 16, 16), altar -> altar == null + ? "0" + : String.valueOf(altar.getTotalCharge()))); + } + }, new Vector2f(0.01F, 0.01F)); + + ElementRegistry.registerHandler(new ResourceLocation(BloodMagic.MODID, "incense_altar"), new ElementDivinedInformation(2, true, TileIncenseAltar.class) + { + @Override + public void gatherInformation(Consumer>> information) + { + // Current tranquility + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 80, 46, 16, 16), incense -> incense == null + ? "0" + : String.valueOf((int) ((100D * (int) (100 * incense.tranquility)) / 100D)))); + // Sacrifice bonus + information.accept(Pair.of(new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 96, 46, 16, 16), incense -> incense == null + ? "0" + : String.valueOf((int) (100 * incense.incenseAddition)))); + } + }, new Vector2f(0.01F, 0.01F)); + + ElementRegistry.registerHandler(new ResourceLocation(BloodMagic.MODID, "holding"), new ElementHolding(), new Vector2f(0.72F, 1.0F)); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/GuiEditHUD.java b/src/main/java/wayoftime/bloodmagic/client/hud/GuiEditHUD.java new file mode 100644 index 00000000..84756bac --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/GuiEditHUD.java @@ -0,0 +1,239 @@ +package wayoftime.bloodmagic.client.hud; + +import java.awt.Point; +import java.util.Map; + +import javax.annotation.Nullable; + +import com.google.common.collect.Maps; +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.MainWindow; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.gui.widget.button.Button; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Vector2f; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.client.hud.element.HUDElement; + +public class GuiEditHUD extends Screen +{ + private static final int LINE_COLOR = 0x2D2D2D; + + private final Screen parent; + private final Map currentOverrides = Maps.newHashMap(); + private HUDElement dragged; + public boolean changes; + + public GuiEditHUD(Screen parent) + { + super(new StringTextComponent("Testing GuiEditHUD")); + this.parent = parent; + } + + @Override + public void init() + { + super.init(); + + addButton(new Button(width / 2 - 155, height - 30, 70, 20, new TranslationTextComponent("gui.bloodmagic.toggle"), b -> { + Minecraft.getInstance().displayGuiScreen(parent); + }) + { + { + active = false; + } + }); + addButton(new Button(width / 2 - 75, height - 30, 70, 20, new TranslationTextComponent("gui.bloodmagic.default"), b -> { + currentOverrides.clear(); + ElementRegistry.resetPos(); + changes = false; + })); + addButton(new Button(width / 2 + 5, height - 30, 70, 20, new TranslationTextComponent("gui.bloodmagic.save"), b -> { + ElementRegistry.save(currentOverrides); + Minecraft.getInstance().displayGuiScreen(parent); + })); + addButton(new Button(width / 2 + 90, height - 30, 70, 20, new TranslationTextComponent("gui.bloodmagic.cancel"), b -> { + currentOverrides.clear(); + Minecraft.getInstance().displayGuiScreen(parent); + })); + } + + @Override + public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) + { + this.renderBackground(matrixStack); + super.render(matrixStack, mouseX, mouseY, partialTicks); + +// ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance()); + MainWindow window = Minecraft.getInstance().getMainWindow(); + for (HUDElement element : ElementRegistry.getElements()) + { + if (dragged == element) + continue; + + ResourceLocation key = ElementRegistry.getKey(element); + Vector2f position = currentOverrides.getOrDefault(key, ElementRegistry.getPosition(key)); + int xPos = (int) (window.getScaledWidth() * position.x); + int yPos = (int) (window.getScaledHeight() * position.y); + + drawWithBox(matrixStack, element, partialTicks, xPos, yPos); + } + + if (dragged != null) + { + Point bounded = getBoundedDrag(window, mouseX, mouseY); + drawWithBox(matrixStack, dragged, partialTicks, bounded.x, bounded.y); + } + } + + @Override + public boolean isPauseScreen() + { + return true; + } + + @Override +// protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) + public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) + { + if (dragged == null) + { + HUDElement element = getHoveredElement(mouseX, mouseY); + if (element != null) + { + if (button == 0) + dragged = element; + } + + } + + return super.mouseDragged(mouseX, mouseY, button, dragX, dragY); +// if (dragged != null) +// return false; +// +// HUDElement element = getHoveredElement(mouseX, mouseY); +// if (element == null) +// return false; +// +// if (button == 0) +// dragged = element; +// +// return super.mouseDragged(mouseX, mouseY, button, dragX, dragY); + } + + @Override + public boolean mouseReleased(double mouseX, double mouseY, int state) + { + if (dragged != null) + { + MainWindow window = Minecraft.getInstance().getMainWindow(); + Point bounded = getBoundedDrag(window, mouseX, mouseY); + float xPos = (float) ((bounded.x) / window.getScaledWidth()); + float yPos = (float) ((bounded.y) / window.getScaledHeight()); + + currentOverrides.put(ElementRegistry.getKey(dragged), new Vector2f(xPos, yPos)); + changes = true; + dragged = null; +// return super; + } + + return super.mouseReleased(mouseX, mouseY, state); + } + +// @Override +// protected void actionPerformed(Button button) +// { +// switch (button.id) +// { +// case 0: +// { +// Minecraft.getInstance().displayGuiScreen(parent); +// break; +// } +// case 1: +// { +// currentOverrides.clear(); +// ElementRegistry.resetPos(); +// changes = false; +// break; +// } +// case 2: +// { +// ElementRegistry.save(currentOverrides); +// Minecraft.getInstance().displayGuiScreen(parent); +// break; +// } +// case 3: +// { +// currentOverrides.clear(); +// Minecraft.getInstance().displayGuiScreen(parent); +// break; +// } +// } +// } + + @Nullable + public HUDElement getHoveredElement(double mouseX, double mouseY) + { + MainWindow window = Minecraft.getInstance().getMainWindow(); + for (HUDElement element : ElementRegistry.getElements()) + { + ResourceLocation key = ElementRegistry.getKey(element); + Vector2f position = currentOverrides.getOrDefault(key, ElementRegistry.getPosition(key)); + + int xPos = (int) (window.getScaledWidth() * position.x); + int yPos = (int) (window.getScaledHeight() * position.y); + + if (mouseX < xPos || mouseX > xPos + element.getWidth()) + continue; + + if (mouseY < yPos || mouseY > yPos + element.getHeight()) + continue; + + return element; + } + + return null; + } + + protected Point getBoundedDrag(MainWindow window, double mouseX, double mouseY) + { + int drawX = (int) (mouseX - dragged.getWidth() / 2); + if (drawX + dragged.getWidth() >= window.getScaledWidth()) + drawX = window.getScaledWidth() - dragged.getWidth(); + if (drawX < 0) + drawX = 0; + + int drawY = (int) (mouseY - dragged.getHeight() / 2); + if (drawY + dragged.getHeight() >= window.getScaledHeight()) + drawY = window.getScaledHeight() - dragged.getHeight(); + if (drawY < 0) + drawY = 0; + + return new Point(drawX, drawY); + } + + protected void drawWithBox(MatrixStack matrixStack, HUDElement element, float partialTicks, int drawX, int drawY) + { + int color = ElementRegistry.getColor(ElementRegistry.getKey(element)); + matrixStack.push(); +// GlStateManager.enableAlpha(); +// GlStateManager.enableBlend(); +// GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); + + this.vLine(matrixStack, drawX, drawY, drawY + element.getHeight() - 1, color); + this.vLine(matrixStack, drawX + element.getWidth() - 1, drawY, drawY + element.getHeight() - 1, color); + this.hLine(matrixStack, drawX, drawX + element.getWidth() - 1, drawY, color); + this.hLine(matrixStack, drawX, drawX + element.getWidth() - 1, drawY + element.getHeight() - 1, color); +// GlStateManager.disableBlend(); +// GlStateManager.disableAlpha(); + matrixStack.pop(); +// GlStateManager.color(1.0F, 1.0F, 1.0F); +// GlStateManager.enableTexture2D(); + element.draw(matrixStack, partialTicks, drawX, drawY); +// GlStateManager.disableTexture2D(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementDemonAura.java b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementDemonAura.java new file mode 100644 index 00000000..6f29cf8a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementDemonAura.java @@ -0,0 +1,83 @@ +package wayoftime.bloodmagic.client.hud.element; + +import java.util.List; + +import com.google.common.collect.Lists; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class ElementDemonAura extends HUDElement +{ + + private static final ResourceLocation BAR_LOCATION = new ResourceLocation(BloodMagic.MODID, "textures/hud/bars.png"); + + private final List orderedTypes = Lists.newArrayList(EnumDemonWillType.DEFAULT, EnumDemonWillType.CORROSIVE, EnumDemonWillType.STEADFAST, EnumDemonWillType.DESTRUCTIVE, EnumDemonWillType.VENGEFUL); + + public ElementDemonAura() + { + super(80, 46); + } + + @Override + public void draw(MatrixStack matrixStack, float partialTicks, int drawX, int drawY) + { + Minecraft minecraft = Minecraft.getInstance(); + PlayerEntity player = minecraft.player; + + minecraft.getTextureManager().bindTexture(BAR_LOCATION); +// GlStateManager.color(1.0F, 1.0F, 1.0F); + this.blit(matrixStack, drawX, drawY, 0, 210, 80, 46); + + double maxAmount = Utils.getDemonWillResolution(player); + + int i = 0; + for (EnumDemonWillType type : orderedTypes) + { + i++; +// GlStateManager.color(1.0F, 1.0F, 1.0F); + minecraft.getTextureManager().bindTexture(BAR_LOCATION); + int textureXOffset = (i > 3) ? (i - 3) : (3 - i); + int maxBarSize = 30 - 2 * textureXOffset; + + double amount = ClientHandler.currentAura == null ? 0 : ClientHandler.currentAura.getWill(type); + double ratio = Math.max(Math.min(amount / maxAmount, 1), 0); + +// double amount = 50; +// double ratio = 0.5; + + double width = maxBarSize * ratio * 2; + double height = 2; + double x = drawX + 2 * textureXOffset + 10; + double y = drawY + 4 * i + 10; + + double textureX = 2 * textureXOffset + 2 * 42; + double textureY = 4 * i + 220; + + this.blit(matrixStack, (int) x, (int) y, (int) textureX, (int) textureY, (int) width, (int) height); + + if (player.isSneaking()) + { + matrixStack.push(); + matrixStack.translate(x - 2 * textureXOffset + 70, (y - 2), 0); + matrixStack.scale(0.5f, 0.5f, 1f); + minecraft.fontRenderer.drawStringWithShadow(matrixStack, String.valueOf((int) amount), 0, 2, 0xffffffff); + RenderSystem.clearTexGen(); + matrixStack.pop(); + } + } + } + + @Override + public boolean shouldRender(Minecraft minecraft) + { + return Utils.canPlayerSeeDemonWill(Minecraft.getInstance().player); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementDivinedInformation.java b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementDivinedInformation.java new file mode 100644 index 00000000..d068635b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementDivinedInformation.java @@ -0,0 +1,76 @@ +package wayoftime.bloodmagic.client.hud.element; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Hand; +import wayoftime.bloodmagic.common.item.BloodMagicItems; + +public abstract class ElementDivinedInformation extends ElementTileInformation +{ + + private final boolean simple; + + public ElementDivinedInformation(int lines, boolean simple, Class tileClass) + { + super(100, lines, tileClass); + this.simple = simple; + } + + @Override + public boolean shouldRender(Minecraft minecraft) + { + PlayerEntity player = Minecraft.getInstance().player; + ItemStack sigilStack = player.getHeldItem(Hand.MAIN_HAND); + boolean flag = false; + if (simple) + { + if (sigilStack.getItem() == BloodMagicItems.DIVINATION_SIGIL.get() || sigilStack.getItem() == BloodMagicItems.SEER_SIGIL.get()) + flag = true; + else + flag = isFlagSigilHolding(sigilStack, true); + +// if (!flag) +// { +// sigilStack = player.getHeldItem(Hand.OFF_HAND); +// if (sigilStack.getItem() == RegistrarBloodMagicItems.SIGIL_DIVINATION || sigilStack.getItem() == RegistrarBloodMagicItems.SIGIL_SEER) +// flag = true; +// else +// flag = isFlagSigilHolding(sigilStack, true); +// } + + } else + { + if (sigilStack.getItem() == BloodMagicItems.SEER_SIGIL.get()) + flag = true; + else + flag = isFlagSigilHolding(sigilStack, false); +// +// if (!flag) +// { +// sigilStack = player.getHeldItem(Hand.OFF_HAND); +// if (sigilStack.getItem() == RegistrarBloodMagicItems.SIGIL_SEER) +// flag = true; +// else +// flag = isFlagSigilHolding(sigilStack, false); +// } + } + + return super.shouldRender(minecraft) && flag; + } + + private boolean isFlagSigilHolding(ItemStack sigilStack, boolean simple) + { +// if (sigilStack.getItem() instanceof ItemSigilHolding) +// { +// List internalInv = ItemSigilHolding.getInternalInventory(sigilStack); +// int currentSlot = ItemSigilHolding.getCurrentItemOrdinal(sigilStack); +// if (internalInv != null && !internalInv.get(currentSlot).isEmpty()) +// { +// return (internalInv.get(currentSlot).getItem() == RegistrarBloodMagicItems.SIGIL_SEER && !simple) || (internalInv.get(currentSlot).getItem() == RegistrarBloodMagicItems.SIGIL_DIVINATION && simple); +// } +// } + return false; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementHolding.java b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementHolding.java new file mode 100644 index 00000000..2231907f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementHolding.java @@ -0,0 +1,109 @@ +package wayoftime.bloodmagic.client.hud.element; + +import java.util.List; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.client.Sprite; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; + +public class ElementHolding extends HUDElement +{ + private static final Sprite HOLDING_BAR = new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 0, 0, 102, 22); + private static final Sprite SELECTED_OVERLAY = new Sprite(new ResourceLocation(BloodMagic.MODID, "textures/gui/widgets.png"), 0, 22, 24, 24); + + public ElementHolding() + { + super(HOLDING_BAR.getTextureWidth(), HOLDING_BAR.getTextureHeight()); + } + + @Override + public void draw(MatrixStack matrixStack, float partialTicks, int drawX, int drawY) + { +// GlStateManager.color(1.0F, 1.0F, 1.0F); + matrixStack.push(); + HOLDING_BAR.draw(matrixStack, drawX, drawY); + + Minecraft minecraft = Minecraft.getInstance(); + ItemStack sigilHolding = minecraft.player.getHeldItemMainhand(); + // Check mainhand for Sigil of Holding + if (!(sigilHolding.getItem() == BloodMagicItems.HOLDING_SIGIL.get())) + sigilHolding = minecraft.player.getHeldItemOffhand(); + // Check offhand for Sigil of Holding + if (!(sigilHolding.getItem() == BloodMagicItems.HOLDING_SIGIL.get())) + return; + + int currentSlot = ItemSigilHolding.getCurrentItemOrdinal(sigilHolding); + SELECTED_OVERLAY.draw(matrixStack, drawX - 1 + (currentSlot * 20), drawY - 1); + + RenderHelper.enableStandardItemLighting(); + List inventory = ItemSigilHolding.getInternalInventory(sigilHolding); + int xOffset = 0; + for (ItemStack stack : inventory) + { + renderHotbarItem(matrixStack, drawX + 3 + xOffset, drawY + 3, partialTicks, minecraft.player, stack); + xOffset += 20; + } + matrixStack.pop(); + } + + @Override + public boolean shouldRender(Minecraft minecraft) + { + ItemStack sigilHolding = minecraft.player.getHeldItemMainhand(); + // Check mainhand for Sigil of Holding + if (!(sigilHolding.getItem() == BloodMagicItems.HOLDING_SIGIL.get())) + sigilHolding = minecraft.player.getHeldItemOffhand(); + // Check offhand for Sigil of Holding + if (!(sigilHolding.getItem() == BloodMagicItems.HOLDING_SIGIL.get())) + return false; + + return true; + } + + protected void renderHotbarItem(MatrixStack matrixStack, int x, int y, float partialTicks, PlayerEntity player, ItemStack stack) + { + if (!stack.isEmpty()) + { + float animation = (float) stack.getAnimationsToGo() - partialTicks; + + if (animation > 0.0F) + { + matrixStack.push(); + float f1 = 1.0F + animation / 5.0F; + matrixStack.translate((float) (x + 8), (float) (y + 12), 0.0F); + matrixStack.scale(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F); + matrixStack.translate((float) (-(x + 8)), (float) (-(y + 12)), 0.0F); +// RenderSystem.translatef((float) (x + 8), (float) (y + 12), 0.0F); +// RenderSystem.scalef(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F); +// RenderSystem.translatef((float) (-(x + 8)), (float) (-(y + 12)), 0.0F); + } + + Minecraft.getInstance().getItemRenderer().renderItemAndEffectIntoGUI(player, stack, x, y); + + if (animation > 0.0F) + matrixStack.pop(); + + Minecraft.getInstance().getItemRenderer().renderItemOverlays(Minecraft.getInstance().fontRenderer, stack, x, y); + } + } + +// private void drawItemStack(ItemStack stack, int x, int y, String altText) { +// RenderSystem.translatef(0.0F, 0.0F, 32.0F); +// this.setBlitOffset(200); +// this.itemRenderer.zLevel = 200.0F; +// net.minecraft.client.gui.FontRenderer font = stack.getItem().getFontRenderer(stack); +// if (font == null) font = this.font; +// this.itemRenderer.renderItemAndEffectIntoGUI(stack, x, y); +// this.itemRenderer.renderItemOverlayIntoGUI(font, stack, x, y - (this.draggedStack.isEmpty() ? 0 : 8), altText); +// this.setBlitOffset(0); +// this.itemRenderer.zLevel = 0.0F; +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementTileInformation.java b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementTileInformation.java new file mode 100644 index 00000000..5a5aa20f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/element/ElementTileInformation.java @@ -0,0 +1,71 @@ +package wayoftime.bloodmagic.client.hud.element; + +import java.awt.Color; +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Function; + +import org.apache.commons.lang3.tuple.Pair; + +import com.google.common.collect.Lists; +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceResult; +import wayoftime.bloodmagic.client.Sprite; + +public abstract class ElementTileInformation extends HUDElement +{ + + protected final Class tileClass; + private final List>> information; + + public ElementTileInformation(int width, int lines, Class tileClass) + { + super(width, 18 * lines - 2); + + this.tileClass = tileClass; + this.information = Lists.newArrayList(); + gatherInformation(information::add); + } + + public abstract void gatherInformation(Consumer>> information); + + @SuppressWarnings("unchecked") + @Override + public void draw(MatrixStack matrixStack, float partialTicks, int drawX, int drawY) + { + RayTraceResult trace = Minecraft.getInstance().objectMouseOver; + if (trace == null || trace.getType() != RayTraceResult.Type.BLOCK) + return; + + T tile = (T) Minecraft.getInstance().world.getTileEntity(((BlockRayTraceResult) trace).getPos()); + + int yOffset = 0; + for (Pair> sprite : information) + { + sprite.getLeft().draw(matrixStack, drawX, drawY + yOffset); + int textY = drawY + yOffset + (sprite.getLeft().getTextureHeight() / 4); + Minecraft.getInstance().fontRenderer.drawStringWithShadow(matrixStack, (tile != null && tile.getClass() == tileClass) + ? sprite.getRight().apply(tile) + : "?", drawX + sprite.getLeft().getTextureWidth() + 2, textY, Color.WHITE.getRGB()); + yOffset += sprite.getLeft().getTextureHeight() + 2; + } + } + + @Override + public boolean shouldRender(Minecraft minecraft) + { + RayTraceResult trace = Minecraft.getInstance().objectMouseOver; + if (trace == null || trace.getType() != RayTraceResult.Type.BLOCK) + return false; + + TileEntity tile = Minecraft.getInstance().world.getTileEntity(((BlockRayTraceResult) trace).getPos()); + if (tile == null || !tileClass.isAssignableFrom(tile.getClass())) + return false; + + return true; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/hud/element/HUDElement.java b/src/main/java/wayoftime/bloodmagic/client/hud/element/HUDElement.java new file mode 100644 index 00000000..fc39c966 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/hud/element/HUDElement.java @@ -0,0 +1,68 @@ +package wayoftime.bloodmagic.client.hud.element; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.AbstractGui; +import net.minecraft.util.math.vector.Vector2f; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.client.hud.ElementRegistry; + +@OnlyIn(Dist.CLIENT) +public abstract class HUDElement +{ + + private int width; + private int height; + protected int blitOffset = 0; + + public HUDElement(int width, int height) + { + this.width = width; + this.height = height; + } + + public boolean shouldRender(Minecraft minecraft) + { + return true; + } + + public abstract void draw(MatrixStack matrixStack, float partialTicks, int drawX, int drawY); + + public final int getWidth() + { + return width; + } + + public final int getHeight() + { + return height; + } + +// protected void drawTexturedModalRect(double x, double y, double textureX, double textureY, double width, double height) +// { +// float f = 0.00390625F; +// float f1 = 0.00390625F; +// Tessellator tessellator = Tessellator.getInstance(); +// BufferBuilder buffer = tessellator.getBuffer(); +// buffer.begin(7, DefaultVertexFormats.POSITION_TEX); +// buffer.pos(x + 0, y + height, 0).tex((double) ((float) (textureX + 0) * f), (double) ((float) (textureY + height) * f1)).endVertex(); +// buffer.pos(x + width, y + height, 0).tex((double) ((float) (textureX + width) * f), (double) ((float) (textureY + height) * f1)).endVertex(); +// buffer.pos(x + width, y + 0, 0).tex((double) ((float) (textureX + width) * f), (double) ((float) (textureY + 0) * f1)).endVertex(); +// buffer.pos(x + 0, y + 0, 0).tex((double) ((float) (textureX + 0) * f), (double) ((float) (textureY + 0) * f1)).endVertex(); +// tessellator.draw(); +// } + + public void blit(MatrixStack matrixStack, int x, int y, int uOffset, int vOffset, int uWidth, int vHeight) + { + AbstractGui.blit(matrixStack, x, y, this.blitOffset, (float) uOffset, (float) vOffset, uWidth, vHeight, 256, 256); + } + + @Override + public String toString() + { + Vector2f point = ElementRegistry.getPosition(ElementRegistry.getKey(this)); + return ElementRegistry.getKey(this) + "@" + point.x + "," + point.y; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/key/BloodMagicKeyHandler.java b/src/main/java/wayoftime/bloodmagic/client/key/BloodMagicKeyHandler.java new file mode 100644 index 00000000..f3b2ab92 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/key/BloodMagicKeyHandler.java @@ -0,0 +1,82 @@ +package wayoftime.bloodmagic.client.key; + +import java.util.BitSet; + +import org.lwjgl.glfw.GLFW; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.settings.KeyBinding; +import net.minecraft.client.util.InputMappings; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.common.MinecraftForge; + +public class BloodMagicKeyHandler +{ + + private final BitSet keyDown; + + private final BitSet repeatings; + + public BloodMagicKeyHandler() + { + this.keyDown = new BitSet(); + this.repeatings = new BitSet(); + MinecraftForge.EVENT_BUS.addListener(this::keyTick); + } + + public static boolean isKeyDown(KeyBinding keyBinding) + { + InputMappings.Input key = keyBinding.getKey(); + int keyCode = key.getKeyCode(); + if (keyCode != InputMappings.INPUT_INVALID.getKeyCode()) + { + long windowHandle = Minecraft.getInstance().getMainWindow().getHandle(); + try + { + if (key.getType() == InputMappings.Type.KEYSYM) + { + return InputMappings.isKeyDown(windowHandle, keyCode); + } else if (key.getType() == InputMappings.Type.MOUSE) + { + return GLFW.glfwGetMouseButton(windowHandle, keyCode) == GLFW.GLFW_PRESS; + } + } catch (Exception ignored) + { + } + } + return false; + } + + public void keyTick(InputEvent.KeyInputEvent event) + { +// System.out.println("Pressing the key handlers"); + for (int i = 0; i < KeyBindings.values().length; i++) + { + KeyBindings keyBindings = KeyBindings.values()[i]; + KeyBinding keyBinding = keyBindings.getKey(); + boolean state = keyBinding.isKeyDown(); + boolean lastState = keyDown.get(i); + if (state != lastState || (state && repeatings.get(i))) + { + if (state) + { + keyDown(keyBindings, lastState); + } else + { + keyUp(keyBindings); + } + keyDown.set(i, state); + } + } + } + + public void keyDown(KeyBindings kb, boolean isRepeat) + { + kb.handleKeybind(); + } + + public void keyUp(KeyBindings kb) + { + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/key/IKeybindable.java b/src/main/java/wayoftime/bloodmagic/client/key/IKeybindable.java new file mode 100644 index 00000000..35eddcd0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/key/IKeybindable.java @@ -0,0 +1,9 @@ +package wayoftime.bloodmagic.client.key; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; + +public interface IKeybindable +{ + void onKeyPressed(ItemStack stack, PlayerEntity player, KeyBindings key, boolean showInChat); +} diff --git a/src/main/java/wayoftime/bloodmagic/client/key/KeyBindingBloodMagic.java b/src/main/java/wayoftime/bloodmagic/client/key/KeyBindingBloodMagic.java new file mode 100644 index 00000000..b48666a1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/key/KeyBindingBloodMagic.java @@ -0,0 +1,17 @@ +package wayoftime.bloodmagic.client.key; + +import net.minecraft.client.settings.KeyBinding; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.client.registry.ClientRegistry; + +@OnlyIn(Dist.CLIENT) +public class KeyBindingBloodMagic extends KeyBinding +{ + public KeyBindingBloodMagic(KeyBindings key) + { + super(key.getDescription(), -1, "key.bloodmagic.category"); + + ClientRegistry.registerKeyBinding(this); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/key/KeyBindings.java b/src/main/java/wayoftime/bloodmagic/client/key/KeyBindings.java new file mode 100644 index 00000000..e711dad3 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/key/KeyBindings.java @@ -0,0 +1,120 @@ +package wayoftime.bloodmagic.client.key; + +import java.util.Locale; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; +import net.minecraft.client.settings.KeyBinding; +import net.minecraft.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.client.settings.IKeyConflictContext; +import net.minecraftforge.client.settings.KeyConflictContext; +import net.minecraftforge.client.settings.KeyModifier; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.client.ClientEvents; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; +import wayoftime.bloodmagic.network.KeyProcessorPacket; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; + +public enum KeyBindings +{ + // @formatter:off + OPEN_HOLDING(KeyConflictContext.IN_GAME, KeyModifier.NONE, -1) + { + @OnlyIn(Dist.CLIENT) + @Override + public void handleKeybind() + { + ItemStack itemStack = ClientHandler.minecraft.player.getHeldItemMainhand(); + if (itemStack.getItem() instanceof IKeybindable) + BloodMagic.packetHandler.sendToServer(new KeyProcessorPacket(this.ordinal(), false)); +// System.out.println("I is on the client."); +// +// +// BloodMagicPacketHandler.INSTANCE.sendToServer(new KeyProcessorPacket(this, false)); + } + }, + CYCLE_HOLDING_POS(KeyConflictContext.IN_GAME, KeyModifier.SHIFT, -1) + { + @OnlyIn(Dist.CLIENT) + @Override + public void handleKeybind() + { + ClientPlayerEntity player = Minecraft.getInstance().player; + if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding) + ClientEvents.cycleSigil(player.getHeldItemMainhand(), player, -1); + } + }, + CYCLE_HOLDING_NEG(KeyConflictContext.IN_GAME, KeyModifier.SHIFT, -1) + { + @OnlyIn(Dist.CLIENT) + @Override + public void handleKeybind() + { + ClientPlayerEntity player = Minecraft.getInstance().player; + if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding) + ClientEvents.cycleSigil(player.getHeldItemMainhand(), player, 1); + } + },; + // @formatter:on + + private final IKeyConflictContext keyConflictContext; + private final KeyModifier keyModifier; + private final int keyCode; + + @OnlyIn(Dist.CLIENT) + private KeyBinding key; + + KeyBindings(IKeyConflictContext keyConflictContext, KeyModifier keyModifier, int keyCode) + { + this.keyConflictContext = keyConflictContext; + this.keyModifier = keyModifier; + this.keyCode = keyCode; + } + + @OnlyIn(Dist.CLIENT) + public abstract void handleKeybind(); + + public IKeyConflictContext getKeyConflictContext() + { + return keyConflictContext; + } + + public KeyModifier getKeyModifier() + { + return keyModifier; + } + + public int getKeyCode() + { + return keyCode; + } + + @OnlyIn(Dist.CLIENT) + public KeyBinding getKey() + { + if (key == null) + key = new KeyBindingBloodMagic(this); + + return key; + } + + @OnlyIn(Dist.CLIENT) + public void setKey(KeyBinding key) + { + this.key = key; + } + + public String getDescription() + { + return BloodMagic.MODID + ".keybind." + name().toLowerCase(Locale.ENGLISH); + } + + public static void initializeKeys() + { + OPEN_HOLDING.getKey(); + CYCLE_HOLDING_POS.getKey(); + CYCLE_HOLDING_NEG.getKey(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/model/MimicBakedModel.java b/src/main/java/wayoftime/bloodmagic/client/model/MimicBakedModel.java new file mode 100644 index 00000000..095bdea8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/model/MimicBakedModel.java @@ -0,0 +1,195 @@ +package wayoftime.bloodmagic.client.model; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Random; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.google.common.collect.ImmutableList; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; +import net.minecraft.client.renderer.model.BakedQuad; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.model.ItemCameraTransforms; +import net.minecraft.client.renderer.model.ItemOverrideList; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.vertex.VertexFormatElement; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.model.data.EmptyModelData; +import net.minecraftforge.client.model.data.IDynamicBakedModel; +import net.minecraftforge.client.model.data.IModelData; +import net.minecraftforge.client.model.pipeline.BakedQuadBuilder; +import wayoftime.bloodmagic.common.block.BlockMimic; +import wayoftime.bloodmagic.tile.TileMimic; + +public class MimicBakedModel implements IDynamicBakedModel +{ + public final ResourceLocation texture; + + public MimicBakedModel(ResourceLocation texture) + { + this.texture = texture; + } + + private TextureAtlasSprite getTexture() + { + return Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(texture); + } + + @Override + public boolean isSideLit() + { + return false; + } + + private void putVertex(BakedQuadBuilder builder, Vector3d normal, double x, double y, double z, float u, float v, TextureAtlasSprite sprite, float r, float g, float b) + { + ImmutableList elements = builder.getVertexFormat().getElements().asList(); + for (int j = 0; j < elements.size(); j++) + { + VertexFormatElement e = elements.get(j); + switch (e.getUsage()) + { + case POSITION: + builder.put(j, (float) x, (float) y, (float) z, 1.0f); + break; + case COLOR: + builder.put(j, r, g, b, 1.0f); + break; + case UV: + switch (e.getIndex()) + { + case 0: + float iu = sprite.getInterpolatedU(u); + float iv = sprite.getInterpolatedV(v); + builder.put(j, iu, iv); + break; + case 2: + builder.put(j, (short) 0, (short) 0); + break; + default: + builder.put(j); + break; + } + break; + case NORMAL: + builder.put(j, (float) normal.x, (float) normal.y, (float) normal.z); + break; + default: + builder.put(j); + break; + } + } + } + + private BakedQuad createQuad(Vector3d v1, Vector3d v2, Vector3d v3, Vector3d v4, TextureAtlasSprite sprite) + { + Vector3d normal = v3.subtract(v2).crossProduct(v1.subtract(v2)).normalize(); + int tw = sprite.getWidth(); + int th = sprite.getHeight(); + + BakedQuadBuilder builder = new BakedQuadBuilder(sprite); + builder.setQuadOrientation(Direction.getFacingFromVector(normal.x, normal.y, normal.z)); + putVertex(builder, normal, v1.x, v1.y, v1.z, 0, 0, sprite, 1.0f, 1.0f, 1.0f); + putVertex(builder, normal, v2.x, v2.y, v2.z, 0, th, sprite, 1.0f, 1.0f, 1.0f); + putVertex(builder, normal, v3.x, v3.y, v3.z, tw, th, sprite, 1.0f, 1.0f, 1.0f); + putVertex(builder, normal, v4.x, v4.y, v4.z, tw, 0, sprite, 1.0f, 1.0f, 1.0f); + return builder.build(); + } + + private static Vector3d v(double x, double y, double z) + { + return new Vector3d(x, y, z); + } + + @Nonnull + @Override + public List getQuads(@Nullable BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData extraData) + { + RenderType layer = MinecraftForgeClient.getRenderLayer(); + + BlockState mimic = extraData.getData(TileMimic.MIMIC); + if (mimic != null && !(mimic.getBlock() instanceof BlockMimic)) + { + if (layer == null || RenderTypeLookup.canRenderInLayer(mimic, layer)) + { + IBakedModel model = Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelShapes().getModel(mimic); + try + { + return model.getQuads(mimic, side, rand, EmptyModelData.INSTANCE); + } catch (Exception e) + { + return Collections.emptyList(); + } + } + return Collections.emptyList(); + } + + if (side != null || (layer != null && !layer.equals(RenderType.getSolid()))) + { + return Collections.emptyList(); + } + + TextureAtlasSprite texture = getTexture(); + List quads = new ArrayList<>(); + double l = 0; + double r = 1; +// double l = .2; +// double r = 1 - .2; + quads.add(createQuad(v(l, r, l), v(l, r, r), v(r, r, r), v(r, r, l), texture)); + quads.add(createQuad(v(l, l, l), v(r, l, l), v(r, l, r), v(l, l, r), texture)); + quads.add(createQuad(v(r, r, r), v(r, l, r), v(r, l, l), v(r, r, l), texture)); + quads.add(createQuad(v(l, r, l), v(l, l, l), v(l, l, r), v(l, r, r), texture)); + quads.add(createQuad(v(r, r, l), v(r, l, l), v(l, l, l), v(l, r, l), texture)); + quads.add(createQuad(v(l, r, r), v(l, l, r), v(r, l, r), v(r, r, r), texture)); + + return quads; + } + + @Override + public boolean isAmbientOcclusion() + { + return true; + } + + @Override + public boolean isGui3d() + { + return false; + } + + @Override + public boolean isBuiltInRenderer() + { + return false; + } + + @Override + public TextureAtlasSprite getParticleTexture() + { + return getTexture(); + } + + @Override + public ItemOverrideList getOverrides() + { + return ItemOverrideList.EMPTY; + } + + @Override + public ItemCameraTransforms getItemCameraTransforms() + { + return ItemCameraTransforms.DEFAULT; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/client/model/MimicColor.java b/src/main/java/wayoftime/bloodmagic/client/model/MimicColor.java new file mode 100644 index 00000000..8ee567e7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/model/MimicColor.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.client.model; + +import javax.annotation.Nullable; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.color.IBlockColor; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockDisplayReader; +import wayoftime.bloodmagic.tile.TileMimic; + +public class MimicColor implements IBlockColor +{ + @Override + public int getColor(BlockState blockState, @Nullable IBlockDisplayReader world, @Nullable BlockPos pos, int tint) + { + TileEntity te = world.getTileEntity(pos); + if (te instanceof TileMimic) + { + TileMimic fancy = (TileMimic) te; + BlockState mimic = fancy.getMimic(); + if (mimic != null) + { + return Minecraft.getInstance().getBlockColors().getColor(mimic, world, pos, tint); + } + } + + return -1; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/client/model/MimicModelGeometry.java b/src/main/java/wayoftime/bloodmagic/client/model/MimicModelGeometry.java new file mode 100644 index 00000000..4324be2f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/model/MimicModelGeometry.java @@ -0,0 +1,39 @@ +package wayoftime.bloodmagic.client.model; + +import java.util.Collection; +import java.util.Collections; +import java.util.Set; + +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.model.IModelTransform; +import net.minecraft.client.renderer.model.IUnbakedModel; +import net.minecraft.client.renderer.model.ItemOverrideList; +import net.minecraft.client.renderer.model.ModelBakery; +import net.minecraft.client.renderer.model.RenderMaterial; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.IModelConfiguration; +import net.minecraftforge.client.model.geometry.IModelGeometry; + +public class MimicModelGeometry implements IModelGeometry +{ + public final ResourceLocation texture; + + public MimicModelGeometry(ResourceLocation texture) + { + this.texture = texture; + } + + @Override + public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery, java.util.function.Function spriteGetter, IModelTransform modelTransform, ItemOverrideList overrides, ResourceLocation modelLocation) + { + return new MimicBakedModel(texture); + } + + @Override + public Collection getTextures(IModelConfiguration owner, java.util.function.Function modelGetter, Set> missingTextureErrors) + { + return Collections.singletonList(new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, texture)); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/model/MimicModelLoader.java b/src/main/java/wayoftime/bloodmagic/client/model/MimicModelLoader.java new file mode 100644 index 00000000..6c14dfd1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/model/MimicModelLoader.java @@ -0,0 +1,30 @@ +package wayoftime.bloodmagic.client.model; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonObject; + +import net.minecraft.resources.IResourceManager; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.IModelLoader; + +public class MimicModelLoader implements IModelLoader +{ + public final ResourceLocation texture; + + public MimicModelLoader(ResourceLocation texture) + { + this.texture = texture; + } + + @Override + public void onResourceManagerReload(IResourceManager resourceManager) + { + + } + + @Override + public MimicModelGeometry read(JsonDeserializationContext deserializationContext, JsonObject modelContents) + { + return new MimicModelGeometry(texture); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/render/BloodMagicRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/BloodMagicRenderer.java new file mode 100644 index 00000000..2948f554 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/BloodMagicRenderer.java @@ -0,0 +1,104 @@ +package wayoftime.bloodmagic.client.render; + +import java.util.Arrays; + +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; + +public class BloodMagicRenderer +{ + public static float getRed(int color) + { + return (color >> 16 & 0xFF) / 255.0F; + } + + public static float getGreen(int color) + { + return (color >> 8 & 0xFF) / 255.0F; + } + + public static float getBlue(int color) + { + return (color & 0xFF) / 255.0F; + } + + public static float getAlpha(int color) + { + return (color >> 24 & 0xFF) / 255.0F; + } + + public static class Model3D + { + public double minX, minY, minZ; + public double maxX, maxY, maxZ; + + public final TextureAtlasSprite[] textures = new TextureAtlasSprite[6]; + + public final boolean[] renderSides = new boolean[] + { true, true, true, true, true, true, false }; + + public double sizeX() + { + return maxX - minX; + } + + public double sizeY() + { + return maxY - minY; + } + + public double sizeZ() + { + return maxZ - minZ; + } + + public void setSideRender(Direction side, boolean value) + { + renderSides[side.ordinal()] = value; + } + + public boolean shouldSideRender(Direction side) + { + return renderSides[side.ordinal()]; + } + + public void setTexture(TextureAtlasSprite tex) + { + Arrays.fill(textures, tex); + } + + public void setTextures(TextureAtlasSprite down, TextureAtlasSprite up, TextureAtlasSprite north, TextureAtlasSprite south, TextureAtlasSprite west, TextureAtlasSprite east) + { + textures[0] = down; + textures[1] = up; + textures[2] = north; + textures[3] = south; + textures[4] = west; + textures[5] = east; + } + } + + public static class Model2D + { + public double minX, minY; + public double maxX, maxY; + + public ResourceLocation resource; + + public double sizeX() + { + return maxX - minX; + } + + public double sizeY() + { + return maxY - minY; + } + + public void setTexture(ResourceLocation resource) + { + this.resource = resource; + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/RenderResizableCuboid.java b/src/main/java/wayoftime/bloodmagic/client/render/RenderResizableCuboid.java new file mode 100644 index 00000000..fbdb2e52 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/RenderResizableCuboid.java @@ -0,0 +1,162 @@ +package wayoftime.bloodmagic.client.render; + +import java.util.Arrays; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.math.vector.Matrix3f; +import net.minecraft.util.math.vector.Matrix4f; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.util.math.vector.Vector3i; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model3D; + +/** + * Adapted from BuildCraft + */ +public class RenderResizableCuboid +{ + public static final RenderResizableCuboid INSTANCE = new RenderResizableCuboid(); + private static final Vector3f VEC_ZERO = new Vector3f(0, 0, 0); + private static final int U_MIN = 0; + private static final int U_MAX = 1; + private static final int V_MIN = 2; + private static final int V_MAX = 3; + + protected EntityRendererManager manager = Minecraft.getInstance().getRenderManager(); + + private static Vector3f withValue(Vector3f vector, Axis axis, float value) + { + if (axis == Axis.X) + { + return new Vector3f(value, vector.getY(), vector.getZ()); + } else if (axis == Axis.Y) + { + return new Vector3f(vector.getX(), value, vector.getZ()); + } else if (axis == Axis.Z) + { + return new Vector3f(vector.getX(), vector.getY(), value); + } + throw new RuntimeException("Was given a null axis! That was probably not intentional, consider this a bug! (Vector = " + vector + ")"); + } + + public static double getValue(Vector3d vector, Axis axis) + { + if (axis == Axis.X) + { + return vector.x; + } else if (axis == Axis.Y) + { + return vector.y; + } else if (axis == Axis.Z) + { + return vector.z; + } + throw new RuntimeException("Was given a null axis! That was probably not intentional, consider this a bug! (Vector = " + vector + ")"); + } + + public void renderCube(Model3D cube, MatrixStack matrix, IVertexBuilder buffer, int argb, int light, int overlay) + { + float red = BloodMagicRenderer.getRed(argb); + float green = BloodMagicRenderer.getGreen(argb); + float blue = BloodMagicRenderer.getBlue(argb); + float alpha = BloodMagicRenderer.getAlpha(argb); + Vector3d size = new Vector3d(cube.sizeX(), cube.sizeY(), cube.sizeZ()); + matrix.push(); + matrix.translate(cube.minX, cube.minY, cube.minZ); + MatrixStack.Entry lastMatrix = matrix.getLast(); + Matrix4f matrix4f = lastMatrix.getMatrix(); + Matrix3f normal = lastMatrix.getNormal(); + for (Direction face : Direction.values()) + { + if (cube.shouldSideRender(face)) + { + int ordinal = face.ordinal(); + TextureAtlasSprite sprite = cube.textures[ordinal]; + if (sprite != null) + { + Axis u = face.getAxis() == Axis.X ? Axis.Z : Axis.X; + Axis v = face.getAxis() == Axis.Y ? Axis.Z : Axis.Y; + float other = face.getAxisDirection() == AxisDirection.POSITIVE + ? (float) getValue(size, face.getAxis()) + : 0; + + // Swap the face if this is positive: the renderer returns indexes that ALWAYS + // are for the negative face, so light it properly this way + face = face.getAxisDirection() == AxisDirection.NEGATIVE ? face : face.getOpposite(); + Direction opposite = face.getOpposite(); + + float minU = sprite.getMinU(); + float maxU = sprite.getMaxU(); + // Flip the v + float minV = sprite.getMaxV(); + float maxV = sprite.getMinV(); + double sizeU = getValue(size, u); + double sizeV = getValue(size, v); + // TODO: Look into this more, as it makes tiling of multiple objects not render + // properly if they don't fit the full texture. + // Example: Mechanical pipes rendering water or lava, makes it relatively easy + // to see the texture artifacts + for (int uIndex = 0; uIndex < sizeU; uIndex++) + { + float[] baseUV = new float[] { minU, maxU, minV, maxV }; + double addU = 1; + // If the size of the texture is greater than the cuboid goes on for then make + // sure the texture positions are lowered + if (uIndex + addU > sizeU) + { + addU = sizeU - uIndex; + baseUV[U_MAX] = baseUV[U_MIN] + (baseUV[U_MAX] - baseUV[U_MIN]) * (float) addU; + } + for (int vIndex = 0; vIndex < sizeV; vIndex++) + { + float[] uv = Arrays.copyOf(baseUV, 4); + double addV = 1; + if (vIndex + addV > sizeV) + { + addV = sizeV - vIndex; + uv[V_MAX] = uv[V_MIN] + (uv[V_MAX] - uv[V_MIN]) * (float) addV; + } + float[] xyz = new float[] { uIndex, (float) (uIndex + addU), vIndex, + (float) (vIndex + addV) }; + + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, true, false, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, true, true, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, false, true, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, false, false, red, green, blue, alpha, light, overlay); + + renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, false, false, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, false, true, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, true, true, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, true, false, red, green, blue, alpha, light, overlay); + } + } + } + } + } + matrix.pop(); + } + + private void renderPoint(Matrix4f matrix4f, Matrix3f normal, IVertexBuilder buffer, Direction face, Axis u, Axis v, float other, float[] uv, float[] xyz, boolean minU, boolean minV, float red, float green, float blue, float alpha, int light, int overlay) + { + int U_ARRAY = minU ? U_MIN : U_MAX; + int V_ARRAY = minV ? V_MIN : V_MAX; + Vector3f vertex = withValue(VEC_ZERO, u, xyz[U_ARRAY]); + vertex = withValue(vertex, v, xyz[V_ARRAY]); + vertex = withValue(vertex, face.getAxis(), other); + Vector3i normalForFace = face.getDirectionVec(); + // TODO: Figure out how and why this works, it gives about the same brightness + // as we used to have but I don't understand why/how + float adjustment = 2.5F; + Vector3f norm = new Vector3f(normalForFace.getX() + adjustment, normalForFace.getY() + adjustment, normalForFace.getZ() + adjustment); + norm.normalize(); + buffer.pos(matrix4f, vertex.getX(), vertex.getY(), vertex.getZ()).color(red, green, blue, alpha).tex(uv[U_ARRAY], uv[V_ARRAY]).overlay(overlay).lightmap(light).normal(normal, norm.getX(), norm.getY(), norm.getZ()).endVertex(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/render/RenderResizableQuadrilateral.java b/src/main/java/wayoftime/bloodmagic/client/render/RenderResizableQuadrilateral.java new file mode 100644 index 00000000..006b7f4f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/RenderResizableQuadrilateral.java @@ -0,0 +1,167 @@ +package wayoftime.bloodmagic.client.render; + +import java.util.Arrays; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Matrix3f; +import net.minecraft.util.math.vector.Matrix4f; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.util.math.vector.Vector3i; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; + +public class RenderResizableQuadrilateral +{ + public static final RenderResizableQuadrilateral INSTANCE = new RenderResizableQuadrilateral(); + private static final Vector3f VEC_ZERO = new Vector3f(0, 0, 0); + private static final int U_MIN = 0; + private static final int U_MAX = 1; + private static final int V_MIN = 2; + private static final int V_MAX = 3; + + protected EntityRendererManager manager = Minecraft.getInstance().getRenderManager(); + + private static Vector3f withValue(Vector3f vector, Axis axis, float value) + { + if (axis == Axis.X) + { + return new Vector3f(value, vector.getY(), vector.getZ()); + } else if (axis == Axis.Y) + { + return new Vector3f(vector.getX(), value, vector.getZ()); + } else if (axis == Axis.Z) + { + return new Vector3f(vector.getX(), vector.getY(), value); + } + throw new RuntimeException("Was given a null axis! That was probably not intentional, consider this a bug! (Vector = " + + vector + ")"); + } + + public static double getValue(Vector3d vector, Axis axis) + { + if (axis == Axis.X) + { + return vector.x; + } else if (axis == Axis.Y) + { + return vector.y; + } else if (axis == Axis.Z) + { + return vector.z; + } + throw new RuntimeException("Was given a null axis! That was probably not intentional, consider this a bug! (Vector = " + + vector + ")"); + } + + public void renderSquare(Model2D square, MatrixStack matrix, IVertexBuilder buffer, int argb, int light, int overlay) + { + float red = BloodMagicRenderer.getRed(argb); + float green = BloodMagicRenderer.getGreen(argb); + float blue = BloodMagicRenderer.getBlue(argb); + float alpha = BloodMagicRenderer.getAlpha(argb); + Vector3d size = new Vector3d(square.sizeX(), 0, square.sizeY()); + matrix.push(); + matrix.translate(square.minX, 0, square.minY); + MatrixStack.Entry lastMatrix = matrix.getLast(); + Matrix4f matrix4f = lastMatrix.getMatrix(); + Matrix3f normal = lastMatrix.getNormal(); + Direction face = Direction.UP; +// for (Direction face : Direction.values()) + + int ordinal = face.ordinal(); +// TextureAtlasSprite sprite = cube.textures[ordinal]; + ResourceLocation rl = square.resource; + if (rl != null) + { +// Minecraft.getInstance().textureManager.bindTexture(rl); + Axis u = face.getAxis() == Axis.X ? Axis.Z : Axis.X; + Axis v = face.getAxis() == Axis.Y ? Axis.Z : Axis.Y; + float other = face.getAxisDirection() == AxisDirection.POSITIVE ? (float) getValue(size, face.getAxis()) + : 0; + + // Swap the face if this is positive: the renderer returns indexes that ALWAYS + // are for the negative face, so light it properly this way + face = face.getAxisDirection() == AxisDirection.NEGATIVE ? face : face.getOpposite(); +// Direction opposite = face.getOpposite(); + + float minU = 0; + float maxU = 1; + // Flip the v + float minV = 1; + float maxV = 0; +// float minU = sprite.getMinU(); +// float maxU = sprite.getMaxU(); +// // Flip the v +// float minV = sprite.getMaxV(); +// float maxV = sprite.getMinV(); + double sizeU = getValue(size, u); + double sizeV = getValue(size, v); + // TODO: Look into this more, as it makes tiling of multiple objects not render + // properly if they don't fit the full texture. + // Example: Mechanical pipes rendering water or lava, makes it relatively easy + // to see the texture artifacts + for (int uIndex = 0; uIndex < sizeU; uIndex++) + { + float[] baseUV = new float[] + { minU, maxU, minV, maxV }; + double addU = 1; + // If the size of the texture is greater than the cuboid goes on for then make + // sure the texture positions are lowered + if (uIndex + addU > sizeU) + { +// addU = sizeU - uIndex; + baseUV[U_MAX] = baseUV[U_MIN] + (baseUV[U_MAX] - baseUV[U_MIN]) * (float) addU; + } + for (int vIndex = 0; vIndex < sizeV; vIndex++) + { + float[] uv = Arrays.copyOf(baseUV, 4); + double addV = 1; + if (vIndex + addV > sizeV) + { +// addV = sizeV - vIndex; + uv[V_MAX] = uv[V_MIN] + (uv[V_MAX] - uv[V_MIN]) * (float) addV; + } + float[] xyz = new float[] + { uIndex, (float) (uIndex + addU), vIndex, (float) (vIndex + addV) }; + + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, true, false, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, true, true, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, false, true, red, green, blue, alpha, light, overlay); + renderPoint(matrix4f, normal, buffer, face, u, v, other, uv, xyz, false, false, red, green, blue, alpha, light, overlay); + +// renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, false, false, red, green, blue, alpha, light, overlay); +// renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, false, true, red, green, blue, alpha, light, overlay); +// renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, true, true, red, green, blue, alpha, light, overlay); +// renderPoint(matrix4f, normal, buffer, opposite, u, v, other, uv, xyz, true, false, red, green, blue, alpha, light, overlay); + } + + } + } + matrix.pop(); + } + + private void renderPoint(Matrix4f matrix4f, Matrix3f normal, IVertexBuilder buffer, Direction face, Axis u, Axis v, float other, float[] uv, float[] xyz, boolean minU, boolean minV, float red, float green, float blue, float alpha, int light, int overlay) + { + int U_ARRAY = minU ? U_MIN : U_MAX; + int V_ARRAY = minV ? V_MIN : V_MAX; + Vector3f vertex = withValue(VEC_ZERO, u, xyz[U_ARRAY]); + vertex = withValue(vertex, v, xyz[V_ARRAY]); + vertex = withValue(vertex, face.getAxis(), other); + Vector3i normalForFace = face.getDirectionVec(); + // TODO: Figure out how and why this works, it gives about the same brightness + // as we used to have but I don't understand why/how + float adjustment = 2.5F; + Vector3f norm = new Vector3f(normalForFace.getX() + adjustment, normalForFace.getY() + + adjustment, normalForFace.getZ() + adjustment); + norm.normalize(); + buffer.pos(matrix4f, vertex.getX(), vertex.getY(), vertex.getZ()).color(red, green, blue, alpha).tex(uv[U_ARRAY], uv[V_ARRAY]).overlay(overlay).lightmap(light).normal(normal, norm.getX(), norm.getY(), norm.getZ()).endVertex(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/AlchemyArrayRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/AlchemyArrayRenderer.java new file mode 100644 index 00000000..3557df32 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/AlchemyArrayRenderer.java @@ -0,0 +1,115 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayRenderer +{ + public final ResourceLocation arrayResource; + + public AlchemyArrayRenderer() + { + this(new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/sightsigil.png")); + } + + public AlchemyArrayRenderer(ResourceLocation arrayResource) + { + this.arrayResource = arrayResource; + } + + public float getRotation(float craftTime) + { + float offset = 2; + if (craftTime >= offset) + { + float modifier = (float) Math.pow(craftTime - offset, 1.5); + return modifier * 1f; + } + return 0; + } + + public float getSecondaryRotation(float craftTime) + { + float offset = 50; + if (craftTime >= offset) + { + float modifier = (float) Math.pow(craftTime - offset, 1.7); + return modifier * 0.5f; + } + return 0; + } + + public float getSizeModifier(float craftTime) + { + if (craftTime >= 150 && craftTime <= 250) + { + return (200 - craftTime) / 50f; + } + return 1.0f; + } + + public float getVerticalOffset(float craftTime) + { + if (craftTime >= 5) + { + if (craftTime <= 40) + { + return (float) (-0.4 + (0.4) * Math.pow((craftTime - 5) / 35f, 3)); + } else + { + return 0; + } + } + return -0.4f; + } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + + float size = 1.0F * getSizeModifier(craftTime); + Direction rotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), secondaryRot, true)); + matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, 0x00F000F0, OverlayTexture.NO_OVERLAY); + + matrixStack.pop(); + matrixStack.pop(); + matrixStack.pop(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/BeaconAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/BeaconAlchemyCircleRenderer.java new file mode 100644 index 00000000..b5021539 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/BeaconAlchemyCircleRenderer.java @@ -0,0 +1,113 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class BeaconAlchemyCircleRenderer extends AlchemyArrayRenderer +{ + public BeaconAlchemyCircleRenderer(ResourceLocation arrayResource) + { + super(arrayResource); + } + + @Override + public float getRotation(float craftTime) + { + float offset = 2; + if (craftTime >= offset) + { + float modifier = (craftTime - offset) * 5f; + return modifier * 1f; + } + return 0; + } + + @Override + public float getSecondaryRotation(float craftTime) + { + float offset = 50; + float secondaryOffset = 150; + if (craftTime >= offset) + { + if (craftTime < secondaryOffset) + { + float modifier = 90 * (craftTime - offset) / (secondaryOffset - offset); + return modifier; + } else + { + return 90; + } + } + return 0; + } + + public float getSizeModifier(float craftTime) + { + return 1.0f; + } + +// public float getVerticalOffset(float craftTime) +// { +// if (craftTime >= 5) +// { +// if (craftTime <= 40) +// { +// return (float) (-0.4 + (0.4) * Math.pow((craftTime - 5) / 35f, 3)); +// } else +// { +// return 0; +// } +// } +// return -0.4f; +// } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + + float size = 1.0F * getSizeModifier(craftTime); + Direction rotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), -secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + +// RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0x000000FF, 0xFFFFFFFF, OverlayTexture.NO_OVERLAY); + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + matrixStack.pop(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/BindingAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/BindingAlchemyCircleRenderer.java new file mode 100644 index 00000000..1a79c19c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/BindingAlchemyCircleRenderer.java @@ -0,0 +1,229 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class BindingAlchemyCircleRenderer extends AlchemyArrayRenderer +{ + public static final int numberOfSweeps = 5; + public static final int startTime = 50; + public static final int sweepTime = 40; + public static final int inwardRotationTime = 50; + public static final float arcLength = (float) Math.sqrt(2 * (2 * 2) - 2 * 2 * 2 * Math.cos(2 * Math.PI * 2 / 5)); + public static final float theta2 = (float) (18f * Math.PI / 180f); + public static final int endTime = 300; + public final ResourceLocation[] arraysResources; + public float offsetFromFace = -0.9f; + + public BindingAlchemyCircleRenderer() + { + super(new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindingarray.png")); + arraysResources = new ResourceLocation[5]; + arraysResources[0] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png"); + arraysResources[1] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png"); + arraysResources[2] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png"); + arraysResources[3] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png"); + arraysResources[4] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png"); + } + + public float getRotation(int circle, float craftTime) + { + float offset = 2; + if (circle == -1 && craftTime >= offset) + { + return (craftTime - offset) * 360 * 2 / 5 / sweepTime; + } + if (craftTime >= offset) + { + float modifier = (float) Math.pow(craftTime - offset, 1.5); + return modifier * 0.5f; + } + return 0; + } + + public float getSecondaryRotation(int circle, float craftTime) + { + float offset = 50; + if (craftTime >= offset) + { + float modifier = (float) Math.pow(craftTime - offset, 1.7); + return modifier * 0.5f; + } + return 0; + } + + public float getVerticalOffset(int circle, float craftTime) + { + if (circle >= 0 && circle <= 4) + { + if (craftTime >= 5) + { + if (craftTime <= 40) + { + return (float) ((0.4) * Math.pow((craftTime - 5) / 35f, 3)); + } else + { + return 0.4f; + } + } + + return 0; + } + + if (craftTime >= 5) + { + if (craftTime <= 40) + { + return (float) ((0.4) * Math.pow((craftTime - 5) / 35f, 3)); + } else + { + return 0.4f; + } + } + return 0; + } + + public float getInwardRotation(int circle, float craftTime) + { + float offset = startTime + numberOfSweeps * sweepTime; + if (craftTime >= offset) + { + if (craftTime <= offset + inwardRotationTime) + { + return 90f / inwardRotationTime * (craftTime - offset); + } else + { + return 90; + } + } + + return 0; + } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(-1, craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + + float size = 3; + Direction dirRotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -dirRotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), rot, true)); +// matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, combinedLightIn, combinedOverlayIn); + + matrixStack.pop(); + + for (int i = 0; i < 5; i++) + { + matrixStack.push(); + + float newSize = 1; + float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(i, craftTime); + float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(i, craftTime); + float rotation = this.getRotation(i, craftTime); + + matrixStack.translate(distance * Math.sin(angle), this.getVerticalOffset(i, craftTime), -distance * Math.cos(angle)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), i * 360 / 5, true)); + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), getInwardRotation(i, craftTime), true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), rotation, true)); + twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arraysResources[i])); + arrayModel.resource = arraysResources[i]; + + matrixStack.scale(newSize, newSize, newSize); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, combinedLightIn, combinedOverlayIn); + + matrixStack.pop(); + } + + matrixStack.pop(); + matrixStack.pop(); + } + + public static float getAngleOfCircle(int circle, float craftTime) + { + if (circle >= 0 && circle <= 4) + { + float originalAngle = (float) (circle * 2 * Math.PI / 5d); + + double sweep = (craftTime - startTime) / sweepTime; + if (sweep >= 0 && sweep < numberOfSweeps) + { + float offset = ((int) sweep) * sweepTime + startTime; + originalAngle += 2 * Math.PI * 2 / 5 * (int) sweep + getAngle(craftTime - offset, (int) sweep); + } else if (sweep >= numberOfSweeps) + { + originalAngle += 2 * Math.PI * 2 / 5 * numberOfSweeps + (craftTime - 5 * sweepTime - startTime) * 2 * Math.PI * 2 / 5 / sweepTime; + } + + return originalAngle; + } + + return 0; + } + + public static float getAngle(float craftTime, int sweep) + { + float rDP = craftTime / sweepTime * arcLength; + float rEnd = (float) Math.sqrt(rDP * rDP + 2 * 2 - 2 * rDP * 2 * Math.cos(theta2)); + return (float) (Math.acos((2 * 2 + rEnd * rEnd - rDP * rDP) / (2 * rEnd * 2))); + } + + /** + * Returns the center-to-center distance of this circle. + */ + public static float getDistanceOfCircle(int circle, float craftTime) + { // TODO Change this so it doesn't use angle, since it is a constant speed. + double sweep = (craftTime - startTime) / sweepTime; + if (sweep >= 0 && sweep < numberOfSweeps) + { + float offset = ((int) sweep) * sweepTime + startTime; + float angle = getAngle(craftTime - offset, (int) sweep); + float thetaPrime = (float) (Math.PI - theta2 - angle); + // if(thetaPrime > 0 && thetaPrime < Math.PI) { + return (float) (2 * Math.sin(theta2) / Math.sin(thetaPrime)); + // } + } else if (sweep >= numberOfSweeps && craftTime < endTime) + { + return 2 - 2 * (craftTime - startTime - numberOfSweeps * sweepTime) / (endTime - startTime - numberOfSweeps * sweepTime); + } else if (craftTime >= endTime) + { + return 0; + } + + return 2; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/DayAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/DayAlchemyCircleRenderer.java new file mode 100644 index 00000000..4a2d37ec --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/DayAlchemyCircleRenderer.java @@ -0,0 +1,229 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class DayAlchemyCircleRenderer extends AlchemyArrayRenderer +{ + private final ResourceLocation spikesResource; + private final ResourceLocation circleResource; + + public DayAlchemyCircleRenderer(ResourceLocation arrayResource, ResourceLocation spikesResource, ResourceLocation circleResource) + { + super(arrayResource); + this.spikesResource = spikesResource; + this.circleResource = circleResource; + } + + @Override + public float getRotation(float craftTime) + { + return 0; + } + + public float getSecondaryRotation(float craftTime) + { + float offset = 2; + if (craftTime >= offset) + { + float modifier = (craftTime - offset) * (craftTime - offset) * 0.05f; + return modifier * 1f; + } + return 0; + } + + public float getVerticalOffset(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 100) + { + return (float) (-0.4 + (0.4) * Math.pow((craftTime - 40) / 60f, 3)); + } else + { + return 0; + } + } + return -0.4f; + } + + public float getSizeModifier(float craftTime) + { + return 1.0f; + } + + public float getSecondarySizeModifier(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 160) + { + return (float) ((2f) * Math.pow((craftTime - 40) / 120f, 3)); + } else + { + return 2; + } + } + + return 0; + } + + public float getTertiarySizeModifier(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 100) + { + return (float) ((1f) * Math.pow((craftTime - 40) / 60f, 3)); + } else + { + return 1; + } + } + + return 0; + } + + public float getSpikeVerticalOffset(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 100) + { + return (float) (-0.4 + (0.4) * Math.pow((craftTime - 40) / 60f, 3)); + } else if (craftTime <= 140) + { + return -0.01f * (craftTime - 100); + } else + { + return -0.4f; + } + } + return -0.4f; + } + + public float getCentralCircleOffset(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 100) + { + return (float) (-0.4 + (0.4) * Math.pow((craftTime - 40) / 60f, 3)); + } else if (craftTime <= 140) + { + return 0.01f * (craftTime - 100); + } else + { + return 0.4f; + } + } + return -0.4f; + } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + + float size = 1.0F * getSizeModifier(craftTime); + Direction rotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + + matrixStack.push(); + matrixStack.translate(0, getSpikeVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(spikesResource)); + arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = spikesResource; + + float secondarySize = 1.0F * getSecondarySizeModifier(craftTime); + + matrixStack.scale(secondarySize, secondarySize, secondarySize); + + int colorWanted = 0xFFFFFFFF; + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, colorWanted, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + + matrixStack.push(); + matrixStack.translate(0, getCentralCircleOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(circleResource)); + arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = circleResource; + + float tertiarySize = 1.0F * getTertiarySizeModifier(craftTime); + + matrixStack.scale(tertiarySize, tertiarySize, tertiarySize); + + colorWanted = 0xFFFFFFFF; + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, colorWanted, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + matrixStack.pop(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/LowAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/LowAlchemyCircleRenderer.java new file mode 100644 index 00000000..5e7e4724 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/LowAlchemyCircleRenderer.java @@ -0,0 +1,23 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; + +public class LowAlchemyCircleRenderer extends SingleAlchemyCircleRenderer +{ + public LowAlchemyCircleRenderer() + { + this(BloodMagic.rl("textures/models/AlchemyArrays/SkeletonTurret1.png")); + } + + public LowAlchemyCircleRenderer(ResourceLocation arrayResource) + { + super(arrayResource); + } + + @Override + public float getVerticalOffset(float craftTime) + { + return -0.4f; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/LowStaticAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/LowStaticAlchemyCircleRenderer.java new file mode 100644 index 00000000..ce9c1668 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/LowStaticAlchemyCircleRenderer.java @@ -0,0 +1,36 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; + +public class LowStaticAlchemyCircleRenderer extends LowAlchemyCircleRenderer +{ + public LowStaticAlchemyCircleRenderer() + { + this(BloodMagic.rl("textures/models/AlchemyArrays/SkeletonTurret1.png")); + } + + public LowStaticAlchemyCircleRenderer(ResourceLocation arrayResource) + { + super(arrayResource); + } + + @Override + public float getRotation(float craftTime) + { + + return 0; + } + + public float getSecondaryRotation(float craftTime) + { + float offset = 2; + float duration = 180; + if (craftTime >= offset && craftTime < offset + duration) + { + float modifier = (craftTime - offset) * 2f; + return modifier * 1f; + } + return 0; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/NightAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/NightAlchemyCircleRenderer.java new file mode 100644 index 00000000..64f59611 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/NightAlchemyCircleRenderer.java @@ -0,0 +1,327 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class NightAlchemyCircleRenderer extends AlchemyArrayRenderer +{ + private final ResourceLocation symbolResource; + private final ResourceLocation circleResource; + + public NightAlchemyCircleRenderer(ResourceLocation arrayResource, ResourceLocation symbolResource, ResourceLocation circleResource) + { + super(arrayResource); + this.symbolResource = symbolResource; + this.circleResource = circleResource; + } + + @Override + public float getRotation(float craftTime) + { + return 0; + } + + public float getSecondaryRotation(float craftTime) + { + float offset = 2; + if (craftTime >= offset) + { + float modifier = (craftTime - offset) * (craftTime - offset) * 0.05f; + return modifier * 1f; + } + return 0; + } + + public float getTertiaryRotation(float craftTime) + { + float offset = 60; + if (craftTime >= offset) + { + float modifier = (craftTime - offset) * (craftTime - offset) * 0.15f; + return modifier * 1f; + } + return 0; + } + + public float getVerticalOffset(float craftTime) + { +// if (craftTime >= 40) +// { +// if (craftTime <= 100) +// { +// return (float) (-0.4 + (0.4) * Math.pow((craftTime - 40) / 60f, 3)); +// } else +// { +// return 0; +// } +// } + return -0.4f; + } + + public float getSizeModifier(float craftTime) + { + return 1.0f; + } + + public float getSecondarySizeModifier(float craftTime) + { + if (craftTime >= 100) + { + if (craftTime <= 160) + { + return (float) ((1f) * Math.pow((craftTime - 100) / 60f, 3)) + 1f; + } else + { + return 2; + } + } + return 1.0f; + } + + public float getTertiarySizeModifier(float craftTime) + { + return 1; + } + + public float getSymbolVerticaloffset(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 100) + { + return (float) (-0.4 + (0.4) * Math.pow((craftTime - 40) / 60f, 3)); + } else if (craftTime <= 140) + { + return 0.01f * (craftTime - 100); + } else + { + return 0.4f; + } + } + + return -0.4f; + } + + public float getCentralCircleOffset(float craftTime) + { + if (craftTime >= 40) + { + if (craftTime <= 100) + { + return (float) (-0.4 + (0.4) * Math.pow((craftTime - 40) / 60f, 3)); + } else + { + return 0; + } + } + + return -0.4f; + } + + public float getSymbolPitch(float craftTime) + { + if (craftTime > 70) + { + if (craftTime <= 100) + { + return 90 * (craftTime - 70) / 30f; + } else + { + return 90; + } + } + return 0; + } + + public float getCentralCirclePitch(float craftTime) + { + if (craftTime > 70) + { + if (craftTime <= 150) + { + return 360 * (craftTime - 70) / 80f; + } else + { + return 360; + } + } + return 0; + } + + public float moonDisplacement(float craftTime) + { + if (craftTime > 40) + { + if (craftTime <= 100) + { + return (float) (2 * Math.pow((craftTime - 40) / 60f, 3)); + } else + { + return 2; + } + } + return 0; + } + + public float moonArc(float craftTime) + { + if (craftTime > 100) + { + if (craftTime <= 200) + { + return 180 * (craftTime - 100) / 100f; + } else + { + return 180; + } + } + + return 0; + } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + float tertiaryRot = getTertiaryRotation(craftTime); + + float size = 1.0F * getSizeModifier(craftTime); + Direction rotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + +// matrixStack.push(); +// matrixStack.translate(0, getSymbolVerticaloffset(craftTime), 0); +// matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); +// +// matrixStack.push(); +// + float pitch = getSymbolPitch(craftTime); +// matrixStack.rotate(new Quaternion(Direction.WEST.toVector3f(), pitch, true)); +// matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), tertiaryRot, true)); +//// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); +// +// twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(symbolResource)); +// arrayModel = new BloodMagicRenderer.Model2D(); +// arrayModel.minX = -0.5; +// arrayModel.maxX = +0.5; +// arrayModel.minY = -0.5; +// arrayModel.maxY = +0.5; +// arrayModel.resource = symbolResource; +// + float secondarySize = 1.0F * getSecondarySizeModifier(craftTime); +// +// matrixStack.scale(secondarySize, secondarySize, secondarySize); +// + int colorWanted = 0xFFFFFFFF; +// +// RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, colorWanted, 0x00F000F0, combinedOverlayIn); +// +// matrixStack.pop(); +// matrixStack.pop(); + + matrixStack.push(); + matrixStack.translate(0, getCentralCircleOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + pitch = getCentralCirclePitch(craftTime); + matrixStack.rotate(new Quaternion(Direction.WEST.toVector3f(), pitch, true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(circleResource)); + arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = circleResource; + + float tertiarySize = 1.0F * getTertiarySizeModifier(craftTime); + + matrixStack.scale(tertiarySize, tertiarySize, tertiarySize); + + colorWanted = 0xFFFFFFFF; + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, colorWanted, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + + // Moon going over the array + + matrixStack.push(); + matrixStack.translate(0, getCentralCircleOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + matrixStack.rotate(new Quaternion(Direction.SOUTH.toVector3f(), moonArc(craftTime), true)); + matrixStack.translate(moonDisplacement(craftTime), 0, 0); + + matrixStack.push(); + + pitch = getSymbolPitch(craftTime); + + matrixStack.rotate(new Quaternion(Direction.WEST.toVector3f(), pitch, true)); + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), tertiaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(symbolResource)); + arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = symbolResource; + + secondarySize = 1.0F; + + matrixStack.scale(secondarySize, secondarySize, secondarySize); + + colorWanted = 0xFFFFFFFF; + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, colorWanted, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + + matrixStack.pop(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/SingleAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/SingleAlchemyCircleRenderer.java new file mode 100644 index 00000000..ff6ff63a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/SingleAlchemyCircleRenderer.java @@ -0,0 +1,83 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class SingleAlchemyCircleRenderer extends AlchemyArrayRenderer +{ + public SingleAlchemyCircleRenderer(ResourceLocation arrayResource) + { + super(arrayResource); + } + + @Override + public float getRotation(float craftTime) + { + float offset = 2; + if (craftTime >= offset) + { + float modifier = (craftTime - offset) * 2f; + return modifier * 1f; + } + return 0; + } + + public float getSecondaryRotation(float craftTime) + { + return 0; + } + + public float getSizeModifier(float craftTime) + { + return 1.0f; + } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + + float size = 1.0F * getSizeModifier(craftTime); + Direction rotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), rot, true)); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, 0x00F000F0, combinedOverlayIn); + + matrixStack.pop(); + matrixStack.pop(); + matrixStack.pop(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/StaticAlchemyCircleRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/StaticAlchemyCircleRenderer.java new file mode 100644 index 00000000..a7650134 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/alchemyarray/StaticAlchemyCircleRenderer.java @@ -0,0 +1,98 @@ +package wayoftime.bloodmagic.client.render.alchemyarray; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Quaternion; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D; +import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class StaticAlchemyCircleRenderer extends AlchemyArrayRenderer +{ + public StaticAlchemyCircleRenderer(ResourceLocation arrayResource) + { + super(arrayResource); + } + + public float getRotation(float craftTime) + { + float offset = 50; + if (craftTime >= offset) + { + float modifier = (float) (craftTime - offset) * 5f; + return modifier * 1f; + } + return 0; + } + + public float getSecondaryRotation(float craftTime) + { + return 0; + } + + public float getSizeModifier(float craftTime) + { + return 1.0f; + } + +// public float getVerticalOffset(float craftTime) +// { +// if (craftTime >= 5) +// { +// if (craftTime <= 40) +// { +// return (float) (-0.4 + (0.4) * Math.pow((craftTime - 5) / 35f, 3)); +// } else +// { +// return 0; +// } +// } +// return -0.4f; +// } + + public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + + matrixStack.translate(0.5, 0.5, 0.5); + + float rot = getRotation(craftTime); + float secondaryRot = getSecondaryRotation(craftTime); + + float size = 1.0F * getSizeModifier(craftTime); + Direction rotation = tileArray.getRotation(); + + matrixStack.push(); + matrixStack.translate(0, getVerticalOffset(craftTime), 0); + matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -rotation.getHorizontalAngle(), true)); + + matrixStack.push(); + + matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), rot, true)); +// matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), secondaryRot, true)); +// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true)); + + IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource)); + Model2D arrayModel = new BloodMagicRenderer.Model2D(); + arrayModel.minX = -0.5; + arrayModel.maxX = +0.5; + arrayModel.minY = -0.5; + arrayModel.maxY = +0.5; + arrayModel.resource = arrayResource; + + matrixStack.scale(size, size, size); + + RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, 0x00F000F0, OverlayTexture.NO_OVERLAY); + + matrixStack.pop(); + matrixStack.pop(); + matrixStack.pop(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/block/RenderAlchemyArray.java b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderAlchemyArray.java new file mode 100644 index 00000000..83a9e972 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderAlchemyArray.java @@ -0,0 +1,43 @@ +package wayoftime.bloodmagic.client.render.block; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.item.ItemStack; +import wayoftime.bloodmagic.client.render.alchemyarray.AlchemyArrayRenderer; +import wayoftime.bloodmagic.core.registry.AlchemyArrayRendererRegistry; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class RenderAlchemyArray extends TileEntityRenderer +{ + public static final AlchemyArrayRenderer arrayRenderer = new AlchemyArrayRenderer(); + + public RenderAlchemyArray(TileEntityRendererDispatcher rendererDispatcherIn) + { + super(rendererDispatcherIn); + } + + @Override + public void render(TileAlchemyArray tileArray, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) + { + ItemStack inputStack = tileArray.getStackInSlot(0); + ItemStack catalystStack = tileArray.getStackInSlot(1); +// arrayRenderer.renderAt(tileArray, 0, 0, 0, tileArray.activeCounter +// + partialTicks, matrixStack, buffer, combinedLightIn, combinedOverlayIn); + + AlchemyArrayRenderer renderer = AlchemyArrayRendererRegistry.getRenderer(tileArray.getWorld(), inputStack, catalystStack); + if (renderer == null) + { + renderer = AlchemyArrayRendererRegistry.DEFAULT_RENDERER; + } + + renderer.renderAt(tileArray, 0, 0, 0, tileArray.activeCounter + + partialTicks, matrixStack, buffer, combinedLightIn, combinedOverlayIn); +// arrayRenderer.renderAt(tileArray, 0, 0, 0, 0, matrixStack, buffer, combinedLightIn, combinedOverlayIn); + +// if (tileAltar.getCurrentTierDisplayed() != AltarTier.ONE) +// renderHologram(tileAltar, tileAltar.getCurrentTierDisplayed(), partialTicks); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/block/RenderAltar.java b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderAltar.java new file mode 100644 index 00000000..10aca891 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderAltar.java @@ -0,0 +1,233 @@ +package wayoftime.bloodmagic.client.render.block; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.Atlases; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.model.ItemCameraTransforms; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.entity.LivingEntity; +import net.minecraft.fluid.Fluid; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3f; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model3D; +import wayoftime.bloodmagic.client.render.RenderResizableCuboid; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.tile.TileAltar; + +public class RenderAltar extends TileEntityRenderer +{ + public RenderAltar(TileEntityRendererDispatcher rendererDispatcherIn) + { + super(rendererDispatcherIn); + } + + private static final float MIN_HEIGHT = 0.499f; + private static final float MAX_HEIGHT = 0.745f; + + @Override + public void render(TileAltar tileAltar, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) + { + ItemStack inputStack = tileAltar.getStackInSlot(0); + + float level = ((float) tileAltar.getCurrentBlood()) / (float) tileAltar.getCapacity(); + + this.renderItem(inputStack, tileAltar, matrixStack, buffer, combinedLightIn, combinedOverlayIn); + + renderFluid(level, matrixStack, buffer, combinedLightIn, combinedOverlayIn); + +// if (tileAltar.getCurrentTierDisplayed() != AltarTier.ONE) +// renderHologram(tileAltar, tileAltar.getCurrentTierDisplayed(), partialTicks); + } + + private void renderFluid(float fluidLevel, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn) + { + Fluid fluid = BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(); + FluidStack fluidStack = new FluidStack(fluid, 1000); + + FluidRenderData data = new FluidRenderData(fluidStack); + matrixStack.push(); + + Model3D model = getFluidModel(fluidLevel, data); + IVertexBuilder buffer = renderer.getBuffer(Atlases.getTranslucentCullBlockType()); + +// matrixStack.translate(data.loca, y, z); +// int glow = data.calculateGlowLight(0); + RenderResizableCuboid.INSTANCE.renderCube(model, matrixStack, buffer, data.getColorARGB(1), combinedLightIn, combinedOverlayIn); + + matrixStack.pop(); + } + + private void renderItem(ItemStack stack, TileAltar tileAltar, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + Minecraft mc = Minecraft.getInstance(); + ItemRenderer itemRenderer = mc.getItemRenderer(); + if (!stack.isEmpty()) + { + matrixStack.translate(0.5, 1, 0.5); + matrixStack.push(); + + float rotation = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); + + matrixStack.rotate(Vector3f.YP.rotationDegrees(rotation)); + matrixStack.scale(0.5F, 0.5F, 0.5F); + RenderHelper.enableStandardItemLighting(); + IBakedModel ibakedmodel = itemRenderer.getItemModelWithOverrides(stack, tileAltar.getWorld(), (LivingEntity) null); + itemRenderer.renderItem(stack, ItemCameraTransforms.TransformType.FIXED, true, matrixStack, buffer, combinedLightIn, combinedOverlayIn, ibakedmodel); // renderItem + RenderHelper.disableStandardItemLighting(); + + matrixStack.pop(); + } + + matrixStack.pop(); + } + + private Model3D getFluidModel(float fluidLevel, FluidRenderData data) + { + Model3D model = new BloodMagicRenderer.Model3D(); + model.setTexture(data.getTexture()); + model.minX = 0.1; + model.minY = MIN_HEIGHT; + model.minZ = 0.1; + model.maxX = 0.9; + model.maxY = (MAX_HEIGHT - MIN_HEIGHT) * fluidLevel + MIN_HEIGHT; + model.maxZ = 0.9; + + return model; + } + + public class FluidRenderData + { + public BlockPos location; + + public int height; + public int length; + public int width; + + public final FluidStack fluidType; + + public FluidRenderData(FluidStack fluidType) + { + this.fluidType = fluidType; + } + + public TextureAtlasSprite getTexture() + { + return Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(fluidType.getFluid().getAttributes().getStillTexture()); + } + + public boolean isGaseous() + { + return fluidType.getFluid().getAttributes().isGaseous(fluidType); + } + + public int getColorARGB(float scale) + { + return fluidType.getFluid().getAttributes().getColor(fluidType); + } + + public int calculateGlowLight(int light) + { + return light; + } + + @Override + public int hashCode() + { + int code = super.hashCode(); + code = 31 * code + fluidType.getFluid().getRegistryName().hashCode(); + if (fluidType.hasTag()) + { + code = 31 * code + fluidType.getTag().hashCode(); + } + return code; + } + + @Override + public boolean equals(Object data) + { + return super.equals(data) && data instanceof FluidRenderData + && fluidType.isFluidEqual(((FluidRenderData) data).fluidType); + } + } +// +// private void renderHologram(TileAltar altar, AltarTier tier, float partialTicks) +// { +// EntityPlayerSP player = Minecraft.getMinecraft().player; +// World world = player.world; +// +// if (tier == AltarTier.ONE) +// return; +// +// GlStateManager.pushMatrix(); +// GlStateManager.enableBlend(); +// GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); +// GlStateManager.color(1F, 1F, 1F, 0.6125F); +// +// BlockPos vec3, vX; +// vec3 = altar.getPos(); +// double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks; +// double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks; +// double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks; +// +// for (AltarComponent altarComponent : tier.getAltarComponents()) +// { +// vX = vec3.add(altarComponent.getOffset()); +// double minX = vX.getX() - posX; +// double minY = vX.getY() - posY; +// double minZ = vX.getZ() - posZ; +// +// if (!world.getBlockState(vX).isOpaqueCube()) +// { +// TextureAtlasSprite texture = null; +// +// switch (altarComponent.getComponent()) +// { +// case BLOODRUNE: +// texture = ClientHandler.blankBloodRune; +// break; +// case NOTAIR: +// texture = ClientHandler.stoneBrick; +// break; +// case GLOWSTONE: +// texture = ClientHandler.glowstone; +// break; +// case BLOODSTONE: +// texture = ClientHandler.bloodStoneBrick; +// break; +// case BEACON: +// texture = ClientHandler.beacon; +// break; +// case CRYSTAL: +// texture = ClientHandler.crystalCluster; +// break; +// } +// +// RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ); +// } +// } +// +// GlStateManager.popMatrix(); +// } + +// private static void setGLColorFromInt(int color) +// { +// float red = (color >> 16 & 0xFF) / 255.0F; +// float green = (color >> 8 & 0xFF) / 255.0F; +// float blue = (color & 0xFF) / 255.0F; +// +// GlStateManager.color(red, green, blue, 1.0F); +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/block/RenderDemonCrucible.java b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderDemonCrucible.java new file mode 100644 index 00000000..6e5c4f1c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderDemonCrucible.java @@ -0,0 +1,57 @@ +package wayoftime.bloodmagic.client.render.block; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.model.ItemCameraTransforms; +import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.entity.LivingEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.vector.Vector3f; +import wayoftime.bloodmagic.tile.TileDemonCrucible; + +public class RenderDemonCrucible extends TileEntityRenderer +{ + public RenderDemonCrucible(TileEntityRendererDispatcher rendererDispatcherIn) + { + super(rendererDispatcherIn); + } + + @Override + public void render(TileDemonCrucible tileAltar, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) + { + ItemStack inputStack = tileAltar.getStackInSlot(0); + + this.renderItem(inputStack, tileAltar, matrixStack, buffer, combinedLightIn, combinedOverlayIn); + } + + private void renderItem(ItemStack stack, TileDemonCrucible tileAltar, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) + { + matrixStack.push(); + Minecraft mc = Minecraft.getInstance(); + ItemRenderer itemRenderer = mc.getItemRenderer(); + if (!stack.isEmpty()) + { + matrixStack.translate(0.5, 1.5, 0.5); + matrixStack.push(); + + float rotation = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); + + matrixStack.rotate(Vector3f.YP.rotationDegrees(rotation)); + matrixStack.scale(0.5F, 0.5F, 0.5F); + RenderHelper.enableStandardItemLighting(); + IBakedModel ibakedmodel = itemRenderer.getItemModelWithOverrides(stack, tileAltar.getWorld(), (LivingEntity) null); + itemRenderer.renderItem(stack, ItemCameraTransforms.TransformType.FIXED, true, matrixStack, buffer, combinedLightIn, combinedOverlayIn, ibakedmodel); // renderItem + RenderHelper.disableStandardItemLighting(); + + matrixStack.pop(); + } + + matrixStack.pop(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/block/RenderFakeBlocks.java b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderFakeBlocks.java new file mode 100644 index 00000000..50f5a5f2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/block/RenderFakeBlocks.java @@ -0,0 +1,66 @@ +package wayoftime.bloodmagic.client.render.block; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; + +public class RenderFakeBlocks +{ + public static void drawFakeBlock(TextureAtlasSprite texture, double minX, double minY, double minZ) + { + if (texture == null) + return; + + double maxX = minX + 1; + double maxY = minY + 1; + double maxZ = minZ + 1; + Tessellator tessellator = Tessellator.getInstance(); + BufferBuilder wr = tessellator.getBuffer(); + + Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(texture.getName()); + + wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); + + float texMinU = texture.getMinU(); + float texMinV = texture.getMinV(); + float texMaxU = texture.getMaxU(); + float texMaxV = texture.getMaxV(); + + wr.pos(minX, minY, minZ).tex(texMinU, texMinV).endVertex(); + wr.pos(maxX, minY, minZ).tex(texMaxU, texMinV).endVertex(); + wr.pos(maxX, minY, maxZ).tex(texMaxU, texMaxV).endVertex(); + wr.pos(minX, minY, maxZ).tex(texMinU, texMaxV).endVertex(); + + wr.pos(minX, maxY, maxZ).tex(texMinU, texMaxV).endVertex(); + wr.pos(maxX, maxY, maxZ).tex(texMaxU, texMaxV).endVertex(); + wr.pos(maxX, maxY, minZ).tex(texMaxU, texMinV).endVertex(); + wr.pos(minX, maxY, minZ).tex(texMinU, texMinV).endVertex(); + + wr.pos(maxX, minY, minZ).tex(texMinU, texMaxV).endVertex(); + wr.pos(minX, minY, minZ).tex(texMaxU, texMaxV).endVertex(); + wr.pos(minX, maxY, minZ).tex(texMaxU, texMinV).endVertex(); + wr.pos(maxX, maxY, minZ).tex(texMinU, texMinV).endVertex(); + + wr.pos(minX, minY, maxZ).tex(texMinU, texMaxV).endVertex(); + wr.pos(maxX, minY, maxZ).tex(texMaxU, texMaxV).endVertex(); + wr.pos(maxX, maxY, maxZ).tex(texMaxU, texMinV).endVertex(); + wr.pos(minX, maxY, maxZ).tex(texMinU, texMinV).endVertex(); + + wr.pos(minX, minY, minZ).tex(texMinU, texMaxV).endVertex(); + wr.pos(minX, minY, maxZ).tex(texMaxU, texMaxV).endVertex(); + wr.pos(minX, maxY, maxZ).tex(texMaxU, texMinV).endVertex(); + wr.pos(minX, maxY, minZ).tex(texMinU, texMinV).endVertex(); + + wr.pos(maxX, minY, maxZ).tex(texMinU, texMaxV).endVertex(); + wr.pos(maxX, minY, minZ).tex(texMaxU, texMaxV).endVertex(); + wr.pos(maxX, maxY, minZ).tex(texMaxU, texMinV).endVertex(); + wr.pos(maxX, maxY, maxZ).tex(texMinU, texMinV).endVertex(); + + tessellator.draw(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/entity/BloodLightRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/entity/BloodLightRenderer.java new file mode 100644 index 00000000..23609445 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/entity/BloodLightRenderer.java @@ -0,0 +1,24 @@ +package wayoftime.bloodmagic.client.render.entity; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.entity.SpriteRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.IRendersAsItem; + +public class BloodLightRenderer extends SpriteRenderer +{ + public BloodLightRenderer(EntityRendererManager renderManagerIn) + { + super(renderManagerIn, Minecraft.getInstance().getItemRenderer()); + } + + @Override + public void render(T entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) + { + super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityShapedChargeRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityShapedChargeRenderer.java new file mode 100644 index 00000000..c27ad2ec --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityShapedChargeRenderer.java @@ -0,0 +1,68 @@ +package wayoftime.bloodmagic.client.render.entity; + +import java.util.Random; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderTypeLookup; +import net.minecraft.client.renderer.entity.EntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge; + +@OnlyIn(Dist.CLIENT) +public class EntityShapedChargeRenderer extends EntityRenderer +{ + public EntityShapedChargeRenderer(EntityRendererManager renderManagerIn) + { + super(renderManagerIn); + this.shadowSize = 0.5F; + } + + public void render(EntityShapedCharge entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) + { +// System.out.println("Testing~"); + BlockState blockstate = entityIn.getBlockState(); + if (blockstate.getRenderType() == BlockRenderType.MODEL) + { + World world = entityIn.getWorldObj(); + if (blockstate != world.getBlockState(entityIn.getPosition()) && blockstate.getRenderType() != BlockRenderType.INVISIBLE) + { + matrixStackIn.push(); + BlockPos blockpos = new BlockPos(entityIn.getPosX(), entityIn.getBoundingBox().maxY, entityIn.getPosZ()); + matrixStackIn.translate(-0.5D, 0.0D, -0.5D); + BlockRendererDispatcher blockrendererdispatcher = Minecraft.getInstance().getBlockRendererDispatcher(); + for (net.minecraft.client.renderer.RenderType type : net.minecraft.client.renderer.RenderType.getBlockRenderTypes()) + { + if (RenderTypeLookup.canRenderInLayer(blockstate, type)) + { + net.minecraftforge.client.ForgeHooksClient.setRenderLayer(type); + blockrendererdispatcher.getBlockModelRenderer().renderModel(world, blockrendererdispatcher.getModelForState(blockstate), blockstate, blockpos, matrixStackIn, bufferIn.getBuffer(type), false, new Random(), 0, OverlayTexture.NO_OVERLAY); + } + } + net.minecraftforge.client.ForgeHooksClient.setRenderLayer(null); + matrixStackIn.pop(); + super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); + } + } + } + + /** + * Returns the location of an entity's texture. + */ + public ResourceLocation getEntityTexture(EntityShapedCharge entity) + { + return AtlasTexture.LOCATION_BLOCKS_TEXTURE; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityThrowingDaggerRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityThrowingDaggerRenderer.java new file mode 100644 index 00000000..62ec2118 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityThrowingDaggerRenderer.java @@ -0,0 +1,67 @@ +package wayoftime.bloodmagic.client.render.entity; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.entity.EntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.model.ItemCameraTransforms; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.vector.Vector3f; +import wayoftime.bloodmagic.entity.projectile.AbstractEntityThrowingDagger; + +public class EntityThrowingDaggerRenderer extends EntityRenderer +{ + private final net.minecraft.client.renderer.ItemRenderer itemRenderer; + private final float scale; + private final boolean field_229126_f_; + + public EntityThrowingDaggerRenderer(EntityRendererManager p_i226035_1_, net.minecraft.client.renderer.ItemRenderer p_i226035_2_, float p_i226035_3_, boolean p_i226035_4_) + { + super(p_i226035_1_); + this.itemRenderer = p_i226035_2_; + this.scale = p_i226035_3_; + this.field_229126_f_ = p_i226035_4_; + } + + public EntityThrowingDaggerRenderer(EntityRendererManager renderManagerIn) + { + this(renderManagerIn, Minecraft.getInstance().getItemRenderer(), 1.0F, false); + } + + protected int getBlockLight(T entityIn, BlockPos partialTicks) + { + return this.field_229126_f_ ? 15 : super.getBlockLight(entityIn, partialTicks); + } + + public void render(T entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) + { +// System.out.println("Rendering dagger"); +// if (entityIn.ticksExisted >= 2 || !(this.renderManager.info.getRenderViewEntity().getDistanceSq(entityIn) < 12.25D)) + { +// ArrowRenderer d; + matrixStackIn.push(); + matrixStackIn.scale(this.scale, this.scale, this.scale); + matrixStackIn.rotate(Vector3f.YP.rotationDegrees(MathHelper.lerp(partialTicks, entityIn.prevRotationYaw, entityIn.rotationYaw) - 90.0F)); + matrixStackIn.rotate(Vector3f.ZP.rotationDegrees(MathHelper.lerp(partialTicks, entityIn.prevRotationPitch, entityIn.rotationPitch) - 45F)); + + this.itemRenderer.renderItem(entityIn.getItem(), ItemCameraTransforms.TransformType.GROUND, packedLightIn, OverlayTexture.NO_OVERLAY, matrixStackIn, bufferIn); + matrixStackIn.pop(); + super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); + } + } + + /** + * Returns the location of an entity's texture. + */ + public ResourceLocation getEntityTexture(T entity) + { + return AtlasTexture.LOCATION_BLOCKS_TEXTURE; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/client/render/entity/SoulSnareRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/entity/SoulSnareRenderer.java new file mode 100644 index 00000000..f2084b34 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/entity/SoulSnareRenderer.java @@ -0,0 +1,24 @@ +package wayoftime.bloodmagic.client.render.entity; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.entity.SpriteRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.IRendersAsItem; + +public class SoulSnareRenderer extends SpriteRenderer +{ + public SoulSnareRenderer(EntityRendererManager renderManagerIn) + { + super(renderManagerIn, Minecraft.getInstance().getItemRenderer()); + } + + @Override + public void render(T entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) + { + super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/screens/ScreenAlchemicalReactionChamber.java b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenAlchemicalReactionChamber.java new file mode 100644 index 00000000..eb26c582 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenAlchemicalReactionChamber.java @@ -0,0 +1,108 @@ +package wayoftime.bloodmagic.client.screens; + +import java.util.ArrayList; +import java.util.List; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraftforge.fml.client.gui.GuiUtils; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.tile.TileAlchemicalReactionChamber; +import wayoftime.bloodmagic.tile.container.ContainerAlchemicalReactionChamber; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; + +public class ScreenAlchemicalReactionChamber extends ScreenBase +{ + private static final ResourceLocation background = new ResourceLocation(BloodMagic.MODID, "textures/gui/arc_gui.png"); + public TileAlchemicalReactionChamber tileARC; + + public ScreenAlchemicalReactionChamber(ContainerAlchemicalReactionChamber container, PlayerInventory playerInventory, ITextComponent title) + { + super(container, playerInventory, title); + tileARC = container.tileARC; + this.xSize = 176; + this.ySize = 205; + } + + @Override + public ResourceLocation getBackground() + { + return background; + } + +// public + +// public ScreenSoulForge(InventoryPlayer playerInventory, IInventory tileSoulForge) +// { +// super(new ContainerSoulForge(playerInventory, tileSoulForge)); +// this.tileSoulForge = tileSoulForge; +// this.xSize = 176; +// this.ySize = 205; +// } +// + @Override + public void render(MatrixStack stack, int mouseX, int mouseY, float partialTicks) + { + super.render(stack, mouseX, mouseY, partialTicks); + List tooltip = new ArrayList<>(); +// FluidTank inputTank = new FluidTank(FluidAttributes.BUCKET_VOLUME * 2); +// inputTank.fill(new FluidStack(Fluids.WATER, 1000), FluidAction.EXECUTE); + + ClientHandler.handleGuiTank(stack, tileARC.inputTank, this.guiLeft + 8, this.guiTop + + 40, 16, 63, 194, 1, 16, 63, mouseX, mouseY, background.toString(), tooltip); + ClientHandler.handleGuiTank(stack, tileARC.outputTank, this.guiLeft + 152, this.guiTop + + 15, 16, 63, 194, 1, 16, 63, mouseX, mouseY, background.toString(), tooltip); + + if (!tooltip.isEmpty()) + GuiUtils.drawHoveringText(stack, tooltip, mouseX, mouseY, width, height, -1, font); + } + +// + @Override + protected void drawGuiContainerForegroundLayer(MatrixStack stack, int mouseX, int mouseY) + { + this.font.func_243248_b(stack, new TranslationTextComponent("tile.bloodmagic.arc.name"), 8, 5, 4210752); + this.font.func_243248_b(stack, new TranslationTextComponent("container.inventory"), 8, 111, 4210752); + } + +// + @Override + protected void drawGuiContainerBackgroundLayer(MatrixStack stack, float partialTicks, int mouseX, int mouseY) + { + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + getMinecraft().getTextureManager().bindTexture(background); + int i = (this.width - this.xSize) / 2; + int j = (this.height - this.ySize) / 2; + this.blit(stack, i, j, 0, 0, this.xSize, this.ySize); + +// FluidTank inputTank = new FluidTank(FluidAttributes.BUCKET_VOLUME * 2); +// inputTank.fill(new FluidStack(Fluids.WATER, 1000), FluidAction.EXECUTE); + + ClientHandler.handleGuiTank(stack, tileARC.inputTank, this.guiLeft + 8, this.guiTop + + 40, 16, 63, 194, 1, 16, 63, mouseX, mouseY, background.toString(), null); + ClientHandler.handleGuiTank(stack, tileARC.outputTank, this.guiLeft + 152, this.guiTop + + 15, 16, 63, 194, 1, 16, 63, mouseX, mouseY, background.toString(), null); + + int w = this.getCookProgressScaled(38); +// FurnaceTileEntity d; + this.blit(stack, i + 63, j + 44, 176, 90, w, 23); + } + +//// + public int getCookProgressScaled(int scale) + { + double progress = ((TileAlchemicalReactionChamber) tileARC).getProgressForGui(); +// if (tileSoulForge != null) +// { +// System.out.println("Tile is NOT null"); +// } +// double progress = ((float) this.container.data.get(0)) / ((float) this.container.data.get(1)); +// System.out.println(this.container.data.get(0)); + return (int) (progress * scale); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/screens/ScreenAlchemyTable.java b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenAlchemyTable.java new file mode 100644 index 00000000..ccaa7574 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenAlchemyTable.java @@ -0,0 +1,228 @@ +package wayoftime.bloodmagic.client.screens; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.GlStateManager.DestFactor; +import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.widget.button.Button; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Slot; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.network.AlchemyTableButtonPacket; +import wayoftime.bloodmagic.network.BloodMagicPacketHandler; +import wayoftime.bloodmagic.tile.TileAlchemyTable; +import wayoftime.bloodmagic.tile.container.ContainerAlchemyTable; + +public class ScreenAlchemyTable extends ScreenBase +{ + private static final ResourceLocation background = new ResourceLocation(BloodMagic.MODID, "textures/gui/alchemytable.png"); + public TileAlchemyTable tileTable; + + private int left, top; + + public ScreenAlchemyTable(ContainerAlchemyTable container, PlayerInventory playerInventory, ITextComponent title) + { + super(container, playerInventory, title); + tileTable = container.tileTable; + this.xSize = 176; + this.ySize = 205; + } + + @Override + public ResourceLocation getBackground() + { + return background; + } + + @Override + protected void drawGuiContainerForegroundLayer(MatrixStack stack, int mouseX, int mouseY) + { + this.font.func_243248_b(stack, new TranslationTextComponent("tile.bloodmagic.alchemytable.name"), 8, 5, 4210752); + this.font.func_243248_b(stack, new TranslationTextComponent("container.inventory"), 8, 111, 4210752); + } + + @Override + public void init() + { + super.init(); + left = (this.width - this.xSize) / 2; + top = (this.height - this.ySize) / 2; + + this.buttons.clear(); +// this.buttons.add(); + this.addButton(new Button(left + 135, top + 52, 14, 14, new StringTextComponent("D"), new DirectionalPress(tileTable, Direction.DOWN))); + this.addButton(new Button(left + 153, top + 52, 14, 14, new StringTextComponent("U"), new DirectionalPress(tileTable, Direction.UP))); + this.addButton(new Button(left + 135, top + 70, 14, 14, new StringTextComponent("N"), new DirectionalPress(tileTable, Direction.NORTH))); + this.addButton(new Button(left + 153, top + 70, 14, 14, new StringTextComponent("S"), new DirectionalPress(tileTable, Direction.SOUTH))); + this.addButton(new Button(left + 135, top + 88, 14, 14, new StringTextComponent("W"), new DirectionalPress(tileTable, Direction.WEST))); + this.addButton(new Button(left + 153, top + 88, 14, 14, new StringTextComponent("E"), new DirectionalPress(tileTable, Direction.EAST))); + } + + @Override + protected void drawGuiContainerBackgroundLayer(MatrixStack stack, float partialTicks, int mouseX, int mouseY) + { + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + getMinecraft().getTextureManager().bindTexture(background); + int i = (this.width - this.xSize) / 2; + int j = (this.height - this.ySize) / 2; + this.blit(stack, i, j, 0, 0, this.xSize, this.ySize); + + int l = this.getCookProgressScaled(90); + this.blit(stack, i + 106, j + 14 + 90 - l, 176, 90 - l, 18, l); + + int slotId = tileTable.activeSlot; + if (slotId != -1) + { + Slot slot = this.getContainer().getSlot(slotId); + + if (slotId == TileAlchemyTable.outputSlot) + { + this.blit(stack, i + slot.xPos, j + slot.yPos, 195, 37, 16, 16); + } else + { + this.blit(stack, i + slot.xPos, j + slot.yPos, 195, 19, 16, 16); + } + + for (int buttonId = 0; buttonId < 6; buttonId++) + { + int xOffset = (buttonId % 2) * 18 + 133; + int yOffset = (buttonId / 2) * 18 + 50; + if (tileTable.isSlotEnabled(slotId, Direction.byIndex(buttonId))) + { + this.blit(stack, i + xOffset, j + yOffset, 212, 18, 18, 18); + } else + { + this.blit(stack, i + xOffset, j + yOffset, 212, 0, 18, 18); + } + } + } + +// for (int slotId = 0; slotId < 6; slotId++) +// { +// if (!((TileAlchemyTable) tileTable).isInputSlotAccessible(slotId)) +// { +// Slot slot = this.getContainer().getSlot(slotId); +// +// this.blit(stack, i + slot.xPos, j + slot.yPos, 195, 1, 16, 16); +// } +// } + } + +// @Override +// public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) +// { +// boolean superMouse = super.mouseClicked(mouseX, mouseY, mouseButton); +// System.out.println("Last button clicked: " + mouseButton); +// return superMouse; +// } + +// + public int getCookProgressScaled(int scale) + { + double progress = ((TileAlchemyTable) tileTable).getProgressForGui(); +// if (tileSoulForge != null) +// { +// System.out.println("Tile is NOT null"); +// } +// double progress = ((float) this.container.data.get(0)) / ((float) this.container.data.get(1)); +// System.out.println(this.container.data.get(0)); + return (int) (progress * scale); + } + + public class DirectionalButton extends Button + { + private static final int BUTTON_TEX_X = 200, BUTTON_TEX_Y = 60; + + public DirectionalButton(int x, int y, int width, int height, ITextComponent title, IPressable pressedAction) + { + super(x, y, width, height, title, pressedAction); + } + + @Override + public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) + { + Minecraft minecraft = Minecraft.getInstance(); + FontRenderer fontrenderer = minecraft.fontRenderer; + minecraft.getTextureManager().bindTexture(WIDGETS_LOCATION); + + // Vanilla's method +// RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.alpha); +// int i = this.getYImage(this.isHovered()); +// RenderSystem.enableBlend(); +// RenderSystem.defaultBlendFunc(); +// RenderSystem.enableDepthTest(); +// this.blit(matrixStack, this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); +// this.blit(matrixStack, this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); +// this.renderBg(matrixStack, minecraft, mouseX, mouseY); +// int j = getFGColor(); +// drawCenteredString(matrixStack, fontrenderer, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.ceil(this.alpha * 255.0F) << 24); + + // Mekanism's method + int i = this.getYImage(this.isHovered()); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO); + RenderSystem.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA); + + int width = this.width; + int height = this.height; + int halfWidthLeft = width / 2; + int halfWidthRight = width % 2 == 0 ? halfWidthLeft : halfWidthLeft + 1; + int halfHeightTop = height / 2; + int halfHeightBottom = height % 2 == 0 ? halfHeightTop : halfHeightTop + 1; + int position = i * 20; + + // Left Top Corner + blit(matrixStack, x, y, 0, position, halfWidthLeft, halfHeightTop, BUTTON_TEX_X, BUTTON_TEX_Y); + // Left Bottom Corner + blit(matrixStack, x, y + halfHeightTop, 0, position + 20 - halfHeightBottom, halfWidthLeft, halfHeightBottom, BUTTON_TEX_X, BUTTON_TEX_Y); + // Right Top Corner + blit(matrixStack, x + halfWidthLeft, y, 200 - halfWidthRight, position, halfWidthRight, halfHeightTop, BUTTON_TEX_X, BUTTON_TEX_Y); + // Right Bottom Corner + blit(matrixStack, x + halfWidthLeft, y + halfHeightTop, 200 - halfWidthRight, position + 20 - halfHeightBottom, halfWidthRight, halfHeightBottom, BUTTON_TEX_X, BUTTON_TEX_Y); + renderBg(matrixStack, minecraft, mouseX, mouseY); + RenderSystem.disableBlend(); + + if (this.isHovered()) + { + this.renderToolTip(matrixStack, mouseX, mouseY); + } + } + } + + public class DirectionalPress implements Button.IPressable + { + private final TileAlchemyTable table; + private final Direction direction; + + public DirectionalPress(TileAlchemyTable table, Direction direction) + { + this.table = table; + this.direction = direction; + } + + @Override + public void onPress(Button button) + { +// System.out.println("Pressing le " + direction.toString() + " button, beign oui!"); + int activeSlot = table.activeSlot; + if (activeSlot != -1) + { + boolean enabled = table.isSlotEnabled(activeSlot, direction); + table.setSlotEnabled(!enabled, activeSlot, direction); + BloodMagicPacketHandler.INSTANCE.sendToServer(new AlchemyTableButtonPacket(table.getPos(), activeSlot, direction, !enabled)); + } +//// if (button.visible) +// { +// button.visible = !button.visible; +// } + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/screens/ScreenBase.java b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenBase.java new file mode 100644 index 00000000..c1d8091a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenBase.java @@ -0,0 +1,68 @@ +package wayoftime.bloodmagic.client.screens; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.client.gui.screen.inventory.ContainerScreen; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; + +public abstract class ScreenBase extends ContainerScreen +{ + private static final ResourceLocation background = new ResourceLocation(BloodMagic.MODID, "textures/gui/soulforge.png"); + + protected final T container; + + public ScreenBase(T container, PlayerInventory playerInventory, ITextComponent title) + { + super(container, playerInventory, title); + this.container = container; + } + + public ResourceLocation getBackground() + { + return background; + } + + @Override + public void render(MatrixStack stack, int mouseX, int mouseY, float partialTicks) + { + this.renderBackground(stack); + super.render(stack, mouseX, mouseY, partialTicks); + + this.renderHoveredTooltip(stack, mouseX, mouseY); // @mcp: func_230459_a_ = renderHoveredToolTip +// if (mouseX > (guiLeft + 7) && mouseX < (guiLeft + 7) + 18 && mouseY > (guiTop + 7) +// && mouseY < (guiTop + 7) + 73) +// this.renderTooltip(stack, LanguageMap.getInstance().func_244260_a(Arrays.asList(new TranslationTextComponent("screen.diregoo.energy", MagicHelpers.withSuffix(this.container.getEnergy()), MagicHelpers.withSuffix(this.container.getMaxPower())))), mouseX, mouseY); + } + + @Override + public void init() + { + super.init(); + } + + @Override + protected void drawGuiContainerBackgroundLayer(MatrixStack stack, float partialTicks, int mouseX, int mouseY) + { +// RenderSystem.color4f(1, 1, 1, 1); +// getMinecraft().getTextureManager().bindTexture(getBackground()); +// this.blit(stack, guiLeft, guiTop, 0, 0, xSize, ySize); + +// int maxEnergy = this.container.getMaxPower(), height = 70; +// if (maxEnergy > 0) +// { +// int remaining = (this.container.getEnergy() * height) / maxEnergy; +// this.blit(stack, guiLeft + 8, guiTop + 78 - remaining, 176, 84 - remaining, 16, remaining + 1); +// } + } + +// + protected static TranslationTextComponent getTrans(String key, Object... args) + { + return new TranslationTextComponent(BloodMagic.MODID + "." + key, args); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/client/screens/ScreenHolding.java b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenHolding.java new file mode 100644 index 00000000..a7147cdd --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenHolding.java @@ -0,0 +1,87 @@ +package wayoftime.bloodmagic.client.screens; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Hand; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.item.inventory.ContainerHolding; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; + +public class ScreenHolding extends ScreenBase +{ + private static final ResourceLocation background = BloodMagic.rl("gui/sigilholding.png"); + public IInventory tileTable; + private PlayerEntity player; + + public ScreenHolding(ContainerHolding container, PlayerInventory playerInventory, ITextComponent title) + { + super(container, playerInventory, title); + tileTable = container.inventoryHolding; + xSize = 176; + ySize = 121; + this.player = playerInventory.player; + } + + @Override + public ResourceLocation getBackground() + { + return background; + } + + @Override + protected void drawGuiContainerForegroundLayer(MatrixStack stack, int mouseX, int mouseY) + { +// this.font.func_243248_b(stack, new TranslationTextComponent("tile.bloodmagic.alchemytable.name"), 8, 5, 4210752); +// this.font.func_243248_b(stack, new TranslationTextComponent("container.inventory"), 8, 111, 4210752); + this.font.func_243248_b(stack, new TranslationTextComponent("item.bloodmagic.sigilofholding"), 53, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(MatrixStack stack, float partialTicks, int mouseX, int mouseY) + { + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + getMinecraft().getTextureManager().bindTexture(background); +// int i = (this.width - this.xSize) / 2; +// int j = (this.height - this.ySize) / 2; +// this.blit(stack, i, j, 0, 0, this.xSize, this.ySize); +// +// int l = this.getCookProgressScaled(90); +// this.blit(stack, i + 115, j + 14 + 90 - l, 176, 90 - l, 18, l); +// +// for (int slotId = 0; slotId < 6; slotId++) +// { +// if (!((TileAlchemyTable) tileTable).isInputSlotAccessible(slotId)) +// { +// Slot slot = this.getContainer().getSlot(slotId); +// +// this.blit(stack, i + slot.xPos, j + slot.yPos, 195, 1, 16, 16); +// } +// } + + // draw your Gui here, only thing you need to change is the path +// GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); +// this.mc.getTextureManager().bindTexture(texture); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + this.blit(stack, x, y, 0, 0, xSize, ySize); + ItemStack held = player.getHeldItem(Hand.MAIN_HAND); + if (!held.isEmpty() && held.getItem() == BloodMagicItems.HOLDING_SIGIL.get()) + { +// GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + this.blit(stack, 4 + x + 36 * ItemSigilHolding.getCurrentItemOrdinal(player.getHeldItemMainhand()), y + 13, 0, 123, 24, 24); + } + } + +// + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/screens/ScreenSoulForge.java b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenSoulForge.java new file mode 100644 index 00000000..f146ecae --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/screens/ScreenSoulForge.java @@ -0,0 +1,85 @@ +package wayoftime.bloodmagic.client.screens; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.tile.TileSoulForge; +import wayoftime.bloodmagic.tile.container.ContainerSoulForge; + +public class ScreenSoulForge extends ScreenBase +{ + private static final ResourceLocation background = new ResourceLocation(BloodMagic.MODID, "textures/gui/soulforge.png"); + public IInventory tileSoulForge; + + public ScreenSoulForge(ContainerSoulForge container, PlayerInventory playerInventory, ITextComponent title) + { + super(container, playerInventory, title); + tileSoulForge = container.tileForge; + this.xSize = 176; + this.ySize = 205; + } + + @Override + public ResourceLocation getBackground() + { + return background; + } + +// public + +// public ScreenSoulForge(InventoryPlayer playerInventory, IInventory tileSoulForge) +// { +// super(new ContainerSoulForge(playerInventory, tileSoulForge)); +// this.tileSoulForge = tileSoulForge; +// this.xSize = 176; +// this.ySize = 205; +// } +// +// @Override +// public void render(MatrixStack stack, int mouseX, int mouseY, float partialTicks) +// { +// this.drawDefaultBackground(); +// super.drawScreen(mouseX, mouseY, partialTicks); +// this.renderHoveredToolTip(mouseX, mouseY); +// } +// + @Override + protected void drawGuiContainerForegroundLayer(MatrixStack stack, int mouseX, int mouseY) + { + this.font.func_243248_b(stack, new TranslationTextComponent("tile.bloodmagic.soulforge.name"), 8, 5, 4210752); + this.font.func_243248_b(stack, new TranslationTextComponent("container.inventory"), 8, 111, 4210752); + } + +// + @Override + protected void drawGuiContainerBackgroundLayer(MatrixStack stack, float partialTicks, int mouseX, int mouseY) + { + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + getMinecraft().getTextureManager().bindTexture(background); + int i = (this.width - this.xSize) / 2; + int j = (this.height - this.ySize) / 2; + this.blit(stack, i, j, 0, 0, this.xSize, this.ySize); + + int l = this.getCookProgressScaled(90); + this.blit(stack, i + 115, j + 14 + 90 - l, 176, 90 - l, 18, l); + } + +// + public int getCookProgressScaled(int scale) + { + double progress = ((TileSoulForge) tileSoulForge).getProgressForGui(); +// if (tileSoulForge != null) +// { +// System.out.println("Tile is NOT null"); +// } +// double progress = ((float) this.container.data.get(0)) / ((float) this.container.data.get(1)); +// System.out.println(this.container.data.get(0)); + return (int) (progress * scale); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/client/utils/BMRenderTypes.java b/src/main/java/wayoftime/bloodmagic/client/utils/BMRenderTypes.java new file mode 100644 index 00000000..9ea90a92 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/utils/BMRenderTypes.java @@ -0,0 +1,153 @@ +package wayoftime.bloodmagic.client.utils; + +import java.util.OptionalDouble; +import java.util.function.Consumer; + +import org.lwjgl.opengl.GL11; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderState; +import net.minecraft.client.renderer.RenderState.AlphaState; +import net.minecraft.client.renderer.RenderState.CullState; +import net.minecraft.client.renderer.RenderState.FogState; +import net.minecraft.client.renderer.RenderState.LightmapState; +import net.minecraft.client.renderer.RenderState.LineState; +import net.minecraft.client.renderer.RenderState.ShadeModelState; +import net.minecraft.client.renderer.RenderState.TextureState; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.inventory.container.PlayerContainer; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; + +public class BMRenderTypes +{ + public static final RenderType SOLID_FULLBRIGHT; + public static final RenderType TRANSLUCENT_LINES; + public static final RenderType LINES; + public static final RenderType TRANSLUCENT_TRIANGLES; + public static final RenderType TRANSLUCENT_POSITION_COLOR; + public static final RenderType TRANSLUCENT_NO_DEPTH; + public static final RenderType CHUNK_MARKER; + public static final RenderType VEIN_MARKER; + public static final RenderType POSITION_COLOR_TEX_LIGHTMAP; + public static final RenderType POSITION_COLOR_LIGHTMAP; + public static final RenderType ITEM_DAMAGE_BAR; + protected static final RenderState.ShadeModelState SHADE_ENABLED = new RenderState.ShadeModelState(true); + protected static final RenderState.TextureState BLOCK_SHEET_MIPPED = new RenderState.TextureState(AtlasTexture.LOCATION_BLOCKS_TEXTURE, false, true); + protected static final RenderState.LightmapState LIGHTMAP_DISABLED = new RenderState.LightmapState(false); + protected static final RenderState.TransparencyState TRANSLUCENT_TRANSPARENCY = new RenderState.TransparencyState("translucent_transparency", () -> { + RenderSystem.enableBlend(); + RenderSystem.defaultBlendFunc(); + }, RenderSystem::disableBlend); + protected static final RenderState.TransparencyState NO_TRANSPARENCY = new RenderState.TransparencyState("no_transparency", RenderSystem::disableBlend, () -> { + }); + protected static final RenderState.DepthTestState DEPTH_ALWAYS = new RenderState.DepthTestState("", GL11.GL_ALWAYS); + + static + { + RenderType.State fullbrightSolidState = RenderType.State.getBuilder().shadeModel(SHADE_ENABLED).lightmap(LIGHTMAP_DISABLED).texture(BLOCK_SHEET_MIPPED).build(true); + SOLID_FULLBRIGHT = RenderType.makeType(BloodMagic.MODID + ":block_fullbright", DefaultVertexFormats.BLOCK, GL11.GL_QUADS, 256, fullbrightSolidState); + RenderType.State translucentNoDepthState = RenderType.State.getBuilder().transparency(TRANSLUCENT_TRANSPARENCY).line(new LineState(OptionalDouble.of(2))).texture(new TextureState()).depthTest(DEPTH_ALWAYS).build(false); + RenderType.State translucentNoTextureState = RenderType.State.getBuilder().transparency(TRANSLUCENT_TRANSPARENCY).texture(new TextureState()).build(false); + TRANSLUCENT_LINES = RenderType.makeType(BloodMagic.MODID + ":translucent_lines", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 256, translucentNoDepthState); + LINES = RenderType.makeType(BloodMagic.MODID + ":lines", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 256, RenderType.State.getBuilder().build(false)); + TRANSLUCENT_TRIANGLES = RenderType.makeType(BloodMagic.MODID + ":translucent_triangle_fan", DefaultVertexFormats.POSITION_COLOR, GL11.GL_TRIANGLES, 256, translucentNoDepthState); + TRANSLUCENT_POSITION_COLOR = RenderType.makeType(BloodMagic.MODID + ":translucent_pos_color", DefaultVertexFormats.POSITION_COLOR, GL11.GL_QUADS, 256, translucentNoTextureState); + TRANSLUCENT_NO_DEPTH = RenderType.makeType(BloodMagic.MODID + ":translucent_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_QUADS, 256, translucentNoDepthState); + RenderType.State chunkMarkerState = RenderType.State.getBuilder().texture(new TextureState()).transparency(TRANSLUCENT_TRANSPARENCY).cull(new CullState(false)).shadeModel(new ShadeModelState(true)).line(new LineState(OptionalDouble.of(5))).build(false); + CHUNK_MARKER = RenderType.makeType(BloodMagic.MODID + ":chunk_marker", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 256, chunkMarkerState); + VEIN_MARKER = RenderType.makeType(BloodMagic.MODID + ":vein_marker", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINE_LOOP, 256, chunkMarkerState); + POSITION_COLOR_TEX_LIGHTMAP = RenderType.makeType(BloodMagic.MODID + ":pos_color_tex_lightmap", DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP, GL11.GL_QUADS, 256, RenderType.State.getBuilder().texture(new TextureState(PlayerContainer.LOCATION_BLOCKS_TEXTURE, false, false)).lightmap(new LightmapState(true)).build(false)); + POSITION_COLOR_LIGHTMAP = RenderType.makeType(BloodMagic.MODID + ":pos_color_lightmap", DefaultVertexFormats.POSITION_COLOR_LIGHTMAP, GL11.GL_QUADS, 256, RenderType.State.getBuilder().texture(new TextureState()).lightmap(new LightmapState(true)).build(false)); + ITEM_DAMAGE_BAR = RenderType.makeType(BloodMagic.MODID + ":item_damage_bar", DefaultVertexFormats.POSITION_COLOR, GL11.GL_QUADS, 256, RenderType.State.getBuilder().depthTest(DEPTH_ALWAYS).texture(new TextureState()).alpha(new AlphaState(0)).transparency(NO_TRANSPARENCY).build(false)); + } + + public static RenderType getGui(ResourceLocation texture) + { + return RenderType.makeType("gui_" + texture, DefaultVertexFormats.POSITION_COLOR_TEX, GL11.GL_QUADS, 256, RenderType.State.getBuilder().texture(new TextureState(texture, false, false)).alpha(new AlphaState(0.5F)).build(false)); + } + + public static RenderType getLines(float lineWidth) + { + return RenderType.makeType("lines_color_pos_" + lineWidth, DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 256, RenderType.State.getBuilder().line(new LineState(OptionalDouble.of(lineWidth))).texture(new TextureState()).build(false)); + } + + public static RenderType getPoints(float pointSize) + { + // Not really a fog state, but using it like this makes using RenderType.State + // with custom states possible + FogState setPointSize = new FogState(BloodMagic.MODID + ":pointsize_" + pointSize, () -> GL11.glPointSize(pointSize), () -> { + GL11.glPointSize(1); + }); + return RenderType.makeType("point_pos_color_" + pointSize, DefaultVertexFormats.POSITION_COLOR, GL11.GL_POINTS, 256, RenderType.State.getBuilder().fog(setPointSize).texture(new TextureState()).build(false)); + } + + public static RenderType getPositionTex(ResourceLocation texture) + { + return RenderType.makeType(BloodMagic.MODID + ":pos_tex_" + texture, DefaultVertexFormats.POSITION_TEX, GL11.GL_QUADS, 256, RenderType.State.getBuilder().texture(new TextureState(texture, false, false)).build(false)); + } + + public static RenderType getFullbrightTranslucent(ResourceLocation resourceLocation) + { + RenderType.State glState = RenderType.State.getBuilder().transparency(TRANSLUCENT_TRANSPARENCY).texture(new TextureState(resourceLocation, false, false)).lightmap(new LightmapState(false)).build(false); + return RenderType.makeType("BloodMagic:fullbright_translucent_" + resourceLocation, DefaultVertexFormats.BLOCK, GL11.GL_QUADS, 256, glState); + } + + public static IRenderTypeBuffer wrapWithStencil(IRenderTypeBuffer in, Consumer setupStencilArea, String name, int ref) + { + return wrapWithAdditional(in, "stencil_" + name + "_" + ref, () -> { + GL11.glEnable(GL11.GL_STENCIL_TEST); + RenderSystem.colorMask(false, false, false, false); + RenderSystem.depthMask(false); + GL11.glStencilFunc(GL11.GL_NEVER, 1, 0xFF); + GL11.glStencilOp(GL11.GL_REPLACE, GL11.GL_KEEP, GL11.GL_KEEP); + + GL11.glStencilMask(0xFF); + RenderSystem.clear(GL11.GL_STENCIL_BUFFER_BIT, true); + RenderSystem.disableTexture(); + Tessellator tes = Tessellator.getInstance(); + BufferBuilder bb = tes.getBuffer(); + bb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION); + setupStencilArea.accept(bb); + tes.draw(); + RenderSystem.enableTexture(); + RenderSystem.colorMask(true, true, true, true); + RenderSystem.depthMask(true); + GL11.glStencilMask(0x00); + GL11.glStencilFunc(GL11.GL_EQUAL, ref, 0xFF); + }, () -> GL11.glDisable(GL11.GL_STENCIL_TEST)); + } + + public static IRenderTypeBuffer disableLighting(IRenderTypeBuffer in) + { + return wrapWithAdditional(in, "no_lighting", RenderSystem::disableLighting, () -> { + }); + } + + public static IRenderTypeBuffer disableCull(IRenderTypeBuffer in) + { + return wrapWithAdditional(in, "no_cull", RenderSystem::disableCull, RenderSystem::enableCull); + } + + private static IRenderTypeBuffer wrapWithAdditional(IRenderTypeBuffer in, String name, Runnable setup, Runnable teardown) + { + return type -> { + return in.getBuffer(new RenderType(BloodMagic.MODID + ":" + type + "_" + name, type.getVertexFormat(), type.getDrawMode(), type.getBufferSize(), type.isUseDelegate(), false, () -> { + type.setupRenderState(); + setup.run(); + }, () -> { + teardown.run(); + type.clearRenderState(); + }) + { + }); + }; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/command/CommandBloodMagic.java b/src/main/java/wayoftime/bloodmagic/command/CommandBloodMagic.java new file mode 100644 index 00000000..c24d195f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/command/CommandBloodMagic.java @@ -0,0 +1,14 @@ +package wayoftime.bloodmagic.command; + +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.builder.LiteralArgumentBuilder; + +import net.minecraft.command.CommandSource; + +public class CommandBloodMagic +{ + public CommandBloodMagic(CommandDispatcher dispatcher) + { + dispatcher.register(LiteralArgumentBuilder.literal("bloodmagic")); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/command/sub/SubCommandBind.java b/src/main/java/wayoftime/bloodmagic/command/sub/SubCommandBind.java new file mode 100644 index 00000000..c71d3d82 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/command/sub/SubCommandBind.java @@ -0,0 +1,111 @@ +package wayoftime.bloodmagic.command.sub; + +import net.minecraft.command.CommandException; +import net.minecraft.command.CommandSource; +import net.minecraft.entity.player.ServerPlayerEntity; + +public class SubCommandBind +{ + public ServerPlayerEntity player; + +// static ArgumentBuilder register() +// { +// return Commands.literal("generate") +// .requires(cs->cs.hasPermissionLevel(4)) //permission +// .then(Commands.argument("pos", BlockPosArgument.blockPos()) +// .then(Commands.argument("count", IntegerArgumentType.integer(1)) +// .then(Commands.argument("dim", DimensionArgument.getDimension()) +// .then(Commands.argument("interval", IntegerArgumentType.integer()) +// .executes(ctx -> execute(ctx.getSource(), BlockPosArgument.getBlockPos(ctx, "pos"), getInt(ctx, "count"), DimensionArgument.getDimensionArgument(ctx, "dim"), getInt(ctx, "interval"))) +// ) +// .executes(ctx -> execute(ctx.getSource(), BlockPosArgument.getBlockPos(ctx, "pos"), getInt(ctx, "count"), DimensionArgument.getDimensionArgument(ctx, "dim"), -1)) +// ) +// .executes(ctx -> execute(ctx.getSource(), BlockPosArgument.getBlockPos(ctx, "pos"), getInt(ctx, "count"), ctx.getSource().getWorld(), -1)) +// ) +// ); +// } + +// public ITextComponent getInfo() +// { +// return player.getName(); +// } +// +// @Override +// public String getName() +// { +// return "bind"; +// } +// +// @Override +// public String getUsage(ICommandSender commandSender) +// { +// return "commands.bloodmagic.bind.usage"; +// } +// +// public String getHelp() +// { +// return "commands.bloodmagic.bind.help"; +// } +// +// @Override +// public int getRequiredPermissionLevel() +// { +// return 2; +// } + + public static int execute(CommandSource source, String[] args) + throws CommandException + { +// if (args.length == 1 && (args[0].equals("?") || args[0].equals("help"))) +// { +// sender.sendMessage(new TranslationTextComponent(getHelp())); +// return; +// } +// if (sender.getEntityWorld().isRemote) +// return; +// ServerPlayerEntity player = args.length < 2 ? getCommandSenderAsPlayer(sender) +// : getPlayer(server, sender, args[0]); +// ItemStack held = player.getHeldItemMainhand(); +// boolean bind = true; +// if (held.getItem() instanceof IBindable) +// { +// Binding binding = ((IBindable) held.getItem()).getBinding(held); +// if (binding != null) +// bind = false; +// if (args.length < 2) +// if (args.length == 1) +// if (isBoolean(args[0])) +// bind = Boolean.parseBoolean(args[0]); +// else +// player = getPlayer(server, sender, args[0]); +// if (bind) +// { +// if (binding.getOwnerName().equals(player.getName())) +// { +// sender.sendMessage(new TranslationTextComponent("commands.bloodmagic.bind.error.ownerEqualsTarget")); +// return; +// } +// binding = new Binding(player.getGameProfile().getId(), player.getGameProfile().getName()); +// BindableHelper.applyBinding(held, binding); +// this.player = player; +// sender.sendMessage(new TranslationTextComponent("commands.bloodmagic.bind.success", getInfo())); +// } else +// { +// if (binding == null) +// { +// sender.sendMessage(new TranslationTextComponent("commands.bloodmagic.bind.error.notBound")); +// } +// held.getTagCompound().removeTag("binding"); +// sender.sendMessage(new TranslationTextComponent("commands.bloodmagic.bind.remove.success")); +// } +// } else +// sender.sendMessage(new TranslationTextComponent("commands.bloodmagic.bind.error.notBindable")); + + return 1; + } + + private boolean isBoolean(String string) + { + return string.equalsIgnoreCase("true") || string.equalsIgnoreCase("false"); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffect.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffect.java new file mode 100644 index 00000000..2219ea52 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffect.java @@ -0,0 +1,23 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.Entity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public abstract class AlchemyArrayEffect +{ + public abstract AlchemyArrayEffect getNewCopy(); + + public abstract void readFromNBT(CompoundNBT compound); + + public abstract void writeToNBT(CompoundNBT compound); + + public abstract boolean update(TileAlchemyArray array, int activeCounter); + + public void onEntityCollidedWithBlock(TileAlchemyArray tileAlchemyArray, World world, BlockPos pos, BlockState state, Entity entity) + { + }; +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectBinding.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectBinding.java new file mode 100644 index 00000000..a1519163 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectBinding.java @@ -0,0 +1,78 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.effect.LightningBoltEntity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.client.render.alchemyarray.BindingAlchemyCircleRenderer; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectBinding extends AlchemyArrayEffectCrafting +{ + public AlchemyArrayEffectBinding(ItemStack outputStack, int tickLimit) + { + super(outputStack, tickLimit); + } + + public AlchemyArrayEffectBinding(ItemStack outputStack) + { + this(outputStack, 300); + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { + // TODO: Add recipe rechecking to verify nothing screwy is going on. + if (tile.getWorld().isRemote) + { + return false; + } + + if (ticksActive >= 50 && ticksActive <= 250) + { + this.spawnLightningOnCircle(tile.getWorld(), tile.getPos(), ticksActive); + } + + if (ticksActive >= tickLimit) + { + BlockPos pos = tile.getPos(); + + ItemStack output = outputStack.copy(); + + ItemEntity outputEntity = new ItemEntity(tile.getWorld(), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, output); + + tile.getWorld().addEntity(outputEntity); + + return true; + } + + return false; + } + + public void spawnLightningOnCircle(World world, BlockPos pos, int ticksActive) + { + if (ticksActive % 50 == 0) + { + int circle = ticksActive / 50 - 1; + float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(circle, ticksActive); + float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(circle, ticksActive); + + double dispX = distance * Math.sin(angle); + double dispZ = -distance * Math.cos(angle); + + LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(world); +// LightningBoltEntity lightning = new LightningBoltEntity(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ); + lightningboltentity.setPosition(pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ); + lightningboltentity.setEffectOnly(true); + world.addEntity(lightningboltentity); + } + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectBinding(outputStack, tickLimit); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectBounce.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectBounce.java new file mode 100644 index 00000000..7a316e04 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectBounce.java @@ -0,0 +1,66 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectBounce extends AlchemyArrayEffect +{ + public AlchemyArrayEffectBounce() + { + super(); + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { + return false; + } + + @Override + public void onEntityCollidedWithBlock(TileAlchemyArray array, World world, BlockPos pos, BlockState state, Entity entity) + { + if (entity.isSneaking()) + { + entity.fallDistance = 0; + } else if (entity.getMotion().y < 0.0D) + { + Vector3d motion = entity.getMotion(); + motion = motion.mul(1, -1, 1); + + if (!(entity instanceof LivingEntity)) + { + motion = motion.mul(1, 0.8, 1); + } + + entity.setMotion(motion); + + entity.fallDistance = 0; + } + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectBounce(); + } + + @Override + public void readFromNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } + + @Override + public void writeToNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectCrafting.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectCrafting.java new file mode 100644 index 00000000..eebde533 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectCrafting.java @@ -0,0 +1,69 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectCrafting extends AlchemyArrayEffect +{ + public final ItemStack outputStack; + public int tickLimit; + + public AlchemyArrayEffectCrafting(ItemStack outputStack) + { + this(outputStack, 200); + } + + public AlchemyArrayEffectCrafting(ItemStack outputStack, int tickLimit) + { + this.outputStack = outputStack; + this.tickLimit = tickLimit; + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { + // TODO: Add recipe rechecking to verify nothing screwy is going on. + if (tile.getWorld().isRemote) + { + return false; + } + + if (ticksActive >= tickLimit) + { + BlockPos pos = tile.getPos(); + + ItemStack output = outputStack.copy(); + + ItemEntity outputEntity = new ItemEntity(tile.getWorld(), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + + 0.5, output); + + tile.getWorld().addEntity(outputEntity); +// tile.getWorld().spawnEntity(outputEntity); + + return true; + } + + return false; + } + + @Override + public void writeToNBT(CompoundNBT tag) + { + + } + + @Override + public void readFromNBT(CompoundNBT tag) + { + + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectCrafting(outputStack, tickLimit); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectDay.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectDay.java new file mode 100644 index 00000000..ea94e748 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectDay.java @@ -0,0 +1,97 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.effect.LightningBoltEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectDay extends AlchemyArrayEffect +{ + private long startingTime = 0; + + public AlchemyArrayEffectDay() + { + + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { +// if (ticksActive < 200) +// { +// return false; +// } + + World world = tile.getWorld(); + + if (ticksActive == 100) + { + startingTime = world.getDayTime(); + tile.doDropIngredients(false); + } + + if (ticksActive <= 100) + { + return false; + } + + // TODO: Add recipe rechecking to verify nothing screwy is going on. + if (world.isRemote && world instanceof ClientWorld) + { + long finalTime = ((world.getDayTime() + 24000) / 24000) * 24000; + long time = (finalTime - startingTime) * (ticksActive - 100) / 100 + startingTime; + + ((ClientWorld) world).getWorldInfo().setDayTime(time); + + return false; + } + + if (world instanceof ServerWorld) + { +// world.getDayTime() + long finalTime = ((world.getDayTime() + 24000) / 24000) * 24000; + long time = (finalTime - startingTime) * (ticksActive - 100) / 100 + startingTime; + for (ServerWorld serverworld : world.getServer().getWorlds()) + { + serverworld.func_241114_a_((long) time); + } + + if (ticksActive >= 200) + { + BlockPos pos = tile.getPos(); + LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(world); +// LightningBoltEntity lightning = new LightningBoltEntity(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ); + lightningboltentity.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); + lightningboltentity.setEffectOnly(true); + world.addEntity(lightningboltentity); + + return true; + } + + return false; + } + return false; + } + + @Override + public void writeToNBT(CompoundNBT tag) + { + + } + + @Override + public void readFromNBT(CompoundNBT tag) + { + + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectDay(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectMovement.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectMovement.java new file mode 100644 index 00000000..8037b5b4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectMovement.java @@ -0,0 +1,96 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.Entity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectMovement extends AlchemyArrayEffect +{ + public AlchemyArrayEffectMovement() + { + super(); + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { + + return false; + } + + @Override + public void onEntityCollidedWithBlock(TileAlchemyArray array, World world, BlockPos pos, BlockState state, Entity entity) + { + double motionY = 0.5; + double motionYGlowstoneMod = 0.05; + double speed = 1.5; + double speedRedstoneMod = 0.15; + + Direction direction = array.getRotation(); + TileAlchemyArray tileArray = (TileAlchemyArray) array; + + motionY += motionYGlowstoneMod * (tileArray.getStackInSlot(0).getCount() - 1); + speed += speedRedstoneMod * (tileArray.getStackInSlot(1).getCount() - 1); + +// entity.getMotion().y = motionY; + entity.fallDistance = 0; + + switch (direction) + { + case NORTH: +// entity.motionX = 0; +// entity.motionY = motionY; +// entity.motionZ = -speed; + entity.setMotion(new Vector3d(0, motionY, -speed)); + break; + + case SOUTH: +// entity.motionX = 0; +// entity.motionY = motionY; +// entity.motionZ = speed; + entity.setMotion(new Vector3d(0, motionY, speed)); + break; + + case WEST: +// entity.motionX = -speed; +// entity.motionY = motionY; +// entity.motionZ = 0; + entity.setMotion(new Vector3d(-speed, motionY, 0)); + break; + + case EAST: +// entity.motionX = speed; +// entity.motionY = motionY; +// entity.motionZ = 0; + entity.setMotion(new Vector3d(speed, motionY, 0)); + break; + default: + break; + } + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectMovement(); + } + + @Override + public void readFromNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } + + @Override + public void writeToNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectNight.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectNight.java new file mode 100644 index 00000000..5d322081 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectNight.java @@ -0,0 +1,97 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.effect.LightningBoltEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectNight extends AlchemyArrayEffect +{ + private long startingTime = 0; + + public AlchemyArrayEffectNight() + { + + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { +// if (ticksActive < 200) +// { +// return false; +// } + + World world = tile.getWorld(); + if (ticksActive == 100) + { + startingTime = world.getDayTime(); + tile.doDropIngredients(false); + } + + if (ticksActive <= 100) + { + return false; + } + + // TODO: Add recipe rechecking to verify nothing screwy is going on. + + if (world.isRemote && world instanceof ClientWorld) + { + long finalTime = ((world.getDayTime() + 11000) / 24000) * 24000 + 13000; + long time = (finalTime - startingTime) * (ticksActive - 100) / 100 + startingTime; + + ((ClientWorld) world).getWorldInfo().setDayTime(time); + + return false; + } + + if (world instanceof ServerWorld) + { +// world.getDayTime() + long finalTime = ((world.getDayTime() + 11000) / 24000) * 24000 + 13000; + long time = (finalTime - startingTime) * (ticksActive - 100) / 100 + startingTime; + for (ServerWorld serverworld : world.getServer().getWorlds()) + { + serverworld.func_241114_a_((long) time); + } + + if (ticksActive >= 200) + { + BlockPos pos = tile.getPos(); + LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(world); +// LightningBoltEntity lightning = new LightningBoltEntity(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ); + lightningboltentity.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); + lightningboltentity.setEffectOnly(true); + world.addEntity(lightningboltentity); + + return true; + } + + return false; + } + return false; + } + + @Override + public void writeToNBT(CompoundNBT tag) + { + + } + + @Override + public void readFromNBT(CompoundNBT tag) + { + + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectNight(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectSpike.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectSpike.java new file mode 100644 index 00000000..585c0f8a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectSpike.java @@ -0,0 +1,53 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.DamageSource; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectSpike extends AlchemyArrayEffect +{ + public AlchemyArrayEffectSpike() + { + super(); + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { + return false; + } + + @Override + public void onEntityCollidedWithBlock(TileAlchemyArray array, World world, BlockPos pos, BlockState state, Entity entity) + { + if (entity instanceof LivingEntity) + { + entity.attackEntityFrom(DamageSource.CACTUS, 2); + } + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectSpike(); + } + + @Override + public void readFromNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } + + @Override + public void writeToNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectUpdraft.java b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectUpdraft.java new file mode 100644 index 00000000..62831113 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/alchemyarray/AlchemyArrayEffectUpdraft.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.common.alchemyarray; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.Entity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class AlchemyArrayEffectUpdraft extends AlchemyArrayEffect +{ + public AlchemyArrayEffectUpdraft() + { + super(); + } + + @Override + public boolean update(TileAlchemyArray tile, int ticksActive) + { + + return false; + } + + @Override + public void onEntityCollidedWithBlock(TileAlchemyArray array, World world, BlockPos pos, BlockState state, Entity entity) + { + double motionY = 1; + double motionYGlowstoneMod = 0.1; + double motionYFeatherMod = 0.05; + + TileAlchemyArray tileArray = (TileAlchemyArray) array; + + motionY += motionYGlowstoneMod * (tileArray.getStackInSlot(0).getCount() - 1); // Glowstone Dust + motionY += motionYFeatherMod * (tileArray.getStackInSlot(1).getCount() - 1); // Feathers + +// entity.getMotion().y = motionY; + entity.fallDistance = 0; + + entity.setMotion(new Vector3d(0, motionY, 0)); + + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectUpdraft(); + } + + @Override + public void readFromNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } + + @Override + public void writeToNBT(CompoundNBT compound) + { + // TODO Auto-generated method stub + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemicalReactionChamber.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemicalReactionChamber.java new file mode 100644 index 00000000..da151b5c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemicalReactionChamber.java @@ -0,0 +1,162 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalBlock; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.DirectionProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.tileentity.AbstractFurnaceTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.tile.TileAlchemicalReactionChamber; + +public class BlockAlchemicalReactionChamber extends Block +{ + public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; + public static final BooleanProperty LIT = BlockStateProperties.LIT; + + public BlockAlchemicalReactionChamber() + { + super(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(2).sound(SoundType.STONE)); + this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH).with(LIT, Boolean.valueOf(false))); + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileAlchemicalReactionChamber(); + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileAlchemicalReactionChamber arc = (TileAlchemicalReactionChamber) world.getTileEntity(blockPos); + if (arc != null) + arc.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileAlchemicalReactionChamber) + { + ((TileAlchemicalReactionChamber) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + if (world.isRemote) + return ActionResultType.SUCCESS; + + TileEntity tile = world.getTileEntity(pos); + if (!(tile instanceof TileAlchemicalReactionChamber)) + return ActionResultType.FAIL; + + NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); +// player.openGui(BloodMagic.instance, Constants.Gui.SOUL_FORGE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); + + return ActionResultType.SUCCESS; + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) + { + return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()); + } + + /** + * Called by ItemBlocks after a block is set in the world, to allow post-place + * logic + */ + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) + { + if (stack.hasDisplayName()) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof AbstractFurnaceTileEntity) + { + ((AbstractFurnaceTileEntity) tileentity).setCustomName(stack.getDisplayName()); + } + } + + } + + /** + * Returns the blockstate with the given rotation from the passed blockstate. If + * inapplicable, returns the passed blockstate. + * + * @deprecated call via {@link IBlockState#withRotation(Rotation)} whenever + * possible. Implementing/overriding is fine. + */ + @Override + public BlockState rotate(BlockState state, Rotation rot) + { + return state.with(FACING, rot.rotate(state.get(FACING))); + } + + /** + * Returns the blockstate with the given mirror of the passed blockstate. If + * inapplicable, returns the passed blockstate. + * + * @deprecated call via {@link IBlockState#withMirror(Mirror)} whenever + * possible. Implementing/overriding is fine. + */ + @Override + public BlockState mirror(BlockState state, Mirror mirrorIn) + { + return state.rotate(mirrorIn.toRotation(state.get(FACING))); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) + { + builder.add(FACING, LIT); + } + + public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param) + { + super.eventReceived(state, worldIn, pos, id, param); + TileEntity tileentity = worldIn.getTileEntity(pos); + return tileentity == null ? false : tileentity.receiveClientEvent(id, param); + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemyArray.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemyArray.java new file mode 100644 index 00000000..a554ed0a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemyArray.java @@ -0,0 +1,123 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileAlchemyArray; +import wayoftime.bloodmagic.util.Utils; + +public class BlockAlchemyArray extends Block +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(1, 0, 1, 15, 1, 15); + + public BlockAlchemyArray() + { + super(Properties.create(Material.WOOL).hardnessAndResistance(1.0F, 0).doesNotBlockMovement()); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileAlchemyArray(); + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.ENTITYBLOCK_ANIMATED; + } + + @Override + public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) + { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileAlchemyArray) + { + ((TileAlchemyArray) tile).onEntityCollidedWithBlock(state, entity); + } + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + TileAlchemyArray array = (TileAlchemyArray) world.getTileEntity(pos); + + if (array == null || player.isSneaking()) + return ActionResultType.FAIL; + + ItemStack playerItem = player.getHeldItem(hand); + + if (!playerItem.isEmpty()) + { + if (array.getStackInSlot(0).isEmpty()) + { + Utils.insertItemToTile(array, player, 0); + world.notifyBlockUpdate(pos, state, state, 3); + } else if (!array.getStackInSlot(0).isEmpty()) + { + Utils.insertItemToTile(array, player, 1); + array.attemptCraft(); + world.notifyBlockUpdate(pos, state, state, 3); + } else + { + return ActionResultType.SUCCESS; + } + } + + world.notifyBlockUpdate(pos, state, state, 3); + return ActionResultType.SUCCESS; + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileAlchemyArray alchemyArray = (TileAlchemyArray) world.getTileEntity(blockPos); + if (alchemyArray != null) + alchemyArray.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileAlchemyArray) + { + ((TileAlchemyArray) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemyTable.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemyTable.java new file mode 100644 index 00000000..210cce1d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockAlchemyTable.java @@ -0,0 +1,183 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.Item; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.DirectionProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.tile.TileAlchemyTable; + +public class BlockAlchemyTable extends Block// implements IBMBlock +{ + public static final DirectionProperty DIRECTION = DirectionProperty.create("direction", Direction.Plane.HORIZONTAL); + public static final BooleanProperty INVISIBLE = BooleanProperty.create("invisible"); + protected static final VoxelShape BODY = Block.makeCuboidShape(1, 0, 1, 15, 15, 15); + + public BlockAlchemyTable() + { + super(AbstractBlock.Properties.create(Material.IRON).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(1).notSolid().setOpaque(BlockAlchemyTable::isntSolid).setBlocksVision(BlockAlchemyTable::isntSolid)); + } + + private static boolean isntSolid(BlockState state, IBlockReader reader, BlockPos pos) + { + return false; + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + public VoxelShape getRayTraceShape(BlockState state, IBlockReader reader, BlockPos pos, ISelectionContext context) + { + return VoxelShapes.empty(); + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileAlchemyTable(); + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.MODEL; + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + if (world.isRemote) + return ActionResultType.SUCCESS; + + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileAlchemyTable) + { + if (((TileAlchemyTable) tile).isSlave()) + { + NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) world.getTileEntity(((TileAlchemyTable) tile).getConnectedPos()), ((TileAlchemyTable) tile).getConnectedPos()); + } else + { + NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); + } + + return ActionResultType.SUCCESS; + } + +// player.openGui(BloodMagic.instance, Constants.Gui.SOUL_FORGE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); + + return ActionResultType.FAIL; + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) + { + return this.getDefaultState().with(DIRECTION, context.getPlacementHorizontalFacing()); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) + { + builder.add(DIRECTION, INVISIBLE); + } + + @Override + public void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) + { + TileAlchemyTable tile = (TileAlchemyTable) world.getTileEntity(pos); + if (tile != null) + { + BlockPos connectedPos = tile.getConnectedPos(); + TileEntity connectedTile = world.getTileEntity(connectedPos); + if (!(connectedTile instanceof TileAlchemyTable + && ((TileAlchemyTable) connectedTile).getConnectedPos().equals(pos))) + { + this.onPlayerDestroy(tile.getWorld(), pos, state); + this.removedByPlayer(state, tile.getWorld(), pos, null, true, this.getFluidState(state)); + } + } + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileAlchemyTable forge = (TileAlchemyTable) world.getTileEntity(blockPos); + + if (forge != null && !forge.isSlave()) + { + forge.dropItems(); + } + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileAlchemyTable && !((TileAlchemyTable) tileentity).isSlave()) + { + ((TileAlchemyTable) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } + +// @Override +// public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) +// { +// if (!state.isIn(newState.getBlock())) +// { +// TileEntity tileentity = worldIn.getTileEntity(pos); +// if (tileentity instanceof TileSoulForge) +// { +// ((TileSoulForge) tileentity).dropItems(); +// worldIn.updateComparatorOutputLevel(pos, this); +// } +// +// super.onReplaced(state, worldIn, pos, newState, isMoving); +// } +// } + + @Override + public Item asItem() + { + return BloodMagicItems.ALCHEMY_TABLE_ITEM.get(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockAltar.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockAltar.java new file mode 100644 index 00000000..af1908e3 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockAltar.java @@ -0,0 +1,100 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.api.compat.IAltarReader; +import wayoftime.bloodmagic.tile.TileAltar; +import wayoftime.bloodmagic.util.Utils; + +public class BlockAltar extends Block +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(0, 0, 0, 16, 12, 16); + + public BlockAltar() + { + super(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(1)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileAltar(); + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + TileAltar altar = (TileAltar) world.getTileEntity(pos); + + if (altar == null || player.isSneaking()) + return ActionResultType.FAIL; + + ItemStack playerItem = player.getHeldItem(hand); + + if (playerItem.getItem() instanceof IAltarReader)// || playerItem.getItem() instanceof IAltarManipulator) + { + playerItem.getItem().onItemRightClick(world, player, hand); + return ActionResultType.SUCCESS; + } + + if (Utils.insertItemToTile(altar, player)) + altar.startCycle(); + else + altar.setActive(); + + world.notifyBlockUpdate(pos, state, state, 3); + return ActionResultType.SUCCESS; + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileAltar altar = (TileAltar) world.getTileEntity(blockPos); + if (altar != null) + altar.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileAltar) + { + ((TileAltar) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockBloodLight.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockBloodLight.java new file mode 100644 index 00000000..4f3ad3f0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockBloodLight.java @@ -0,0 +1,64 @@ +package wayoftime.bloodmagic.common.block; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.particles.RedstoneParticleData; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public class BlockBloodLight extends Block +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(7, 7, 7, 9, 9, 9); + + public BlockBloodLight() + { + super(Properties.create(Material.WOOL).doesNotBlockMovement().setLightLevel((state) -> { + return 15; + })); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.ENTITYBLOCK_ANIMATED; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void animateTick(BlockState stateIn, World world, BlockPos pos, Random rand) + { + ClientPlayerEntity player = Minecraft.getInstance().player; + + if (rand.nextInt(3) != 0) + { + world.addParticle(RedstoneParticleData.REDSTONE_DUST, pos.getX() + 0.5D + + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0); + ItemStack heldItem = player.getHeldItem(Hand.MAIN_HAND); + +// if (heldItem.isEmpty() || heldItem.getItem() != RegistrarBloodMagicItems.SIGIL_BLOOD_LIGHT) +// return; +// +// for (int i = 0; i < 8; i++) world.addParticle(RedstoneParticleData.REDSTONE_DUST, pos.getX() + 0.5D +// + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockBloodRune.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockBloodRune.java new file mode 100644 index 00000000..fc5f537b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockBloodRune.java @@ -0,0 +1,46 @@ +package wayoftime.bloodmagic.common.block; + +import java.util.List; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.block.enums.BloodRuneType; +import wayoftime.bloodmagic.altar.IBloodRune; + +public class BlockBloodRune extends Block implements IBloodRune +{ + private final BloodRuneType type; + + public BlockBloodRune(BloodRuneType type) + { + super(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(2).sound(SoundType.STONE)); + this.type = type; + } + + @Nullable + @Override + public BloodRuneType getBloodRune(World world, BlockPos pos) + { + return type; + } + + @Override + public void addInformation(ItemStack stack, @Nullable IBlockReader world, List tooltip, + ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.decoration.safe").mergeStyle(TextFormatting.GRAY)); + super.addInformation(stack, world, tooltip, flag); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockDeforesterCharge.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockDeforesterCharge.java new file mode 100644 index 00000000..beefd606 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockDeforesterCharge.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; +import wayoftime.bloodmagic.tile.TileDeforesterCharge; + +public class BlockDeforesterCharge extends BlockShapedExplosive +{ + public BlockDeforesterCharge(int explosionSize, Properties properties) + { + super(explosionSize, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileDeforesterCharge(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrucible.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrucible.java new file mode 100644 index 00000000..41a302a7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrucible.java @@ -0,0 +1,101 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.tile.TileDemonCrucible; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.api.compat.IDemonWillGem; +import wayoftime.bloodmagic.api.compat.IDiscreteDemonWill; + +public class BlockDemonCrucible extends Block +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(1, 0, 1, 15, 12, 15); + + public BlockDemonCrucible() + { + super(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(1)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileDemonCrucible(); + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + TileDemonCrucible crucible = (TileDemonCrucible) world.getTileEntity(pos); + + if (crucible == null || player.isSneaking()) + return ActionResultType.FAIL; + + ItemStack playerItem = player.getHeldItem(hand); + + if (!playerItem.isEmpty()) + { + if (!(playerItem.getItem() instanceof IDiscreteDemonWill) + && !(playerItem.getItem() instanceof IDemonWillGem)) + { + return ActionResultType.SUCCESS; + } + } + + Utils.insertItemToTile(crucible, player); + + world.notifyBlockUpdate(pos, state, state, 3); + return ActionResultType.SUCCESS; + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileDemonCrucible altar = (TileDemonCrucible) world.getTileEntity(blockPos); + if (altar != null) + altar.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileDemonCrucible) + { + ((TileDemonCrucible) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrystal.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrystal.java new file mode 100644 index 00000000..291b6e69 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrystal.java @@ -0,0 +1,258 @@ +package wayoftime.bloodmagic.common.block; + +import java.util.EnumMap; + +import javax.annotation.Nullable; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.EnumProperty; +import net.minecraft.state.IntegerProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.item.ItemDemonCrystal; +import wayoftime.bloodmagic.tile.TileDemonCrystal; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class BlockDemonCrystal extends Block +{ + public static final IntegerProperty AGE = IntegerProperty.create("age", 0, 6); +// public static final EnumProperty TYPE = EnumProperty.create("type", EnumDemonWillType.class); + public static final EnumProperty ATTACHED = EnumProperty.create("attached", Direction.class); + private static final EnumMap bounds = new EnumMap<>(Direction.class); + + public final EnumDemonWillType type; + + // Bounding / Collision boxes + private static final VoxelShape[] UP = + { Block.makeCuboidShape(6, 0, 5, 10, 13, 9), Block.makeCuboidShape(7, 0, 0, 13, 6, 5), + Block.makeCuboidShape(9, 0, 9, 13, 5, 14), Block.makeCuboidShape(2, 0, 1, 7, 6, 7), + Block.makeCuboidShape(5, 0, 9, 9, 7, 15), Block.makeCuboidShape(0, 0, 7, 6, 6, 10), + Block.makeCuboidShape(10, 0, 6, 15, 6, 9) }; + private static final VoxelShape[] DOWN = + { Block.makeCuboidShape(6, 3, 7, 10, 16, 11), Block.makeCuboidShape(7, 10, 11, 13, 16, 16), + Block.makeCuboidShape(9, 11, 2, 13, 16, 7), Block.makeCuboidShape(2, 9, 11, 7, 16, 15), + Block.makeCuboidShape(5, 9, 1, 9, 16, 7), Block.makeCuboidShape(0, 10, 6, 6, 16, 9), + Block.makeCuboidShape(10, 11, 7, 15, 16, 10) }; + private static final VoxelShape[] NORTH = + { Block.makeCuboidShape(6, 5, 3, 10, 9, 16), Block.makeCuboidShape(9, 0, 6, 13, 5, 16), + Block.makeCuboidShape(8, 9, 11, 13, 14, 16), Block.makeCuboidShape(2, 1, 9, 7, 7, 16), + Block.makeCuboidShape(5, 9, 9, 9, 15, 16), Block.makeCuboidShape(0, 7, 10, 6, 10, 16), + Block.makeCuboidShape(10, 7, 10, 15, 9, 15), }; + private static final VoxelShape[] SOUTH = + { Block.makeCuboidShape(6, 7, 0, 10, 11, 13), Block.makeCuboidShape(7, 11, 0, 13, 16, 6), + Block.makeCuboidShape(8, 2, 9, 13, 7, 14), Block.makeCuboidShape(2, 9, 1, 7, 14, 7), + Block.makeCuboidShape(5, 1, 9, 9, 7, 9), Block.makeCuboidShape(0, 6, 1, 6, 9, 7), + Block.makeCuboidShape(10, 8, 1, 15, 10, 6) }; + private static final VoxelShape[] EAST = + { Block.makeCuboidShape(0, 6, 5, 13, 10, 9), Block.makeCuboidShape(0, 3, 0, 6, 9, 5), + Block.makeCuboidShape(0, 3, 9, 5, 8, 14), Block.makeCuboidShape(1, 9, 1, 7, 13, 7), + Block.makeCuboidShape(1, 0, 9, 7, 11, 15), Block.makeCuboidShape(0, 10, 7, 6, 16, 10), + Block.makeCuboidShape(0, 1, 6, 5, 6, 9) }; + private static final VoxelShape[] WEST = + { Block.makeCuboidShape(3, 6, 5, 16, 10, 9), Block.makeCuboidShape(9, 7, 0, 16, 12, 5), + Block.makeCuboidShape(11, 4, 9, 16, 13, 14), Block.makeCuboidShape(9, 3, 1, 16, 8, 7), + Block.makeCuboidShape(9, 6, 9, 16, 8, 15), Block.makeCuboidShape(10, 1, 7, 16, 6, 10), + Block.makeCuboidShape(10, 6, 6, 15, 15, 9) }; + + public BlockDemonCrystal(EnumDemonWillType type) + { + super(AbstractBlock.Properties.create(Material.IRON).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(2)); + this.type = type; + + this.setDefaultState(this.stateContainer.getBaseState().with(ATTACHED, Direction.UP).with(AGE, Integer.valueOf(0))); +// this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, EnumDemonWillType.DEFAULT).withProperty(ATTACHED, Direction.UP)); + +// setTranslationKey(BloodMagic.MODID + ".demonCrystal."); +// setCreativeTab(BloodMagic.TAB_BM); +// setHardness(2.0F); +// setResistance(5.0F); +// setHarvestLevel("pickaxe", 2); + } + + public static ItemStack getItemStackDropped(EnumDemonWillType type, int crystalNumber) + { + ItemStack stack = ItemStack.EMPTY; + switch (type) + { + case CORROSIVE: + stack = new ItemStack(BloodMagicItems.CORROSIVE_CRYSTAL.get()); + break; + case DEFAULT: + stack = new ItemStack(BloodMagicItems.RAW_CRYSTAL.get()); + break; + case DESTRUCTIVE: + stack = new ItemStack(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()); + break; + case STEADFAST: + stack = new ItemStack(BloodMagicItems.STEADFAST_CRYSTAL.get()); + break; + case VENGEFUL: + stack = new ItemStack(BloodMagicItems.VENGEFUL_CRYSTAL.get()); + break; + } + + stack.setCount(crystalNumber); + return stack; + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + switch (state.get(ATTACHED)) + { + case DOWN: + return DOWN[0]; + case NORTH: + return NORTH[0]; + case SOUTH: + return SOUTH[0]; + case EAST: + return EAST[0]; + case WEST: + return WEST[0]; + case UP: + default: + return UP[0]; + } + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + if (!world.isRemote) + { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileDemonCrystal) + { + TileDemonCrystal crystal = (TileDemonCrystal) tile; + boolean isCreative = player.isCreative(); + boolean holdsCrystal = player.getHeldItem(hand).getItem() instanceof ItemDemonCrystal; + + if (PlayerDemonWillHandler.getTotalDemonWill(EnumDemonWillType.DEFAULT, player) > 1024 + && !(holdsCrystal && isCreative)) + { + crystal.dropSingleCrystal(); + + } + if (!crystal.getWorld().isRemote && isCreative && holdsCrystal) + { + if (crystal.getCrystalCount() < 7) + { + crystal.internalCounter = 0; + if (crystal.progressToNextCrystal > 0) + crystal.progressToNextCrystal--; + crystal.setCrystalCount(crystal.getCrystalCount() + 1); + crystal.markDirty(); + crystal.notifyUpdate(); + } + } + } + } + + return ActionResultType.SUCCESS; + } + + public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) + { + Direction direction = state.get(ATTACHED); + BlockPos blockpos = pos.offset(direction.getOpposite()); + BlockState blockstate = worldIn.getBlockState(blockpos); + return blockstate.isSolidSide(worldIn, blockpos, direction); + } + + @Nullable + public BlockState getStateForPlacement(BlockItemUseContext context) + { + BlockState blockstate = this.getDefaultState(); + IWorldReader iworldreader = context.getWorld(); + BlockPos blockpos = context.getPos(); + Direction[] adirection = context.getNearestLookingDirections(); + + for (Direction direction : adirection) + { +// if (direction.getAxis().isHorizontal()) + { + Direction direction1 = direction.getOpposite(); + blockstate = blockstate.with(ATTACHED, direction1); + if (blockstate.isValidPosition(iworldreader, blockpos)) + { + return blockstate; + } + } + } + + return null; + } + + public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) + { + return facing.getOpposite() == stateIn.get(ATTACHED) && !stateIn.isValidPosition(worldIn, currentPos) + ? Blocks.AIR.getDefaultState() + : stateIn; + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.MODEL; + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) + { + builder.add(ATTACHED, AGE); + } + +// @Override +// public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) +// { +// +// super.onPlayerDestroy(world, blockPos, blockState); +// } +// +// @Override +// public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) +// { +// TorchBlock d; +// if (!state.isIn(newState.getBlock())) +// { +// +// super.onReplaced(state, worldIn, pos, newState, isMoving); +// } +// } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Nullable + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileDemonCrystal(type); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrystallizer.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrystallizer.java new file mode 100644 index 00000000..a7178f08 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockDemonCrystallizer.java @@ -0,0 +1,47 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.tile.TileDemonCrystallizer; + +public class BlockDemonCrystallizer extends Block +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(2, 2, 2, 14, 16, 14); + + public BlockDemonCrystallizer() + { + super(Properties.create(Material.IRON).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(1)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileDemonCrystallizer(); + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.MODEL; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockFungalCharge.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockFungalCharge.java new file mode 100644 index 00000000..9552dccf --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockFungalCharge.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; +import wayoftime.bloodmagic.tile.TileFungalCharge; + +public class BlockFungalCharge extends BlockShapedExplosive +{ + public BlockFungalCharge(int explosionSize, Properties properties) + { + super(explosionSize, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileFungalCharge(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockGrowingDoubt.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockGrowingDoubt.java new file mode 100644 index 00000000..a56760c5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockGrowingDoubt.java @@ -0,0 +1,45 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.CropsBlock; +import net.minecraft.item.Items; +import net.minecraft.util.IItemProvider; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; + +public class BlockGrowingDoubt extends CropsBlock +{ + private static final VoxelShape[] SHAPES = new VoxelShape[] { + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 4.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 6.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 9.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 10.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 11.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 14.0D, 16.0D), + Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 16.0D, 16.0D) }; + + public BlockGrowingDoubt(AbstractBlock.Properties properties) + { + super(properties); + } + + protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) + { + return state.isIn(BloodMagicBlocks.NETHER_SOIL.get()); + } + + protected IItemProvider getSeedsItem() + { + return Items.POTATO; + } + + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return SHAPES[state.get(this.getAgeProperty())]; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockIncenseAltar.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockIncenseAltar.java new file mode 100644 index 00000000..2d64b98c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockIncenseAltar.java @@ -0,0 +1,77 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.tile.TileIncenseAltar; +import wayoftime.bloodmagic.tile.TileSoulForge; + +public class BlockIncenseAltar extends Block +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(5, 0, 5, 12, 16, 12); + + public BlockIncenseAltar() + { + super(Properties.create(Material.IRON).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileSoulForge forge = (TileSoulForge) world.getTileEntity(blockPos); + if (forge != null) + forge.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileSoulForge) + { + ((TileSoulForge) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileIncenseAltar(); + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.MODEL; + } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockMasterRitualStone.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockMasterRitualStone.java new file mode 100644 index 00000000..360118bb --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockMasterRitualStone.java @@ -0,0 +1,130 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.ItemActivationCrystal; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.tile.TileMasterRitualStone; +import wayoftime.bloodmagic.util.helper.RitualHelper; + +public class BlockMasterRitualStone extends Block +{ + public final boolean isInverted; + + public BlockMasterRitualStone(boolean isInverted) + { + super(Properties.create(Material.ROCK).sound(SoundType.STONE).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(2)); + this.isInverted = isInverted; + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + ItemStack heldItem = player.getHeldItem(hand); + TileEntity tile = world.getTileEntity(pos); + + if (tile instanceof TileMasterRitualStone) + { + if (heldItem.getItem() instanceof ItemActivationCrystal) + { + if (((IBindable) heldItem.getItem()).getBinding(heldItem) == null) + return ActionResultType.FAIL; + + String key = RitualHelper.getValidRitual(world, pos); + if (!key.isEmpty()) + { + Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(key); + if (ritual != null) + { + Direction direction = RitualHelper.getDirectionOfRitual(world, pos, ritual); + // TODO: Give a message stating that this ritual is not a valid ritual. + if (direction != null && RitualHelper.checkValidRitual(world, pos, ritual, direction)) + { + if (((TileMasterRitualStone) tile).activateRitual(heldItem, player, BloodMagic.RITUAL_MANAGER.getRitual(key))) + { + ((TileMasterRitualStone) tile).setDirection(direction); + if (isInverted) + ((TileMasterRitualStone) tile).setInverted(true); + } + } else + { + player.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.notvalid"), true); + } + } else + { + player.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.notvalid"), true); + } + } else + { + player.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.notvalid"), true); + } + } + } + + return ActionResultType.FAIL; + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileMasterRitualStone tile = (TileMasterRitualStone) world.getTileEntity(blockPos); + if (tile != null) + ((TileMasterRitualStone) tile).stopRitual(Ritual.BreakType.BREAK_MRS); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tile = worldIn.getTileEntity(pos); + if (tile instanceof TileMasterRitualStone) + { + ((TileMasterRitualStone) tile).stopRitual(Ritual.BreakType.BREAK_MRS); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } + + @Override + public void onExplosionDestroy(World world, BlockPos pos, Explosion explosion) + { + TileEntity tile = world.getTileEntity(pos); + + if (tile instanceof TileMasterRitualStone) + ((TileMasterRitualStone) tile).stopRitual(Ritual.BreakType.EXPLOSION); + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileMasterRitualStone(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockMimic.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockMimic.java new file mode 100644 index 00000000..231685d0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockMimic.java @@ -0,0 +1,133 @@ +package wayoftime.bloodmagic.common.block; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileMimic; + +public class BlockMimic extends Block +{ + private static final VoxelShape SHAPE = VoxelShapes.create(0.01, 0, 0.01, 0.99, 1, 0.99); + + public BlockMimic(Properties prop) + { + super(prop); + } + +// @Override +// public void addInformation(ItemStack stack, @Nullable IBlockReader reader, List list, ITooltipFlag flags) +// { +// list.add(new TranslationTextComponent("message.fancyblock")); +// } + +// @Override +// public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) +// { +// TileEntity te = world.getTileEntity(pos); +// if (te instanceof TileMimic) +// { +// BlockState mimic = ((TileMimic) te).getMimic(); +// if (mimic != null && !(mimic.getBlock() instanceof BlockMimic)) +// { +// return mimic.getLightValue(world, pos); +// } +// } +// return super.getLightValue(state, world, pos); +// } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader reader, BlockPos pos, ISelectionContext context) + { + TileEntity te = reader.getTileEntity(pos); + if (te instanceof TileMimic) + { + BlockState mimic = ((TileMimic) te).getMimic(); + if (mimic != null && !(mimic.getBlock() instanceof BlockMimic)) + { + return mimic.getShape(reader, pos, context); + } + } + return SHAPE; + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Nullable + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileMimic(); + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult trace) + { + TileMimic mimic = (TileMimic) world.getTileEntity(pos); + + return (mimic != null && mimic.onBlockActivated(world, pos, state, player, hand, player.getHeldItem(hand), trace.getFace())) + ? ActionResultType.SUCCESS + : ActionResultType.FAIL; +// ItemStack item = player.getHeldItem(hand); +// if (!item.isEmpty() && item.getItem() instanceof BlockItem) +// { +// if (!world.isRemote) +// { +// TileEntity te = world.getTileEntity(pos); +// if (te instanceof TileMimic) +// { +// BlockState mimicState = ((BlockItem) item.getItem()).getBlock().getDefaultState(); +// ((TileMimic) te).setMimic(mimicState); +// } +// } +// return ActionResultType.SUCCESS; +// } +// return super.onBlockActivated(state, world, pos, player, hand, trace); + } + +// public boolean canMimicBlock(World world, BlockPos pos, BlockState state) +// { +// return state.getBlock() +// } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileMimic altar = (TileMimic) world.getTileEntity(blockPos); + if (altar != null) + altar.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileMimic) + { + ((TileMimic) tileentity).dropItems(); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockNetherrackSoil.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockNetherrackSoil.java new file mode 100644 index 00000000..57efc20b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockNetherrackSoil.java @@ -0,0 +1,156 @@ +package wayoftime.bloodmagic.common.block; + +import java.util.Random; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.FenceGateBlock; +import net.minecraft.block.MovingPistonBlock; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.pathfinding.PathType; +import net.minecraft.state.IntegerProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class BlockNetherrackSoil extends Block +{ + public static final IntegerProperty MOISTURE = BlockStateProperties.MOISTURE_0_7; + protected static final VoxelShape SHAPE = Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 15.0D, 16.0D); + + public BlockNetherrackSoil(AbstractBlock.Properties builder) + { + super(builder); + this.setDefaultState(this.stateContainer.getBaseState().with(MOISTURE, Integer.valueOf(0))); + } + + /** + * Update the provided state given the provided neighbor facing and neighbor + * state, returning a new state. For example, fences make their connections to + * the passed in state if possible, and wet concrete powder immediately returns + * its solidified counterpart. Note that this method should ideally consider + * only the specific face passed in. + */ + public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) + { + if (facing == Direction.UP && !stateIn.isValidPosition(worldIn, currentPos)) + { + worldIn.getPendingBlockTicks().scheduleTick(currentPos, this, 1); + } + + return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos); + } + + public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) + { + BlockState blockstate = worldIn.getBlockState(pos.up()); + return !blockstate.getMaterial().isSolid() || blockstate.getBlock() instanceof FenceGateBlock || blockstate.getBlock() instanceof MovingPistonBlock; + } + + public BlockState getStateForPlacement(BlockItemUseContext context) + { + return !this.getDefaultState().isValidPosition(context.getWorld(), context.getPos()) + ? Blocks.NETHERRACK.getDefaultState() + : super.getStateForPlacement(context); + } + + public boolean isTransparent(BlockState state) + { + return true; + } + + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return SHAPE; + } + + public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, Random rand) + { + if (!state.isValidPosition(worldIn, pos)) + { + turnToDirt(state, worldIn, pos); + } + + } + + /** + * Performs a random tick on a block. + */ + public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) + { + int i = state.get(MOISTURE); + if (!hasLifeEssence(worldIn, pos) && !worldIn.isRainingAt(pos.up())) + { + if (i > 0) + { + worldIn.setBlockState(pos, state.with(MOISTURE, Integer.valueOf(i - 1)), 2); + } else if (!hasCrops(worldIn, pos)) + { + turnToDirt(state, worldIn, pos); + } + } else if (i < 7) + { + worldIn.setBlockState(pos, state.with(MOISTURE, Integer.valueOf(7)), 2); + } + + } + +// /** +// * Block's chance to react to a living entity falling on it. +// */ +// public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) +// { +// if (!worldIn.isRemote && net.minecraftforge.common.ForgeHooks.onFarmlandTrample(worldIn, pos, Blocks.NETHERRACK.getDefaultState(), fallDistance, entityIn)) +// { // Forge: Move logic to Entity#canTrample +// turnToDirt(worldIn.getBlockState(pos), worldIn, pos); +// } +// +// super.onFallenUpon(worldIn, pos, entityIn, fallDistance); +// } + + public static void turnToDirt(BlockState state, World worldIn, BlockPos pos) + { + worldIn.setBlockState(pos, nudgeEntitiesWithNewState(state, Blocks.NETHERRACK.getDefaultState(), worldIn, pos)); + } + + private boolean hasCrops(IBlockReader worldIn, BlockPos pos) + { + BlockState plant = worldIn.getBlockState(pos.up()); + BlockState state = worldIn.getBlockState(pos); + return plant.getBlock() instanceof net.minecraftforge.common.IPlantable && state.canSustainPlant(worldIn, pos, Direction.UP, (net.minecraftforge.common.IPlantable) plant.getBlock()); + } + + private static boolean hasLifeEssence(IWorldReader worldIn, BlockPos pos) + { + for (BlockPos blockpos : BlockPos.getAllInBoxMutable(pos.add(-4, 0, -4), pos.add(4, 1, 4))) + { + if (worldIn.getFluidState(blockpos).isTagged(BloodMagicTags.LIFE_ESSENCE)) + { + return true; + } + } + + return false; + } + + protected void fillStateContainer(StateContainer.Builder builder) + { + builder.add(MOISTURE); + } + + public boolean allowsMovement(BlockState state, IBlockReader worldIn, BlockPos pos, PathType type) + { + return false; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockPath.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockPath.java new file mode 100644 index 00000000..d0888152 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockPath.java @@ -0,0 +1,24 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.api.compat.IIncensePath; + +public class BlockPath extends Block implements IIncensePath +{ + protected final int pathLevel; + + public BlockPath(int pathLevel, Properties properties) + { + super(properties); + this.pathLevel = pathLevel; + } + + @Override + public int getLevelOfPath(World world, BlockPos pos, BlockState state) + { + return pathLevel; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockRitualStone.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockRitualStone.java new file mode 100644 index 00000000..8a806c55 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockRitualStone.java @@ -0,0 +1,89 @@ +package wayoftime.bloodmagic.common.block; + +import java.util.List; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IRitualStone; + +public class BlockRitualStone extends Block implements IRitualStone +{ + private final EnumRuneType type; + + public BlockRitualStone(EnumRuneType type) + { + super(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool()); + this.type = type; + } + + @Override + public void addInformation(ItemStack stack, @Nullable IBlockReader world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.decoration.safe")); + super.addInformation(stack, world, tooltip, flag); + } + +// @Override +// public int damageDropped(BlockState state) +// { +// return 0; +// } +// +// @Override +// public boolean canSilkHarvest(World world, BlockPos pos, BlockState state, PlayerEntity player) +// { +// return false; +// } + + @Override + public boolean isRuneType(World world, BlockPos pos, EnumRuneType runeType) + { + return type.equals(runeType); + } + + @Override + public void setRuneType(World world, BlockPos pos, EnumRuneType runeType) + { + Block runeBlock = this; + switch (runeType) + { + case AIR: + runeBlock = BloodMagicBlocks.AIR_RITUAL_STONE.get(); + break; + case BLANK: + runeBlock = BloodMagicBlocks.BLANK_RITUAL_STONE.get(); + break; + case DAWN: + runeBlock = BloodMagicBlocks.DAWN_RITUAL_STONE.get(); + break; + case DUSK: + runeBlock = BloodMagicBlocks.DUSK_RITUAL_STONE.get(); + break; + case EARTH: + runeBlock = BloodMagicBlocks.EARTH_RITUAL_STONE.get(); + break; + case FIRE: + runeBlock = BloodMagicBlocks.FIRE_RITUAL_STONE.get(); + break; + case WATER: + runeBlock = BloodMagicBlocks.WATER_RITUAL_STONE.get(); + break; + } + + BlockState newState = runeBlock.getDefaultState(); + world.setBlockState(pos, newState); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockShapedExplosive.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockShapedExplosive.java new file mode 100644 index 00000000..84019156 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockShapedExplosive.java @@ -0,0 +1,135 @@ +package wayoftime.bloodmagic.common.block; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.state.EnumProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileExplosiveCharge; +import wayoftime.bloodmagic.tile.TileShapedExplosive; + +public class BlockShapedExplosive extends Block +{ + private static final VoxelShape UP = Block.makeCuboidShape(2, 0, 2, 14, 7, 14); + private static final VoxelShape DOWN = Block.makeCuboidShape(2, 9, 2, 14, 16, 14); + private static final VoxelShape NORTH = Block.makeCuboidShape(2, 2, 7, 14, 14, 16); + private static final VoxelShape SOUTH = Block.makeCuboidShape(2, 2, 0, 14, 14, 7); + private static final VoxelShape EAST = Block.makeCuboidShape(0, 2, 2, 7, 14, 14); + private static final VoxelShape WEST = Block.makeCuboidShape(16, 2, 2, 9, 14, 14); + + public static final EnumProperty ATTACHED = EnumProperty.create("attached", Direction.class); + protected final int explosionSize; + + public BlockShapedExplosive(int explosionSize, Properties properties) + { + super(properties); + this.explosionSize = explosionSize; + + this.setDefaultState(this.stateContainer.getBaseState().with(ATTACHED, Direction.UP)); + } + + public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) + { + return facing.getOpposite() == stateIn.get(ATTACHED) && !stateIn.isValidPosition(worldIn, currentPos) + ? Blocks.AIR.getDefaultState() + : stateIn; + } + + @Nullable + public BlockState getStateForPlacement(BlockItemUseContext context) + { + BlockState blockstate = this.getDefaultState(); + IWorldReader iworldreader = context.getWorld(); + BlockPos blockpos = context.getPos(); + Direction[] adirection = context.getNearestLookingDirections(); + + for (Direction direction : adirection) + { + Direction direction1 = direction.getOpposite(); + blockstate = blockstate.with(ATTACHED, direction1); + if (blockstate.isValidPosition(iworldreader, blockpos)) + { + return blockstate; + } + } + + return null; + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) + { + builder.add(ATTACHED); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + switch (state.get(ATTACHED)) + { + case DOWN: + return DOWN; + case NORTH: + return NORTH; + case SOUTH: + return SOUTH; + case EAST: + return EAST; + case WEST: + return WEST; + case UP: + default: + return UP; + } + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileShapedExplosive(); + } + + @Override + public void onBlockHarvested(World world, BlockPos blockPos, BlockState blockState, PlayerEntity player) + { + TileExplosiveCharge tile = (TileExplosiveCharge) world.getTileEntity(blockPos); + if (tile != null && !world.isRemote) + tile.dropSelf(); + + super.onBlockHarvested(world, blockPos, blockState, player); + } + +// @Override +// public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) +// { +// if (!state.isIn(newState.getBlock())) +// { +// TileEntity tileentity = worldIn.getTileEntity(pos); +// if (tileentity instanceof TileShapedExplosive) +// { +// ((TileShapedExplosive) tileentity).dropSelf(); +// } +// +// super.onReplaced(state, worldIn, pos, newState, isMoving); +// } +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockSoulForge.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockSoulForge.java new file mode 100644 index 00000000..dba36a9a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockSoulForge.java @@ -0,0 +1,98 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.tile.TileSoulForge; + +public class BlockSoulForge extends Block// implements IBMBlock +{ + protected static final VoxelShape BODY = Block.makeCuboidShape(1, 0, 1, 15, 12, 15); + + public BlockSoulForge() + { + super(Properties.create(Material.IRON).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(1)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) + { + return BODY; + } + + @Override + public boolean hasTileEntity(BlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileSoulForge(); + } + + @Override + public BlockRenderType getRenderType(BlockState state) + { + return BlockRenderType.MODEL; + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) + { + if (world.isRemote) + return ActionResultType.SUCCESS; + + TileEntity tile = world.getTileEntity(pos); + if (!(tile instanceof TileSoulForge)) + return ActionResultType.FAIL; + + NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); +// player.openGui(BloodMagic.instance, Constants.Gui.SOUL_FORGE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); + + return ActionResultType.SUCCESS; + } + + @Override + public void onPlayerDestroy(IWorld world, BlockPos blockPos, BlockState blockState) + { + TileSoulForge forge = (TileSoulForge) world.getTileEntity(blockPos); + if (forge != null) + forge.dropItems(); + + super.onPlayerDestroy(world, blockPos, blockState); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) + { + if (!state.isIn(newState.getBlock())) + { + TileEntity tileentity = worldIn.getTileEntity(pos); + if (tileentity instanceof TileSoulForge) + { + ((TileSoulForge) tileentity).dropItems(); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BlockVeinMineCharge.java b/src/main/java/wayoftime/bloodmagic/common/block/BlockVeinMineCharge.java new file mode 100644 index 00000000..dc3e8f04 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BlockVeinMineCharge.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; +import wayoftime.bloodmagic.tile.TileVeinMineCharge; + +public class BlockVeinMineCharge extends BlockShapedExplosive +{ + public BlockVeinMineCharge(int explosionSize, Properties properties) + { + super(explosionSize, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { + return new TileVeinMineCharge(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java b/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java new file mode 100644 index 00000000..0b74f6c0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java @@ -0,0 +1,206 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.AbstractBlock.Properties; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.FenceGateBlock; +import net.minecraft.block.FlowingFluidBlock; +import net.minecraft.block.RotatedPillarBlock; +import net.minecraft.block.SoundType; +import net.minecraft.block.StairsBlock; +import net.minecraft.block.WallBlock; +import net.minecraft.block.material.Material; +import net.minecraft.fluid.FlowingFluid; +import net.minecraft.fluid.Fluid; +import net.minecraft.inventory.container.ContainerType; +import net.minecraft.item.BucketItem; +import net.minecraft.item.Item; +import net.minecraft.item.Items; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraftforge.common.ToolType; +import net.minecraftforge.common.extensions.IForgeContainerType; +import net.minecraftforge.fluids.FluidAttributes; +import net.minecraftforge.fluids.ForgeFlowingFluid; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.block.enums.BloodRuneType; +import wayoftime.bloodmagic.common.block.base.BlockPillarCap; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.item.inventory.ContainerHolding; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.tile.container.ContainerAlchemicalReactionChamber; +import wayoftime.bloodmagic.tile.container.ContainerAlchemyTable; +import wayoftime.bloodmagic.tile.container.ContainerSoulForge; + +public class BloodMagicBlocks +{ + public static final ResourceLocation FLUID_STILL = new ResourceLocation("bloodmagic:block/lifeessencestill"); + public static final ResourceLocation FLUID_FLOWING = new ResourceLocation("bloodmagic:block/lifeessenceflowing"); + + public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, BloodMagic.MODID); + public static final DeferredRegister BASICBLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, BloodMagic.MODID); + public static final DeferredRegister DUNGEONBLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, BloodMagic.MODID); + public static final DeferredRegister ITEMS = BloodMagicItems.ITEMS; + public static final DeferredRegister FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, BloodMagic.MODID); + public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, BloodMagic.MODID); + +// public static final RegistryObject BLOODSTONE = BASICBLOCKS.register("ruby_block", BloodstoneBlock::new); + public static final RegistryObject SOUL_FORGE = BLOCKS.register("soulforge", BlockSoulForge::new); + public static final RegistryObject INCENSE_ALTAR = BLOCKS.register("incensealtar", BlockIncenseAltar::new); + public static final RegistryObject ALCHEMY_ARRAY = BLOCKS.register("alchemyarray", BlockAlchemyArray::new); + public static final RegistryObject BLANK_RUNE = BASICBLOCKS.register("blankrune", () -> new BlockBloodRune(BloodRuneType.BLANK)); + public static final RegistryObject SPEED_RUNE = BASICBLOCKS.register("speedrune", () -> new BlockBloodRune(BloodRuneType.SPEED)); + public static final RegistryObject SACRIFICE_RUNE = BASICBLOCKS.register("sacrificerune", () -> new BlockBloodRune(BloodRuneType.SACRIFICE)); + public static final RegistryObject SELF_SACRIFICE_RUNE = BASICBLOCKS.register("selfsacrificerune", () -> new BlockBloodRune(BloodRuneType.SELF_SACRIFICE)); + public static final RegistryObject DISPLACEMENT_RUNE = BASICBLOCKS.register("dislocationrune", () -> new BlockBloodRune(BloodRuneType.DISPLACEMENT)); + public static final RegistryObject CAPACITY_RUNE = BASICBLOCKS.register("altarcapacityrune", () -> new BlockBloodRune(BloodRuneType.CAPACITY)); + public static final RegistryObject AUGMENTED_CAPACITY_RUNE = BASICBLOCKS.register("bettercapacityrune", () -> new BlockBloodRune(BloodRuneType.AUGMENTED_CAPACITY)); + public static final RegistryObject ORB_RUNE = BASICBLOCKS.register("orbcapacityrune", () -> new BlockBloodRune(BloodRuneType.ORB)); + public static final RegistryObject ACCELERATION_RUNE = BASICBLOCKS.register("accelerationrune", () -> new BlockBloodRune(BloodRuneType.ACCELERATION)); + public static final RegistryObject CHARGING_RUNE = BASICBLOCKS.register("chargingrune", () -> new BlockBloodRune(BloodRuneType.CHARGING)); + + public static final RegistryObject BLOOD_ALTAR = BLOCKS.register("altar", () -> new BlockAltar()); + public static final RegistryObject BLOOD_LIGHT = BLOCKS.register("bloodlight", () -> new BlockBloodLight()); + + public static final RegistryObject BLANK_RITUAL_STONE = BLOCKS.register("ritualstone", () -> new BlockRitualStone(EnumRuneType.BLANK)); + public static final RegistryObject AIR_RITUAL_STONE = BLOCKS.register("airritualstone", () -> new BlockRitualStone(EnumRuneType.AIR)); + public static final RegistryObject WATER_RITUAL_STONE = BLOCKS.register("waterritualstone", () -> new BlockRitualStone(EnumRuneType.WATER)); + public static final RegistryObject FIRE_RITUAL_STONE = BLOCKS.register("fireritualstone", () -> new BlockRitualStone(EnumRuneType.FIRE)); + public static final RegistryObject EARTH_RITUAL_STONE = BLOCKS.register("earthritualstone", () -> new BlockRitualStone(EnumRuneType.EARTH)); + public static final RegistryObject DUSK_RITUAL_STONE = BLOCKS.register("duskritualstone", () -> new BlockRitualStone(EnumRuneType.DUSK)); + public static final RegistryObject DAWN_RITUAL_STONE = BLOCKS.register("lightritualstone", () -> new BlockRitualStone(EnumRuneType.DAWN)); + + public static final RegistryObject BLOODSTONE = BASICBLOCKS.register("largebloodstonebrick", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(1))); + public static final RegistryObject BLOODSTONE_BRICK = BASICBLOCKS.register("bloodstonebrick", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(1))); + + public static final RegistryObject MASTER_RITUAL_STONE = BASICBLOCKS.register("masterritualstone", () -> new BlockMasterRitualStone(false)); + + public static final RegistryObject ALCHEMICAL_REACTION_CHAMBER = BLOCKS.register("alchemicalreactionchamber", () -> new BlockAlchemicalReactionChamber()); + public static final RegistryObject ALCHEMY_TABLE = BLOCKS.register("alchemytable", () -> new BlockAlchemyTable()); + + public static final RegistryObject DEMON_CRUCIBLE = BLOCKS.register("demoncrucible", () -> new BlockDemonCrucible()); + public static final RegistryObject DEMON_CRYSTALLIZER = BLOCKS.register("demoncrystallizer", () -> new BlockDemonCrystallizer()); + + public static final RegistryObject RAW_CRYSTAL_BLOCK = BLOCKS.register("rawdemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.DEFAULT)); + public static final RegistryObject CORROSIVE_CRYSTAL_BLOCK = BLOCKS.register("corrosivedemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.CORROSIVE)); + public static final RegistryObject DESTRUCTIVE_CRYSTAL_BLOCK = BLOCKS.register("destructivedemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.DESTRUCTIVE)); + public static final RegistryObject VENGEFUL_CRYSTAL_BLOCK = BLOCKS.register("vengefuldemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.VENGEFUL)); + public static final RegistryObject STEADFAST_CRYSTAL_BLOCK = BLOCKS.register("steadfastdemoncrystal", () -> new BlockDemonCrystal(EnumDemonWillType.STEADFAST)); + + public static final RegistryObject WOOD_PATH = BASICBLOCKS.register("woodbrickpath", () -> new BlockPath(2, AbstractBlock.Properties.create(Material.WOOD).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.AXE).harvestLevel(0))); + public static final RegistryObject WOOD_TILE_PATH = BASICBLOCKS.register("woodtilepath", () -> new BlockPath(2, AbstractBlock.Properties.create(Material.WOOD).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.AXE).harvestLevel(0))); + public static final RegistryObject STONE_PATH = BASICBLOCKS.register("stonebrickpath", () -> new BlockPath(4, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0))); + public static final RegistryObject STONE_TILE_PATH = BASICBLOCKS.register("stonetilepath", () -> new BlockPath(4, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0))); + public static final RegistryObject WORN_STONE_PATH = BASICBLOCKS.register("wornstonebrickpath", () -> new BlockPath(6, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0))); + public static final RegistryObject WORN_STONE_TILE_PATH = BASICBLOCKS.register("wornstonetilepath", () -> new BlockPath(6, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0))); + public static final RegistryObject OBSIDIAN_PATH = BASICBLOCKS.register("obsidianbrickpath", () -> new BlockPath(8, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(3))); + public static final RegistryObject OBSIDIAN_TILE_PATH = BASICBLOCKS.register("obsidiantilepath", () -> new BlockPath(8, AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).harvestTool(ToolType.PICKAXE).harvestLevel(3))); + + public static final RegistryObject MIMIC = BLOCKS.register("mimic", () -> new BlockMimic(Properties.create(Material.IRON).sound(SoundType.METAL).hardnessAndResistance(2.0f).setOpaque(BloodMagicBlocks::isntSolid).setSuffocates(BloodMagicBlocks::isntSolid).setBlocksVision(BloodMagicBlocks::isntSolid).notSolid())); + public static final RegistryObject ETHEREAL_MIMIC = BLOCKS.register("ethereal_mimic", () -> new BlockMimic(Properties.create(Material.IRON).sound(SoundType.METAL).hardnessAndResistance(2.0f).setOpaque(BloodMagicBlocks::isntSolid).setSuffocates(BloodMagicBlocks::isntSolid).setBlocksVision(BloodMagicBlocks::isntSolid).notSolid().doesNotBlockMovement())); + + private static ForgeFlowingFluid.Properties makeLifeEssenceProperties() + { + return new ForgeFlowingFluid.Properties(LIFE_ESSENCE_FLUID, LIFE_ESSENCE_FLUID_FLOWING, FluidAttributes.builder(FLUID_STILL, FLUID_FLOWING).overlay(new ResourceLocation("block/water_overlay")).viscosity(1).sound(SoundEvents.ITEM_BUCKET_FILL, SoundEvents.ITEM_BUCKET_EMPTY)).bucket(LIFE_ESSENCE_BUCKET).block(LIFE_ESSENCE_BLOCK); + } + + public static final ResourceLocation DOUBT_STILL_RESOURCE = new ResourceLocation("bloodmagic:block/liquid_doubt_still"); + public static final ResourceLocation DOUBT_FLOWING_RESOURCE = new ResourceLocation("bloodmagic:block/liquid_doubt_flowing"); + + private static ForgeFlowingFluid.Properties makeDoubtProperties() + { + return new ForgeFlowingFluid.Properties(DOUBT_FLUID, DOUBT_FLUID_FLOWING, FluidAttributes.builder(DOUBT_STILL_RESOURCE, DOUBT_FLOWING_RESOURCE).overlay(new ResourceLocation("block/water_overlay")).viscosity(1).sound(SoundEvents.ITEM_BUCKET_FILL, SoundEvents.ITEM_BUCKET_EMPTY)).bucket(DOUBT_BUCKET).block(DOUBT_BLOCK); + } + + public static RegistryObject LIFE_ESSENCE_FLUID = FLUIDS.register("life_essence_fluid", () -> new ForgeFlowingFluid.Source(makeLifeEssenceProperties())); + public static RegistryObject LIFE_ESSENCE_FLUID_FLOWING = FLUIDS.register("life_essence_fluid_flowing", () -> new ForgeFlowingFluid.Flowing(makeLifeEssenceProperties())); + public static RegistryObject DOUBT_FLUID = FLUIDS.register("doubt_fluid", () -> new ForgeFlowingFluid.Source(makeDoubtProperties())); + public static RegistryObject DOUBT_FLUID_FLOWING = FLUIDS.register("doubt_fluid_flowing", () -> new ForgeFlowingFluid.Flowing(makeDoubtProperties())); + + public static RegistryObject LIFE_ESSENCE_BLOCK = BLOCKS.register("life_essence_block", () -> new FlowingFluidBlock(LIFE_ESSENCE_FLUID, Block.Properties.create(net.minecraft.block.material.Material.WATER).doesNotBlockMovement().hardnessAndResistance(100.0F).noDrops())); + public static RegistryObject DOUBT_BLOCK = BLOCKS.register("doubt_block", () -> new FlowingFluidBlock(DOUBT_FLUID, Block.Properties.create(net.minecraft.block.material.Material.WATER).doesNotBlockMovement().hardnessAndResistance(100.0F).noDrops())); + public static RegistryObject LIFE_ESSENCE_BUCKET = ITEMS.register("life_essence_bucket", () -> new BucketItem(LIFE_ESSENCE_FLUID, new Item.Properties().containerItem(Items.BUCKET).maxStackSize(1).group(BloodMagic.TAB))); + public static RegistryObject DOUBT_BUCKET = ITEMS.register("doubt_bucket", () -> new BucketItem(DOUBT_FLUID, new Item.Properties().containerItem(Items.BUCKET).maxStackSize(1).group(BloodMagic.TAB))); + + public static final RegistryObject> SOUL_FORGE_CONTAINER = CONTAINERS.register("soul_forge_container", () -> IForgeContainerType.create(ContainerSoulForge::new)); + public static final RegistryObject> ARC_CONTAINER = CONTAINERS.register("arc_container", () -> IForgeContainerType.create(ContainerAlchemicalReactionChamber::new)); + public static final RegistryObject> ALCHEMY_TABLE_CONTAINER = CONTAINERS.register("alchemy_table_container", () -> IForgeContainerType.create(ContainerAlchemyTable::new)); + public static final RegistryObject> HOLDING_CONTAINER = CONTAINERS.register("holding_container", () -> IForgeContainerType.create(ContainerHolding::new)); + + // Dungeon Blocks + public static final RegistryObject DUNGEON_BRICK_1 = DUNGEONBLOCKS.register("dungeon_brick1", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_BRICK_2 = DUNGEONBLOCKS.register("dungeon_brick2", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_BRICK_3 = DUNGEONBLOCKS.register("dungeon_brick3", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_ORE = DUNGEONBLOCKS.register("dungeon_ore", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(3.0F, 3.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + + public static final RegistryObject DUNGEON_STONE = BLOCKS.register("dungeon_stone", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_EYE = DUNGEONBLOCKS.register("dungeon_eye", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool().setLightLevel((state) -> { + return 15; + }))); + public static final RegistryObject DUNGEON_POLISHED_STONE = DUNGEONBLOCKS.register("dungeon_polished", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_TILE = DUNGEONBLOCKS.register("dungeon_tile", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_SMALL_BRICK = DUNGEONBLOCKS.register("dungeon_smallbrick", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_TILE_SPECIAL = DUNGEONBLOCKS.register("dungeon_tilespecial", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + + public static final RegistryObject DUNGEON_BRICK_ASSORTED = BLOCKS.register("dungeon_brick_assorted", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(20.0F, 50.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(3).setRequiresTool())); + + public static final RegistryObject DUNGEON_BRICK_STAIRS = BLOCKS.register("dungeon_brick_stairs", () -> new StairsBlock(() -> DUNGEON_BRICK_1.get().getDefaultState(), Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_POLISHED_STAIRS = BLOCKS.register("dungeon_polished_stairs", () -> new StairsBlock(() -> DUNGEON_POLISHED_STONE.get().getDefaultState(), Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + + public static final RegistryObject DUNGEON_PILLAR_CENTER = BLOCKS.register("dungeon_pillar_center", () -> new RotatedPillarBlock(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_PILLAR_SPECIAL = BLOCKS.register("dungeon_pillar_special", () -> new RotatedPillarBlock(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_PILLAR_CAP = BLOCKS.register("dungeon_pillar_cap", () -> new BlockPillarCap(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + + public static final RegistryObject DUNGEON_BRICK_WALL = BLOCKS.register("dungeon_brick_wall", () -> new WallBlock(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_POLISHED_WALL = BLOCKS.register("dungeon_polished_wall", () -> new WallBlock(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_BRICK_GATE = BLOCKS.register("dungeon_brick_gate", () -> new FenceGateBlock(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_POLISHED_GATE = BLOCKS.register("dungeon_polished_gate", () -> new FenceGateBlock(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + + public static final RegistryObject HELLFORGED_BLOCK = DUNGEONBLOCKS.register("dungeon_metal", () -> new Block(Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + + public static final RegistryObject NETHER_SOIL = BLOCKS.register("nether_soil", () -> new BlockNetherrackSoil(Properties.create(Material.EARTH).hardnessAndResistance(0.4F, 0.4F).sound(SoundType.NETHERRACK).harvestTool(ToolType.PICKAXE).tickRandomly())); + + public static final RegistryObject GROWING_DOUBT = BLOCKS.register("creeping_doubt", () -> new BlockGrowingDoubt(Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP))); + + private static boolean isntSolid(BlockState state, IBlockReader reader, BlockPos pos) + { + return false; + } + + public static final RegistryObject SHAPED_CHARGE = BLOCKS.register("shaped_charge", () -> new BlockShapedExplosive(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); + public static final RegistryObject DEFORESTER_CHARGE = BLOCKS.register("deforester_charge", () -> new BlockDeforesterCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); + public static final RegistryObject VEINMINE_CHARGE = BLOCKS.register("veinmine_charge", () -> new BlockVeinMineCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); + public static final RegistryObject FUNGAL_CHARGE = BLOCKS.register("fungal_charge", () -> new BlockFungalCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); + + // +//// private static RegistryObject register(String name, Supplier sup, Function, Supplier> itemCreator) +//// { +//// RegistryObject ret = registerNoItem(name, sup); +//// ITEMS.register(name, itemCreator.apply(ret)); +//// return ret; +//// } +// +// private static RegistryObject register(String name, Supplier sup, Function, Supplier> itemCreator) +// { +// RegistryObject ret = registerNoItem(name, sup); +// ITEMS.register(name, itemCreator.apply(ret)); +// return ret; +// } +// +// private static RegistryObject registerNoItem(String name, Supplier sup) +// { +// return BLOCKS.register(name, sup); +// } + +// private static Supplier item(final RegistryObject block, final Supplier> renderMethod) +// { +// return () -> new BlockItem(block.get(), new Item.Properties().group(IronChests.IRONCHESTS_ITEM_GROUP).setISTER(renderMethod)); +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BloodstoneBlock.java b/src/main/java/wayoftime/bloodmagic/common/block/BloodstoneBlock.java new file mode 100644 index 00000000..ad4a9a4e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/BloodstoneBlock.java @@ -0,0 +1,13 @@ +package wayoftime.bloodmagic.common.block; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + +public class BloodstoneBlock extends Block +{ + public BloodstoneBlock() + { + super(Properties.create(Material.ROCK)); + // TODO Auto-generated constructor stub + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/block/base/BlockPillarCap.java b/src/main/java/wayoftime/bloodmagic/common/block/base/BlockPillarCap.java new file mode 100644 index 00000000..f82a16af --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/block/base/BlockPillarCap.java @@ -0,0 +1,58 @@ +package wayoftime.bloodmagic.common.block.base; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.state.DirectionProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; + +public class BlockPillarCap extends Block +{ + public static final DirectionProperty FACING = BlockStateProperties.FACING; + + public BlockPillarCap(Properties prop) + { + super(prop); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) + { + return this.getDefaultState().with(FACING, context.getFace()); + } + + /** + * Returns the blockstate with the given rotation from the passed blockstate. If + * inapplicable, returns the passed blockstate. + * + * @deprecated call via {@link IBlockState#withRotation(Rotation)} whenever + * possible. Implementing/overriding is fine. + */ + @Override + public BlockState rotate(BlockState state, Rotation rot) + { + return state.with(FACING, rot.rotate(state.get(FACING))); + } + + /** + * Returns the blockstate with the given mirror of the passed blockstate. If + * inapplicable, returns the passed blockstate. + * + * @deprecated call via {@link IBlockState#withMirror(Mirror)} whenever + * possible. Implementing/overriding is fine. + */ + @Override + public BlockState mirror(BlockState state, Mirror mirrorIn) + { + return state.rotate(mirrorIn.toRotation(state.get(FACING))); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) + { + builder.add(FACING); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBaseRecipes.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBaseRecipes.java new file mode 100644 index 00000000..aa6df377 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBaseRecipes.java @@ -0,0 +1,119 @@ +package wayoftime.bloodmagic.common.data; + +import java.util.function.Consumer; + +import net.minecraft.block.Blocks; +import net.minecraft.data.CookingRecipeBuilder; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.data.ShapedRecipeBuilder; +import net.minecraft.data.ShapelessRecipeBuilder; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.tags.ItemTags; +import net.minecraftforge.common.Tags; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.data.recipe.BaseRecipeProvider; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.core.recipe.IngredientBloodOrb; + +public class GeneratorBaseRecipes extends BaseRecipeProvider +{ + public GeneratorBaseRecipes(DataGenerator gen) + { + super(gen, BloodMagic.MODID); + } + + @Override + protected void registerRecipes(Consumer consumer) + { + addVanillaRecipes(consumer); + addVanillaSmithingRecipes(consumer); + addBloodOrbRecipes(consumer); + } + + private void addVanillaRecipes(Consumer consumer) + { +// ConditionalRecipe.builder().addRecipe(ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.SACRIFICIAL_DAGGER.get()).key('g', Tags.Items.GLASS).key('G', Tags.Items.INGOTS_GOLD).key('i', Tags.Items.INGOTS_IRON).patternLine("ggg").patternLine(" Gg").patternLine("i g").addCriterion("has_glass", hasItem(Items.GLASS))::build); + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.CORRUPTED_DUST.get()).key('s', BloodMagicTags.TINYDUST_CORRUPTED).patternLine("sss").patternLine("sss").patternLine("sss").addCriterion("has_tiny", hasItem(BloodMagicItems.CORRUPTED_DUST_TINY.get())).build(consumer, BloodMagic.rl("corrupted_dust")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.HELLFORGED_BLOCK.get()).key('s', BloodMagicTags.INGOT_HELLFORGED).patternLine("sss").patternLine("sss").patternLine("sss").addCriterion("has_hellforged", hasItem(BloodMagicItems.HELLFORGED_INGOT.get())).build(consumer, BloodMagic.rl("hellforged_block")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.SACRIFICIAL_DAGGER.get()).key('g', Tags.Items.GLASS).key('G', Tags.Items.INGOTS_GOLD).key('i', Tags.Items.INGOTS_IRON).patternLine("ggg").patternLine(" Gg").patternLine("i g").addCriterion("has_glass", hasItem(Items.GLASS)).build(consumer, BloodMagic.rl("sacrificial_dagger")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.BASE_RITUAL_DIVINER.get()).key('a', BloodMagicItems.AIR_INSCRIPTION_TOOL.get()).key('s', Tags.Items.RODS_WOODEN).key('d', Tags.Items.GEMS_DIAMOND).key('e', BloodMagicItems.EARTH_INSCRIPTION_TOOL.get()).key('f', BloodMagicItems.FIRE_INSCRIPTION_TOOL.get()).key('w', BloodMagicItems.WATER_INSCRIPTION_TOOL.get()).patternLine("dfd").patternLine("ase").patternLine("dwd").addCriterion("has_scribe", hasItem(BloodMagicItems.AIR_INSCRIPTION_TOOL.get())).build(consumer, BloodMagic.rl("ritual_diviner_0")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.DUSK_RITUAL_DIVINER.get()).key('S', BloodMagicItems.DEMONIC_SLATE.get()).key('t', BloodMagicItems.DUSK_INSCRIPTION_TOOL.get()).key('d', BloodMagicItems.BASE_RITUAL_DIVINER.get()).patternLine(" S ").patternLine("tdt").patternLine(" S ").addCriterion("has_demon_slate", hasItem(BloodMagicItems.DEMONIC_SLATE.get())).build(consumer, BloodMagic.rl("ritual_diviner_1")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLOODSTONE_BRICK.get(), 4).key('s', BloodMagicBlocks.BLOODSTONE.get()).patternLine("ss").patternLine("ss").addCriterion("has_weak_shard", hasItem(BloodMagicItems.WEAK_BLOOD_SHARD.get())).build(consumer, BloodMagic.rl("bloodstonebrick")); + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.BLOODSTONE.get(), 8).addIngredient(Tags.Items.STONE).addIngredient(BloodMagicItems.WEAK_BLOOD_SHARD.get()).addCriterion("has_weak_shard", hasItem(BloodMagicItems.WEAK_BLOOD_SHARD.get())).build(consumer, BloodMagic.rl("largebloodstonebrick")); + + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WOOD_TILE_PATH.get(), 4).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addIngredient(BloodMagicBlocks.WOOD_PATH.get()).addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_woodtile")); + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.STONE_TILE_PATH.get(), 4).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_stonetile")); + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WORN_STONE_TILE_PATH.get(), 4).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addIngredient(BloodMagicBlocks.WORN_STONE_PATH.get()).addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_wornstonetile")); + + // Changed Recipes + { +// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLOOD_ALTAR.get()).key('a', Tags.Items.STONE).key('b', Items.FURNACE).key('c', Tags.Items.INGOTS_GOLD).key('d', BloodMagicItems.MONSTER_SOUL_RAW.get()).patternLine("a a").patternLine("aba").patternLine("cdc").addCriterion("has_will", hasItem(BloodMagicItems.MONSTER_SOUL_RAW.get())).build(consumer, BloodMagic.rl("blood_altar")); +// ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.SOUL_SNARE.get(), 4).key('r', Tags.Items.DUSTS_REDSTONE).key('s', Tags.Items.STRING).key('i', Tags.Items.INGOTS_IRON).patternLine("sis").patternLine("iri").patternLine("sis").addCriterion("has_redstone", hasItem(Items.REDSTONE)).build(consumer, BloodMagic.rl("soul_snare")); +// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SOUL_FORGE.get()).key('s', Tags.Items.STONE).key('g', Tags.Items.INGOTS_GOLD).key('i', Tags.Items.INGOTS_IRON).key('o', Tags.Items.STORAGE_BLOCKS_IRON).patternLine("i i").patternLine("sgs").patternLine("sos").addCriterion("has_gold", hasItem(Items.GOLD_INGOT)).build(consumer, BloodMagic.rl("soul_forge")); + } + { + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLOOD_ALTAR.get()).key('a', Tags.Items.STONE).key('b', Items.FURNACE).key('c', Tags.Items.INGOTS_GOLD).key('d', Items.GOLD_INGOT).patternLine("a a").patternLine("aba").patternLine("cdc").addCriterion("has_gold", hasItem(Items.GOLD_INGOT)).build(consumer, BloodMagic.rl("blood_altar")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.ALCHEMY_TABLE.get()).key('b', Tags.Items.INGOTS_IRON).key('s', Tags.Items.STONE).key('w', ItemTags.PLANKS).key('g', Tags.Items.INGOTS_GOLD).key('o', BloodMagicItems.SLATE.get()).patternLine("sss").patternLine("wbw").patternLine("gog").addCriterion("has_blank_slate", hasItem(BloodMagicItems.SLATE.get())).build(consumer, BloodMagic.rl("alchemy_table")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SOUL_FORGE.get()).key('s', Tags.Items.STONE).key('S', BloodMagicItems.SLATE.get()).key('i', Tags.Items.INGOTS_IRON).key('o', Tags.Items.STORAGE_BLOCKS_IRON).patternLine("i i").patternLine("sSs").patternLine("sos").addCriterion("has_blank_slate", hasItem(BloodMagicItems.SLATE.get())).build(consumer, BloodMagic.rl("soul_forge")); + } + } + + private void addVanillaSmithingRecipes(Consumer consumer) + { + String basePath = "smelting/"; + CookingRecipeBuilder.smeltingRecipe(Ingredient.fromTag(BloodMagicTags.DUST_IRON), Items.IRON_INGOT, 0, 200).addCriterion("has_iron_sand", hasItem(BloodMagicItems.IRON_SAND.get())).build(consumer, BloodMagic.rl(basePath + "ingot_iron")); + CookingRecipeBuilder.smeltingRecipe(Ingredient.fromTag(BloodMagicTags.DUST_GOLD), Items.GOLD_INGOT, 0, 200).addCriterion("has_gold_sand", hasItem(BloodMagicItems.GOLD_SAND.get())).build(consumer, BloodMagic.rl(basePath + "ingot_gold")); + CookingRecipeBuilder.smeltingRecipe(Ingredient.fromTag(BloodMagicTags.DUST_NETHERITE_SCRAP), Items.NETHERITE_SCRAP, 0, 200).addCriterion("has_netherite_dust", hasItem(BloodMagicItems.NETHERITE_SCRAP_SAND.get())).build(consumer, BloodMagic.rl(basePath + "ingot_netherite_scrap")); + CookingRecipeBuilder.smeltingRecipe(Ingredient.fromTag(BloodMagicTags.DUST_HELLFORGED), BloodMagicItems.HELLFORGED_INGOT.get(), 0, 200).addCriterion("has_hellforged_dust", hasItem(BloodMagicItems.HELLFORGED_SAND.get())).build(consumer, BloodMagic.rl(basePath + "ingot_hellforged")); + } + + private void addBloodOrbRecipes(Consumer consumer) + { + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.INCENSE_ALTAR.get()).key('s', Tags.Items.STONE).key('c', Tags.Items.COBBLESTONE).key('h', Items.CHARCOAL).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("s s").patternLine("shs").patternLine("coc").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("incense_altar")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLANK_RUNE.get()).key('a', Tags.Items.STONE).key('s', Ingredient.fromItems(BloodMagicItems.SLATE.get())).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("asa").patternLine("aoa").patternLine("aaa").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_blank")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SPEED_RUNE.get()).key('a', Tags.Items.STONE).key('b', Ingredient.fromItems(BloodMagicItems.SLATE.get())).key('c', Ingredient.fromItems(Items.SUGAR)).key('d', BloodMagicBlocks.BLANK_RUNE.get()).patternLine("aba").patternLine("cdc").patternLine("aba").addCriterion("has_blank_rune", hasItem(BloodMagicItems.BLANK_RUNE_ITEM.get())).build(consumer, BloodMagic.rl("blood_rune_speed")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SACRIFICE_RUNE.get()).key('a', Tags.Items.STONE).key('b', BloodMagicItems.REINFORCED_SLATE.get()).key('c', Tags.Items.INGOTS_GOLD).key('d', BloodMagicBlocks.BLANK_RUNE.get()).key('e', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_APPRENTICE.get())).patternLine("aba").patternLine("cdc").patternLine("aea").addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_sacrifice")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SELF_SACRIFICE_RUNE.get()).key('a', Tags.Items.STONE).key('b', Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get())).key('c', Ingredient.fromItems(Items.GLOWSTONE_DUST)).key('d', Ingredient.fromItems(BloodMagicItems.BLANK_RUNE_ITEM.get())).key('e', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_APPRENTICE.get())).patternLine("aba").patternLine("cdc").patternLine("aea").addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_self_sacrifice")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.CAPACITY_RUNE.get()).key('a', Tags.Items.STONE).key('b', Items.BUCKET).key('c', BloodMagicBlocks.BLANK_RUNE.get()).key('d', BloodMagicItems.IMBUED_SLATE.get()).patternLine("aba").patternLine("bcb").patternLine("ada").addCriterion("has_imbued_slate", hasItem(BloodMagicItems.IMBUED_SLATE.get())).build(consumer, BloodMagic.rl("blood_rune_capacity")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.ORB_RUNE.get()).key('a', Tags.Items.STONE).key('b', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).key('c', BloodMagicBlocks.BLANK_RUNE.get()).key('d', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).patternLine("aba").patternLine("cdc").patternLine("aba").addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_orb")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.CHARGING_RUNE.get()).key('R', Tags.Items.DUSTS_REDSTONE).key('r', BloodMagicBlocks.BLANK_RUNE.get()).key('s', BloodMagicItems.DEMONIC_SLATE.get()).key('e', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).key('G', Tags.Items.DUSTS_GLOWSTONE).patternLine("RsR").patternLine("GrG").patternLine("ReR").addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_charging")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.DISPLACEMENT_RUNE.get()).key('a', Tags.Items.STONE).key('b', Items.WATER_BUCKET).key('c', BloodMagicBlocks.BLANK_RUNE.get()).key('d', BloodMagicItems.IMBUED_SLATE.get()).patternLine("aba").patternLine("bcb").patternLine("ada").addCriterion("has_imbued_slate", hasItem(BloodMagicItems.IMBUED_SLATE.get())).build(consumer, BloodMagic.rl("blood_rune_displacement")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.AUGMENTED_CAPACITY_RUNE.get()).key('a', Tags.Items.OBSIDIAN).key('b', BloodMagicItems.DEMONIC_SLATE.get()).key('c', Items.BUCKET).key('d', BloodMagicBlocks.CAPACITY_RUNE.get()).key('e', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).patternLine("aba").patternLine("cdc").patternLine("aea").addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_aug_capacity")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.ACCELERATION_RUNE.get()).key('a', Items.BUCKET).key('b', BloodMagicItems.DEMONIC_SLATE.get()).key('c', Tags.Items.INGOTS_GOLD).key('d', BloodMagicBlocks.SPEED_RUNE.get()).key('e', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).patternLine("aba").patternLine("cdc").patternLine("aea").addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("blood_rune_acceleration")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.BLANK_RITUAL_STONE.get(), 4).key('a', Tags.Items.OBSIDIAN).key('b', BloodMagicItems.REINFORCED_SLATE.get()).key('c', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_APPRENTICE.get())).patternLine("aba").patternLine("bcb").patternLine("aba").addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("ritual_stone_blank")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.MASTER_RITUAL_STONE.get()).key('a', Tags.Items.OBSIDIAN).key('b', BloodMagicBlocks.BLANK_RITUAL_STONE.get()).key('c', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).patternLine("aba").patternLine("bcb").patternLine("aba").addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("ritual_stone_master")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()).key('s', Tags.Items.STONE).key('f', Blocks.FURNACE).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).key('I', Tags.Items.STORAGE_BLOCKS_IRON).key('S', BloodMagicItems.IMBUED_SLATE.get()).patternLine("sss").patternLine("SoS").patternLine("IfI").addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("arc")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.PRIMITIVE_FURNACE_CELL.get()).key('c', Tags.Items.COBBLESTONE).key('f', Tags.Items.STORAGE_BLOCKS_COAL).key('s', Ingredient.fromItems(BloodMagicItems.SLATE.get())).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).patternLine("csc").patternLine("cfc").patternLine("coc").addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("primitive_furnace_cell")); + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.LAVA_CRYSTAL.get()).key('a', Tags.Items.GLASS).key('b', Items.LAVA_BUCKET).key('c', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).key('d', Tags.Items.OBSIDIAN).key('e', Tags.Items.GEMS_DIAMOND).patternLine("aba").patternLine("bcb").patternLine("ded").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("lava_crystal")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.PRIMITIVE_HYDRATION_CELL.get()).key('B', Items.WATER_BUCKET).key('c', Tags.Items.COBBLESTONE).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).key('s', BloodMagicItems.SLATE.get()).patternLine("csc").patternLine("cBc").patternLine("coc").addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("primitive_hydration_cell")); + + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WOOD_PATH.get(), 4).addIngredient(ItemTags.PLANKS).addIngredient(ItemTags.PLANKS).addIngredient(ItemTags.PLANKS).addIngredient(ItemTags.PLANKS).addIngredient(IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_APPRENTICE.get())).addCriterion("has_apprentice_orb", hasItem(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_wood")); + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.STONE_PATH.get(), 4).addIngredient(Tags.Items.STONE).addIngredient(Tags.Items.STONE).addIngredient(Tags.Items.STONE).addIngredient(Tags.Items.STONE).addIngredient(IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_stone")); + ShapelessRecipeBuilder.shapelessRecipe(BloodMagicBlocks.WORN_STONE_PATH.get(), 4).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(BloodMagicBlocks.STONE_PATH.get()).addIngredient(IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("path/path_wornstone")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.RITUAL_READER.get()).key('s', BloodMagicItems.DEMONIC_SLATE.get()).key('g', Tags.Items.GLASS).key('i', Tags.Items.INGOTS_GOLD).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MASTER.get())).patternLine("gog").patternLine("isi").patternLine(" s ").addCriterion("has_master_orb", hasItem(BloodMagicItems.MASTER_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("ritual_reader")); + + ShapedRecipeBuilder.shapedRecipe(BloodMagicItems.EXPERIENCE_TOME.get()).key('b', Items.ENCHANTED_BOOK).key('s', Tags.Items.STRING).key('e', Tags.Items.STORAGE_BLOCKS_LAPIS).key('g', Tags.Items.INGOTS_GOLD).key('l', BloodMagicItems.IMBUED_SLATE.get()).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_MAGICIAN.get())).patternLine("ses").patternLine("lbl").patternLine("gog").addCriterion("has_magician_orb", hasItem(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("experience_tome")); +// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.MIMIC.get()).key('b', itemIn) +// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SPEED_RUNE.get()).key('s', Items.GLASS).key('o', Ingredient.fromItems(Items.DIAMOND)).patternLine("sss").patternLine("sos").patternLine("sss").addCriterion("has_diamond", hasItem(Items.DIAMOND)).build(consumer, new ResourceLocation(BloodMagic.MODID, "speed_rune_from_standard")); +// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.SPEED_RUNE.get()).key('s', Items.GLASS).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("sss").patternLine("sos").patternLine("sss").addCriterion("has_diamond", hasItem(Items.DIAMOND)).build(consumer, new ResourceLocation(BloodMagic.MODID, "speed_rune_from_orb")); + + // Changed Recipes + { +// ShapedRecipeBuilder.shapedRecipe(BloodMagicBlocks.ALCHEMY_TABLE.get()).key('b', Tags.Items.RODS_BLAZE).key('s', Tags.Items.STONE).key('w', ItemTags.PLANKS).key('g', Tags.Items.INGOTS_GOLD).key('o', IngredientBloodOrb.fromOrb(BloodMagicItems.ORB_WEAK.get())).patternLine("sss").patternLine("wbw").patternLine("gog").addCriterion("has_weak_orb", hasItem(BloodMagicItems.WEAK_BLOOD_ORB.get())).build(consumer, BloodMagic.rl("alchemy_table")); + + } + { + + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBlockStates.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBlockStates.java new file mode 100644 index 00000000..3e2ee25f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBlockStates.java @@ -0,0 +1,357 @@ +package wayoftime.bloodmagic.common.data; + +import net.minecraft.block.Block; +import net.minecraft.block.CropsBlock; +import net.minecraft.block.FenceGateBlock; +import net.minecraft.block.RotatedPillarBlock; +import net.minecraft.block.StairsBlock; +import net.minecraft.block.WallBlock; +import net.minecraft.data.DataGenerator; +import net.minecraft.state.IntegerProperty; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.generators.BlockModelBuilder; +import net.minecraftforge.client.model.generators.BlockStateProvider; +import net.minecraftforge.client.model.generators.ConfiguredModel; +import net.minecraftforge.client.model.generators.ConfiguredModel.Builder; +import net.minecraftforge.client.model.generators.ModelBuilder.ElementBuilder; +import net.minecraftforge.client.model.generators.ModelBuilder.FaceRotation; +import net.minecraftforge.client.model.generators.ModelFile; +import net.minecraftforge.client.model.generators.MultiPartBlockStateBuilder; +import net.minecraftforge.client.model.generators.MultiPartBlockStateBuilder.PartBuilder; +import net.minecraftforge.client.model.generators.VariantBlockStateBuilder; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BlockAlchemicalReactionChamber; +import wayoftime.bloodmagic.common.block.BlockDemonCrystal; +import wayoftime.bloodmagic.common.block.BlockShapedExplosive; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.block.base.BlockPillarCap; + +public class GeneratorBlockStates extends BlockStateProvider +{ + public GeneratorBlockStates(DataGenerator gen, ExistingFileHelper exFileHelper) + { + super(gen, BloodMagic.MODID, exFileHelper); + } + + @Override + protected void registerStatesAndModels() + { +// buildCubeAll(BloodMagicBlocks.TARTARICFORGE.get()); +// buildCubeAll(BloodMagicBlocks.SPEED_RUNE.get()); + + for (RegistryObject block : BloodMagicBlocks.BASICBLOCKS.getEntries()) + { + buildCubeAll(block.get()); + } + + for (RegistryObject block : BloodMagicBlocks.DUNGEONBLOCKS.getEntries()) + { + buildDungeonBlock(block.get()); + } + + buildCubeAll(BloodMagicBlocks.BLOOD_LIGHT.get()); + buildCubeAll(BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + buildCubeAll(BloodMagicBlocks.AIR_RITUAL_STONE.get()); + buildCubeAll(BloodMagicBlocks.WATER_RITUAL_STONE.get()); + buildCubeAll(BloodMagicBlocks.FIRE_RITUAL_STONE.get()); + buildCubeAll(BloodMagicBlocks.EARTH_RITUAL_STONE.get()); + buildCubeAll(BloodMagicBlocks.DUSK_RITUAL_STONE.get()); + buildCubeAll(BloodMagicBlocks.DAWN_RITUAL_STONE.get()); + buildFarmland(BloodMagicBlocks.NETHER_SOIL.get(), BloodMagic.rl("block/nether_soil"), new ResourceLocation("block/netherrack")); + + buildFurnace(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()); + + buildCrystal(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(), "defaultcrystal"); + buildCrystal(BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get(), "corrosivecrystal"); + buildCrystal(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get(), "destructivecrystal"); + buildCrystal(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get(), "vengefulcrystal"); + buildCrystal(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get(), "steadfastcrystal"); + + buildRandomStone(BloodMagicBlocks.DUNGEON_STONE.get(), BloodMagic.rl("block/dungeon/dungeon_stone")); + stairsBlock((StairsBlock) BloodMagicBlocks.DUNGEON_BRICK_STAIRS.get(), BloodMagic.rl("block/dungeon/dungeon_brick1")); + stairsBlock((StairsBlock) BloodMagicBlocks.DUNGEON_POLISHED_STAIRS.get(), BloodMagic.rl("block/dungeon/dungeon_polished")); + buildPillarCenter(BloodMagicBlocks.DUNGEON_PILLAR_CENTER.get(), BloodMagic.rl("block/dungeon/dungeon_pillar"), BloodMagic.rl("block/dungeon/dungeon_pillarheart")); + buildPillarCenter(BloodMagicBlocks.DUNGEON_PILLAR_SPECIAL.get(), BloodMagic.rl("block/dungeon/dungeon_pillarspecial"), BloodMagic.rl("block/dungeon/dungeon_pillarheart")); + buildWallInventory((WallBlock) BloodMagicBlocks.DUNGEON_BRICK_WALL.get(), BloodMagic.rl("block/dungeon/dungeon_brick1")); + buildWallInventory((WallBlock) BloodMagicBlocks.DUNGEON_POLISHED_WALL.get(), BloodMagic.rl("block/dungeon/dungeon_polished")); + fenceGateBlock((FenceGateBlock) BloodMagicBlocks.DUNGEON_BRICK_GATE.get(), BloodMagic.rl("block/dungeon/dungeon_brick1")); + fenceGateBlock((FenceGateBlock) BloodMagicBlocks.DUNGEON_POLISHED_GATE.get(), BloodMagic.rl("block/dungeon/dungeon_polished")); + + buildPillarCap(BloodMagicBlocks.DUNGEON_PILLAR_CAP.get(), BloodMagic.rl("block/dungeon/dungeon_pillarheart"), BloodMagic.rl("block/dungeon/dungeon_pillarbottom"), BloodMagic.rl("block/dungeon/dungeon_pillartop")); + + buildAssortedBlock(BloodMagicBlocks.DUNGEON_BRICK_ASSORTED.get(), modLoc("dungeon_brick1"), modLoc("dungeon_brick2"), modLoc("dungeon_brick3")); + + buildCubeAllWithTextureName("etherealopaquemimic"); + buildCubeAllWithTextureName("sentientmimic"); + buildCubeAllWithTextureName("solidclearmimic"); + buildCubeAllWithTextureName("solidlightmimic"); + buildCubeAllWithTextureName("solidopaquemimic"); + + buildCrop(BloodMagicBlocks.GROWING_DOUBT.get(), CropsBlock.AGE, 7, BloodMagic.rl("block/creeping_doubt_1"), BloodMagic.rl("block/creeping_doubt_2"), BloodMagic.rl("block/creeping_doubt_3"), BloodMagic.rl("block/creeping_doubt_4"), BloodMagic.rl("block/creeping_doubt_5"), BloodMagic.rl("block/creeping_doubt_6"), BloodMagic.rl("block/creeping_doubt_7"), BloodMagic.rl("block/creeping_doubt_8")); + + buildOrientable(BloodMagicBlocks.SHAPED_CHARGE.get(), "shaped_charge", modLoc("block/sub/shaped_charge"), modLoc("block/dungeon/dungeon_stone"), modLoc("block/dungeon/dungeon_tile"), modLoc("block/blankrune"), modLoc("block/largebloodstonebrick"), modLoc("models/defaultcrystal")); + buildOrientable(BloodMagicBlocks.DEFORESTER_CHARGE.get(), "deforester_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/oak_log_top"), new ResourceLocation("block/oak_log_top"), modLoc("block/blankrune"), new ResourceLocation("block/oak_planks"), modLoc("models/defaultcrystal")); + buildOrientable(BloodMagicBlocks.VEINMINE_CHARGE.get(), "veinmine_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/sandstone_bottom"), new ResourceLocation("block/sandstone_bottom"), modLoc("block/blankrune"), new ResourceLocation("block/sand"), modLoc("models/defaultcrystal")); + buildOrientable(BloodMagicBlocks.FUNGAL_CHARGE.get(), "fungal_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/nether_wart_block"), new ResourceLocation("block/crimson_planks"), modLoc("block/blankrune"), new ResourceLocation("block/crimson_stem"), modLoc("models/defaultcrystal")); + } + + private void buildOrientable(Block block, String name, ResourceLocation modelPath, ResourceLocation base, ResourceLocation edges, ResourceLocation centerCap, ResourceLocation binding, ResourceLocation core) + { +// ModelFile furnace_off = models().orientableWithBottom("alchemicalreactionchamber", BloodMagic.rl("block/arc_side"), BloodMagic.rl("block/arc_front"), BloodMagic.rl("block/arc_bottom"), BloodMagic.rl("block/arc_top")); +// getVariantBuilder(block).addModels(block.getDefaultState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, false), furnaceModel); + ModelFile model = models().withExistingParent(name, modelPath).texture("1", edges).texture("3", base).texture("4", centerCap).texture("5", binding).texture("6", core).texture("particle", core); + + VariantBlockStateBuilder builder = getVariantBuilder(block); + + builder.partialState().with(BlockShapedExplosive.ATTACHED, Direction.UP).modelForState().modelFile(model).addModel(); + builder.partialState().with(BlockShapedExplosive.ATTACHED, Direction.DOWN).modelForState().modelFile(model).rotationX(180).addModel(); + builder.partialState().with(BlockShapedExplosive.ATTACHED, Direction.EAST).modelForState().modelFile(model).rotationX(90).rotationY(90).addModel(); + builder.partialState().with(BlockShapedExplosive.ATTACHED, Direction.WEST).modelForState().modelFile(model).rotationX(90).rotationY(270).addModel(); + builder.partialState().with(BlockShapedExplosive.ATTACHED, Direction.NORTH).modelForState().modelFile(model).rotationX(90).addModel(); + builder.partialState().with(BlockShapedExplosive.ATTACHED, Direction.SOUTH).modelForState().modelFile(model).rotationX(270).addModel(); + } + + private void buildCrop(Block block, IntegerProperty prop, int maxAge, ResourceLocation... textures) + { + String basePath = block.getRegistryName().getPath(); + VariantBlockStateBuilder builder = getVariantBuilder(block); + + for (int i = 0; i <= maxAge; i++) + { + ModelFile modelFile = models().crop(basePath + "_" + (i + 1), textures[i]); + builder.partialState().with(prop, i).modelForState().modelFile(modelFile).addModel(); + } + } + + private void buildFarmland(Block block, ResourceLocation top, ResourceLocation side) + { + String basePath = block.getRegistryName().getPath(); + getVariantBuilder(block).forAllStates(state -> { + Builder builder = ConfiguredModel.builder(); + + ModelFile file = models().withExistingParent(basePath, "template_farmland").texture("top", top).texture("dirt", side); + + return builder.modelFile(file).build(); + }); + } + + private void buildCubeAllWithTextureName(String texture) + { + models().cubeAll(texture, BloodMagic.rl("block/" + texture)).assertExistence(); + } + + private void buildAssortedBlock(Block block, ResourceLocation... modelResources) + { + getVariantBuilder(block).forAllStates(state -> { + Builder builder = ConfiguredModel.builder(); + + for (int i = 0; i < modelResources.length; i++) + { + ResourceLocation location = modelResources[i]; + ModelFile file = models().getExistingFile(location); + if (i < modelResources.length - 1) + { + builder = builder.modelFile(file).nextModel(); + } else + { + builder = builder.modelFile(file); + } + } + + return builder.build(); + }); + } + + private void buildRandomStone(Block block, ResourceLocation texture) + { + String basePath = block.getRegistryName().getPath(); + ModelFile modelFile = models().cubeAll(basePath, texture); + ModelFile modelFile_mirrored = models().withExistingParent(basePath + "_mirrored", "cube_mirrored_all").texture("all", texture); + getVariantBuilder(block).forAllStates(state -> ConfiguredModel.builder().modelFile(modelFile).nextModel().modelFile(modelFile_mirrored).nextModel().modelFile(modelFile).rotationY(180).nextModel().modelFile(modelFile_mirrored).rotationY(180).build()); + } + + private void buildWallInventory(WallBlock block, ResourceLocation texture) + { + String basePath = block.getRegistryName().getPath(); + wallBlock(block, texture); + ModelFile file = models().wallInventory(basePath + "_inventory", texture); + file.assertExistence(); + } + + private void buildDungeonBlock(Block block) + { + String basePath = block.getRegistryName().getPath(); + ModelFile modelFile = models().cubeAll(basePath, BloodMagic.rl("block/dungeon/" + basePath)); + getVariantBuilder(block).forAllStates(state -> ConfiguredModel.builder().modelFile(modelFile).build()); +// ModelFile furnace_off = models().cubeAll(block.getRegistryName().toString(), texture)\ + } + + private void buildPillarCenter(Block block, ResourceLocation side, ResourceLocation pillarEnd) + { + String basePath = block.getRegistryName().getPath(); + ModelFile yModel = models().cubeColumn(basePath, side, pillarEnd); + + ElementBuilder xElementBuilder = models().withExistingParent(basePath + "_x", "cube").texture("particle", side).texture("end", pillarEnd).texture("side", side).element(); + xElementBuilder.face(Direction.UP).uvs(0, 0, 16, 16).texture("#side").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + xElementBuilder.face(Direction.DOWN).uvs(0, 0, 16, 16).texture("#side").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + xElementBuilder.face(Direction.NORTH).uvs(0, 0, 16, 16).texture("#side").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + xElementBuilder.face(Direction.SOUTH).uvs(0, 0, 16, 16).texture("#side").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + xElementBuilder.face(Direction.WEST).uvs(16, 0, 0, 16).texture("#end").end(); + xElementBuilder.face(Direction.EAST).uvs(16, 0, 0, 16).texture("#end").end(); + ModelFile xModel = xElementBuilder.end(); + + ElementBuilder zElementBuilder = models().withExistingParent(basePath + "_z", "cube").texture("particle", side).texture("end", pillarEnd).texture("side", side).element(); + zElementBuilder.face(Direction.UP).uvs(0, 0, 16, 16).texture("#side").end(); + zElementBuilder.face(Direction.DOWN).uvs(0, 0, 16, 16).texture("#side").end(); + zElementBuilder.face(Direction.NORTH).uvs(0, 0, 16, 16).texture("#end").end(); + zElementBuilder.face(Direction.SOUTH).uvs(0, 0, 16, 16).texture("#end").end(); + zElementBuilder.face(Direction.WEST).uvs(16, 0, 0, 16).texture("#side").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + zElementBuilder.face(Direction.EAST).uvs(16, 0, 0, 16).texture("#side").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + ModelFile zModel = zElementBuilder.end(); + + VariantBlockStateBuilder builder = getVariantBuilder(block); + builder.partialState().with(RotatedPillarBlock.AXIS, Direction.Axis.X).modelForState().modelFile(xModel).addModel(); + builder.partialState().with(RotatedPillarBlock.AXIS, Direction.Axis.Y).modelForState().modelFile(yModel).addModel(); + builder.partialState().with(RotatedPillarBlock.AXIS, Direction.Axis.Z).modelForState().modelFile(zModel).addModel(); + } + + private void buildPillarCap(Block block, ResourceLocation pillarEnd, ResourceLocation sideBottom, ResourceLocation sideTop) + { + String basePath = block.getRegistryName().getPath(); + ModelFile upModel = models().cubeBottomTop(basePath, sideTop, pillarEnd, pillarEnd); + ModelFile downModel = models().cubeBottomTop(basePath + "_down", sideBottom, pillarEnd, pillarEnd); + + ElementBuilder northElementBuilder = models().withExistingParent(basePath + "_north", "cube").texture("particle", pillarEnd).texture("sideBottom", sideBottom).texture("end", pillarEnd).texture("sideTop", sideTop).element(); + northElementBuilder.face(Direction.UP).uvs(0, 0, 16, 16).texture("#sideTop").end(); + northElementBuilder.face(Direction.DOWN).uvs(0, 0, 16, 16).texture("#sideBottom").end(); + northElementBuilder.face(Direction.NORTH).uvs(0, 0, 16, 16).texture("#end").end(); + northElementBuilder.face(Direction.SOUTH).uvs(0, 0, 16, 16).texture("#end").end(); + northElementBuilder.face(Direction.WEST).uvs(16, 0, 0, 16).texture("#sideTop").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + northElementBuilder.face(Direction.EAST).uvs(16, 0, 0, 16).texture("#sideBottom").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + ModelFile northModel = northElementBuilder.end(); + + ElementBuilder southElementBuilder = models().withExistingParent(basePath + "_south", "cube").texture("particle", pillarEnd).texture("sideBottom", sideBottom).texture("end", pillarEnd).texture("sideTop", sideTop).element(); + southElementBuilder.face(Direction.UP).uvs(0, 0, 16, 16).texture("#sideBottom").end(); + southElementBuilder.face(Direction.DOWN).uvs(0, 0, 16, 16).texture("#sideTop").end(); + southElementBuilder.face(Direction.NORTH).uvs(0, 0, 16, 16).texture("#end").end(); + southElementBuilder.face(Direction.SOUTH).uvs(0, 0, 16, 16).texture("#end").end(); + southElementBuilder.face(Direction.WEST).uvs(16, 0, 0, 16).texture("#sideBottom").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + southElementBuilder.face(Direction.EAST).uvs(16, 0, 0, 16).texture("#sideTop").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + ModelFile southModel = southElementBuilder.end(); + + ElementBuilder westElementBuilder = models().withExistingParent(basePath + "_west", "cube").texture("particle", pillarEnd).texture("sideBottom", sideBottom).texture("end", pillarEnd).texture("sideTop", sideTop).element(); + westElementBuilder.face(Direction.UP).uvs(0, 0, 16, 16).texture("#sideTop").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + westElementBuilder.face(Direction.DOWN).uvs(0, 0, 16, 16).texture("#sideTop").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + westElementBuilder.face(Direction.NORTH).uvs(0, 0, 16, 16).texture("#sideBottom").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + westElementBuilder.face(Direction.SOUTH).uvs(0, 0, 16, 16).texture("#sideTop").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + westElementBuilder.face(Direction.WEST).uvs(16, 0, 0, 16).texture("#end").end(); + westElementBuilder.face(Direction.EAST).uvs(16, 0, 0, 16).texture("#end").end(); + ModelFile westModel = westElementBuilder.end(); + + ElementBuilder eastElementBuilder = models().withExistingParent(basePath + "_east", "cube").texture("particle", pillarEnd).texture("sideBottom", sideBottom).texture("end", pillarEnd).texture("sideTop", sideTop).element(); + eastElementBuilder.face(Direction.UP).uvs(0, 0, 16, 16).texture("#sideBottom").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + eastElementBuilder.face(Direction.DOWN).uvs(0, 0, 16, 16).texture("#sideBottom").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + eastElementBuilder.face(Direction.NORTH).uvs(0, 0, 16, 16).texture("#sideTop").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + eastElementBuilder.face(Direction.SOUTH).uvs(0, 0, 16, 16).texture("#sideBottom").rotation(FaceRotation.COUNTERCLOCKWISE_90).end(); + eastElementBuilder.face(Direction.WEST).uvs(16, 0, 0, 16).texture("#end").end(); + eastElementBuilder.face(Direction.EAST).uvs(16, 0, 0, 16).texture("#end").end(); + ModelFile eastModel = eastElementBuilder.end(); + + VariantBlockStateBuilder builder = getVariantBuilder(block); + builder.partialState().with(BlockPillarCap.FACING, Direction.UP).modelForState().modelFile(upModel).addModel(); + builder.partialState().with(BlockPillarCap.FACING, Direction.DOWN).modelForState().modelFile(downModel).addModel(); + builder.partialState().with(BlockPillarCap.FACING, Direction.NORTH).modelForState().modelFile(northModel).addModel(); + builder.partialState().with(BlockPillarCap.FACING, Direction.SOUTH).modelForState().modelFile(southModel).addModel(); + builder.partialState().with(BlockPillarCap.FACING, Direction.WEST).modelForState().modelFile(westModel).addModel(); + builder.partialState().with(BlockPillarCap.FACING, Direction.EAST).modelForState().modelFile(eastModel).addModel(); + } + + private BlockModelBuilder rotateTextureFace(BlockModelBuilder file, Direction face, FaceRotation rotation, String texture) + { +// BiConsumer.ElementBuilder.FaceBuilder> biCon = (fc, rot) -> { +// rot.rotation(rotation).texture(texture); +// }; + return file.element().face(face).uvs(16, 0, 0, 16).rotation(rotation).texture("#east").end().end(); +// return file.element().faces(biCon).texture("#east").end(); + } + + private void buildCubeAll(Block block) + { + getVariantBuilder(block).forAllStates(state -> ConfiguredModel.builder().modelFile(cubeAll(block)).build()); + } + +// private void buildStairs(StairsBlock block, ResourceLocation texture) +// { +// getVariantBuilder(block).forAllStates(state -> ConfiguredModel.builder().modelFile(stairsBlock(block, texture)).build()); +// } + + private void buildCrystal(Block block, String name) + { + MultiPartBlockStateBuilder builder = getMultipartBuilder(block); + + ModelFile[] crystalModels = new ModelFile[7]; + for (int i = 0; i < 7; i++) + { + crystalModels[i] = models().withExistingParent("block/crystal/" + name + (i + 1), modLoc("crystal" + (i + 1))).texture("crystal", modLoc("models/" + name)); + } + + for (int i = 0; i < 7; i++) + { + Integer[] intArray = new Integer[7 - i]; + for (int j = i; j < 7; j++) + { + intArray[j - i] = j; + } + + for (Direction direction : Direction.values()) + { + Builder partBuilder = builder.part().modelFile(crystalModels[i]); + switch (direction) + { + case UP: + break; + case DOWN: + partBuilder = partBuilder.rotationX(180); + break; + case EAST: + partBuilder = partBuilder.rotationX(90).rotationY(90); + break; + case WEST: + partBuilder = partBuilder.rotationX(90).rotationY(270); + break; + case NORTH: + partBuilder = partBuilder.rotationX(90); + break; + case SOUTH: + partBuilder = partBuilder.rotationX(270); + break; + } + + partBuilder.addModel().condition(BlockDemonCrystal.AGE, intArray).condition(BlockDemonCrystal.ATTACHED, direction).end(); + } + } + } + + private void buildFurnace(Block block) + { +// ConfiguredModel[] furnaceModel = ConfiguredModel.builder().modelFile().build(); + ModelFile furnace_off = models().orientableWithBottom("alchemicalreactionchamber", BloodMagic.rl("block/arc_side"), BloodMagic.rl("block/arc_front"), BloodMagic.rl("block/arc_bottom"), BloodMagic.rl("block/arc_top")); +// getVariantBuilder(block).addModels(block.getDefaultState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, false), furnaceModel); + + VariantBlockStateBuilder builder = getVariantBuilder(block); + + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.EAST).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).rotationY(90).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.SOUTH).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).rotationY(180).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.WEST).with(BlockAlchemicalReactionChamber.LIT, false).modelForState().modelFile(furnace_off).rotationY(270).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.NORTH).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.EAST).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).rotationY(90).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.SOUTH).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).rotationY(180).addModel(); + builder.partialState().with(BlockAlchemicalReactionChamber.FACING, Direction.WEST).with(BlockAlchemicalReactionChamber.LIT, true).modelForState().modelFile(furnace_off).rotationY(270).addModel(); + +// getVariantBuilder(block). + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBlockTags.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBlockTags.java new file mode 100644 index 00000000..1e464bc6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorBlockTags.java @@ -0,0 +1,48 @@ +package wayoftime.bloodmagic.common.data; + +import java.nio.file.Path; + +import net.minecraft.block.Blocks; +import net.minecraft.data.BlockTagsProvider; +import net.minecraft.data.DataGenerator; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.data.ExistingFileHelper; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class GeneratorBlockTags extends BlockTagsProvider +{ + public GeneratorBlockTags(DataGenerator generatorIn, ExistingFileHelper exFileHelper) + { + super(generatorIn, BloodMagic.MODID, exFileHelper); + } + + @Override + public void registerTags() + { + this.getOrCreateBuilder(BlockTags.WALLS).add(BloodMagicBlocks.DUNGEON_BRICK_WALL.get()); + this.getOrCreateBuilder(BlockTags.WALLS).add(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get()); + this.getOrCreateBuilder(BloodMagicTags.Blocks.MUSHROOM_STEM).add(Blocks.MUSHROOM_STEM).add(Blocks.CRIMSON_STEM).add(Blocks.WARPED_STEM); + this.getOrCreateBuilder(BloodMagicTags.Blocks.MUSHROOM_HYPHAE).add(Blocks.BROWN_MUSHROOM_BLOCK).add(Blocks.RED_MUSHROOM_BLOCK).add(Blocks.CRIMSON_HYPHAE).add(Blocks.WARPED_HYPHAE).add(Blocks.STRIPPED_CRIMSON_HYPHAE).add(Blocks.STRIPPED_WARPED_HYPHAE).add(Blocks.NETHER_WART_BLOCK).add(Blocks.WARPED_WART_BLOCK).add(Blocks.SHROOMLIGHT); + } + + /** + * Resolves a Path for the location to save the given tag. + */ + @Override + protected Path makePath(ResourceLocation id) + { + return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json"); + } + + /** + * Gets a name for this provider, to use in logging. + */ + @Override + public String getName() + { + return "Block Tags"; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorFluidTags.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorFluidTags.java new file mode 100644 index 00000000..df5c4ac1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorFluidTags.java @@ -0,0 +1,22 @@ +package wayoftime.bloodmagic.common.data; + +import net.minecraft.data.DataGenerator; +import net.minecraft.data.FluidTagsProvider; +import net.minecraftforge.common.data.ExistingFileHelper; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class GeneratorFluidTags extends FluidTagsProvider +{ + public GeneratorFluidTags(DataGenerator generatorIn, ExistingFileHelper existingFileHelper) + { + super(generatorIn, BloodMagic.MODID, existingFileHelper); + } + + @Override + public void registerTags() + { + this.getOrCreateBuilder(BloodMagicTags.LIFE_ESSENCE).add(BloodMagicBlocks.LIFE_ESSENCE_FLUID.get(), BloodMagicBlocks.LIFE_ESSENCE_FLUID_FLOWING.get()); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java new file mode 100644 index 00000000..47d9f125 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java @@ -0,0 +1,221 @@ +package wayoftime.bloodmagic.common.data; + +import net.minecraft.block.Block; +import net.minecraft.data.DataGenerator; +import net.minecraft.item.Item; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.generators.ItemModelBuilder; +import net.minecraftforge.client.model.generators.ItemModelProvider; +import net.minecraftforge.client.model.generators.ModelFile; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; + +public class GeneratorItemModels extends ItemModelProvider +{ + public GeneratorItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) + { + super(generator, BloodMagic.MODID, existingFileHelper); + } + + @Override + protected void registerModels() + { +// registerBlockModel(BloodMagicBlocks.TARTARICFORGE.get()); +// registerBlockModel(BloodMagicBlocks.SPEED_RUNE.get()); + + for (RegistryObject item : BloodMagicItems.BASICITEMS.getEntries()) + { + registerBasicItem(item.get()); + } + + for (RegistryObject block : BloodMagicBlocks.BASICBLOCKS.getEntries()) + { + registerBlockModel(block.get()); + } + + for (RegistryObject block : BloodMagicBlocks.DUNGEONBLOCKS.getEntries()) + { + registerBlockModel(block.get()); + } + + registerBlockModel(BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.AIR_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.WATER_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.FIRE_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.EARTH_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.DUSK_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.DAWN_RITUAL_STONE.get()); + registerBlockModel(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()); + registerBlockModel(BloodMagicBlocks.NETHER_SOIL.get()); + + registerCustomBlockPath(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(), "crystal/defaultcrystal1"); + registerCustomBlockPath(BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get(), "crystal/corrosivecrystal1"); + registerCustomBlockPath(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get(), "crystal/destructivecrystal1"); + registerCustomBlockPath(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get(), "crystal/vengefulcrystal1"); + registerCustomBlockPath(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get(), "crystal/steadfastcrystal1"); + + registerCustomBlockPath(BloodMagicBlocks.DUNGEON_BRICK_ASSORTED.get(), "dungeon_brick1"); + registerBlockModel(BloodMagicBlocks.DUNGEON_STONE.get()); + registerBlockModel(BloodMagicBlocks.DUNGEON_BRICK_STAIRS.get()); + registerBlockModel(BloodMagicBlocks.DUNGEON_POLISHED_STAIRS.get()); + registerBlockModel(BloodMagicBlocks.DUNGEON_PILLAR_CENTER.get()); + registerBlockModel(BloodMagicBlocks.DUNGEON_PILLAR_SPECIAL.get()); + registerBlockModel(BloodMagicBlocks.DUNGEON_PILLAR_CAP.get()); + registerCustomBlockPath(BloodMagicBlocks.DUNGEON_BRICK_WALL.get(), "dungeon_brick_wall_inventory"); + registerCustomBlockPath(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get(), "dungeon_polished_wall_inventory"); + registerBlockModel(BloodMagicBlocks.DUNGEON_BRICK_GATE.get()); + registerBlockModel(BloodMagicBlocks.DUNGEON_POLISHED_GATE.get()); + + registerToggleableItem(BloodMagicItems.GREEN_GROVE_SIGIL.get()); + registerToggleableItem(BloodMagicItems.FAST_MINER_SIGIL.get()); + registerToggleableItem(BloodMagicItems.MAGNETISM_SIGIL.get()); + registerToggleableItem(BloodMagicItems.ICE_SIGIL.get()); + registerDemonWillVariantItem(BloodMagicItems.PETTY_GEM.get()); + registerDemonWillVariantItem(BloodMagicItems.LESSER_GEM.get()); + registerDemonWillVariantItem(BloodMagicItems.COMMON_GEM.get()); + registerDemonWillVariantItem(BloodMagicItems.GREATER_GEM.get()); + registerDemonSword(BloodMagicItems.SENTIENT_SWORD.get()); + registerDemonTool(BloodMagicItems.SENTIENT_AXE.get()); + registerDemonTool(BloodMagicItems.SENTIENT_PICKAXE.get()); + registerDemonTool(BloodMagicItems.SENTIENT_SHOVEL.get()); + registerDemonTool(BloodMagicItems.SENTIENT_SCYTHE.get()); + registerSacrificialKnife(BloodMagicItems.SACRIFICIAL_DAGGER.get()); + + registerCustomFullTexture(BloodMagicBlocks.MIMIC.get(), "solidopaquemimic"); + registerCustomFullTexture(BloodMagicBlocks.ETHEREAL_MIMIC.get(), "etherealopaquemimic"); + this.crop(BloodMagicBlocks.GROWING_DOUBT.get().getRegistryName().getPath(), modLoc("block/creeping_doubt_8")); + + registerBlockModel(BloodMagicBlocks.SHAPED_CHARGE.get()); + registerBlockModel(BloodMagicBlocks.DEFORESTER_CHARGE.get()); + registerBlockModel(BloodMagicBlocks.VEINMINE_CHARGE.get()); + registerBlockModel(BloodMagicBlocks.FUNGAL_CHARGE.get()); + + registerMultiLayerItem(BloodMagicItems.SLATE_VIAL.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.SILK_TOUCH_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.FORTUNE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.HOLY_WATER_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.QUICK_DRAW_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.LOOTING_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.BOW_POWER_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.WILL_POWER_ANOINTMENT.get(), modLoc("item/alchemic_vial_will"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon_will")); + registerMultiLayerItem(BloodMagicItems.SMELTING_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + + } + + private void registerCustomFullTexture(Block block, String texturePath) + { + String path = block.getRegistryName().getPath(); + getBuilder(path).parent(new ModelFile.UncheckedModelFile(modLoc("block/" + texturePath))); + } + + private void registerCustomBlockPath(Block block, String newPath) + { + String path = block.getRegistryName().getPath(); + getBuilder(path).parent(new ModelFile.UncheckedModelFile(modLoc("block/" + newPath))); + } + + private void registerBlockModel(Block block) + { + String path = block.getRegistryName().getPath(); + getBuilder(path).parent(new ModelFile.UncheckedModelFile(modLoc("block/" + path))); + } + + private void registerBasicItem(Item item) + { + String path = item.getRegistryName().getPath(); + singleTexture(path, mcLoc("item/generated"), "layer0", modLoc("item/" + path)); + } + + private void registerMultiLayerItem(Item item, ResourceLocation... locations) + { + String path = item.getRegistryName().getPath(); + ItemModelBuilder builder = getBuilder(path).parent(getExistingFile(mcLoc("item/generated"))); +// ModelFile model = withExistingParent(path, mcLoc("item/handheld")); + + for (int i = 0; i < locations.length; i++) + { + builder.texture("layer" + i, locations[i]); + } + + builder.assertExistence(); + } + + private void registerToggleableItem(Item item) + { + String path = item.getRegistryName().getPath(); + ModelFile activatedFile = singleTexture("item/variants/" + path + "_activated", mcLoc("item/handheld"), "layer0", modLoc("item/" + path + "_activated")); + ModelFile deactivatedFile = singleTexture("item/variants/" + path + "_deactivated", mcLoc("item/handheld"), "layer0", modLoc("item/" + path + "_deactivated")); + getBuilder(path).override().predicate(BloodMagic.rl("active"), 0).model(deactivatedFile).end().override().predicate(BloodMagic.rl("active"), 1).model(activatedFile).end(); + } + + private void registerDemonWillVariantItem(Item item) + { + String path = item.getRegistryName().getPath(); + ItemModelBuilder builder = getBuilder(path); + + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + String name = ""; + if (type.ordinal() != 0) + { + name = "_" + type.name().toLowerCase(); + } + ModelFile willFile = singleTexture("item/variants/" + path + name, mcLoc("item/handheld"), "layer0", modLoc("item/" + path + name)); + builder = builder.override().predicate(BloodMagic.rl("type"), type.ordinal()).model(willFile).end(); + } + } + + private void registerDemonSword(Item item) + { + String path = item.getRegistryName().getPath(); + ItemModelBuilder builder = getBuilder(path); + + for (int i = 0; i <= 1; i++) + { + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + String name = i == 0 ? "_deactivated" : "_activated"; + if (type.ordinal() != 0) + { + name = "_" + type.name().toLowerCase() + name; + } + ModelFile willFile = singleTexture("item/variants/" + path + name, mcLoc("item/handheld"), "layer0", modLoc("item/" + path + name)); + builder = builder.override().predicate(BloodMagic.rl("type"), type.ordinal()).predicate(BloodMagic.rl("active"), i).model(willFile).end(); + } + } + } + + private void registerDemonTool(Item item) + { + String path = item.getRegistryName().getPath(); + ItemModelBuilder builder = getBuilder(path); + + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + String name = ""; + if (type.ordinal() != 0) + { + name = "_" + type.name().toLowerCase() + name; + } + ModelFile willFile = singleTexture("item/variants/" + path + name, mcLoc("item/handheld"), "layer0", modLoc("item/" + path + name)); + builder = builder.override().predicate(BloodMagic.rl("type"), type.ordinal()).model(willFile).end(); + + } + } + + private void registerSacrificialKnife(Item item) + { + String path = item.getRegistryName().getPath(); + ItemModelBuilder builder = getBuilder(path); + + ModelFile baseKnifeFile = singleTexture("item/variants/" + path, mcLoc("item/handheld"), "layer0", modLoc("item/" + path)); + ModelFile ceremonialKnifeFile = singleTexture("item/variants/" + path + "_ceremonial", mcLoc("item/handheld"), "layer0", modLoc("item/" + path + "_ceremonial")); + builder = builder.override().predicate(BloodMagic.rl("incense"), 0).model(baseKnifeFile).end().override().predicate(BloodMagic.rl("incense"), 1).model(ceremonialKnifeFile).end(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemTags.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemTags.java new file mode 100644 index 00000000..80508474 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemTags.java @@ -0,0 +1,164 @@ +package wayoftime.bloodmagic.common.data; + +import java.nio.file.Path; + +import net.minecraft.data.BlockTagsProvider; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.ItemTagsProvider; +import net.minecraft.item.Item; +import net.minecraft.tags.ITag.INamedTag; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.data.ExistingFileHelper; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class GeneratorItemTags extends ItemTagsProvider +{ + public GeneratorItemTags(DataGenerator dataGenerator, BlockTagsProvider blockTagProvider, ExistingFileHelper existingFileHelper) + { + super(dataGenerator, blockTagProvider, BloodMagic.MODID, existingFileHelper); + } + + @Override + public void registerTags() + { + registerIngots(); + registerOres(); + registerDusts(); + registerFragments(); + registerGravels(); + + registerFurnaceCells(); + registerReverters(); + registerSieves(); + registerExplosives(); + registerHydration(); + registerResonators(); + registerCuttingFluids(); + + this.getOrCreateBuilder(BloodMagicTags.DUST_SULFUR).add(BloodMagicItems.SULFUR.get()); + this.getOrCreateBuilder(BloodMagicTags.DUST_SALTPETER).add(BloodMagicItems.SALTPETER.get()); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_FURNACE); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_REVERTER); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_SIEVE); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_HYDRATE); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_RESONATOR); + this.getOrCreateBuilder(BloodMagicTags.ARC_TOOL).addTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID); + + this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.RAW_CRYSTAL.get()); + this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.CORROSIVE_CRYSTAL.get()); + this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()); + this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.VENGEFUL_CRYSTAL.get()); + this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.STEADFAST_CRYSTAL.get()); + + this.copy(BloodMagicTags.Blocks.MUSHROOM_STEM, BloodMagicTags.MUSHROOM_STEM); + this.copy(BloodMagicTags.Blocks.MUSHROOM_HYPHAE, BloodMagicTags.MUSHROOM_HYPHAE); + +// this.getOrCreateBuilder(GOORESISTANT).addTag(BlockTags.DOORS); +// this.getOrCreateBuilder(GOORESISTANT).addTag(BlockTags.BEDS); +// this.getOrCreateBuilder(GOORESISTANT).add(Blocks.PISTON, Blocks.PISTON_HEAD, Blocks.STICKY_PISTON, Blocks.MOVING_PISTON); + + } + + private void registerIngots() + { + getOrCreateBuilder(BloodMagicTags.INGOT_HELLFORGED).add(BloodMagicItems.HELLFORGED_INGOT.get()); + } + + private void registerOres() + { + getOrCreateBuilder(BloodMagicTags.ORE_COPPER); + getOrCreateBuilder(BloodMagicTags.ORE_LEAD); + getOrCreateBuilder(BloodMagicTags.ORE_OSMIUM); + getOrCreateBuilder(BloodMagicTags.ORE_SILVER); + getOrCreateBuilder(BloodMagicTags.ORE_TIN); + } + + private void registerDusts() + { + getOrCreateBuilder(BloodMagicTags.DUST_IRON).add(BloodMagicItems.IRON_SAND.get()); + getOrCreateBuilder(BloodMagicTags.DUST_GOLD).add(BloodMagicItems.GOLD_SAND.get()); + getOrCreateBuilder(BloodMagicTags.DUST_COAL).add(BloodMagicItems.COAL_SAND.get()); + getOrCreateBuilder(BloodMagicTags.DUST_NETHERITE_SCRAP).add(BloodMagicItems.NETHERITE_SCRAP_SAND.get()); + getOrCreateBuilder(BloodMagicTags.DUST_HELLFORGED).add(BloodMagicItems.HELLFORGED_SAND.get()); + getOrCreateBuilder(BloodMagicTags.DUST_CORRUPTED).add(BloodMagicItems.CORRUPTED_DUST.get()); + getOrCreateBuilder(BloodMagicTags.TINYDUST_CORRUPTED).add(BloodMagicItems.CORRUPTED_DUST_TINY.get()); + } + + private void registerFragments() + { + getOrCreateBuilder(BloodMagicTags.FRAGMENT_IRON).add(BloodMagicItems.IRON_FRAGMENT.get()); + getOrCreateBuilder(BloodMagicTags.FRAGMENT_GOLD).add(BloodMagicItems.GOLD_FRAGMENT.get()); + getOrCreateBuilder(BloodMagicTags.FRAGMENT_NETHERITE_SCRAP).add(BloodMagicItems.NETHERITE_SCRAP_FRAGMENT.get()); + } + + private void registerGravels() + { + getOrCreateBuilder(BloodMagicTags.GRAVEL_IRON).add(BloodMagicItems.IRON_GRAVEL.get()); + getOrCreateBuilder(BloodMagicTags.GRAVEL_GOLD).add(BloodMagicItems.GOLD_GRAVEL.get()); + getOrCreateBuilder(BloodMagicTags.GRAVEL_NETHERITE_SCRAP).add(BloodMagicItems.NETHERITE_SCRAP_GRAVEL.get()); + } + + private void registerFurnaceCells() + { + this.registerTool(BloodMagicItems.PRIMITIVE_FURNACE_CELL.get(), BloodMagicTags.ARC_TOOL_FURNACE); + this.registerTool(BloodMagicItems.LAVA_CRYSTAL.get(), BloodMagicTags.ARC_TOOL_FURNACE); + } + + private void registerReverters() + { + this.registerTool(BloodMagicItems.SANGUINE_REVERTER.get(), BloodMagicTags.ARC_TOOL_REVERTER); + } + + private void registerSieves() + { + this.registerTool(BloodMagicItems.AIR_INSCRIPTION_TOOL.get(), BloodMagicTags.ARC_TOOL_SIEVE); + } + + private void registerExplosives() + { + this.registerTool(BloodMagicItems.EXPLOSIVE_POWDER.get(), BloodMagicTags.ARC_TOOL_EXPLOSIVE); + this.registerTool(BloodMagicItems.PRIMITIVE_EXPLOSIVE_CELL.get(), BloodMagicTags.ARC_TOOL_EXPLOSIVE); + } + + private void registerHydration() + { + this.registerTool(BloodMagicItems.PRIMITIVE_HYDRATION_CELL.get(), BloodMagicTags.ARC_TOOL_HYDRATE); + } + + private void registerResonators() + { + this.registerTool(BloodMagicItems.PRIMITIVE_CRYSTALLINE_RESONATOR.get(), BloodMagicTags.ARC_TOOL_RESONATOR); + this.registerTool(BloodMagicItems.CRYSTALLINE_RESONATOR.get(), BloodMagicTags.ARC_TOOL_RESONATOR); + } + + private void registerCuttingFluids() + { + this.registerTool(BloodMagicItems.BASIC_CUTTING_FLUID.get(), BloodMagicTags.ARC_TOOL_CUTTINGFLUID); + } + + public void registerTool(Item item, INamedTag tag) + { + this.getOrCreateBuilder(tag).add(item); + } + + /** + * Resolves a Path for the location to save the given tag. + */ + @Override + protected Path makePath(ResourceLocation id) + { + return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/items/" + id.getPath() + ".json"); + } + + /** + * Gets a name for this provider, to use in logging. + */ + @Override + public String getName() + { + return "Item Tags"; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java new file mode 100644 index 00000000..b579d029 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java @@ -0,0 +1,626 @@ +package wayoftime.bloodmagic.common.data; + +import net.minecraft.data.DataGenerator; +import net.minecraftforge.common.data.LanguageProvider; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; + +public class GeneratorLanguage extends LanguageProvider +{ + public GeneratorLanguage(DataGenerator gen) + { + super(gen, BloodMagic.MODID, "en_us"); + } + + @Override + protected void addTranslations() + { + // HUD + add("hud.bloodmagic.inactive", "Inactive"); + + // Creative Tab + add("itemGroup.bloodmagic.creativeTab", "Blood Magic"); + + add("chat.bloodmagic.damageSource", "%s's soul became too weak"); + + // Tile Entitites + add("tile.bloodmagic.soulforge.name", "Hellfire Forge"); + add("tile.bloodmagic.arc.name", "Alchemical Reaction Chamber"); + add("tile.bloodmagic.alchemytable.name", "Alchemy Table"); + + // Blood Orb tooltips + add("tooltip.bloodmagic.extraInfo", "&9-Hold shift for more info-"); + add("tooltip.bloodmagic.orb.desc", "Stores raw Life Essence"); + add("tooltip.bloodmagic.orb.owner", "Added by: %s"); + add("tooltip.bloodmagic.currentOwner", "Current owner: %s"); + add("tooltip.bloodmagic.currentTier", "Current tier: %d"); + add("tooltip.bloodmagic.config.disabled", "Currently disabled in the Config"); + add("tooltip.bloodmagic.tier", "Tier %d"); + + // Sigil tooltips + add("tooltip.bloodmagic.sigil.divination.desc", "Peer into the soul"); + add("tooltip.bloodmagic.sigil.divination.otherNetwork", "Peering into the soul of %s"); + add("tooltip.bloodmagic.sigil.divination.currentAltarTier", "Current Tier: %d"); + add("tooltip.bloodmagic.sigil.divination.currentEssence", "Current Essence: %d LP"); + add("tooltip.bloodmagic.sigil.divination.currentAltarCapacity", "Current Capacity: %d LP"); + add("tooltip.bloodmagic.sigil.divination.currentTranquility", "Current Tranquility: %d"); +// add("tooltip.bloodmagic.sigil.divination.currentInversion", "Current Inversion: %d"); + add("tooltip.bloodmagic.sigil.divination.currentBonus", "Current Bonus: +%d%%"); + + add("tooltip.bloodmagic.sigil.seer.desc", "When seeing all is not enough"); + add("tooltip.bloodmagic.sigil.seer.currentAltarProgress", "Current Progress: %d LP/ %s LP"); + add("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", "Current Progress: %s"); + add("tooltip.bloodmagic.sigil.seer.currentAltarConsumptionRate", "Consumption Rate: %d LP"); + add("tooltip.bloodmagic.sigil.seer.currentAltarTier", "Current Tier: %d"); + add("tooltip.bloodmagic.sigil.seer.currentEssence", "Current Essence: %d LP"); + add("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", "Current Capacity: %d LP"); + add("tooltip.bloodmagic.sigil.seer.currentCharge", "Current Charge: %d"); + add("tooltip.bloodmagic.sigil.seer.currentTranquility", "Current Tranquility: %d"); + add("tooltip.bloodmagic.sigil.seer.currentBonus", "Current Bonus: +%d%%"); + + add("tooltip.bloodmagic.sigil.holding.press", "Press %s to modify"); + add("tooltip.bloodmagic.sigil.holding.desc", "Sigil-ception"); + add("tooltip.bloodmagic.sigil.holding.sigilInSlot", "Slot %d: %s"); + + add("tooltip.bloodmagic.activated", "Activated"); + add("tooltip.bloodmagic.deactivated", "Deactivated"); + + add("tooltip.bloodmagic.decoration.safe", "Safe for decoration"); + add("tooltip.bloodmagic.decoration.notSafe", "Dangerous for decoration"); + + // General Tooltips + add("tooltip.bloodmagic.arcaneAshes", "Ashes used to draw an alchemy circle"); + add("tooltip.bloodmagic.will", "Will Quality: %s"); + add("tooltip.bloodmagic.sentientSword.desc", "Uses demon will to unleash its full potential."); + add("tooltip.bloodmagic.sentientAxe.desc", "Uses demon will to unleash its full potential."); + add("tooltip.bloodmagic.sentientPickaxe.desc", "Uses demon will to unleash its full potential."); + add("tooltip.bloodmagic.sentientShovel.desc", "Uses demon will to unleash its full potential."); + add("tooltip.bloodmagic.soulGem.petty", "A gem used to contain a little will"); + add("tooltip.bloodmagic.soulGem.lesser", "A gem used to contain some will"); + add("tooltip.bloodmagic.soulGem.common", "A gem used to contain more will"); + add("tooltip.bloodmagic.soulGem.greater", "A gem used to contain a greater amount of will"); + add("tooltip.bloodmagic.soulGem.grand", "A gem used to contain a large amount of will"); + add("tooltip.bloodmagic.soulSnare.desc", "Throw at a monster and then kill them to obtain their demonic will"); + + add("tooltip.bloodmagic.currentType.default", "Contains: Raw Will"); + add("tooltip.bloodmagic.currentType.corrosive", "Contains: Corrosive Will"); + add("tooltip.bloodmagic.currentType.destructive", "Contains: Destructive Will"); + add("tooltip.bloodmagic.currentType.vengeful", "Contains: Vengeful Will"); + add("tooltip.bloodmagic.currentType.steadfast", "Contains: Steadfast Will"); + + add("tooltip.bloodmagic.currentBaseType.default", "Raw"); + add("tooltip.bloodmagic.currentBaseType.corrosive", "Corrosive"); + add("tooltip.bloodmagic.currentBaseType.destructive", "Destructive"); + add("tooltip.bloodmagic.currentBaseType.vengeful", "Vengeful"); + add("tooltip.bloodmagic.currentBaseType.steadfast", "Steadfast"); + add("tooltip.bloodmagic.sacrificialdagger.desc", "Just a prick of the finger will suffice..."); + add("tooltip.bloodmagic.slate.desc", "Infused stone inside of a Blood Altar"); + add("tooltip.bloodmagic.inscriber.desc", "The writing is on the wall..."); + + add("tooltip.bloodmagic.sigil.water.desc", "Infinite water, anyone?"); + add("tooltip.bloodmagic.sigil.lava.desc", "HOT! DO NOT EAT"); + add("tooltip.bloodmagic.sigil.void.desc", "Better than a Swiffer®!"); + add("tooltip.bloodmagic.sigil.greengrove.desc", "Environmentally friendly"); + add("tooltip.bloodmagic.sigil.magnetism.desc", "I have a very magnetic personality"); + add("tooltip.bloodmagic.sigil.fastminer.desc", "Keep mining, and mining..."); + add("tooltip.bloodmagic.sigil.air.desc", "I feel lighter already..."); + add("tooltip.bloodmagic.sigil.bloodlight.desc", "I see a light!"); + + add("tooltip.bloodmagic.activationcrystal.weak", "Activates low-level rituals"); + add("tooltip.bloodmagic.activationcrystal.awakened", "Activates more powerful rituals"); + add("tooltip.bloodmagic.activationcrystal.creative", "Creative Only - Activates any ritual"); + + add("tooltip.bloodmagic.arctool.additionaldrops", "Increases chance of additional outputs by: x%s"); + add("tooltip.bloodmagic.arctool.uses", "Uses remaining: %s"); + + add("itemGroup.bloodmagictab", "Blood Magic"); + + add("tooltip.bloodmagic.experienceTome", "A book used to store experience"); + add("tooltip.bloodmagic.experienceTome.exp", "Exp: %0.3f"); + add("tooltip.bloodmagic.experienceTome.expLevel", "Level: %d"); + + add("tooltip.bloodmagic.throwing_dagger.desc", "Not to be used in the kitchen"); + + add("key.bloodmagic.category", "Blood Magic"); + + // Ritual info + add("tooltip.bloodmagic.diviner.currentRitual", "Current Ritual: %s"); + add("tooltip.bloodmagic.diviner.blankRune", "Blank Runes: %d"); + add("tooltip.bloodmagic.diviner.waterRune", "Water Runes: %d"); + add("tooltip.bloodmagic.diviner.airRune", "Air Runes: %d"); + add("tooltip.bloodmagic.diviner.fireRune", "Fire Runes: %d"); + add("tooltip.bloodmagic.diviner.earthRune", "Earth Runes: %d"); + add("tooltip.bloodmagic.diviner.duskRune", "Dusk Runes: %d"); + add("tooltip.bloodmagic.diviner.dawnRune", "Dawn Runes: %d"); + add("tooltip.bloodmagic.diviner.totalRune", "Total Runes: %d"); + add("tooltip.bloodmagic.diviner.extraInfo", "Press shift for extra info"); + add("tooltip.bloodmagic.diviner.extraExtraInfo", "-Hold shift + alt for augmentation info-"); + add("tooltip.bloodmagic.diviner.currentDirection", "Current Direction: %s"); + + add("tooltip.bloodmagic.holdShiftForInfo", "Press shift for extra info"); + + add("ritual.bloodmagic.blockRange.tooBig", "The block range given is too big! Needs to be at most %s blocks."); + add("ritual.bloodmagic.blockRange.tooFar", "The block range given is too far! Needs to be within a vertical range of %s blocks and a horizontal range of %s blocks."); + add("ritual.bloodmagic.blockRange.inactive", "The ritual stone is currently inactive, and cannot have its range modified."); + add("ritual.bloodmagic.blockRange.noRange", "The range was not properly chosen."); + add("ritual.bloodmagic.blockRange.firstBlock", "First block for new range stored."); + add("ritual.bloodmagic.blockRange.success", "New range successfully set!"); + add("ritual.bloodmagic.willConfig.set", "The ritual will use these Demon Will types: %s"); + add("ritual.bloodmagic.willConfig.void", "The ritual no longer uses Demon Will"); + + add("ritual.bloodmagic.testRitual", "Test Ritual"); + add("ritual.bloodmagic.waterRitual", "Ritual of the Full Spring"); + add("ritual.bloodmagic.lavaRitual", "Serenade of the Nether"); + add("ritual.bloodmagic.greenGroveRitual", "Ritual of the Green Grove"); + add("ritual.bloodmagic.jumpRitual", "Ritual of the High Jump"); + add("ritual.bloodmagic.wellOfSufferingRitual", "Well of Suffering"); + add("ritual.bloodmagic.featheredKnifeRitual", "Ritual of the Feathered Knife"); + add("ritual.bloodmagic.regenerationRitual", "Ritual of Regeneration"); + add("ritual.bloodmagic.harvestRitual", "Reap of the Harvest Moon"); + add("ritual.bloodmagic.magneticRitual", "Ritual of Magnetism"); + add("ritual.bloodmagic.crushingRitual", "Ritual of the Crusher"); + add("ritual.bloodmagic.fullStomachRitual", "Ritual of the Satiated Stomach"); + add("ritual.bloodmagic.interdictionRitual", "Ritual of Interdiction"); + add("ritual.bloodmagic.containmentRitual", "Ritual of Containment"); + add("ritual.bloodmagic.speedRitual", "Ritual of Speed"); + add("ritual.bloodmagic.suppressionRitual", "Ritual of Suppression"); + add("ritual.bloodmagic.expulsionRitual", "Aura of Expulsion"); + add("ritual.bloodmagic.zephyrRitual", "Call of the Zephyr"); + add("ritual.bloodmagic.upgradeRemoveRitual", "Sound of the Cleansing Soul"); + add("ritual.bloodmagic.armourEvolveRitual", "Ritual of Living Evolution"); + add("ritual.bloodmagic.animalGrowthRitual", "Ritual of the Shepherd"); + add("ritual.bloodmagic.crystalHarvestRitual", "Crack of the Fractured Crystal"); + add("ritual.bloodmagic.forsakenSoulRitual", "Gathering of the Forsaken Souls"); + add("ritual.bloodmagic.crystalSplitRitual", "Resonance of the Faceted Crystal"); + add("ritual.bloodmagic.ellipseRitual", "Focus of the Ellipsoid"); + + add("ritual.bloodmagic.cobblestoneRitual", "Le Vulcanos Frigius"); + add("ritual.bloodmagic.placerRitual", "The Filler"); + add("ritual.bloodmagic.fellingRitual", "The Timberman"); + add("ritual.bloodmagic.pumpRitual", "Hymn of Siphoning"); + add("ritual.bloodmagic.altarBuilderRitual", "The Assembly of the High Altar"); + add("ritual.bloodmagic.portalRitual", "The Gate of the Fold"); + + add("ritual.bloodmagic.waterRitual.info", "Generates a source of water from the master ritual stone."); + add("ritual.bloodmagic.lavaRitual.info", "Generates a source of lava from the master ritual stone."); + add("ritual.bloodmagic.lavaRitual.default.info", "(Raw) Decreases the LP cost of placing lava and allows lava to be placed insided of a linked container."); + add("ritual.bloodmagic.lavaRitual.corrosive.info", "(Corrosive) Entities within range that are immune to fire are damaged severely."); + add("ritual.bloodmagic.lavaRitual.destructive.info", "(Destructive) Lava placement range is increased based on total Will."); + add("ritual.bloodmagic.lavaRitual.vengeful.info", "(Vengeful) Entities within range have Fire Fuse applied to them."); + add("ritual.bloodmagic.lavaRitual.steadfast.info", "(Steadfast) Players within a designated range have Fire Resistance applied to them."); + + add("ritual.bloodmagic.greenGroveRitual.info", "Grows crops within its area."); + add("ritual.bloodmagic.jumpRitual.info", "Causes entities to leap up into the air."); + add("ritual.bloodmagic.wellOfSufferingRitual.info", "Attacks mobs within its damage zone and puts the LP into a nearby blood altar."); + add("ritual.bloodmagic.featheredKnifeRitual.info", "Drains health from players in its area and puts the LP into a nearby blood altar."); + add("ritual.bloodmagic.regenerationRitual.info", "Casts regeneration on entities within its range if they are missing health."); + add("ritual.bloodmagic.regenerationRitual.default.info", "(Raw)"); + add("ritual.bloodmagic.regenerationRitual.corrosive.info", "(Corrosive) Steals health from non-players inside of its Vampirism range and directly heals players."); + add("ritual.bloodmagic.regenerationRitual.destructive.info", "(Destructive)"); + add("ritual.bloodmagic.regenerationRitual.vengeful.info", "(Vengeful)"); + add("ritual.bloodmagic.regenerationRitual.steadfast.info", "(Steadfast)"); + add("ritual.bloodmagic.harvestRitual.info", "Harvests plants within its range, dropping the results on the ground."); + add("ritual.bloodmagic.magneticRitual.info", "Pulls up ores from the ground and puts them into its placement range."); + add("ritual.bloodmagic.crushingRitual.info", "Breaks blocks within its crushing range and places the items into the linked chest."); + add("ritual.bloodmagic.crushingRitual.destructive.info", "(Destructive) Blocks are broken down forcefully: all blocks broken are affected by Fortune III."); + add("ritual.bloodmagic.crushingRitual.steadfast.info", "(Steadfast) Causes all blocks that are broken to be picked up with silk touch. Overrides Fortune where applicable."); + add("ritual.bloodmagic.crushingRitual.corrosive.info", "(Corrosive) All blocks are broken to be processed with a form of cutting fluid. Overrides Silk Touch where applicable."); + add("ritual.bloodmagic.crushingRitual.vengeful.info", "(Vengeful) Compresses the inventory on successful operation. Currently only does one compression per operation."); + add("ritual.bloodmagic.crushingRitual.default.info", "(Raw) Increases the speed of the ritual based on total Will."); + add("ritual.bloodmagic.greenGroveRitual.corrosive.info", "(Corrosive) Entities within range are attacked by nearby plants, leeching away their life."); + add("ritual.bloodmagic.greenGroveRitual.default.info", "(Raw) Increases the speed of all of the ritual operations depending on the total Will in the Aura."); + add("ritual.bloodmagic.greenGroveRitual.vengeful.info", "(Vengeful) Increases the rate that a growth tick is successful."); + add("ritual.bloodmagic.greenGroveRitual.steadfast.info", "(Steadfast) Seeds are replanted and blocks are hydrated within the Hydration range."); + add("ritual.bloodmagic.greenGroveRitual.destructive.info", "(Destructive) Growing range is increased based on total Will."); + add("ritual.bloodmagic.featheredKnifeRitual.default.info", "(Raw) Increases the speed of the ritual based on the total Will in the Aura."); + add("ritual.bloodmagic.featheredKnifeRitual.destructive.info", "(Destructive) Increases the yield of the ritual based on total Will."); + add("ritual.bloodmagic.featheredKnifeRitual.vengeful.info", "(Vengeful) Sets the minimum health for sacrificing to 10%%. Overridden by Steadfast for the Owner if active."); + add("ritual.bloodmagic.featheredKnifeRitual.corrosive.info", "(Corrosive) Uses the player's Incense to increase the yield."); + add("ritual.bloodmagic.featheredKnifeRitual.steadfast.info", "(Steadfast) Sets the minimum health for sacrificing from 30%% to 70%%."); + add("ritual.bloodmagic.speedRitual.default.info", "(Raw) Increases the velocity caused by the ritual based on total Will."); + add("ritual.bloodmagic.speedRitual.vengeful.info", "(Vengeful) Prevents adult mobs and players from being transported. Players are transported if paired with Destructive."); + add("ritual.bloodmagic.speedRitual.destructive.info", "(Destructive) Prevents child mobs and players from being transported. Players are transported if paired with Vengeful."); + add("ritual.bloodmagic.animalGrowthRitual.vengeful.info", "(Vengeful) Decreases the time it takes for adults to breed again."); + add("ritual.bloodmagic.animalGrowthRitual.steadfast.info", "(Steadfast) Automatically breeds adults within its area using items in the connected chest."); + add("ritual.bloodmagic.animalGrowthRitual.default.info", "(Raw) Increases the speed of the ritual based on the total Will in the Aura."); + add("ritual.bloodmagic.animalGrowthRitual.destructive.info", "(Destructive) Causes adults that have not bred lately to run at mobs and explode."); + add("ritual.bloodmagic.animalGrowthRitual.corrosive.info", "(Corrosive) Unimplemented."); + add("ritual.bloodmagic.groundingRitual.info", "Forces entities on the ground and prevents jumping."); + add("ritual.bloodmagic.groundingRitual.default.info", "(Raw) Affects players."); + add("ritual.bloodmagic.groundingRitual.corrosive.info", "(Corrosive) Disables gravity (+Vengeful) Applies Levitation."); + add("ritual.bloodmagic.groundingRitual.destructive.info", "(Destructive) Applies Heavy Heart (increases fall damage) (+Vengeful) Stronger effect."); + add("ritual.bloodmagic.groundingRitual.steadfast.info", "(Steadfast) Affects Bosses. Doesn't affect bosses that are immune against motion change or immune against potions (except Wither and Ender Dragon)."); + add("ritual.bloodmagic.groundingRitual.vengeful.info", "(Vengeful) Makes effects stronger. (+Corrosive) Applies Levitation. (+Destructive) Higher Heavy Heart amplifier."); + add("ritual.bloodmagic.condorRitual.info", "Provides flight in an area around the ritual."); + add("ritual.bloodmagic.eternalSoulRitual.info", "Capable of transferring Life Essence from a Network back into an Altar at a cost."); + + add("ritual.bloodmagic.crystalSplitRitual.info", "Splits apart a well-grown Raw crystal cluster into seperal aspected crystal clusters."); + add("ritual.bloodmagic.fullStomachRitual.info", "Takes food from the linked chest and fills the player's saturation with it."); + add("ritual.bloodmagic.interdictionRitual.info", "Pushes all mobs within its area away from the master ritual stone."); + add("ritual.bloodmagic.containmentRitual.info", "Pulls all mobs within its area towards the master ritual stone."); + add("ritual.bloodmagic.speedRitual.info", "Launches players within its range in the direction of the ritual."); + add("ritual.bloodmagic.suppressionRitual.info", "Suppresses fluids within its range - deactivating the ritual returns the fluids back to the world."); + add("ritual.bloodmagic.expulsionRitual.info", "Expels players from its range that are neither the owner nor have a bound blood orb in the chest on top of the master ritual stone."); + add("ritual.bloodmagic.zephyrRitual.info", "Picks up items within its range and places them into the linked chest."); + add("ritual.bloodmagic.upgradeRemoveRitual.info", "Removes all upgrades (and downgrades) from your Living Armor and gives you the corresponding Upgrade (and Downgrade) Tomes. These Tomes can be used to be applied to your Living Armor again."); + add("ritual.bloodmagic.armourEvolveRitual.info", "Increases the amount of maximum Upgrade Points on your Living Armor to 300."); + add("ritual.bloodmagic.animalGrowthRitual.info", "Increases the maturity rate of baby animals within its range."); + add("ritual.bloodmagic.forsakenSoulRitual.info", "Damages mobs within its damage range and when the mob dies a demon crystal within its crystal range will be grown."); + add("ritual.bloodmagic.crystalHarvestRitual.info", "Breaks Demon Will crystal clusters within its range, dropping the results on top of the crystals."); + add("ritual.bloodmagic.placerRitual.info", "Grabs blocks that are inside of the connected inventory and places them into the world."); + add("ritual.bloodmagic.fellingRitual.info", "A standard tree-cutting machine, this ritual will cut down all trees and leaves within its area and collect the drops."); + add("ritual.bloodmagic.pumpRitual.info", "Looks around the world and grabs fluids from the defined area. Will only remove and put the fluid into the connected tank if the tank has at least a bucket's worth of the same fluid."); + add("ritual.bloodmagic.altarBuilderRitual.info", "Builds an altar out of the components inside of the connected inventory."); + add("ritual.bloodmagic.portalRitual.info", "Creates a portal network based on the activator and the immediately surrounding blocks. Blocks can be changed after activation without changing the network of portals, and portals with the same \"key\" will link together."); + add("ritual.bloodmagic.meteorRitual.info", "Consumes an item inside of its item range to summon a meteor full of resources from the sky, aimed directly at the ritual."); + + add("ritual.bloodmagic.waterRitual.waterRange.info", "(Water) The area that the ritual will place water source blocks."); + add("ritual.bloodmagic.waterRitual.waterTank.info", "(Raw) The tank that the ritual will place water into."); + add("ritual.bloodmagic.lavaRitual.lavaRange.info", "(Lava) The area that the ritual will place lava source blocks."); + add("ritual.bloodmagic.lavaRitual.lavaTank.info", "(Raw) The tank that the ritual will place lava into."); + add("ritual.bloodmagic.lavaRitual.fireFuse.info", "(Vengeful) Entities in this range are afflicted by Fire Fuse."); + add("ritual.bloodmagic.lavaRitual.fireResist.info", "(Steadfast) Players in this range have Fire Resist applied."); + add("ritual.bloodmagic.lavaRitual.fireDamage.info", "(Corrosive) Entities within this range that are immune to fire damage are hurt proportional to the Will."); + add("ritual.bloodmagic.greenGroveRitual.growing.info", "(Growth) The area that the ritual will grow plants in."); + add("ritual.bloodmagic.greenGroveRitual.leech.info", "(Corrosive) Entities in this area have their life drained to grow nearby crops."); + add("ritual.bloodmagic.greenGroveRitual.hydrate.info", "(Steadfast) Blocks within this range are rehydrated into farmland, and seeds within the area are planted nearby."); + add("ritual.bloodmagic.jumpRitual.jumpRange.info", "(Jumping) Entities in this range will be launched in the air."); + add("ritual.bloodmagic.wellOfSufferingRitual.altar.info", "(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region."); + add("ritual.bloodmagic.wellOfSufferingRitual.damage.info", "(Damage) This defines where the ritual will damage a mob. All mobs inside of this range (except for players) will receive damage over time."); + add("ritual.bloodmagic.featheredKnifeRitual.altar.info", "(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region."); + add("ritual.bloodmagic.featheredKnifeRitual.damage.info", "(Damage) This defines where the ritual will damage a player. Players inside of this range will receive damage over time up to the specified limit."); + add("ritual.bloodmagic.regenerationRitual.heal.info", "(Healing) Entities within this range will receive a regeneration buff."); + add("ritual.bloodmagic.regenerationRitual.vampire.info", "(Vampirism) Mobs within this range have their health syphoned to heal players in the Healing range."); + add("ritual.bloodmagic.harvestRitual.harvestRange.info", "(Harvesting) Plants within this range will be harvested."); + add("ritual.bloodmagic.magneticRitual.placementRange.info", "(Placement) The range that the ritual will place the grabbed ores into."); + add("ritual.bloodmagic.crushingRitual.crushingRange.info", "(Crushing) The blocks that the ritual will break."); + add("ritual.bloodmagic.crushingRitual.chest.info", "(Chest) The location of the inventory that the ritual will place the broken blocks into."); + add("ritual.bloodmagic.fullStomachRitual.fillRange.info", "(Feeding) The range that the ritual will look at to feed players."); + add("ritual.bloodmagic.fullStomachRitual.chest.info", "(Chest) The location of the inventory that the ritual will grab food from to feed players in range."); + add("ritual.bloodmagic.interdictionRitual.interdictionRange.info", "(Push) The area of the ritual where mobs will be pushed. All mobs are pushed away from the master ritual stone, regardless of where this area is."); + add("ritual.bloodmagic.containmentRitual.containmentRange.info", "(Containment) The area of the ritual where mobs will be pulled. All mobs are pulled towards the master ritual stone, regardless of where this area is."); + add("ritual.bloodmagic.speedRitual.sanicRange.info", "(Speed) All entities within this area are launched in the direction of the arrow formed by the ritual."); + add("ritual.bloodmagic.suppressionRitual.suppressionRange.info", "(Suppress) All liquids within the range are suppressed."); + add("ritual.bloodmagic.expulsionRitual.expulsionRange.info", "(Expulsion) The area from which players that are not owner or have an orb in the chest will be teleported away from."); + add("ritual.bloodmagic.zephyrRitual.zephyrRange.info", "(Suction) Items within this range will be sucked into the linked chest."); + add("ritual.bloodmagic.zephyrRitual.chest.info", "(Chest) The location of the inventory that the ritual will place the picked up items into."); + add("ritual.bloodmagic.animalGrowthRitual.growing.info", "(Growth) Animals within this range will grow much faster."); + add("ritual.bloodmagic.animalGrowthRitual.chest.info", "(Chest) Chest for breeding items if properly augmented."); + add("ritual.bloodmagic.forsakenSoulRitual.crystal.info", "(Crystal) Demon Crystals in this range receive an increase in growth speed when a mob is killed by the ritual."); + add("ritual.bloodmagic.forsakenSoulRitual.damage.info", "(Damage) Mobs within this range will be slowly damaged, and when killed will grow the crystals."); + add("ritual.bloodmagic.crystalHarvestRitual.crystal.info", "(Crystal) All Demon Will crystal clusters have a single crystal broken off, spawning the crystal into the world. If there is only one crystal on the cluster, it will not break it."); + + add("ritual.bloodmagic.ellipseRitual.info", "Creates a hollow spheroid around the ritual using the blocks in the attached chest."); + add("ritual.bloodmagic.ellipseRitual.spheroidRange.info", "(Placement) The range that the ritual will place its blocks in. Spheroid is centered on the ritual - if one side is shorter than the side opposite the spheroid is truncated."); + add("ritual.bloodmagic.ellipseRitual.chest.info", "(Chest) The location of the inventory that the ritual will grab blocks from to place in the world."); + + add("ritual.bloodmagic.placerRitual.placerRange.info", "(Placement) The range that the ritual will place its blocks in."); + add("ritual.bloodmagic.placerRitual.chest.info", "(Chest) The location of the inventory that the ritual will grab blocks from to place in the world."); + add("ritual.bloodmagic.fellingRitual.fellingRange.info", "(Cutting) The range that the ritual will search out logs and leaves in order to cut down."); + add("ritual.bloodmagic.fellingRitual.chest.info", "(Chest) The location of the inventory that the ritual will place the results into."); + add("ritual.bloodmagic.pumpRitual.pumpRange.info", "(Pump) The region that the ritual will look for fluids to grab from the world."); + + add("tooltip.bloodmagic.ritualReader.currentState", "Current mode: %s"); + add("tooltip.bloodmagic.ritualReader.set_area", "Define Area"); + add("tooltip.bloodmagic.ritualReader.information", "Information"); + add("tooltip.bloodmagic.ritualReader.set_will_types", "Set Will Consumed"); + add("tooltip.bloodmagic.ritualReader.desc.set_area", "Right click on an active Master Ritual stone to cycle what area of the ritual you want to modify. Then click on the two corners of the new range you want to set the range."); + add("tooltip.bloodmagic.ritualReader.desc.information", "Right click on an active Master Ritual Stone to gather basic information about the ritual."); + add("tooltip.bloodmagic.ritualReader.desc.set_will_types", "Set the types of demon will that the ritual will consume from the aura by right clicking on the MRS with the same types of crystals on your hotbar."); + + // Living Armour - the 'u' is important, TehNut! + add("living_upgrade.bloodmagic.arrow_protect", "Pin Cushion"); + add("living_upgrade.bloodmagic.speed", "Quick Feet"); + add("living_upgrade.bloodmagic.digging", "Dwarven Might"); + add("living_upgrade.bloodmagic.poison_resist", "Poison Resistance"); + add("living_upgrade.bloodmagic.fire_resist", "Gift of Ignis"); + add("living_upgrade.bloodmagic.self_sacrifice", "Tough Palms"); + add("living_upgrade.bloodmagic.knockback_resist", "Body Builder"); + add("living_upgrade.bloodmagic.physical_protect", "Tough"); + add("living_upgrade.bloodmagic.health", "Healthy"); + add("living_upgrade.bloodmagic.melee_damage", "Fierce Strike"); + add("living_upgrade.bloodmagic.arrow_shot", "Trick Shot"); + add("living_upgrade.bloodmagic.step_assist", "Step Assist"); + add("living_upgrade.bloodmagic.grim_reaper", "Grim Reaper's Sprint"); + add("living_upgrade.bloodmagic.solar_powered", "Solar Powered"); + add("living_upgrade.bloodmagic.thaumRunicShielding", "Runic Shielding"); + add("living_upgrade.bloodmagic.revealing", "Revealing"); + add("living_upgrade.bloodmagic.experienced", "Experienced"); + add("living_upgrade.bloodmagic.jump", "Strong Legs"); + add("living_upgrade.bloodmagic.fall_protect", "Soft Fall"); + add("living_upgrade.bloodmagic.grave_digger", "Grave Digger"); + add("living_upgrade.bloodmagic.sprint_attack", "Charging Strike"); + add("living_upgrade.bloodmagic.critical_strike", "True Strike"); + add("living_upgrade.bloodmagic.elytra", "Elytra"); + add("living_upgrade.bloodmagic.night_sight", "Nocturnal Prowess"); + add("living_upgrade.bloodmagic.repair", "Repairing"); + + add("living_upgrade.bloodmagic.slowness", "Limp Leg"); + add("living_upgrade.bloodmagic.crippledArm", "Crippled Arm"); + add("living_upgrade.bloodmagic.slippery", "Loose Traction"); + add("living_upgrade.bloodmagic.battleHunger", "Battle Hungry"); + add("living_upgrade.bloodmagic.quenched", "Quenched"); + add("living_upgrade.bloodmagic.meleeDecrease", "Dulled Blade"); + add("living_upgrade.bloodmagic.digSlowdown", "Weakened Pick"); + add("living_upgrade.bloodmagic.stormTrooper", "Storm Trooper"); + add("living_upgrade.bloodmagic.slowHeal", "Diseased"); + add("living_upgrade.bloodmagic.disoriented", "Disoriented"); + + add("tooltip.bloodmagic.livingarmour.upgrade.level", "%s (Level %d)"); + add("tooltip.bloodmagic.livingarmour.upgrade.progress", "%s (%d/100)"); + add("tooltip.bloodmagic.livingarmour.upgrade.points", "Upgrade points: %s / %s"); + + add("tooltip.bloodmagic.livingarmour.extraExtraInfo", "&9-Hold shift + M for progress info-"); + + add("tooltip.bloodmagic.slate_vial", "A glass vial infused with a simple slate"); + add("tooltip.bloodmagic.blood_provider.slate.desc", "A simple ampoule containing 500LP"); + + add("chat.bloodmagic.living_upgrade_level_increase", "%s has leveled up to %d"); + + // Anointments. Doesn't have any spelling to be pedantic about. + add("anointment.bloodmagic.melee_damage", "Whetstone"); + add("anointment.bloodmagic.silk_touch", "Soft Touch"); + add("anointment.bloodmagic.fortune", "Fortunate"); + add("anointment.bloodmagic.holy_water", "Holy Light"); + add("anointment.bloodmagic.hidden_knowledge", "Miner's Secrets"); + add("anointment.bloodmagic.quick_draw", "Deft Hands"); + add("anointment.bloodmagic.bow_power", "Heavy Shot"); + add("anointment.bloodmagic.looting", "Plundering"); + add("anointment.bloodmagic.smelting", "Heated Tool"); + + // Guide + add("guide.bloodmagic.name", "Sanguine Scientiem"); + add("guide.bloodmagic.landing_text", "\"It is my dear hope that by holding this tome in your hands, I may impart the knowledge of the lost art that is Blood Magic\"$(br)$(o)- Magus Arcana$()"); + + // Keybinds + add("bloodmagic.keybind.open_holding", "Open Sigil of Holding"); + add("bloodmagic.keybind.cycle_holding_pos", "Cycle Sigil (+)"); + add("bloodmagic.keybind.cycle_holding_neg", "Cycle Sigil (-)"); + + // Block names + addBlock(BloodMagicBlocks.BLANK_RUNE, "Blank Rune"); + addBlock(BloodMagicBlocks.SPEED_RUNE, "Speed Rune"); + addBlock(BloodMagicBlocks.SACRIFICE_RUNE, "Rune of Sacrifice"); + addBlock(BloodMagicBlocks.SELF_SACRIFICE_RUNE, "Rune of Self Sacrifice"); + addBlock(BloodMagicBlocks.DISPLACEMENT_RUNE, "Displacement Rune"); + addBlock(BloodMagicBlocks.CAPACITY_RUNE, "Rune of Capacity"); + addBlock(BloodMagicBlocks.AUGMENTED_CAPACITY_RUNE, "Rune of Augmented Capacity"); + addBlock(BloodMagicBlocks.ORB_RUNE, "Rune of the Orb"); + addBlock(BloodMagicBlocks.ACCELERATION_RUNE, "Acceleration Rune"); + addBlock(BloodMagicBlocks.CHARGING_RUNE, "Charging Rune"); + addBlock(BloodMagicBlocks.BLOOD_ALTAR, "Blood Altar"); + addBlock(BloodMagicBlocks.SOUL_FORGE, "Hellfire Forge"); + addBlock(BloodMagicBlocks.BLANK_RITUAL_STONE, "Ritual Stone"); + addBlock(BloodMagicBlocks.AIR_RITUAL_STONE, "Air Ritual Stone"); + addBlock(BloodMagicBlocks.WATER_RITUAL_STONE, "Water Ritual Stone"); + addBlock(BloodMagicBlocks.FIRE_RITUAL_STONE, "Fire Ritual Stone"); + addBlock(BloodMagicBlocks.EARTH_RITUAL_STONE, "Earth Ritual Stone"); + addBlock(BloodMagicBlocks.DUSK_RITUAL_STONE, "Dusk Ritual Stone"); + addBlock(BloodMagicBlocks.DAWN_RITUAL_STONE, "Dawn Ritual Stone"); + addBlock(BloodMagicBlocks.MASTER_RITUAL_STONE, "Master Ritual Stone"); + + addBlock(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER, "Alchemical Reaction Chamber"); + addBlock(BloodMagicBlocks.ALCHEMY_TABLE, "Alchemy Table"); + addBlock(BloodMagicBlocks.INCENSE_ALTAR, "Incense Altar"); + + addBlock(BloodMagicBlocks.BLOODSTONE, "Large Bloodstone Brick"); + addBlock(BloodMagicBlocks.BLOODSTONE_BRICK, "Bloodstone Brick"); + + addBlock(BloodMagicBlocks.RAW_CRYSTAL_BLOCK, "Raw Crystal Cluster"); + addBlock(BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK, "Corrosive Crystal Cluster"); + addBlock(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK, "Destructive Crystal Cluster"); + addBlock(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK, "Vengeful Crystal Cluster"); + addBlock(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK, "Steadfast Crystal Cluster"); + + addBlock(BloodMagicBlocks.DEMON_CRUCIBLE, "Demon Crucible"); + addBlock(BloodMagicBlocks.DEMON_CRYSTALLIZER, "Demon Crystallizer"); + + addBlock(BloodMagicBlocks.WOOD_PATH, "Wooden Path"); + addBlock(BloodMagicBlocks.WOOD_TILE_PATH, "Tiled Wooden Path"); + addBlock(BloodMagicBlocks.STONE_PATH, "Stone Path"); + addBlock(BloodMagicBlocks.STONE_TILE_PATH, "Tiled Stone Path"); + addBlock(BloodMagicBlocks.WORN_STONE_PATH, "Worn Stone Path"); + addBlock(BloodMagicBlocks.WORN_STONE_TILE_PATH, "Tiled Worn Stone Path"); + addBlock(BloodMagicBlocks.OBSIDIAN_PATH, "Obsidian Path"); + addBlock(BloodMagicBlocks.OBSIDIAN_TILE_PATH, "Tiled Obsidian Path"); + + addBlock(BloodMagicBlocks.DUNGEON_BRICK_1, "Demon Bricks"); + addBlock(BloodMagicBlocks.DUNGEON_BRICK_2, "Offset Demon Bricks"); + addBlock(BloodMagicBlocks.DUNGEON_BRICK_3, "Long Demon Bricks"); + addBlock(BloodMagicBlocks.DUNGEON_SMALL_BRICK, "Small Demon Bricks"); + addBlock(BloodMagicBlocks.DUNGEON_BRICK_ASSORTED, "Assorted Demon Bricks"); + + addBlock(BloodMagicBlocks.DUNGEON_STONE, "Demon Stone"); + addBlock(BloodMagicBlocks.DUNGEON_POLISHED_STONE, "Polished Demon Stone"); + addBlock(BloodMagicBlocks.DUNGEON_TILE, "Demon Stone Tiles"); + addBlock(BloodMagicBlocks.DUNGEON_TILE_SPECIAL, "Accented Demon Stone Tiles"); + + addBlock(BloodMagicBlocks.DUNGEON_BRICK_GATE, "Demon Brick Gate"); + addBlock(BloodMagicBlocks.DUNGEON_POLISHED_GATE, "Demon Stone Gate"); + + addBlock(BloodMagicBlocks.DUNGEON_BRICK_STAIRS, "Demon Brick Stairs"); + addBlock(BloodMagicBlocks.DUNGEON_POLISHED_STAIRS, "Demon Stone Stairs"); + + addBlock(BloodMagicBlocks.DUNGEON_BRICK_WALL, "Demon Brick Wall"); + addBlock(BloodMagicBlocks.DUNGEON_POLISHED_WALL, "Demon Stone Wall"); + + addBlock(BloodMagicBlocks.DUNGEON_PILLAR_CAP, "Demon Stone Pillar Cap"); + addBlock(BloodMagicBlocks.DUNGEON_PILLAR_CENTER, "Demon Stone Pillar"); + addBlock(BloodMagicBlocks.DUNGEON_PILLAR_SPECIAL, "Accented Demon Stone Pillar"); + addBlock(BloodMagicBlocks.DUNGEON_EYE, "Demon Eye"); + + addBlock(BloodMagicBlocks.DUNGEON_ORE, "Demonite"); + + addBlock(BloodMagicBlocks.SHAPED_CHARGE, "Shaped Charge"); + addBlock(BloodMagicBlocks.DEFORESTER_CHARGE, "Deforester Charge"); + addBlock(BloodMagicBlocks.VEINMINE_CHARGE, "Controlled Charge"); + addBlock(BloodMagicBlocks.FUNGAL_CHARGE, "Fungal Charge"); + + // Item names + addItem(BloodMagicItems.WEAK_BLOOD_ORB, "Weak Blood Orb"); + addItem(BloodMagicItems.APPRENTICE_BLOOD_ORB, "Apprentice Blood Orb"); + addItem(BloodMagicItems.MAGICIAN_BLOOD_ORB, "Magician Blood Orb"); + addItem(BloodMagicItems.MASTER_BLOOD_ORB, "Master Blood Orb"); + addItem(BloodMagicItems.DIVINATION_SIGIL, "Divination Sigil"); + addItem(BloodMagicItems.WATER_SIGIL, "Water Sigil"); + addItem(BloodMagicItems.LAVA_SIGIL, "Lava Sigil"); + addItem(BloodMagicItems.VOID_SIGIL, "Void Sigil"); + addItem(BloodMagicItems.GREEN_GROVE_SIGIL, "Sigil of the Green Grove"); + addItem(BloodMagicItems.FAST_MINER_SIGIL, "Sigil of the Fast Miner"); + addItem(BloodMagicItems.MAGNETISM_SIGIL, "Sigil of Magnetism"); + addItem(BloodMagicItems.ICE_SIGIL, "Sigil of the Frozen Lake"); + addItem(BloodMagicItems.AIR_SIGIL, "Air Sigil"); + addItem(BloodMagicItems.BLOOD_LIGHT_SIGIL, "Sigil of the Blood Lamp"); + addItem(BloodMagicItems.SEER_SIGIL, "Seer's Sigil"); + addItem(BloodMagicItems.HOLDING_SIGIL, "Sigil of Holding"); + + addItem(BloodMagicBlocks.LIFE_ESSENCE_BUCKET, "Bucket of Life"); + addItem(BloodMagicItems.ARCANE_ASHES, "Arcane Ashes"); + addItem(BloodMagicItems.SLATE, "Blank Slate"); + addItem(BloodMagicItems.REINFORCED_SLATE, "Reinforced Slate"); + addItem(BloodMagicItems.IMBUED_SLATE, "Imbued Slate"); + addItem(BloodMagicItems.DEMONIC_SLATE, "Demonic Slate"); + addItem(BloodMagicItems.ETHEREAL_SLATE, "Ethereal Slate"); + + addItem(BloodMagicItems.DAGGER_OF_SACRIFICE, "Dagger of Sacrifice"); + addItem(BloodMagicItems.SACRIFICIAL_DAGGER, "Sacrificial Knife"); + addItem(BloodMagicItems.LAVA_CRYSTAL, "Lava Crystal"); + + addItem(BloodMagicItems.REAGENT_WATER, "Water Reagent"); + addItem(BloodMagicItems.REAGENT_LAVA, "Lava Reagent"); + addItem(BloodMagicItems.REAGENT_FAST_MINER, "Mining Reagent"); + addItem(BloodMagicItems.REAGENT_GROWTH, "Growth Reagent"); + addItem(BloodMagicItems.REAGENT_VOID, "Void Reagent"); + addItem(BloodMagicItems.REAGENT_MAGNETISM, "Magnetism Reagent"); + addItem(BloodMagicItems.REAGENT_AIR, "Air Reagent"); + addItem(BloodMagicItems.REAGENT_BLOOD_LIGHT, "Blood Lamp Reagent"); + addItem(BloodMagicItems.REAGENT_SIGHT, "Sight Reagent"); + addItem(BloodMagicItems.REAGENT_BINDING, "Binding Reagent"); + addItem(BloodMagicItems.REAGENT_HOLDING, "Holding Reagent"); + + addItem(BloodMagicItems.PETTY_GEM, "Petty Tartaric Gem"); + addItem(BloodMagicItems.LESSER_GEM, "Lesser Tartaric Gem"); + addItem(BloodMagicItems.COMMON_GEM, "Common Tartaric Gem"); + addItem(BloodMagicItems.GREATER_GEM, "Greater Tartaric Gem"); + addItem(BloodMagicItems.MONSTER_SOUL_RAW, "Demon Will"); + addItem(BloodMagicItems.MONSTER_SOUL_CORROSIVE, "Demon Will"); + addItem(BloodMagicItems.MONSTER_SOUL_DESTRUCTIVE, "Demon Will"); + addItem(BloodMagicItems.MONSTER_SOUL_STEADFAST, "Demon Will"); + addItem(BloodMagicItems.MONSTER_SOUL_VENGEFUL, "Demon Will"); + addItem(BloodMagicItems.SOUL_SNARE, "Soul Snare"); + addItem(BloodMagicItems.SENTIENT_SWORD, "Sentient Sword"); + addItem(BloodMagicItems.SENTIENT_AXE, "Sentient Axe"); + addItem(BloodMagicItems.SENTIENT_PICKAXE, "Sentient Pickaxe"); + addItem(BloodMagicItems.SENTIENT_SHOVEL, "Sentient Shovel"); + addItem(BloodMagicItems.SENTIENT_SCYTHE, "Sentient Scythe"); + + addItem(BloodMagicItems.WEAK_ACTIVATION_CRYSTAL, "Weak Activation Crystal"); + addItem(BloodMagicItems.AWAKENED_ACTIVATION_CRYSTAL, "Awakened Activation Crystal"); + addItem(BloodMagicItems.CREATIVE_ACTIVATION_CRYSTAL, "Creative Activation Crystal"); + addItem(BloodMagicItems.WATER_INSCRIPTION_TOOL, "Inscription Tool: Water"); + addItem(BloodMagicItems.FIRE_INSCRIPTION_TOOL, "Inscription Tool: Fire"); + addItem(BloodMagicItems.EARTH_INSCRIPTION_TOOL, "Inscription Tool: Earth"); + addItem(BloodMagicItems.AIR_INSCRIPTION_TOOL, "Inscription Tool: Air"); + addItem(BloodMagicItems.DUSK_INSCRIPTION_TOOL, "Inscription Tool: Dusk"); + + addItem(BloodMagicItems.BASE_RITUAL_DIVINER, "Ritual Diviner"); + addItem(BloodMagicItems.DUSK_RITUAL_DIVINER, "Ritual Diviner [Dusk]"); + addItem(BloodMagicItems.RITUAL_READER, "Ritual Tinkerer"); + + addItem(BloodMagicItems.WEAK_BLOOD_SHARD, "Weak Blood Shard"); + addItem(BloodMagicItems.RAW_CRYSTAL, "Demon Will Crystal"); + addItem(BloodMagicItems.CORROSIVE_CRYSTAL, "Corrosive Will Crystal"); + addItem(BloodMagicItems.DESTRUCTIVE_CRYSTAL, "Destructive Will Crystal"); + addItem(BloodMagicItems.VENGEFUL_CRYSTAL, "Vengeful Will Crystal"); + addItem(BloodMagicItems.STEADFAST_CRYSTAL, "Steadfast Will Crystal"); + + addItem(BloodMagicItems.SANGUINE_REVERTER, "Sanguine Reverter"); + addItem(BloodMagicItems.PRIMITIVE_FURNACE_CELL, "Primitive Fuel Cell"); + + addItem(BloodMagicItems.PRIMITIVE_CRYSTALLINE_RESONATOR, "Primitive Resonator"); + addItem(BloodMagicItems.CRYSTALLINE_RESONATOR, "Crystalline Resonator"); + + addItem(BloodMagicItems.PRIMITIVE_HYDRATION_CELL, "Primitive Hydration Cell"); + addItem(BloodMagicItems.PRIMITIVE_EXPLOSIVE_CELL, "Primitive Explosive Cell"); + addItem(BloodMagicItems.EXPLOSIVE_POWDER, "Explosive Powder"); + + addItem(BloodMagicItems.BASIC_CUTTING_FLUID, "Basic Cutting Fluid"); + + addItem(BloodMagicItems.EXPERIENCE_TOME, "Tome of Peritia"); + + addItem(BloodMagicItems.LIVING_HELMET, "Living Helmet"); + addItem(BloodMagicItems.LIVING_PLATE, "Living Chestplate"); + addItem(BloodMagicItems.LIVING_LEGGINGS, "Living Leggings"); + addItem(BloodMagicItems.LIVING_BOOTS, "Living Boots"); + + addItem(BloodMagicItems.LIVING_TOME, "Living Armour Upgrade Tome"); + + addItem(BloodMagicItems.THROWING_DAGGER, "Iron Throwing Dagger"); + addItem(BloodMagicItems.THROWING_DAGGER_SYRINGE, "Syringe Throwing Dagger"); + addItem(BloodMagicItems.SLATE_AMPOULE, "Slate Ampoule"); + + // Anointment Items + addItem(BloodMagicItems.SLATE_VIAL, "Slate-infused Vial"); + addItem(BloodMagicItems.MELEE_DAMAGE_ANOINTMENT, "Honing Oil"); + addItem(BloodMagicItems.SILK_TOUCH_ANOINTMENT, "Soft Coating"); + addItem(BloodMagicItems.FORTUNE_ANOINTMENT, "Fortuna Extract"); + addItem(BloodMagicItems.HOLY_WATER_ANOINTMENT, "Holy Water"); + addItem(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT, "Miner's Secrets"); + addItem(BloodMagicItems.QUICK_DRAW_ANOINTMENT, "Dexterity Alkahest"); + addItem(BloodMagicItems.BOW_POWER_ANOINTMENT, "Iron Tip"); + addItem(BloodMagicItems.LOOTING_ANOINTMENT, "Plunderer's Glint"); + addItem(BloodMagicItems.SMELTING_ANOINTMENT, "Slow-burning Oil"); + + // Alchemy Items + addItem(BloodMagicItems.PLANT_OIL, "Plant Oil"); + + // Sands + addItem(BloodMagicItems.COAL_SAND, "Coal Sand"); + addItem(BloodMagicItems.IRON_SAND, "Iron Sand"); + addItem(BloodMagicItems.GOLD_SAND, "Gold Sand"); + addItem(BloodMagicItems.NETHERITE_SCRAP_SAND, "Netherite Scrap Sand"); + addItem(BloodMagicItems.SULFUR, "Sulfur"); + addItem(BloodMagicItems.SALTPETER, "Saltpeter"); + + // Fragments + addItem(BloodMagicItems.IRON_FRAGMENT, "Iron Ore Fragment"); + addItem(BloodMagicItems.GOLD_FRAGMENT, "Gold Ore Fragment"); + addItem(BloodMagicItems.NETHERITE_SCRAP_FRAGMENT, "Ancient Debris Fragment"); + + // Gravels + addItem(BloodMagicItems.IRON_GRAVEL, "Iron Gravel"); + addItem(BloodMagicItems.GOLD_GRAVEL, "Gold Gravel"); + addItem(BloodMagicItems.NETHERITE_SCRAP_GRAVEL, "Ancient Debris Gravel"); + +// addItem(BloodMagicItems , ""); + + // JEI + add("jei.bloodmagic.recipe.minimumsouls", "Minimum: %s Will"); + add("jei.bloodmagic.recipe.soulsdrained", "Drained: %s Will"); + add("jei.bloodmagic.recipe.requiredlp", "LP: %d"); + add("jei.bloodmagic.recipe.requiredtier", "Tier: %d"); + add("jei.bloodmagic.recipe.consumptionrate", "Consumption: %s LP/t"); + add("jei.bloodmagic.recipe.drainrate", "Drain: %s LP/t"); + + add("jei.bloodmagic.recipe.lpDrained", "Drained: %s LP"); + add("jei.bloodmagic.recipe.ticksRequired", "Time: %sTicks"); + + add("jei.bloodmagic.recipe.altar", "Blood Altar"); + add("jei.bloodmagic.recipe.soulforge", "Hellfire Forge"); + add("jei.bloodmagic.recipe.alchemyarraycrafting", "Alchemy Array"); + add("jei.bloodmagic.recipe.arc", "ARC Recipe"); + add("jei.bloodmagic.recipe.arcfurnace", "ARC Furnace Recipe"); + add("jei.bloodmagic.recipe.alchemytable", "Alchemy Table"); + + // Chat + add("chat.bloodmagic.ritual.weak", "You feel a push, but are too weak to perform this ritual."); + add("chat.bloodmagic.ritual.prevent", "The ritual is actively resisting you!"); + add("chat.bloodmagic.ritual.activate", "A rush of energy flows through the ritual!"); + add("chat.bloodmagic.ritual.notValid", "You feel that these runes are not configured correctly..."); + + // GUI + add("gui.bloodmagic.empty", "Empty"); + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLootTable.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLootTable.java new file mode 100644 index 00000000..e2a6c743 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLootTable.java @@ -0,0 +1,190 @@ +package wayoftime.bloodmagic.common.data; + +import java.util.List; +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.google.common.collect.ImmutableList; +import com.mojang.datafixers.util.Pair; + +import net.minecraft.advancements.criterion.StatePropertiesPredicate; +import net.minecraft.block.Block; +import net.minecraft.block.Blocks; +import net.minecraft.block.CropsBlock; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.LootTableProvider; +import net.minecraft.data.loot.BlockLootTables; +import net.minecraft.data.loot.ChestLootTables; +import net.minecraft.item.Item; +import net.minecraft.item.Items; +import net.minecraft.loot.ConstantRange; +import net.minecraft.loot.ItemLootEntry; +import net.minecraft.loot.LootParameterSet; +import net.minecraft.loot.LootParameterSets; +import net.minecraft.loot.LootPool; +import net.minecraft.loot.LootTable; +import net.minecraft.loot.LootTableManager; +import net.minecraft.loot.ValidationTracker; +import net.minecraft.loot.conditions.BlockStateProperty; +import net.minecraft.loot.conditions.ILootCondition; +import net.minecraft.loot.functions.EnchantWithLevels; +import net.minecraft.loot.functions.SetCount; +import net.minecraft.state.Property; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BlockDemonCrystal; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; + +public class GeneratorLootTable extends LootTableProvider +{ + public GeneratorLootTable(DataGenerator dataGeneratorIn) + { + super(dataGeneratorIn); + } + + @Override + protected List>>, LootParameterSet>> getTables() + { + return ImmutableList.of(Pair.of(BMBlocks::new, LootParameterSets.BLOCK), Pair.of(BMLootTables::new, LootParameterSets.CHEST)); + } + + private static class BMLootTables extends ChestLootTables + { + @Override + public void accept(BiConsumer acceptor) + { + acceptor.accept(BloodMagic.rl("test"), testLootTableGeneration()); + } + + private LootTable.Builder testLootTableGeneration() + { + LootTable.Builder table = LootTable.builder(); + LootPool.Builder pool = LootPool.builder().name("test").addEntry(ItemLootEntry.builder(Items.BOOK).weight(10).acceptFunction(EnchantWithLevels.func_215895_a(ConstantRange.of(30)).func_216059_e())); + + table.addLootPool(pool); +// table.build(); + + return table; + } + } + + private static class BMBlocks extends BlockLootTables + { + @Override + protected void addTables() + { + for (RegistryObject block : BloodMagicBlocks.BASICBLOCKS.getEntries()) + { + this.registerDropSelfLootTable(block.get()); + } + + for (RegistryObject block : BloodMagicBlocks.DUNGEONBLOCKS.getEntries()) + { + this.registerDropSelfLootTable(block.get()); + } + + registerDropSelfLootTable(BloodMagicBlocks.BLOOD_ALTAR.get()); + registerNoDropLootTable(BloodMagicBlocks.ALCHEMY_ARRAY.get()); + registerNoDropLootTable(BloodMagicBlocks.BLOOD_LIGHT.get()); + registerDropSelfLootTable(BloodMagicBlocks.SOUL_FORGE.get()); + registerDropSelfLootTable(BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropping(BloodMagicBlocks.AIR_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropping(BloodMagicBlocks.WATER_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropping(BloodMagicBlocks.FIRE_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropping(BloodMagicBlocks.EARTH_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropping(BloodMagicBlocks.DUSK_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropping(BloodMagicBlocks.DAWN_RITUAL_STONE.get(), BloodMagicBlocks.BLANK_RITUAL_STONE.get()); + registerDropSelfLootTable(BloodMagicBlocks.ALCHEMY_TABLE.get()); + registerDropSelfLootTable(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()); + registerDropSelfLootTable(BloodMagicBlocks.DEMON_CRUCIBLE.get()); + registerDropSelfLootTable(BloodMagicBlocks.DEMON_CRYSTALLIZER.get()); + registerDropSelfLootTable(BloodMagicBlocks.INCENSE_ALTAR.get()); +// registerNoDropLootTable(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get()); + registerDropping(BloodMagicBlocks.NETHER_SOIL.get(), Blocks.NETHERRACK); + + registerDropCrystalsLootTable(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(), BloodMagicItems.RAW_CRYSTAL.get()); + registerDropCrystalsLootTable(BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get(), BloodMagicItems.CORROSIVE_CRYSTAL.get()); + registerDropCrystalsLootTable(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get(), BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()); + registerDropCrystalsLootTable(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get(), BloodMagicItems.VENGEFUL_CRYSTAL.get()); + registerDropCrystalsLootTable(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get(), BloodMagicItems.STEADFAST_CRYSTAL.get()); + + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_BRICK_ASSORTED.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_STONE.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_BRICK_STAIRS.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_POLISHED_STAIRS.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_PILLAR_CENTER.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_PILLAR_SPECIAL.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_PILLAR_CAP.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_BRICK_WALL.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_BRICK_GATE.get()); + registerDropSelfLootTable(BloodMagicBlocks.DUNGEON_POLISHED_GATE.get()); + + registerDropSelfLootTable(BloodMagicBlocks.MIMIC.get()); + registerDropSelfLootTable(BloodMagicBlocks.ETHEREAL_MIMIC.get()); + + registerCropDropLootTable(BloodMagicBlocks.GROWING_DOUBT.get(), BloodMagicItems.WEAK_BLOOD_SHARD.get()); + + registerNoDropLootTable(BloodMagicBlocks.SHAPED_CHARGE.get()); + registerNoDropLootTable(BloodMagicBlocks.DEFORESTER_CHARGE.get()); + registerNoDropLootTable(BloodMagicBlocks.VEINMINE_CHARGE.get()); + registerNoDropLootTable(BloodMagicBlocks.FUNGAL_CHARGE.get()); + } + + private void registerNoDropLootTable(Block block) + { + LootPool.Builder builder = LootPool.builder().name(block.getRegistryName().toString()); + this.registerLootTable(block, LootTable.builder().addLootPool(builder)); + } + + private void registerCropDropLootTable(Block block, Item item) + { + LootTable.Builder builder = LootTable.builder(); + + for (int i = 0; i < 7; i++) + { + ILootCondition.IBuilder harvestAge = BlockStateProperty.builder(block).fromProperties(StatePropertiesPredicate.Builder.newBuilder().withIntProp(CropsBlock.AGE, i)); + builder = builder.addLootPool(LootPool.builder().addEntry(ItemLootEntry.builder(item).acceptFunction(SetCount.builder(ConstantRange.of(1))).acceptCondition(harvestAge))); + } + + this.registerLootTable(block, builder); + } + + private void registerDropCrystalsLootTable(Block block, Item item) + { + LootTable.Builder builder = LootTable.builder(); + + for (int i = 0; i < 7; i++) + { + ILootCondition.IBuilder harvestAge = BlockStateProperty.builder(block).fromProperties(StatePropertiesPredicate.Builder.newBuilder().withIntProp(BlockDemonCrystal.AGE, i)); + builder = builder.addLootPool(LootPool.builder().addEntry(ItemLootEntry.builder(item).acceptFunction(SetCount.builder(ConstantRange.of(i + 1))).acceptCondition(harvestAge))); + } + + this.registerLootTable(block, builder); + } + + protected static & IStringSerializable> LootTable.Builder droppingWhen(Block block, Property property, T value) + { + return LootTable.builder().addLootPool(withSurvivesExplosion(block, LootPool.builder().rolls(ConstantRange.of(1)).addEntry(ItemLootEntry.builder(block).acceptCondition(BlockStateProperty.builder(block).fromProperties(StatePropertiesPredicate.Builder.newBuilder().withProp(property, value)))))); + } + + @Override + protected Iterable getKnownBlocks() + { + return ForgeRegistries.BLOCKS.getValues().stream().filter(b -> b.getRegistryName().getNamespace().equals(BloodMagic.MODID)).collect(Collectors.toList()); + } + } + + @Override + protected void validate(Map map, ValidationTracker validationtracker) + { + map.forEach((name, table) -> LootTableManager.validateLootTable(validationtracker, name, table)); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/BaseRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/BaseRecipeProvider.java new file mode 100644 index 00000000..e8e9ead3 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/BaseRecipeProvider.java @@ -0,0 +1,44 @@ +package wayoftime.bloodmagic.common.data.recipe; + +import java.util.Collections; +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.data.DataGenerator; +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.data.RecipeProvider; +import wayoftime.bloodmagic.common.recipe.ISubRecipeProvider; + +public abstract class BaseRecipeProvider extends RecipeProvider +{ + private final String modid; + + public BaseRecipeProvider(DataGenerator gen, String modid) + { + super(gen); + this.modid = modid; + } + + @Override + public String getName() + { + return super.getName() + modid; + } + + @Override + protected void registerRecipes(Consumer consumer) + { + getSubRecipeProviders().forEach(subRecipeProvider -> subRecipeProvider.addRecipes(consumer)); + } + + /** + * Gets all the sub/offloaded recipe providers that this recipe provider has. + * + * @implNote This is only called once per provider so there is no need to bother + * caching the list that this returns + */ + protected List getSubRecipeProviders() + { + return Collections.emptyList(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/BloodMagicRecipeBuilder.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/BloodMagicRecipeBuilder.java new file mode 100644 index 00000000..21098bdf --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/BloodMagicRecipeBuilder.java @@ -0,0 +1,145 @@ +package wayoftime.bloodmagic.common.data.recipe; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; + +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.AdvancementRewards; +import net.minecraft.advancements.ICriterionInstance; +import net.minecraft.advancements.IRequirementsStrategy; +import net.minecraft.advancements.criterion.RecipeUnlockedTrigger; +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.crafting.CraftingHelper; +import net.minecraftforge.common.crafting.conditions.ICondition; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.Constants; + +public abstract class BloodMagicRecipeBuilder> +{ + + protected static ResourceLocation bmSerializer(String name) + { + return new ResourceLocation(BloodMagic.MODID, name); + } + + protected final List conditions = new ArrayList<>(); + protected final Advancement.Builder advancementBuilder = Advancement.Builder.builder(); + protected final ResourceLocation serializerName; + + protected BloodMagicRecipeBuilder(ResourceLocation serializerName) + { + this.serializerName = serializerName; + } + + public BUILDER addCriterion(RecipeCriterion criterion) + { + return addCriterion(criterion.name, criterion.criterion); + } + + public BUILDER addCriterion(String name, ICriterionInstance criterion) + { + advancementBuilder.withCriterion(name, criterion); + return (BUILDER) this; + } + + public BUILDER addCondition(ICondition condition) + { + conditions.add(condition); + return (BUILDER) this; + } + + protected boolean hasCriteria() + { + return !advancementBuilder.getCriteria().isEmpty(); + } + + protected abstract RecipeResult getResult(ResourceLocation id); + + protected void validate(ResourceLocation id) + { + } + + public void build(Consumer consumer, ResourceLocation id) + { + validate(id); + if (hasCriteria()) + { + // If there is a way to "unlock" this recipe then add an advancement with the + // criteria + advancementBuilder.withParentId(new ResourceLocation("recipes/root")).withCriterion("has_the_recipe", RecipeUnlockedTrigger.create(id)).withRewards(AdvancementRewards.Builder.recipe(id)).withRequirementsStrategy(IRequirementsStrategy.OR); + } + consumer.accept(getResult(id)); + } + + protected abstract class RecipeResult implements IFinishedRecipe + { + + private final ResourceLocation id; + + public RecipeResult(ResourceLocation id) + { + this.id = id; + } + + @Override + public JsonObject getRecipeJson() + { + JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty(Constants.JSON.TYPE, serializerName.toString()); + if (!conditions.isEmpty()) + { + JsonArray conditionsArray = new JsonArray(); + for (ICondition condition : conditions) + { + conditionsArray.add(CraftingHelper.serialize(condition)); + } + jsonObject.add(Constants.JSON.CONDITIONS, conditionsArray); + } + this.serialize(jsonObject); + return jsonObject; + } + + @Nonnull + @Override + public IRecipeSerializer getSerializer() + { + // Note: This may be null if something is screwed up but this method isn't + // actually used so it shouldn't matter + // and in fact it will probably be null if only the API is included. But again, + // as we manually just use + // the serializer's name this should not effect us + return ForgeRegistries.RECIPE_SERIALIZERS.getValue(serializerName); + } + + @Nonnull + @Override + public ResourceLocation getID() + { + return this.id; + } + + @Nullable + @Override + public JsonObject getAdvancementJson() + { + return hasCriteria() ? advancementBuilder.serialize() : null; + } + + @Nullable + @Override + public ResourceLocation getAdvancementID() + { + return new ResourceLocation(id.getNamespace(), "recipes/" + id.getPath()); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/BloodMagicRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/BloodMagicRecipeProvider.java new file mode 100644 index 00000000..af4c0c89 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/BloodMagicRecipeProvider.java @@ -0,0 +1,27 @@ +package wayoftime.bloodmagic.common.data.recipe; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.data.DataGenerator; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.recipe.ARCRecipeProvider; +import wayoftime.bloodmagic.common.recipe.AlchemyArrayRecipeProvider; +import wayoftime.bloodmagic.common.recipe.AlchemyTableRecipeProvider; +import wayoftime.bloodmagic.common.recipe.BloodAltarRecipeProvider; +import wayoftime.bloodmagic.common.recipe.ISubRecipeProvider; +import wayoftime.bloodmagic.common.recipe.TartaricForgeRecipeProvider; + +public class BloodMagicRecipeProvider extends BaseRecipeProvider +{ + public BloodMagicRecipeProvider(DataGenerator gen) + { + super(gen, BloodMagic.MODID); + } + + @Override + protected List getSubRecipeProviders() + { + return Arrays.asList(new BloodAltarRecipeProvider(), new AlchemyArrayRecipeProvider(), new TartaricForgeRecipeProvider(), new ARCRecipeProvider(), new AlchemyTableRecipeProvider()); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/RecipeCriterion.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/RecipeCriterion.java new file mode 100644 index 00000000..4418c70a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/RecipeCriterion.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.common.data.recipe; + +import net.minecraft.advancements.ICriterionInstance; + +public class RecipeCriterion +{ + public final String name; + public final ICriterionInstance criterion; + + private RecipeCriterion(String name, ICriterionInstance criterion) + { + this.name = name; + this.criterion = criterion; + } + + public static RecipeCriterion of(String name, ICriterionInstance criterion) + { + return new RecipeCriterion(name, criterion); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/ARCRecipeBuilder.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/ARCRecipeBuilder.java new file mode 100644 index 00000000..cda7631a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/ARCRecipeBuilder.java @@ -0,0 +1,109 @@ +package wayoftime.bloodmagic.common.data.recipe.builder; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import org.apache.commons.lang3.tuple.Pair; + +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeBuilder; +import wayoftime.bloodmagic.util.Constants; + +public class ARCRecipeBuilder extends BloodMagicRecipeBuilder +{ + private final Ingredient input; + private final Ingredient arcTool; + private final FluidStackIngredient inputFluid; + private final ItemStack output; + private final FluidStack outputFluid; + private final List> addedItems = new ArrayList>(); + private final boolean consumeIngredient; + + protected ARCRecipeBuilder(Ingredient input, Ingredient arcTool, FluidStackIngredient inputFluid, ItemStack output, FluidStack outputFluid, boolean consumeIngredient) + { + super(bmSerializer("arc")); + this.input = input; + this.arcTool = arcTool; + this.inputFluid = inputFluid; + this.output = output; + this.outputFluid = outputFluid == null ? FluidStack.EMPTY : outputFluid; + this.consumeIngredient = consumeIngredient; + } + + public static ARCRecipeBuilder arc(Ingredient input, Ingredient arcTool, FluidStackIngredient inputFluid, ItemStack output, FluidStack outputFluid) + { + return new ARCRecipeBuilder(input, arcTool, inputFluid, output, outputFluid, false); + } + + public static ARCRecipeBuilder arcConsume(Ingredient input, Ingredient arcTool, FluidStackIngredient inputFluid, ItemStack output, FluidStack outputFluid) + { + return new ARCRecipeBuilder(input, arcTool, inputFluid, output, outputFluid, true); + } + + public ARCRecipeBuilder addRandomOutput(ItemStack stack, double chance) + { + if (addedItems.size() >= RecipeARC.MAX_RANDOM_OUTPUTS) + { + return this; + } + + addedItems.add(Pair.of(stack, chance)); + + return this; + } + + @Override + protected ARCRecipeResult getResult(ResourceLocation id) + { + return new ARCRecipeResult(id); + } + + public class ARCRecipeResult extends RecipeResult + { + protected ARCRecipeResult(ResourceLocation id) + { + super(id); + } + + @Override + public void serialize(@Nonnull JsonObject json) + { + json.add(Constants.JSON.INPUT, input.serialize()); + json.add(Constants.JSON.TOOL, arcTool.serialize()); + + if (inputFluid != null) + json.add(Constants.JSON.INPUT_FLUID, inputFluid.serialize()); + + if (addedItems.size() > 0) + { + JsonArray mainArray = new JsonArray(); + for (Pair pair : addedItems) + { + JsonObject jsonObj = new JsonObject(); + jsonObj.addProperty(Constants.JSON.CHANCE, pair.getValue().floatValue()); + jsonObj.add(Constants.JSON.TYPE, SerializerHelper.serializeItemStack(pair.getKey())); + mainArray.add(jsonObj); + } + + json.add(Constants.JSON.ADDEDOUTPUT, mainArray); + } + + if (outputFluid != null && !outputFluid.isEmpty()) + json.add(Constants.JSON.OUTPUT_FLUID, SerializerHelper.serializeFluidStack(outputFluid)); + + json.add(Constants.JSON.OUTPUT, SerializerHelper.serializeItemStack(output)); + json.addProperty("consumeingredient", consumeIngredient); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/AlchemyArrayRecipeBuilder.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/AlchemyArrayRecipeBuilder.java new file mode 100644 index 00000000..429c8f58 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/AlchemyArrayRecipeBuilder.java @@ -0,0 +1,58 @@ +package wayoftime.bloodmagic.common.data.recipe.builder; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeBuilder; +import wayoftime.bloodmagic.util.Constants; + +public class AlchemyArrayRecipeBuilder extends BloodMagicRecipeBuilder +{ + private final ResourceLocation texture; + private final Ingredient baseInput; + private final Ingredient addedInput; + private final ItemStack output; + + protected AlchemyArrayRecipeBuilder(ResourceLocation texture, Ingredient baseInput, Ingredient addedInput, ItemStack output) + { + super(bmSerializer("array")); + this.texture = texture; + this.baseInput = baseInput; + this.addedInput = addedInput; + this.output = output; + } + + public static AlchemyArrayRecipeBuilder array(ResourceLocation texture, Ingredient baseInput, Ingredient addedInput, ItemStack output) + { + return new AlchemyArrayRecipeBuilder(texture, baseInput, addedInput, output); + } + + @Override + protected AlchemyArrayRecipeResult getResult(ResourceLocation id) + { + return new AlchemyArrayRecipeResult(id); + } + + public class AlchemyArrayRecipeResult extends RecipeResult + { + protected AlchemyArrayRecipeResult(ResourceLocation id) + { + super(id); + } + + @Override + public void serialize(@Nonnull JsonObject json) + { + json.addProperty(Constants.JSON.TEXTURE, texture.toString()); +// JSONUtils.getString(json, ); + json.add(Constants.JSON.BASEINPUT, baseInput.serialize()); + json.add(Constants.JSON.ADDEDINPUT, addedInput.serialize()); + json.add(Constants.JSON.OUTPUT, SerializerHelper.serializeItemStack(output)); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/AlchemyTableRecipeBuilder.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/AlchemyTableRecipeBuilder.java new file mode 100644 index 00000000..19384024 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/AlchemyTableRecipeBuilder.java @@ -0,0 +1,90 @@ +package wayoftime.bloodmagic.common.data.recipe.builder; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeBuilder; +import wayoftime.bloodmagic.util.Constants; + +public class AlchemyTableRecipeBuilder extends BloodMagicRecipeBuilder +{ + private final List input; + private final ItemStack output; + private final int syphon; + private final int ticks; + private final int minimumTier; + + protected AlchemyTableRecipeBuilder(List input, ItemStack output, int syphon, int ticks, int minimumTier) + { + super(bmSerializer("alchemytable")); + this.input = input; + this.output = output; + this.syphon = syphon; + this.ticks = ticks; + this.minimumTier = minimumTier; + } + + public static AlchemyTableRecipeBuilder alchemyTable(ItemStack output, int syphon, int ticks, int minimumTier) + { + List inputList = new ArrayList(); + + return new AlchemyTableRecipeBuilder(inputList, output, syphon, ticks, minimumTier); + } + + public AlchemyTableRecipeBuilder addIngredient(Ingredient ing) + { + if (input.size() < RecipeAlchemyTable.MAX_INPUTS) + { + input.add(ing); + } + + return this; + } + + @Override + protected AlchemyTableRecipeResult getResult(ResourceLocation id) + { + return new AlchemyTableRecipeResult(id); + } + + public class AlchemyTableRecipeResult extends RecipeResult + { + protected AlchemyTableRecipeResult(ResourceLocation id) + { + super(id); + } + + @Override + public void serialize(@Nonnull JsonObject json) + { + if (input.size() > 0) + { + JsonArray mainArray = new JsonArray(); + for (Ingredient ing : input) + { + JsonElement jsonObj = ing.serialize(); + + mainArray.add(jsonObj); + } + + json.add(Constants.JSON.INPUT, mainArray); + } + + json.add(Constants.JSON.OUTPUT, SerializerHelper.serializeItemStack(output)); + json.addProperty(Constants.JSON.SYPHON, syphon); + json.addProperty(Constants.JSON.TICKS, ticks); + json.addProperty(Constants.JSON.ALTAR_TIER, minimumTier); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/BloodAltarRecipeBuilder.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/BloodAltarRecipeBuilder.java new file mode 100644 index 00000000..9abb52ea --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/BloodAltarRecipeBuilder.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.common.data.recipe.builder; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeBuilder; +import wayoftime.bloodmagic.util.Constants; + +public class BloodAltarRecipeBuilder extends BloodMagicRecipeBuilder +{ + private final Ingredient input; + private final ItemStack output; + private final int minimumTier; + private final int syphon; + private final int consumeRate; + private final int drainRate; + + protected BloodAltarRecipeBuilder(Ingredient input, ItemStack output, int minimumTier, int syphon, int consumeRate, int drainRate) + { + super(bmSerializer("altar")); + this.input = input; + this.output = output; + this.minimumTier = minimumTier; + this.syphon = syphon; + this.consumeRate = consumeRate; + this.drainRate = drainRate; + } + + public static BloodAltarRecipeBuilder altar(Ingredient input, ItemStack output, int minimumTier, int syphon, int consumeRate, int drainRate) + { + return new BloodAltarRecipeBuilder(input, output, minimumTier, syphon, consumeRate, drainRate); + } + + @Override + protected BloodAltarRecipeResult getResult(ResourceLocation id) + { + return new BloodAltarRecipeResult(id); + } + + public class BloodAltarRecipeResult extends RecipeResult + { + protected BloodAltarRecipeResult(ResourceLocation id) + { + super(id); + } + + @Override + public void serialize(@Nonnull JsonObject json) + { + json.add(Constants.JSON.INPUT, input.serialize()); + json.add(Constants.JSON.OUTPUT, SerializerHelper.serializeItemStack(output)); + json.addProperty(Constants.JSON.ALTAR_TIER, minimumTier); + json.addProperty(Constants.JSON.ALTAR_SYPHON, syphon); + json.addProperty(Constants.JSON.ALTAR_CONSUMPTION_RATE, consumeRate); + json.addProperty(Constants.JSON.ALTAR_DRAIN_RATE, drainRate); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/TartaricForgeRecipeBuilder.java b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/TartaricForgeRecipeBuilder.java new file mode 100644 index 00000000..2813fbeb --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/data/recipe/builder/TartaricForgeRecipeBuilder.java @@ -0,0 +1,75 @@ +package wayoftime.bloodmagic.common.data.recipe.builder; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeBuilder; +import wayoftime.bloodmagic.util.Constants; + +public class TartaricForgeRecipeBuilder extends BloodMagicRecipeBuilder +{ + private final List input; + private final ItemStack output; + private final double minimumSouls; + private final double soulDrain; + + protected TartaricForgeRecipeBuilder(List input, ItemStack output, double minimumSouls, double soulDrain) + { + super(bmSerializer("soulforge")); + this.input = input; + this.output = output; + this.minimumSouls = minimumSouls; + this.soulDrain = soulDrain; + } + + public static TartaricForgeRecipeBuilder tartaricForge(List input, ItemStack output, double minimumSouls, double soulDrain) + { + return new TartaricForgeRecipeBuilder(input, output, minimumSouls, soulDrain); + } + + public static TartaricForgeRecipeBuilder tartaricForge(ItemStack output, double minimumSouls, double soulDrain, Ingredient... inputArray) + { + List inputList = new ArrayList(); + for (int i = 0; i < inputArray.length; i++) + { + inputList.add(inputArray[i]); + } + return new TartaricForgeRecipeBuilder(inputList, output, minimumSouls, soulDrain); + } + + @Override + protected TartaricForgeRecipeResult getResult(ResourceLocation id) + { + return new TartaricForgeRecipeResult(id); + } + + public class TartaricForgeRecipeResult extends RecipeResult + { + protected TartaricForgeRecipeResult(ResourceLocation id) + { + super(id); + } + + @Override + public void serialize(@Nonnull JsonObject json) + { + for (int i = 0; i < Math.min(input.size(), 4); i++) + { + json.add(Constants.JSON.INPUT + i, input.get(i).serialize()); + } + + json.add(Constants.JSON.OUTPUT, SerializerHelper.serializeItemStack(output)); + json.addProperty(Constants.JSON.TARTARIC_MINIMUM, (float) minimumSouls); + json.addProperty(Constants.JSON.TARTARIC_DRAIN, (float) soulDrain); + + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ArmorMaterialLiving.java b/src/main/java/wayoftime/bloodmagic/common/item/ArmorMaterialLiving.java new file mode 100644 index 00000000..20f04529 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ArmorMaterialLiving.java @@ -0,0 +1,59 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ArmorMaterial; +import net.minecraft.item.IArmorMaterial; +import net.minecraft.item.crafting.Ingredient; + +public class ArmorMaterialLiving implements IArmorMaterial +{ + public static final IArmorMaterial INSTANCE = new ArmorMaterialLiving(); + + @Override + public int getDurability(EquipmentSlotType slot) + { + return ArmorMaterial.IRON.getDurability(slot); + } + + @Override + public int getDamageReductionAmount(EquipmentSlotType slot) + { + return ArmorMaterial.IRON.getDamageReductionAmount(slot); + } + + @Override + public int getEnchantability() + { + return ArmorMaterial.IRON.getEnchantability(); + } + + @Override + public net.minecraft.util.SoundEvent getSoundEvent() + { + return ArmorMaterial.IRON.getSoundEvent(); + } + + @Override + public Ingredient getRepairMaterial() + { + return ArmorMaterial.IRON.getRepairMaterial(); + } + + @Override + public String getName() + { + return "livingarmour"; + } + + @Override + public float getToughness() + { + return ArmorMaterial.IRON.getToughness(); + } + + @Override + public float getKnockbackResistance() + { + return ArmorMaterial.IRON.getKnockbackResistance(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/BMItemTier.java b/src/main/java/wayoftime/bloodmagic/common/item/BMItemTier.java new file mode 100644 index 00000000..9da76ed4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/BMItemTier.java @@ -0,0 +1,62 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.function.Supplier; + +import net.minecraft.item.IItemTier; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.LazyValue; + +public enum BMItemTier implements IItemTier +{ + SENTIENT(4, 512, 6.0F, 2.0F, 50, () -> { + return Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()); + }); + + private final int harvestLevel; + private final int maxUses; + private final float efficiency; + private final float attackDamage; + private final int enchantability; + private final LazyValue repairMaterial; + + private BMItemTier(int harvestLevelIn, int maxUsesIn, float efficiencyIn, float attackDamageIn, int enchantabilityIn, Supplier repairMaterialIn) + { + this.harvestLevel = harvestLevelIn; + this.maxUses = maxUsesIn; + this.efficiency = efficiencyIn; + this.attackDamage = attackDamageIn; + this.enchantability = enchantabilityIn; + this.repairMaterial = new LazyValue<>(repairMaterialIn); + } + + public int getMaxUses() + { + return this.maxUses; + } + + public float getEfficiency() + { + return this.efficiency; + } + + public float getAttackDamage() + { + return this.attackDamage; + } + + public int getHarvestLevel() + { + return this.harvestLevel; + } + + public int getEnchantability() + { + return this.enchantability; + } + + public Ingredient getRepairMaterial() + { + return this.repairMaterial.getValue(); + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java b/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java new file mode 100644 index 00000000..74a7e183 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java @@ -0,0 +1,291 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.arc.ItemARCToolBase; +import wayoftime.bloodmagic.common.item.block.ItemBlockAlchemyTable; +import wayoftime.bloodmagic.common.item.block.ItemBlockMimic; +import wayoftime.bloodmagic.common.item.block.ItemBlockShapedCharge; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilAir; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilBloodLight; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilDivination; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilFastMiner; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilFrost; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilGreenGrove; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilLava; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilMagnetism; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilVoid; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilWater; +import wayoftime.bloodmagic.common.item.soul.ItemMonsterSoul; +import wayoftime.bloodmagic.common.item.soul.ItemSentientAxe; +import wayoftime.bloodmagic.common.item.soul.ItemSentientPickaxe; +import wayoftime.bloodmagic.common.item.soul.ItemSentientShovel; +import wayoftime.bloodmagic.common.item.soul.ItemSentientSword; +import wayoftime.bloodmagic.common.item.soul.ItemSoulGem; +import wayoftime.bloodmagic.common.item.soul.ItemSoulSnare; +import wayoftime.bloodmagic.common.registration.impl.BloodOrbDeferredRegister; +import wayoftime.bloodmagic.common.registration.impl.BloodOrbRegistryObject; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.structures.ItemDungeonTester; + +public class BloodMagicItems +{ +// public static Item.ToolMaterial SOUL_TOOL_MATERIAL = EnumHelper.addToolMaterial("demonic", 4, 520, 7, 8, 50); +// public static final BloodOrb WEAK_ORB_INSTANCE = new BloodOrb(new ResourceLocation(BloodMagic.MODID, "weakbloodorb"), 0, 5000, 10); + public static final BloodOrbDeferredRegister BLOOD_ORBS = new BloodOrbDeferredRegister(BloodMagic.MODID); + public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, BloodMagic.MODID); + public static final DeferredRegister BASICITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, BloodMagic.MODID); + + public static final BloodOrbRegistryObject ORB_WEAK = BLOOD_ORBS.register("weakbloodorb", () -> new BloodOrb(new ResourceLocation(BloodMagic.MODID, "weakbloodorb"), 1, 5000, 2)); + public static final BloodOrbRegistryObject ORB_APPRENTICE = BLOOD_ORBS.register("apprenticebloodorb", () -> new BloodOrb(new ResourceLocation(BloodMagic.MODID, "apprenticebloodorb"), 2, 25000, 5)); + public static final BloodOrbRegistryObject ORB_MAGICIAN = BLOOD_ORBS.register("magicianbloodorb", () -> new BloodOrb(new ResourceLocation(BloodMagic.MODID, "magicianbloodorb"), 3, 150000, 15)); + public static final BloodOrbRegistryObject ORB_MASTER = BLOOD_ORBS.register("masterbloodorb", () -> new BloodOrb(new ResourceLocation(BloodMagic.MODID, "masterbloodorb"), 4, 1000000, 25)); + public static final BloodOrbRegistryObject ORB_ARCHMAGE = BLOOD_ORBS.register("archmagebloodorb", () -> new BloodOrb(new ResourceLocation(BloodMagic.MODID, "archmagebloodorb"), 5, 10000000, 50)); +// public static final DeferredRegister BLOOD_ORBS = DeferredRegister.create(RegistrarBloodMagic.BLOOD_ORBS, BloodMagic.MODID); + +// public static final RegistryObject BLOODSTONE_ITEM = ITEMS.register("ruby_block", () -> new BlockItem(BloodMagicBlocks.BLOODSTONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject SOUL_FORGE_ITEM = ITEMS.register("soulforge", () -> new BlockItem(BloodMagicBlocks.SOUL_FORGE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject BLANK_RUNE_ITEM = ITEMS.register("blankrune", () -> new BlockItem(BloodMagicBlocks.BLANK_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject SPEED_RUNE_ITEM = ITEMS.register("speedrune", () -> new BlockItem(BloodMagicBlocks.SPEED_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject SACRIFICE_RUNE_ITEM = ITEMS.register("sacrificerune", () -> new BlockItem(BloodMagicBlocks.SACRIFICE_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject SELF_SACRIFICE_RUNE_ITEM = ITEMS.register("selfsacrificerune", () -> new BlockItem(BloodMagicBlocks.SELF_SACRIFICE_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DISPLACEMENT_RUNE_ITEM = ITEMS.register("dislocationrune", () -> new BlockItem(BloodMagicBlocks.DISPLACEMENT_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject CAPACITY_RUNE_ITEM = ITEMS.register("altarcapacityrune", () -> new BlockItem(BloodMagicBlocks.CAPACITY_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject AUGMENTED_CAPACITY_RUNE_ITEM = ITEMS.register("bettercapacityrune", () -> new BlockItem(BloodMagicBlocks.AUGMENTED_CAPACITY_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject ORB_RUNE_ITEM = ITEMS.register("orbcapacityrune", () -> new BlockItem(BloodMagicBlocks.ORB_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject ACCELERATION_RUNE_ITEM = ITEMS.register("accelerationrune", () -> new BlockItem(BloodMagicBlocks.ACCELERATION_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject CHARGING_RUNE_ITEM = ITEMS.register("chargingrune", () -> new BlockItem(BloodMagicBlocks.CHARGING_RUNE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject BLANK_RITUAL_STONE_ITEM = ITEMS.register("ritualstone", () -> new BlockItem(BloodMagicBlocks.BLANK_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject AIR_RITUAL_STONE_ITEM = ITEMS.register("airritualstone", () -> new BlockItem(BloodMagicBlocks.AIR_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject WATER_RITUAL_STONE_ITEM = ITEMS.register("waterritualstone", () -> new BlockItem(BloodMagicBlocks.WATER_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject FIRE_RITUAL_STONE_ITEM = ITEMS.register("fireritualstone", () -> new BlockItem(BloodMagicBlocks.FIRE_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject EARTH_RITUAL_STONE_ITEM = ITEMS.register("earthritualstone", () -> new BlockItem(BloodMagicBlocks.EARTH_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUSK_RITUAL_STONE_ITEM = ITEMS.register("duskritualstone", () -> new BlockItem(BloodMagicBlocks.DUSK_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DAWN_RITUAL_STONE_ITEM = ITEMS.register("lightritualstone", () -> new BlockItem(BloodMagicBlocks.DAWN_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject ALCHEMICAL_REACTION_CHAMBER_ITEM = ITEMS.register("alchemicalreactionchamber", () -> new BlockItem(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DEMON_CRUCIBLE_ITEM = ITEMS.register("demoncrucible", () -> new BlockItem(BloodMagicBlocks.DEMON_CRUCIBLE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DEMON_CRYSTALLIZER_ITEM = ITEMS.register("demoncrystallizer", () -> new BlockItem(BloodMagicBlocks.DEMON_CRYSTALLIZER.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject BLOODSTONE_ITEM = ITEMS.register("largebloodstonebrick", () -> new BlockItem(BloodMagicBlocks.BLOODSTONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject BLOODSTONE_BRICK_ITEM = ITEMS.register("bloodstonebrick", () -> new BlockItem(BloodMagicBlocks.BLOODSTONE_BRICK.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject MASTER_RITUAL_STONE_ITEM = ITEMS.register("masterritualstone", () -> new BlockItem(BloodMagicBlocks.MASTER_RITUAL_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject BLOOD_ALTAR_ITEM = ITEMS.register("altar", () -> new BlockItem(BloodMagicBlocks.BLOOD_ALTAR.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject ALCHEMY_TABLE_ITEM = ITEMS.register("alchemytable", () -> new ItemBlockAlchemyTable(BloodMagicBlocks.ALCHEMY_TABLE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject INCENSE_ALTAR_ITEM = ITEMS.register("incensealtar", () -> new BlockItem(BloodMagicBlocks.INCENSE_ALTAR.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject WOOD_PATH_ITEM = ITEMS.register("woodbrickpath", () -> new BlockItem(BloodMagicBlocks.WOOD_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject WOOD_TILE_PATH_ITEM = ITEMS.register("woodtilepath", () -> new BlockItem(BloodMagicBlocks.WOOD_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject STONE_PATH_ITEM = ITEMS.register("stonebrickpath", () -> new BlockItem(BloodMagicBlocks.STONE_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject STONE_TILE_PATH_ITEM = ITEMS.register("stonetilepath", () -> new BlockItem(BloodMagicBlocks.STONE_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject WORN_STONE_PATH_ITEM = ITEMS.register("wornstonebrickpath", () -> new BlockItem(BloodMagicBlocks.WORN_STONE_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject WORN_STONE_TILE_PATH_ITEM = ITEMS.register("wornstonetilepath", () -> new BlockItem(BloodMagicBlocks.WORN_STONE_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject OBSIDIAN_PATH_ITEM = ITEMS.register("obsidianbrickpath", () -> new BlockItem(BloodMagicBlocks.OBSIDIAN_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject OBSIDIAN_TILE_PATH_ITEM = ITEMS.register("obsidiantilepath", () -> new BlockItem(BloodMagicBlocks.OBSIDIAN_TILE_PATH.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject MIMIC_ITEM = ITEMS.register("mimic", () -> new ItemBlockMimic(BloodMagicBlocks.MIMIC.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject MIMIC_ETHEREAL_ITEM = ITEMS.register("ethereal_mimic", () -> new ItemBlockMimic(BloodMagicBlocks.ETHEREAL_MIMIC.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject NETHE_SOIL_ITEM = ITEMS.register("nether_soil", () -> new BlockItem(BloodMagicBlocks.NETHER_SOIL.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject GROWING_DOUBT_ITEM = ITEMS.register("growing_doubt", () -> new BlockItem(BloodMagicBlocks.GROWING_DOUBT.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject SHAPED_CHARGE_ITEM = ITEMS.register("shaped_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.SHAPED_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DEFORESTER_CHARGE_ITEM = ITEMS.register("deforester_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.DEFORESTER_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject VEINMINE_CHARGE_ITEM = ITEMS.register("veinmine_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.VEINMINE_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject FUNGAL_CHARGE_ITEM = ITEMS.register("fungal_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.FUNGAL_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); + // TODO: Need to rework the above instantiations for the ItemBlocks so that it's + // done with the Blocks. + +// public static final RegistryObject WEAK_BLOOD_ORB = BASICITEMS.register("weakbloodorb", ItemBloodOrb::new); +// public static final RegistryObject WEAK_BLOOD_ORB = BASICITEMS.register("weakbloodorb", () -> new ItemBloodOrb(WEAK_ORB_INSTANCE)); + public static final RegistryObject WEAK_BLOOD_ORB = BASICITEMS.register("weakbloodorb", () -> new ItemBloodOrb(ORB_WEAK)); + public static final RegistryObject APPRENTICE_BLOOD_ORB = BASICITEMS.register("apprenticebloodorb", () -> new ItemBloodOrb(ORB_APPRENTICE)); + public static final RegistryObject MAGICIAN_BLOOD_ORB = BASICITEMS.register("magicianbloodorb", () -> new ItemBloodOrb(ORB_MAGICIAN)); + public static final RegistryObject MASTER_BLOOD_ORB = BASICITEMS.register("masterbloodorb", () -> new ItemBloodOrb(ORB_MASTER)); + + public static final RegistryObject DIVINATION_SIGIL = BASICITEMS.register("divinationsigil", () -> new ItemSigilDivination(true)); + public static final RegistryObject SEER_SIGIL = BASICITEMS.register("seersigil", () -> new ItemSigilDivination(false)); + public static final RegistryObject SACRIFICIAL_DAGGER = BASICITEMS.register("sacrificialdagger", () -> new ItemSacrificialDagger()); + public static final RegistryObject SLATE = BASICITEMS.register("blankslate", () -> new ItemBase()); + public static final RegistryObject REINFORCED_SLATE = BASICITEMS.register("reinforcedslate", () -> new ItemBase()); + public static final RegistryObject IMBUED_SLATE = BASICITEMS.register("infusedslate", () -> new ItemBase()); + public static final RegistryObject DEMONIC_SLATE = BASICITEMS.register("demonslate", () -> new ItemBase()); + public static final RegistryObject ETHEREAL_SLATE = BASICITEMS.register("etherealslate", () -> new ItemBase()); + public static final RegistryObject WATER_SIGIL = BASICITEMS.register("watersigil", () -> new ItemSigilWater()); + public static final RegistryObject VOID_SIGIL = BASICITEMS.register("voidsigil", () -> new ItemSigilVoid()); + public static final RegistryObject LAVA_SIGIL = BASICITEMS.register("lavasigil", () -> new ItemSigilLava()); + public static final RegistryObject GREEN_GROVE_SIGIL = ITEMS.register("growthsigil", () -> new ItemSigilGreenGrove()); + public static final RegistryObject FAST_MINER_SIGIL = ITEMS.register("miningsigil", () -> new ItemSigilFastMiner()); + public static final RegistryObject MAGNETISM_SIGIL = ITEMS.register("sigilofmagnetism", () -> new ItemSigilMagnetism()); + public static final RegistryObject ICE_SIGIL = ITEMS.register("icesigil", () -> new ItemSigilFrost()); + public static final RegistryObject AIR_SIGIL = BASICITEMS.register("airsigil", ItemSigilAir::new); + public static final RegistryObject BLOOD_LIGHT_SIGIL = BASICITEMS.register("bloodlightsigil", ItemSigilBloodLight::new); + public static final RegistryObject HOLDING_SIGIL = BASICITEMS.register("sigilofholding", ItemSigilHolding::new); + + public static final RegistryObject ARCANE_ASHES = BASICITEMS.register("arcaneashes", () -> new ItemArcaneAshes()); + public static final RegistryObject DAGGER_OF_SACRIFICE = BASICITEMS.register("daggerofsacrifice", () -> new ItemDaggerOfSacrifice()); + public static final RegistryObject LAVA_CRYSTAL = BASICITEMS.register("lavacrystal", () -> new ItemLavaCrystal()); + public static final RegistryObject WEAK_BLOOD_SHARD = BASICITEMS.register("weakbloodshard", () -> new ItemBase()); + public static final RegistryObject EXPERIENCE_TOME = BASICITEMS.register("experiencebook", () -> new ItemExperienceBook()); + + public static final RegistryObject LIVING_HELMET = BASICITEMS.register("livinghelmet", () -> new ItemLivingArmor(EquipmentSlotType.HEAD)); + public static final RegistryObject LIVING_PLATE = BASICITEMS.register("livingplate", () -> new ItemLivingArmor(EquipmentSlotType.CHEST)); + public static final RegistryObject LIVING_LEGGINGS = BASICITEMS.register("livingleggings", () -> new ItemLivingArmor(EquipmentSlotType.LEGS)); + public static final RegistryObject LIVING_BOOTS = BASICITEMS.register("livingboots", () -> new ItemLivingArmor(EquipmentSlotType.FEET)); + + public static final RegistryObject LIVING_TOME = BASICITEMS.register("upgradetome", () -> new ItemLivingTome()); + + // Ritual stuffs + public static final RegistryObject WEAK_ACTIVATION_CRYSTAL = BASICITEMS.register("activationcrystalweak", () -> new ItemActivationCrystal(ItemActivationCrystal.CrystalType.WEAK)); + public static final RegistryObject AWAKENED_ACTIVATION_CRYSTAL = BASICITEMS.register("activationcrystalawakened", () -> new ItemActivationCrystal(ItemActivationCrystal.CrystalType.AWAKENED)); + public static final RegistryObject CREATIVE_ACTIVATION_CRYSTAL = BASICITEMS.register("activationcrystalcreative", () -> new ItemActivationCrystal(ItemActivationCrystal.CrystalType.CREATIVE)); + + public static final RegistryObject AIR_INSCRIPTION_TOOL = BASICITEMS.register("airscribetool", () -> new ItemInscriptionTool(EnumRuneType.AIR)); + public static final RegistryObject FIRE_INSCRIPTION_TOOL = BASICITEMS.register("firescribetool", () -> new ItemInscriptionTool(EnumRuneType.FIRE)); + public static final RegistryObject WATER_INSCRIPTION_TOOL = BASICITEMS.register("waterscribetool", () -> new ItemInscriptionTool(EnumRuneType.WATER)); + public static final RegistryObject EARTH_INSCRIPTION_TOOL = BASICITEMS.register("earthscribetool", () -> new ItemInscriptionTool(EnumRuneType.EARTH)); + public static final RegistryObject DUSK_INSCRIPTION_TOOL = BASICITEMS.register("duskscribetool", () -> new ItemInscriptionTool(EnumRuneType.DUSK)); + + public static final RegistryObject BASE_RITUAL_DIVINER = BASICITEMS.register("ritualdiviner", () -> new ItemRitualDiviner(0)); + public static final RegistryObject DUSK_RITUAL_DIVINER = BASICITEMS.register("ritualdivinerdusk", () -> new ItemRitualDiviner(1)); + + public static final RegistryObject RITUAL_READER = BASICITEMS.register("ritualtinkerer", ItemRitualReader::new); + + // Reagents used to make the Sigils + public static final RegistryObject REAGENT_WATER = BASICITEMS.register("reagentwater", () -> new ItemBase()); + public static final RegistryObject REAGENT_LAVA = BASICITEMS.register("reagentlava", () -> new ItemBase()); + public static final RegistryObject REAGENT_VOID = BASICITEMS.register("reagentvoid", () -> new ItemBase()); + public static final RegistryObject REAGENT_GROWTH = BASICITEMS.register("reagentgrowth", () -> new ItemBase()); + public static final RegistryObject REAGENT_FAST_MINER = BASICITEMS.register("reagentfastminer", () -> new ItemBase()); + public static final RegistryObject REAGENT_MAGNETISM = BASICITEMS.register("reagentmagnetism", () -> new ItemBase()); + public static final RegistryObject REAGENT_AIR = BASICITEMS.register("reagentair", () -> new ItemBase()); + public static final RegistryObject REAGENT_BLOOD_LIGHT = BASICITEMS.register("reagentbloodlight", () -> new ItemBase()); + public static final RegistryObject REAGENT_SIGHT = BASICITEMS.register("reagentsight", () -> new ItemBase()); + public static final RegistryObject REAGENT_BINDING = BASICITEMS.register("reagentbinding", () -> new ItemBase()); + public static final RegistryObject REAGENT_HOLDING = BASICITEMS.register("reagentholding", () -> new ItemBase()); + + // Tartaric Gems + public static final RegistryObject PETTY_GEM = ITEMS.register("soulgempetty", () -> new ItemSoulGem("petty", 64)); + public static final RegistryObject LESSER_GEM = ITEMS.register("soulgemlesser", () -> new ItemSoulGem("lesser", 256)); + public static final RegistryObject COMMON_GEM = ITEMS.register("soulgemcommon", () -> new ItemSoulGem("common", 1024)); + public static final RegistryObject GREATER_GEM = ITEMS.register("soulgemgreater", () -> new ItemSoulGem("greater", 4096)); + + public static final RegistryObject MONSTER_SOUL_RAW = BASICITEMS.register("basemonstersoul", () -> new ItemMonsterSoul(EnumDemonWillType.DEFAULT)); + public static final RegistryObject MONSTER_SOUL_CORROSIVE = BASICITEMS.register("basemonstersoul_corrosive", () -> new ItemMonsterSoul(EnumDemonWillType.CORROSIVE)); + public static final RegistryObject MONSTER_SOUL_DESTRUCTIVE = BASICITEMS.register("basemonstersoul_destructive", () -> new ItemMonsterSoul(EnumDemonWillType.DESTRUCTIVE)); + public static final RegistryObject MONSTER_SOUL_STEADFAST = BASICITEMS.register("basemonstersoul_steadfast", () -> new ItemMonsterSoul(EnumDemonWillType.STEADFAST)); + public static final RegistryObject MONSTER_SOUL_VENGEFUL = BASICITEMS.register("basemonstersoul_vengeful", () -> new ItemMonsterSoul(EnumDemonWillType.VENGEFUL)); + + public static final RegistryObject SOUL_SNARE = BASICITEMS.register("soulsnare", ItemSoulSnare::new); + public static final RegistryObject SENTIENT_SWORD = ITEMS.register("soulsword", () -> new ItemSentientSword()); + public static final RegistryObject SENTIENT_AXE = ITEMS.register("soulaxe", () -> new ItemSentientAxe()); + public static final RegistryObject SENTIENT_PICKAXE = ITEMS.register("soulpickaxe", () -> new ItemSentientPickaxe()); + public static final RegistryObject SENTIENT_SHOVEL = ITEMS.register("soulshovel", () -> new ItemSentientShovel()); + public static final RegistryObject SENTIENT_SCYTHE = ITEMS.register("soulscythe", () -> new ItemSentientScythe()); + + public static final RegistryObject RAW_CRYSTAL_BLOCK_ITEM = ITEMS.register("rawdemoncrystal", () -> new BlockItem(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject CORROSIVE_CRYSTAL_BLOCK_ITEM = ITEMS.register("corrosivedemoncrystal", () -> new BlockItem(BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DESTRUCTIVE_CRYSTAL_BLOCK_ITEM = ITEMS.register("destructivedemoncrystal", () -> new BlockItem(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject VENGEFUL_CRYSTAL_BLOCK_ITEM = ITEMS.register("vengefuldemoncrystal", () -> new BlockItem(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject STEADFAST_CRYSTAL_BLOCK_ITEM = ITEMS.register("steadfastdemoncrystal", () -> new BlockItem(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject RAW_CRYSTAL = BASICITEMS.register("defaultcrystal", () -> new ItemDemonCrystal(EnumDemonWillType.DEFAULT)); + public static final RegistryObject CORROSIVE_CRYSTAL = BASICITEMS.register("corrosivecrystal", () -> new ItemDemonCrystal(EnumDemonWillType.CORROSIVE)); + public static final RegistryObject VENGEFUL_CRYSTAL = BASICITEMS.register("vengefulcrystal", () -> new ItemDemonCrystal(EnumDemonWillType.VENGEFUL)); + public static final RegistryObject DESTRUCTIVE_CRYSTAL = BASICITEMS.register("destructivecrystal", () -> new ItemDemonCrystal(EnumDemonWillType.DESTRUCTIVE)); + public static final RegistryObject STEADFAST_CRYSTAL = BASICITEMS.register("steadfastcrystal", () -> new ItemDemonCrystal(EnumDemonWillType.STEADFAST)); + + public static final RegistryObject DEMON_WILL_GAUGE = BASICITEMS.register("demonwillgauge", ItemDemonWillGauge::new); + + // ARC Tools + public static final RegistryObject SANGUINE_REVERTER = BASICITEMS.register("sanguinereverter", () -> new ItemARCToolBase(32, 2)); + public static final RegistryObject PRIMITIVE_FURNACE_CELL = BASICITEMS.register("furnacecell_primitive", () -> new ItemARCToolBase(128, 1.25)); + public static final RegistryObject PRIMITIVE_EXPLOSIVE_CELL = BASICITEMS.register("primitive_explosive_cell", () -> new ItemARCToolBase(256, 1.25)); + public static final RegistryObject PRIMITIVE_HYDRATION_CELL = BASICITEMS.register("primitive_hydration_cell", () -> new ItemARCToolBase(128, 1.25)); + public static final RegistryObject PRIMITIVE_CRYSTALLINE_RESONATOR = BASICITEMS.register("primitive_crystalline_resonator", () -> new ItemARCToolBase(128, 1.25)); + public static final RegistryObject CRYSTALLINE_RESONATOR = BASICITEMS.register("crystalline_resonator", () -> new ItemARCToolBase(512, 2, 2)); + + // Alchemy Table items + public static final RegistryObject BASIC_CUTTING_FLUID = BASICITEMS.register("basiccuttingfluid", () -> new ItemARCToolBase(64, 1)); + public static final RegistryObject EXPLOSIVE_POWDER = BASICITEMS.register("explosivepowder", () -> new ItemARCToolBase(64, 1)); + + public static final RegistryObject SULFUR = BASICITEMS.register("sulfur", () -> new ItemBase()); + public static final RegistryObject SALTPETER = BASICITEMS.register("saltpeter", () -> new ItemBase()); + public static final RegistryObject PLANT_OIL = BASICITEMS.register("plantoil", () -> new ItemBase()); + + public static final RegistryObject THROWING_DAGGER = BASICITEMS.register("throwing_dagger", ItemThrowingDagger::new); + public static final RegistryObject THROWING_DAGGER_SYRINGE = BASICITEMS.register("throwing_dagger_syringe", ItemThrowingDaggerSyringe::new); + public static final RegistryObject SLATE_AMPOULE = BASICITEMS.register("slate_ampoule", () -> new ItemBloodProvider("slate", 500)); + + // Anointments + public static final RegistryObject SLATE_VIAL = ITEMS.register("slate_vial", () -> new ItemBase(16, "slate_vial")); + public static final RegistryObject MELEE_DAMAGE_ANOINTMENT = ITEMS.register("melee_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("melee_damage"), 0xFF0000, 1, 256)); + public static final RegistryObject SILK_TOUCH_ANOINTMENT = ITEMS.register("silk_touch_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("silk_touch"), 0x00B0FF, 1, 256)); + public static final RegistryObject FORTUNE_ANOINTMENT = ITEMS.register("fortune_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("fortune"), 3381504, 1, 256)); + public static final RegistryObject HOLY_WATER_ANOINTMENT = ITEMS.register("holy_water_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("holy_water"), 0xC6E6FB, 1, 256)); + public static final RegistryObject HIDDEN_KNOWLEDGE_ANOINTMENT = ITEMS.register("hidden_knowledge_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("hidden_knowledge"), 0xC8F902, 1, 256)); + public static final RegistryObject QUICK_DRAW_ANOINTMENT = ITEMS.register("quick_draw_anointment", () -> new ItemBowAnointmentProvider(BloodMagic.rl("quick_draw"), 0xF0E130, 1, 256, true)); + public static final RegistryObject LOOTING_ANOINTMENT = ITEMS.register("looting_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("looting"), 0x6D2AFF, 1, 256)); + public static final RegistryObject BOW_POWER_ANOINTMENT = ITEMS.register("bow_power_anointment", () -> new ItemBowAnointmentProvider(BloodMagic.rl("bow_power"), 0xD8D8D8, 1, 256, true)); + public static final RegistryObject WILL_POWER_ANOINTMENT = ITEMS.register("will_power_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("will_power"), 0xD8D8D8, 1, 256)); + public static final RegistryObject SMELTING_ANOINTMENT = ITEMS.register("smelting_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("smelting"), 0xCE2029, 1, 256)); + + // Fragments + public static final RegistryObject IRON_FRAGMENT = BASICITEMS.register("ironfragment", () -> new ItemBase()); + public static final RegistryObject GOLD_FRAGMENT = BASICITEMS.register("goldfragment", () -> new ItemBase()); + public static final RegistryObject NETHERITE_SCRAP_FRAGMENT = BASICITEMS.register("fragment_netherite_scrap", () -> new ItemBase()); + + // Gravels + public static final RegistryObject IRON_GRAVEL = BASICITEMS.register("irongravel", () -> new ItemBase()); + public static final RegistryObject GOLD_GRAVEL = BASICITEMS.register("goldgravel", () -> new ItemBase()); + public static final RegistryObject NETHERITE_SCRAP_GRAVEL = BASICITEMS.register("gravel_netherite_scrap", () -> new ItemBase()); + + // Sands + public static final RegistryObject IRON_SAND = BASICITEMS.register("ironsand", () -> new ItemBase()); + public static final RegistryObject GOLD_SAND = BASICITEMS.register("goldsand", () -> new ItemBase()); + public static final RegistryObject COAL_SAND = BASICITEMS.register("coalsand", () -> new ItemBase()); + public static final RegistryObject NETHERITE_SCRAP_SAND = BASICITEMS.register("sand_netherite", () -> new ItemBase()); + public static final RegistryObject CORRUPTED_DUST = BASICITEMS.register("corrupted_dust", () -> new ItemBase()); + public static final RegistryObject CORRUPTED_DUST_TINY = BASICITEMS.register("corrupted_tinydust", () -> new ItemBase()); + public static final RegistryObject HELLFORGED_SAND = BASICITEMS.register("sand_hellforged", () -> new ItemBase()); + + // Dungeons + public static final RegistryObject HELLFORGED_INGOT = BASICITEMS.register("ingot_hellforged", () -> new ItemBase()); + + public static final RegistryObject DUNGEON_BRICK_1_BLOCK = ITEMS.register("dungeon_brick1", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_1.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_BRICK_2_BLOCK = ITEMS.register("dungeon_brick2", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_2.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_BRICK_3_BLOCK = ITEMS.register("dungeon_brick3", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_3.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_BRICK_ASSORTED_BLOCK = ITEMS.register("dungeon_brick_assorted", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_ASSORTED.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_STONE_BLOCK = ITEMS.register("dungeon_stone", () -> new BlockItem(BloodMagicBlocks.DUNGEON_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_EYE = ITEMS.register("dungeon_eye", () -> new BlockItem(BloodMagicBlocks.DUNGEON_EYE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_POLISHED_STONE_BLOCK = ITEMS.register("dungeon_polished", () -> new BlockItem(BloodMagicBlocks.DUNGEON_POLISHED_STONE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_TILE_BLOCK = ITEMS.register("dungeon_tile", () -> new BlockItem(BloodMagicBlocks.DUNGEON_TILE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_TILE_SPECIAL_BLOCK = ITEMS.register("dungeon_tilespecial", () -> new BlockItem(BloodMagicBlocks.DUNGEON_TILE_SPECIAL.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_SMALL_BRICK_BLOCK = ITEMS.register("dungeon_smallbrick", () -> new BlockItem(BloodMagicBlocks.DUNGEON_SMALL_BRICK.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject DUNGEON_BRICK_STAIRS_BLOCK = ITEMS.register("dungeon_brick_stairs", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_STAIRS.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_POLISHED_STAIRS_BLOCK = ITEMS.register("dungeon_polished_stairs", () -> new BlockItem(BloodMagicBlocks.DUNGEON_POLISHED_STAIRS.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_PILLAR_CENTER_BLOCK = ITEMS.register("dungeon_pillar_center", () -> new BlockItem(BloodMagicBlocks.DUNGEON_PILLAR_CENTER.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_PILLAR_SPECIAL_BLOCK = ITEMS.register("dungeon_pillar_special", () -> new BlockItem(BloodMagicBlocks.DUNGEON_PILLAR_SPECIAL.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_PILLAR_CAP_BLOCK = ITEMS.register("dungeon_pillar_cap", () -> new BlockItem(BloodMagicBlocks.DUNGEON_PILLAR_CAP.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_BRICK_WALL_BLOCK = ITEMS.register("dungeon_brick_wall", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_WALL.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_POLISHED_WALL_BLOCK = ITEMS.register("dungeon_polished_wall", () -> new BlockItem(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_BRICK_GATE_BLOCK = ITEMS.register("dungeon_brick_gate", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_GATE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_POLISHED_GATE_BLOCK = ITEMS.register("dungeon_polished_gate", () -> new BlockItem(BloodMagicBlocks.DUNGEON_POLISHED_GATE.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject DUNGEON_ORE_BLOCK = ITEMS.register("dungeon_ore", () -> new BlockItem(BloodMagicBlocks.DUNGEON_ORE.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject HELLFORGED_BLOCK = ITEMS.register("dungeon_metal", () -> new BlockItem(BloodMagicBlocks.HELLFORGED_BLOCK.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DUNGEON_TESTER = BASICITEMS.register("dungeon_tester", ItemDungeonTester::new); + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/BloodOrb.java b/src/main/java/wayoftime/bloodmagic/common/item/BloodOrb.java new file mode 100644 index 00000000..a0a88332 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/BloodOrb.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistryEntry; + +/** + * Base Blood Orb class object for blood orbs + */ +public final class BloodOrb extends ForgeRegistryEntry +{ + private final ResourceLocation name; + private final int tier; + private final int capacity; + private final int fillRate; + + /** + * A base object for BloodOrbs. A bit cleaner than the old way through + * EnergyItems. + * + * @param name - A name for the Orb. Gets put into an unlocalized name. + * @param tier - The tier of the Orb. + * @param capacity - The max amount of LP the Orb can store. + * @param fillRate - The amount of LP per tick the Altar can fill the network + * with. + */ + public BloodOrb(ResourceLocation name, int tier, int capacity, int fillRate) + { + this.name = name; + this.tier = tier; + this.capacity = capacity; + this.fillRate = fillRate; + } + + public ResourceLocation getResourceLocation() + { + return name; + } + + public int getTier() + { + return tier; + } + + public int getCapacity() + { + return capacity; + } + + public int getFillRate() + { + return fillRate; + } + + @Override + public String toString() + { +// return "BloodOrb{" + "name='" + name + '\'' + ", tier=" + tier + ", capacity=" + capacity + ", owner=" +// + getRegistryName() + '}'; + return "BloodOrb{" + "name='" + name + '\'' + ", tier=" + tier + ", capacity=" + capacity + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ExpandedArmor.java b/src/main/java/wayoftime/bloodmagic/common/item/ExpandedArmor.java new file mode 100644 index 00000000..39a45a5f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ExpandedArmor.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.common.item; + +import com.google.common.collect.Multimap; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; + +public interface ExpandedArmor +{ + +// Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack); + + void damageArmor(LivingEntity livingEntity, ItemStack stack, DamageSource source, float damage, EquipmentSlotType slot); + + Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack); +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/IActivatable.java b/src/main/java/wayoftime/bloodmagic/common/item/IActivatable.java new file mode 100644 index 00000000..096e30b6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/IActivatable.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.common.item; + +import javax.annotation.Nonnull; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import wayoftime.bloodmagic.util.Constants; + +/** + * Interface for activatable Items + */ +public interface IActivatable +{ + default boolean getActivated(ItemStack stack) + { + return !stack.isEmpty() && stack.hasTag() && stack.getTag().getBoolean(Constants.NBT.ACTIVATED); + } + + @Nonnull + default ItemStack setActivatedState(ItemStack stack, boolean activated) + { + if (!stack.isEmpty()) + { + if (!stack.hasTag()) + stack.setTag(new CompoundNBT()); + + stack.getTag().putBoolean(Constants.NBT.ACTIVATED, activated); + } + + return stack; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/IBindable.java b/src/main/java/wayoftime/bloodmagic/common/item/IBindable.java new file mode 100644 index 00000000..95017ea7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/IBindable.java @@ -0,0 +1,40 @@ +package wayoftime.bloodmagic.common.item; + +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import wayoftime.bloodmagic.core.data.Binding; + +/** + * Implement this interface on any Item that can be bound to a player. + */ +public interface IBindable +{ + /** + * Gets an object that stores who this item is bound to. + *

+ * If the item is not bound, this will be null. + * + * @param stack - The owned ItemStack + * @return - The binding object + */ + @Nullable + default Binding getBinding(ItemStack stack) + { + Binding binding = Binding.fromStack(stack); + return !stack.isEmpty() && binding != null ? binding : null; + } + + /** + * Called when the player attempts to bind the item. + * + * @param player - The Player attempting to bind the item + * @param stack - The ItemStack to attempt binding + * @return If binding was successful. + */ + default boolean onBind(PlayerEntity player, ItemStack stack) + { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/IBloodOrb.java b/src/main/java/wayoftime/bloodmagic/common/item/IBloodOrb.java new file mode 100644 index 00000000..903467a1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/IBloodOrb.java @@ -0,0 +1,15 @@ +package wayoftime.bloodmagic.common.item; + +import javax.annotation.Nullable; + +import net.minecraft.item.ItemStack; + +/** + * Interface for any items that are Blood Orbs + * TODO: Should either merge this implementation with BloodOrb or clean it up idk + */ +public interface IBloodOrb +{ + @Nullable + BloodOrb getOrb(ItemStack stack); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemActivationCrystal.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemActivationCrystal.java new file mode 100644 index 00000000..8d3244d0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemActivationCrystal.java @@ -0,0 +1,72 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import javax.annotation.Nonnull; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.data.Binding; + +public class ItemActivationCrystal extends Item implements IBindable +{ + final CrystalType type; + + public ItemActivationCrystal(CrystalType type) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + this.type = type; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.activationcrystal." + type.name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + + if (!stack.hasTag()) + return; + + Binding binding = getBinding(stack); + if (binding != null) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName()).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } + + public int getCrystalLevel(ItemStack stack) + { + return this.type.equals(CrystalType.CREATIVE) ? Integer.MAX_VALUE : type.ordinal() + 1; + } + + public enum CrystalType + { + WEAK, AWAKENED, CREATIVE,; + + @Nonnull + public static ItemStack getStack(int level) + { + if (level < 0) + { + level = 0; + } + switch (level) + { + case 0: + return new ItemStack(BloodMagicItems.WEAK_ACTIVATION_CRYSTAL.get()); + case 1: + return new ItemStack(BloodMagicItems.AWAKENED_ACTIVATION_CRYSTAL.get()); + default: + return new ItemStack(BloodMagicItems.CREATIVE_ACTIVATION_CRYSTAL.get()); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java new file mode 100644 index 00000000..f9042b42 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java @@ -0,0 +1,131 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.SwordItem; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.SoundEvents; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.anointment.AnointmentData; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.core.AnointmentRegistrar; + +public class ItemAnointmentProvider extends Item +{ +// public Anointment anointment; + public ResourceLocation anointRL; + private int colour; + private int level; + private int maxDamage; + + public ItemAnointmentProvider(ResourceLocation anointRL, int colour, int level, int maxDamage) + { + super(new Item.Properties().maxStackSize(16).group(BloodMagic.TAB)); + this.anointRL = anointRL; + this.colour = colour; + this.level = level; + this.maxDamage = maxDamage; +// this.anointment = anointment; + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + ItemStack weaponStack = player.getHeldItem(hand == Hand.MAIN_HAND ? Hand.OFF_HAND : Hand.MAIN_HAND); +// if (world.isRemote && !unusable) +// { +// Vector3d vec = player.getLookVec(); +// double wantedVelocity = 1.7; +// +// // TODO - Revisit after potions +//// if (player.isPotionActive(RegistrarBloodMagic.BOOST)) +//// { +//// int amplifier = player.getActivePotionEffect(RegistrarBloodMagic.BOOST).getAmplifier(); +//// wantedVelocity += (1 + amplifier) * (0.35); +//// } +// +// player.setMotion(vec.x * wantedVelocity, vec.y * wantedVelocity, vec.z * wantedVelocity); +// } +// +// world.playSound(player, player.getPosX(), player.getPosY(), player.getPosZ(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) +// * 0.8F); + + if (!world.isRemote) + { + if (!weaponStack.isEmpty() && isItemValidForApplication(weaponStack)) + { + AnointmentHolder holder = AnointmentHolder.fromItemStack(weaponStack); + if (holder == null) + { + holder = new AnointmentHolder(); + } + + if (holder.applyAnointment(weaponStack, AnointmentRegistrar.ANOINTMENT_MAP.get(anointRL), new AnointmentData(level, 0, maxDamage))) + { +// if (world instanceof ServerWorld) + { + SoundEvent soundevent = SoundEvents.ITEM_BOTTLE_EMPTY; + world.playSound(null, player.getPosition(), soundevent, SoundCategory.BLOCKS, 1.0F, 1.0F); + } + stack.shrink(1); + holder.toItemStack(weaponStack); + return ActionResult.resultConsume(stack); + } + } + } else + { + if (!weaponStack.isEmpty() && isItemValidForApplication(weaponStack)) + { + AnointmentHolder holder = AnointmentHolder.fromItemStack(weaponStack); + if (holder == null) + { + holder = new AnointmentHolder(); + } + if (holder.canApplyAnointment(weaponStack, AnointmentRegistrar.ANOINTMENT_MAP.get(anointRL), new AnointmentData(level, 0, maxDamage))) + { + boolean flag1 = false; + double d0 = (double) (colour >> 16 & 255) / 255.0D; + double d1 = (double) (colour >> 8 & 255) / 255.0D; + double d2 = (double) (colour >> 0 & 255) / 255.0D; + for (int i = 0; i < 16; i++) + { + world.addParticle(flag1 ? ParticleTypes.AMBIENT_ENTITY_EFFECT + : ParticleTypes.ENTITY_EFFECT, player.getPosXRandom(0.3D), player.getPosYRandom(), player.getPosZRandom(0.3D), d0, d1, d2); + } + + return ActionResult.resultConsume(stack); + } + } + } + + return super.onItemRightClick(world, player, hand); + } + + public boolean isItemValidForApplication(ItemStack stack) + { + return isItemTool(stack) || isItemSword(stack); + } + + public static boolean isItemTool(ItemStack stack) + { + return !stack.getItem().getToolTypes(stack).isEmpty(); + } + + public static boolean isItemSword(ItemStack stack) + { + return stack.getItem() instanceof SwordItem; + } + + public int getColor() + { + return colour; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemArcaneAshes.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemArcaneAshes.java new file mode 100644 index 00000000..bb7f4844 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemArcaneAshes.java @@ -0,0 +1,99 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.tile.TileAlchemyArray; + +public class ItemArcaneAshes extends Item +{ + public ItemArcaneAshes() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB).maxDamage(20)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arcaneAshes").mergeStyle(TextFormatting.GRAY)); + } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { + ItemStack stack = context.getItem(); + BlockPos newPos = context.getPos().offset(context.getFace()); + World world = context.getWorld(); + PlayerEntity player = context.getPlayer(); + + if (world.isAirBlock(newPos)) + { + if (!world.isRemote) + { + Direction rotation = Direction.fromAngle(player.getRotationYawHead()); + world.setBlockState(newPos, BloodMagicBlocks.ALCHEMY_ARRAY.get().getDefaultState()); + TileEntity tile = world.getTileEntity(newPos); + if (tile instanceof TileAlchemyArray) + { + ((TileAlchemyArray) tile).setRotation(rotation); + } + +// PickaxeItem d; + stack.damageItem(1, player, (entity) -> { + entity.sendBreakAnimation(EquipmentSlotType.MAINHAND); + }); + + } + + return ActionResultType.SUCCESS; + } + + return ActionResultType.FAIL; + } + +// @Override +// public ActionResultType onItemUse(PlayerEntity player, World world, BlockPos blockPos, Hand hand, Direction side, float hitX, float hitY, float hitZ) +// { +// ItemStack stack = player.getHeldItem(hand); +// BlockPos newPos = blockPos.offset(side); +// +// if (world.isAirBlock(newPos)) +// { +// if (!world.isRemote) +// { +// Direction rotation = Direction.fromAngle(player.getRotationYawHead()); +// world.setBlockState(newPos, RegistrarBloodMagicBlocks.ALCHEMY_ARRAY.getDefaultState()); +// TileEntity tile = world.getTileEntity(newPos); +// if (tile instanceof TileAlchemyArray) +// { +// ((TileAlchemyArray) tile).setRotation(rotation); +// } +// +// stack.damageItem(1, player); +// } +// +// return ActionResultType.SUCCESS; +// } +// +// return ActionResultType.FAIL; +// } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemBase.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemBase.java new file mode 100644 index 00000000..f2b157c9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemBase.java @@ -0,0 +1,49 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; + +public class ItemBase extends Item +{ + private final String desc; + + public ItemBase() + { + this(""); + } + + public ItemBase(String desc) + { + this(64, desc); + } + + public ItemBase(int stackSize) + { + this(stackSize, ""); + } + + public ItemBase(int stackSize, String desc) + { + super(new Item.Properties().maxStackSize(stackSize).group(BloodMagic.TAB)); + this.desc = desc; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!desc.isEmpty()) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic." + desc).mergeStyle(TextFormatting.GRAY)); + + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemBindableBase.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemBindableBase.java new file mode 100644 index 00000000..5dcb6d1d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemBindableBase.java @@ -0,0 +1,35 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.data.Binding; + +public class ItemBindableBase extends Item implements IBindable +{ + public ItemBindableBase() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + Binding binding = getBinding(stack); + if (binding != null) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName()).mergeStyle(TextFormatting.GRAY)); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemBloodOrb.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemBloodOrb.java new file mode 100644 index 00000000..198e16c5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemBloodOrb.java @@ -0,0 +1,105 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; +import java.util.function.Supplier; + +import javax.annotation.Nullable; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.extensions.IForgeItem; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemBloodOrb extends ItemBindableBase implements IBloodOrb, IForgeItem +{ + private final Supplier sup; + + public ItemBloodOrb(Supplier sup) + { + this.sup = sup; + } + + @Override + public BloodOrb getOrb(ItemStack stack) + { + return sup.get(); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + BloodOrb orb = getOrb(stack); + + if (orb == null) + return ActionResult.resultFail(stack); + + if (world == null) + return super.onItemRightClick(world, player, hand); + + world.playSound(null, player.getPosX(), player.getPosY(), player.getPosZ(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + + if (PlayerHelper.isFakePlayer(player)) + return super.onItemRightClick(world, player, hand); + + if (!stack.hasTag()) + return super.onItemRightClick(world, player, hand); + + Binding binding = getBinding(stack); + if (binding == null) + return super.onItemRightClick(world, player, hand); + + if (world.isRemote) + return super.onItemRightClick(world, player, hand); + + SoulNetwork ownerNetwork = NetworkHelper.getSoulNetwork(binding); + if (binding.getOwnerId().equals(player.getGameProfile().getId())) + ownerNetwork.setOrbTier(orb.getTier()); + + ownerNetwork.add(SoulTicket.item(stack, world, player, 200), orb.getCapacity()); // Add LP to owner's network + ownerNetwork.hurtPlayer(player, 200); // Hurt whoever is using it + return super.onItemRightClick(world, player, hand); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.orb.desc").mergeStyle(TextFormatting.GRAY)); + + BloodOrb orb = getOrb(stack); + if (flag.isAdvanced() && orb != null) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.orb.owner", stack.getItem().getRegistryName()).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } + +// + @Override + public ItemStack getContainerItem(ItemStack stack) + { + return stack.copy(); + } + + @Override + public boolean hasContainerItem(ItemStack stack) + { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemBloodProvider.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemBloodProvider.java new file mode 100644 index 00000000..8f466ec1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemBloodProvider.java @@ -0,0 +1,82 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.particles.RedstoneParticleData; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.altar.IBloodAltar; +import wayoftime.bloodmagic.util.helper.PlayerHelper; +import wayoftime.bloodmagic.util.helper.PlayerSacrificeHelper; + +public class ItemBloodProvider extends Item +{ + protected final String tooltipBase; + public final int lpProvided; + + public ItemBloodProvider(String name, int lpProvided) + { + super(new Item.Properties().maxStackSize(64).group(BloodMagic.TAB)); + + this.tooltipBase = "tooltip.bloodmagic.blood_provider." + name + "."; + this.lpProvided = lpProvided; + } + + public ItemBloodProvider(String name) + { + this(name, 0); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (PlayerHelper.isFakePlayer(player)) + return super.onItemRightClick(world, player, hand); + + IBloodAltar altarEntity = PlayerSacrificeHelper.getAltar(world, player.getPosition()); + if (altarEntity != null) + { + double posX = player.getPosX(); + double posY = player.getPosY(); + double posZ = player.getPosZ(); + world.playSound(player, posX, posY, posZ, SoundEvents.BLOCK_GLASS_BREAK, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + + for (int l = 0; l < 8; ++l) + world.addParticle(RedstoneParticleData.REDSTONE_DUST, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), 0, 0, 0); + + if (!world.isRemote && PlayerHelper.isFakePlayer(player)) + return super.onItemRightClick(world, player, hand); + + altarEntity.fillMainTank(lpProvided); + if (!player.isCreative()) + { + stack.shrink(1); + } + } + + return super.onItemRightClick(world, player, hand); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemBowAnointmentProvider.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemBowAnointmentProvider.java new file mode 100644 index 00000000..af9ab56f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemBowAnointmentProvider.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.item.BowItem; +import net.minecraft.item.CrossbowItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +public class ItemBowAnointmentProvider extends ItemAnointmentProvider +{ + boolean crossbowsValid; + + public ItemBowAnointmentProvider(ResourceLocation anointRL, int colour, int level, int maxDamage, boolean crossbowsValid) + { + super(anointRL, colour, level, maxDamage); + this.crossbowsValid = crossbowsValid; + } + + public boolean isItemValidForApplication(ItemStack stack) + { + return isItemBow(stack) || (crossbowsValid && isItemCrossbow(stack)); + } + + public static boolean isItemBow(ItemStack stack) + { + return (stack.getItem() instanceof BowItem); + } + + public static boolean isItemCrossbow(ItemStack stack) + { + return (stack.getItem() instanceof CrossbowItem); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemDaggerOfSacrifice.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemDaggerOfSacrifice.java new file mode 100644 index 00000000..f1ba5d85 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemDaggerOfSacrifice.java @@ -0,0 +1,75 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraftforge.common.util.FakePlayer; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; +import wayoftime.bloodmagic.util.helper.PlayerSacrificeHelper; + +public class ItemDaggerOfSacrifice extends Item +{ + public ItemDaggerOfSacrifice() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) + { + if (attacker instanceof FakePlayer) + return false; + + if (target == null || attacker == null || attacker.getEntityWorld().isRemote + || (attacker instanceof PlayerEntity && !(attacker instanceof ServerPlayerEntity))) + return false; + + if (!target.isNonBoss()) + return false; + + if (target instanceof PlayerEntity) + return false; + + if (target.isChild() && !(target instanceof IMob)) + return false; + + if (!target.isAlive() || target.getHealth() < 0.5F) + return false; + +// EntityEntry entityEntry = EntityRegistry.getEntry(target.getClass()); +// if (entityEntry == null) +// return false; +// int lifeEssenceRatio = BloodMagicAPI.INSTANCE.getValueManager().getSacrificial().getOrDefault(entityEntry.getRegistryName(), 25); + int lifeEssenceRatio = 25; + + if (lifeEssenceRatio <= 0) + return false; + + int lifeEssence = (int) (lifeEssenceRatio * target.getHealth()); +// if (target instanceof AnimalEntity) +// { +// lifeEssence = (int) (lifeEssence * (1 + PurificationHelper.getCurrentPurity((AnimalEntity) target))); +// } + + if (target.isChild()) + { + lifeEssence *= 0.5F; + } + + if (PlayerSacrificeHelper.findAndFillAltar(attacker.getEntityWorld(), target, lifeEssence, true)) + { + target.getEntityWorld().playSound(null, target.getPosX(), target.getPosY(), target.getPosZ(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + + (target.getEntityWorld().rand.nextFloat() - target.getEntityWorld().rand.nextFloat()) * 0.8F); + target.setHealth(-1); + target.onDeath(DamageSourceBloodMagic.INSTANCE); + } + + return false; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemDemonCrystal.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemDemonCrystal.java new file mode 100644 index 00000000..8e36fe65 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemDemonCrystal.java @@ -0,0 +1,52 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDiscreteDemonWill; + +public class ItemDemonCrystal extends Item implements IDiscreteDemonWill +{ + private EnumDemonWillType type; + + public ItemDemonCrystal(EnumDemonWillType type) + { + super(new Item.Properties().group(BloodMagic.TAB)); + this.type = type; + } + + @Override + public double getWill(ItemStack willStack) + { + return getDiscretization(willStack) * willStack.getCount(); + } + + @Override + public double drainWill(ItemStack willStack, double drainAmount) + { + double discretization = getDiscretization(willStack); + int drainedNumber = (int) Math.floor(Math.min(willStack.getCount() * discretization, drainAmount) + / discretization); + + if (drainedNumber > 0) + { + willStack.shrink(drainedNumber); + return drainedNumber * discretization; + } + + return 0; + } + + @Override + public double getDiscretization(ItemStack willStack) + { + return 50; + } + + @Override + public EnumDemonWillType getType(ItemStack willStack) + { + return type; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemDemonWillGauge.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemDemonWillGauge.java new file mode 100644 index 00000000..c44fe1aa --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemDemonWillGauge.java @@ -0,0 +1,54 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.IDemonWillViewer; +import wayoftime.bloodmagic.util.handler.event.GenericHandler; + +public class ItemDemonWillGauge extends Item implements IDemonWillViewer +{ + public ItemDemonWillGauge() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.willGauge").mergeStyle(TextFormatting.GRAY)); + } + + @Override + public boolean canSeeDemonWillAura(World world, ItemStack stack, PlayerEntity player) + { + return true; + } + + @Override + public int getDemonWillAuraResolution(World world, ItemStack stack, PlayerEntity player) + { + return 100; + } + + @Override + public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) + { + if (entityIn instanceof PlayerEntity && entityIn.ticksExisted % 50 == 0) + { + GenericHandler.sendPlayerDemonWillAura((PlayerEntity) entityIn); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemExperienceBook.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemExperienceBook.java new file mode 100644 index 00000000..3c5bb6ba --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemExperienceBook.java @@ -0,0 +1,210 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.BMLog; +import wayoftime.bloodmagic.util.helper.NBTHelper; + +public class ItemExperienceBook extends Item +{ + public ItemExperienceBook() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public boolean hasEffect(ItemStack stack) + { + return true; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome").mergeStyle(TextFormatting.GRAY)); + + if (!stack.hasTag()) + return; + + double storedExp = getStoredExperience(stack); + + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome.exp", (int) storedExp).mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome.expLevel", getLevelForExperience(storedExp)).mergeStyle(TextFormatting.GRAY)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (!world.isRemote) + { + if (player.isSneaking()) + absorbOneLevelExpFromPlayer(stack, player); + else + giveOneLevelExpToPlayer(stack, player); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } + + public void giveOneLevelExpToPlayer(ItemStack stack, PlayerEntity player) + { + float progress = player.experience; + int expToNext = getExperienceForNextLevel(player.experienceLevel); + + int neededExp = (int) Math.ceil((1 - progress) * expToNext); + float containedExp = (float) getStoredExperience(stack); + + BMLog.DEBUG.info("Needed: " + neededExp + ", contained: " + containedExp + ", exp to next: " + expToNext); + + if (containedExp >= neededExp) + { + setStoredExperience(stack, containedExp - neededExp); + addPlayerXP(player, neededExp); + + if (player.experienceLevel % 5 == 0) + { + float f = player.experienceLevel > 30 ? 1.0F : (float) player.experienceLevel / 30.0F; + player.getEntityWorld().playSound(null, player.getPosX(), player.getPosY(), player.getPosZ(), SoundEvents.ENTITY_PLAYER_LEVELUP, player.getSoundCategory(), f * 0.75F, 1.0F); + } + } else + { + setStoredExperience(stack, 0); + addPlayerXP(player, (int) containedExp); + } + } + + public void absorbOneLevelExpFromPlayer(ItemStack stack, PlayerEntity player) + { + float progress = player.experience; + + if (progress > 0) + { + int expDeduction = (int) getExperienceAcquiredToNext(player); + if (expDeduction > 0) + { + addPlayerXP(player, -expDeduction); + addExperience(stack, expDeduction); + } + } else if (progress == 0 && player.experienceLevel > 0) + { + int expDeduction = getExperienceForNextLevel(player.experienceLevel - 1); + addPlayerXP(player, -expDeduction); + addExperience(stack, expDeduction); + } + } + + // Credits to Ender IO for some of the experience code, although now modified + // slightly for my convenience. + public static int getPlayerXP(PlayerEntity player) + { + return (int) (getExperienceForLevel(player.experienceLevel) + (player.experience * player.xpBarCap())); + } + + public static void addPlayerXP(PlayerEntity player, int amount) + { + int experience = Math.max(0, getPlayerXP(player) + amount); + player.experienceTotal = experience; + player.experienceLevel = getLevelForExperience(experience); + int expForLevel = getExperienceForLevel(player.experienceLevel); + player.experience = (float) (experience - expForLevel) / (float) player.xpBarCap(); + } + + public static void setStoredExperience(ItemStack stack, double exp) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble("experience", exp); + } + + public static double getStoredExperience(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + return tag.getDouble("experience"); + } + + public static void addExperience(ItemStack stack, double exp) + { + setStoredExperience(stack, getStoredExperience(stack) + exp); + } + + public static int getExperienceForNextLevel(int currentLevel) + { + if (currentLevel < 16) + { + return 2 * currentLevel + 7; + } else if (currentLevel < 31) + { + return 5 * currentLevel - 38; + } else + { + return 9 * currentLevel - 158; + } + } + + // TODO: Change to calculation form. + public static int getExperienceForLevel(int level) + { + if (level >= 21863) + { + return Integer.MAX_VALUE; + } + if (level == 0) + { + return 0; + } + int res = 0; + for (int i = 0; i < level; i++) + { + res += getExperienceForNextLevel(i); + } + return res; + } + + public static double getExperienceAcquiredToNext(PlayerEntity player) + { + return player.experience * player.xpBarCap(); + } + + public static int getLevelForExperience(double exp) + { + if (exp <= 352) + { + return (int) Math.floor(solveParabola(1, 6, -exp)); + } else if (exp <= 1507) + { + return (int) Math.floor(solveParabola(2.5, -40.5, 360 - exp)); + } else + { + return (int) Math.floor(solveParabola(4.5, -162.5, 2220 - exp)); + } + } + + public static double solveParabola(double a, double b, double c) + { + return (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemInscriptionTool.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemInscriptionTool.java new file mode 100644 index 00000000..6d31a984 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemInscriptionTool.java @@ -0,0 +1,67 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.block.BlockState; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BlockRitualStone; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class ItemInscriptionTool extends Item +{ + private final EnumRuneType type; + + public ItemInscriptionTool(EnumRuneType type) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB).maxDamage(40)); + + this.type = type; + } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { + ItemStack stack = context.getItem(); + BlockPos pos = context.getPos(); + World world = context.getWorld(); + PlayerEntity player = context.getPlayer(); + BlockState state = world.getBlockState(pos); + + if (state.getBlock() instanceof BlockRitualStone + && !((BlockRitualStone) state.getBlock()).isRuneType(world, pos, type)) + { + ((BlockRitualStone) state.getBlock()).setRuneType(world, pos, type); + if (!player.isCreative()) + { + stack.damageItem(1, player, (entity) -> { + entity.sendBreakAnimation(EquipmentSlotType.MAINHAND); + }); + } + return ActionResultType.SUCCESS; + } + + return ActionResultType.FAIL; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent(TextHelper.localizeEffect("tooltip.bloodmagic.inscriber.desc")).mergeStyle(TextFormatting.GRAY)); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemLavaCrystal.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemLavaCrystal.java new file mode 100644 index 00000000..008e7dd8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemLavaCrystal.java @@ -0,0 +1,129 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.advancements.CriteriaTriggers; +import net.minecraft.block.Blocks; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.fml.common.thread.EffectiveSide; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +//TODO: Make some hook somewhere that attaches the pos to the ticket otherwise the tickets are basically useless lmao +public class ItemLavaCrystal extends ItemBindableBase +{ + public ItemLavaCrystal() + { + super(); + } + + @Override + public ItemStack getContainerItem(ItemStack stack) + { + Binding binding = getBinding(stack); + if (binding != null) + NetworkHelper.getSoulNetwork(binding.getOwnerId()).syphon(SoulTicket.item(stack, 50)); + + ItemStack returnStack = new ItemStack(this); + returnStack.setTag(stack.getTag()); + return returnStack; + } + + @Override + public boolean hasContainerItem(ItemStack stack) + { + return true; + } + + @Override + public int getBurnTime(ItemStack stack) + { + Binding binding = getBinding(stack); + if (binding == null) + return -1; + + if (EffectiveSide.get().isServer()) + { + if (NetworkHelper.canSyphonFromContainer(stack, 50)) + return 200; + else + { + PlayerEntity player = PlayerHelper.getPlayerFromUUID(binding.getOwnerId()); + if (player != null) + { + player.addPotionEffect(new EffectInstance(Effects.NAUSEA, 99)); + } + } + } else + { + return 200; + } + + return -1; + } + +// @Nullable +// @Override +// public Binding getBinding(ItemStack stack) +// { +// if (stack.getTag() == null) // hasTagCompound doesn't work on empty stacks with tags +// return null; +// +// NBTBase bindingTag = stack.getTag().get("binding"); +// if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.isEmpty()) // Make sure it's both a tag +// // compound and that it has actual +// // data. +// return null; +// +// NBTTagCompound nbt = (NBTTagCompound) bindingTag; +// return new Binding(NBTUtil.getUUIDFromTag(nbt.getCompoundTag("id")), nbt.getString("name")); +// } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { + BlockPos pos = context.getPos(); + Direction facing = context.getFace(); + pos = pos.offset(facing); + PlayerEntity player = context.getPlayer(); + Hand hand = context.getHand(); + ItemStack itemstack = player.getHeldItem(hand); + + Binding binding = getBinding(player.getHeldItem(hand)); + + if (binding == null) + return ActionResultType.FAIL; + + if (!player.canPlayerEdit(pos, facing, itemstack)) + return ActionResultType.FAIL; + + if (context.getWorld().isAirBlock(pos) && context.getWorld().isRemote) + { + context.getWorld().playSound(player, pos, SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.BLOCKS, 1.0F, random.nextFloat() * 0.4F + 0.8F); + return ActionResultType.SUCCESS; + } + + if (context.getWorld().isAirBlock(pos) && NetworkHelper.getSoulNetwork(binding).syphonAndDamage(player, SoulTicket.item(player.getHeldItem(hand), 100)).isSuccess()) + { + context.getWorld().playSound(player, pos, SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.BLOCKS, 1.0F, random.nextFloat() * 0.4F + 0.8F); + context.getWorld().setBlockState(pos, Blocks.FIRE.getDefaultState(), 11); + } else + return ActionResultType.FAIL; + + if (player instanceof ServerPlayerEntity) + CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayerEntity) player, pos, itemstack); + + return ActionResultType.SUCCESS; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingArmor.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingArmor.java new file mode 100644 index 00000000..3830ad32 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingArmor.java @@ -0,0 +1,190 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; +import java.util.UUID; +import java.util.function.Consumer; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ArmorItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.NonNullList; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.living.ILivingContainer; +import wayoftime.bloodmagic.core.living.LivingStats; + +public class ItemLivingArmor extends ArmorItem implements ILivingContainer, ExpandedArmor +{ + + private static final int MAX_ABSORPTION = 100000; + + public ItemLivingArmor(EquipmentSlotType slot) + { + super(ArmorMaterialLiving.INSTANCE, slot, new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) + { + if (this == BloodMagicItems.LIVING_PLATE.get() || this == BloodMagicItems.LIVING_HELMET.get() || this == BloodMagicItems.LIVING_BOOTS.get()) + { + return "bloodmagic:models/armor/livingarmour_layer_1.png"; + } + + if (this == BloodMagicItems.LIVING_LEGGINGS.get()) + { + return "bloodmagic:models/armor/livingarmour_layer_2.png"; + } else + { + return null; + } + } + + @Override + public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) + { + return repair.getItem() == BloodMagicItems.REAGENT_BINDING.get() || super.getIsRepairable(toRepair, repair); + } + +// @Override +// public void setDamage(ItemStack stack, int damage) +// { +// this.damageItem(stack, amount, entity, onBroken) +// if (this.slot != EquipmentSlotType.CHEST) +// { +// return; +// } +// if (damage >= this.getMaxDamage(stack)) +// { +// super.setDamage(stack, this.getMaxDamage(stack) - 1); +// } +// } + + @Override + public int damageItem(ItemStack stack, int amount, T entity, Consumer onBroken) + { + return Math.min((stack.getMaxDamage() - 1) - stack.getDamage() - amount, 0); + } + + @Override + public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + { +// Multimap modifiers = super.getAttributeModifiers(slot, stack); + Multimap modifiers = HashMultimap.create(); + modifiers.putAll(super.getAttributeModifiers(slot, stack)); + if (slot != EquipmentSlotType.CHEST) + return modifiers; + + LivingStats stats = getLivingStats(stack); + if (stats == null) + return modifiers; + + stats.getUpgrades().forEach((k, v) -> { + if (k.getAttributeProvider() != null) + k.getAttributeProvider().handleAttributes(stats, modifiers, UUID.nameUUIDFromBytes(k.getKey().toString().getBytes()), k, k.getLevel(v.intValue())); + }); + + return modifiers; + } + +// @Override +// public ArmorProperties getProperties(EntityLivingBase player, @Nonnull ItemStack armor, DamageSource source, double damage, int slot) { +// if (source == DamageSource.DROWN || source == DamageSource.OUT_OF_WORLD) +// return new ArmorProperties(-1, 0D, 0); +// +// double armorReduction; +// double damageAmount = 0.25; +// double armorPenetrationReduction = 0; +// +// if (armor.getItem() == RegistrarBloodMagicItems.LIVING_ARMOR_FEET || armor.getItem() == RegistrarBloodMagicItems.LIVING_ARMOR_HEAD) +// damageAmount = 3d / 20d * 0.6; +// else if (armor.getItem() == RegistrarBloodMagicItems.LIVING_ARMOR_LEGS) +// damageAmount = 6d / 20d * 0.6; +// else if (armor.getItem() == RegistrarBloodMagicItems.LIVING_ARMOR_CHEST) +// damageAmount = 0.64; +// +// if (armor.getItem() == RegistrarBloodMagicItems.LIVING_ARMOR_CHEST) { +// armorReduction = 0.24 / 0.64; // This values puts it at iron level +// +// if (!LivingUtil.hasFullSet((EntityPlayer) player)) +// return new ArmorProperties(-1, damageAmount * armorReduction, MAX_ABSORPTION); +// +// LivingStats stats = getLivingStats(armor); +// double protection = 1.0D; +// if (stats != null) +// for (Map.Entry entry : stats.getUpgrades().entrySet()) +// if (entry.getKey().getArmorProvider() != null) +// protection *= 1 - entry.getKey().getArmorProvider().getProtection((EntityPlayer) player, stats, source, entry.getKey().getLevel(entry.getValue())); +// +// armorReduction += (1 - protection) * (1 - armorReduction); +// damageAmount *= armorReduction; +// return new ArmorProperties(-1, source.isUnblockable() ? 1 - protection : damageAmount, MAX_ABSORPTION); +// } else if (source.isUnblockable()) +// return new ArmorProperties(-1, damageAmount * armorPenetrationReduction, MAX_ABSORPTION); +// +// return new ArmorProperties(-1, damageAmount, MAX_ABSORPTION); +// } + + @Override + public void fillItemGroup(ItemGroup group, NonNullList items) + { + if (!isInGroup(group)) + return; + + ItemStack stack = new ItemStack(this); + if (slot == EquipmentSlotType.CHEST) + updateLivingStats(stack, new LivingStats()); + + items.add(stack); + } + +// @Override +// public void fillItemGroup(ItemGroup group, NonNullList items) +// { +// if (this.isInGroup(group)) +// { +// for (EnumDemonWillType type : EnumDemonWillType.values()) +// { +// ItemStack stack = new ItemStack(this); +// this.setCurrentType(type, stack); +// this.setWill(type, stack, maxWill); +// items.add(stack); +// } +// } +// } + + @Override + public void damageArmor(LivingEntity livingEntity, ItemStack stack, DamageSource source, float damage, EquipmentSlotType slot) + { + if (slot == EquipmentSlotType.CHEST && damage > getMaxDamage() - stack.getDamage()) + { +// livingEntity.attackEntityFrom(source, amount) +// } + livingEntity.attackEntityFrom(DamageSource.MAGIC, 2.0F); + return; + } + +// stack.damage((int) damage, livingEntity, entity -> {}); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + ILivingContainer.appendLivingTooltip(getLivingStats(stack), tooltip, true); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingTome.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingTome.java new file mode 100644 index 00000000..fe6c0a32 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingTome.java @@ -0,0 +1,105 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; +import java.util.Map.Entry; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.LivingArmorRegistrar; +import wayoftime.bloodmagic.core.living.ILivingContainer; +import wayoftime.bloodmagic.core.living.LivingStats; +import wayoftime.bloodmagic.core.living.LivingUpgrade; +import wayoftime.bloodmagic.core.living.LivingUtil; + +public class ItemLivingTome extends Item implements ILivingContainer +{ + + public ItemLivingTome() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack held = player.getHeldItem(hand); + + LivingStats armorStats = LivingStats.fromPlayer(player, true); + if (armorStats == null) + return ActionResult.resultPass(held); + + LivingStats tomeStats = getLivingStats(held); + if (tomeStats == null) + return ActionResult.resultPass(held); + + boolean[] flag = new boolean[] { false }; + tomeStats.getUpgrades().forEach((k, v) -> { + if (armorStats.getLevel(k.getKey()) >= tomeStats.getLevel(k.getKey())) + return; + + Pair upgraded = LivingUtil.applyNewExperience(player, k, v); // FIXME set levels + // directly, don't add + // experience + flag[0] = flag[0] || upgraded.getRight(); + }); +// LivingStats.toPlayer(player, armorStats); + if (flag[0]) + { + held.shrink(1); + return ActionResult.resultSuccess(held); + } else + return ActionResult.resultPass(held); + } + + @Override + public void fillItemGroup(ItemGroup group, NonNullList items) + { + if (!isInGroup(group)) + return; + + for (Entry entry : LivingArmorRegistrar.UPGRADE_MAP.entrySet()) + { + LivingUpgrade upgrade = entry.getValue(); + int exp = 0; + + while ((exp = upgrade.getNextRequirement(exp)) != 0) + { + ItemStack tome = new ItemStack(this); + updateLivingStats(tome, new LivingStats().setMaxPoints(upgrade.getLevelCost(exp)).addExperience(upgrade.getKey(), exp)); + items.add(tome); + } + } + +// LivingArmorRegistrar.UPGRADE_MAP.forEach(upgrade -> { +// int exp = 0; +// +// while ((exp = upgrade.getNextRequirement(exp)) != 0) +// { +// ItemStack tome = new ItemStack(this); +// updateLivingStats(tome, new LivingStats().setMaxPoints(upgrade.getLevelCost(exp)).addExperience(upgrade.getKey(), exp)); +// display.add(tome); +// } +// }); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + ILivingContainer.appendLivingTooltip(getLivingStats(stack), tooltip, false); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingTrainer.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingTrainer.java new file mode 100644 index 00000000..241dd4dd --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemLivingTrainer.java @@ -0,0 +1,28 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.living.ILivingContainer; + +public class ItemLivingTrainer extends Item implements ILivingContainer +{ + public ItemLivingTrainer() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + ILivingContainer.appendLivingTooltip(getLivingStats(stack), tooltip, false); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemRitualDiviner.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemRitualDiviner.java new file mode 100644 index 00000000..13f2c0a9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemRitualDiviner.java @@ -0,0 +1,598 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.Collections; +import java.util.List; + +import com.google.common.collect.Lists; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BlockRitualStone; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.tile.TileMasterRitualStone; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; +import wayoftime.bloodmagic.util.helper.RitualHelper; +import wayoftime.bloodmagic.util.helper.TextHelper; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class ItemRitualDiviner extends Item +{ + final int type; + public static final String tooltipBase = "tooltip.bloodmagic.diviner."; + public static String[] names = + { "normal", "dusk", "dawn" }; + + public ItemRitualDiviner(int type) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + this.type = type; + } + +// @Override +// public String getHighlightTip(ItemStack stack, String displayName) +// { +// if (Strings.isNullOrEmpty(getCurrentRitual(stack))) +// return displayName; +// +// Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(getCurrentRitual(stack)); +// if (ritual == null) +// return displayName; +// +// return displayName + ": " + TextHelper.localize(ritual.getTranslationKey()); +// } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { + ItemStack stack = context.getPlayer().getHeldItem(context.getHand()); + if (context.getPlayer().isSneaking()) + { + if (context.getWorld().isRemote) + { + trySetDisplayedRitual(stack, context.getWorld(), context.getPos()); + } + + return ActionResultType.SUCCESS; + } else if (addRuneToRitual(stack, context.getWorld(), context.getPos(), context.getPlayer())) + { + if (context.getWorld().isRemote) + { + spawnParticles(context.getWorld(), context.getPos().offset(context.getFace()), 15); + } + + return ActionResultType.SUCCESS; + // TODO: Have the diviner automagically build the ritual + } + + return ActionResultType.PASS; + } + + /** + * Adds a single rune to the ritual. + * + * @param stack - The Ritual Diviner stack + * @param world - The World + * @param pos - Block Position of the MRS. + * @param player - The Player attempting to place the ritual + * @return - True if a rune was successfully added + */ + public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, PlayerEntity player) + { + TileEntity tile = world.getTileEntity(pos); + + if (tile instanceof TileMasterRitualStone) + { + Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(this.getCurrentRitual(stack)); + if (ritual != null) + { + Direction direction = getDirection(stack); + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + for (RitualComponent component : components) + { + if (!canPlaceRitualStone(component.getRuneType(), stack)) + { + return false; + } + BlockPos offset = component.getOffset(direction); + BlockPos newPos = pos.add(offset); + BlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (RitualHelper.isRune(world, newPos)) + { + if (RitualHelper.isRuneType(world, newPos, component.getRuneType())) + { + if (world.isRemote) + { + undisplayHologram(); + } + } else + { + // Replace existing ritual stone + RitualHelper.setRuneType(world, newPos, component.getRuneType()); + return true; + } + } else if (block.isAir(state, world, newPos))// || block.isReplaceable(world, newPos)) + { + if (!consumeStone(stack, world, player)) + { + return false; + } + ((BlockRitualStone) BloodMagicBlocks.BLANK_RITUAL_STONE.get()).setRuneType(world, newPos, component.getRuneType()); + return true; + } else + { + return false; // TODO: Possibly replace the block with a + // ritual stone + } + } + } + } + + return false; + } + + @OnlyIn(Dist.CLIENT) + public void trySetDisplayedRitual(ItemStack itemStack, World world, BlockPos pos) + { + TileEntity tile = world.getTileEntity(pos); + + if (tile instanceof TileMasterRitualStone) + { + Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(this.getCurrentRitual(itemStack)); + TileMasterRitualStone masterRitualStone = (TileMasterRitualStone) tile; + + if (ritual != null) + { + Direction direction = getDirection(itemStack); + ClientHandler.setRitualHolo(masterRitualStone, ritual, direction, true); + } + } + } + + @OnlyIn(Dist.CLIENT) + public void undisplayHologram() + { + ClientHandler.setRitualHoloToNull(); + } + + // TODO: Make this work for any IRitualStone + public boolean consumeStone(ItemStack stack, World world, PlayerEntity player) + { + if (player.isCreative()) + { + return true; + } + + NonNullList inventory = player.inventory.mainInventory; + for (ItemStack newStack : inventory) + { + if (newStack.isEmpty()) + { + + continue; + } + Item item = newStack.getItem(); + if (item instanceof BlockItem) + { + Block block = ((BlockItem) item).getBlock(); + if (block instanceof BlockRitualStone) + { + newStack.shrink(1); + return true; + } + } + } + + return false; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(this.getCurrentRitual(stack)); + if (ritual != null) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.diviner.currentRitual", new TranslationTextComponent(ritual.getTranslationKey()))); + + boolean sneaking = Screen.hasShiftDown(); +// boolean extraInfo = sneaking && Keyboard.isKeyDown(Keyboard.KEY_M); + boolean extraInfo = sneaking && Screen.hasAltDown(); + + if (extraInfo) + { + tooltip.add(new StringTextComponent("")); + + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + if (TextHelper.canTranslate(ritual.getTranslationKey() + "." + type.name().toLowerCase() + ".info")) + { + tooltip.add(new TranslationTextComponent(ritual.getTranslationKey() + "." + type.name().toLowerCase() + ".info")); + } + } + } else if (sneaking) + { + tooltip.add(new TranslationTextComponent(tooltipBase + "currentDirection", Utils.toFancyCasing(getDirection(stack).name()))); + tooltip.add(new StringTextComponent("")); + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + + int blankRunes = 0; + int airRunes = 0; + int waterRunes = 0; + int fireRunes = 0; + int earthRunes = 0; + int duskRunes = 0; + int dawnRunes = 0; + int totalRunes = components.size(); + + for (RitualComponent component : components) + { + switch (component.getRuneType()) + { + case BLANK: + blankRunes++; + break; + case AIR: + airRunes++; + break; + case EARTH: + earthRunes++; + break; + case FIRE: + fireRunes++; + break; + case WATER: + waterRunes++; + break; + case DUSK: + duskRunes++; + break; + case DAWN: + dawnRunes++; + break; + } + } + + if (blankRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "blankRune", blankRunes).mergeStyle(EnumRuneType.BLANK.colorCode)); + if (waterRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "waterRune", waterRunes).mergeStyle(EnumRuneType.WATER.colorCode)); + if (airRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "airRune", airRunes).mergeStyle(EnumRuneType.AIR.colorCode)); + if (fireRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "fireRune", fireRunes).mergeStyle(EnumRuneType.FIRE.colorCode)); + if (earthRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "earthRune", earthRunes).mergeStyle(EnumRuneType.EARTH.colorCode)); + if (duskRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "duskRune", duskRunes).mergeStyle(EnumRuneType.DUSK.colorCode)); + if (dawnRunes > 0) + tooltip.add(new TranslationTextComponent(tooltipBase + "dawnRune", dawnRunes).mergeStyle(EnumRuneType.DAWN.colorCode)); + + tooltip.add(new StringTextComponent("")); + tooltip.add(new TranslationTextComponent(tooltipBase + "totalRune", totalRunes)); + } else + { + tooltip.add(new StringTextComponent("")); + if (TextHelper.canTranslate(ritual.getTranslationKey() + ".info")) + { + tooltip.add(new TranslationTextComponent(ritual.getTranslationKey() + ".info")); + tooltip.add(new StringTextComponent("")); + } + + tooltip.add(new TranslationTextComponent(tooltipBase + "extraInfo").mergeStyle(TextFormatting.BLUE)); + tooltip.add(new TranslationTextComponent(tooltipBase + "extraExtraInfo").mergeStyle(TextFormatting.BLUE)); + } + } + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + + RayTraceResult ray = rayTrace(world, player, RayTraceContext.FluidMode.NONE); + + if (ray != null && ray.getType() == RayTraceResult.Type.BLOCK) + { + return new ActionResult<>(ActionResultType.PASS, stack); + } + + if (player.isSneaking()) + { + if (!world.isRemote) + { + cycleRitual(stack, player, false); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } else + { + if (!world.isRemote) + { + cycleDirection(stack, player); + } + } + + return new ActionResult<>(ActionResultType.PASS, stack); + } + + @Override + public void onUse(World worldIn, LivingEntity entityLiving, ItemStack stack, int count) + { + if (!entityLiving.world.isRemote && entityLiving instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) entityLiving; + + RayTraceResult ray = rayTrace(player.world, player, RayTraceContext.FluidMode.NONE); + + if (ray != null && ray.getType() == RayTraceResult.Type.BLOCK) + { + return; +// return false; + } + + if (!player.isSwingInProgress) + { + if (player.isSneaking()) + { + cycleRitual(stack, player, true); + } else + { + cycleDirection(stack, player); + } + } + } + +// return false; + } + + public void cycleDirection(ItemStack stack, PlayerEntity player) + { + Direction direction = getDirection(stack); + Direction newDirection; + switch (direction) + { + case NORTH: + newDirection = Direction.EAST; + break; + case EAST: + newDirection = Direction.SOUTH; + break; + case SOUTH: + newDirection = Direction.WEST; + break; + case WEST: + newDirection = Direction.NORTH; + break; + default: + newDirection = Direction.NORTH; + } + + setDirection(stack, newDirection); + notifyDirectionChange(newDirection, player); + } + + public void notifyDirectionChange(Direction direction, PlayerEntity player) + { + player.sendStatusMessage(new TranslationTextComponent(tooltipBase + "currentDirection", Utils.toFancyCasing(direction.name())), true); + } + + public void setDirection(ItemStack stack, Direction direction) + { + if (!stack.hasTag()) + { + stack.setTag(new CompoundNBT()); + } + + CompoundNBT tag = stack.getTag(); + + tag.putInt(Constants.NBT.DIRECTION, direction.getIndex()); + } + + public Direction getDirection(ItemStack stack) + { + if (!stack.hasTag()) + { + stack.setTag(new CompoundNBT()); + return Direction.NORTH; + } + + CompoundNBT tag = stack.getTag(); + + int dir = tag.getInt(Constants.NBT.DIRECTION); + if (dir == 0) + { + return Direction.NORTH; + } + + return Direction.values()[tag.getInt(Constants.NBT.DIRECTION)]; + } + + /** + * Cycles the ritual forward or backward + */ + public void cycleRitual(ItemStack stack, PlayerEntity player, boolean reverse) + { + String key = getCurrentRitual(stack); + List rituals = BloodMagic.RITUAL_MANAGER.getSortedRituals(); + if (reverse) + Collections.reverse(rituals = Lists.newArrayList(rituals)); + + String firstId = ""; + boolean foundId = false; + boolean foundFirst = false; + + for (Ritual ritual : rituals) + { + String id = BloodMagic.RITUAL_MANAGER.getId(ritual); + + if (!BloodMagic.RITUAL_MANAGER.enabled(id, false) || !canDivinerPerformRitual(stack, ritual)) + { + continue; + } + + if (!foundFirst) + { + firstId = id; + foundFirst = true; + } + + if (foundId) + { + setCurrentRitual(stack, id); + notifyRitualChange(id, player); + return; + } else if (id.equals(key)) + { + foundId = true; + } + } + + if (foundFirst) + { + setCurrentRitual(stack, firstId); + notifyRitualChange(firstId, player); + } + } + + public boolean canDivinerPerformRitual(ItemStack stack, Ritual ritual) + { + if (ritual == null) + { + return false; + } + + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + for (RitualComponent component : components) + { + if (!canPlaceRitualStone(component.getRuneType(), stack)) + { + return false; + } + } + + return true; + } + + public void notifyRitualChange(String key, PlayerEntity player) + { + Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(key); + if (ritual != null) + { + player.sendStatusMessage(new TranslationTextComponent(ritual.getTranslationKey()), true); + } + } + + public void setCurrentRitual(ItemStack stack, String key) + { + if (!stack.hasTag()) + { + stack.setTag(new CompoundNBT()); + } + + CompoundNBT tag = stack.getTag(); + + tag.putString("current_ritual", key); + } + + public String getCurrentRitual(ItemStack stack) + { + if (!stack.hasTag()) + { + stack.setTag(new CompoundNBT()); + } + + CompoundNBT tag = stack.getTag(); + return tag.getString("current_ritual"); + } + + public boolean canPlaceRitualStone(EnumRuneType rune, ItemStack stack) + { + int meta = type; + switch (rune) + { + case BLANK: + case AIR: + case EARTH: + case FIRE: + case WATER: + return true; + case DUSK: + return meta >= 1; + case DAWN: + return meta >= 2; + } + + return false; + } + + public static void spawnParticles(World worldIn, BlockPos pos, int amount) + { + BlockState state = worldIn.getBlockState(pos); + Block block = worldIn.getBlockState(pos).getBlock(); + + if (block.isAir(state, worldIn, pos)) + { + for (int i = 0; i < amount; ++i) + { + double d0 = random.nextGaussian() * 0.02D; + double d1 = random.nextGaussian() * 0.02D; + double d2 = random.nextGaussian() * 0.02D; + worldIn.addParticle(ParticleTypes.HAPPY_VILLAGER, (double) ((float) pos.getX() + + random.nextFloat()), (double) pos.getY() + + (double) random.nextFloat(), (double) ((float) pos.getZ() + + random.nextFloat()), d0, d1, d2); + } + } else + { + for (int i1 = 0; i1 < amount; ++i1) + { + double d0 = random.nextGaussian() * 0.02D; + double d1 = random.nextGaussian() * 0.02D; + double d2 = random.nextGaussian() * 0.02D; + worldIn.addParticle(ParticleTypes.HAPPY_VILLAGER, (double) ((float) pos.getX() + + random.nextFloat()), (double) pos.getY() + + (double) random.nextFloat() + * 1.0f, (double) ((float) pos.getZ() + random.nextFloat()), d0, d1, d2); + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemRitualReader.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemRitualReader.java new file mode 100644 index 00000000..04bfbae6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemRitualReader.java @@ -0,0 +1,347 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceContext.FluidMode; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRitualReaderState; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.tile.TileMasterRitualStone; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.util.helper.TextHelper; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDiscreteDemonWill; + +public class ItemRitualReader extends Item +{ + public static final String tooltipBase = "tooltip.bloodmagic.ritualReader."; + + public ItemRitualReader() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + EnumRitualReaderState state = this.getState(stack); + tooltip.add(new TranslationTextComponent(tooltipBase + "currentState", TextHelper.localizeEffect(tooltipBase + state.toString().toLowerCase())).mergeStyle(TextFormatting.GRAY)); + + tooltip.add(new StringTextComponent("")); + + boolean sneaking = Screen.hasShiftDown(); + + if (sneaking) + { + tooltip.add(new TranslationTextComponent(tooltipBase + "desc." + state.toString().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + } else + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.extraInfo").mergeStyle(TextFormatting.GRAY)); + } + + super.addInformation(stack, world, tooltip, flag); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + RayTraceResult ray = Item.rayTrace(world, player, FluidMode.NONE); + if (ray != null && ray.getType() == RayTraceResult.Type.BLOCK) + { + return new ActionResult<>(ActionResultType.PASS, stack); + } + + if (player.isSneaking()) + { + if (!world.isRemote) + { + cycleReader(stack, player); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } + + return new ActionResult<>(ActionResultType.PASS, stack); + } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { + World world = context.getWorld(); + BlockPos pos = context.getPos(); + + PlayerEntity player = context.getPlayer(); + ItemStack stack = context.getItem(); + Hand hand = context.getHand(); + Direction direction = context.getFace(); + +// ItemStack stack = player.getHeldItem(hand); + if (!world.isRemote) + { + EnumRitualReaderState state = this.getState(stack); + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof IMasterRitualStone) + { + IMasterRitualStone master = (IMasterRitualStone) tile; + if (master.getCurrentRitual() == null) + super.onItemUse(context); + this.setMasterBlockPos(stack, pos); + this.setBlockPos(stack, BlockPos.ZERO); + + switch (state) + { + case INFORMATION: + master.provideInformationOfRitualToPlayer(player); + + break; + case SET_AREA: + if (player.isSneaking() && player.getHeldItem(Hand.OFF_HAND).getItem() instanceof ItemBloodOrb) + { + Ritual ritual = master.getCurrentRitual(); + for (String range : ritual.getListOfRanges()) + { + AreaDescriptor aabb = ritual.getBlockRange(range); + master.setBlockRange(range, aabb); + } + break; + } + + String range = this.getCurrentBlockRange(stack); + + if (range == null || range.isEmpty() || player.isSneaking()) + { + String newRange = master.getNextBlockRange(range); + range = newRange; + this.setCurrentBlockRange(stack, newRange); + } + + master.provideInformationOfRangeToPlayer(player, range); + + break; + case SET_WILL_TYPES: + List typeList = new ArrayList<>(); + NonNullList inv = player.inventory.mainInventory; + for (int i = 0; i < 9; i++) + { + ItemStack testStack = inv.get(i); + if (testStack.isEmpty()) + { + continue; + } + + if (testStack.getItem() instanceof IDiscreteDemonWill) + { + EnumDemonWillType type = ((IDiscreteDemonWill) testStack.getItem()).getType(testStack); + if (!typeList.contains(type)) + { + typeList.add(type); + } + } + } + + master.setActiveWillConfig(player, typeList); + master.provideInformationOfWillConfigToPlayer(player, typeList); + break; + } + + return ActionResultType.FAIL; + } else + { + if (state == EnumRitualReaderState.SET_AREA) + { + BlockPos masterPos = this.getMasterBlockPos(stack); + if (!masterPos.equals(BlockPos.ZERO)) + { + BlockPos containedPos = getBlockPos(stack); + if (containedPos.equals(BlockPos.ZERO)) + { + BlockPos pos1 = pos.subtract(masterPos); + this.setBlockPos(stack, pos1); + player.sendStatusMessage(new TranslationTextComponent("ritual.bloodmagic.blockRange.firstBlock"), true); + } else + { + tile = world.getTileEntity(masterPos); + if (tile instanceof IMasterRitualStone) + { + IMasterRitualStone master = (IMasterRitualStone) tile; + BlockPos pos2 = pos.subtract(masterPos); + String range = this.getCurrentBlockRange(stack); + if (range == null || range.isEmpty()) + { + String newRange = master.getNextBlockRange(range); + range = newRange; + this.setCurrentBlockRange(stack, newRange); + } + Ritual ritual = master.getCurrentRitual(); + List willConfig = master.getActiveWillConfig(); + DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(master.getWorldObj(), master.getBlockPos()); + + int maxHorizontalRange = ritual.getMaxHorizontalRadiusForRange(range, willConfig, holder); + int maxVerticalRange = ritual.getMaxVerticalRadiusForRange(range, willConfig, holder); + int maxVolume = ritual.getMaxVolumeForRange(range, willConfig, holder); + + switch (master.setBlockRangeByBounds(player, range, containedPos, pos2)) + { + case SUCCESS: + player.sendStatusMessage(new TranslationTextComponent("ritual.bloodmagic.blockRange.success"), true); + break; + case NOT_WITHIN_BOUNDARIES: + player.sendStatusMessage(new TranslationTextComponent("ritual.bloodmagic.blockRange.tooFar", maxVerticalRange, maxHorizontalRange), false); + break; + case VOLUME_TOO_LARGE: + player.sendStatusMessage(new TranslationTextComponent("ritual.bloodmagic.blockRange.tooBig", maxVolume), false); + break; + default: + player.sendStatusMessage(new TranslationTextComponent("ritual.bloodmagic.blockRange.noRange"), false); + break; + } + } + this.setBlockPos(stack, BlockPos.ZERO); + } + } + } + } + } else + { + EnumRitualReaderState state = this.getState(stack); + + if (state == EnumRitualReaderState.SET_AREA) + { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileMasterRitualStone) + { + + System.out.println("Setting range holo... I think"); + ClientHandler.setRitualRangeHolo((TileMasterRitualStone) tile, true); + + } + } + + } + + return super.onItemUse(context); + } + + public BlockPos getBlockPos(ItemStack stack) + { + stack = NBTHelper.checkNBT(stack); + return new BlockPos(stack.getTag().getInt(Constants.NBT.X_COORD), stack.getTag().getInt(Constants.NBT.Y_COORD), stack.getTag().getInt(Constants.NBT.Z_COORD)); + } + + public ItemStack setBlockPos(ItemStack stack, BlockPos pos) + { + stack = NBTHelper.checkNBT(stack); + CompoundNBT itemTag = stack.getTag(); + itemTag.putInt(Constants.NBT.X_COORD, pos.getX()); + itemTag.putInt(Constants.NBT.Y_COORD, pos.getY()); + itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ()); + return stack; + } + + public BlockPos getMasterBlockPos(ItemStack stack) + { + stack = NBTHelper.checkNBT(stack); + return new BlockPos(stack.getTag().getInt(Constants.NBT.X_COORD + "master"), stack.getTag().getInt(Constants.NBT.Y_COORD + "master"), stack.getTag().getInt(Constants.NBT.Z_COORD + "master")); + } + + public ItemStack setMasterBlockPos(ItemStack stack, BlockPos pos) + { + stack = NBTHelper.checkNBT(stack); + CompoundNBT itemTag = stack.getTag(); + itemTag.putInt(Constants.NBT.X_COORD + "master", pos.getX()); + itemTag.putInt(Constants.NBT.Y_COORD + "master", pos.getY()); + itemTag.putInt(Constants.NBT.Z_COORD + "master", pos.getZ()); + return stack; + } + + public String getCurrentBlockRange(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + return tag.getString("range"); + } + + public void setCurrentBlockRange(ItemStack stack, String range) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putString("range", range); + } + + public void cycleReader(ItemStack stack, PlayerEntity player) + { + EnumRitualReaderState prevState = getState(stack); + int val = prevState.ordinal(); + int nextVal = val + 1 >= EnumRitualReaderState.values().length ? 0 : val + 1; + EnumRitualReaderState nextState = EnumRitualReaderState.values()[nextVal]; + + setState(stack, nextState); + notifyPlayerOfStateChange(nextState, player); + } + + public void notifyPlayerOfStateChange(EnumRitualReaderState state, PlayerEntity player) + { + ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentState", new TranslationTextComponent(tooltipBase + state.toString().toLowerCase()))); + } + + public void setState(ItemStack stack, EnumRitualReaderState state) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putInt(Constants.NBT.RITUAL_READER, state.ordinal()); + } + + public EnumRitualReaderState getState(ItemStack stack) + { + if (!stack.hasTag()) + { + stack.setTag(new CompoundNBT()); + return EnumRitualReaderState.INFORMATION; + } + + CompoundNBT tag = stack.getTag(); + + return EnumRitualReaderState.values()[tag.getInt(Constants.NBT.RITUAL_READER)]; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemSacrificialDagger.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemSacrificialDagger.java new file mode 100644 index 00000000..cc312150 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemSacrificialDagger.java @@ -0,0 +1,215 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.UseAction; +import net.minecraft.particles.RedstoneParticleData; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.MinecraftForge; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ConfigHandler; +import wayoftime.bloodmagic.event.SacrificeKnifeUsedEvent; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; +import wayoftime.bloodmagic.util.helper.IncenseHelper; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; +import wayoftime.bloodmagic.util.helper.PlayerSacrificeHelper; + +public class ItemSacrificialDagger extends Item +{ + + public ItemSacrificialDagger() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { +// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sacrificialDagger.desc")))); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sacrificialdagger.desc").mergeStyle(TextFormatting.GRAY)); + +// if (stack.getItemDamage() == 1) +// list.add(TextHelper.localizeEffect("tooltip.bloodmagic.sacrificialDagger.creative")); + } + + @Override + public void onPlayerStoppedUsing(ItemStack stack, World worldIn, LivingEntity entityLiving, int timeLeft) + { + if (entityLiving instanceof PlayerEntity && !entityLiving.getEntityWorld().isRemote) + if (PlayerSacrificeHelper.sacrificePlayerHealth((PlayerEntity) entityLiving)) + IncenseHelper.setHasMaxIncense(stack, (PlayerEntity) entityLiving, false); + } + + @Override + public boolean hasEffect(ItemStack stack) + { + return IncenseHelper.getHasMaxIncense(stack) || super.hasEffect(stack); + } + + @Override + public int getUseDuration(ItemStack stack) + { + return 72000; + } + + @Override + public UseAction getUseAction(ItemStack stack) + { + return UseAction.BOW; + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (PlayerHelper.isFakePlayer(player)) + return super.onItemRightClick(world, player, hand); + + if (this.canUseForSacrifice(stack)) + { + player.setActiveHand(hand); + return ActionResult.resultSuccess(stack); + } + + int lpAdded = ConfigHandler.values.sacrificialDaggerConversion * 2; + +// RayTraceResult rayTrace = rayTrace(world, player, false); +// if (rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) +// { +// TileEntity tile = world.getTileEntity(rayTrace.getBlockPos()); +// +// if (tile != null && tile instanceof TileAltar && stack.getItemDamage() == 1) +// lpAdded = ((TileAltar) tile).getCapacity(); +// } + + if (!player.abilities.isCreativeMode) + { + SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2, lpAdded); + if (MinecraftForge.EVENT_BUS.post(evt)) + return super.onItemRightClick(world, player, hand); + + if (evt.shouldDrainHealth) + { + player.hurtResistantTime = 0; + player.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 0.001F); + player.setHealth(Math.max(player.getHealth() - 1.998F, 0.0001f)); + if (player.getHealth() <= 0.001f && !world.isRemote) + { + player.onDeath(DamageSourceBloodMagic.INSTANCE); + player.setHealth(0); + } +// player.attackEntityFrom(BloodMagicAPI.getDamageSource(), 2.0F); + } + + if (!evt.shouldFillAltar) + return super.onItemRightClick(world, player, hand); + + lpAdded = evt.lpAdded; + } else if (player.isSneaking()) + { + lpAdded = Integer.MAX_VALUE; + } + + double posX = player.getPosX(); + double posY = player.getPosY(); + double posZ = player.getPosZ(); + world.playSound(player, posX, posY, posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + + for (int l = 0; l < 8; ++l) + world.addParticle(RedstoneParticleData.REDSTONE_DUST, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), 0, 0, 0); + + if (!world.isRemote && PlayerHelper.isFakePlayer(player)) + return super.onItemRightClick(world, player, hand); + + // TODO - Check if SoulFray is active + PlayerSacrificeHelper.findAndFillAltar(world, player, lpAdded, false); + + return super.onItemRightClick(world, player, hand); + } + + @Override + public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) + { + if (!world.isRemote && entity instanceof PlayerEntity) + this.setUseForSacrifice(stack, this.isPlayerPreparedForSacrifice(world, (PlayerEntity) entity)); + } + + public boolean isPlayerPreparedForSacrifice(World world, PlayerEntity player) + { + return !world.isRemote && (PlayerSacrificeHelper.getPlayerIncense(player) > 0); + } + + public boolean canUseForSacrifice(ItemStack stack) + { + stack = NBTHelper.checkNBT(stack); + return stack.getTag().getBoolean(Constants.NBT.SACRIFICE); + } + + public void setUseForSacrifice(ItemStack stack, boolean sacrifice) + { + stack = NBTHelper.checkNBT(stack); + stack.getTag().putBoolean(Constants.NBT.SACRIFICE, sacrifice); + } + +// @Override +// @SideOnly(Side.CLIENT) +// public ItemMeshDefinition getMeshDefinition() +// { +// return stack -> { +// String variant = "type=normal"; +// if (stack.getItemDamage() != 0) +// variant = "type=creative"; +// +// if (canUseForSacrifice(stack)) +// variant = "type=ceremonial"; +// +// return new ModelResourceLocation(getRegistryName(), variant); +// }; +// } +// +// @Override +// public void gatherVariants(Consumer variants) +// { +// variants.accept("type=normal"); +// variants.accept("type=creative"); +// variants.accept("type=ceremonial"); +// } +// +// public enum DaggerType implements ISubItem +// { +// +// NORMAL, CREATIVE,; +// +// @Nonnull +// @Override +// public String getInternalName() +// { +// return name().toLowerCase(Locale.ROOT); +// } +// +// @Nonnull +// @Override +// public ItemStack getStack(int count) +// { +// return new ItemStack(RegistrarBloodMagicItems.SACRIFICIAL_DAGGER, count, ordinal()); +// } +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemSentientScythe.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemSentientScythe.java new file mode 100644 index 00000000..b9d6c59c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemSentientScythe.java @@ -0,0 +1,843 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.block.BlockState; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.CreatureAttribute; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.Attributes; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.monster.SlimeEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.HoeItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.network.play.server.SEntityVelocityPacket; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.stats.Stats; +import net.minecraft.util.ActionResult; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityPredicates; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.Difficulty; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillWeapon; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemSentientScythe extends HoeItem implements IDemonWillWeapon, IMultiWillTool +{ + public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; + public static double[] defaultDamageAdded = new double[] { 0.5, 1, 1.5, 2, 2.5 }; + public static double[] destructiveDamageAdded = new double[] { 1, 1.5, 2, 2.5, 3 }; + public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; + public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; + public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; + public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; + + public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; // TODO: Think of implementing this later + public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; + public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; + + public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; + + public static double maxAbsorptionHearts = 10; + + public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; + public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; + + public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; + + public final static double baseAttackDamage = 4; + public final static double baseAttackSpeed = -3; + private static Map hitMap = new HashMap(); + + public ItemSentientScythe() + { + super(BMItemTier.SENTIENT, (int) baseAttackDamage, (float) baseAttackSpeed, new Item.Properties().maxDamage(520).group(BloodMagic.TAB)); +// super(RegistrarBloodMagicItems.SOUL_TOOL_MATERIAL, 8.0F, 3.1F); + } + + @Override + public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) + { + return BloodMagicTags.CRYSTAL_DEMON.contains(repair.getItem()) || super.getIsRepairable(toRepair, repair); + } + + @Override + public float getDestroySpeed(ItemStack stack, BlockState state) + { + float value = super.getDestroySpeed(stack, state); + if (value > 1) + { + return (float) (value + getDigSpeedOfSword(stack)); + } else + { + return value; + } + } + + public void recalculatePowers(ItemStack stack, World world, PlayerEntity player) + { + EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); + int level = getLevel(stack, soulsRemaining); + + double drain = level >= 0 ? soulDrainPerSwing[level] : 0; + double extraDamage = getExtraDamage(type, level); + + setDrainOfActivatedSword(stack, drain); + setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); + setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); + setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); + setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); + setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); + setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); + setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); + } + + public double getExtraDamage(EnumDemonWillType type, int willBracket) + { + if (willBracket < 0) + { + return 0; + } + + switch (type) + { + case CORROSIVE: + case DEFAULT: + return defaultDamageAdded[willBracket]; + case DESTRUCTIVE: + return destructiveDamageAdded[willBracket]; + case VENGEFUL: + return vengefulDamageAdded[willBracket]; + case STEADFAST: + return steadfastDamageAdded[willBracket]; + } + + return 0; + } + + public double getAttackSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return vengefulAttackSpeed[willBracket]; + case DESTRUCTIVE: + return destructiveAttackSpeed[willBracket]; + default: + return -2.9; + } + } + + public double getHealthBonus(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case STEADFAST: + return healthBonus[willBracket]; + default: + return 0; + } + } + + public double getMovementSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return movementSpeed[willBracket]; + default: + return 0; + } + } + + public double getDigSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: +// return movementSpeed[willBracket]; + default: + return defaultDigSpeedAdded[willBracket]; + } + } + +// public void onLeftClickAir(ItemStack stack, LivingEntity attacker) +// { +// if (attacker instanceof PlayerEntity) +// { +// PlayerEntity attackerPlayer = (PlayerEntity) attacker; +// this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); +// EnumDemonWillType type = this.getCurrentType(stack); +// double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); +// int willBracket = this.getLevel(stack, will); +// +// this.recalculatePowers(stack, attacker.world, attackerPlayer); +// +//// applyEffectToEntity(type, willBracket, target, attackerPlayer); +// +// attackEntitiesInAreaExcludingEntity(stack, attackerPlayer, type, willBracket); +// } +// } + + @Override + public boolean onEntitySwing(ItemStack stack, LivingEntity attacker) + { + if (attacker instanceof PlayerEntity) + { + PlayerEntity attackerPlayer = (PlayerEntity) attacker; + this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + + this.recalculatePowers(stack, attacker.world, attackerPlayer); + +// applyEffectToEntity(type, willBracket, target, attackerPlayer); + + attackEntitiesInAreaExcludingEntity(stack, attackerPlayer, type, willBracket, null); + } + return false; + } + + public void attackEntitiesInAreaExcludingEntity(ItemStack stack, PlayerEntity attacker, EnumDemonWillType type, int willBracket, LivingEntity attackedEntity) + { +// System.out.println("Is client: " + attacker.world.isRemote); + double verticalRange = 2; + double horizontalRange = 2; + double range = 2; + + AxisAlignedBB aabb = null; + List list = null; + + if (attackedEntity != null) + { + aabb = attackedEntity.getBoundingBox().expand(horizontalRange, verticalRange, horizontalRange); + list = attacker.world.getEntitiesInAABBexcluding(attackedEntity, aabb, EntityPredicates.IS_ALIVE); + } else + { + Vector3d eyeVec = attacker.getEyePosition(1).add(attacker.getLookVec().scale(range)); + aabb = new AxisAlignedBB(eyeVec.getX() - horizontalRange, eyeVec.getY() - verticalRange, eyeVec.getZ() - horizontalRange, eyeVec.getX() + horizontalRange, eyeVec.getY() + verticalRange, eyeVec.getZ() + horizontalRange); +// List list = attacker.world.getEntitiesInAABBexcluding(attacker, aabb, EntityPredicates.IS_ALIVE); + list = attacker.world.getEntitiesInAABBexcluding(attacker, aabb, EntityPredicates.IS_ALIVE); + } + + list = attacker.world.getEntitiesWithinAABB(LivingEntity.class, aabb); + + // TODO: check if we actually hit something first, 'kay? + float f = (float) attacker.getAttributeValue(Attributes.ATTACK_DAMAGE); + + float f2 = attacker.getCooledAttackStrength(0.5F); +// float f2 = 1; + f = f * (0.2F + f2 * f2 * 0.8F); + attacker.resetCooldown(); +// f *= 5; + + boolean flag1 = false; + int i = 0; + i = i + EnchantmentHelper.getKnockbackModifier(attacker); + boolean flag = f2 > 0.9F; + + if (attacker.isSprinting() && flag) + { + attacker.world.playSound((PlayerEntity) null, attacker.getPosX(), attacker.getPosY(), attacker.getPosZ(), SoundEvents.ENTITY_PLAYER_ATTACK_KNOCKBACK, attacker.getSoundCategory(), 1.0F, 1.0F); + ++i; + flag1 = true; + } + + boolean didHit = false; + boolean strongAttackHit = false; + boolean weakAttackHit = false; + boolean noDamageHit = false; + + for (Entity targetEntity : list) + { + if (targetEntity.equals(attacker)) + { + continue; + } + + if (targetEntity.canBeAttackedWithItem()) + { + if (!targetEntity.hitByEntity(attacker)) + { + float f1; + if (targetEntity instanceof LivingEntity) + { + f1 = EnchantmentHelper.getModifierForCreature(stack, ((LivingEntity) targetEntity).getCreatureAttribute()); + } else + { + f1 = EnchantmentHelper.getModifierForCreature(stack, CreatureAttribute.UNDEFINED); + } + + f1 = f1 * f2; + + if (f > 0.0F || f1 > 0.0F) + { + boolean flag2 = flag && attacker.fallDistance > 0.0F && !attacker.isOnGround() && !attacker.isOnLadder() && !attacker.isInWater() && !attacker.isPotionActive(Effects.BLINDNESS) && !attacker.isPassenger() && targetEntity instanceof LivingEntity; + flag2 = flag2 && !attacker.isSprinting(); + net.minecraftforge.event.entity.player.CriticalHitEvent hitResult = net.minecraftforge.common.ForgeHooks.getCriticalHit(attacker, targetEntity, flag2, flag2 + ? 1.5F + : 1.0F); + flag2 = hitResult != null; + if (flag2) + { + f *= hitResult.getDamageModifier(); + } + + f = f + f1; + boolean flag3 = false; + double d0 = (double) (attacker.distanceWalkedModified - attacker.prevDistanceWalkedModified); + + float f4 = 0.0F; + boolean flag4 = false; + int j = EnchantmentHelper.getFireAspectModifier(attacker); + if (targetEntity instanceof LivingEntity) + { + f4 = ((LivingEntity) targetEntity).getHealth(); + if (j > 0 && !targetEntity.isBurning()) + { + flag4 = true; + targetEntity.setFire(1); + } + } + + Vector3d vector3d = targetEntity.getMotion(); + boolean flag5 = targetEntity.attackEntityFrom(DamageSource.causePlayerDamage(attacker), f); + + if (flag5) + { + didHit = true; + if (i > 0) + { + if (targetEntity instanceof LivingEntity) + { + ((LivingEntity) targetEntity).applyKnockback((float) i * 0.5F, (double) MathHelper.sin(attacker.rotationYaw * ((float) Math.PI / 180F)), (double) (-MathHelper.cos(attacker.rotationYaw * ((float) Math.PI / 180F)))); + } else + { + targetEntity.addVelocity((double) (-MathHelper.sin(attacker.rotationYaw * ((float) Math.PI / 180F)) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(attacker.rotationYaw * ((float) Math.PI / 180F)) * (float) i * 0.5F)); + } + + } + +// if (flag3) +// { +// float f3 = 1.0F + EnchantmentHelper.getSweepingDamageRatio(attacker) * f; +// +// for (LivingEntity livingentity : this.world.getEntitiesWithinAABB(LivingEntity.class, targetEntity.getBoundingBox().grow(1.0D, 0.25D, 1.0D))) +// { +// if (livingentity != this && livingentity != targetEntity && !this.isOnSameTeam(livingentity) && (!(livingentity instanceof ArmorStandEntity) || !((ArmorStandEntity) livingentity).hasMarker()) && this.getDistanceSq(livingentity) < 9.0D) +// { +// livingentity.applyKnockback(0.4F, (double) MathHelper.sin(this.rotationYaw * ((float) Math.PI / 180F)), (double) (-MathHelper.cos(this.rotationYaw * ((float) Math.PI / 180F)))); +// livingentity.attackEntityFrom(DamageSource.causePlayerDamage(this), f3); +// } +// } +// +// this.world.playSound((PlayerEntity) null, this.getPosX(), this.getPosY(), this.getPosZ(), SoundEvents.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); +// this.spawnSweepParticles(); +// } + + attacker.spawnSweepParticles(); + + if (targetEntity instanceof ServerPlayerEntity && targetEntity.velocityChanged) + { + ((ServerPlayerEntity) targetEntity).connection.sendPacket(new SEntityVelocityPacket(targetEntity)); + targetEntity.velocityChanged = false; + targetEntity.setMotion(vector3d); + } + + if (flag2) + { + attacker.onCriticalHit(targetEntity); + } + + if (!flag2 && !flag3) + { + if (flag) + { + strongAttackHit = true; + } else + { + weakAttackHit = true; + } + } + + if (f1 > 0.0F) + { + attacker.onEnchantmentCritical(targetEntity); + } + + attacker.setLastAttackedEntity(targetEntity); + if (targetEntity instanceof LivingEntity) + { + EnchantmentHelper.applyThornEnchantments((LivingEntity) targetEntity, attacker); + } + + EnchantmentHelper.applyArthropodEnchantments(attacker, targetEntity); + ItemStack itemstack1 = stack; + Entity entity = targetEntity; +// if (targetEntity instanceof EnderDragonPartEntity) +// { +// entity = ((EnderDragonPartEntity) targetEntity).dragon; +// } + + if (!attacker.world.isRemote && !itemstack1.isEmpty() && entity instanceof LivingEntity) + { + ItemStack copy = itemstack1.copy(); + itemstack1.hitEntity((LivingEntity) entity, attacker); + if (itemstack1.isEmpty()) + { + net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(attacker, copy, Hand.MAIN_HAND); + attacker.setHeldItem(Hand.MAIN_HAND, ItemStack.EMPTY); + } + } + + if (targetEntity instanceof LivingEntity) + { + float f5 = f4 - ((LivingEntity) targetEntity).getHealth(); + attacker.addStat(Stats.DAMAGE_DEALT, Math.round(f5 * 10.0F)); + if (j > 0) + { + targetEntity.setFire(j * 4); + } + + if (attacker.world instanceof ServerWorld && f5 > 2.0F) + { + int k = (int) ((double) f5 * 0.5D); + ((ServerWorld) attacker.world).spawnParticle(ParticleTypes.DAMAGE_INDICATOR, targetEntity.getPosX(), targetEntity.getPosYHeight(0.5D), targetEntity.getPosZ(), k, 0.1D, 0.0D, 0.1D, 0.2D); + } + + applyEffectToEntity(type, willBracket, (LivingEntity) targetEntity, attacker); + } + + } else + { + noDamageHit = true; + if (flag4) + { + targetEntity.extinguish(); + } + } + } + + } + } + } + + if (didHit) + { + if (flag1) + { + attacker.setMotion(attacker.getMotion().mul(0.6D, 1.0D, 0.6D)); + attacker.setSprinting(false); + } + + attacker.addExhaustion(0.1F); + + attacker.world.playSound((PlayerEntity) null, attacker.getPosX(), attacker.getPosY(), attacker.getPosZ(), SoundEvents.ENTITY_PLAYER_ATTACK_SWEEP, attacker.getSoundCategory(), 1.0F, 1.0F); + } + + if (noDamageHit) + { + attacker.world.playSound((PlayerEntity) null, attacker.getPosX(), attacker.getPosY(), attacker.getPosZ(), SoundEvents.ENTITY_PLAYER_ATTACK_NODAMAGE, attacker.getSoundCategory(), 1.0F, 1.0F); + } + + if (strongAttackHit) + { + attacker.world.playSound((PlayerEntity) null, attacker.getPosX(), attacker.getPosY(), attacker.getPosZ(), SoundEvents.ENTITY_PLAYER_ATTACK_STRONG, attacker.getSoundCategory(), 1.0F, 1.0F); + } + if (weakAttackHit) + { + attacker.world.playSound((PlayerEntity) null, attacker.getPosX(), attacker.getPosY(), attacker.getPosZ(), SoundEvents.ENTITY_PLAYER_ATTACK_WEAK, attacker.getSoundCategory(), 1.0F, 1.0F); + } + } + + public void applyEffectToEntity(EnumDemonWillType type, int willBracket, LivingEntity target, PlayerEntity attacker) + { + switch (type) + { + case CORROSIVE: + target.addPotionEffect(new EffectInstance(Effects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); + break; + case DEFAULT: + break; + case DESTRUCTIVE: + break; + case STEADFAST: + if (!target.isAlive()) + { + float absorption = attacker.getAbsorptionAmount(); + attacker.addPotionEffect(new EffectInstance(Effects.ABSORPTION, absorptionTime[willBracket], 127, true, false)); + attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); + } + break; + case VENGEFUL: + break; + } + } + + @Override + public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) + { + stack.damageItem(1, attacker, (entity) -> { + entity.sendBreakAnimation(EquipmentSlotType.MAINHAND); + }); + +// if (super.hitEntity(stack, target, attacker)) +// { + if (attacker instanceof PlayerEntity) + { + UUID id = attacker.getUniqueID(); + + PlayerEntity attackerPlayer = (PlayerEntity) attacker; + +// System.out.println("Hit map: " + hitMap.containsKey(id)); + + if (hitMap.containsKey(id) && hitMap.get(id)) + { + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + applyEffectToEntity(type, willBracket, target, attackerPlayer); + } else + { + this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + hitMap.put(id, true); + this.attackEntitiesInAreaExcludingEntity(stack, attackerPlayer, type, willBracket, target); + hitMap.remove(id); + } + } + + return true; +// } + +// return false; + } + + @Override + public EnumDemonWillType getCurrentType(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + return EnumDemonWillType.DEFAULT; + } + + return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + + public void setCurrentType(ItemStack stack, EnumDemonWillType type) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putString(Constants.NBT.WILL_TYPE, type.toString()); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + recalculatePowers(player.getHeldItem(hand), world, player); + + return super.onItemRightClick(world, player, hand); + } + + @Override + public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) + { + return oldStack.getItem() != newStack.getItem(); + } + + private int getLevel(ItemStack stack, double soulsRemaining) + { + int lvl = -1; + for (int i = 0; i < soulBracket.length; i++) + { + if (soulsRemaining >= soulBracket[i]) + { + lvl = i; + } + } + + return lvl; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientAxe.desc").mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, PlayerEntity player, Entity entity) + { + recalculatePowers(stack, player.getEntityWorld(), player); + + double drain = this.getDrainOfActivatedSword(stack); + if (drain > 0) + { + EnumDemonWillType type = getCurrentType(stack); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + + if (drain > soulsRemaining) + { + return false; + } else + { + PlayerDemonWillHandler.consumeDemonWill(type, player, drain); + } + } + + return super.onLeftClickEntity(stack, player, entity); + } + + @Override + public List getRandomDemonWillDrop(LivingEntity killedEntity, LivingEntity attackingEntity, ItemStack stack, int looting) + { + List soulList = new ArrayList<>(); + + if (killedEntity.getEntityWorld().getDifficulty() != Difficulty.PEACEFUL && !(killedEntity instanceof IMob)) + { + return soulList; + } + + double willModifier = killedEntity instanceof SlimeEntity ? 0.67 : 1; + + IDemonWill soul; + + EnumDemonWillType type = this.getCurrentType(stack); + switch (type) + { + case CORROSIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_CORROSIVE.get()); + break; + case DESTRUCTIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_DESTRUCTIVE.get()); + break; + case STEADFAST: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_STEADFAST.get()); + break; + case VENGEFUL: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_VENGEFUL.get()); + break; + default: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_RAW.get()); + break; + } + + for (int i = 0; i <= looting; i++) + { + if (i == 0 || attackingEntity.getEntityWorld().rand.nextDouble() < 0.4) + { + ItemStack soulStack = soul.createWill(willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.getEntityWorld().rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); + soulList.add(soulStack); + } + } + + return soulList; + } + + // TODO: Change attack speed. + @Override + public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + { + Multimap multimap = HashMultimap.create(); + if (slot == EquipmentSlotType.MAINHAND) + { + multimap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.ATTACK_SPEED, new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MAX_HEALTH, new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MOVEMENT_SPEED, new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + } + + return multimap; + } + + public double getDamageOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); + } + + public void setDamageOfActivatedSword(ItemStack stack, double damage) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); + } + + public double getDrainOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); + } + + public void setDrainOfActivatedSword(ItemStack stack, double drain) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); + } + + public double getStaticDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); + } + + public void setStaticDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); + } + + public double getDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); + } + + public void setDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop); + } + + public double getHealthBonusOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); + } + + public void setHealthBonusOfSword(ItemStack stack, double hp) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); + } + + public double getAttackSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); + } + + public void setAttackSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); + } + + public double getSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); + } + + public void setSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); + } + + public double getDigSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); + } + + public void setDigSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemSigil.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemSigil.java new file mode 100644 index 00000000..f609305f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemSigil.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.common.item.sigil.ISigil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; + +/** + * Base class for all (static) sigils. + */ +public class ItemSigil extends Item implements IBindable, ISigil +{ + private int lpUsed; + + public ItemSigil(Properties prop, int lpUsed) + { + super(prop); + + this.lpUsed = lpUsed; + } + + public boolean isUnusable(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + return stack.getTag().getBoolean(Constants.NBT.UNUSABLE); + } + + public ItemStack setUnusable(ItemStack stack, boolean unusable) + { + NBTHelper.checkNBT(stack); + + stack.getTag().putBoolean(Constants.NBT.UNUSABLE, unusable); + return stack; + } + + public int getLpUsed() + { + return lpUsed; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + Binding binding = getBinding(stack); + if (binding != null) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName())); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemThrowingDagger.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemThrowingDagger.java new file mode 100644 index 00000000..38370400 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemThrowingDagger.java @@ -0,0 +1,117 @@ +package wayoftime.bloodmagic.common.item; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.entity.projectile.AbstractEntityThrowingDagger; +import wayoftime.bloodmagic.entity.projectile.EntityThrowingDagger; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemThrowingDagger extends Item +{ + public static int[] soulBracket = new int[] { 1, 60, 200, 400, 1000, 2000, 4000 }; + + public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13, 15, 18 }; + public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3, 4, 4 }; + + public ItemThrowingDagger() + { + super(new Item.Properties().maxStackSize(64).group(BloodMagic.TAB)); + +// setTranslationKey(BloodMagic.MODID + ".soulSnare."); +// setCreativeTab(BloodMagic.TAB_BM); +// setHasSubtypes(true); +// setMaxStackSize(16); + } + + @Override + public ActionResult onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand) + { + ItemStack stack = playerIn.getHeldItem(hand); + if (!playerIn.isCreative()) + { + stack.shrink(1); + } + playerIn.getCooldownTracker().setCooldown(this, 50); + + worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F)); + + if (!worldIn.isRemote) + { +// System.out.println("Attempting to spawn"); +// EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn); +// snare.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); +// worldIn.addEntity(snare); + EnumDemonWillType largestType = PlayerDemonWillHandler.getLargestWillType(playerIn); + double souls = PlayerDemonWillHandler.getTotalDemonWill(largestType, playerIn); + + ItemStack copyStack = stack.copy(); + copyStack.setCount(1); + AbstractEntityThrowingDagger dagger = getDagger(copyStack, worldIn, playerIn); + + int level = getLevel(souls); + if (level >= 0) + { + double willDrop = (soulDrop[level] * worldIn.rand.nextDouble() + staticDrop[level]); + dagger.setWillDrop(willDrop); + dagger.setWillType(largestType); + } + + worldIn.addEntity(dagger); +// +// SnowballEntity snowballentity = new SnowballEntity(worldIn, playerIn); +// snowballentity.setItem(itemstack); +// snowballentity.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); +// worldIn.addEntity(snowballentity); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } + + public AbstractEntityThrowingDagger getDagger(ItemStack stack, World world, PlayerEntity player) + { + AbstractEntityThrowingDagger dagger = new EntityThrowingDagger(stack, world, player); + dagger.func_234612_a_(player, player.rotationPitch, player.rotationYaw, 0.0F, 3F, 0.5F); + dagger.setDamage(10); + return dagger; + } + + private int getLevel(double soulsRemaining) + { + int lvl = -1; + for (int i = 0; i < soulBracket.length; i++) + { + if (soulsRemaining >= soulBracket[i]) + { + lvl = i; + } + } + + return lvl; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.throwing_dagger.desc").mergeStyle(TextFormatting.ITALIC).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemThrowingDaggerSyringe.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemThrowingDaggerSyringe.java new file mode 100644 index 00000000..c9384df8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemThrowingDaggerSyringe.java @@ -0,0 +1,19 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import wayoftime.bloodmagic.entity.projectile.AbstractEntityThrowingDagger; +import wayoftime.bloodmagic.entity.projectile.EntityThrowingDaggerSyringe; + +public class ItemThrowingDaggerSyringe extends ItemThrowingDagger +{ + @Override + public AbstractEntityThrowingDagger getDagger(ItemStack stack, World world, PlayerEntity player) + { + AbstractEntityThrowingDagger dagger = new EntityThrowingDaggerSyringe(stack, world, player); + dagger.func_234612_a_(player, player.rotationPitch, player.rotationYaw, 0.0F, 3F, 0.5F); + dagger.setDamage(8); + return dagger; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/arc/IARCTool.java b/src/main/java/wayoftime/bloodmagic/common/item/arc/IARCTool.java new file mode 100644 index 00000000..f4c094ba --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/arc/IARCTool.java @@ -0,0 +1,19 @@ +package wayoftime.bloodmagic.common.item.arc; + +import net.minecraft.item.ItemStack; + +/** + * Interface for items that affect ARC operation + */ +public interface IARCTool +{ + default double getCraftingSpeedMultiplier(ItemStack stack) + { + return 1; + } + + default double getAdditionalOutputChanceMultiplier(ItemStack stack) + { + return 1; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/arc/ItemARCToolBase.java b/src/main/java/wayoftime/bloodmagic/common/item/arc/ItemARCToolBase.java new file mode 100644 index 00000000..7867c6b5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/arc/ItemARCToolBase.java @@ -0,0 +1,57 @@ +package wayoftime.bloodmagic.common.item.arc; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.ChatUtil; + +public class ItemARCToolBase extends Item implements IARCTool +{ + private final double craftingMultiplier; + private final double additionalOutputChance; + + public ItemARCToolBase(int maxDamage, double craftingMultiplier) + { + this(maxDamage, craftingMultiplier, 1); + } + + public ItemARCToolBase(int maxDamage, double craftingMultiplier, double additionalOutputChance) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB).maxDamage(maxDamage)); + this.craftingMultiplier = craftingMultiplier; + this.additionalOutputChance = additionalOutputChance; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arctool.uses", stack.getMaxDamage() - stack.getDamage()).mergeStyle(TextFormatting.GRAY)); + + if (getAdditionalOutputChanceMultiplier(stack) != 1) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arctool.additionaldrops", ChatUtil.DECIMAL_FORMAT.format(getAdditionalOutputChanceMultiplier(stack))).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } + + @Override + public double getCraftingSpeedMultiplier(ItemStack stack) + { + return craftingMultiplier; + } + + @Override + public double getAdditionalOutputChanceMultiplier(ItemStack stack) + { + return additionalOutputChance; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockAlchemyTable.java b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockAlchemyTable.java new file mode 100644 index 00000000..ee0aed2e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockAlchemyTable.java @@ -0,0 +1,96 @@ +package wayoftime.bloodmagic.common.item.block; + +import net.minecraft.advancements.CriteriaTriggers; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.SoundType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.common.block.BlockAlchemyTable; +import wayoftime.bloodmagic.tile.TileAlchemyTable; + +public class ItemBlockAlchemyTable extends BlockItem +{ + public ItemBlockAlchemyTable(Block block, Properties properties) + { + super(block, properties); + } + + @Override + public ActionResultType tryPlace(BlockItemUseContext context) + { +// PlayerEntity player = context.getPlayer() +// float yaw = player.rotationYaw; + Direction direction = context.getPlacementHorizontalFacing(); + PlayerEntity player = context.getPlayer(); + + if (direction.getYOffset() != 0) + { + return ActionResultType.FAIL; + } + + World world = context.getWorld(); + BlockPos pos = context.getPos(); + + if (!world.isAirBlock(pos.offset(direction))) + { + return ActionResultType.FAIL; + } + + BlockState thisState = this.getBlock().getDefaultState().with(BlockAlchemyTable.DIRECTION, direction).with(BlockAlchemyTable.INVISIBLE, false); + BlockState newState = this.getBlock().getDefaultState().with(BlockAlchemyTable.DIRECTION, direction).with(BlockAlchemyTable.INVISIBLE, true); + + if (!this.canPlace(context, thisState) || !world.setBlockState(pos.offset(direction), newState, 3)) + { + return ActionResultType.FAIL; + } + + if (!world.setBlockState(pos, thisState, 3)) + { + return ActionResultType.FAIL; + } + + BlockState state = world.getBlockState(pos); + if (state.getBlock() == this.getBlock()) + { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileAlchemyTable) + { + ((TileAlchemyTable) tile).setInitialTableParameters(direction, false, pos.offset(direction)); + } + + TileEntity slaveTile = world.getTileEntity(pos.offset(direction)); + if (slaveTile instanceof TileAlchemyTable) + { + ((TileAlchemyTable) slaveTile).setInitialTableParameters(direction, true, pos); + } + + setTileEntityNBT(world, context.getPlayer(), pos, context.getItem()); + this.getBlock().onBlockPlacedBy(world, pos, state, context.getPlayer(), context.getItem()); + if (player instanceof ServerPlayerEntity) + { + CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayerEntity) player, pos, context.getItem()); + } + } + + SoundType soundtype = state.getSoundType(world, pos, context.getPlayer()); + world.playSound(player, pos, this.getPlaceSound(state, world, pos, context.getPlayer()), SoundCategory.BLOCKS, (soundtype.getVolume() + + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); + if (player == null || !player.abilities.isCreativeMode) + { + context.getItem().shrink(1); + } + + return ActionResultType.func_233537_a_(world.isRemote); + +// return ActionResultType.SUCCESS; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockMimic.java b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockMimic.java new file mode 100644 index 00000000..3123a5f9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockMimic.java @@ -0,0 +1,139 @@ +package wayoftime.bloodmagic.common.item.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.SoundType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ChestTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.tile.TileMimic; + +public class ItemBlockMimic extends BlockItem +{ + public ItemBlockMimic(Block block, Properties prop) + { + super(block, prop); + } + + @Override + public ActionResultType tryPlace(BlockItemUseContext context) + { + PlayerEntity player = context.getPlayer(); + ItemStack stack = player.getHeldItem(context.getHand()); + + // If not sneaking, do normal item use + if (!player.isSneaking()) + { + return super.tryPlace(context); + } + + BlockPos pos = context.getPos().offset(context.getFace().getOpposite()); + World world = context.getWorld(); + Direction direction = context.getFace(); + + // IF sneaking and player has permission, replace the targeted block + if (player.canPlayerEdit(pos, direction, stack)) + { + // Store information about the block being replaced and its appropriate + // itemstack + BlockState replacedBlockstate = world.getBlockState(pos); + Block replacedBlock = replacedBlockstate.getBlock(); + ItemStack replacedStack = replacedBlock.getItem(world, pos, replacedBlockstate); + + // Get the state for the mimic + BlockState mimicBlockstate = this.getBlock().getDefaultState(); + + // Check if the block can be replaced + + if (!canReplaceBlock(world, pos, replacedBlockstate)) + { + return super.tryPlace(context); + } + + // Check if the tile entity, if any, can be replaced + TileEntity tileReplaced = world.getTileEntity(pos); + if (!canReplaceTile(tileReplaced)) + { + return ActionResultType.FAIL; + } + + // If tile can be replaced, store info about the tile + CompoundNBT tileTag = getTagFromTileEntity(tileReplaced); + if (tileReplaced != null) + { + CompoundNBT voidTag = new CompoundNBT(); + voidTag.putInt("x", pos.getX()); + voidTag.putInt("y", pos.getY()); + voidTag.putInt("z", pos.getZ()); + tileReplaced.deserializeNBT(voidTag); + } + + // Remove one item from stack + stack.shrink(1); + + // Replace the block + world.setBlockState(pos, mimicBlockstate, 3); + // Make placing sound + SoundType soundtype = mimicBlockstate.getSoundType(world, pos, context.getPlayer()); + world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); + + // Replace the tile entity + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileMimic) + { + TileMimic mimic = (TileMimic) tile; + mimic.tileTag = tileTag; +// mimic.setReplacedState(replacedBlockstate); + mimic.setMimic(replacedBlockstate); + mimic.setInventorySlotContents(0, replacedStack); + mimic.refreshTileEntity(); + + if (player.isCreative()) + { + mimic.dropItemsOnBreak = false; + } + } + return ActionResultType.SUCCESS; + } + + return ActionResultType.FAIL; + + } + + public boolean canReplaceTile(TileEntity tile) + { + if (tile instanceof ChestTileEntity) + { + return true; + } + + return tile == null; + } + + public boolean canReplaceBlock(World world, BlockPos pos, BlockState state) + { + return state.getBlockHardness(world, pos) != -1.0F; + } + + public CompoundNBT getTagFromTileEntity(TileEntity tile) + { + CompoundNBT tag = new CompoundNBT(); + + if (tile != null) + { + return tile.write(tag); + } + + return tag; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockShapedCharge.java b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockShapedCharge.java new file mode 100644 index 00000000..1069a834 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockShapedCharge.java @@ -0,0 +1,71 @@ +package wayoftime.bloodmagic.common.item.block; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.world.World; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge; +import wayoftime.bloodmagic.tile.TileExplosiveCharge; + +public class ItemBlockShapedCharge extends BlockItem +{ + public ItemBlockShapedCharge(Block blockIn, Properties builder) + { + super(blockIn, builder); + } + + @Override + public ActionResult onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand) + { + ItemStack stack = playerIn.getHeldItem(hand); + if (!playerIn.isCreative()) + { + stack.shrink(1); + } + + worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F)); + + if (!worldIn.isRemote) + { +// EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn); + EntityShapedCharge charge = new EntityShapedCharge(worldIn, this.getBlock(), playerIn); + charge.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); + charge.setAnointmentHolder(AnointmentHolder.fromItemStack(stack)); + worldIn.addEntity(charge); +// +// SnowballEntity snowballentity = new SnowballEntity(worldIn, playerIn); +// snowballentity.setItem(itemstack); +// snowballentity.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); +// worldIn.addEntity(snowballentity); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } + + @Override + public ActionResultType tryPlace(BlockItemUseContext context) + { + ActionResultType result = super.tryPlace(context); + + AnointmentHolder holder = AnointmentHolder.fromItemStack(context.getItem()); + if (holder != null) + { + TileEntity tile = context.getWorld().getTileEntity(context.getPos()); + if (tile instanceof TileExplosiveCharge) + { + ((TileExplosiveCharge) tile).setAnointmentHolder(holder); + } + } + + return result; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/inventory/ContainerHolding.java b/src/main/java/wayoftime/bloodmagic/common/item/inventory/ContainerHolding.java new file mode 100644 index 00000000..3e207e89 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/inventory/ContainerHolding.java @@ -0,0 +1,202 @@ +package wayoftime.bloodmagic.common.item.inventory; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraftforge.fml.common.thread.EffectiveSide; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.sigil.ISigil; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; + +public class ContainerHolding extends Container +{ + public final InventoryHolding inventoryHolding; + private final int PLAYER_INVENTORY_ROWS = 3; + private final int PLAYER_INVENTORY_COLUMNS = 9; + private final PlayerEntity player; + + public ContainerHolding(int windowId, PlayerInventory playerInventory, PacketBuffer extraData) + { + this(windowId, playerInventory.player, playerInventory, new InventoryHolding(extraData.readItemStack())); + } + + public ContainerHolding(int windowId, PlayerEntity player, PlayerInventory playerInventory, InventoryHolding inventoryHolding) + { + super(BloodMagicBlocks.HOLDING_CONTAINER.get(), windowId); + this.player = player; + this.inventoryHolding = inventoryHolding; + int currentSlotHeldIn = player.inventory.currentItem; + this.setup(playerInventory, currentSlotHeldIn); + } + + public void setup(PlayerInventory inventory, int currentSlotHeldIn) + { + for (int columnIndex = 0; columnIndex < ItemSigilHolding.inventorySize; ++columnIndex) + { + this.addSlot(new SlotHolding(this, inventoryHolding, player, columnIndex, 8 + columnIndex * 36, 17)); + } + + for (int rowIndex = 0; rowIndex < PLAYER_INVENTORY_ROWS; ++rowIndex) + { + for (int columnIndex = 0; columnIndex < PLAYER_INVENTORY_COLUMNS; ++columnIndex) + { + this.addSlot(new Slot(player.inventory, columnIndex + rowIndex * 9 + 9, 8 + columnIndex * 18, 41 + rowIndex * 18)); + } + } + + for (int actionBarIndex = 0; actionBarIndex < PLAYER_INVENTORY_COLUMNS; ++actionBarIndex) + { + if (actionBarIndex == currentSlotHeldIn) + { + this.addSlot(new SlotDisabled(player.inventory, actionBarIndex, 8 + actionBarIndex * 18, 99)); + } else + { + this.addSlot(new Slot(player.inventory, actionBarIndex, 8 + actionBarIndex * 18, 99)); + } + } + } + + @Override + public boolean canInteractWith(PlayerEntity entityPlayer) + { + return true; + } + + @Override + public void onContainerClosed(PlayerEntity entityPlayer) + { + super.onContainerClosed(entityPlayer); + + if (!entityPlayer.getEntityWorld().isRemote) + { + saveInventory(entityPlayer); + } + } + + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + if (!player.getEntityWorld().isRemote) + { + saveInventory(player); + } + } + + @Override + public ItemStack transferStackInSlot(PlayerEntity entityPlayer, int slotIndex) + { + ItemStack stack = ItemStack.EMPTY; + Slot slotObject = inventorySlots.get(slotIndex); + int slots = inventorySlots.size(); + + if (slotObject != null && slotObject.getHasStack()) + { + ItemStack stackInSlot = slotObject.getStack(); + stack = stackInSlot.copy(); + + if (stack.getItem() instanceof ISigil) + { + if (slotIndex < ItemSigilHolding.inventorySize) + { + if (!this.mergeItemStack(stackInSlot, ItemSigilHolding.inventorySize, slots, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(stackInSlot, 0, ItemSigilHolding.inventorySize, false)) + { + return ItemStack.EMPTY; + } + } else if (stack.getItem() instanceof ItemSigilHolding) + { + if (slotIndex < ItemSigilHolding.inventorySize + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS)) + { + if (!this.mergeItemStack(stackInSlot, ItemSigilHolding.inventorySize + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), inventorySlots.size(), false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(stackInSlot, ItemSigilHolding.inventorySize, ItemSigilHolding.inventorySize + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), false)) + { + return ItemStack.EMPTY; + } + } + + if (stackInSlot.isEmpty()) + { + slotObject.putStack(ItemStack.EMPTY); + } else + { + slotObject.onSlotChanged(); + } + + if (stackInSlot.getCount() == stack.getCount()) + { + return ItemStack.EMPTY; + } + + slotObject.onTake(player, stackInSlot); + } + + return stack; + } + + public void saveInventory(PlayerEntity entityPlayer) + { + inventoryHolding.onGuiSaved(entityPlayer); + } + + private class SlotHolding extends Slot + { + private final PlayerEntity player; + private ContainerHolding containerHolding; + + public SlotHolding(ContainerHolding containerHolding, IInventory inventory, PlayerEntity player, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + this.player = player; + this.containerHolding = containerHolding; + } + + @Override + public void onSlotChanged() + { + super.onSlotChanged(); + + if (EffectiveSide.get().isServer()) + { + containerHolding.saveInventory(player); + } + } + + @Override + public boolean isItemValid(ItemStack itemStack) + { + return itemStack.getItem() instanceof ISigil && !(itemStack.getItem() instanceof ItemSigilHolding); + } + } + + private class SlotDisabled extends Slot + { + public SlotDisabled(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack itemStack) + { + return false; + } + + @Override + public boolean canTakeStack(PlayerEntity player) + { + return false; + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/inventory/InventoryHolding.java b/src/main/java/wayoftime/bloodmagic/common/item/inventory/InventoryHolding.java new file mode 100644 index 00000000..218cd152 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/inventory/InventoryHolding.java @@ -0,0 +1,82 @@ +package wayoftime.bloodmagic.common.item.inventory; + +import java.util.UUID; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import wayoftime.bloodmagic.common.item.sigil.ISigil; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.Utils; + +public class InventoryHolding extends ItemInventory +{ +// protected ItemStack[] inventory; + + public InventoryHolding(ItemStack itemStack) + { + super(itemStack, ItemSigilHolding.inventorySize, "SigilOfHolding"); + } + + public void onGuiSaved(PlayerEntity entityPlayer) + { + masterStack = findParentStack(entityPlayer); + + if (!masterStack.isEmpty()) + { + save(); + } + } + + public ItemStack findParentStack(PlayerEntity entityPlayer) + { + if (Utils.hasUUID(masterStack)) + { + UUID parentStackUUID = new UUID(masterStack.getTag().getLong(Constants.NBT.MOST_SIG), masterStack.getTag().getLong(Constants.NBT.LEAST_SIG)); + for (int i = 0; i < entityPlayer.inventory.getSizeInventory(); i++) + { + ItemStack itemStack = entityPlayer.inventory.getStackInSlot(i); + + if (!itemStack.isEmpty() && Utils.hasUUID(itemStack)) + { + if (itemStack.getTag().getLong(Constants.NBT.MOST_SIG) == parentStackUUID.getMostSignificantBits() && itemStack.getTag().getLong(Constants.NBT.LEAST_SIG) == parentStackUUID.getLeastSignificantBits()) + { + return itemStack; + } + } + } + } + + return ItemStack.EMPTY; + } + + public void save() + { + CompoundNBT nbtTagCompound = masterStack.getTag(); + + if (nbtTagCompound == null) + { + nbtTagCompound = new CompoundNBT(); + + UUID uuid = UUID.randomUUID(); + nbtTagCompound.putLong(Constants.NBT.MOST_SIG, uuid.getMostSignificantBits()); + nbtTagCompound.putLong(Constants.NBT.LEAST_SIG, uuid.getLeastSignificantBits()); + } + + writeToNBT(nbtTagCompound); + masterStack.setTag(nbtTagCompound); + } + + @Override + public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) + { + return itemStack.getItem() instanceof ISigil && !(itemStack.getItem() instanceof ItemSigilHolding); + } + + @Override + public int getInventoryStackLimit() + { + return 1; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/inventory/InventoryWrapper.java b/src/main/java/wayoftime/bloodmagic/common/item/inventory/InventoryWrapper.java new file mode 100644 index 00000000..26adf391 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/inventory/InventoryWrapper.java @@ -0,0 +1,101 @@ +package wayoftime.bloodmagic.common.item.inventory; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; + +public class InventoryWrapper implements IInventory +{ + protected int[] syncedSlots = new int[0]; + protected NonNullList inventory; + private int size; + + public InventoryWrapper(int size) + { + this.inventory = NonNullList.withSize(size, ItemStack.EMPTY); + this.size = size; + } + + @Override + public void clear() + { + this.inventory = NonNullList.withSize(size, ItemStack.EMPTY); + } + + @Override + public int getSizeInventory() + { + return size; + } + + @Override + public boolean isEmpty() + { + for (ItemStack stack : inventory) if (!stack.isEmpty()) + return false; + + return true; + } + + @Override + public ItemStack getStackInSlot(int index) + { + return inventory.get(index); + } + + @Override + public ItemStack decrStackSize(int index, int count) + { + if (!getStackInSlot(index).isEmpty()) + { + if (getStackInSlot(index).getCount() <= count) + { + ItemStack itemStack = inventory.get(index); + inventory.set(index, ItemStack.EMPTY); + markDirty(); + return itemStack; + } + + ItemStack itemStack = inventory.get(index).split(count); + markDirty(); + return itemStack; + } + + return ItemStack.EMPTY; + } + + @Override + public ItemStack removeStackFromSlot(int slot) + { + if (!inventory.get(slot).isEmpty()) + { + ItemStack itemStack = inventory.get(slot); + setInventorySlotContents(slot, ItemStack.EMPTY); + return itemStack; + } + return ItemStack.EMPTY; + } + + @Override + public void setInventorySlotContents(int slot, ItemStack stack) + { + inventory.set(slot, stack); + if (!stack.isEmpty() && stack.getCount() > getInventoryStackLimit()) + stack.setCount(getInventoryStackLimit()); + markDirty(); + } + + @Override + public void markDirty() + { + + } + + @Override + public boolean isUsableByPlayer(PlayerEntity player) + { + return false; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/inventory/ItemInventory.java b/src/main/java/wayoftime/bloodmagic/common/item/inventory/ItemInventory.java new file mode 100644 index 00000000..2b739f8a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/inventory/ItemInventory.java @@ -0,0 +1,252 @@ +package wayoftime.bloodmagic.common.item.inventory; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ItemStackHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.NonNullList; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; + +public class ItemInventory implements IInventory +{ + protected int[] syncedSlots = new int[0]; + protected ItemStack masterStack; + private NonNullList inventory; + private int size; + private String name; + + public ItemInventory(ItemStack masterStack, int size, String name) + { + this.inventory = NonNullList.withSize(size, ItemStack.EMPTY); + this.size = size; + this.name = name; + this.masterStack = masterStack; + + if (!masterStack.isEmpty()) + this.readFromStack(masterStack); + } + + public void initializeInventory(ItemStack masterStack) + { + this.masterStack = masterStack; + this.clear(); + this.readFromStack(masterStack); + } + + private boolean isSyncedSlot(int slot) + { + for (int s : this.syncedSlots) + { + if (s == slot) + { + return true; + } + } + return false; + } + + public void readFromNBT(CompoundNBT tagCompound) + { + this.inventory = NonNullList.withSize(this.getSizeInventory(), ItemStack.EMPTY); + + ItemStackHelper.loadAllItems(tagCompound, this.inventory); + } + + public void writeToNBT(CompoundNBT tagCompound) + { + ItemStackHelper.saveAllItems(tagCompound, this.inventory); +// ListNBT tags = new ListNBT(); +// +// for (int i = 0; i < inventory.size(); i++) +// { +// if ((!inventory.get(i).isEmpty()) && !isSyncedSlot(i)) +// { +// CompoundNBT data = new CompoundNBT(); +// data.putByte(Constants.NBT.SLOT, (byte) i); +// inventory.get(i).write(data); +// tags.add(data); +//// tags.appendTag(data); +// } +// } +// +// tagCompound.put(Constants.NBT.ITEMS, tags); + } + + public void readFromStack(ItemStack masterStack) + { + if (masterStack != null) + { + NBTHelper.checkNBT(masterStack); + CompoundNBT tag = masterStack.getTag(); + readFromNBT(tag.getCompound(Constants.NBT.ITEM_INVENTORY)); + } + } + + public void writeToStack(ItemStack masterStack) + { + if (masterStack != null) + { + NBTHelper.checkNBT(masterStack); + CompoundNBT tag = masterStack.getTag(); + CompoundNBT invTag = new CompoundNBT(); + writeToNBT(invTag); + tag.put(Constants.NBT.ITEM_INVENTORY, invTag); + } + } + + @Override + public int getSizeInventory() + { + return size; + } + + @Override + public ItemStack getStackInSlot(int index) + { + return inventory.get(index); + } + + @Override + public ItemStack decrStackSize(int index, int count) + { + if (!inventory.get(index).isEmpty()) + { +// if (!worldObj.isRemote) +// worldObj.markBlockForUpdate(this.pos); + + if (inventory.get(index).getCount() <= count) + { + ItemStack itemStack = inventory.get(index); + inventory.set(index, ItemStack.EMPTY); + markDirty(); + return itemStack; + } + + ItemStack itemStack = inventory.get(index).split(count); + if (inventory.get(index).isEmpty()) + inventory.set(index, ItemStack.EMPTY); + + markDirty(); + return itemStack; + } + + return null; + } + + @Override + public ItemStack removeStackFromSlot(int slot) + { + if (!inventory.get(slot).isEmpty()) + { + ItemStack itemStack = inventory.get(slot); + setInventorySlotContents(slot, ItemStack.EMPTY); + return itemStack; + } + return ItemStack.EMPTY; + } + + @Override + public void setInventorySlotContents(int slot, ItemStack stack) + { + inventory.set(slot, stack); + if (stack.getCount() > getInventoryStackLimit()) + stack.setCount(getInventoryStackLimit()); + markDirty(); +// if (!worldObj.isRemote) +// worldObj.markBlockForUpdate(this.pos); + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + @Override + public boolean isUsableByPlayer(PlayerEntity player) + { + return true; + } + + @Override + public void openInventory(PlayerEntity player) + { + + } + + @Override + public void closeInventory(PlayerEntity player) + { + + } + + @Override + public boolean isItemValidForSlot(int index, ItemStack stack) + { + return true; + } + +// @Override +// public int getField(int id) +// { +// return 0; +// } +// +// @Override +// public void setField(int id, int value) +// { +// +// } +// +// @Override +// public int getFieldCount() +// { +// return 0; +// } + + @Override + public void clear() + { + this.inventory = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY); + } + +// @Override +// public String getName() +// { +// return name; +// } +// +// @Override +// public boolean hasCustomName() +// { +// return false; +// } +// +// @Override +// public ITextComponent getDisplayName() +// { +// return new StringTextComponent(getName()); +// } + + @Override + public void markDirty() + { + if (masterStack != null) + { + this.writeToStack(masterStack); + } + } + + @Override + public boolean isEmpty() + { + return false; + } + + public boolean canInventoryBeManipulated() + { + return masterStack != null; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ISigil.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ISigil.java new file mode 100644 index 00000000..b438154b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ISigil.java @@ -0,0 +1,30 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +/** + * Used for all ItemSigils EXCEPT for Sigils of Holding. + */ +public interface ISigil +{ + default boolean performArrayEffect(World world, BlockPos pos) + { + return false; + } + + default boolean hasArrayEffect() + { + return false; + } + + interface Holding + { + @Nonnull + ItemStack getHeldItem(ItemStack holdingStack, PlayerEntity player); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilAir.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilAir.java new file mode 100644 index 00000000..3fca97f4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilAir.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilAir extends ItemSigilBase +{ + public ItemSigilAir() + { + super("air", 50); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + boolean unusable = isUnusable(stack); + if (world.isRemote && !unusable) + { + Vector3d vec = player.getLookVec(); + double wantedVelocity = 1.7; + + // TODO - Revisit after potions +// if (player.isPotionActive(RegistrarBloodMagic.BOOST)) +// { +// int amplifier = player.getActivePotionEffect(RegistrarBloodMagic.BOOST).getAmplifier(); +// wantedVelocity += (1 + amplifier) * (0.35); +// } + + player.setMotion(vec.x * wantedVelocity, vec.y * wantedVelocity, vec.z * wantedVelocity); + } + + world.playSound(player, player.getPosX(), player.getPosY(), player.getPosZ(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) + * 0.8F); + + if (!world.isRemote) + { + if (!player.isCreative()) + this.setUnusable(stack, !NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()); + + if (!unusable) + player.fallDistance = 0; + } + + return super.onItemRightClick(world, player, hand); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilBase.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilBase.java new file mode 100644 index 00000000..b33d4c1c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilBase.java @@ -0,0 +1,52 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.ItemSigil; + +public class ItemSigilBase extends ItemSigil +{ + protected final String tooltipBase; +// private final String name; + + public ItemSigilBase(String name, int lpUsed) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB), lpUsed); +// super(lpUsed); + +// this.name = name; + this.tooltipBase = "tooltip.bloodmagic.sigil." + name + "."; + } + + public ItemSigilBase(String name) + { + this(name, 0); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC).mergeStyle(TextFormatting.GRAY)); +// if (TextHelper.canTranslate(tooltipBase + "desc")) +// tooltip.addAll(Arrays.asList(WordUtils.wrap(TextHelper.localizeEffect(tooltipBase +// + "desc"), 30, "/cut", false).split("/cut"))); + + super.addInformation(stack, world, tooltip, flag); + } + +// public String getName() +// { +// return name; +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilBloodLight.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilBloodLight.java new file mode 100644 index 00000000..e7245bae --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilBloodLight.java @@ -0,0 +1,103 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.entity.projectile.EntityBloodLight; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilBloodLight extends ItemSigilBase +{ + public ItemSigilBloodLight() + { + super("bloodlight", 10); + } + + @Override + public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) + { + if (getCooldownRemainder(stack) > 0) + reduceCooldown(stack); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + RayTraceResult mop = rayTrace(world, player, RayTraceContext.FluidMode.NONE); + + if (getCooldownRemainder(stack) > 0) + return super.onItemRightClick(world, player, hand); + + if (mop != null && mop.getType() == RayTraceResult.Type.BLOCK) + { + BlockRayTraceResult blockRayTrace = (BlockRayTraceResult) mop; + BlockPos blockPos = blockRayTrace.getPos().offset(blockRayTrace.getFace()); + + if (world.isAirBlock(blockPos)) + { + world.setBlockState(blockPos, BloodMagicBlocks.BLOOD_LIGHT.get().getDefaultState()); + if (!world.isRemote) + { + SoulNetwork network = NetworkHelper.getSoulNetwork(getBinding(stack)); + network.syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())); + } + resetCooldown(stack); + player.swingArm(hand); + return super.onItemRightClick(world, player, hand); + } + } else + { + if (!world.isRemote) + { + SoulNetwork network = NetworkHelper.getSoulNetwork(getBinding(stack)); + EntityBloodLight light = new EntityBloodLight(world, player); + light.func_234612_a_(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F); + world.addEntity(light); + network.syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())); + } + resetCooldown(stack); + } + + return super.onItemRightClick(world, player, hand); + } + + @Override + public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) + { + return oldStack.getItem() != newStack.getItem(); + } + + public int getCooldownRemainder(ItemStack stack) + { + return NBTHelper.checkNBT(stack).getTag().getInt(Constants.NBT.TICKS_REMAINING); + } + + public void reduceCooldown(ItemStack stack) + { + NBTHelper.checkNBT(stack).getTag().putInt(Constants.NBT.TICKS_REMAINING, getCooldownRemainder(stack) - 1); + } + + public void resetCooldown(ItemStack stack) + { + NBTHelper.checkNBT(stack).getTag().putInt(Constants.NBT.TICKS_REMAINING, 10); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilDivination.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilDivination.java new file mode 100644 index 00000000..98591287 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilDivination.java @@ -0,0 +1,118 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import java.util.List; + +import com.google.common.collect.Lists; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceContext.FluidMode; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import wayoftime.bloodmagic.altar.IBloodAltar; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.api.compat.IAltarReader; +import wayoftime.bloodmagic.tile.TileIncenseAltar; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.NumeralHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilDivination extends ItemSigilBase implements IAltarReader +{ + private final boolean isSimple; + + public ItemSigilDivination(boolean simple) + { + super(simple ? "divination" : "seer"); + isSimple = simple; + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + if (!world.isRemote) + { + RayTraceResult position = Item.rayTrace(world, player, FluidMode.NONE); + + if (position == null || position.getType() == RayTraceResult.Type.MISS) + { + super.onItemRightClick(world, player, hand); + + Binding binding = getBinding(stack); + if (isSimple && binding != null) + { + int currentEssence = NetworkHelper.getSoulNetwork(binding).getCurrentEssence(); + List toSend = Lists.newArrayList(); + if (!binding.getOwnerId().equals(player.getGameProfile().getId())) + toSend.add(new TranslationTextComponent(tooltipBase + "otherNetwork", binding.getOwnerName())); + toSend.add(new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence)); + ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()])); + } + } else + { + if (position.getType() == RayTraceResult.Type.BLOCK) + { + TileEntity tile = world.getTileEntity(new BlockPos(position.getHitVec())); + + if (tile != null && tile instanceof IBloodAltar) + { + IBloodAltar altar = (IBloodAltar) tile; + int tier = altar.getTier(); + int currentEssence = altar.getCurrentBlood(); + int capacity = altar.getCapacity(); + altar.checkTier(); + if (isSimple) + { + ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence), new TranslationTextComponent(tooltipBase + "currentAltarCapacity", capacity)); + } else + { + ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence), new TranslationTextComponent(tooltipBase + "currentAltarCapacity", capacity)); + } + } else if (tile != null && tile instanceof TileIncenseAltar) + { + TileIncenseAltar altar = (TileIncenseAltar) tile; + altar.recheckConstruction(); + double tranquility = altar.tranquility; + ChatUtil.sendNoSpam(player, new TranslationTextComponent(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TranslationTextComponent(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition))); + } +// else if (tile != null && tile instanceof TileInversionPillar) +// { +// TileInversionPillar pillar = (TileInversionPillar) tile; +// double inversion = pillar.getCurrentInversion(); +// ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentInversion", ((int) (10 * inversion)) / 10d)); +// } + else + { + Binding binding = getBinding(stack); + if (binding != null) + { + int currentEssence = NetworkHelper.getSoulNetwork(binding).getCurrentEssence(); + List toSend = Lists.newArrayList(); + if (!binding.getOwnerId().equals(player.getGameProfile().getId())) + toSend.add(new TranslationTextComponent(tooltipBase + "otherNetwork", binding.getOwnerName())); + toSend.add(new TranslationTextComponent(tooltipBase + "currentEssence", currentEssence)); + ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()])); + } + } + } + } + + } + + return super.onItemRightClick(world, player, hand); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFastMiner.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFastMiner.java new file mode 100644 index 00000000..5caaab09 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFastMiner.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import java.util.List; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilFastMiner extends ItemSigilToggleableBase +{ + public ItemSigilFastMiner() + { + super("fast_miner", 100); + } + + @Override + public void onSigilUpdate(ItemStack stack, World world, PlayerEntity player, int itemSlot, boolean isSelected) + { + if (PlayerHelper.isFakePlayer(player)) + return; + player.addPotionEffect(new EffectInstance(Effects.HASTE, 2, 0, true, false)); + } + + @Override + public boolean performArrayEffect(World world, BlockPos pos) + { + double radius = 10; + int ticks = 600; + int potionPotency = 2; + + AxisAlignedBB bb = new AxisAlignedBB(pos).grow(radius); + List playerList = world.getEntitiesWithinAABB(PlayerEntity.class, bb); + for (PlayerEntity player : playerList) + { + if (!player.isPotionActive(Effects.HASTE) || (player.isPotionActive(Effects.HASTE) + && player.getActivePotionEffect(Effects.HASTE).getAmplifier() < potionPotency)) + { + player.addPotionEffect(new EffectInstance(Effects.HASTE, ticks, potionPotency)); + if (!player.isCreative()) + { + player.hurtResistantTime = 0; + player.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F); + } + } + } + + return false; + } + + @Override + public boolean hasArrayEffect() + { + return true; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFluidBase.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFluidBase.java new file mode 100644 index 00000000..4a9319e9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFluidBase.java @@ -0,0 +1,149 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidUtil; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; +import net.minecraftforge.fluids.capability.wrappers.BlockWrapper; + +public abstract class ItemSigilFluidBase extends ItemSigilBase +{ + // Class for sigils that interact with fluids, either creating or deleting them. + // Sigils still have to define their own onRightClick behavior, but the actual + // fluid-interacting code is largely limited to here. + public final FluidStack sigilFluid; + + public ItemSigilFluidBase(String name, int lpUsed, FluidStack fluid) + { + super(name, lpUsed); + sigilFluid = fluid; + } + + public ItemSigilFluidBase(String name, FluidStack fluid) + { + super(name); + sigilFluid = fluid; + } + + public ItemSigilFluidBase(String name) + { + super(name); + sigilFluid = null; + } + + // The following are handler functions for fluids, all genericized. + // They're all based off of the Forge FluidUtil methods, but directly taking the + // sigilFluid constant instead of getting an argument. + + /* + * Gets a fluid handler for the targeted block and siding. Works for both tile + * entity liquid containers and fluid blocks. This one is literally identical to + * the FluidUtil method of the same signature. + */ + @Nullable + protected IFluidHandler getFluidHandler(World world, BlockPos blockPos, @Nullable Direction side) + { + BlockState state = world.getBlockState(blockPos); + Block block = state.getBlock(); + + IFluidHandler targetFluidHandler = FluidUtil.getFluidHandler(world, blockPos, side).orElse(null); + + if (targetFluidHandler == null) + + { + + } + return targetFluidHandler; +// if (block instanceof IFluidBlock) +// return new FluidBlockWrapper((IFluidBlock) block, world, blockPos); +// else if (block instanceof BlockLiquid) +// return new BlockLiquidWrapper((BlockLiquid) block, world, blockPos); +// return null; + } + + /* + * Tries to insert fluid into a fluid handler. If doTransfer is false, only + * simulate the transfer. If true, actually do so. Returns true if the transfer + * is successful, false otherwise. + */ + protected boolean tryInsertSigilFluid(IFluidHandler destination, boolean doTransfer) + { + if (destination == null) + return false; + return destination.fill(sigilFluid, doTransfer ? FluidAction.EXECUTE : FluidAction.SIMULATE) > 0; + } + + /* + * Tries basically the oppostive of the above, removing fluids instead of adding + * them + */ + protected boolean tryRemoveFluid(IFluidHandler source, int amount, boolean doTransfer) + { + if (source == null) + return false; + return source.drain(amount, doTransfer ? FluidAction.EXECUTE : FluidAction.SIMULATE) != null; + } + + /* + * Tries to place a fluid block in the world. Returns true if successful, + * otherwise false. This is the big troublesome one, oddly enough. It's + * genericized in case anyone wants to create variant sigils with weird fluids. + */ + protected boolean tryPlaceSigilFluid(PlayerEntity player, World world, BlockPos blockPos) + { + BlockState state = sigilFluid.getFluid().getAttributes().getBlock(world, blockPos, sigilFluid.getFluid().getDefaultState()); + BlockWrapper wrapper = new BlockWrapper(state, world, blockPos); + return wrapper.fill(sigilFluid, FluidAction.EXECUTE) > 0; +// // Make sure world coordinants are valid +// if (world == null || blockPos == null) +// { +// return false; +// } +// // Make sure fluid is placeable +// Fluid fluid = sigilFluid.getFluid(); +// if (!fluid.getAttributes().canBePlacedInWorld(world, blockPos, sigilFluid)) +// { +// return false; +// } +// +// // Check if the block is an air block or otherwise replaceable +// BlockState state = world.getBlockState(blockPos); +// Material mat = state.getMaterial(); +// boolean isDestSolid = mat.isSolid(); +// boolean isDestReplaceable = state.getBlock().isReplaceable(state, fluid); +// if (!world.isAirBlock(blockPos) && isDestSolid && !isDestReplaceable) +// { +// return false; +// } +// +//// // If the fluid vaporizes, this exists here in the lava sigil solely so the code +//// // is usable for other fluids +//// if (world.provider.doesWaterVaporize() && fluid.doesVaporize(sigilFluid)) +//// { +//// fluid.vaporize(player, world, blockPos, sigilFluid); +//// return true; +//// } +// +// // Finally we've done enough checking to make sure everything at the end is +// // safe, let's place some fluid. +// IFluidHandler handler; +// Block block = fluid.getAttributes().getStateForPlacement(world, blockPos, sigilFluid).getBlockState().getBlock(); +// if (block instanceof IFluidBlock) +// { +// handler = new FluidBlockWrapper((IFluidBlock) block, world, blockPos); +// } else if (block instanceof BlockLiquid) +// handler = new BlockLiquidWrapper((BlockLiquid) block, world, blockPos); +// else +// handler = new BlockWrapper(block, world, blockPos); +// return tryInsertSigilFluid(handler, true); +//// return false; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFrost.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFrost.java new file mode 100644 index 00000000..622a25ed --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilFrost.java @@ -0,0 +1,24 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.enchantment.FrostWalkerEnchantment; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilFrost extends ItemSigilToggleableBase +{ + public ItemSigilFrost() + { + super("frost", 100); + } + + @Override + public void onSigilUpdate(ItemStack stack, World world, PlayerEntity player, int itemSlot, boolean isSelected) + { + if (PlayerHelper.isFakePlayer(player)) + return; + + FrostWalkerEnchantment.freezeNearby(player, world, player.getPosition(), 1); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilGreenGrove.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilGreenGrove.java new file mode 100644 index 00000000..fb71c50e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilGreenGrove.java @@ -0,0 +1,114 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.IGrowable; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilGreenGrove extends ItemSigilToggleableBase +{ + public ItemSigilGreenGrove() + { + super("green_grove", 150); + } + + @Override + public boolean onSigilUse(ItemStack stack, PlayerEntity player, World world, BlockPos blockPos, Direction side, Vector3d vec) + { + if (PlayerHelper.isFakePlayer(player)) + return false; + + if (!world.isRemote && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess() && applyBonemeal(stack, world, blockPos, player)) + { + world.playEvent(2005, blockPos, 0); + return true; + } + + return false; + } + + @Override + public void onSigilUpdate(ItemStack stack, World worldIn, PlayerEntity player, int itemSlot, boolean isSelected) + { + if (PlayerHelper.isFakePlayer(player)) + return; + + int range = 3; + int verticalRange = 2; + int posX = (int) Math.round(player.getPosX() - 0.5f); + int posY = (int) player.getPosY(); + int posZ = (int) Math.round(player.getPosZ() - 0.5f); + if (worldIn instanceof ServerWorld) + { + ServerWorld serverWorld = (ServerWorld) worldIn; + for (int ix = posX - range; ix <= posX + range; ix++) + { + for (int iz = posZ - range; iz <= posZ + range; iz++) + { + for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) + { + BlockPos blockPos = new BlockPos(ix, iy, iz); + BlockState state = worldIn.getBlockState(blockPos); + +// if (!BloodMagicAPI.INSTANCE.getBlacklist().getGreenGrove().contains(state)) + { + if (state.getBlock() instanceof IGrowable && state.getBlock() != Blocks.GRASS_BLOCK) + { + if (worldIn.rand.nextInt(50) == 0) + { + BlockState preBlockState = worldIn.getBlockState(blockPos); + if (((IGrowable) state.getBlock()).canGrow(serverWorld, blockPos, preBlockState, worldIn.isRemote)) + { + ((IGrowable) state.getBlock()).grow(serverWorld, worldIn.rand, blockPos, state); + + BlockState newState = worldIn.getBlockState(blockPos); + if (!newState.equals(preBlockState) && !worldIn.isRemote) + worldIn.playEvent(2005, blockPos, 0); + } + } + } + } + } + } + } + } + + } + + private static boolean applyBonemeal(ItemStack stack, World worldIn, BlockPos pos, PlayerEntity player) + { + BlockState blockstate = worldIn.getBlockState(pos); + int hook = net.minecraftforge.event.ForgeEventFactory.onApplyBonemeal(player, worldIn, pos, blockstate, stack); + if (hook != 0) + return hook > 0; + if (blockstate.getBlock() instanceof IGrowable) + { + IGrowable igrowable = (IGrowable) blockstate.getBlock(); + if (igrowable.canGrow(worldIn, pos, blockstate, worldIn.isRemote)) + { + if (worldIn instanceof ServerWorld) + { + if (igrowable.canUseBonemeal(worldIn, worldIn.rand, pos, blockstate)) + { + igrowable.grow((ServerWorld) worldIn, worldIn.rand, pos, blockstate); + } + + } + + return true; + } + } + + return false; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilHolding.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilHolding.java new file mode 100644 index 00000000..c372b8c7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilHolding.java @@ -0,0 +1,390 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import java.util.List; + +import javax.annotation.Nonnull; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.ItemStackHelper; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.api.compat.IAltarReader; +import wayoftime.bloodmagic.client.key.IKeybindable; +import wayoftime.bloodmagic.client.key.KeyBindings; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.common.item.inventory.ContainerHolding; +import wayoftime.bloodmagic.common.item.inventory.InventoryHolding; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAltarReader, ISigil.Holding, INamedContainerProvider +{ + public static final int inventorySize = 5; + + public ItemSigilHolding() + { + super("holding"); + } + + @Override + public void onKeyPressed(ItemStack stack, PlayerEntity player, KeyBindings key, boolean showInChat) + { + System.out.println("Received key press on server."); + if (stack == player.getHeldItemMainhand() && stack.getItem() instanceof ItemSigilHolding && key.equals(KeyBindings.OPEN_HOLDING)) + { + Utils.setUUID(stack); + + if (player instanceof ServerPlayerEntity) + { + NetworkHooks.openGui((ServerPlayerEntity) player, this, buf -> buf.writeItemStack(stack, false)); + } +// player.openGui(BloodMagic.instance, Constants.Gui.SIGIL_HOLDING_GUI, player.getEntityWorld(), (int) player.posX, (int) player.posY, (int) player.posZ); + } + } + +// @Override +// public String getHighlightTip(ItemStack stack, String displayName) +// { +// List inv = getInternalInventory(stack); +// int currentSlot = getCurrentItemOrdinal(stack); +// ItemStack item = inv.get(currentSlot); +// +// if (item.isEmpty()) +// return displayName; +// else +// return TextHelper.localizeEffect("item.bloodmagic.sigil.holding.display", displayName, item.getDisplayName()); +// } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + super.addInformation(stack, world, tooltip, flag); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.holding.press", new TranslationTextComponent(KeyBindings.OPEN_HOLDING.getKey().getTranslationKey()).mergeStyle(TextFormatting.ITALIC)).mergeStyle(TextFormatting.GRAY)); + + if (!stack.hasTag()) + return; + + List inv = getInternalInventory(stack); + int currentSlot = getCurrentItemOrdinal(stack); + ItemStack item = inv.get(currentSlot); + + for (int i = 0; i < inventorySize; i++) + { + ItemStack invStack = inv.get(i); + if (!invStack.isEmpty()) + if (!item.isEmpty() && invStack == item) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.holding.sigilInSlot", i + 1, (invStack.getDisplayName().copyRaw()).mergeStyle(TextFormatting.ITALIC, TextFormatting.UNDERLINE))); +// tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.holding.sigilInSlot", i + 1, new TranslationTextComponent(invStack.getDisplayName()).mergeStyle(TextFormatting.ITALIC, TextFormatting.UNDERLINE))); + + } else + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.holding.sigilInSlot", i + 1, invStack.getDisplayName())); + } + } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { +// BlockPos pos = context.getPos(); +// Direction facing = context.getFace(); +// pos = pos.offset(facing); + PlayerEntity player = context.getPlayer(); + Hand hand = context.getHand(); + ItemStack stack = player.getHeldItem(hand); + +// ItemStack stack = player.getHeldItem(hand); + if (PlayerHelper.isFakePlayer(player)) + return ActionResultType.FAIL; + + int currentSlot = getCurrentItemOrdinal(stack); + NonNullList inv = getInternalInventory(stack); + ItemStack itemUsing = inv.get(currentSlot); + + if (itemUsing.isEmpty() || ((IBindable) itemUsing.getItem()).getBinding(itemUsing) == null) + return ActionResultType.PASS; + + ActionResultType result = itemUsing.getItem().onItemUse(context); + saveInventory(stack, inv); + + return result; + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + int currentSlot = getCurrentItemOrdinal(stack); + NonNullList inv = getInternalInventory(stack); + ItemStack itemUsing = inv.get(currentSlot); + + if (itemUsing.isEmpty() || ((IBindable) itemUsing.getItem()).getBinding(itemUsing) == null) + return ActionResult.resultPass(stack); + + itemUsing.getItem().onItemRightClick(world, player, hand); + + saveInventory(stack, inv); + + return ActionResult.resultPass(stack); + } + + @Nonnull + @Override + public ItemStack getHeldItem(ItemStack holdingStack, PlayerEntity player) + { + return getInternalInventory(holdingStack).get(getCurrentItemOrdinal(holdingStack)); + } + + public void saveInventory(ItemStack itemStack, NonNullList inventory) + { + CompoundNBT itemTag = itemStack.getTag(); + + if (itemTag == null) + itemStack.setTag(itemTag = new CompoundNBT()); + + ItemStackHelper.saveAllItems(itemTag, inventory); + +// CompoundNBT inventoryTag = new CompoundNBT(); +// ListNBT itemList = new ListNBT(); +// +// for (int i = 0; i < inventorySize; i++) +// { +// if (!inventory.get(i).isEmpty()) +// { +// CompoundNBT tag = new CompoundNBT(); +// tag.putByte(Constants.NBT.SLOT, (byte) i); +// inventory.get(i).writeToNBT(tag); +// itemList.appendTag(tag); +// } +// } +// +// inventoryTag.put(Constants.NBT.ITEMS, itemList); +// itemTag.put(Constants.NBT.ITEM_INVENTORY, inventoryTag); + } + + @Override + public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) + { + if (stack.hasTag()) + tickInternalInventory(stack, world, entity, itemSlot, isSelected); + } + + public void tickInternalInventory(ItemStack itemStack, World world, Entity entity, int itemSlot, boolean isSelected) + { + for (ItemStack stack : getInternalInventory(itemStack)) + { + if (stack.isEmpty() || !(stack.getItem() instanceof IBindable) || !(stack.getItem() instanceof ISigil)) + continue; + + Binding binding = ((IBindable) stack.getItem()).getBinding(stack); + if (binding == null) + continue; + + stack.getItem().inventoryTick(stack, world, entity, itemSlot, isSelected); + } + } + +// @Override +// public void gatherVariants(@Nonnull Int2ObjectMap variants) +// { +// // No-op - Just here to stop the super from running since we're using a mesh +// // provider +// } + +// @Override +// public ItemMeshDefinition getMeshDefinition() +// { +// return stack -> { +// if (stack.hasTag() && stack.getTag().hasKey("color")) +// return new ModelResourceLocation(getRegistryName(), "type=color"); +// return new ModelResourceLocation(getRegistryName(), "type=normal"); +// }; +// } +// +// @Override +// public void gatherVariants(Consumer variants) +// { +// variants.accept("type=normal"); +// variants.accept("type=color"); +// } + + public static int next(int mode) + { + int index = mode + 1; + + if (index >= inventorySize) + { + index = 0; + } + + return index; + } + + public static int prev(int mode) + { + int index = mode - 1; + + if (index < 0) + { + index = inventorySize; + } + + return index; + } + + private static void initModeTag(ItemStack stack) + { + if (!stack.hasTag()) + { + stack = NBTHelper.checkNBT(stack); + stack.getTag().putInt(Constants.NBT.CURRENT_SIGIL, inventorySize); + } + } + + public static ItemStack getItemStackInSlot(ItemStack itemStack, int slot) + { + if (itemStack.getItem() instanceof ItemSigilHolding) + { + List inv = getInternalInventory(itemStack); + if (inv != null) + return inv.get(slot == 5 ? 4 : slot); + else + return ItemStack.EMPTY; + } + + return ItemStack.EMPTY; + } + + public static int getCurrentItemOrdinal(ItemStack stack) + { + if (stack.getItem() instanceof ItemSigilHolding) + { + initModeTag(stack); + int currentSigil = stack.getTag().getInt(Constants.NBT.CURRENT_SIGIL); + currentSigil = MathHelper.clamp(currentSigil, 0, inventorySize - 1); + return currentSigil; + } + + return 0; + } + + public static NonNullList getInternalInventory(ItemStack stack) + { + initModeTag(stack); + CompoundNBT tagCompound = stack.getTag(); + + if (tagCompound == null) + { + return NonNullList.withSize(inventorySize, ItemStack.EMPTY); + } + + NonNullList inv = NonNullList.withSize(inventorySize, ItemStack.EMPTY); + + ItemStackHelper.loadAllItems(tagCompound, inv); + +// CompoundNBT inventoryTag = tagCompound.getCompound(Constants.NBT.ITEM_INVENTORY); +// ListNBT tagList = inventoryTag.getList(Constants.NBT.ITEMS, 10); +// +// if (tagList.isEmpty()) +// { +// return NonNullList.withSize(inventorySize, ItemStack.EMPTY); +// } +// +// List inv = NonNullList.withSize(inventorySize, ItemStack.EMPTY); +// +// for (int i = 0; i < tagList.tagCount(); i++) +// { +// CompoundNBT data = tagList.getCompoundTagAt(i); +// byte j = data.getByte(Constants.NBT.SLOT); +// +// if (j >= 0 && j < inv.size()) +// { +// inv.set(j, new ItemStack(data)); +// } +// } + + return inv; + } + + public static void cycleToNextSigil(ItemStack itemStack, int mode) + { + if (itemStack.getItem() instanceof ItemSigilHolding) + { + initModeTag(itemStack); + + int index = mode; + if (mode == 120 || mode == -120) + { + int currentIndex = getCurrentItemOrdinal(itemStack); + ItemStack currentItemStack = getItemStackInSlot(itemStack, currentIndex); + if (currentItemStack.isEmpty()) + return; + if (mode < 0) + { + index = next(currentIndex); + currentItemStack = getItemStackInSlot(itemStack, index); + + while (currentItemStack.isEmpty()) + { + index = next(index); + currentItemStack = getItemStackInSlot(itemStack, index); + } + } else + { + index = prev(currentIndex); + currentItemStack = getItemStackInSlot(itemStack, index); + + while (currentItemStack.isEmpty()) + { + index = prev(index); + currentItemStack = getItemStackInSlot(itemStack, index); + } + } + } + + itemStack.getTag().putInt(Constants.NBT.CURRENT_SIGIL, index); + } + } + + @Override + public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity player) + { + // TODO Auto-generated method stub + assert player.getEntityWorld() != null; + return new ContainerHolding(p_createMenu_1_, player, p_createMenu_2_, new InventoryHolding(player.getHeldItemMainhand())); + } + + @Override + public ITextComponent getDisplayName() + { + // TODO Auto-generated method stub + return new StringTextComponent("Sigil of Holding"); + } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilLava.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilLava.java new file mode 100644 index 00000000..7affee21 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilLava.java @@ -0,0 +1,89 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilLava extends ItemSigilFluidBase +{ + public ItemSigilLava() + { + super("lava", 1000, new FluidStack(Fluids.LAVA, 10000)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + if (!world.isRemote && !isUnusable(stack)) + { + RayTraceResult rayTrace = rayTrace(world, player, RayTraceContext.FluidMode.NONE); + + if (rayTrace == null || rayTrace.getType() != RayTraceResult.Type.BLOCK) + { + return ActionResult.resultFail(stack); + } + + BlockRayTraceResult blockRayTrace = (BlockRayTraceResult) rayTrace; + BlockPos blockPos = blockRayTrace.getPos(); + Direction sideHit = blockRayTrace.getFace(); + BlockPos blockpos1 = blockPos.offset(sideHit); + + if (world.isBlockModifiable(player, blockPos) && player.canPlayerEdit(blockpos1, sideHit, stack)) + { + + // Case for if block at blockPos is a fluid handler like a tank + // Try to put fluid into tank + IFluidHandler destination = getFluidHandler(world, blockPos, null); + if (destination != null && tryInsertSigilFluid(destination, false) + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + boolean result = tryInsertSigilFluid(destination, true); + if (result) + return ActionResult.resultSuccess(stack); + } + // Do the same as above, but use sidedness to interact with the fluid handler. + IFluidHandler destinationSide = getFluidHandler(world, blockPos, sideHit); + if (destinationSide != null && tryInsertSigilFluid(destinationSide, false) + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + boolean result = tryInsertSigilFluid(destinationSide, true); + if (result) + return ActionResult.resultSuccess(stack); + } + + // Case for if block at blockPos is not a tank + // Place fluid in world + if (destination == null && destinationSide == null) + { + BlockPos targetPos = blockPos.offset(sideHit); + if (tryPlaceSigilFluid(player, world, targetPos) + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + return ActionResult.resultSuccess(stack); + } + } + } + } + + return super.onItemRightClick(world, player, hand); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilMagnetism.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilMagnetism.java new file mode 100644 index 00000000..b4cbea14 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilMagnetism.java @@ -0,0 +1,54 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import java.util.List; + +import net.minecraft.entity.item.ExperienceOrbEntity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.world.World; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilMagnetism extends ItemSigilToggleableBase +{ + public ItemSigilMagnetism() + { + super("magnetism", 50); + } + + @Override + public void onSigilUpdate(ItemStack stack, World world, PlayerEntity player, int itemSlot, boolean isSelected) + { + if (PlayerHelper.isFakePlayer(player)) + return; + + int range = 5; + int verticalRange = 5; + float posX = Math.round(player.getPosX()); + float posY = (float) (player.getPosY() - player.getEyeHeight()); + float posZ = Math.round(player.getPosZ()); + List entities = player.getEntityWorld().getEntitiesWithinAABB(ItemEntity.class, new AxisAlignedBB(posX + - 0.5f, posY - 0.5f, posZ + - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List xpOrbs = player.getEntityWorld().getEntitiesWithinAABB(ExperienceOrbEntity.class, new AxisAlignedBB(posX + - 0.5f, posY - 0.5f, posZ + - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + + for (ItemEntity entity : entities) + { + if (entity != null && !world.isRemote && entity.isAlive()) + { + entity.onCollideWithPlayer(player); + } + } + + for (ExperienceOrbEntity xpOrb : xpOrbs) + { + if (xpOrb != null && !world.isRemote) + { + xpOrb.onCollideWithPlayer(player); + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilToggleable.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilToggleable.java new file mode 100644 index 00000000..7d583316 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilToggleable.java @@ -0,0 +1,118 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import wayoftime.bloodmagic.common.item.ItemSigil; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.common.item.IActivatable; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +/** + * Base class for all toggleable sigils. + */ +public class ItemSigilToggleable extends ItemSigil implements IActivatable +{ + + public ItemSigilToggleable(Properties property, int lpUsed) + { + super(property, lpUsed); + } + + @Override + public boolean getActivated(ItemStack stack) + { + return !stack.isEmpty() && NBTHelper.checkNBT(stack).getTag().getBoolean(Constants.NBT.ACTIVATED); + } + + @Override + public ItemStack setActivatedState(ItemStack stack, boolean activated) + { + if (!stack.isEmpty()) + { + NBTHelper.checkNBT(stack).getTag().putBoolean(Constants.NBT.ACTIVATED, activated); + return stack; + } + + return stack; + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + if (!world.isRemote && !isUnusable(stack)) + { + if (player.isSneaking()) + setActivatedState(stack, !getActivated(stack)); + if (getActivated(stack)) + return super.onItemRightClick(world, player, hand); + } + + return super.onItemRightClick(world, player, hand); + } + + @Override + public ActionResultType onItemUse(ItemUseContext context) + { + World world = context.getWorld(); + BlockPos blockpos = context.getPos(); + + PlayerEntity player = context.getPlayer(); + ItemStack stack = context.getItem(); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + + Binding binding = getBinding(stack); + if (binding == null || player.isSneaking()) // Make sure Sigils are bound before handling. Also ignores while + // toggling state + return ActionResultType.PASS; + + return onSigilUse(stack, player, world, blockpos, context.getFace(), context.getHitVec()) + ? ActionResultType.SUCCESS + : ActionResultType.FAIL; + } + + public boolean onSigilUse(ItemStack itemStack, PlayerEntity player, World world, BlockPos blockPos, Direction side, Vector3d hitVec) + { + return false; + } + + @Override + public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) + { + if (!worldIn.isRemote && entityIn instanceof PlayerEntity && getActivated(stack)) + { + if (entityIn.ticksExisted % 100 == 0) + { + if (!NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage((PlayerEntity) entityIn, SoulTicket.item(stack, worldIn, entityIn, getLpUsed())).isSuccess()) + { + setActivatedState(stack, false); + } + } + + onSigilUpdate(stack, worldIn, (PlayerEntity) entityIn, itemSlot, isSelected); + } + } + + public void onSigilUpdate(ItemStack stack, World world, PlayerEntity player, int itemSlot, boolean isSelected) + { + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilToggleableBase.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilToggleableBase.java new file mode 100644 index 00000000..8c57b170 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilToggleableBase.java @@ -0,0 +1,55 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; + +public class ItemSigilToggleableBase extends ItemSigilToggleable// implements IMeshProvider +{ + protected final String tooltipBase; + private final String name; + + public ItemSigilToggleableBase(String name, int lpUsed) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB), lpUsed); + + this.name = name; + this.tooltipBase = "tooltip.bloodmagic.sigil." + name + "."; + + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + super.addInformation(stack, world, tooltip, flag); + if (!stack.hasTag()) + return; + + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic." + (getActivated(stack) ? "activated" + : "deactivated")).mergeStyle(TextFormatting.GRAY)); + } + +// @Override +// @SideOnly(Side.CLIENT) +// public ItemMeshDefinition getMeshDefinition() +// { +// return new CustomMeshDefinitionActivatable("sigil_" + name.toLowerCase(Locale.ROOT)); +// } +// +// @Override +// public void gatherVariants(Consumer variants) +// { +// variants.accept("active=false"); +// variants.accept("active=true"); +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilVoid.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilVoid.java new file mode 100644 index 00000000..ef7dace9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilVoid.java @@ -0,0 +1,84 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.block.BlockState; +import net.minecraft.block.IBucketPickupHandler; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilVoid extends ItemSigilFluidBase +{ + public ItemSigilVoid() + { + super("void", 50, new FluidStack(Fluids.EMPTY, 1000)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + if (!world.isRemote && !isUnusable(stack)) + { + RayTraceResult rayTrace = rayTrace(world, player, RayTraceContext.FluidMode.SOURCE_ONLY); + + if (rayTrace == null || rayTrace.getType() != RayTraceResult.Type.BLOCK) + { + return ActionResult.resultFail(stack); + } + + BlockRayTraceResult blockRayTrace = (BlockRayTraceResult) rayTrace; + BlockPos blockPos = blockRayTrace.getPos(); + Direction sideHit = blockRayTrace.getFace(); + + if (world.isBlockModifiable(player, blockPos) && player.canPlayerEdit(blockPos, sideHit, stack)) + { + BlockState blockState = world.getBlockState(blockPos); + if (blockState.getBlock() instanceof IBucketPickupHandler) + { + if (NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + ((IBucketPickupHandler) blockState.getBlock()).pickupFluid(world, blockPos, blockState); + return ActionResult.resultSuccess(stack); + } + } + // Void is simpler than the other fluid sigils, because getFluidHandler grabs + // fluid blocks just fine + // So extract from fluid tanks with a null side; or drain fluid blocks. +// IFluidHandler destination = getFluidHandler(world, blockPos, sideHit); +// if (destination != null && tryRemoveFluid(destination, 1000, false) +// && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) +// { +// if (tryRemoveFluid(destination, 1000, true)) +// return ActionResult.resultSuccess(stack); +// } +// // Do the same as above, but use sidedness to interact with the fluid handler. +// IFluidHandler destinationSide = getFluidHandler(world, blockPos, sideHit); +// if (destinationSide != null && tryRemoveFluid(destinationSide, 1000, false) +// && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) +// { +// if (tryRemoveFluid(destinationSide, 1000, true)) +// return ActionResult.resultSuccess(stack); +// } + } + } + + return super.onItemRightClick(world, player, hand); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilWater.java b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilWater.java new file mode 100644 index 00000000..a3a9356a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/sigil/ItemSigilWater.java @@ -0,0 +1,99 @@ +package wayoftime.bloodmagic.common.item.sigil; + +import net.minecraft.block.Blocks; +import net.minecraft.block.CauldronBlock; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class ItemSigilWater extends ItemSigilFluidBase +{ + public ItemSigilWater() + { + super("water", 100, new FluidStack(Fluids.WATER, 10000)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + if (stack.getItem() instanceof ISigil.Holding) + stack = ((Holding) stack.getItem()).getHeldItem(stack, player); + if (PlayerHelper.isFakePlayer(player)) + return ActionResult.resultFail(stack); + + if (!world.isRemote && !isUnusable(stack)) + { + RayTraceResult rayTrace = rayTrace(world, player, RayTraceContext.FluidMode.NONE); + + if (rayTrace == null || rayTrace.getType() != RayTraceResult.Type.BLOCK) + { + return ActionResult.resultFail(stack); + } + + BlockRayTraceResult blockRayTrace = (BlockRayTraceResult) rayTrace; + BlockPos blockPos = blockRayTrace.getPos(); + Direction sideHit = blockRayTrace.getFace(); + BlockPos blockpos1 = blockPos.offset(sideHit); + + if (world.isBlockModifiable(player, blockPos) && player.canPlayerEdit(blockpos1, sideHit, stack)) + { + + // Case for if block at blockPos is a fluid handler like a tank + // Try to put fluid into tank + IFluidHandler destination = getFluidHandler(world, blockPos, null); + if (destination != null && tryInsertSigilFluid(destination, false) + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + boolean result = tryInsertSigilFluid(destination, true); + if (result) + return ActionResult.resultSuccess(stack); + } + // Do the same as above, but use sidedness to interact with the fluid handler. + IFluidHandler destinationSide = getFluidHandler(world, blockPos, sideHit); + if (destinationSide != null && tryInsertSigilFluid(destinationSide, false) + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + boolean result = tryInsertSigilFluid(destinationSide, true); + if (result) + return ActionResult.resultSuccess(stack); + } + + // Special vanilla cauldron handling, yay. + if (world.getBlockState(blockPos).getBlock() == Blocks.CAULDRON + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + world.setBlockState(blockPos, Blocks.CAULDRON.getDefaultState().with(CauldronBlock.LEVEL, 3)); + return ActionResult.resultSuccess(stack); + } + + // Case for if block at blockPos is not a tank + // Place fluid in world + if (destination == null && destinationSide == null) + { + BlockPos targetPos = blockPos.offset(sideHit); + if (tryPlaceSigilFluid(player, world, targetPos) + && NetworkHelper.getSoulNetwork(getBinding(stack)).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess()) + { + return ActionResult.resultSuccess(stack); + } + } + } + } + + return super.onItemRightClick(world, player, hand); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemMonsterSoul.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemMonsterSoul.java new file mode 100644 index 00000000..5cf684d0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemMonsterSoul.java @@ -0,0 +1,129 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.NonNullList; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; + +public class ItemMonsterSoul extends Item implements IDemonWill +{ + private final EnumDemonWillType type; + + public ItemMonsterSoul(EnumDemonWillType type) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + this.type = type; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(getType(stack), stack))).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } + + @Override + public EnumDemonWillType getType(ItemStack stack) + { + return type; + } + + @Override + public double getWill(EnumDemonWillType type, ItemStack soulStack) + { + if (type != this.getType(soulStack)) + { + return 0; + } + + NBTHelper.checkNBT(soulStack); + + CompoundNBT tag = soulStack.getTag(); + + return tag.getDouble(Constants.NBT.SOULS); + } + + @Override + public void fillItemGroup(ItemGroup group, NonNullList items) + { + if (this.isInGroup(group)) + { + ItemStack stack = new ItemStack(this); + this.setWill(type, stack, 5); + items.add(stack); + } + } + + @Override + public boolean setWill(EnumDemonWillType type, ItemStack soulStack, double souls) + { + if (type != this.getType(soulStack)) + { + return false; + } + + NBTHelper.checkNBT(soulStack); + CompoundNBT tag = soulStack.getTag(); + tag.putDouble(Constants.NBT.SOULS, souls); + + return true; + } + + @Override + public double drainWill(EnumDemonWillType type, ItemStack soulStack, double drainAmount) + { + double souls = getWill(type, soulStack); + + double soulsDrained = Math.min(drainAmount, souls); + setWill(type, soulStack, souls - soulsDrained); + + return soulsDrained; + } + + @Override + public ItemStack createWill(double number) + { + ItemStack soulStack = new ItemStack(this); + setWill(getType(soulStack), soulStack, number); + return soulStack; + } + +// @Override +// public double getWill(ItemStack willStack) +// { +// return this.getWill(EnumDemonWillType.DEFAULT, willStack); +// } +// +// @Override +// public void setWill(ItemStack willStack, double will) +// { +// this.setWill(EnumDemonWillType.DEFAULT, willStack, will); +// } +// +// @Override +// public double drainWill(ItemStack willStack, double drainAmount) +// { +// return this.drainWill(EnumDemonWillType.DEFAULT, willStack, drainAmount); +// } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientAxe.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientAxe.java new file mode 100644 index 00000000..13c3ccd7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientAxe.java @@ -0,0 +1,560 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.block.BlockState; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.Attributes; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.monster.SlimeEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.AxeItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.Difficulty; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillWeapon; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.common.item.BMItemTier; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMultiWillTool +{ + public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; + public static double[] defaultDamageAdded = new double[] { 1, 2, 3, 3.5, 4 }; + public static double[] destructiveDamageAdded = new double[] { 2, 3, 4, 5, 6 }; + public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; + public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; + public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; + public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; + + public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; // TODO: Think of implementing this later + public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; + public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; + + public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; + + public static double maxAbsorptionHearts = 10; + + public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; + public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; + + public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; + + public final double baseAttackDamage = 8; + public final double baseAttackSpeed = -3; + + public ItemSentientAxe() + { + super(BMItemTier.SENTIENT, 8, -3.1f, new Item.Properties().maxDamage(520).group(BloodMagic.TAB)); +// super(RegistrarBloodMagicItems.SOUL_TOOL_MATERIAL, 8.0F, 3.1F); + } + + @Override + public float getDestroySpeed(ItemStack stack, BlockState state) + { + float value = super.getDestroySpeed(stack, state); + if (value > 1) + { + return (float) (value + getDigSpeedOfSword(stack)); + } else + { + return value; + } + } + + @Override + public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) + { + return BloodMagicTags.CRYSTAL_DEMON.contains(repair.getItem()) || super.getIsRepairable(toRepair, repair); + } + + public void recalculatePowers(ItemStack stack, World world, PlayerEntity player) + { + EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); + int level = getLevel(stack, soulsRemaining); + + double drain = level >= 0 ? soulDrainPerSwing[level] : 0; + double extraDamage = getExtraDamage(type, level); + + setDrainOfActivatedSword(stack, drain); + setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); + setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); + setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); + setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); + setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); + setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); + setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); + } + + public double getExtraDamage(EnumDemonWillType type, int willBracket) + { + if (willBracket < 0) + { + return 0; + } + + switch (type) + { + case CORROSIVE: + case DEFAULT: + return defaultDamageAdded[willBracket]; + case DESTRUCTIVE: + return destructiveDamageAdded[willBracket]; + case VENGEFUL: + return vengefulDamageAdded[willBracket]; + case STEADFAST: + return steadfastDamageAdded[willBracket]; + } + + return 0; + } + + public double getAttackSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return vengefulAttackSpeed[willBracket]; + case DESTRUCTIVE: + return destructiveAttackSpeed[willBracket]; + default: + return -2.9; + } + } + + public double getHealthBonus(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case STEADFAST: + return healthBonus[willBracket]; + default: + return 0; + } + } + + public double getMovementSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return movementSpeed[willBracket]; + default: + return 0; + } + } + + public double getDigSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: +// return movementSpeed[willBracket]; + default: + return defaultDigSpeedAdded[willBracket]; + } + } + + public void applyEffectToEntity(EnumDemonWillType type, int willBracket, LivingEntity target, PlayerEntity attacker) + { + switch (type) + { + case CORROSIVE: + target.addPotionEffect(new EffectInstance(Effects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); + break; + case DEFAULT: + break; + case DESTRUCTIVE: + break; + case STEADFAST: + if (!target.isAlive()) + { + float absorption = attacker.getAbsorptionAmount(); + attacker.addPotionEffect(new EffectInstance(Effects.ABSORPTION, absorptionTime[willBracket], 127)); + attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); + } + break; + case VENGEFUL: + break; + } + } + + @Override + public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) + { + if (super.hitEntity(stack, target, attacker)) + { + if (attacker instanceof PlayerEntity) + { + PlayerEntity attackerPlayer = (PlayerEntity) attacker; + this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + + applyEffectToEntity(type, willBracket, target, attackerPlayer); + + ItemStack offStack = attackerPlayer.getItemStackFromSlot(EquipmentSlotType.OFFHAND); +// if (offStack.getItem() instanceof ISentientSwordEffectProvider) +// { +// ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); +// if (provider.providesEffectForWill(type)) +// { +// provider.applyOnHitEffect(type, stack, offStack, attacker, target); +// } +// } + } + + return true; + } + + return false; + } + + @Override + public EnumDemonWillType getCurrentType(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + return EnumDemonWillType.DEFAULT; + } + + return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + + public void setCurrentType(ItemStack stack, EnumDemonWillType type) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putString(Constants.NBT.WILL_TYPE, type.toString()); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + recalculatePowers(player.getHeldItem(hand), world, player); + + return super.onItemRightClick(world, player, hand); + } + + @Override + public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) + { + return oldStack.getItem() != newStack.getItem(); + } + + private int getLevel(ItemStack stack, double soulsRemaining) + { + int lvl = -1; + for (int i = 0; i < soulBracket.length; i++) + { + if (soulsRemaining >= soulBracket[i]) + { + lvl = i; + } + } + + return lvl; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientAxe.desc").mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, PlayerEntity player, Entity entity) + { + recalculatePowers(stack, player.getEntityWorld(), player); + + double drain = this.getDrainOfActivatedSword(stack); + if (drain > 0) + { + EnumDemonWillType type = getCurrentType(stack); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + + if (drain > soulsRemaining) + { + return false; + } else + { + PlayerDemonWillHandler.consumeDemonWill(type, player, drain); + } + } + + return super.onLeftClickEntity(stack, player, entity); + } + + @Override + public List getRandomDemonWillDrop(LivingEntity killedEntity, LivingEntity attackingEntity, ItemStack stack, int looting) + { + List soulList = new ArrayList<>(); + + if (killedEntity.getEntityWorld().getDifficulty() != Difficulty.PEACEFUL && !(killedEntity instanceof IMob)) + { + return soulList; + } + + double willModifier = killedEntity instanceof SlimeEntity ? 0.67 : 1; + + IDemonWill soul; + + EnumDemonWillType type = this.getCurrentType(stack); + switch (type) + { + case CORROSIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_CORROSIVE.get()); + break; + case DESTRUCTIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_DESTRUCTIVE.get()); + break; + case STEADFAST: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_STEADFAST.get()); + break; + case VENGEFUL: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_VENGEFUL.get()); + break; + default: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_RAW.get()); + break; + } + + for (int i = 0; i <= looting; i++) + { + if (i == 0 || attackingEntity.getEntityWorld().rand.nextDouble() < 0.4) + { + ItemStack soulStack = soul.createWill(willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.getEntityWorld().rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); + soulList.add(soulStack); + } + } + + return soulList; + } + + // TODO: Change attack speed. + @Override + public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + { + Multimap multimap = HashMultimap.create(); + if (slot == EquipmentSlotType.MAINHAND) + { + multimap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.ATTACK_SPEED, new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MAX_HEALTH, new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MOVEMENT_SPEED, new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + } + + return multimap; + } + + public double getDamageOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); + } + + public void setDamageOfActivatedSword(ItemStack stack, double damage) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); + } + + public double getDrainOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); + } + + public void setDrainOfActivatedSword(ItemStack stack, double drain) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); + } + + public double getStaticDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); + } + + public void setStaticDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); + } + + public double getDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); + } + + public void setDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop); + } + + public double getHealthBonusOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); + } + + public void setHealthBonusOfSword(ItemStack stack, double hp) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); + } + + public double getAttackSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); + } + + public void setAttackSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); + } + + public double getSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); + } + + public void setSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); + } + + public double getDigSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); + } + + public void setDigSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); + } + +// @Override +// public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, PlayerEntity player) { +// World world = player.getEntityWorld(); +// if (!world.isRemote) { +// this.recalculatePowers(droppedStack, world, player); +// +// EnumDemonWillType type = this.getCurrentType(droppedStack); +// double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); +// if (soulsRemaining < 1024) { +// return false; +// } +// +// PlayerDemonWillHandler.consumeDemonWill(type, player, 100); +// +// EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); +// specterEntity.setPosition(player.posX, player.posY, player.posZ); +// world.spawnEntity(specterEntity); +// +// specterEntity.setItemStackToSlot(EquipmentSlotType.MAINHAND, droppedStack.copy()); +// +// specterEntity.setType(this.getCurrentType(droppedStack)); +// specterEntity.setOwner(player); +// specterEntity.setTamed(true); +// +// return true; +// } +// +// return false; +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientPickaxe.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientPickaxe.java new file mode 100644 index 00000000..471eb2d5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientPickaxe.java @@ -0,0 +1,562 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.block.BlockState; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.Attributes; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.monster.SlimeEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.PickaxeItem; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.Difficulty; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillWeapon; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.common.item.BMItemTier; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon, IMultiWillTool +{ + public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; + public static double[] defaultDamageAdded = new double[] { 1, 2, 3, 3.5, 4 }; + public static double[] destructiveDamageAdded = new double[] { 2, 3, 4, 5, 6 }; + public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; + public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; + public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; + public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; + + public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; // TODO: Think of implementing this later + public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; + public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; + + public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; + + public static double maxAbsorptionHearts = 10; + + public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; + public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; + + public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; + + public static final double baseAttackDamage = 3; + public static final double baseAttackSpeed = -2.8; + + public ItemSentientPickaxe() + { + super(BMItemTier.SENTIENT, (int) baseAttackDamage, (float) baseAttackSpeed, new Item.Properties().maxDamage(520).group(BloodMagic.TAB)); + } + + @Override + public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) + { + return BloodMagicTags.CRYSTAL_DEMON.contains(repair.getItem()) || super.getIsRepairable(toRepair, repair); + } + + @Override + public float getDestroySpeed(ItemStack stack, BlockState state) + { + float value = super.getDestroySpeed(stack, state); + if (value > 1) + { + return (float) (value + getDigSpeedOfSword(stack)); + } else + { + return value; + } + } + + public void recalculatePowers(ItemStack stack, World world, PlayerEntity player) + { + EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); + int level = getLevel(stack, soulsRemaining); + + double drain = level >= 0 ? soulDrainPerSwing[level] : 0; + double extraDamage = getExtraDamage(type, level); + + setDrainOfActivatedSword(stack, drain); + setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); + setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); + setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); + setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); + setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); + setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); + setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); + } + + public double getExtraDamage(EnumDemonWillType type, int willBracket) + { + if (willBracket < 0) + { + return 0; + } + + switch (type) + { + case CORROSIVE: + case DEFAULT: + return defaultDamageAdded[willBracket]; + case DESTRUCTIVE: + return destructiveDamageAdded[willBracket]; + case VENGEFUL: + return vengefulDamageAdded[willBracket]; + case STEADFAST: + return steadfastDamageAdded[willBracket]; + } + + return 0; + } + + public double getAttackSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return vengefulAttackSpeed[willBracket]; + case DESTRUCTIVE: + return destructiveAttackSpeed[willBracket]; + default: + return -2.9; + } + } + + public double getHealthBonus(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case STEADFAST: + return healthBonus[willBracket]; + default: + return 0; + } + } + + public double getMovementSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return movementSpeed[willBracket]; + default: + return 0; + } + } + + public double getDigSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: +// return movementSpeed[willBracket]; + default: + return defaultDigSpeedAdded[willBracket]; + } + } + + public void applyEffectToEntity(EnumDemonWillType type, int willBracket, LivingEntity target, PlayerEntity attacker) + { + switch (type) + { + case CORROSIVE: + target.addPotionEffect(new EffectInstance(Effects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); + break; + case DEFAULT: + break; + case DESTRUCTIVE: + break; + case STEADFAST: + if (!target.isAlive()) + { + float absorption = attacker.getAbsorptionAmount(); + attacker.addPotionEffect(new EffectInstance(Effects.ABSORPTION, absorptionTime[willBracket], 127)); + attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); + } + break; + case VENGEFUL: + break; + } + } + + @Override + public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) + { + if (super.hitEntity(stack, target, attacker)) + { + if (attacker instanceof PlayerEntity) + { + PlayerEntity attackerPlayer = (PlayerEntity) attacker; + this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + + applyEffectToEntity(type, willBracket, target, attackerPlayer); + +// ItemStack offStack = attackerPlayer.getItemStackFromSlot(EquipmentSlotType.OFFHAND); +// if (offStack.getItem() instanceof ISentientSwordEffectProvider) +// { +// ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); +// if (provider.providesEffectForWill(type)) +// { +// provider.applyOnHitEffect(type, stack, offStack, attacker, target); +// } +// } + } + + return true; + } + + return false; + } + + @Override + public EnumDemonWillType getCurrentType(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + return EnumDemonWillType.DEFAULT; + } + + return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + + public void setCurrentType(ItemStack stack, EnumDemonWillType type) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putString(Constants.NBT.WILL_TYPE, type.toString()); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + recalculatePowers(player.getHeldItem(hand), world, player); + return super.onItemRightClick(world, player, hand); + } + + @Override + public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) + { + return oldStack.getItem() != newStack.getItem(); + } + + private int getLevel(ItemStack stack, double soulsRemaining) + { + int lvl = -1; + for (int i = 0; i < soulBracket.length; i++) + { + if (soulsRemaining >= soulBracket[i]) + { + lvl = i; + } + } + + return lvl; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + +// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sentientSword.desc")))); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientPickaxe.desc").mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, PlayerEntity player, Entity entity) + { + recalculatePowers(stack, player.getEntityWorld(), player); + + double drain = this.getDrainOfActivatedSword(stack); + if (drain > 0) + { + EnumDemonWillType type = getCurrentType(stack); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + + if (drain > soulsRemaining) + { + return false; + } else + { + PlayerDemonWillHandler.consumeDemonWill(type, player, drain); + } + } + + return super.onLeftClickEntity(stack, player, entity); + } + + @Override + public List getRandomDemonWillDrop(LivingEntity killedEntity, LivingEntity attackingEntity, ItemStack stack, int looting) + { + List soulList = new ArrayList<>(); + + if (killedEntity.getEntityWorld().getDifficulty() != Difficulty.PEACEFUL && !(killedEntity instanceof IMob)) + { + return soulList; + } + + double willModifier = killedEntity instanceof SlimeEntity ? 0.67 : 1; + + IDemonWill soul; + + EnumDemonWillType type = this.getCurrentType(stack); + switch (type) + { + case CORROSIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_CORROSIVE.get()); + break; + case DESTRUCTIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_DESTRUCTIVE.get()); + break; + case STEADFAST: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_STEADFAST.get()); + break; + case VENGEFUL: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_VENGEFUL.get()); + break; + default: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_RAW.get()); + break; + } + + for (int i = 0; i <= looting; i++) + { + if (i == 0 || attackingEntity.getEntityWorld().rand.nextDouble() < 0.4) + { + ItemStack soulStack = soul.createWill(willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.getEntityWorld().rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); + soulList.add(soulStack); + } + } + + return soulList; + } + + // TODO: Change attack speed. + @Override + public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + { + Multimap multimap = HashMultimap.create(); + if (slot == EquipmentSlotType.MAINHAND) + { + multimap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.ATTACK_SPEED, new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MAX_HEALTH, new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MOVEMENT_SPEED, new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + } + + return multimap; + } + + public double getDamageOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); + } + + public void setDamageOfActivatedSword(ItemStack stack, double damage) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); + } + + public double getDrainOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); + } + + public void setDrainOfActivatedSword(ItemStack stack, double drain) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); + } + + public double getStaticDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); + } + + public void setStaticDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); + } + + public double getDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); + } + + public void setDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop); + } + + public double getHealthBonusOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); + } + + public void setHealthBonusOfSword(ItemStack stack, double hp) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); + } + + public double getAttackSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); + } + + public void setAttackSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); + } + + public double getSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); + } + + public void setSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); + } + + public double getDigSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); + } + + public void setDigSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); + } + +// @Override +// public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, PlayerEntity player) +// { +// World world = player.getEntityWorld(); +// if (!world.isRemote) +// { +// this.recalculatePowers(droppedStack, world, player); +// +// EnumDemonWillType type = this.getCurrentType(droppedStack); +// double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); +// if (soulsRemaining < 1024) +// { +// return false; +// } +// +// PlayerDemonWillHandler.consumeDemonWill(type, player, 100); +// +// EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); +// specterEntity.setPosition(player.posX, player.posY, player.posZ); +// world.spawnEntity(specterEntity); +// +// specterEntity.setItemStackToSlot(EquipmentSlotType.MAINHAND, droppedStack.copy()); +// +// specterEntity.setType(this.getCurrentType(droppedStack)); +// specterEntity.setOwner(player); +// specterEntity.setTamed(true); +// +// return true; +// } +// +// return false; +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientShovel.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientShovel.java new file mode 100644 index 00000000..dce46373 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientShovel.java @@ -0,0 +1,563 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.block.BlockState; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.Attributes; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.monster.SlimeEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ShovelItem; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.Difficulty; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillWeapon; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.common.item.BMItemTier; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon, IMultiWillTool +{ + public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000 }; + public static double[] defaultDamageAdded = new double[] { 1, 2, 3, 3.5, 4 }; + public static double[] destructiveDamageAdded = new double[] { 2, 3, 4, 5, 6 }; + public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2 }; + public static double[] defaultDigSpeedAdded = new double[] { 1, 1.5, 2, 3, 4 }; + public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75 }; + public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13 }; + public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3 }; + + public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0 }; // TODO: Think of implementing this later + public static double[] vengefulAttackSpeed = new double[] { -3, -2.8, -2.7, -2.6, -2.5 }; + public static double[] destructiveAttackSpeed = new double[] { -3.1, -3.1, -3.2, -3.3, -3.3 }; + + public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600 }; + + public static double maxAbsorptionHearts = 10; + + public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100 }; + public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1 }; + + public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25 }; + + public static final double baseAttackDamage = 3; + public static final double baseAttackSpeed = -2.8; + + public ItemSentientShovel() + { + super(BMItemTier.SENTIENT, (int) baseAttackDamage, (float) baseAttackSpeed, new Item.Properties().maxDamage(520).group(BloodMagic.TAB)); + } + + @Override + public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) + { + return BloodMagicTags.CRYSTAL_DEMON.contains(repair.getItem()) || super.getIsRepairable(toRepair, repair); + } + + @Override + public float getDestroySpeed(ItemStack stack, BlockState state) + { + float value = super.getDestroySpeed(stack, state); + if (value > 1) + { + return (float) (value + getDigSpeedOfSword(stack)); + } else + { + return value; + } + } + + public void recalculatePowers(ItemStack stack, World world, PlayerEntity player) + { + EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); + int level = getLevel(stack, soulsRemaining); + + double drain = level >= 0 ? soulDrainPerSwing[level] : 0; + double extraDamage = getExtraDamage(type, level); + + setDrainOfActivatedSword(stack, drain); + setDamageOfActivatedSword(stack, baseAttackDamage + extraDamage); + setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); + setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); + setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : baseAttackSpeed); + setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); + setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); + setDigSpeedOfSword(stack, level >= 0 ? getDigSpeed(type, level) : 0); + } + + public double getExtraDamage(EnumDemonWillType type, int willBracket) + { + if (willBracket < 0) + { + return 0; + } + + switch (type) + { + case CORROSIVE: + case DEFAULT: + return defaultDamageAdded[willBracket]; + case DESTRUCTIVE: + return destructiveDamageAdded[willBracket]; + case VENGEFUL: + return vengefulDamageAdded[willBracket]; + case STEADFAST: + return steadfastDamageAdded[willBracket]; + } + + return 0; + } + + public double getAttackSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return vengefulAttackSpeed[willBracket]; + case DESTRUCTIVE: + return destructiveAttackSpeed[willBracket]; + default: + return -2.9; + } + } + + public double getHealthBonus(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case STEADFAST: + return healthBonus[willBracket]; + default: + return 0; + } + } + + public double getMovementSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return movementSpeed[willBracket]; + default: + return 0; + } + } + + public double getDigSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: +// return movementSpeed[willBracket]; + default: + return defaultDigSpeedAdded[willBracket]; + } + } + + public void applyEffectToEntity(EnumDemonWillType type, int willBracket, LivingEntity target, PlayerEntity attacker) + { + switch (type) + { + case CORROSIVE: + target.addPotionEffect(new EffectInstance(Effects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); + break; + case DEFAULT: + break; + case DESTRUCTIVE: + break; + case STEADFAST: + if (!target.isAlive()) + { + float absorption = attacker.getAbsorptionAmount(); + attacker.addPotionEffect(new EffectInstance(Effects.ABSORPTION, absorptionTime[willBracket], 127)); + attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); + } + break; + case VENGEFUL: + break; + } + } + + @Override + public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) + { + if (super.hitEntity(stack, target, attacker)) + { + if (attacker instanceof PlayerEntity) + { + PlayerEntity attackerPlayer = (PlayerEntity) attacker; + this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + + applyEffectToEntity(type, willBracket, target, attackerPlayer); + +// ItemStack offStack = attackerPlayer.getItemStackFromSlot(EquipmentSlotType.OFFHAND); +// if (offStack.getItem() instanceof ISentientSwordEffectProvider) +// { +// ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); +// if (provider.providesEffectForWill(type)) +// { +// provider.applyOnHitEffect(type, stack, offStack, attacker, target); +// } +// } + } + + return true; + } + + return false; + } + + @Override + public EnumDemonWillType getCurrentType(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + return EnumDemonWillType.DEFAULT; + } + + return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + + public void setCurrentType(ItemStack stack, EnumDemonWillType type) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putString(Constants.NBT.WILL_TYPE, type.toString()); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + recalculatePowers(player.getHeldItem(hand), world, player); + + return super.onItemRightClick(world, player, hand); + } + + @Override + public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) + { + return oldStack.getItem() != newStack.getItem(); + } + + private int getLevel(ItemStack stack, double soulsRemaining) + { + int lvl = -1; + for (int i = 0; i < soulBracket.length; i++) + { + if (soulsRemaining >= soulBracket[i]) + { + lvl = i; + } + } + + return lvl; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + +// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sentientSword.desc")))); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientShovel.desc").mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, PlayerEntity player, Entity entity) + { + recalculatePowers(stack, player.getEntityWorld(), player); + + double drain = this.getDrainOfActivatedSword(stack); + if (drain > 0) + { + EnumDemonWillType type = getCurrentType(stack); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + + if (drain > soulsRemaining) + { + return false; + } else + { + PlayerDemonWillHandler.consumeDemonWill(type, player, drain); + } + } + + return super.onLeftClickEntity(stack, player, entity); + } + + @Override + public List getRandomDemonWillDrop(LivingEntity killedEntity, LivingEntity attackingEntity, ItemStack stack, int looting) + { + List soulList = new ArrayList<>(); + + if (killedEntity.getEntityWorld().getDifficulty() != Difficulty.PEACEFUL && !(killedEntity instanceof IMob)) + { + return soulList; + } + + double willModifier = killedEntity instanceof SlimeEntity ? 0.67 : 1; + + IDemonWill soul; + + EnumDemonWillType type = this.getCurrentType(stack); + switch (type) + { + case CORROSIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_CORROSIVE.get()); + break; + case DESTRUCTIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_DESTRUCTIVE.get()); + break; + case STEADFAST: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_STEADFAST.get()); + break; + case VENGEFUL: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_VENGEFUL.get()); + break; + default: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_RAW.get()); + break; + } + + for (int i = 0; i <= looting; i++) + { + if (i == 0 || attackingEntity.getEntityWorld().rand.nextDouble() < 0.4) + { + ItemStack soulStack = soul.createWill(willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.getEntityWorld().rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); + soulList.add(soulStack); + } + } + + return soulList; + } + + // TODO: Change attack speed. + @Override + public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + { + Multimap multimap = HashMultimap.create(); + if (slot == EquipmentSlotType.MAINHAND) + { + multimap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.ATTACK_SPEED, new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MAX_HEALTH, new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MOVEMENT_SPEED, new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + } + + return multimap; + } + + public double getDamageOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); + } + + public void setDamageOfActivatedSword(ItemStack stack, double damage) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); + } + + public double getDrainOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); + } + + public void setDrainOfActivatedSword(ItemStack stack, double drain) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); + } + + public double getStaticDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); + } + + public void setStaticDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); + } + + public double getDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); + } + + public void setDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop); + } + + public double getHealthBonusOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); + } + + public void setHealthBonusOfSword(ItemStack stack, double hp) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); + } + + public double getAttackSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); + } + + public void setAttackSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); + } + + public double getSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); + } + + public void setSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); + } + + public double getDigSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED); + } + + public void setDigSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed); + } + +// @Override +// public boolean spawnSentientEntityOnDrop(ItemStack droppedStack, PlayerEntity player) +// { +// World world = player.getEntityWorld(); +// if (!world.isRemote) +// { +// this.recalculatePowers(droppedStack, world, player); +// +// EnumDemonWillType type = this.getCurrentType(droppedStack); +// double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); +// if (soulsRemaining < 1024) +// { +// return false; +// } +// +// PlayerDemonWillHandler.consumeDemonWill(type, player, 100); +// +// EntitySentientSpecter specterEntity = new EntitySentientSpecter(world); +// specterEntity.setPosition(player.posX, player.posY, player.posZ); +// world.spawnEntity(specterEntity); +// +// specterEntity.setItemStackToSlot(EquipmentSlotType.MAINHAND, droppedStack.copy()); +// +// specterEntity.setType(this.getCurrentType(droppedStack)); +// specterEntity.setOwner(player); +// specterEntity.setTamed(true); +// +// return true; +// } +// +// return false; +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientSword.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientSword.java new file mode 100644 index 00000000..c39ba1ed --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSentientSword.java @@ -0,0 +1,507 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.Attributes; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.monster.SlimeEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.SwordItem; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.Difficulty; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillWeapon; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.common.item.BMItemTier; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IMultiWillTool +{ + public static int[] soulBracket = new int[] { 16, 60, 200, 400, 1000, 2000, 4000 }; + public static double[] defaultDamageAdded = new double[] { 1, 1.5, 2, 2.5, 3, 3.5, 4 }; + public static double[] destructiveDamageAdded = new double[] { 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6 }; + public static double[] vengefulDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2, 2.25, 2.5 }; + public static double[] steadfastDamageAdded = new double[] { 0, 0.5, 1, 1.5, 2, 2.25, 2.5 }; + public static double[] soulDrainPerSwing = new double[] { 0.05, 0.1, 0.2, 0.4, 0.75, 1, 1.25 }; + public static double[] soulDrop = new double[] { 2, 4, 7, 10, 13, 15, 18 }; + public static double[] staticDrop = new double[] { 1, 1, 2, 3, 3, 4, 4 }; + + public static double[] healthBonus = new double[] { 0, 0, 0, 0, 0, 0, 0 }; // TODO: Think of implementing this later + public static double[] vengefulAttackSpeed = new double[] { -2.1, -2, -1.8, -1.7, -1.6, -1.6, -1.5 }; + public static double[] destructiveAttackSpeed = new double[] { -2.6, -2.7, -2.8, -2.9, -3, -3, -3 }; + + public static int[] absorptionTime = new int[] { 200, 300, 400, 500, 600, 700, 800 }; + + public static double maxAbsorptionHearts = 10; + + public static int[] poisonTime = new int[] { 25, 50, 60, 80, 100, 120, 150 }; + public static int[] poisonLevel = new int[] { 0, 0, 0, 1, 1, 1, 1 }; + + public static double[] movementSpeed = new double[] { 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4 }; + + public ItemSentientSword() + { +// super(RegistrarBloodMagicItems.SOUL_TOOL_MATERIAL); + super(BMItemTier.SENTIENT, 6, -2.6f, new Item.Properties().maxDamage(520).group(BloodMagic.TAB)); + } + + @Override + public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) + { + return BloodMagicTags.CRYSTAL_DEMON.contains(repair.getItem()) || super.getIsRepairable(toRepair, repair); + } + + public void recalculatePowers(ItemStack stack, World world, PlayerEntity player) + { + EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + recalculatePowers(stack, type, soulsRemaining); + } + + public void recalculatePowers(ItemStack stack, EnumDemonWillType type, double will) + { + this.setCurrentType(stack, will > 0 ? type : EnumDemonWillType.DEFAULT); + int level = getLevel(stack, will); + + double drain = level >= 0 ? soulDrainPerSwing[level] : 0; + double extraDamage = getExtraDamage(type, level); + + setActivatedState(stack, will > 16); + + setDrainOfActivatedSword(stack, drain); + setDamageOfActivatedSword(stack, 5 + extraDamage); + setStaticDropOfActivatedSword(stack, level >= 0 ? staticDrop[level] : 1); + setDropOfActivatedSword(stack, level >= 0 ? soulDrop[level] : 0); + setAttackSpeedOfSword(stack, level >= 0 ? getAttackSpeed(type, level) : -2.4); + setHealthBonusOfSword(stack, level >= 0 ? getHealthBonus(type, level) : 0); + setSpeedOfSword(stack, level >= 0 ? getMovementSpeed(type, level) : 0); + } + + public boolean getActivated(ItemStack stack) + { + return !stack.isEmpty() && NBTHelper.checkNBT(stack).getTag().getBoolean(Constants.NBT.ACTIVATED); + } + + public ItemStack setActivatedState(ItemStack stack, boolean activated) + { + if (!stack.isEmpty()) + { + NBTHelper.checkNBT(stack).getTag().putBoolean(Constants.NBT.ACTIVATED, activated); + return stack; + } + + return stack; + } + + public double getExtraDamage(EnumDemonWillType type, int willBracket) + { + if (willBracket < 0) + { + return 0; + } + + switch (type) + { + case CORROSIVE: + case DEFAULT: + return defaultDamageAdded[willBracket]; + case DESTRUCTIVE: + return destructiveDamageAdded[willBracket]; + case VENGEFUL: + return vengefulDamageAdded[willBracket]; + case STEADFAST: + return steadfastDamageAdded[willBracket]; + } + + return 0; + } + + public double getAttackSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return vengefulAttackSpeed[willBracket]; + case DESTRUCTIVE: + return destructiveAttackSpeed[willBracket]; + default: + return -2.4; + } + } + + public double getHealthBonus(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case STEADFAST: + return healthBonus[willBracket]; + default: + return 0; + } + } + + public double getMovementSpeed(EnumDemonWillType type, int willBracket) + { + switch (type) + { + case VENGEFUL: + return movementSpeed[willBracket]; + default: + return 0; + } + } + + public void applyEffectToEntity(EnumDemonWillType type, int willBracket, LivingEntity target, LivingEntity attacker) + { + switch (type) + { + case CORROSIVE: + target.addPotionEffect(new EffectInstance(Effects.WITHER, poisonTime[willBracket], poisonLevel[willBracket])); + break; + case DEFAULT: + break; + case DESTRUCTIVE: + break; + case STEADFAST: + if (!target.isAlive()) + { + float absorption = attacker.getAbsorptionAmount(); + attacker.addPotionEffect(new EffectInstance(Effects.ABSORPTION, absorptionTime[willBracket], 127, false, false)); + attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts)); + } + break; + case VENGEFUL: + break; + } + } + + @Override + public boolean hitEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) + { + if (super.hitEntity(stack, target, attacker)) + { + if (attacker instanceof PlayerEntity) + { + PlayerEntity attackerPlayer = (PlayerEntity) attacker; + this.recalculatePowers(stack, attackerPlayer.getEntityWorld(), attackerPlayer); + EnumDemonWillType type = this.getCurrentType(stack); + double will = PlayerDemonWillHandler.getTotalDemonWill(type, attackerPlayer); + int willBracket = this.getLevel(stack, will); + + applyEffectToEntity(type, willBracket, target, attackerPlayer); + +// ItemStack offStack = attackerPlayer.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND); +// if (offStack.getItem() instanceof ISentientSwordEffectProvider) +// { +// ISentientSwordEffectProvider provider = (ISentientSwordEffectProvider) offStack.getItem(); +// if (provider.providesEffectForWill(type)) +// { +// provider.applyOnHitEffect(type, stack, offStack, attacker, target); +// } +// } + } + + return true; + } + + return false; + } + + @Override + public EnumDemonWillType getCurrentType(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + return EnumDemonWillType.DEFAULT; + } + + return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + + public void setCurrentType(ItemStack stack, EnumDemonWillType type) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putString(Constants.NBT.WILL_TYPE, type.toString()); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + recalculatePowers(player.getHeldItem(hand), world, player); + return super.onItemRightClick(world, player, hand); + } + + @Override + public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) + { + return oldStack.getItem() != newStack.getItem(); + } + + private int getLevel(ItemStack stack, double soulsRemaining) + { + int lvl = -1; + for (int i = 0; i < soulBracket.length; i++) + { + if (soulsRemaining >= soulBracket[i]) + { + lvl = i; + } + } + + return lvl; + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + +// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sentientSword.desc")))); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientSword.desc").mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, PlayerEntity player, Entity entity) + { + recalculatePowers(stack, player.getEntityWorld(), player); + + double drain = this.getDrainOfActivatedSword(stack); + if (drain > 0) + { + EnumDemonWillType type = getCurrentType(stack); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); + + if (drain > soulsRemaining) + { + return false; + } else + { + PlayerDemonWillHandler.consumeDemonWill(type, player, drain); + } + } + + return super.onLeftClickEntity(stack, player, entity); + } + + @Override + public List getRandomDemonWillDrop(LivingEntity killedEntity, LivingEntity attackingEntity, ItemStack stack, int looting) + { + List soulList = new ArrayList<>(); + + if (killedEntity.getEntityWorld().getDifficulty() != Difficulty.PEACEFUL && !(killedEntity instanceof IMob)) + { + return soulList; + } + + double willModifier = killedEntity instanceof SlimeEntity ? 0.67 : 1; + + IDemonWill soul; + + EnumDemonWillType type = this.getCurrentType(stack); + switch (type) + { + case CORROSIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_CORROSIVE.get()); + break; + case DESTRUCTIVE: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_DESTRUCTIVE.get()); + break; + case STEADFAST: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_STEADFAST.get()); + break; + case VENGEFUL: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_VENGEFUL.get()); + break; + default: + soul = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_RAW.get()); + break; + } + + for (int i = 0; i <= looting; i++) + { + if (i == 0 || attackingEntity.getEntityWorld().rand.nextDouble() < 0.4) + { + ItemStack soulStack = soul.createWill(willModifier * (this.getDropOfActivatedSword(stack) * attackingEntity.getEntityWorld().rand.nextDouble() + this.getStaticDropOfActivatedSword(stack)) * killedEntity.getMaxHealth() / 20d); + soulList.add(soulStack); + } + } + + return soulList; + } + + // TODO: Change attack speed. + @Override + public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + { + Multimap multimap = HashMultimap.create(); + if (slot == EquipmentSlotType.MAINHAND) + { + multimap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.ATTACK_SPEED, new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MAX_HEALTH, new AttributeModifier(new UUID(0, 31818145), "Weapon modifier", this.getHealthBonusOfSword(stack), AttributeModifier.Operation.ADDITION)); + multimap.put(Attributes.MOVEMENT_SPEED, new AttributeModifier(new UUID(0, 4218052), "Weapon modifier", this.getSpeedOfSword(stack), AttributeModifier.Operation.ADDITION)); + } + + return multimap; + } + + public double getDamageOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DAMAGE); + } + + public void setDamageOfActivatedSword(ItemStack stack, double damage) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage); + } + + public double getDrainOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN); + } + + public void setDrainOfActivatedSword(ItemStack stack, double drain) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain); + } + + public double getStaticDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP); + } + + public void setStaticDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop); + } + + public double getDropOfActivatedSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_DROP); + } + + public void setDropOfActivatedSword(ItemStack stack, double drop) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop); + } + + public double getHealthBonusOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_HEALTH); + } + + public void setHealthBonusOfSword(ItemStack stack, double hp) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp); + } + + public double getAttackSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED); + } + + public void setAttackSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed); + } + + public double getSpeedOfSword(ItemStack stack) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + return tag.getDouble(Constants.NBT.SOUL_SWORD_SPEED); + } + + public void setSpeedOfSword(ItemStack stack, double speed) + { + NBTHelper.checkNBT(stack); + + CompoundNBT tag = stack.getTag(); + + tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed); + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulGem.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulGem.java new file mode 100644 index 00000000..1bbfbf24 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulGem.java @@ -0,0 +1,257 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.List; +import java.util.Locale; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.IMultiWillTool; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillGem; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class ItemSoulGem extends Item implements IDemonWillGem, IMultiWillTool +{ + private final int maxWill; + private final String name; + + public ItemSoulGem(String name, int maxWill) + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + this.name = name; + this.maxWill = maxWill; + } + + @Override + public void fillItemGroup(ItemGroup group, NonNullList items) + { + if (this.isInGroup(group)) + { + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + ItemStack stack = new ItemStack(this); + this.setCurrentType(type, stack); + this.setWill(type, stack, maxWill); + items.add(stack); + } + } + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + ItemStack stack = player.getHeldItem(hand); + EnumDemonWillType type = this.getCurrentType(stack); + double drain = Math.min(this.getWill(type, stack), this.getMaxWill(type, stack) / 10); + + double filled = PlayerDemonWillHandler.addDemonWill(type, player, drain, stack); + this.drainWill(type, stack, filled, true); + + return new ActionResult<>(ActionResultType.PASS, stack); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + if (!stack.hasTag()) + return; + + EnumDemonWillType type = this.getCurrentType(stack); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulGem." + name).mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(type, stack))).mergeStyle(TextFormatting.GRAY)); + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) + { + return true; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) + { + EnumDemonWillType type = this.getCurrentType(stack); + double maxWill = getMaxWill(type, stack); + if (maxWill <= 0) + { + return 1; + } + return 1.0 - (getWill(type, stack) / maxWill); + } + + @Override + public int getRGBDurabilityForDisplay(ItemStack stack) + { + EnumDemonWillType type = this.getCurrentType(stack); + double maxWill = getMaxWill(type, stack); + if (maxWill <= 0) + { + return 1; + } + + return MathHelper.hsvToRGB(Math.max(0.0F, (float) (getWill(type, stack)) / (float) maxWill) / 3.0F, 1.0F, 1.0F); + } + + @Override + public ItemStack fillDemonWillGem(ItemStack soulGemStack, ItemStack soulStack) + { + if (soulStack != null && soulStack.getItem() instanceof IDemonWill) + { + EnumDemonWillType thisType = this.getCurrentType(soulGemStack); + if (thisType != ((IDemonWill) soulStack.getItem()).getType(soulStack)) + { + return soulStack; + } + IDemonWill soul = (IDemonWill) soulStack.getItem(); + double soulsLeft = getWill(thisType, soulGemStack); + + if (soulsLeft < getMaxWill(thisType, soulGemStack)) + { + double newSoulsLeft = Math.min(soulsLeft + soul.getWill(thisType, soulStack), getMaxWill(thisType, soulGemStack)); + soul.drainWill(thisType, soulStack, newSoulsLeft - soulsLeft); + + setWill(thisType, soulGemStack, newSoulsLeft); + if (soul.getWill(thisType, soulStack) <= 0) + { + return ItemStack.EMPTY; + } + } + } + + return soulStack; + } + + @Override + public double getWill(EnumDemonWillType type, ItemStack soulGemStack) + { + if (!type.equals(getCurrentType(soulGemStack))) + { + return 0; + } + + CompoundNBT tag = soulGemStack.getTag(); + + return tag.getDouble(Constants.NBT.SOULS); + } + + @Override + public void setWill(EnumDemonWillType type, ItemStack soulGemStack, double souls) + { + setCurrentType(type, soulGemStack); + + CompoundNBT tag = soulGemStack.getTag(); + + tag.putDouble(Constants.NBT.SOULS, souls); + } + + @Override + public double drainWill(EnumDemonWillType type, ItemStack soulGemStack, double drainAmount, boolean doDrain) + { + EnumDemonWillType currentType = this.getCurrentType(soulGemStack); + if (currentType != type) + { + return 0; + } + double souls = getWill(type, soulGemStack); + + double soulsDrained = Math.min(drainAmount, souls); + + if (doDrain) + { + setWill(type, soulGemStack, souls - soulsDrained); + } + + return soulsDrained; + } + + @Override + public int getMaxWill(EnumDemonWillType type, ItemStack soulGemStack) + { + EnumDemonWillType currentType = getCurrentType(soulGemStack); + if (!type.equals(currentType) && currentType != EnumDemonWillType.DEFAULT) + { + return 0; + } + + return maxWill; + } + + @Override + public EnumDemonWillType getCurrentType(ItemStack soulGemStack) + { + NBTHelper.checkNBT(soulGemStack); + + CompoundNBT tag = soulGemStack.getTag(); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + return EnumDemonWillType.DEFAULT; + } + + return EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + + public void setCurrentType(EnumDemonWillType type, ItemStack soulGemStack) + { + NBTHelper.checkNBT(soulGemStack); + + CompoundNBT tag = soulGemStack.getTag(); + + if (type == EnumDemonWillType.DEFAULT) + { + if (tag.contains(Constants.NBT.WILL_TYPE)) + { + tag.remove(Constants.NBT.WILL_TYPE); + } + + return; + } + + tag.putString(Constants.NBT.WILL_TYPE, type.toString()); + } + + @Override + public double fillWill(EnumDemonWillType type, ItemStack stack, double fillAmount, boolean doFill) + { + if (!type.equals(getCurrentType(stack)) && this.getWill(getCurrentType(stack), stack) > 0) + { + return 0; + } + + double current = this.getWill(type, stack); + double maxWill = this.getMaxWill(type, stack); + + double filled = Math.min(fillAmount, maxWill - current); + + if (doFill) + { + this.setWill(type, stack, filled + current); + } + + return filled; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java new file mode 100644 index 00000000..2de6557d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java @@ -0,0 +1,72 @@ +package wayoftime.bloodmagic.common.item.soul; + +import java.util.List; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.entity.projectile.EntitySoulSnare; + +public class ItemSoulSnare extends Item +{ + public static String[] names = { "base" }; + + public ItemSoulSnare() + { + super(new Item.Properties().maxStackSize(16).group(BloodMagic.TAB)); + +// setTranslationKey(BloodMagic.MODID + ".soulSnare."); +// setCreativeTab(BloodMagic.TAB_BM); +// setHasSubtypes(true); +// setMaxStackSize(16); + } + + @Override + public ActionResult onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand) + { + ItemStack stack = playerIn.getHeldItem(hand); + if (!playerIn.isCreative()) + { + stack.shrink(1); + } + + worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F)); + + if (!worldIn.isRemote) + { +// System.out.println("Attempting to spawn"); + EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn); + snare.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); + worldIn.addEntity(snare); +// +// SnowballEntity snowballentity = new SnowballEntity(worldIn, playerIn); +// snowballentity.setItem(itemstack); +// snowballentity.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); +// worldIn.addEntity(snowballentity); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulSnare.desc").mergeStyle(TextFormatting.GRAY)); + + super.addInformation(stack, world, tooltip, flag); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/ARCRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/ARCRecipeProvider.java new file mode 100644 index 00000000..1a7bbd1e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/ARCRecipeProvider.java @@ -0,0 +1,111 @@ +package wayoftime.bloodmagic.common.recipe; + +import java.util.function.Consumer; + +import net.minecraft.block.Blocks; +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.tags.ITag; +import net.minecraftforge.common.Tags; +import net.minecraftforge.common.crafting.conditions.ICondition; +import net.minecraftforge.common.crafting.conditions.NotCondition; +import net.minecraftforge.common.crafting.conditions.TagEmptyCondition; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; +import wayoftime.bloodmagic.common.data.recipe.builder.ARCRecipeBuilder; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class ARCRecipeProvider implements ISubRecipeProvider +{ + @Override + public void addRecipes(Consumer consumer) + { + String basePath = "arc/"; +// ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), Ingredient.fromTag(Tags.Items.BONES), null, new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get()), null).addRandomOutput(new ItemStack(Items.DIAMOND, 2), 0.5).build(consumer, BloodMagic.rl(basePath + "test1")); +// ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), Ingredient.fromTag(Tags.Items.BONES), null, new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get()), null).addRandomOutput(new ItemStack(Items.DIAMOND, 5), 0.5).build(consumer, BloodMagic.rl(basePath + "test3")); +// ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), Ingredient.fromItems(Items.ACACIA_BOAT), FluidStackIngredient.from(Fluids.LAVA, 1000), new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get()), new FluidStack(Fluids.WATER, 100)).build(consumer, BloodMagic.rl(basePath + "test2")); +// ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.NETHERRACK), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_REVERTER), FluidStackIngredient.from(Fluids.LAVA, 1000), new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get()), new FluidStack(Fluids.WATER, 100)).addRandomOutput(new ItemStack(BloodMagicItems.SLATE.get()), 0.2).addRandomOutput(new ItemStack(BloodMagicItems.REINFORCED_SLATE.get()), 0.1).addRandomOutput(new ItemStack(BloodMagicItems.IMBUED_SLATE.get()), 0.001).build(consumer, BloodMagic.rl(basePath + "test4")); + + ARCRecipeBuilder.arc(Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_REVERTER), null, new ItemStack(BloodMagicItems.WEAK_BLOOD_SHARD.get()), null).addRandomOutput(new ItemStack(BloodMagicItems.WEAK_BLOOD_SHARD.get()), 0.2).build(consumer, BloodMagic.rl(basePath + "weakbloodshard")); + ARCRecipeBuilder.arc(Ingredient.fromItems(Items.IRON_ORE), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.IRON_SAND.get(), 2), null).build(consumer, BloodMagic.rl(basePath + "ore/dustiron")); + ARCRecipeBuilder.arc(Ingredient.fromItems(Items.GOLD_ORE), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.GOLD_SAND.get(), 2), null).build(consumer, BloodMagic.rl(basePath + "ore/dustgold")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.NETHERRACK), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.SULFUR.get()), new FluidStack(Fluids.LAVA, 5)).build(consumer, BloodMagic.rl(basePath + "netherrack_to_sulfer")); + ARCRecipeBuilder.arc(Ingredient.fromItems(Items.TERRACOTTA), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_HYDRATE), FluidStackIngredient.from(Fluids.WATER, 200), new ItemStack(Blocks.CLAY), null).build(consumer, BloodMagic.rl(basePath + "clay_from_terracotta")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.SAND), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_HYDRATE), FluidStackIngredient.from(Fluids.WATER, 200), new ItemStack(Items.CLAY_BALL), null).addRandomOutput(new ItemStack(Items.CLAY_BALL), 0.5).build(consumer, BloodMagic.rl(basePath + "clay_from_sand")); + +// ConditionalRecipe.builder().addCondition(new TagEmptyCondition(Tags.Items.ORES_IRON.getName())); + + addReversionRecipes(consumer); + addSandRecipes(consumer); + addFragmentRecipes(consumer); + addGravelRecipes(consumer); + } + + private ICondition getTagCondition(ITag.INamedTag tag) + { + return new NotCondition(new TagEmptyCondition(tag.getName())); + } + + private void addSandRecipes(Consumer consumer) + { + String basePath = "arc/dusts"; + + // Ore to dust + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.ORES_IRON), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.IRON_SAND.get(), 2), null).build(consumer, BloodMagic.rl(basePath + "from_ore_iron")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.ORES_GOLD), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.GOLD_SAND.get(), 2), null).build(consumer, BloodMagic.rl(basePath + "from_ore_gold")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.ORES_NETHERITE_SCRAP), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.NETHERITE_SCRAP_SAND.get(), 2), null).build(consumer, BloodMagic.rl(basePath + "from_ore_netherite_scrap")); + + // Ingot to dust + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.INGOTS_IRON), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.IRON_SAND.get()), null).build(consumer, BloodMagic.rl(basePath + "from_ingot_iron")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.INGOTS_GOLD), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.GOLD_SAND.get()), null).build(consumer, BloodMagic.rl(basePath + "from_ingot_gold")); + ARCRecipeBuilder.arc(Ingredient.fromItems(Items.NETHERITE_SCRAP), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.NETHERITE_SCRAP_SAND.get()), null).build(consumer, BloodMagic.rl(basePath + "from_ingot_netherite_scrap")); + + // Gravel to dust + ARCRecipeBuilder.arc(Ingredient.fromTag(BloodMagicTags.GRAVEL_IRON), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.IRON_SAND.get()), null).build(consumer, BloodMagic.rl(basePath + "from_gravel_iron")); + ARCRecipeBuilder.arc(Ingredient.fromTag(BloodMagicTags.GRAVEL_GOLD), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.GOLD_SAND.get()), null).build(consumer, BloodMagic.rl(basePath + "from_gravel_gold")); + ARCRecipeBuilder.arc(Ingredient.fromTag(BloodMagicTags.GRAVEL_NETHERITE_SCRAP), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID), null, new ItemStack(BloodMagicItems.NETHERITE_SCRAP_SAND.get()), null).build(consumer, BloodMagic.rl(basePath + "from_gravel_netherite_scrap")); + } + + private void addFragmentRecipes(Consumer consumer) + { + String basePath = "arc/fragments"; + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.ORES_IRON), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.IRON_FRAGMENT.get(), 3), null).build(consumer, BloodMagic.rl(basePath + "iron")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.ORES_GOLD), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.GOLD_FRAGMENT.get(), 3), null).build(consumer, BloodMagic.rl(basePath + "gold")); + ARCRecipeBuilder.arc(Ingredient.fromTag(Tags.Items.ORES_NETHERITE_SCRAP), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_EXPLOSIVE), null, new ItemStack(BloodMagicItems.NETHERITE_SCRAP_FRAGMENT.get(), 3), null).build(consumer, BloodMagic.rl(basePath + "netherite_scrap")); + } + + private void addGravelRecipes(Consumer consumer) + { + String basePath = "arc/gravels"; + ARCRecipeBuilder.arc(Ingredient.fromTag(BloodMagicTags.FRAGMENT_IRON), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_RESONATOR), null, new ItemStack(BloodMagicItems.IRON_GRAVEL.get()), null).addRandomOutput(new ItemStack(BloodMagicItems.CORRUPTED_DUST_TINY.get()), 0.05).addRandomOutput(new ItemStack(BloodMagicItems.CORRUPTED_DUST_TINY.get()), 0.01).build(consumer, BloodMagic.rl(basePath + "iron")); + ARCRecipeBuilder.arc(Ingredient.fromTag(BloodMagicTags.FRAGMENT_GOLD), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_RESONATOR), null, new ItemStack(BloodMagicItems.GOLD_GRAVEL.get()), null).addRandomOutput(new ItemStack(BloodMagicItems.CORRUPTED_DUST_TINY.get()), 0.05).addRandomOutput(new ItemStack(BloodMagicItems.CORRUPTED_DUST_TINY.get()), 0.01).build(consumer, BloodMagic.rl(basePath + "gold")); + ARCRecipeBuilder.arc(Ingredient.fromTag(BloodMagicTags.FRAGMENT_NETHERITE_SCRAP), Ingredient.fromTag(BloodMagicTags.ARC_TOOL_RESONATOR), null, new ItemStack(BloodMagicItems.NETHERITE_SCRAP_GRAVEL.get()), null).addRandomOutput(new ItemStack(BloodMagicItems.CORRUPTED_DUST_TINY.get()), 0.05).addRandomOutput(new ItemStack(BloodMagicItems.CORRUPTED_DUST_TINY.get()), 0.01).build(consumer, BloodMagic.rl(basePath + "netherite_scrap")); + } + + private void addReversionRecipes(Consumer consumer) + { + String basePath = "arc/reversion/"; + // ONE + registerReversionRecipe(Ingredient.fromItems(BloodMagicItems.WEAK_BLOOD_ORB.get()), new ItemStack(Items.DIAMOND), consumer, basePath + "weak_blood_orb"); + + // TWO + registerReversionRecipe(Ingredient.fromItems(BloodMagicItems.APPRENTICE_BLOOD_ORB.get()), new ItemStack(Blocks.REDSTONE_BLOCK), consumer, basePath + "apprentice_blood_orb"); + + // THREE + registerReversionRecipe(Ingredient.fromItems(BloodMagicItems.MAGICIAN_BLOOD_ORB.get()), new ItemStack(Blocks.GOLD_BLOCK), consumer, basePath + "magician_blood_orb"); + + // FOUR + registerReversionRecipe(Ingredient.fromItems(BloodMagicItems.MASTER_BLOOD_ORB.get()), new ItemStack(BloodMagicItems.WEAK_BLOOD_SHARD.get()), consumer, basePath + "master_blood_orb"); + } + + private void registerReversionRecipe(Ingredient input, ItemStack outputStack, Consumer consumer, String path) + { + ARCRecipeBuilder.arcConsume(input, Ingredient.fromTag(BloodMagicTags.ARC_TOOL_REVERTER), null, outputStack, null).build(consumer, BloodMagic.rl(path)); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyArrayRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyArrayRecipeProvider.java new file mode 100644 index 00000000..6350126d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyArrayRecipeProvider.java @@ -0,0 +1,58 @@ +package wayoftime.bloodmagic.common.recipe; + +import java.util.function.Consumer; + +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.Ingredient; +import net.minecraftforge.common.Tags; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.data.recipe.builder.AlchemyArrayRecipeBuilder; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.core.registry.AlchemyArrayRegistry; + +public class AlchemyArrayRecipeProvider implements ISubRecipeProvider +{ + + @Override + public void addRecipes(Consumer consumer) + { + String basePath = "array/"; +// AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/airsigil.png"), Ingredient.fromItems(Items.STONE), Ingredient.fromItems(Items.STONE), new ItemStack(Items.DIAMOND)).build(consumer, BloodMagic.rl(basePath +// + "airsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/divinationsigil.png"), Ingredient.fromItems(Items.REDSTONE), Ingredient.fromItems(BloodMagicItems.SLATE.get()), new ItemStack(BloodMagicItems.DIVINATION_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "divinationsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/watersigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_WATER.get()), Ingredient.fromItems(BloodMagicItems.SLATE.get()), new ItemStack(BloodMagicItems.WATER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "watersigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/lavasigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_LAVA.get()), Ingredient.fromItems(BloodMagicItems.SLATE.get()), new ItemStack(BloodMagicItems.LAVA_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "lavasigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/voidsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_VOID.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.VOID_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "voidsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/growthsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_GROWTH.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.GREEN_GROVE_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "growthsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/fastminersigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_FAST_MINER.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.FAST_MINER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "fastminersigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/magnetismsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_MAGNETISM.get()), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.MAGNETISM_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "magnetismsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/lightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_BLOOD_LIGHT.get()), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.BLOOD_LIGHT_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "bloodlightsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/airsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_AIR.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.AIR_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "airsigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/sightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_SIGHT.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.SEER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "seersigil")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/sightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_HOLDING.get()), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.HOLDING_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "holdingsigil")); + AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_HELMET), new ItemStack(BloodMagicItems.LIVING_HELMET.get())).build(consumer, BloodMagic.rl(basePath + "living_helmet")); + AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_CHESTPLATE), new ItemStack(BloodMagicItems.LIVING_PLATE.get())).build(consumer, BloodMagic.rl(basePath + "living_plate")); + AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_LEGGINGS), new ItemStack(BloodMagicItems.LIVING_LEGGINGS.get())).build(consumer, BloodMagic.rl(basePath + "living_leggings")); + AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_BOOTS), new ItemStack(BloodMagicItems.LIVING_BOOTS.get())).build(consumer, BloodMagic.rl(basePath + "living_boots")); + + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/movementarray.png"), Ingredient.fromItems(Items.FEATHER), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "movement")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/updraftarray.png"), Ingredient.fromItems(Items.FEATHER), Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "updraft")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/spikearray.png"), Ingredient.fromItems(Items.COBBLESTONE), Ingredient.fromTag(Tags.Items.INGOTS_IRON), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "spike")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/sunarray.png"), Ingredient.fromItems(Items.COAL), Ingredient.fromItems(Items.COAL), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "day")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/moonarray.png"), Ingredient.fromItems(Items.LAPIS_LAZULI), Ingredient.fromItems(Items.LAPIS_LAZULI), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "night")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/growthsigil.png"), Ingredient.fromTag(Tags.Items.BONES), Ingredient.fromTag(Tags.Items.BONES), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "grove")); + AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/bouncearray.png"), Ingredient.fromTag(Tags.Items.SLIMEBALLS), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "bounce")); + // AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/fastminersigil.png"), + // Ingredient.fromItems(BloodMagicItems.REAGENT_FAST_MINER.get()), + // Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new + // ItemStack(BloodMagicItems.FAST_MINER_SIGIL.get())).build(consumer, + // BloodMagic.rl(basePath + "frostsigil")); +// BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get()), AltarTier.ONE.ordinal(), 2000, 2, 1).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath +// + "weakbloodorb")); +// BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STONE), new ItemStack(BloodMagicItems.SLATE.get()), AltarTier.ONE.ordinal(), 1000, 5, 5).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath +// + "slate")); + + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java new file mode 100644 index 00000000..233e2b07 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java @@ -0,0 +1,76 @@ +package wayoftime.bloodmagic.common.recipe; + +import java.util.function.Consumer; + +import net.minecraft.block.Blocks; +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.tags.ItemTags; +import net.minecraftforge.common.Tags; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.data.recipe.builder.AlchemyTableRecipeBuilder; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class AlchemyTableRecipeProvider implements ISubRecipeProvider +{ + @Override + public void addRecipes(Consumer consumer) + { + String basePath = "alchemytable/"; + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.STRING, 4), 100, 100, 0).addIngredient(Ingredient.fromTag(ItemTags.WOOL)).addIngredient(Ingredient.fromItems(Items.FLINT)).build(consumer, BloodMagic.rl(basePath + "string")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.FLINT, 2), 50, 20, 0).addIngredient(Ingredient.fromItems(Items.GRAVEL)).addIngredient(Ingredient.fromItems(Items.FLINT)).build(consumer, BloodMagic.rl(basePath + "flint_from_gravel")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.LEATHER, 4), 100, 200, 1).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.ROTTEN_FLESH)).addIngredient(Ingredient.fromItems(Items.FLINT)).addIngredient(Ingredient.fromItems(Items.WATER_BUCKET)).build(consumer, BloodMagic.rl(basePath + "leather_from_flesh")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.EXPLOSIVE_POWDER.get()), 500, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_COAL)).build(consumer, BloodMagic.rl(basePath + "explosive_powder")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.BREAD), 100, 100, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_WHEAT)).addIngredient(Ingredient.fromItems(Items.SUGAR)).build(consumer, BloodMagic.rl(basePath + "bread")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Blocks.GRASS_BLOCK), 200, 200, 1).addIngredient(Ingredient.fromItems(Items.DIRT)).addIngredient(Ingredient.fromItems(Items.BONE_MEAL)).addIngredient(Ingredient.fromItems(Items.WHEAT_SEEDS)).build(consumer, BloodMagic.rl(basePath + "grass_block")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.CLAY_BALL, 2), 50, 100, 2).addIngredient(Ingredient.fromTag(Tags.Items.SAND)).addIngredient(Ingredient.fromTag(Tags.Items.SAND)).addIngredient(Ingredient.fromItems(Items.WATER_BUCKET)).build(consumer, BloodMagic.rl(basePath + "clay_from_sand")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.COBWEB), 50, 50, 1).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).build(consumer, BloodMagic.rl(basePath + "cobweb")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.NETHER_WART), 50, 40, 1).addIngredient(Ingredient.fromItems(Items.NETHER_WART_BLOCK)).build(consumer, BloodMagic.rl(basePath + "nether_wart_from_block")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.GOLD_NUGGET, 9), 200, 100, 2).addIngredient(Ingredient.fromItems(Items.GILDED_BLACKSTONE)).build(consumer, BloodMagic.rl(basePath + "gold_ore_from_gilded")); + + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.GUNPOWDER, 3), 0, 100, 0).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_SULFUR)).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_SALTPETER)).addIngredient(Ingredient.fromTag(ItemTags.COALS)).build(consumer, BloodMagic.rl(basePath + "gunpowder")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.PLANT_OIL.get()), 100, 100, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_CARROT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_CARROT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_CARROT)).addIngredient(Ingredient.fromItems(Items.BONE_MEAL)).build(consumer, BloodMagic.rl(basePath + "plantoil_from_carrots")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.PLANT_OIL.get()), 100, 100, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_POTATO)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_POTATO)).addIngredient(Ingredient.fromItems(Items.BONE_MEAL)).build(consumer, BloodMagic.rl(basePath + "plantoil_from_taters")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.PLANT_OIL.get()), 100, 100, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_WHEAT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_WHEAT)).addIngredient(Ingredient.fromItems(Items.BONE_MEAL)).build(consumer, BloodMagic.rl(basePath + "plantoil_from_wheat")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.PLANT_OIL.get()), 100, 100, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_BEETROOT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_BEETROOT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_BEETROOT)).addIngredient(Ingredient.fromItems(Items.BONE_MEAL)).build(consumer, BloodMagic.rl(basePath + "plantoil_from_beets")); + + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.IRON_SAND.get(), 2), 400, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.ORES_IRON)).addIngredient(Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID)).build(consumer, BloodMagic.rl(basePath + "sand_iron")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.GOLD_SAND.get(), 2), 400, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.ORES_GOLD)).addIngredient(Ingredient.fromTag(BloodMagicTags.ARC_TOOL_CUTTINGFLUID)).build(consumer, BloodMagic.rl(basePath + "sand_gold")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.COAL_SAND.get(), 4), 400, 200, 1).addIngredient(Ingredient.fromItems(Items.COAL)).addIngredient(Ingredient.fromItems(Items.COAL)).addIngredient(Ingredient.fromItems(Items.FLINT)).build(consumer, BloodMagic.rl(basePath + "sand_coal")); + + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.BASIC_CUTTING_FLUID.get()), 1000, 200, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.PLANT_OIL.get())).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromItems(Items.SUGAR)).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_COAL)).addIngredient(Ingredient.fromStacks(new ItemStack(Items.POTION))).build(consumer, BloodMagic.rl(basePath + "basic_cutting_fluid")); + + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.SLATE_VIAL.get(), 8), 500, 200, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE.get())).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).build(consumer, BloodMagic.rl(basePath + "slate_vial")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.FORTUNE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_COAL)).build(consumer, BloodMagic.rl(basePath + "fortune_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.SILK_TOUCH_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.COBWEB)).addIngredient(Ingredient.fromTag(Tags.Items.NUGGETS_GOLD)).build(consumer, BloodMagic.rl(basePath + "silk_touch_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.BLAZE_POWDER)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_QUARTZ)).build(consumer, BloodMagic.rl(basePath + "melee_damage_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HOLY_WATER_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLISTERING_MELON_SLICE)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_QUARTZ)).build(consumer, BloodMagic.rl(basePath + "holy_water_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLASS_BOTTLE)).addIngredient(Ingredient.fromItems(Items.ENCHANTED_BOOK)).build(consumer, BloodMagic.rl(basePath + "hidden_knowledge_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.QUICK_DRAW_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromItems(Items.SPECTRAL_ARROW)).build(consumer, BloodMagic.rl(basePath + "quick_draw_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.LOOTING_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_LAPIS)).addIngredient(Ingredient.fromTag(Tags.Items.BONES)).build(consumer, BloodMagic.rl(basePath + "looting_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.BOW_POWER_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.INGOTS_IRON)).addIngredient(Ingredient.fromItems(Items.BOW)).build(consumer, BloodMagic.rl(basePath + "bow_power_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.SMELTING_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.FURNACE)).addIngredient(Ingredient.fromItems(Items.CHARCOAL, Items.COAL)).build(consumer, BloodMagic.rl(basePath + "smelting_anointment")); + + // Changed Recipes + { + + } + { + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.ARCANE_ASHES.get()), 500, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.DYES_WHITE)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromTag(ItemTags.COALS)).build(consumer, BloodMagic.rl(basePath + "arcane_ash")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_AIR.get()), 2000, 200, 2).addIngredient(Ingredient.fromItems(Items.GHAST_TEAR)).addIngredient(Ingredient.fromTag(Tags.Items.FEATHERS)).addIngredient(Ingredient.fromTag(Tags.Items.FEATHERS)).build(consumer, BloodMagic.rl(basePath + "reagent_air")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_WATER.get()), 300, 200, 1).addIngredient(Ingredient.fromItems(Items.SUGAR)).addIngredient(Ingredient.fromItems(Items.WATER_BUCKET)).addIngredient(Ingredient.fromItems(Items.WATER_BUCKET)).build(consumer, BloodMagic.rl(basePath + "reagent_water")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_LAVA.get()), 1000, 200, 1).addIngredient(Ingredient.fromItems(Items.LAVA_BUCKET)).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.COBBLESTONE)).addIngredient(Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_COAL)).build(consumer, BloodMagic.rl(basePath + "reagent_lava")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_VOID.get()), 1000, 200, 2).addIngredient(Ingredient.fromItems(Items.BUCKET)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).build(consumer, BloodMagic.rl(basePath + "reagent_void")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_GROWTH.get()), 2000, 200, 2).addIngredient(Ingredient.fromTag(ItemTags.SAPLINGS)).addIngredient(Ingredient.fromTag(ItemTags.SAPLINGS)).addIngredient(Ingredient.fromItems(Items.SUGAR_CANE)).addIngredient(Ingredient.fromItems(Items.SUGAR)).build(consumer, BloodMagic.rl(basePath + "reagent_growth")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_MAGNETISM.get()), 1000, 200, 3).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.INGOTS_GOLD)).addIngredient(Ingredient.fromTag(Tags.Items.INGOTS_GOLD)).addIngredient(Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_IRON)).build(consumer, BloodMagic.rl(basePath + "reagent_magnetism")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_FAST_MINER.get()), 2000, 200, 2).addIngredient(Ingredient.fromItems(Items.IRON_PICKAXE)).addIngredient(Ingredient.fromItems(Items.IRON_AXE)).addIngredient(Ingredient.fromItems(Items.IRON_SHOVEL)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).build(consumer, BloodMagic.rl(basePath + "reagent_fastminer")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_BLOOD_LIGHT.get()), 1000, 200, 3).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE)).addIngredient(Ingredient.fromItems(Items.TORCH)).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).build(consumer, BloodMagic.rl(basePath + "reagent_blood_light")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_SIGHT.get()), 500, 200, 1).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).addIngredient(Ingredient.fromTag(Tags.Items.GLASS)).addIngredient(Ingredient.fromItems(BloodMagicItems.DIVINATION_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "reagent_sight")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_BINDING.get()), 1000, 200, 3).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).addIngredient(Ingredient.fromTag(Tags.Items.GUNPOWDER)).addIngredient(Ingredient.fromTag(Tags.Items.NUGGETS_GOLD)).build(consumer, BloodMagic.rl(basePath + "reagent_binding")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.REAGENT_HOLDING.get()), 2000, 200, 2).addIngredient(Ingredient.fromTag(Tags.Items.CHESTS)).addIngredient(Ingredient.fromTag(Tags.Items.LEATHER)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).build(consumer, BloodMagic.rl(basePath + "reagent_holding")); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/BloodAltarRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/BloodAltarRecipeProvider.java new file mode 100644 index 00000000..39f6f15a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/BloodAltarRecipeProvider.java @@ -0,0 +1,69 @@ +package wayoftime.bloodmagic.common.recipe; + +import java.util.function.Consumer; + +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.Tags; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.altar.AltarTier; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.data.recipe.builder.BloodAltarRecipeBuilder; +import wayoftime.bloodmagic.common.item.BloodMagicItems; + +public class BloodAltarRecipeProvider implements ISubRecipeProvider +{ + + @Override + public void addRecipes(Consumer consumer) + { + String basePath = "altar/"; + + // ONE + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get()), AltarTier.ONE.ordinal(), 2000, 5, 1).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath + "weakbloodorb")); + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STONE), new ItemStack(BloodMagicItems.SLATE.get()), AltarTier.ONE.ordinal(), 1000, 5, 5).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath + "slate")); + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(Items.BUCKET), new ItemStack(BloodMagicBlocks.LIFE_ESSENCE_BUCKET.get()), AltarTier.ONE.ordinal(), 1000, 5, 0).build(consumer, BloodMagic.rl(basePath + "bucket_life")); + + // TWO + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(BloodMagicItems.SLATE.get()), new ItemStack(BloodMagicItems.REINFORCED_SLATE.get()), AltarTier.TWO.ordinal(), 2000, 5, 5).build(consumer, BloodMagic.rl(basePath + "reinforcedslate")); + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_REDSTONE), new ItemStack(BloodMagicItems.APPRENTICE_BLOOD_ORB.get()), AltarTier.TWO.ordinal(), 5000, 5, 5).build(consumer, BloodMagic.rl(basePath + "apprenticebloodorb")); + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(Items.IRON_SWORD), new ItemStack(BloodMagicItems.DAGGER_OF_SACRIFICE.get()), AltarTier.TWO.ordinal(), 3000, 5, 5).build(consumer, BloodMagic.rl(basePath + "daggerofsacrifice")); + + // THREE + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.IMBUED_SLATE.get()), AltarTier.THREE.ordinal(), 5000, 15, 10).build(consumer, BloodMagic.rl(basePath + "imbuedslate")); + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_GOLD), new ItemStack(BloodMagicItems.MAGICIAN_BLOOD_ORB.get()), AltarTier.THREE.ordinal(), 25000, 20, 20).build(consumer, BloodMagic.rl(basePath + "magicianbloodorb")); + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.OBSIDIAN), new ItemStack(BloodMagicItems.EARTH_INSCRIPTION_TOOL.get()), AltarTier.THREE.ordinal(), 1000, 5, 5).build(consumer, BloodMagic.rl(basePath + "earth_tool")); + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_LAPIS), new ItemStack(BloodMagicItems.WATER_INSCRIPTION_TOOL.get()), AltarTier.THREE.ordinal(), 1000, 5, 5).build(consumer, BloodMagic.rl(basePath + "water_tool")); + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(Items.MAGMA_CREAM), new ItemStack(BloodMagicItems.FIRE_INSCRIPTION_TOOL.get()), AltarTier.THREE.ordinal(), 1000, 5, 5).build(consumer, BloodMagic.rl(basePath + "fire_tool")); + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(Items.GHAST_TEAR), new ItemStack(BloodMagicItems.AIR_INSCRIPTION_TOOL.get()), AltarTier.THREE.ordinal(), 1000, 5, 5).build(consumer, BloodMagic.rl(basePath + "air_tool")); + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(BloodMagicItems.LAVA_CRYSTAL.get()), new ItemStack(BloodMagicItems.WEAK_ACTIVATION_CRYSTAL.get()), AltarTier.THREE.ordinal(), 10000, 20, 10).build(consumer, BloodMagic.rl("weak_activation_crystal")); + + // FOUR + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.DEMONIC_SLATE.get()), AltarTier.FOUR.ordinal(), 15000, 20, 20).build(consumer, BloodMagic.rl(basePath + "demonicslate")); + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_COAL), new ItemStack(BloodMagicItems.DUSK_INSCRIPTION_TOOL.get()), AltarTier.FOUR.ordinal(), 2000, 20, 10).build(consumer, BloodMagic.rl(basePath + "dusk_tool")); + BloodAltarRecipeBuilder.altar(Ingredient.fromItems(BloodMagicItems.WEAK_BLOOD_SHARD.get()), new ItemStack(BloodMagicItems.MASTER_BLOOD_ORB.get()), AltarTier.FOUR.ordinal(), 40000, 30, 50).build(consumer, BloodMagic.rl(basePath + "masterbloodorb")); + + // Changed Recipes + { + + } + { + BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STRING), new ItemStack(BloodMagicItems.SOUL_SNARE.get()), AltarTier.ONE.ordinal(), 500, 5, 1).build(consumer, BloodMagic.rl(basePath + "soul_snare")); + } + +// // FOUR +// registrar.addBloodAltar(Ingredient.fromStacks(new ItemStack(RegistrarBloodMagicItems.BLOOD_SHARD)), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MASTER), AltarTier.FOUR.ordinal(), 40000, 30, 50); +// registrar.addBloodAltar(Ingredient.fromStacks(ItemSlate.SlateType.IMBUED.getStack()), ItemSlate.SlateType.DEMONIC.getStack(), AltarTier.FOUR.ordinal(), 15000, 20, 20); +// registrar.addBloodAltar(new OreIngredient("blockCoal"), EnumRuneType.DUSK.getStack(), AltarTier.FOUR.ordinal(), 2000, 20, 10); +// registrar.addBloodAltar(new OreIngredient("enderpearl"), new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS), AltarTier.FOUR.ordinal(), 2000, 10, 10); +// registrar.addBloodAltar(Ingredient.fromStacks(new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS)), new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS, 1, 1), AltarTier.FOUR.ordinal(), 10000, 20, 10); +// +// // FIVE +// registrar.addBloodAltar(new OreIngredient("netherStar"), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_ARCHMAGE), AltarTier.FIVE.ordinal(), 80000, 50, 100); +// registrar.addBloodAltar(Ingredient.fromStacks(ItemSlate.SlateType.DEMONIC.getStack()), ItemSlate.SlateType.ETHEREAL.getStack(), AltarTier.FIVE.ordinal(), 30000, 40, 100); + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/BloodMagicRecipeType.java b/src/main/java/wayoftime/bloodmagic/common/recipe/BloodMagicRecipeType.java new file mode 100644 index 00000000..bd699910 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/BloodMagicRecipeType.java @@ -0,0 +1,18 @@ +package wayoftime.bloodmagic.common.recipe; + +import net.minecraft.item.crafting.IRecipeType; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; + +public class BloodMagicRecipeType +{ + public static final IRecipeType ALTAR = IRecipeType.register(BloodMagic.MODID + ":altar"); + public static final IRecipeType ARRAY = IRecipeType.register(BloodMagic.MODID + ":array"); + public static final IRecipeType TARTARICFORGE = IRecipeType.register(BloodMagic.MODID + ":soulforge"); + public static final IRecipeType ARC = IRecipeType.register(BloodMagic.MODID + ":arc"); + public static final IRecipeType ALCHEMYTABLE = IRecipeType.register(BloodMagic.MODID + ":alchemytable"); +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/ISubRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/ISubRecipeProvider.java new file mode 100644 index 00000000..d7aa8f7c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/ISubRecipeProvider.java @@ -0,0 +1,14 @@ +package wayoftime.bloodmagic.common.recipe; + +import java.util.function.Consumer; + +import net.minecraft.data.IFinishedRecipe; + +/** + * Interface for helping split the recipe provider over multiple classes to make + * it a bit easier to interact with + */ +public interface ISubRecipeProvider +{ + void addRecipes(Consumer consumer); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/TartaricForgeRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/TartaricForgeRecipeProvider.java new file mode 100644 index 00000000..aa5fc597 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/TartaricForgeRecipeProvider.java @@ -0,0 +1,119 @@ +package wayoftime.bloodmagic.common.recipe; + +import java.util.function.Consumer; + +import net.minecraft.data.IFinishedRecipe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.tags.ItemTags; +import net.minecraftforge.common.Tags; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.anointment.AnointmentData; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.data.recipe.builder.TartaricForgeRecipeBuilder; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.core.AnointmentRegistrar; + +public class TartaricForgeRecipeProvider implements ISubRecipeProvider +{ + + @Override + public void addRecipes(Consumer consumer) + { + String basePath = "soulforge/"; + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.PETTY_GEM.get()), 1, 1, Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromTag(Tags.Items.INGOTS_GOLD), Ingredient.fromTag(Tags.Items.GLASS), Ingredient.fromTag(Tags.Items.GEMS_LAPIS)).build(consumer, BloodMagic.rl(basePath + "pettytartaricgem")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.LESSER_GEM.get()), 60, 20, Ingredient.fromItems(BloodMagicItems.PETTY_GEM.get()), Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_REDSTONE), Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_LAPIS)).build(consumer, BloodMagic.rl(basePath + "lessertartaricgem")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.COMMON_GEM.get()), 240, 50, Ingredient.fromItems(BloodMagicItems.LESSER_GEM.get()), Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_GOLD), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get())).build(consumer, BloodMagic.rl(basePath + "commontartaricgem")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.GREATER_GEM.get()), 1000, 100, Ingredient.fromItems(BloodMagicItems.COMMON_GEM.get()), Ingredient.fromItems(BloodMagicItems.DEMONIC_SLATE.get()), Ingredient.fromItems(BloodMagicItems.WEAK_BLOOD_SHARD.get()), Ingredient.fromTag(BloodMagicTags.CRYSTAL_DEMON)).build(consumer, BloodMagic.rl(basePath + "greatertartaricgem")); + + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.SENTIENT_SWORD.get()), 0, 0, Ingredient.fromItems(BloodMagicItems.PETTY_GEM.get()), Ingredient.fromItems(Items.IRON_SWORD)).build(consumer, BloodMagic.rl(basePath + "sentientsword")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.SENTIENT_AXE.get()), 0, 0, Ingredient.fromItems(BloodMagicItems.PETTY_GEM.get()), Ingredient.fromItems(Items.IRON_AXE)).build(consumer, BloodMagic.rl(basePath + "sentientaxe")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.SENTIENT_PICKAXE.get()), 0, 0, Ingredient.fromItems(BloodMagicItems.PETTY_GEM.get()), Ingredient.fromItems(Items.IRON_PICKAXE)).build(consumer, BloodMagic.rl(basePath + "sentientpickaxe")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.SENTIENT_SHOVEL.get()), 0, 0, Ingredient.fromItems(BloodMagicItems.PETTY_GEM.get()), Ingredient.fromItems(Items.IRON_SHOVEL)).build(consumer, BloodMagic.rl(basePath + "sentientshovel")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.SENTIENT_SCYTHE.get()), 0, 0, Ingredient.fromItems(BloodMagicItems.PETTY_GEM.get()), Ingredient.fromItems(Items.IRON_HOE)).build(consumer, BloodMagic.rl(basePath + "sentientscythe")); + + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEMON_CRUCIBLE.get()), 400, 100, Ingredient.fromItems(Items.CAULDRON), Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromTag(Tags.Items.GEMS_LAPIS), Ingredient.fromTag(Tags.Items.GEMS_DIAMOND)).build(consumer, BloodMagic.rl(basePath + "demon_crucible")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEMON_CRYSTALLIZER.get()), 500, 100, Ingredient.fromItems(BloodMagicBlocks.SOUL_FORGE.get()), Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromTag(Tags.Items.GEMS_LAPIS), Ingredient.fromTag(Tags.Items.GLASS)).build(consumer, BloodMagic.rl(basePath + "demon_crystallizer")); + + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.SANGUINE_REVERTER.get()), 350, 30, Ingredient.fromItems(Items.SHEARS), Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), Ingredient.fromTag(Tags.Items.INGOTS_IRON)).build(consumer, BloodMagic.rl(basePath + "sanguine_reverter")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.PRIMITIVE_CRYSTALLINE_RESONATOR.get()), 1200, 200, Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromTag(Tags.Items.INGOTS), Ingredient.fromItems(BloodMagicItems.RAW_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.RAW_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "primitive_crystalline_resonator")); + + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.RAW_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.RAW_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.RAW_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.RAW_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "raw_crystal_block")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.CORROSIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.CORROSIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.CORROSIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.CORROSIVE_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "corrosive_crystal_block")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.DESTRUCTIVE_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "destructive_crystal_block")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.VENGEFUL_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "vengeful_crystal_block")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get()), 1200, 100, Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get()), Ingredient.fromItems(BloodMagicItems.STEADFAST_CRYSTAL.get())).build(consumer, BloodMagic.rl(basePath + "steadfast_crystal_block")); + + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.SHAPED_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SAND), Ingredient.fromTag(Tags.Items.STONE)).build(consumer, BloodMagic.rl(basePath + "shaped_charge")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(ItemTags.LOGS), Ingredient.fromTag(ItemTags.PLANKS)).build(consumer, BloodMagic.rl(basePath + "deforester_charge")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.VEINMINE_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SANDSTONE), Ingredient.fromTag(Tags.Items.SAND)).build(consumer, BloodMagic.rl(basePath + "vein_charge")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.FUNGAL_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(BloodMagicTags.MUSHROOM_HYPHAE), Ingredient.fromTag(Tags.Items.MUSHROOMS)).build(consumer, BloodMagic.rl(basePath + "fungal_charge")); + + ItemStack stack = new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get()); + AnointmentHolder smeltingHolder = new AnointmentHolder(); + smeltingHolder.applyAnointment(stack, AnointmentRegistrar.ANOINTMENT_SMELTING.get(), new AnointmentData(1, 1, 1)); + + AnointmentHolder fortune1Holder = new AnointmentHolder(); + fortune1Holder.applyAnointment(stack, AnointmentRegistrar.ANOINTMENT_FORTUNE.get(), new AnointmentData(1, 1, 1)); + + AnointmentHolder silkHolder = new AnointmentHolder(); + silkHolder.applyAnointment(stack, AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get(), new AnointmentData(1, 1, 1)); + +// smeltingHolder.toItemStack(stack); + + String[] suffixArray = new String[] { "_smelting", "_fortune_1", "_silk_touch" }; + AnointmentHolder[] holderArray = new AnointmentHolder[] { smeltingHolder, fortune1Holder, silkHolder }; + Ingredient[] firstIngredientArray = new Ingredient[] { Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART), + Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART), Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART) }; + Ingredient[] secondIngredientArray = new Ingredient[] { Ingredient.fromItems(Items.FURNACE), + Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromItems(Items.COBWEB) }; + Ingredient[] thirdIngredientArray = new Ingredient[] { Ingredient.fromItems(Items.CHARCOAL, Items.COAL), + Ingredient.fromTag(BloodMagicTags.DUST_COAL), Ingredient.fromTag(Tags.Items.NUGGETS_GOLD) }; + + for (int i = 0; i < suffixArray.length; i++) + { + ItemStack deforesterStack = new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get()); + ItemStack fungalStack = new ItemStack(BloodMagicBlocks.FUNGAL_CHARGE.get()); + ItemStack shapedStack = new ItemStack(BloodMagicBlocks.SHAPED_CHARGE.get()); + ItemStack veinStack = new ItemStack(BloodMagicBlocks.VEINMINE_CHARGE.get()); + + AnointmentHolder holder = holderArray[i]; + holder.toItemStack(deforesterStack); + holder.toItemStack(fungalStack); + holder.toItemStack(shapedStack); + holder.toItemStack(veinStack); + + TartaricForgeRecipeBuilder.tartaricForge(shapedStack, 60, 1, Ingredient.fromItems(BloodMagicItems.SHAPED_CHARGE_ITEM.get()), firstIngredientArray[i], secondIngredientArray[i], thirdIngredientArray[i]).build(consumer, BloodMagic.rl(basePath + "shaped_charge" + suffixArray[i])); + TartaricForgeRecipeBuilder.tartaricForge(deforesterStack, 60, 1, Ingredient.fromItems(BloodMagicItems.DEFORESTER_CHARGE_ITEM.get()), firstIngredientArray[i], secondIngredientArray[i], thirdIngredientArray[i]).build(consumer, BloodMagic.rl(basePath + "deforester_charge" + suffixArray[i])); + TartaricForgeRecipeBuilder.tartaricForge(veinStack, 60, 1, Ingredient.fromItems(BloodMagicItems.VEINMINE_CHARGE_ITEM.get()), firstIngredientArray[i], secondIngredientArray[i], thirdIngredientArray[i]).build(consumer, BloodMagic.rl(basePath + "vein_charge" + suffixArray[i])); + TartaricForgeRecipeBuilder.tartaricForge(fungalStack, 60, 1, Ingredient.fromItems(BloodMagicItems.FUNGAL_CHARGE_ITEM.get()), firstIngredientArray[i], secondIngredientArray[i], thirdIngredientArray[i]).build(consumer, BloodMagic.rl(basePath + "fungal_charge" + suffixArray[i])); + + } + + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.THROWING_DAGGER.get(), 16), 32, 5, Ingredient.fromTag(Tags.Items.INGOTS_IRON), Ingredient.fromTag(Tags.Items.INGOTS_IRON), Ingredient.fromTag(Tags.Items.STRING)).build(consumer, BloodMagic.rl(basePath + "throwing_dagger")); + TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.THROWING_DAGGER_SYRINGE.get(), 8), 10, 2, Ingredient.fromTag(Tags.Items.STONE), Ingredient.fromTag(Tags.Items.GLASS)).build(consumer, BloodMagic.rl(basePath + "throwing_dagger_syringe")); + + // Changed Recipes + { +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.ARCANE_ASHES.get()), 0, 0, Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromTag(Tags.Items.DYES_WHITE), Ingredient.fromTag(Tags.Items.GUNPOWDER), Ingredient.fromTag(ItemTags.COALS)).build(consumer, BloodMagic.rl(basePath + "arcaneashes")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_AIR.get()), 128, 20, Ingredient.fromItems(Items.GHAST_TEAR), Ingredient.fromTag(Tags.Items.FEATHERS), Ingredient.fromTag(Tags.Items.FEATHERS)).build(consumer, BloodMagic.rl(basePath + "reagent_air")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_WATER.get()), 10, 3, Ingredient.fromItems(Items.SUGAR), Ingredient.fromItems(Items.WATER_BUCKET), Ingredient.fromItems(Items.WATER_BUCKET)).build(consumer, BloodMagic.rl(basePath + "reagent_water")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_LAVA.get()), 32, 10, Ingredient.fromItems(Items.LAVA_BUCKET), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_COAL)).build(consumer, BloodMagic.rl(basePath + "reagent_lava")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_VOID.get()), 64, 10, Ingredient.fromItems(Items.BUCKET), Ingredient.fromTag(Tags.Items.STRING), Ingredient.fromTag(Tags.Items.STRING), Ingredient.fromTag(Tags.Items.GUNPOWDER)).build(consumer, BloodMagic.rl(basePath + "reagent_void")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_GROWTH.get()), 128, 20, Ingredient.fromTag(ItemTags.SAPLINGS), Ingredient.fromTag(ItemTags.SAPLINGS), Ingredient.fromItems(Items.SUGAR_CANE), Ingredient.fromItems(Items.SUGAR)).build(consumer, BloodMagic.rl(basePath + "reagent_growth")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_MAGNETISM.get()), 600, 10, Ingredient.fromTag(Tags.Items.STRING), Ingredient.fromTag(Tags.Items.INGOTS_GOLD), Ingredient.fromTag(Tags.Items.INGOTS_GOLD), Ingredient.fromTag(Tags.Items.STORAGE_BLOCKS_IRON)).build(consumer, BloodMagic.rl(basePath + "reagent_magnetism")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_FAST_MINER.get()), 128, 20, Ingredient.fromItems(Items.IRON_PICKAXE), Ingredient.fromItems(Items.IRON_AXE), Ingredient.fromItems(Items.IRON_SHOVEL), Ingredient.fromTag(Tags.Items.GUNPOWDER)).build(consumer, BloodMagic.rl(basePath + "reagent_fastminer")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_BLOOD_LIGHT.get()), 300, 10, Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE), Ingredient.fromItems(Items.TORCH), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE)).build(consumer, BloodMagic.rl(basePath + "reagent_blood_light")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_SIGHT.get()), 64, 0, Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE), Ingredient.fromTag(Tags.Items.GLASS), Ingredient.fromTag(Tags.Items.GLASS), Ingredient.fromItems(BloodMagicItems.DIVINATION_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "reagent_sight")); +// TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicItems.REAGENT_BINDING.get()), 400, 10, Ingredient.fromTag(Tags.Items.DUSTS_GLOWSTONE), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), Ingredient.fromTag(Tags.Items.GUNPOWDER), Ingredient.fromTag(Tags.Items.NUGGETS_GOLD)).build(consumer, BloodMagic.rl(basePath + "reagent_binding")); + + } + { + + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/ARCRecipeSerializer.java b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/ARCRecipeSerializer.java new file mode 100644 index 00000000..57869822 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/ARCRecipeSerializer.java @@ -0,0 +1,159 @@ +package wayoftime.bloodmagic.common.recipe.serializer; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import org.apache.commons.lang3.tuple.Pair; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.registries.ForgeRegistryEntry; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.util.Constants; + +public class ARCRecipeSerializer extends ForgeRegistryEntry> + implements IRecipeSerializer +{ + private final IFactory factory; + + public ARCRecipeSerializer(IFactory factory) + { + this.factory = factory; + } + + @Nonnull + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull JsonObject json) + { + JsonElement input = JSONUtils.isJsonArray(json, Constants.JSON.INPUT) + ? JSONUtils.getJsonArray(json, Constants.JSON.INPUT) + : JSONUtils.getJsonObject(json, Constants.JSON.INPUT); + + JsonElement tool = JSONUtils.isJsonArray(json, Constants.JSON.TOOL) + ? JSONUtils.getJsonArray(json, Constants.JSON.TOOL) + : JSONUtils.getJsonObject(json, Constants.JSON.TOOL); + + Ingredient inputIng = Ingredient.deserialize(input); + Ingredient toolIng = Ingredient.deserialize(tool); + ItemStack output = SerializerHelper.getItemStack(json, Constants.JSON.OUTPUT); + + List> addedItems = new ArrayList>(); + if (json.has(Constants.JSON.ADDEDOUTPUT) && JSONUtils.isJsonArray(json, Constants.JSON.ADDEDOUTPUT)) + { + JsonArray mainArray = JSONUtils.getJsonArray(json, Constants.JSON.ADDEDOUTPUT); + + arrayLoop: for (JsonElement element : mainArray) + { + if (addedItems.size() >= RecipeARC.MAX_RANDOM_OUTPUTS) + { + break arrayLoop; + } + if (element.isJsonObject()) + { + JsonObject obj = element.getAsJsonObject(); + double chance = JSONUtils.getFloat(obj, Constants.JSON.CHANCE); + ItemStack extraDrop = SerializerHelper.getItemStack(obj, Constants.JSON.TYPE); + + addedItems.add(Pair.of(extraDrop, chance)); + } + } + } + + FluidStackIngredient inputFluidIng = null; + + if (json.has(Constants.JSON.INPUT_FLUID)) + { + JsonElement inputFluid = JSONUtils.isJsonArray(json, Constants.JSON.INPUT_FLUID) + ? JSONUtils.getJsonArray(json, Constants.JSON.INPUT_FLUID) + : JSONUtils.getJsonObject(json, Constants.JSON.INPUT_FLUID); + inputFluidIng = FluidStackIngredient.deserialize(inputFluid); + } + + FluidStack outputFluidStack = FluidStack.EMPTY; + + if (json.has(Constants.JSON.OUTPUT_FLUID)) + { + JsonObject outputFluid = JSONUtils.getJsonObject(json, Constants.JSON.OUTPUT_FLUID).getAsJsonObject(); + outputFluidStack = SerializerHelper.deserializeFluid(outputFluid); + } + + boolean consumeIngredient = JSONUtils.getBoolean(json, "consumeingredient"); + + return this.factory.create(recipeId, inputIng, toolIng, inputFluidIng, output, addedItems, outputFluidStack, consumeIngredient); + } + + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull PacketBuffer buffer) + { + try + { + List> addedItems = new ArrayList>(); + Ingredient inputIng = Ingredient.read(buffer); + Ingredient toolIng = Ingredient.read(buffer); + ItemStack output = buffer.readItemStack(); + + int addedItemSize = buffer.readInt(); + for (int i = 0; i < addedItemSize; i++) + { + ItemStack stack = buffer.readItemStack(); + double chance = buffer.readDouble(); + addedItems.add(Pair.of(stack, chance)); + } + + FluidStackIngredient inputFluid = null; + FluidStack outputFluid = new FluidStack(Fluids.EMPTY, 1000); + + if (buffer.readBoolean()) + { + inputFluid = FluidStackIngredient.read(buffer); + } + + if (buffer.readBoolean()) + { + outputFluid = FluidStack.readFromPacket(buffer); + } + + boolean consumeIngredient = buffer.readBoolean(); + + return this.factory.create(recipeId, inputIng, toolIng, inputFluid, output, addedItems, outputFluid, consumeIngredient); + } catch (Exception e) + { + BloodMagic.LOGGER.error("Error reading ARC recipe from packet.", e); + throw e; + } + } + + @Override + public void write(@Nonnull PacketBuffer buffer, @Nonnull RECIPE recipe) + { + try + { + recipe.write(buffer); + } catch (Exception e) + { + BloodMagic.LOGGER.error("Error writing ARC recipe to packet.", e); + throw e; + } + } + + @FunctionalInterface + public interface IFactory + { + RECIPE create(ResourceLocation id, Ingredient input, Ingredient arcTool, FluidStackIngredient inputFluid, ItemStack output, List> addedItems, FluidStack outputFluid, boolean consumeIngredient); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/AlchemyArrayRecipeSerializer.java b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/AlchemyArrayRecipeSerializer.java new file mode 100644 index 00000000..6ebf7753 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/AlchemyArrayRecipeSerializer.java @@ -0,0 +1,89 @@ +package wayoftime.bloodmagic.common.recipe.serializer; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistryEntry; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; +import wayoftime.bloodmagic.util.Constants; + +public class AlchemyArrayRecipeSerializer + extends ForgeRegistryEntry> implements IRecipeSerializer +{ + private final IFactory factory; + + public AlchemyArrayRecipeSerializer(IFactory factory) + { + this.factory = factory; + } + + @Nonnull + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull JsonObject json) + { + JsonElement input1 = JSONUtils.isJsonArray(json, Constants.JSON.BASEINPUT) + ? JSONUtils.getJsonArray(json, Constants.JSON.BASEINPUT) + : JSONUtils.getJsonObject(json, Constants.JSON.BASEINPUT); + + JsonElement input2 = JSONUtils.isJsonArray(json, Constants.JSON.ADDEDINPUT) + ? JSONUtils.getJsonArray(json, Constants.JSON.ADDEDINPUT) + : JSONUtils.getJsonObject(json, Constants.JSON.ADDEDINPUT); + + Ingredient baseInput = Ingredient.deserialize(input1); + Ingredient addedInput = Ingredient.deserialize(input2); + ResourceLocation texture = null; + if (json.has(Constants.JSON.TEXTURE)) + texture = new ResourceLocation(JSONUtils.getString(json, Constants.JSON.TEXTURE)); + ItemStack output = SerializerHelper.getItemStack(json, Constants.JSON.OUTPUT); + + return this.factory.create(recipeId, texture, baseInput, addedInput, output); + } + + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull PacketBuffer buffer) + { + try + { + ResourceLocation texture = null; + if (buffer.readBoolean()) + texture = buffer.readResourceLocation(); + Ingredient baseInput = Ingredient.read(buffer); + Ingredient addedInput = Ingredient.read(buffer); + ItemStack output = buffer.readItemStack(); + + return this.factory.create(recipeId, texture, baseInput, addedInput, output); + } catch (Exception e) + { +// Mekanism.logger.error("Error reading electrolysis recipe from packet.", e); + throw e; + } + } + + @Override + public void write(@Nonnull PacketBuffer buffer, @Nonnull RECIPE recipe) + { + try + { + recipe.write(buffer); + } catch (Exception e) + { +// Mekanism.logger.error("Error writing electrolysis recipe to packet.", e); + throw e; + } + } + + @FunctionalInterface + public interface IFactory + { + RECIPE create(ResourceLocation id, ResourceLocation texture, Ingredient baseInput, Ingredient addedInput, ItemStack output); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/AlchemyTableRecipeSerializer.java b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/AlchemyTableRecipeSerializer.java new file mode 100644 index 00000000..032c1837 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/AlchemyTableRecipeSerializer.java @@ -0,0 +1,116 @@ +package wayoftime.bloodmagic.common.recipe.serializer; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistryEntry; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.util.Constants; + +public class AlchemyTableRecipeSerializer + extends ForgeRegistryEntry> implements IRecipeSerializer +{ + + private final IFactory factory; + + public AlchemyTableRecipeSerializer(IFactory factory) + { + this.factory = factory; + } + + @Nonnull + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull JsonObject json) + { + List inputList = new ArrayList(); + + if (json.has(Constants.JSON.INPUT) && JSONUtils.isJsonArray(json, Constants.JSON.INPUT)) + { + JsonArray mainArray = JSONUtils.getJsonArray(json, Constants.JSON.INPUT); + + arrayLoop: for (JsonElement element : mainArray) + { + if (inputList.size() >= RecipeAlchemyTable.MAX_INPUTS) + { + break arrayLoop; + } + + if (element.isJsonArray()) + { + element = element.getAsJsonArray(); + } else + { + element.getAsJsonObject(); + } + + inputList.add(Ingredient.deserialize(element)); + } + } + + ItemStack output = SerializerHelper.getItemStack(json, Constants.JSON.OUTPUT); + + int syphon = JSONUtils.getInt(json, Constants.JSON.SYPHON); + int ticks = JSONUtils.getInt(json, Constants.JSON.TICKS); + int minimumTier = JSONUtils.getInt(json, Constants.JSON.ALTAR_TIER); + + return this.factory.create(recipeId, inputList, output, syphon, ticks, minimumTier); + } + + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull PacketBuffer buffer) + { + try + { + int size = buffer.readInt(); + List input = new ArrayList(size); + + for (int i = 0; i < size; i++) + { + input.add(i, Ingredient.read(buffer)); + } + + ItemStack output = buffer.readItemStack(); + int syphon = buffer.readInt(); + int ticks = buffer.readInt(); + int minimumTier = buffer.readInt(); + + return this.factory.create(recipeId, input, output, syphon, ticks, minimumTier); + } catch (Exception e) + { +//Mekanism.logger.error("Error reading electrolysis recipe from packet.", e); + throw e; + } + } + + @Override + public void write(@Nonnull PacketBuffer buffer, @Nonnull RECIPE recipe) + { + try + { + recipe.write(buffer); + } catch (Exception e) + { +//Mekanism.logger.error("Error writing electrolysis recipe to packet.", e); + throw e; + } + } + + @FunctionalInterface + public interface IFactory + { + RECIPE create(ResourceLocation id, List input, ItemStack output, int syphon, int ticks, int minimumTier); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/BloodAltarRecipeSerializer.java b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/BloodAltarRecipeSerializer.java new file mode 100644 index 00000000..a50c1fbd --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/BloodAltarRecipeSerializer.java @@ -0,0 +1,85 @@ +package wayoftime.bloodmagic.common.recipe.serializer; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistryEntry; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.util.Constants; + +public class BloodAltarRecipeSerializer + extends ForgeRegistryEntry> implements IRecipeSerializer +{ + private final IFactory factory; + + public BloodAltarRecipeSerializer(IFactory factory) + { + this.factory = factory; + } + + @Nonnull + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull JsonObject json) + { + JsonElement input = JSONUtils.isJsonArray(json, Constants.JSON.INPUT) + ? JSONUtils.getJsonArray(json, Constants.JSON.INPUT) + : JSONUtils.getJsonObject(json, Constants.JSON.INPUT); + + Ingredient inputIng = Ingredient.deserialize(input); + ItemStack output = SerializerHelper.getItemStack(json, Constants.JSON.OUTPUT); + int minimumTier = JSONUtils.getInt(json, Constants.JSON.ALTAR_TIER); + int syphon = JSONUtils.getInt(json, Constants.JSON.ALTAR_SYPHON); + int consumeRate = JSONUtils.getInt(json, Constants.JSON.ALTAR_CONSUMPTION_RATE); + int drainRate = JSONUtils.getInt(json, Constants.JSON.ALTAR_DRAIN_RATE); + + return this.factory.create(recipeId, inputIng, output, minimumTier, syphon, consumeRate, drainRate); + } + + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull PacketBuffer buffer) + { + try + { + Ingredient input = Ingredient.read(buffer); + ItemStack output = buffer.readItemStack(); + int minimumTier = buffer.readInt(); + int syphon = buffer.readInt(); + int consumeRate = buffer.readInt(); + int drainRate = buffer.readInt(); + + return this.factory.create(recipeId, input, output, minimumTier, syphon, consumeRate, drainRate); + } catch (Exception e) + { +// Mekanism.logger.error("Error reading electrolysis recipe from packet.", e); + throw e; + } + } + + @Override + public void write(@Nonnull PacketBuffer buffer, @Nonnull RECIPE recipe) + { + try + { + recipe.write(buffer); + } catch (Exception e) + { +// Mekanism.logger.error("Error writing electrolysis recipe to packet.", e); + throw e; + } + } + + @FunctionalInterface + public interface IFactory + { + RECIPE create(ResourceLocation id, Ingredient input, ItemStack output, int minimumTier, int syphon, int consumeRate, int drainRate); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/TartaricForgeRecipeSerializer.java b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/TartaricForgeRecipeSerializer.java new file mode 100644 index 00000000..18fadfb4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/serializer/TartaricForgeRecipeSerializer.java @@ -0,0 +1,100 @@ +package wayoftime.bloodmagic.common.recipe.serializer; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistryEntry; +import wayoftime.bloodmagic.recipe.helper.SerializerHelper; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; +import wayoftime.bloodmagic.util.Constants; + +public class TartaricForgeRecipeSerializer + extends ForgeRegistryEntry> implements IRecipeSerializer +{ + + private final IFactory factory; + + public TartaricForgeRecipeSerializer(IFactory factory) + { + this.factory = factory; + } + + @Nonnull + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull JsonObject json) + { + List inputList = new ArrayList(); + for (int i = 0; i < 4; i++) + { + if (json.has(Constants.JSON.INPUT + i)) + { + JsonElement input = JSONUtils.isJsonArray(json, Constants.JSON.INPUT + i) + ? JSONUtils.getJsonArray(json, Constants.JSON.INPUT + i) + : JSONUtils.getJsonObject(json, Constants.JSON.INPUT + i); + inputList.add(Ingredient.deserialize(input)); + } + } + + ItemStack output = SerializerHelper.getItemStack(json, Constants.JSON.OUTPUT); + + float minimumSouls = JSONUtils.getFloat(json, Constants.JSON.TARTARIC_MINIMUM); + float soulDrain = JSONUtils.getFloat(json, Constants.JSON.TARTARIC_DRAIN); + + return this.factory.create(recipeId, inputList, output, minimumSouls, soulDrain); + } + + @Override + public RECIPE read(@Nonnull ResourceLocation recipeId, @Nonnull PacketBuffer buffer) + { + try + { + int size = buffer.readInt(); + List input = new ArrayList(size); + + for (int i = 0; i < size; i++) + { + input.add(i, Ingredient.read(buffer)); + } + + ItemStack output = buffer.readItemStack(); + double minimumSouls = buffer.readDouble(); + double soulDrain = buffer.readDouble(); + + return this.factory.create(recipeId, input, output, minimumSouls, soulDrain); + } catch (Exception e) + { +// Mekanism.logger.error("Error reading electrolysis recipe from packet.", e); + throw e; + } + } + + @Override + public void write(@Nonnull PacketBuffer buffer, @Nonnull RECIPE recipe) + { + try + { + recipe.write(buffer); + } catch (Exception e) + { +// Mekanism.logger.error("Error writing electrolysis recipe to packet.", e); + throw e; + } + } + + @FunctionalInterface + public interface IFactory + { + RECIPE create(ResourceLocation id, List input, ItemStack output, double minimumSouls, double soulDrain); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/INamedEntry.java b/src/main/java/wayoftime/bloodmagic/common/registration/INamedEntry.java new file mode 100644 index 00000000..a75d9fe8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/INamedEntry.java @@ -0,0 +1,11 @@ +package wayoftime.bloodmagic.common.registration; + +public interface INamedEntry +{ + + /** + * Used for retrieving the path/name of a registry object before the registry + * object has been fully initialized + */ + String getInternalRegistryName(); +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/WrappedDeferredRegister.java b/src/main/java/wayoftime/bloodmagic/common/registration/WrappedDeferredRegister.java new file mode 100644 index 00000000..f6a707df --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/WrappedDeferredRegister.java @@ -0,0 +1,49 @@ +package wayoftime.bloodmagic.common.registration; + +import java.util.function.Function; +import java.util.function.Supplier; + +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.IForgeRegistry; +import net.minecraftforge.registries.IForgeRegistryEntry; +import net.minecraftforge.registries.RegistryBuilder; + +public class WrappedDeferredRegister> +{ + protected final DeferredRegister internal; + + protected WrappedDeferredRegister(String modid, IForgeRegistry registry) + { + internal = DeferredRegister.create(registry, modid); + } + + /** + * @apiNote For use with custom registries + */ + protected WrappedDeferredRegister(String modid, Class base) + { + internal = DeferredRegister.create(base, modid); + } + + protected > W register(String name, Supplier sup, + Function, W> objectWrapper) + { + return objectWrapper.apply(internal.register(name, sup)); + } + + /** + * Only call this from mekanism and for custom registries + */ + public void createAndRegister(IEventBus bus, String name) + { + internal.makeRegistry(name, RegistryBuilder::new); + register(bus); + } + + public void register(IEventBus bus) + { + internal.register(bus); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/WrappedRegistryObject.java b/src/main/java/wayoftime/bloodmagic/common/registration/WrappedRegistryObject.java new file mode 100644 index 00000000..7d37f782 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/WrappedRegistryObject.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.common.registration; + +import java.util.function.Supplier; + +import javax.annotation.Nonnull; + +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.IForgeRegistryEntry; + +public class WrappedRegistryObject> implements Supplier, INamedEntry +{ + + protected RegistryObject registryObject; + + protected WrappedRegistryObject(RegistryObject registryObject) + { + this.registryObject = registryObject; + } + + @Nonnull + @Override + public T get() + { + return registryObject.get(); + } + + @Override + public String getInternalRegistryName() + { + return registryObject.getId().getPath(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/AnointmentDeferredRegister.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/AnointmentDeferredRegister.java new file mode 100644 index 00000000..e689d0d9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/AnointmentDeferredRegister.java @@ -0,0 +1,19 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import java.util.function.Supplier; + +import wayoftime.bloodmagic.anointment.Anointment; +import wayoftime.bloodmagic.common.registration.WrappedDeferredRegister; + +public class AnointmentDeferredRegister extends WrappedDeferredRegister +{ + public AnointmentDeferredRegister(String modid) + { + super(modid, Anointment.class); + } + + public AnointmentRegistryObject register(String name, Supplier sup) + { + return register(name, sup, AnointmentRegistryObject::new); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/AnointmentRegistryObject.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/AnointmentRegistryObject.java new file mode 100644 index 00000000..f017a514 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/AnointmentRegistryObject.java @@ -0,0 +1,13 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.anointment.Anointment; +import wayoftime.bloodmagic.common.registration.WrappedRegistryObject; + +public class AnointmentRegistryObject extends WrappedRegistryObject +{ + public AnointmentRegistryObject(RegistryObject registryObject) + { + super(registryObject); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/BloodOrbDeferredRegister.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/BloodOrbDeferredRegister.java new file mode 100644 index 00000000..0663347b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/BloodOrbDeferredRegister.java @@ -0,0 +1,26 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import java.util.function.Supplier; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.common.registration.WrappedDeferredRegister; +import wayoftime.bloodmagic.common.item.BloodOrb; + +public class BloodOrbDeferredRegister extends WrappedDeferredRegister +{ + public BloodOrbDeferredRegister(String modid) + { + super(modid, BloodOrb.class); + } + + public BloodOrbRegistryObject register(String name, ResourceLocation rl, int tier, int capacity, + int fillRate) + { + return register(name, () -> new BloodOrb(rl, tier, capacity, fillRate)); + } + + public BloodOrbRegistryObject register(String name, Supplier sup) + { + return register(name, sup, BloodOrbRegistryObject::new); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/BloodOrbRegistryObject.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/BloodOrbRegistryObject.java new file mode 100644 index 00000000..e9818ea3 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/BloodOrbRegistryObject.java @@ -0,0 +1,13 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.common.registration.WrappedRegistryObject; +import wayoftime.bloodmagic.common.item.BloodOrb; + +public class BloodOrbRegistryObject extends WrappedRegistryObject +{ + public BloodOrbRegistryObject(RegistryObject registryObject) + { + super(registryObject); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/EntityTypeDeferredRegister.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/EntityTypeDeferredRegister.java new file mode 100644 index 00000000..0176e647 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/EntityTypeDeferredRegister.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.common.registration.WrappedDeferredRegister; + +public class EntityTypeDeferredRegister extends WrappedDeferredRegister> +{ + + public EntityTypeDeferredRegister(String modid) + { + super(modid, ForgeRegistries.ENTITIES); + } + + public EntityTypeRegistryObject register(String name, EntityType.Builder builder) + { + return register(name, () -> builder.build(name), EntityTypeRegistryObject::new); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/EntityTypeRegistryObject.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/EntityTypeRegistryObject.java new file mode 100644 index 00000000..e6e51ee2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/EntityTypeRegistryObject.java @@ -0,0 +1,26 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.util.providers.IEntityTypeProvider; +import wayoftime.bloodmagic.common.registration.WrappedRegistryObject; + +public class EntityTypeRegistryObject extends WrappedRegistryObject> + implements IEntityTypeProvider +{ + + public EntityTypeRegistryObject(RegistryObject> registryObject) + { + super(registryObject); + } + + @Nonnull + @Override + public EntityType getEntityType() + { + return get(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/IRecipeSerializerDeferredRegister.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/IRecipeSerializerDeferredRegister.java new file mode 100644 index 00000000..10c94aba --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/IRecipeSerializerDeferredRegister.java @@ -0,0 +1,23 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import java.util.function.Supplier; + +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.common.registration.WrappedDeferredRegister; + +public class IRecipeSerializerDeferredRegister extends WrappedDeferredRegister> +{ + + public IRecipeSerializerDeferredRegister(String modid) + { + super(modid, ForgeRegistries.RECIPE_SERIALIZERS); + } + + public > IRecipeSerializerRegistryObject register(String name, + Supplier> sup) + { + return register(name, sup, IRecipeSerializerRegistryObject::new); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/IRecipeSerializerRegistryObject.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/IRecipeSerializerRegistryObject.java new file mode 100644 index 00000000..70d3d56c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/IRecipeSerializerRegistryObject.java @@ -0,0 +1,24 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import javax.annotation.Nonnull; + +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.common.registration.WrappedRegistryObject; + +public class IRecipeSerializerRegistryObject> + extends WrappedRegistryObject> +{ + + public IRecipeSerializerRegistryObject(RegistryObject> registryObject) + { + super(registryObject); + } + + @Nonnull + public IRecipeSerializer getRecipeSerializer() + { + return get(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/LivingUpgradeDeferredRegister.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/LivingUpgradeDeferredRegister.java new file mode 100644 index 00000000..a84c05de --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/LivingUpgradeDeferredRegister.java @@ -0,0 +1,25 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import java.util.function.Supplier; + +import wayoftime.bloodmagic.common.registration.WrappedDeferredRegister; +import wayoftime.bloodmagic.core.living.LivingUpgrade; + +public class LivingUpgradeDeferredRegister extends WrappedDeferredRegister +{ + public LivingUpgradeDeferredRegister(String modid) + { + super(modid, LivingUpgrade.class); + } + +// public BloodOrbRegistryObject register(String name, ResourceLocation rl, int tier, int capacity, +// int fillRate) +// { +// return register(name, () -> new BloodOrb(rl, tier, capacity, fillRate)); +// } + + public LivingUpgradeRegistryObject register(String name, Supplier sup) + { + return register(name, sup, LivingUpgradeRegistryObject::new); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registration/impl/LivingUpgradeRegistryObject.java b/src/main/java/wayoftime/bloodmagic/common/registration/impl/LivingUpgradeRegistryObject.java new file mode 100644 index 00000000..c851d6fb --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registration/impl/LivingUpgradeRegistryObject.java @@ -0,0 +1,13 @@ +package wayoftime.bloodmagic.common.registration.impl; + +import net.minecraftforge.fml.RegistryObject; +import wayoftime.bloodmagic.common.registration.WrappedRegistryObject; +import wayoftime.bloodmagic.core.living.LivingUpgrade; + +public class LivingUpgradeRegistryObject extends WrappedRegistryObject +{ + public LivingUpgradeRegistryObject(RegistryObject registryObject) + { + super(registryObject); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java b/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java new file mode 100644 index 00000000..f503ab48 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java @@ -0,0 +1,27 @@ +package wayoftime.bloodmagic.common.registries; + +import net.minecraft.entity.EntityClassification; +import net.minecraft.entity.EntityType; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.registration.impl.EntityTypeDeferredRegister; +import wayoftime.bloodmagic.common.registration.impl.EntityTypeRegistryObject; +import wayoftime.bloodmagic.entity.projectile.AbstractEntityThrowingDagger; +import wayoftime.bloodmagic.entity.projectile.EntityBloodLight; +import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge; +import wayoftime.bloodmagic.entity.projectile.EntitySoulSnare; + +public class BloodMagicEntityTypes +{ + private BloodMagicEntityTypes() + { + + } + + public static final EntityTypeDeferredRegister ENTITY_TYPES = new EntityTypeDeferredRegister(BloodMagic.MODID); + + public static final EntityTypeRegistryObject SNARE = ENTITY_TYPES.register("soulsnare", EntityType.Builder.create(EntitySoulSnare::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.25f, 0.25f)); + public static final EntityTypeRegistryObject THROWING_DAGGER = ENTITY_TYPES.register("throwing_dagger", EntityType.Builder.create(AbstractEntityThrowingDagger::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.25f, 0.25f)); + public static final EntityTypeRegistryObject BLOOD_LIGHT = ENTITY_TYPES.register("bloodlight", EntityType.Builder.create(EntityBloodLight::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.25f, 0.25f)); + public static final EntityTypeRegistryObject SHAPED_CHARGE = ENTITY_TYPES.register("shapedcharge", EntityType.Builder.create(EntityShapedCharge::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.4f, 0.4f)); + +} diff --git a/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicRecipeSerializers.java b/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicRecipeSerializers.java new file mode 100644 index 00000000..38a6012b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicRecipeSerializers.java @@ -0,0 +1,36 @@ +package wayoftime.bloodmagic.common.registries; + +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; +import wayoftime.bloodmagic.common.recipe.serializer.ARCRecipeSerializer; +import wayoftime.bloodmagic.common.recipe.serializer.AlchemyArrayRecipeSerializer; +import wayoftime.bloodmagic.common.recipe.serializer.AlchemyTableRecipeSerializer; +import wayoftime.bloodmagic.common.recipe.serializer.BloodAltarRecipeSerializer; +import wayoftime.bloodmagic.common.recipe.serializer.TartaricForgeRecipeSerializer; +import wayoftime.bloodmagic.common.registration.impl.IRecipeSerializerDeferredRegister; +import wayoftime.bloodmagic.common.registration.impl.IRecipeSerializerRegistryObject; + +public class BloodMagicRecipeSerializers +{ + private BloodMagicRecipeSerializers() + { + + } + + public static final IRecipeSerializerDeferredRegister RECIPE_SERIALIZERS = new IRecipeSerializerDeferredRegister(BloodMagic.MODID); + + public static final IRecipeSerializerRegistryObject ALTAR = RECIPE_SERIALIZERS.register("altar", () -> new BloodAltarRecipeSerializer<>(RecipeBloodAltar::new)); + public static final IRecipeSerializerRegistryObject ARRAY = RECIPE_SERIALIZERS.register("array", () -> new AlchemyArrayRecipeSerializer<>(RecipeAlchemyArray::new)); + public static final IRecipeSerializerRegistryObject TARTARIC = RECIPE_SERIALIZERS.register("soulforge", () -> new TartaricForgeRecipeSerializer<>(RecipeTartaricForge::new)); + public static final IRecipeSerializerRegistryObject ARC = RECIPE_SERIALIZERS.register("arc", () -> new ARCRecipeSerializer<>(RecipeARC::new)); + public static final IRecipeSerializerRegistryObject ALCHEMYTABLE = RECIPE_SERIALIZERS.register("alchemytable", () -> new AlchemyTableRecipeSerializer<>(RecipeAlchemyTable::new)); + +// public static final DeferredRegister> RECIPE_SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, BloodMagic.MODID); + +// public static final DeferredObject REC = RECIPE_SERIALIZERS.register("test", () -> new BloodAltarRecipeSerializer<>(IRecipeBloodAltar::new)); +// public static final IRecipeSerializerDeferredRegister RECIPE_SERIALIZERS = new IRecipeSerializerDeferredRegister(BloodMagic.MODID); +} diff --git a/src/main/java/wayoftime/bloodmagic/common/tags/BloodMagicTags.java b/src/main/java/wayoftime/bloodmagic/common/tags/BloodMagicTags.java new file mode 100644 index 00000000..9ad0f087 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/tags/BloodMagicTags.java @@ -0,0 +1,100 @@ +package wayoftime.bloodmagic.common.tags; + +import net.minecraft.block.Block; +import net.minecraft.fluid.Fluid; +import net.minecraft.item.Item; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.FluidTags; +import net.minecraft.tags.ITag; +import net.minecraft.tags.ItemTags; + +public class BloodMagicTags +{ + public static final ITag.INamedTag ARC_TOOL = ItemTags.makeWrapperTag("bloodmagic:arc/tool"); + public static final ITag.INamedTag ARC_TOOL_FURNACE = ItemTags.makeWrapperTag("bloodmagic:arc/furnace"); + public static final ITag.INamedTag ARC_TOOL_SIEVE = ItemTags.makeWrapperTag("bloodmagic:arc/sieve"); + public static final ITag.INamedTag ARC_TOOL_REVERTER = ItemTags.makeWrapperTag("bloodmagic:arc/reverter"); + public static final ITag.INamedTag ARC_TOOL_EXPLOSIVE = ItemTags.makeWrapperTag("bloodmagic:arc/explosive"); + public static final ITag.INamedTag ARC_TOOL_HYDRATE = ItemTags.makeWrapperTag("bloodmagic:arc/hydrate"); + public static final ITag.INamedTag ARC_TOOL_RESONATOR = ItemTags.makeWrapperTag("bloodmagic:arc/resonator"); + public static final ITag.INamedTag ARC_TOOL_CUTTINGFLUID = ItemTags.makeWrapperTag("bloodmagic:arc/cuttingfluid"); + + public static final ITag.INamedTag CRYSTAL_DEMON = ItemTags.makeWrapperTag("bloodmagic:crystals/demon"); + + public static final ITag.INamedTag LIFE_ESSENCE = FluidTags.makeWrapperTag("forge:life"); + + public static final ITag.INamedTag MUSHROOM_STEM = ItemTags.makeWrapperTag("minecraft:mushroom_stem"); + public static final ITag.INamedTag MUSHROOM_HYPHAE = ItemTags.makeWrapperTag("minecraft:mushroom_hyphae"); + + // Ores + public static final ITag.INamedTag ORE_COPPER = getForgeOreTag("copper"); + public static final ITag.INamedTag ORE_TIN = getForgeOreTag("tin"); + public static final ITag.INamedTag ORE_LEAD = getForgeOreTag("lead"); + public static final ITag.INamedTag ORE_OSMIUM = getForgeOreTag("osmium"); + public static final ITag.INamedTag ORE_SILVER = getForgeOreTag("silver"); + + // Ingots + public static final ITag.INamedTag INGOT_HELLFORGED = getForgeIngotTag("hellforged"); + + // Dusts (/Sands) + public static final ITag.INamedTag DUST_IRON = getForgeDustTag("iron"); + public static final ITag.INamedTag DUST_GOLD = getForgeDustTag("gold"); + public static final ITag.INamedTag DUST_COAL = getForgeDustTag("coal"); + public static final ITag.INamedTag DUST_SALTPETER = getForgeDustTag("saltpeter"); + public static final ITag.INamedTag DUST_SULFUR = getForgeDustTag("sulfur"); + public static final ITag.INamedTag DUST_NETHERITE_SCRAP = getForgeDustTag("netherite_scrap"); + public static final ITag.INamedTag DUST_HELLFORGED = getForgeDustTag("hellforged"); + public static final ITag.INamedTag DUST_CORRUPTED = getBMDustTag("corrupted"); + public static final ITag.INamedTag TINYDUST_CORRUPTED = getBMTinyDustTag("corrupted"); + + // Fragments + public static final ITag.INamedTag FRAGMENT_IRON = getFragmentTag("iron"); + public static final ITag.INamedTag FRAGMENT_GOLD = getFragmentTag("gold"); + public static final ITag.INamedTag FRAGMENT_NETHERITE_SCRAP = getFragmentTag("netherite_scrap"); + + // Gravels + public static final ITag.INamedTag GRAVEL_IRON = getGravelTag("iron"); + public static final ITag.INamedTag GRAVEL_GOLD = getGravelTag("gold"); + public static final ITag.INamedTag GRAVEL_NETHERITE_SCRAP = getGravelTag("netherite_scrap"); + + public static class Blocks + { + public static final ITag.INamedTag MUSHROOM_STEM = BlockTags.makeWrapperTag("minecraft:mushroom_stem"); + public static final ITag.INamedTag MUSHROOM_HYPHAE = BlockTags.makeWrapperTag("minecraft:mushroom_hyphae"); + } + + public static ITag.INamedTag getForgeOreTag(String name) + { + return ItemTags.makeWrapperTag("forge:ores/" + name); + } + + public static ITag.INamedTag getForgeIngotTag(String name) + { + return ItemTags.makeWrapperTag("forge:ingots/" + name); + } + + public static ITag.INamedTag getBMDustTag(String name) + { + return ItemTags.makeWrapperTag("bloodmagic:dusts/" + name); + } + + public static ITag.INamedTag getBMTinyDustTag(String name) + { + return ItemTags.makeWrapperTag("bloodmagic:tiny_dusts/" + name); + } + + public static ITag.INamedTag getForgeDustTag(String name) + { + return ItemTags.makeWrapperTag("forge:dusts/" + name); + } + + public static ITag.INamedTag getFragmentTag(String name) + { + return ItemTags.makeWrapperTag("bloodmagic:fragments/" + name); + } + + public static ITag.INamedTag getGravelTag(String name) + { + return ItemTags.makeWrapperTag("bloodmagic:gravels/" + name); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/crt/ARCManager.java b/src/main/java/wayoftime/bloodmagic/compat/crt/ARCManager.java new file mode 100644 index 00000000..dc2c4749 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/crt/ARCManager.java @@ -0,0 +1,74 @@ +package wayoftime.bloodmagic.compat.crt; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.fluid.IFluidStack; +import com.blamejared.crafttweaker.api.item.IIngredient; +import com.blamejared.crafttweaker.api.item.IItemStack; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionRemoveOutputRecipe; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionRemoveRecipeByOutput; +import com.blamejared.crafttweaker.impl.item.MCItemStackMutable; +import com.blamejared.crafttweaker.impl.item.MCWeightedItemStack; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import org.apache.commons.lang3.tuple.Pair; +import org.openzen.zencode.java.ZenCodeType; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@ZenRegister +@ZenCodeType.Name("mods.bloodmagic.ARC") +public class ARCManager implements IRecipeManager { + + @ZenCodeType.Method + public void addRecipe(String name, IItemStack output, IFluidStack outputFluid, IIngredient input, IFluidStack inputFluid, IIngredient arcTool, boolean consumeIngredient, @ZenCodeType.Optional MCWeightedItemStack[] addedItems) { + name = fixRecipeName(name); + ResourceLocation location = new ResourceLocation("crafttweaker", name); + List> addedItemsList = new ArrayList<>(); + if(addedItems != null) { + addedItemsList = Arrays.stream(addedItems).map(mcWeightedItemStack -> Pair.of(mcWeightedItemStack.getItemStack().getInternal(), mcWeightedItemStack.getWeight())).collect(Collectors.toList()); + } + RecipeARC recipeARC = new RecipeARC(location, input.asVanillaIngredient(), arcTool.asVanillaIngredient(), inputFluid.getInternal().isEmpty() ? null : FluidStackIngredient.from(inputFluid.getInternal()), output.getInternal(), addedItemsList, outputFluid.getInternal(), consumeIngredient); + CraftTweakerAPI.apply(new ActionAddRecipe(this, recipeARC, "")); + } + + @Override + public void removeRecipe(IItemStack output) { + + CraftTweakerAPI.apply(new ActionRemoveRecipeByOutput(this, output) { + @Override + public void apply() { + List toRemove = new ArrayList<>(); + for(ResourceLocation location : getManager().getRecipes().keySet()) { + IRecipe recipe = getManager().getRecipes().get(location); + if(recipe instanceof RecipeARC) { + RecipeARC recipeARC = (RecipeARC) recipe; + List allListedOutputs = recipeARC.getAllListedOutputs(); + // no other way to get the main output, and there may not even be a main output + if(allListedOutputs.size() > 0) { + if(output.matches(new MCItemStackMutable(allListedOutputs.get(0)))) { + toRemove.add(location); + } + } + } + } + toRemove.forEach(getManager().getRecipes()::remove); + } + }); + } + + @Override + public IRecipeType getRecipeType() { + return BloodMagicRecipeType.ARC; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/crt/AlchemyArrayManager.java b/src/main/java/wayoftime/bloodmagic/compat/crt/AlchemyArrayManager.java new file mode 100644 index 00000000..abc6a449 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/crt/AlchemyArrayManager.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.compat.crt; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.item.IIngredient; +import com.blamejared.crafttweaker.api.item.IItemStack; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionRemoveRecipeByOutput; +import com.blamejared.crafttweaker.impl.item.MCItemStackMutable; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import org.openzen.zencode.java.ZenCodeType; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@ZenRegister +@ZenCodeType.Name("mods.bloodmagic.AlchemyArray") +public class AlchemyArrayManager implements IRecipeManager { + + @ZenCodeType.Method + public void addRecipe(String name, IItemStack output, IIngredient baseInput, IIngredient addedInput, ResourceLocation texture) { + name = fixRecipeName(name); + ResourceLocation location = new ResourceLocation("crafttweaker", name); + RecipeAlchemyArray recipe = new RecipeAlchemyArray(location, texture, baseInput.asVanillaIngredient(), addedInput.asVanillaIngredient(), output.getInternal()); + CraftTweakerAPI.apply(new ActionAddRecipe(this, recipe, "")); + } + + @Override + public void removeRecipe(IItemStack output) { + + CraftTweakerAPI.apply(new ActionRemoveRecipeByOutput(this, output) { + @Override + public void apply() { + List toRemove = new ArrayList<>(); + for(ResourceLocation location : getManager().getRecipes().keySet()) { + IRecipe recipe = getManager().getRecipes().get(location); + if(recipe instanceof RecipeAlchemyArray) { + RecipeAlchemyArray recipeAT = (RecipeAlchemyArray) recipe; + ItemStack recipeOutput = recipeAT.getOutput(); + if(output.matches(new MCItemStackMutable(recipeOutput))) { + toRemove.add(location); + } + } + } + toRemove.forEach(getManager().getRecipes()::remove); + } + }); + } + + @Override + public IRecipeType getRecipeType() { + return BloodMagicRecipeType.ARRAY; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/crt/AlchemyTableManager.java b/src/main/java/wayoftime/bloodmagic/compat/crt/AlchemyTableManager.java new file mode 100644 index 00000000..4a2e5221 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/crt/AlchemyTableManager.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.compat.crt; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.item.IIngredient; +import com.blamejared.crafttweaker.api.item.IItemStack; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionRemoveRecipeByOutput; +import com.blamejared.crafttweaker.impl.item.MCItemStackMutable; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import org.openzen.zencode.java.ZenCodeType; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@ZenRegister +@ZenCodeType.Name("mods.bloodmagic.AlchemyTable") +public class AlchemyTableManager implements IRecipeManager { + + @ZenCodeType.Method + public void addRecipe(String name, IItemStack output, IIngredient[] input, int syphon, int ticks, int minimumTier) { + name = fixRecipeName(name); + ResourceLocation location = new ResourceLocation("crafttweaker", name); + RecipeAlchemyTable recipe = new RecipeAlchemyTable(location, Arrays.stream(input).map(IIngredient::asVanillaIngredient).collect(Collectors.toList()), output.getInternal(), syphon, ticks, minimumTier); + CraftTweakerAPI.apply(new ActionAddRecipe(this, recipe, "")); + } + + @Override + public void removeRecipe(IItemStack output) { + + CraftTweakerAPI.apply(new ActionRemoveRecipeByOutput(this, output) { + @Override + public void apply() { + List toRemove = new ArrayList<>(); + for(ResourceLocation location : getManager().getRecipes().keySet()) { + IRecipe recipe = getManager().getRecipes().get(location); + if(recipe instanceof RecipeAlchemyTable) { + RecipeAlchemyTable recipeAT = (RecipeAlchemyTable) recipe; + ItemStack recipeOutput = recipeAT.getOutput(); + if(output.matches(new MCItemStackMutable(recipeOutput))) { + toRemove.add(location); + } + } + } + toRemove.forEach(getManager().getRecipes()::remove); + } + }); + } + + @Override + public IRecipeType getRecipeType() { + return BloodMagicRecipeType.ALCHEMYTABLE; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/crt/BloodAltarManager.java b/src/main/java/wayoftime/bloodmagic/compat/crt/BloodAltarManager.java new file mode 100644 index 00000000..5a740bfa --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/crt/BloodAltarManager.java @@ -0,0 +1,67 @@ +package wayoftime.bloodmagic.compat.crt; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.fluid.IFluidStack; +import com.blamejared.crafttweaker.api.item.IIngredient; +import com.blamejared.crafttweaker.api.item.IItemStack; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionRemoveRecipeByOutput; +import com.blamejared.crafttweaker.impl.item.MCItemStackMutable; +import com.blamejared.crafttweaker.impl.item.MCWeightedItemStack; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import org.apache.commons.lang3.tuple.Pair; +import org.openzen.zencode.java.ZenCodeType; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@ZenRegister +@ZenCodeType.Name("mods.bloodmagic.BloodAltar") +public class BloodAltarManager implements IRecipeManager { + + @ZenCodeType.Method + public void addRecipe(String name, IItemStack output, IIngredient input, int minimumTier, int syphon, int consumeRate, int drainRate) { + name = fixRecipeName(name); + ResourceLocation location = new ResourceLocation("crafttweaker", name); + RecipeBloodAltar recipeARC = new RecipeBloodAltar(location, input.asVanillaIngredient(), output.getInternal(), minimumTier, syphon, consumeRate, drainRate); + CraftTweakerAPI.apply(new ActionAddRecipe(this, recipeARC, "")); + } + + @Override + public void removeRecipe(IItemStack output) { + + CraftTweakerAPI.apply(new ActionRemoveRecipeByOutput(this, output) { + @Override + public void apply() { + List toRemove = new ArrayList<>(); + for(ResourceLocation location : getManager().getRecipes().keySet()) { + IRecipe recipe = getManager().getRecipes().get(location); + if(recipe instanceof RecipeBloodAltar) { + RecipeBloodAltar recipeBloodAltar = (RecipeBloodAltar) recipe; + ItemStack recOut = recipeBloodAltar.getOutput(); + if(output.matches(new MCItemStackMutable(recOut))) { + toRemove.add(location); + } + } + } + toRemove.forEach(getManager().getRecipes()::remove); + } + }); + } + + @Override + public IRecipeType getRecipeType() { + return BloodMagicRecipeType.ALTAR; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/crt/TartaricForgeManager.java b/src/main/java/wayoftime/bloodmagic/compat/crt/TartaricForgeManager.java new file mode 100644 index 00000000..1a45d208 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/crt/TartaricForgeManager.java @@ -0,0 +1,68 @@ +package wayoftime.bloodmagic.compat.crt; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.fluid.IFluidStack; +import com.blamejared.crafttweaker.api.item.IIngredient; +import com.blamejared.crafttweaker.api.item.IItemStack; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionRemoveRecipeByOutput; +import com.blamejared.crafttweaker.impl.item.MCItemStackMutable; +import com.blamejared.crafttweaker.impl.item.MCWeightedItemStack; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import org.apache.commons.lang3.tuple.Pair; +import org.openzen.zencode.java.ZenCodeType; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.BiFunction; +import java.util.stream.Collectors; + +@ZenRegister +@ZenCodeType.Name("mods.bloodmagic.TartaricForge") +public class TartaricForgeManager implements IRecipeManager { + + @ZenCodeType.Method + public void addRecipe(String name, IItemStack output, IIngredient[] input, double minimumSouls, double soulDrain) { + name = fixRecipeName(name); + ResourceLocation location = new ResourceLocation("crafttweaker", name); + RecipeTartaricForge recipe = new RecipeTartaricForge(location, Arrays.stream(input).map(IIngredient::asVanillaIngredient).collect(Collectors.toList()), output.getInternal(), minimumSouls, soulDrain); + CraftTweakerAPI.apply(new ActionAddRecipe(this, recipe, "")); + } + + @Override + public void removeRecipe(IItemStack output) { + + CraftTweakerAPI.apply(new ActionRemoveRecipeByOutput(this, output) { + @Override + public void apply() { + List toRemove = new ArrayList<>(); + for(ResourceLocation location : getManager().getRecipes().keySet()) { + IRecipe recipe = getManager().getRecipes().get(location); + if(recipe instanceof RecipeTartaricForge) { + RecipeTartaricForge recipeTF = (RecipeTartaricForge) recipe; + ItemStack recipeOutput = recipeTF.getOutput(); + if(output.matches(new MCItemStackMutable(recipeOutput))) { + toRemove.add(location); + } + } + } + toRemove.forEach(getManager().getRecipes()::remove); + } + }); + } + + @Override + public IRecipeType getRecipeType() { + return BloodMagicRecipeType.TARTARICFORGE; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java b/src/main/java/wayoftime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java new file mode 100644 index 00000000..55be8f70 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/BloodMagicJEIPlugin.java @@ -0,0 +1,77 @@ +package wayoftime.bloodmagic.compat.jei; + +import java.util.Objects; + +import com.google.common.collect.ImmutableSet; + +import mezz.jei.api.IModPlugin; +import mezz.jei.api.JeiPlugin; +import mezz.jei.api.helpers.IJeiHelpers; +import mezz.jei.api.registration.IRecipeCatalystRegistration; +import mezz.jei.api.registration.IRecipeCategoryRegistration; +import mezz.jei.api.registration.IRecipeRegistration; +import net.minecraft.client.Minecraft; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.compat.jei.alchemytable.AlchemyTableRecipeCategory; +import wayoftime.bloodmagic.compat.jei.altar.BloodAltarRecipeCategory; +import wayoftime.bloodmagic.compat.jei.arc.ARCFurnaceRecipeCategory; +import wayoftime.bloodmagic.compat.jei.arc.ARCRecipeCategory; +import wayoftime.bloodmagic.compat.jei.array.AlchemyArrayCraftingCategory; +import wayoftime.bloodmagic.compat.jei.forge.TartaricForgeRecipeCategory; + +@JeiPlugin +public class BloodMagicJEIPlugin implements IModPlugin +{ + public static IJeiHelpers jeiHelper; + + private static final ResourceLocation ID = BloodMagic.rl("jei_plugin"); + + @Override + public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) + { + registration.addRecipeCatalyst(new ItemStack(BloodMagicBlocks.SOUL_FORGE.get()), TartaricForgeRecipeCategory.UID); + registration.addRecipeCatalyst(new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get()), BloodAltarRecipeCategory.UID); + registration.addRecipeCatalyst(new ItemStack(BloodMagicItems.ARCANE_ASHES.get()), AlchemyArrayCraftingCategory.UID); + registration.addRecipeCatalyst(new ItemStack(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()), ARCRecipeCategory.UID); + registration.addRecipeCatalyst(new ItemStack(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get()), ARCFurnaceRecipeCategory.UID); + registration.addRecipeCatalyst(new ItemStack(BloodMagicBlocks.ALCHEMY_TABLE.get()), AlchemyTableRecipeCategory.UID); + } + + @Override + public void registerCategories(IRecipeCategoryRegistration registration) + { + jeiHelper = registration.getJeiHelpers(); + registration.addRecipeCategories(new TartaricForgeRecipeCategory(registration.getJeiHelpers().getGuiHelper())); + registration.addRecipeCategories(new BloodAltarRecipeCategory(registration.getJeiHelpers().getGuiHelper())); + registration.addRecipeCategories(new AlchemyArrayCraftingCategory(registration.getJeiHelpers().getGuiHelper())); + registration.addRecipeCategories(new ARCRecipeCategory(registration.getJeiHelpers().getGuiHelper())); + registration.addRecipeCategories(new ARCFurnaceRecipeCategory(registration.getJeiHelpers().getGuiHelper())); + registration.addRecipeCategories(new AlchemyTableRecipeCategory(registration.getJeiHelpers().getGuiHelper())); + } + + @Override + public void registerRecipes(IRecipeRegistration registration) + { + ClientWorld world = Objects.requireNonNull(Minecraft.getInstance().world); + registration.addRecipes(BloodMagicAPI.INSTANCE.getRecipeRegistrar().getTartaricForgeRecipes(world), TartaricForgeRecipeCategory.UID); + registration.addRecipes(BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAltarRecipes(world), BloodAltarRecipeCategory.UID); + registration.addRecipes(BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAlchemyArrayRecipes(world), AlchemyArrayCraftingCategory.UID); + registration.addRecipes(BloodMagicAPI.INSTANCE.getRecipeRegistrar().getARCRecipes(world), ARCRecipeCategory.UID); + registration.addRecipes(ImmutableSet.copyOf(world.getRecipeManager().getRecipesForType(IRecipeType.SMELTING)), ARCFurnaceRecipeCategory.UID); + registration.addRecipes(BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAlchemyTableRecipes(world), AlchemyTableRecipeCategory.UID); + } + + @Override + public ResourceLocation getPluginUid() + { + return ID; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/alchemytable/AlchemyTableRecipeCategory.java b/src/main/java/wayoftime/bloodmagic/compat/jei/alchemytable/AlchemyTableRecipeCategory.java new file mode 100644 index 00000000..1909e83f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/alchemytable/AlchemyTableRecipeCategory.java @@ -0,0 +1,162 @@ +package wayoftime.bloodmagic.compat.jei.alchemytable; + +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.google.common.collect.Lists; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.core.registry.OrbRegistry; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class AlchemyTableRecipeCategory implements IRecipeCategory +{ + private static final int OUTPUT_SLOT = 0; + private static final int ORB_SLOT = 1; + private static final int INPUT_SLOT = 2; + public static final ResourceLocation UID = BloodMagic.rl(Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE); + + @Nonnull + private final IDrawable background; + private final IDrawable icon; +// @Nonnull +// private final ICraftingGridHelper craftingGridHelper; + + public AlchemyTableRecipeCategory(IGuiHelper guiHelper) + { + icon = guiHelper.createDrawableIngredient(new ItemStack(BloodMagicBlocks.ALCHEMY_TABLE.get())); + background = guiHelper.createDrawable(BloodMagic.rl("gui/jei/alchemytable.png"), 0, 0, 118, 40); +// craftingGridHelper = guiHelper.createCraftingGridHelper(INPUT_SLOT); + } + + @Nonnull + @Override + public ResourceLocation getUid() + { + return UID; + } + + @Override + public List getTooltipStrings(RecipeAlchemyTable recipe, double mouseX, double mouseY) + { + List tooltip = Lists.newArrayList(); + +// if (mouseX >= 13 && mouseX <= 64 && mouseY >= 27 && mouseY <= 58) +// { +// tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.consumptionrate", ChatUtil.DECIMAL_FORMAT.format(recipe.getConsumeRate()))); +// tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.drainrate", ChatUtil.DECIMAL_FORMAT.format(recipe.getDrainRate()))); +// } + + if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34) + { + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.tier", ChatUtil.DECIMAL_FORMAT.format(recipe.getMinimumTier()))); + tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.lpDrained", ChatUtil.DECIMAL_FORMAT.format(recipe.getSyphon()))); + tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.ticksRequired", ChatUtil.DECIMAL_FORMAT.format(recipe.getTicks()))); + } + + return tooltip; + } + + @Nonnull + @Override + public String getTitle() + { + return TextHelper.localize("jei.bloodmagic.recipe.alchemytable"); + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Nullable + @Override + public IDrawable getIcon() + { + return icon; + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull RecipeAlchemyTable recipe, @Nonnull IIngredients ingredients) + { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + guiItemStacks.init(OUTPUT_SLOT, false, 91, 13); + guiItemStacks.init(ORB_SLOT, true, 60, 0); + + for (int y = 0; y < 2; ++y) + { + for (int x = 0; x < 3; ++x) + { + int index = INPUT_SLOT + x + (y * 3); + guiItemStacks.init(index, true, x * 18, y * 18); + } + } +// guiItemStacks.set(ORB_SLOT, OrbRegistry.getOrbsDownToTier(recipe.getMinimumTier())); +// guiItemStacks.set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0)); + +// guiItemStacks.init(OUTPUT_SLOT, false, 125, 30); +// guiItemStacks.init(INPUT_SLOT, true, 31, 0); +// craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class), 3, 2); + + guiItemStacks.set(ingredients); + } + + @Override + public Class getRecipeClass() + { + return RecipeAlchemyTable.class; + } + + @Override + public void setIngredients(RecipeAlchemyTable recipe, IIngredients ingredients) + { + List validOrbs = OrbRegistry.getOrbsDownToTier(recipe.getMinimumTier()); + + ItemStack[] validOrbStacks = new ItemStack[validOrbs.size()]; + for (int i = 0; i < validOrbStacks.length; i++) + { + validOrbStacks[i] = validOrbs.get(i); + } + + List ingList = Lists.newArrayList(); + ingList.add(Ingredient.fromStacks(validOrbStacks)); + ingList.addAll(recipe.getInput()); + ingredients.setInputIngredients(ingList); + ingredients.setOutput(VanillaTypes.ITEM, recipe.getOutput()); + } + +// @Override +// public void draw(RecipeBloodAltar recipe, MatrixStack matrixStack, double mouseX, double mouseY) +// { +// Minecraft mc = Minecraft.getInstance(); +// String[] infoString = new String[] +// { TextHelper.localize("jei.bloodmagic.recipe.requiredtier", NumeralHelper.toRoman(recipe.getMinimumTier().toInt())), +// TextHelper.localize("jei.bloodmagic.recipe.requiredlp", recipe.getSyphon()) }; +// mc.fontRenderer.drawString(matrixStack, infoString[0], 90 +// - mc.fontRenderer.getStringWidth(infoString[0]) / 2, 0, Color.gray.getRGB()); +// mc.fontRenderer.drawString(matrixStack, infoString[1], 90 +// - mc.fontRenderer.getStringWidth(infoString[1]) / 2, 10, Color.gray.getRGB()); +// } + +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/altar/BloodAltarRecipeCategory.java b/src/main/java/wayoftime/bloodmagic/compat/jei/altar/BloodAltarRecipeCategory.java new file mode 100644 index 00000000..72c72c3f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/altar/BloodAltarRecipeCategory.java @@ -0,0 +1,130 @@ +package wayoftime.bloodmagic.compat.jei.altar; + +import java.awt.Color; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.google.common.collect.Lists; +import com.mojang.blaze3d.matrix.MatrixStack; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NumeralHelper; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class BloodAltarRecipeCategory implements IRecipeCategory +{ + private static final int INPUT_SLOT = 1; + private static final int OUTPUT_SLOT = 0; + public static final ResourceLocation UID = BloodMagic.rl(Constants.Compat.JEI_CATEGORY_ALTAR); + + @Nonnull + private final IDrawable background; + private final IDrawable icon; +// @Nonnull +// private final ICraftingGridHelper craftingGridHelper; + + public BloodAltarRecipeCategory(IGuiHelper guiHelper) + { + icon = guiHelper.createDrawableIngredient(new ItemStack(BloodMagicBlocks.BLOOD_ALTAR.get())); + background = guiHelper.createDrawable(BloodMagic.rl("gui/jei/altar.png"), 3, 4, 155, 65); +// craftingGridHelper = guiHelper.createCraftingGridHelper(INPUT_SLOT); + } + + @Nonnull + @Override + public ResourceLocation getUid() + { + return UID; + } + + @Override + public List getTooltipStrings(RecipeBloodAltar recipe, double mouseX, double mouseY) + { + List tooltip = Lists.newArrayList(); + + if (mouseX >= 13 && mouseX <= 64 && mouseY >= 27 && mouseY <= 58) + { + tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.consumptionrate", ChatUtil.DECIMAL_FORMAT.format(recipe.getConsumeRate()))); + tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.drainrate", ChatUtil.DECIMAL_FORMAT.format(recipe.getDrainRate()))); + } + + return tooltip; + } + + @Nonnull + @Override + public String getTitle() + { + return TextHelper.localize("jei.bloodmagic.recipe.altar"); + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Nullable + @Override + public IDrawable getIcon() + { + return icon; + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull RecipeBloodAltar recipe, @Nonnull IIngredients ingredients) + { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + guiItemStacks.init(OUTPUT_SLOT, false, 125, 30); + guiItemStacks.init(INPUT_SLOT, true, 31, 0); + + guiItemStacks.set(ingredients); + } + + @Override + public Class getRecipeClass() + { + return RecipeBloodAltar.class; + } + + @Override + public void setIngredients(RecipeBloodAltar recipe, IIngredients ingredients) + { + ingredients.setInputIngredients(recipe.getIngredients()); + ingredients.setOutput(VanillaTypes.ITEM, recipe.getOutput()); + } + + @Override + public void draw(RecipeBloodAltar recipe, MatrixStack matrixStack, double mouseX, double mouseY) + { + Minecraft mc = Minecraft.getInstance(); + String[] infoString = new String[] + { TextHelper.localize("jei.bloodmagic.recipe.requiredtier", NumeralHelper.toRoman(recipe.getMinimumTier() + 1)), + TextHelper.localize("jei.bloodmagic.recipe.requiredlp", recipe.getSyphon()) }; + mc.fontRenderer.drawString(matrixStack, infoString[0], 90 + - mc.fontRenderer.getStringWidth(infoString[0]) / 2, 0, Color.gray.getRGB()); + mc.fontRenderer.drawString(matrixStack, infoString[1], 90 + - mc.fontRenderer.getStringWidth(infoString[1]) / 2, 10, Color.gray.getRGB()); + } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/arc/ARCFurnaceRecipeCategory.java b/src/main/java/wayoftime/bloodmagic/compat/jei/arc/ARCFurnaceRecipeCategory.java new file mode 100644 index 00000000..d8d5ca72 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/arc/ARCFurnaceRecipeCategory.java @@ -0,0 +1,114 @@ +package wayoftime.bloodmagic.compat.jei.arc; + +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipe; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class ARCFurnaceRecipeCategory implements IRecipeCategory +{ + private static final int OUTPUT_SLOT = 0; + private static final int INPUT_SLOT = 1; + private static final int CATALYST_SLOT = 2; + public static final ResourceLocation UID = BloodMagic.rl(Constants.Compat.JEI_CATEGORY_ARC + "furnace"); + public static final ResourceLocation BACKGROUNDRL = BloodMagic.rl("gui/jei/arc.png"); + + @Nonnull + private final IDrawable background; + private final IDrawable icon; +// @Nonnull +// private final ICraftingGridHelper craftingGridHelper; + + public ARCFurnaceRecipeCategory(IGuiHelper guiHelper) + { + icon = guiHelper.createDrawableIngredient(new ItemStack(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get())); + background = guiHelper.createDrawable(BACKGROUNDRL, 0, 0, 157, 43); +// craftingGridHelper = guiHelper.createCraftingGridHelper(INPUT_SLOT); + } + + @Nonnull + @Override + public ResourceLocation getUid() + { + return UID; + } + + @Nonnull + @Override + public String getTitle() + { + return TextHelper.localize("jei.bloodmagic.recipe.arcfurnace"); + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Nullable + @Override + public IDrawable getIcon() + { + return icon; + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull FurnaceRecipe recipe, @Nonnull IIngredients ingredients) + { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 53, 16); + recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5); + recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 21, 16); + + guiItemStacks.set(ingredients); + } + + @Override + public Class getRecipeClass() + { + return FurnaceRecipe.class; + } + + @Override + public void setIngredients(FurnaceRecipe recipe, IIngredients ingredients) + { + List inputIngList = recipe.getIngredients(); + inputIngList.add(Ingredient.fromTag(BloodMagicTags.ARC_TOOL_FURNACE)); + ingredients.setInputIngredients(inputIngList); + ingredients.setOutput(VanillaTypes.ITEM, recipe.getRecipeOutput()); + } + + @Override + public void draw(FurnaceRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) + { + FluidStack outputStack = FluidStack.EMPTY; + ClientHandler.handleGuiTank(matrixStack, outputStack, outputStack.getAmount(), 140, 7, 16, 36, 157, 6, 18, 38, (int) mouseX, (int) mouseY, BACKGROUNDRL.toString(), null); + + FluidStack inputStack = FluidStack.EMPTY; + ClientHandler.handleGuiTank(matrixStack, inputStack, inputStack.getAmount(), 1, 26, 16, 16, 175, 26, 18, 18, (int) mouseX, (int) mouseY, BACKGROUNDRL.toString(), null); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/arc/ARCRecipeCategory.java b/src/main/java/wayoftime/bloodmagic/compat/jei/arc/ARCRecipeCategory.java new file mode 100644 index 00000000..668ebcb0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/arc/ARCRecipeCategory.java @@ -0,0 +1,172 @@ +package wayoftime.bloodmagic.compat.jei.arc; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class ARCRecipeCategory implements IRecipeCategory +{ + private static final int OUTPUT_SLOT = 0; + private static final int INPUT_SLOT = 4; + private static final int CATALYST_SLOT = 5; + public static final ResourceLocation UID = BloodMagic.rl(Constants.Compat.JEI_CATEGORY_ARC); + public static final ResourceLocation BACKGROUNDRL = BloodMagic.rl("gui/jei/arc.png"); + + @Nonnull + private final IDrawable background; + private final IDrawable icon; +// @Nonnull +// private final ICraftingGridHelper craftingGridHelper; + + public ARCRecipeCategory(IGuiHelper guiHelper) + { + icon = guiHelper.createDrawableIngredient(new ItemStack(BloodMagicBlocks.ALCHEMICAL_REACTION_CHAMBER.get())); + background = guiHelper.createDrawable(BACKGROUNDRL, 0, 0, 157, 43); +// craftingGridHelper = guiHelper.createCraftingGridHelper(INPUT_SLOT); + } + + @Nonnull + @Override + public ResourceLocation getUid() + { + return UID; + } + + @Nonnull + @Override + public String getTitle() + { + return TextHelper.localize("jei.bloodmagic.recipe.arc"); + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Nullable + @Override + public IDrawable getIcon() + { + return icon; + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull RecipeARC recipe, @Nonnull IIngredients ingredients) + { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 53, 16); + recipeLayout.getItemStacks().init(OUTPUT_SLOT + 1, false, 53 + 22 * 1, 16); + recipeLayout.getItemStacks().init(OUTPUT_SLOT + 2, false, 53 + 22 * 2, 16); + recipeLayout.getItemStacks().init(OUTPUT_SLOT + 3, false, 53 + 22 * 3, 16); + recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5); + recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 21, 16); + + guiItemStacks.set(ingredients); + } + + @Override + public Class getRecipeClass() + { + return RecipeARC.class; + } + + @Override + public void setIngredients(RecipeARC recipe, IIngredients ingredients) + { + ingredients.setInputIngredients(recipe.getIngredients()); + ingredients.setOutputs(VanillaTypes.ITEM, recipe.getAllListedOutputs()); + } + + @Override + public void draw(RecipeARC recipe, MatrixStack matrixStack, double mouseX, double mouseY) + { + Minecraft mc = Minecraft.getInstance(); + double[] chanceArray = recipe.getAllOutputChances(); + + String[] infoString = new String[chanceArray.length]; + for (int i = 0; i < infoString.length; i++) + { + if (chanceArray[i] >= 1) + { + infoString[i] = ""; + } else if (chanceArray[i] < 0.01) + { + infoString[i] = "<1%"; + } else + { + infoString[i] = "" + (int) (chanceArray[i] * 100) + "%"; + } + + mc.fontRenderer.drawStringWithShadow(matrixStack, infoString[i], 86 + 22 * i + - mc.fontRenderer.getStringWidth(infoString[i]) / 2, 5, Color.white.getRGB()); + } + +// if (recipe.getFluidOutput() != null && !recipe.getFluidOutput().isEmpty()) + { + FluidStack outputStack = recipe.getFluidOutput(); + ClientHandler.handleGuiTank(matrixStack, outputStack, outputStack.getAmount(), 140, 7, 16, 36, 157, 6, 18, 38, (int) mouseX, (int) mouseY, BACKGROUNDRL.toString(), null); + } + + if (recipe.getFluidIngredient() != null) + { + List inputFluids = recipe.getFluidIngredient().getRepresentations(); + FluidStack inputStack = inputFluids.get(0); + ClientHandler.handleGuiTank(matrixStack, inputStack, inputStack.getAmount(), 1, 26, 16, 16, 175, 26, 18, 18, (int) mouseX, (int) mouseY, BACKGROUNDRL.toString(), null); + } + +// { TextHelper.localize("jei.bloodmagic.recipe.requiredtier", NumeralHelper.toRoman(recipe.getMinimumTier().toInt())), +// TextHelper.localize("jei.bloodmagic.recipe.requiredlp", recipe.getSyphon()) }; +// mc.fontRenderer.drawString(matrixStack, infoString[0], 90 +// - mc.fontRenderer.getStringWidth(infoString[0]) / 2, 0, Color.gray.getRGB()); +// mc.fontRenderer.drawString(matrixStack, infoString[1], 90 +// - mc.fontRenderer.getStringWidth(infoString[1]) / 2, 10, Color.gray.getRGB()); + } + + @Override + public List getTooltipStrings(RecipeARC recipe, double mouseX, double mouseY) + { + List tooltip = new ArrayList<>(); + FluidStack outputStack = recipe.getFluidOutput(); + if (!outputStack.isEmpty()) + { + ClientHandler.handleGuiTank(null, outputStack, -1, 140, 8, 16, 34, 157, 7, 18, 36, (int) mouseX, (int) mouseY, BACKGROUNDRL.toString(), tooltip); + } + + if (recipe.getFluidIngredient() != null) + { + List inputFluids = recipe.getFluidIngredient().getRepresentations(); + FluidStack inputStack = inputFluids.get(0); + ClientHandler.handleGuiTank(null, inputStack, -1, 1, 26, 16, 16, 175, 26, 18, 18, (int) mouseX, (int) mouseY, BACKGROUNDRL.toString(), tooltip); + } + + return tooltip; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/array/AlchemyArrayCraftingCategory.java b/src/main/java/wayoftime/bloodmagic/compat/jei/array/AlchemyArrayCraftingCategory.java new file mode 100644 index 00000000..45d9d511 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/array/AlchemyArrayCraftingCategory.java @@ -0,0 +1,101 @@ +package wayoftime.bloodmagic.compat.jei.array; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class AlchemyArrayCraftingCategory implements IRecipeCategory +{ + private static final int OUTPUT_SLOT = 0; + private static final int INPUT_SLOT = 1; + private static final int CATALYST_SLOT = 2; + public static final ResourceLocation UID = BloodMagic.rl(Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY); + + @Nonnull + private final IDrawable background; + private final IDrawable icon; +// @Nonnull +// private final ICraftingGridHelper craftingGridHelper; + + public AlchemyArrayCraftingCategory(IGuiHelper guiHelper) + { + icon = guiHelper.createDrawableIngredient(new ItemStack(BloodMagicItems.ARCANE_ASHES.get())); + background = guiHelper.createDrawable(BloodMagic.rl("gui/jei/binding.png"), 0, 0, 100, 30); +// craftingGridHelper = guiHelper.createCraftingGridHelper(INPUT_SLOT); + } + + @Nonnull + @Override + public ResourceLocation getUid() + { + return UID; + } + + @Nonnull + @Override + public String getTitle() + { + return TextHelper.localize("jei.bloodmagic.recipe.alchemyarraycrafting"); + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Nullable + @Override + public IDrawable getIcon() + { + return icon; + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull RecipeAlchemyArray recipe, @Nonnull IIngredients ingredients) + { + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5); + recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5); + recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3); + + guiItemStacks.set(ingredients); + } + + @Override + public Class getRecipeClass() + { + return RecipeAlchemyArray.class; + } + + @Override + public void setIngredients(RecipeAlchemyArray recipe, IIngredients ingredients) + { + ingredients.setInputIngredients(recipe.getIngredients()); + if (recipe.getOutput().isEmpty()) + { + ingredients.setOutput(VanillaTypes.ITEM, new ItemStack(BloodMagicItems.ARCANE_ASHES.get())); +// ingredients.setOutput(VanillaTypes.ITEM, new ItemStack(BloodMagicBlocks.ALCHEMY_ARRAY.get())); + } else + { + ingredients.setOutput(VanillaTypes.ITEM, recipe.getOutput()); + } + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java b/src/main/java/wayoftime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java new file mode 100644 index 00000000..27061b92 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java @@ -0,0 +1,172 @@ +package wayoftime.bloodmagic.compat.jei.forge; + +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.google.common.collect.Lists; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class TartaricForgeRecipeCategory implements IRecipeCategory +{ + private static final int OUTPUT_SLOT = 0; + private static final int GEM_SLOT = 1; + private static final int INPUT_SLOT = 2; + public static final ResourceLocation UID = BloodMagic.rl(Constants.Compat.JEI_CATEGORY_SOULFORGE); + + @Nonnull + private final IDrawable background; + private final IDrawable icon; +// @Nonnull +// private final ICraftingGridHelper craftingGridHelper; + + public TartaricForgeRecipeCategory(IGuiHelper guiHelper) + { + icon = guiHelper.createDrawableIngredient(new ItemStack(BloodMagicBlocks.SOUL_FORGE.get())); + background = guiHelper.createDrawable(BloodMagic.rl("gui/jei/soulforge.png"), 0, 0, 100, 40); +// craftingGridHelper = guiHelper.createCraftingGridHelper(INPUT_SLOT); + } + + @Nonnull + @Override + public ResourceLocation getUid() + { + return UID; + } + + @Override + public List getTooltipStrings(RecipeTartaricForge recipe, double mouseX, double mouseY) + { + List tooltip = Lists.newArrayList(); + if (mouseX >= 40 && mouseX <= 60 && mouseY >= 21 && mouseY <= 34) + { + tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.minimumsouls", ChatUtil.DECIMAL_FORMAT.format(recipe.getMinimumSouls()))); + tooltip.add(new TranslationTextComponent("jei.bloodmagic.recipe.soulsdrained", ChatUtil.DECIMAL_FORMAT.format(recipe.getSoulDrain()))); + } + return tooltip; + } + + @Nonnull + @Override + public String getTitle() + { + return TextHelper.localize("jei.bloodmagic.recipe.soulforge"); + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Nullable + @Override + public IDrawable getIcon() + { + return icon; + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull RecipeTartaricForge recipe, @Nonnull IIngredients ingredients) + { + List validGems = Lists.newArrayList(); + for (DefaultWill will : DefaultWill.values()) + { + if (will.minSouls >= recipe.getMinimumSouls()) + { + validGems.add(will.willStack); + } + } + + IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); + + guiItemStacks.init(OUTPUT_SLOT, false, 73, 13); + + guiItemStacks.init(GEM_SLOT, true, 42, 0); + + for (int y = 0; y < 2; ++y) + { + for (int x = 0; x < 2; ++x) + { + int index = INPUT_SLOT + x + (y * 2); + guiItemStacks.init(index, true, x * 18, y * 18); + } + } + + guiItemStacks.set(GEM_SLOT, validGems); + guiItemStacks.set(OUTPUT_SLOT, ingredients.getOutputs(VanillaTypes.ITEM).get(0)); + guiItemStacks.set(ingredients); + } + + @Override + public Class getRecipeClass() + { + return RecipeTartaricForge.class; + } + + @Override + public void setIngredients(RecipeTartaricForge recipe, IIngredients ingredients) + { + List validGems = Lists.newArrayList(); + for (DefaultWill will : DefaultWill.values()) + { + if (will.minSouls >= recipe.getMinimumSouls()) + { + validGems.add(will.willStack); + } + } + + ItemStack[] validGemStacks = new ItemStack[validGems.size()]; + for (int i = 0; i < validGemStacks.length; i++) + { + validGemStacks[i] = validGems.get(i); + } + + List ingList = Lists.newArrayList(); + ingList.add(Ingredient.fromStacks(validGemStacks)); + ingList.addAll(recipe.getInput()); + + ingredients.setInputIngredients(ingList); + ingredients.setOutput(VanillaTypes.ITEM, recipe.getOutput()); + } + + public enum DefaultWill + { + SOUL(new ItemStack(BloodMagicItems.MONSTER_SOUL_RAW.get()), 16), + PETTY(new ItemStack(BloodMagicItems.PETTY_GEM.get()), 64), + LESSER(new ItemStack(BloodMagicItems.LESSER_GEM.get()), 256), + COMMON(new ItemStack(BloodMagicItems.COMMON_GEM.get()), 1024), + GREATER(new ItemStack(BloodMagicItems.GREATER_GEM.get()), 4096); +// GRAND(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, 4), 16384); + + public final ItemStack willStack; + public final double minSouls; + + DefaultWill(ItemStack willStack, double minSouls) + { + this.willStack = willStack; + this.minSouls = minSouls; + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/ARCProcessor.java b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/ARCProcessor.java new file mode 100644 index 00000000..1cd3fa4d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/ARCProcessor.java @@ -0,0 +1,109 @@ +package wayoftime.bloodmagic.compat.patchouli.processors; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.apache.logging.log4j.LogManager; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import vazkii.patchouli.api.IComponentProcessor; +import vazkii.patchouli.api.IVariable; +import vazkii.patchouli.api.IVariableProvider; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeARC; + +public class ARCProcessor implements IComponentProcessor +{ + private RecipeARC recipe; + + @Override + public void setup(IVariableProvider variables) + { + ResourceLocation id = new ResourceLocation(variables.get("recipe").asString()); + Optional> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id); + if (recipeHandler.isPresent()) + { + IRecipe recipe = recipeHandler.get(); + if (recipe.getType().equals(BloodMagicRecipeType.ARC)) + { + this.recipe = (RecipeARC) recipe; + } + } + if (this.recipe == null) + { + LogManager.getLogger().warn("Guidebook missing Alchemical Reaction Chamber recipe {}", id); + } + } + + @Override + public IVariable process(String key) + { + if (recipe == null) + { + return null; + } else if (key.startsWith("output")) + { + int index = Integer.parseInt(key.substring(6)) - 1; + if (recipe.getAllListedOutputs().size() > index) + { + return IVariable.from(recipe.getAllListedOutputs().get(index)); + } else + { + return null; + } + } else if (key.startsWith("chance")) + { + int index = Integer.parseInt(key.substring(6)) - 2; // Index 0 = 2nd output. + if (recipe.getAllOutputChances().length > index) + { + double chance = recipe.getAllOutputChances()[index] * 100; + if (chance < 1) + { + return IVariable.wrap("<1"); + } + return IVariable.wrap(Math.round(chance)); + } + } else if (key.startsWith("show_chance")) + { + int index = Integer.parseInt(key.substring(11)) - 2; // Index 0 = 2nd output. + if (recipe.getAllOutputChances().length > index) + { + return IVariable.wrap(true); + } + } + switch (key) + { + case "show_fluid_tooltip": + if (recipe.getFluidIngredient() != null || recipe.getFluidOutput() != FluidStack.EMPTY) + { + return IVariable.wrap(true); + } + return IVariable.wrap(false); + case "input": + return IVariable.wrapList(Arrays.stream(recipe.getInput().getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + case "tool": + return IVariable.wrapList(Arrays.stream(recipe.getTool().getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + case "tooltip_fluid_input": + if (recipe.getFluidIngredient() != null) + { + FluidStack fluid = recipe.getFluidIngredient().getRepresentations().get(0); + return IVariable.wrap(fluid.getAmount() + "mb of " + fluid.getTranslationKey()); + } + return IVariable.wrap("None"); + case "tooltip_fluid_output": + if (recipe.getFluidOutput() != FluidStack.EMPTY) + { + FluidStack fluid = recipe.getFluidOutput(); + return IVariable.wrap(fluid.getAmount() + "mb of " + fluid.getTranslationKey()); + } + return IVariable.wrap("None"); + default: + return null; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/AlchemyArrayProcessor.java b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/AlchemyArrayProcessor.java new file mode 100644 index 00000000..5abc768b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/AlchemyArrayProcessor.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.compat.patchouli.processors; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.apache.logging.log4j.LogManager; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import vazkii.patchouli.api.IComponentProcessor; +import vazkii.patchouli.api.IVariable; +import vazkii.patchouli.api.IVariableProvider; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; + +public class AlchemyArrayProcessor implements IComponentProcessor +{ + private RecipeAlchemyArray recipe; + + @Override + public void setup(IVariableProvider variables) + { + ResourceLocation id = new ResourceLocation(variables.get("recipe").asString()); + Optional> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id); + if (recipeHandler.isPresent()) + { + IRecipe recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get(); + if (recipe.getType().equals(BloodMagicRecipeType.ARRAY)) + { + this.recipe = (RecipeAlchemyArray) recipe; + } + } + if (this.recipe == null) + { + LogManager.getLogger().warn("Guidebook missing Alchemy Array recipe {}", id); + } + } + + @Override + public IVariable process(String key) + { + if (recipe == null) + { + return null; + } + switch (key) + { + case "baseinput": + return IVariable.wrapList(Arrays.stream(recipe.getBaseInput().getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + case "addedinput": + return IVariable.wrapList(Arrays.stream(recipe.getAddedInput().getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + case "output": + return IVariable.from(recipe.getOutput()); + default: + return null; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/AlchemyTableProcessor.java b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/AlchemyTableProcessor.java new file mode 100644 index 00000000..a62f02b5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/AlchemyTableProcessor.java @@ -0,0 +1,94 @@ +package wayoftime.bloodmagic.compat.patchouli.processors; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.apache.logging.log4j.LogManager; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import vazkii.patchouli.api.IComponentProcessor; +import vazkii.patchouli.api.IVariable; +import vazkii.patchouli.api.IVariableProvider; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; + +public class AlchemyTableProcessor implements IComponentProcessor +{ + private RecipeAlchemyTable recipe; + + @Override + public void setup(IVariableProvider variables) + { + ResourceLocation id = new ResourceLocation(variables.get("recipe").asString()); + Optional> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id); + if (recipeHandler.isPresent()) + { + IRecipe recipe = recipeHandler.get(); + if (recipe.getType().equals(BloodMagicRecipeType.ALCHEMYTABLE)) + { + this.recipe = (RecipeAlchemyTable) recipe; + } + } + if (this.recipe == null) + { + LogManager.getLogger().warn("Guidebook missing Alchemy Table recipe {}", id); + } + } + + @Override + public IVariable process(String key) + { + if (recipe == null) + { + return null; + } else if (key.startsWith("input")) + { + int index = Integer.parseInt(key.substring(5)) - 1; + if (recipe.getInput().size() > index) + { + return IVariable.wrapList(Arrays.stream(recipe.getInput().get(index).getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + } else + { + return null; + } + } + switch (key) + { + case "output": + return IVariable.from(recipe.getOutput()); + case "syphon": + return IVariable.wrap(recipe.getSyphon()); + case "time": + return IVariable.wrap(recipe.getTicks()); + case "orb": + switch (recipe.getMinimumTier()) + { + case 0: // same as Case 1 + case 1: + return IVariable.from(new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get())); + case 2: + return IVariable.from(new ItemStack(BloodMagicItems.APPRENTICE_BLOOD_ORB.get())); + case 3: + return IVariable.from(new ItemStack(BloodMagicItems.MAGICIAN_BLOOD_ORB.get())); + case 4: + return IVariable.from(new ItemStack(BloodMagicItems.MASTER_BLOOD_ORB.get())); + // case 5: return IVariable.from(new + // ItemStack(BloodMagicItems.ARCHMAGES_BLOOD_ORB.get())); + // case 6: return IVariable.from(new + // ItemStack(BloodMagicItems.TRANSCENDENT_BLOOD_ORB.get())); + default: + LogManager.getLogger().warn("Guidebook unable to find large enough Blood Orb for {}", recipe.getId()); + return IVariable.from(new ItemStack(Items.BARRIER)); + } + default: + return null; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/BloodAltarProcessor.java b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/BloodAltarProcessor.java new file mode 100644 index 00000000..81476136 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/BloodAltarProcessor.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.compat.patchouli.processors; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.apache.logging.log4j.LogManager; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import vazkii.patchouli.api.IComponentProcessor; +import vazkii.patchouli.api.IVariable; +import vazkii.patchouli.api.IVariableProvider; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; + +public class BloodAltarProcessor implements IComponentProcessor +{ + private RecipeBloodAltar recipe; + + @Override + public void setup(IVariableProvider variables) + { + ResourceLocation id = new ResourceLocation(variables.get("recipe").asString()); + Optional> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id); + if (recipeHandler.isPresent()) + { + IRecipe recipe = recipeHandler.get(); + if (recipe.getType().equals(BloodMagicRecipeType.ALTAR)) + { + this.recipe = (RecipeBloodAltar) recipe; + } + } + if (this.recipe == null) + { + LogManager.getLogger().warn("Guidebook missing Blood Altar recipe {}", id); + } + } + + @Override + public IVariable process(String key) + { + if (recipe == null) + { + return null; + } + switch (key) + { + case "input": + return IVariable.wrapList(Arrays.stream(recipe.getInput().getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + case "output": + return IVariable.from(recipe.getOutput()); + case "tier": + return IVariable.wrap(recipe.getMinimumTier() + 1); + case "lp": + return IVariable.wrap(recipe.getSyphon()); + default: + return null; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/TartaricForgeProcessor.java b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/TartaricForgeProcessor.java new file mode 100644 index 00000000..6815812f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/compat/patchouli/processors/TartaricForgeProcessor.java @@ -0,0 +1,100 @@ +package wayoftime.bloodmagic.compat.patchouli.processors; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.apache.logging.log4j.LogManager; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import vazkii.patchouli.api.IComponentProcessor; +import vazkii.patchouli.api.IVariable; +import vazkii.patchouli.api.IVariableProvider; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; + +public class TartaricForgeProcessor implements IComponentProcessor +{ + private RecipeTartaricForge recipe; + + @Override + public void setup(IVariableProvider variables) + { + ResourceLocation id = new ResourceLocation(variables.get("recipe").asString()); + Optional> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id); + if (recipeHandler.isPresent()) + { + IRecipe recipe = recipeHandler.get(); + if (recipe.getType().equals(BloodMagicRecipeType.TARTARICFORGE)) + { + this.recipe = (RecipeTartaricForge) recipe; + } + } + if (this.recipe == null) + { + LogManager.getLogger().warn("Guidebook missing Hellfire Forge recipe {}", id); + } + } + + @Override + public IVariable process(String key) + { + if (recipe == null) + { + return null; + } + if (key.startsWith("input")) + { + int index = Integer.parseInt(key.substring(5)) - 1; + if (recipe.getInput().size() > index) + { + return IVariable.wrapList(Arrays.stream(recipe.getInput().get(index).getMatchingStacks()).map(IVariable::from).collect(Collectors.toList())); + } else + { + return null; + } + } + switch (key) + { + case "output": + return IVariable.from(recipe.getOutput()); + case "willrequired": + return IVariable.wrap(recipe.getMinimumSouls()); + case "willdrain": + return IVariable.wrap(recipe.getSoulDrain()); + case "will": + if (recipe.getMinimumSouls() <= 1) + { + return IVariable.from(new ItemStack(BloodMagicItems.MONSTER_SOUL_RAW.get())); + } else if (recipe.getMinimumSouls() <= 64) + { + return IVariable.from(new ItemStack(BloodMagicItems.PETTY_GEM.get())); + } else if (recipe.getMinimumSouls() <= 256) + { + return IVariable.from(new ItemStack(BloodMagicItems.LESSER_GEM.get())); + } else if (recipe.getMinimumSouls() <= 1024) + { + return IVariable.from(new ItemStack(BloodMagicItems.COMMON_GEM.get())); + } else if (recipe.getMinimumSouls() <= 4096) + { + return IVariable.from(new ItemStack(BloodMagicItems.GREATER_GEM.get())); + // } else if (recipe.getMinimumSouls() <= 16384) { + // return IVariable.from(new ItemStack(BloodMagicItems.GRAND_GEM.get())); + // } + } else + { + LogManager.getLogger().warn("Guidebook could not find a large enough Tartaric Gem for {}", recipe.getId()); + return IVariable.from(new ItemStack(Items.BARRIER)); + + } + default: + return null; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java b/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java new file mode 100644 index 00000000..4ae45c7f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java @@ -0,0 +1,136 @@ +package wayoftime.bloodmagic.core; + +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Supplier; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.anointment.Anointment; +import wayoftime.bloodmagic.common.registration.impl.AnointmentDeferredRegister; +import wayoftime.bloodmagic.common.registration.impl.AnointmentRegistryObject; +import wayoftime.bloodmagic.gson.Serializers; + +public class AnointmentRegistrar +{ + public static final AnointmentDeferredRegister ANOINTMENTS = new AnointmentDeferredRegister(BloodMagic.MODID); + + public static final Map ANOINTMENT_MAP = new HashMap<>(); + + private static final Map DEFINITIONS = ((Supplier>) () -> { + Map def = new HashMap<>(); + def.put("melee_damage", BloodMagic.rl("melee_damage")); + def.put("holy_water", BloodMagic.rl("holy_water")); + def.put("hidden_knowledge", BloodMagic.rl("hidden_knowledge")); + def.put("quick_draw", BloodMagic.rl("quick_draw")); + def.put("bow_power", BloodMagic.rl("bow_power")); +// def.put("arrow_shot", BloodMagic.rl("arrow_shot")); +// def.put("critical_strike", BloodMagic.rl("critical_strike")); +// def.put("digging", BloodMagic.rl("digging")); +// def.put("experienced", BloodMagic.rl("experienced")); +// def.put("fall_protect", BloodMagic.rl("fall_protect")); +// def.put("fire_resist", BloodMagic.rl("fire_resist")); +// def.put("grave_digger", BloodMagic.rl("grave_digger")); +// def.put("health", BloodMagic.rl("health")); +// def.put("jump", BloodMagic.rl("jump")); +// def.put("knockback_resist", BloodMagic.rl("knockback_resist")); +// def.put("melee_damage", BloodMagic.rl("melee_damage")); +// def.put("physical_protect", BloodMagic.rl("physical_protect")); +// def.put("poison_resist", BloodMagic.rl("poison_resist")); +// def.put("sprint_attack", BloodMagic.rl("sprint_attack")); +// def.put("speed", BloodMagic.rl("speed")); +// def.put("self_sacrifice", BloodMagic.rl("self_sacrifice")); + return def; + }).get(); + +// public static final AnointmentRegistryObject ANOINTMENT_MELEE_DAMAGE = ANOINTMENTS.register("melee_damage", () -> parseDefinition("melee_damage").withAttributeProvider((stats, attributeMap, uuid, upgrade, level) -> { +// attributeMap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(uuid, "Weapon modifier", upgrade.getBonusValue("damage", level).intValue(), AttributeModifier.Operation.ADDITION)); +// }).setConsumeOnAttack()); + + public static final AnointmentRegistryObject ANOINTMENT_MELEE_DAMAGE = ANOINTMENTS.register("melee_damage", () -> parseDefinition("melee_damage").withDamageProvider((player, weapon, damage, holder, attacked, anoint, level) -> { + return anoint.getBonusValue("damage", level).doubleValue(); + }).setConsumeOnAttack().addIncompatibility(BloodMagic.rl("holy_water"))); + + public static final AnointmentRegistryObject ANOINTMENT_SILK_TOUCH = ANOINTMENTS.register("silk_touch", () -> new Anointment(BloodMagic.rl("silk_touch")).setConsumeOnHarvest().addIncompatibility(BloodMagic.rl("fortune"))); + + public static final AnointmentRegistryObject ANOINTMENT_FORTUNE = ANOINTMENTS.register("fortune", () -> new Anointment(BloodMagic.rl("fortune")).setConsumeOnHarvest().addIncompatibility(BloodMagic.rl("silk_touch"))); + + public static final AnointmentRegistryObject ANOINTMENT_HOLY_WATER = ANOINTMENTS.register("holy_water", () -> parseDefinition("holy_water").withDamageProvider((player, weapon, damage, holder, attacked, anoint, level) -> { + if (attacked.isEntityUndead()) + return anoint.getBonusValue("damage", level).doubleValue(); + else + return 0; + }).setConsumeOnAttack().addIncompatibility(BloodMagic.rl("melee_damage"))); + + public static final AnointmentRegistryObject ANOINTMENT_HIDDEN_KNOWLEDGE = ANOINTMENTS.register("hidden_knowledge", () -> parseDefinition("hidden_knowledge").setConsumeOnHarvest()); + + public static final AnointmentRegistryObject ANOINTMENT_QUICK_DRAW = ANOINTMENTS.register("quick_draw", () -> parseDefinition("quick_draw").setConsumeOnUseFinish()); + + public static final AnointmentRegistryObject ANOINTMENT_LOOTING = ANOINTMENTS.register("looting", () -> new Anointment(BloodMagic.rl("looting")).setConsumeOnAttack()); + + public static final AnointmentRegistryObject ANOINTMENT_BOW_POWER = ANOINTMENTS.register("bow_power", () -> parseDefinition("bow_power").setConsumeOnUseFinish()); + + public static final AnointmentRegistryObject ANOINTMENT_WILL_POWER = ANOINTMENTS.register("will_power", () -> new Anointment(BloodMagic.rl("will_power")).setConsumeOnAttack()); + + public static final AnointmentRegistryObject ANOINTMENT_SMELTING = ANOINTMENTS.register("smelting", () -> new Anointment(BloodMagic.rl("smelting")).setConsumeOnHarvest()); + + public static void register() + { + registerAnointment(ANOINTMENT_MELEE_DAMAGE.get()); + registerAnointment(ANOINTMENT_SILK_TOUCH.get()); + registerAnointment(ANOINTMENT_FORTUNE.get()); + registerAnointment(ANOINTMENT_HOLY_WATER.get()); + registerAnointment(ANOINTMENT_HIDDEN_KNOWLEDGE.get()); + registerAnointment(ANOINTMENT_QUICK_DRAW.get()); + registerAnointment(ANOINTMENT_LOOTING.get()); + registerAnointment(ANOINTMENT_BOW_POWER.get()); + registerAnointment(ANOINTMENT_WILL_POWER.get()); + registerAnointment(ANOINTMENT_SMELTING.get()); + +// Registry.register(UPGRADES, UPGRADE_ARROW_PROTECT.getKey(), UPGRADE_ARROW_PROTECT); +// Registry.register(UPGRADES, UPGRADE_ARROW_SHOT.getKey(), UPGRADE_ARROW_SHOT); +// Registry.register(UPGRADES, UPGRADE_CRITICAL_STRIKE.getKey(), UPGRADE_CRITICAL_STRIKE); +// Registry.register(UPGRADES, UPGRADE_JUMP.getKey(), UPGRADE_JUMP); + +// Registry.register(Registry.ITEM, new ResourceLocation("livingarmor", "living_helmet"), LIVING_HELMET); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "living_chestplate"), LIVING_CHESTPLATE); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "living_leggings"), LIVING_LEGGINGS); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "living_boots"), LIVING_BOOTS); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "trainer"), TRAINER); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "tome"), TOME); + } + + public static void registerAnointment(Anointment anoint) + { + ANOINTMENT_MAP.put(anoint.getKey(), anoint); + } + + public static Anointment parseDefinition(String fileName) + { +// System.out.println("Attempting to parse Anointment: " + fileName); + ResourceLocation path = DEFINITIONS.get(fileName); + if (path == null) + return Anointment.DUMMY; + + try + { + URL schematicURL = Anointment.class.getResource(resLocToResourcePath(path)); + System.out.println("Attempting to load Anointment: " + schematicURL + ", path: " + resLocToResourcePath(path)); + return Serializers.GSON.fromJson(Resources.toString(schematicURL, Charsets.UTF_8), Anointment.class); +// return GSON.fromJson(IOUtils.toString(path.toUri(), StandardCharsets.UTF_8), LivingUpgrade.class); + } catch (Exception e) + { + e.printStackTrace(); + return Anointment.DUMMY; + } + } + + public static String resLocToResourcePath(ResourceLocation resourceLocation) + { + return "/data/" + resourceLocation.getNamespace() + "/anointment/" + resourceLocation.getPath() + ".json"; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/LivingArmorRegistrar.java b/src/main/java/wayoftime/bloodmagic/core/LivingArmorRegistrar.java new file mode 100644 index 00000000..80bd8035 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/LivingArmorRegistrar.java @@ -0,0 +1,221 @@ +package wayoftime.bloodmagic.core; + +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Supplier; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.ai.attributes.Attributes; +import net.minecraft.util.DamageSource; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.registration.impl.LivingUpgradeDeferredRegister; +import wayoftime.bloodmagic.common.registration.impl.LivingUpgradeRegistryObject; +import wayoftime.bloodmagic.core.living.LivingUpgrade; +import wayoftime.bloodmagic.gson.Serializers; + +public class LivingArmorRegistrar +{ + + public static final LivingUpgradeDeferredRegister UPGRADES = new LivingUpgradeDeferredRegister(BloodMagic.MODID); + + public static final Map UPGRADE_MAP = new HashMap<>(); + +// public static final DefaultedRegistry UPGRADES = (DefaultedRegistry) createRegistry("livingarmor:upgrades", LivingUpgrade.DUMMY.getKey().toString(), () -> LivingUpgrade.DUMMY); +// private static final Map DEFINITIONS = ((Supplier>) () -> { +// Map def = new HashMap<>(); +// def.put("arrow_protect", Paths.get(MinecraftForge.getInstance().getConfigDirectory().getAbsolutePath(), "livingarmor", "arrow_protect.json")); +// def.put("arrow_shot", Paths.get(FabricLoader.getInstance().getConfigDirectory().getAbsolutePath(), "livingarmor", "arrow_shot.json")); +// def.put("critical_strike", Paths.get(FabricLoader.getInstance().getConfigDirectory().getAbsolutePath(), "livingarmor", "critical_strike.json")); +// def.put("jump", Paths.get(FabricLoader.getInstance().getConfigDirectory().getAbsolutePath(), "livingarmor", "jump.json")); +// return def; +// }).get(); + private static final Map DEFINITIONS = ((Supplier>) () -> { + Map def = new HashMap<>(); + def.put("arrow_protect", BloodMagic.rl("arrow_protect")); + def.put("arrow_shot", BloodMagic.rl("arrow_shot")); + def.put("critical_strike", BloodMagic.rl("critical_strike")); + def.put("digging", BloodMagic.rl("digging")); + def.put("experienced", BloodMagic.rl("experienced")); + def.put("fall_protect", BloodMagic.rl("fall_protect")); + def.put("fire_resist", BloodMagic.rl("fire_resist")); + def.put("grave_digger", BloodMagic.rl("grave_digger")); + def.put("health", BloodMagic.rl("health")); + def.put("jump", BloodMagic.rl("jump")); + def.put("knockback_resist", BloodMagic.rl("knockback_resist")); + def.put("melee_damage", BloodMagic.rl("melee_damage")); + def.put("physical_protect", BloodMagic.rl("physical_protect")); + def.put("poison_resist", BloodMagic.rl("poison_resist")); + def.put("sprint_attack", BloodMagic.rl("sprint_attack")); + def.put("speed", BloodMagic.rl("speed")); + def.put("self_sacrifice", BloodMagic.rl("self_sacrifice")); + return def; + }).get(); + // private static final Map DEFINITIONS = + // ResourceUtil.gatherResources("/data", "living_armor", p -> + // FilenameUtils.getExtension(p.toFile().getName()).equals("json")) +// .stream() +// .collect(Collectors.toMap(key -> FilenameUtils.getBaseName(key.toFile().getName()), value -> value)); + private static final Gson GSON = new GsonBuilder().serializeNulls().create(); + +// public static final ItemLivingArmor LIVING_HELMET = new ItemLivingArmor(EquipmentSlotType.HEAD); +// public static final ItemLivingArmor LIVING_CHESTPLATE = new ItemLivingArmor(EquipmentSlotType.CHEST); +// public static final ItemLivingArmor LIVING_LEGGINGS = new ItemLivingArmor(EquipmentSlotType.LEGS); +// public static final ItemLivingArmor LIVING_BOOTS = new ItemLivingArmor(EquipmentSlotType.FEET); +// public static final ItemLivingTrainer TRAINER = new ItemLivingTrainer(); +// public static final ItemLivingTome TOME = new ItemLivingTome(); + + public static final LivingUpgradeRegistryObject UPGRADE_ARROW_PROTECT = UPGRADES.register("arrow_protect", () -> parseDefinition("arrow_protect").withArmorProvider((player, stats, source, upgrade, level) -> { + if (source.isProjectile()) + { + return upgrade.getBonusValue("protection", level).doubleValue(); + } + return 0; + })); + public static final LivingUpgradeRegistryObject UPGRADE_FALL_PROTECT = UPGRADES.register("fall_protect", () -> parseDefinition("fall_protect").withArmorProvider((player, stats, source, upgrade, level) -> { + if (source == DamageSource.FALL) + { + return upgrade.getBonusValue("protection", level).doubleValue(); + } + return 0; + })); + public static final LivingUpgradeRegistryObject UPGRADE_PHYSICAL_PROTECT = UPGRADES.register("physical_protect", () -> parseDefinition("physical_protect").withArmorProvider((player, stats, source, upgrade, level) -> { + if (!source.isProjectile()) + { + return upgrade.getBonusValue("protection", level).doubleValue(); + } + return 0; + })); + public static final LivingUpgradeRegistryObject UPGRADE_JUMP = UPGRADES.register("jump", () -> parseDefinition("jump")); + + public static final LivingUpgradeRegistryObject UPGRADE_HEALTH = UPGRADES.register("health", () -> parseDefinition("health").withAttributeProvider((stats, attributeMap, uuid, upgrade, level) -> { + attributeMap.put(Attributes.MAX_HEALTH, new AttributeModifier(uuid, "Health Modifier", upgrade.getBonusValue("hp", level).intValue(), AttributeModifier.Operation.ADDITION)); + })); + + public static final LivingUpgradeRegistryObject UPGRADE_EXPERIENCE = UPGRADES.register("experienced", () -> parseDefinition("experienced")); + public static final LivingUpgradeRegistryObject UPGRADE_SPRINT_ATTACK = UPGRADES.register("sprint_attack", () -> parseDefinition("sprint_attack").withDamageProvider((player, weapon, damage, stats, attackedEntity, upgrade, level) -> { + if (player.isSprinting()) + { + return damage * upgrade.getBonusValue("damage_boost", level).doubleValue(); + } + return 0; + })); + public static final LivingUpgradeRegistryObject UPGRADE_SELF_SACRIFICE = UPGRADES.register("self_sacrifice", () -> parseDefinition("self_sacrifice")); + public static final LivingUpgradeRegistryObject UPGRADE_SPEED = UPGRADES.register("speed", () -> parseDefinition("speed").withAttributeProvider((stats, attributeMap, uuid, upgrade, level) -> { + attributeMap.put(Attributes.MOVEMENT_SPEED, new AttributeModifier(uuid, "Movement Modifier 2", upgrade.getBonusValue("speed_modifier", level).doubleValue(), AttributeModifier.Operation.MULTIPLY_BASE)); + })); + public static final LivingUpgradeRegistryObject UPGRADE_POISON_RESIST = UPGRADES.register("poison_resist", () -> parseDefinition("poison_resist")); + public static final LivingUpgradeRegistryObject UPGRADE_FIRE_RESIST = UPGRADES.register("fire_resist", () -> parseDefinition("fire_resist")); + public static final LivingUpgradeRegistryObject UPGRADE_DIGGING = UPGRADES.register("digging", () -> parseDefinition("digging")); + public static final LivingUpgradeRegistryObject UPGRADE_KNOCKBACK_RESIST = UPGRADES.register("knockback_resist", () -> parseDefinition("knockback_resist").withAttributeProvider((stats, attributeMap, uuid, upgrade, level) -> { + attributeMap.put(Attributes.KNOCKBACK_RESISTANCE, new AttributeModifier(uuid, "KB Modifier", upgrade.getBonusValue("kb", level).doubleValue(), AttributeModifier.Operation.ADDITION)); + attributeMap.put(Attributes.MAX_HEALTH, new AttributeModifier(uuid, "Health Modifier 2", upgrade.getBonusValue("hp", level).intValue(), AttributeModifier.Operation.ADDITION)); + })); +// public static final LivingUpgrade UPGRADE_ARROW_PROTECT = parseDefinition("arrow_protect").withArmorProvider((player, stats, source, upgrade, level) -> { +// if (source.isProjectile()) +// { +// return upgrade.getBonusValue("protection", level).doubleValue(); +// } +// return 0; +// }); +// public static final LivingUpgrade UPGRADE_ARROW_SHOT = parseDefinition("arrow_shot"); +// public static final LivingUpgrade UPGRADE_CRITICAL_STRIKE = parseDefinition("critical_strike").withAttributeProvider((stats, attributeMap, uuid, upgrade, level) -> { +// attributeMap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(uuid, "Weapon modifier", upgrade.getBonusValue("damage_boost", level).doubleValue(), AttributeModifier.Operation.ADDITION)); +//// attributeMap.put(EntityAttributes.ATTACK_DAMAGE.getId(), AttributeModifiers.create(upgrade, "damage_boost", upgrade.getBonusValue("damage_boost", level).doubleValue(), EntityAttributeModifier.Operation.ADDITION)); +//// attributeMap.put(EntityAttributes.ATTACK_DAMAGE.getId(), AttributeModifiers.create(upgrade, "damage_boost", level, EntityAttributeModifier.Operation.ADDITION)); +// }); +// public static final LivingUpgrade UPGRADE_JUMP = parseDefinition("jump"); + + public static void register() + { + registerUpgrade(UPGRADE_ARROW_PROTECT.get()); + registerUpgrade(UPGRADE_HEALTH.get()); + registerUpgrade(UPGRADE_EXPERIENCE.get()); + registerUpgrade(UPGRADE_SPRINT_ATTACK.get()); + registerUpgrade(UPGRADE_SELF_SACRIFICE.get()); + registerUpgrade(UPGRADE_SPEED.get()); + registerUpgrade(UPGRADE_POISON_RESIST.get()); + registerUpgrade(UPGRADE_DIGGING.get()); + registerUpgrade(UPGRADE_FALL_PROTECT.get()); + registerUpgrade(UPGRADE_PHYSICAL_PROTECT.get()); + registerUpgrade(UPGRADE_JUMP.get()); + registerUpgrade(UPGRADE_KNOCKBACK_RESIST.get()); + registerUpgrade(UPGRADE_FIRE_RESIST.get()); +// Registry.register(UPGRADES, UPGRADE_ARROW_PROTECT.getKey(), UPGRADE_ARROW_PROTECT); +// Registry.register(UPGRADES, UPGRADE_ARROW_SHOT.getKey(), UPGRADE_ARROW_SHOT); +// Registry.register(UPGRADES, UPGRADE_CRITICAL_STRIKE.getKey(), UPGRADE_CRITICAL_STRIKE); +// Registry.register(UPGRADES, UPGRADE_JUMP.getKey(), UPGRADE_JUMP); + +// Registry.register(Registry.ITEM, new ResourceLocation("livingarmor", "living_helmet"), LIVING_HELMET); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "living_chestplate"), LIVING_CHESTPLATE); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "living_leggings"), LIVING_LEGGINGS); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "living_boots"), LIVING_BOOTS); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "trainer"), TRAINER); +// Registry.register(Registry.ITEM, new Identifier("livingarmor", "tome"), TOME); + } + + public static void registerUpgrade(LivingUpgrade upgrade) + { + UPGRADE_MAP.put(upgrade.getKey(), upgrade); + } + + public static LivingUpgrade parseDefinition(String fileName) + { + ResourceLocation path = DEFINITIONS.get(fileName); + if (path == null) + return LivingUpgrade.DUMMY; + + try + { + URL schematicURL = LivingUpgrade.class.getResource(resLocToResourcePath(path)); + System.out.println("Attempting to load Living Armour Upgrade: " + schematicURL + ", path: " + resLocToResourcePath(path)); + return Serializers.GSON.fromJson(Resources.toString(schematicURL, Charsets.UTF_8), LivingUpgrade.class); +// return GSON.fromJson(IOUtils.toString(path.toUri(), StandardCharsets.UTF_8), LivingUpgrade.class); + } catch (Exception e) + { + e.printStackTrace(); + return LivingUpgrade.DUMMY; + } +// Path path = DEFINITIONS.get(fileName); +// if (path == null) +// return LivingUpgrade.DUMMY; +// +// try +// { +// return GSON.fromJson(IOUtils.toString(path.toUri(), StandardCharsets.UTF_8), LivingUpgrade.class); +// } catch (Exception e) +// { +// e.printStackTrace(); +// return LivingUpgrade.DUMMY; +// } + } + + public static String resLocToResourcePath(ResourceLocation resourceLocation) + { + return "/data/" + resourceLocation.getNamespace() + "/living_armor/" + resourceLocation.getPath() + ".json"; + } + +// private static Registry createRegistry(String registryId, String defaultId, Supplier defaultProvider) +// { +// try +// { +// Method _createRegistry = Registry.class.getDeclaredMethod("create", String.class, String.class, Supplier.class); // FIXME +// // yarn +// // name +// _createRegistry.setAccessible(true); +// return (Registry) _createRegistry.invoke(null, registryId, defaultId, defaultProvider); +// } catch (Exception e) +// { +// e.printStackTrace(); +// MutableRegistry registry = new DefaultedRegistry(defaultId, null, null); +// registry.add(new ResourceLocation(defaultId), defaultProvider.get()); +// return registry; +// } +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/RegistrarBloodMagic.java b/src/main/java/wayoftime/bloodmagic/core/RegistrarBloodMagic.java new file mode 100644 index 00000000..521fba53 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/RegistrarBloodMagic.java @@ -0,0 +1,30 @@ +package wayoftime.bloodmagic.core; + +import net.minecraftforge.fml.common.Mod; +import wayoftime.bloodmagic.BloodMagic; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID) +public class RegistrarBloodMagic +{ + private RegistrarBloodMagic() + { + + } + +// public static final BloodOrbDeferredRegister BLOOD_ORBS = new BloodOrbDeferredRegister(BloodMagic.MODID); +// +// public static final BloodOrbRegistryObject ORB_WEAK = BLOOD_ORBS.register("weakbloodorb", () -> new BloodOrb(new ResourceLocation(BloodMagic.MODID, "weakbloodorb"), 0, 5000, 10)); + +// public static IForgeRegistry BLOOD_ORBS = new RegistryBuilder().setName(new ResourceLocation(BloodMagic.MODID, "blood_orb")).setIDRange(0, Short.MAX_VALUE).setType(BloodOrb.class).addCallback((IForgeRegistry.AddCallback) ( +// owner, stage, id, obj, +// oldObj) -> OrbRegistry.tierMap.put(obj.getTier(), OrbRegistry.getOrbStack(obj))).create(); + +// @SubscribeEvent +// public static void onRegistryCreation(RegistryEvent.NewRegistry event) +// { +// System.out.println("Testification3"); +// BLOOD_ORBS = new RegistryBuilder().setName(new ResourceLocation(BloodMagic.MODID, "blood_orb")).setIDRange(0, Short.MAX_VALUE).setType(BloodOrb.class).addCallback((IForgeRegistry.AddCallback) ( +// owner, stage, id, obj, +// oldObj) -> OrbRegistry.tierMap.put(obj.getTier(), OrbRegistry.getOrbStack(obj))).create(); +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/RegistrarBloodMagicRecipes.java b/src/main/java/wayoftime/bloodmagic/core/RegistrarBloodMagicRecipes.java new file mode 100644 index 00000000..87cd3843 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/RegistrarBloodMagicRecipes.java @@ -0,0 +1,71 @@ +package wayoftime.bloodmagic.core; + +import wayoftime.bloodmagic.impl.BloodMagicRecipeRegistrar; + +public class RegistrarBloodMagicRecipes +{ + +// @SubscribeEvent +// public static void registerRecipes(RegistryEvent.Register event) { +// for (int i = 0; i < ItemSoulGem.names.length; i++) { +// for (EnumDemonWillType willType : EnumDemonWillType.values()) { +// ItemStack baseGemStack = new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, i); +// ItemStack newGemStack = new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, i); +// +// ((ItemSoulGem) RegistrarBloodMagicItems.SOUL_GEM).setCurrentType(willType, newGemStack); +// ShapelessOreRecipe shapeless = new ShapelessOreRecipe(new ResourceLocation(BloodMagic.MODID, "soul_gem"), newGemStack, baseGemStack, willType.getStack()); +// event.getRegistry().register(shapeless.setRegistryName("soul_gem_" + willType.getName())); +// } +// } +// +// OreDictionary.registerOre("dustIron", ComponentTypes.SAND_IRON.getStack()); +// OreDictionary.registerOre("dustGold", ComponentTypes.SAND_GOLD.getStack()); +// OreDictionary.registerOre("dustCoal", ComponentTypes.SAND_COAL.getStack()); +// +// PluginUtil.handlePluginStep(PluginUtil.RegistrationStep.RECIPE_REGISTER); +// +// RegistrarBloodMagicItems.SOUL_TOOL_MATERIAL.setRepairItem(EnumDemonWillType.DEFAULT.getStack()); +// } + + public static void registerAltarRecipes(BloodMagicRecipeRegistrar registrar) + { +// Ingredient d; + // ONE +// registrar.addBloodAltar(new OreIngredient("gemDiamond"), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_WEAK), AltarTier.ONE.ordinal(), 2000, 2, 1); +// registrar.addBloodAltar(new OreIngredient("stone"), ItemSlate.SlateType.BLANK.getStack(), AltarTier.ONE.ordinal(), 1000, 5, 5); +// registrar.addBloodAltar(Ingredient.fromItem(Items.BUCKET), FluidUtil.getFilledBucket(new FluidStack(BlockLifeEssence.getLifeEssence(), Fluid.BUCKET_VOLUME)), AltarTier.ONE.ordinal(), 1000, 5, 0); +// registrar.addBloodAltar(Ingredient.fromItem(Items.BOOK), new ItemStack(RegistrarBloodMagicItems.SANGUINE_BOOK), AltarTier.ONE.ordinal(), 1000, 20, 0); +// +// // TWO +// registrar.addBloodAltar(new OreIngredient("blockRedstone"), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_APPRENTICE), AltarTier.TWO.ordinal(), 5000, 5, 5); +// registrar.addBloodAltar(Ingredient.fromStacks(ItemSlate.SlateType.BLANK.getStack()), ItemSlate.SlateType.REINFORCED.getStack(), AltarTier.TWO.ordinal(), 2000, 5, 5); +// registrar.addBloodAltar(Ingredient.fromItem(Items.IRON_SWORD), new ItemStack(RegistrarBloodMagicItems.DAGGER_OF_SACRIFICE), AltarTier.TWO.ordinal(), 3000, 5, 5); +// +// // THREE +// registrar.addBloodAltar(new OreIngredient("blockGold"), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MAGICIAN), AltarTier.THREE.ordinal(), 25000, 20, 20); +// registrar.addBloodAltar(Ingredient.fromStacks(ItemSlate.SlateType.REINFORCED.getStack()), ItemSlate.SlateType.IMBUED.getStack(), AltarTier.THREE.ordinal(), 5000, 15, 10); +// registrar.addBloodAltar(new OreIngredient("obsidian"), EnumRuneType.EARTH.getStack(), AltarTier.THREE.ordinal(), 1000, 5, 5); +// registrar.addBloodAltar(new OreIngredient("blockLapis"), EnumRuneType.WATER.getStack(), AltarTier.THREE.ordinal(), 1000, 5, 5); +// registrar.addBloodAltar(Ingredient.fromItem(Items.MAGMA_CREAM), EnumRuneType.FIRE.getStack(), AltarTier.THREE.ordinal(), 1000, 5, 5); +// registrar.addBloodAltar(Ingredient.fromItem(Items.GHAST_TEAR), EnumRuneType.AIR.getStack(), AltarTier.THREE.ordinal(), 1000, 5, 5); +// registrar.addBloodAltar(Ingredient.fromItem(RegistrarBloodMagicItems.LAVA_CRYSTAL), new ItemStack(RegistrarBloodMagicItems.ACTIVATION_CRYSTAL), AltarTier.THREE.ordinal(), 10000, 20, 10); +// +// // FOUR +// registrar.addBloodAltar(Ingredient.fromStacks(new ItemStack(RegistrarBloodMagicItems.BLOOD_SHARD)), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MASTER), AltarTier.FOUR.ordinal(), 40000, 30, 50); +// registrar.addBloodAltar(Ingredient.fromStacks(ItemSlate.SlateType.IMBUED.getStack()), ItemSlate.SlateType.DEMONIC.getStack(), AltarTier.FOUR.ordinal(), 15000, 20, 20); +// registrar.addBloodAltar(new OreIngredient("blockCoal"), EnumRuneType.DUSK.getStack(), AltarTier.FOUR.ordinal(), 2000, 20, 10); +// registrar.addBloodAltar(new OreIngredient("enderpearl"), new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS), AltarTier.FOUR.ordinal(), 2000, 10, 10); +// registrar.addBloodAltar(Ingredient.fromStacks(new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS)), new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS, 1, 1), AltarTier.FOUR.ordinal(), 10000, 20, 10); +// +// // FIVE +// registrar.addBloodAltar(new OreIngredient("netherStar"), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_ARCHMAGE), AltarTier.FIVE.ordinal(), 80000, 50, 100); +// registrar.addBloodAltar(Ingredient.fromStacks(ItemSlate.SlateType.DEMONIC.getStack()), ItemSlate.SlateType.ETHEREAL.getStack(), AltarTier.FIVE.ordinal(), 30000, 40, 100); + +// // SIX +// if (ConfigHandler.general.enableTierSixEvenThoughThereIsNoContent) +// { +// registrar.addBloodAltar(Ingredient.fromStacks(new ItemStack(RegistrarBloodMagicBlocks.DECORATIVE_BRICK, 1, 2)), OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_TRANSCENDENT), AltarTier.SIX.ordinal(), 200000, 100, 200); +// registrar.addBloodAltar(new OreIngredient("glowstone"), EnumRuneType.DAWN.getStack(), AltarTier.SIX.ordinal(), 200000, 100, 200); +// } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/data/BMWorldSavedData.java b/src/main/java/wayoftime/bloodmagic/core/data/BMWorldSavedData.java new file mode 100644 index 00000000..02ad80a4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/data/BMWorldSavedData.java @@ -0,0 +1,66 @@ +package wayoftime.bloodmagic.core.data; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.ListNBT; +import net.minecraft.world.storage.WorldSavedData; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class BMWorldSavedData extends WorldSavedData +{ + public static final String ID = "BloodMagic-SoulNetworks"; + + private Map soulNetworks = new HashMap<>(); + + public BMWorldSavedData(String id) + { + super(id); + } + + public BMWorldSavedData() + { + this(ID); + } + + public SoulNetwork getNetwork(PlayerEntity player) + { + return getNetwork(PlayerHelper.getUUIDFromPlayer(player)); + } + + public SoulNetwork getNetwork(UUID playerId) + { + if (!soulNetworks.containsKey(playerId)) + soulNetworks.put(playerId, SoulNetwork.newEmpty(playerId).setParent(this)); + return soulNetworks.get(playerId); + } + + @Override + public void read(CompoundNBT tagCompound) + { + ListNBT networkData = tagCompound.getList("networkData", 10); + + for (int i = 0; i < networkData.size(); i++) + { + CompoundNBT data = networkData.getCompound(i); + SoulNetwork network = SoulNetwork.fromNBT(data); + network.setParent(this); + soulNetworks.put(network.getPlayerId(), network); + } + } + + @Override + public CompoundNBT write(CompoundNBT tagCompound) + { + ListNBT networkData = new ListNBT(); + for (SoulNetwork soulNetwork : soulNetworks.values()) + networkData.add(soulNetwork.serializeNBT()); + + tagCompound.put("networkData", networkData); + + return tagCompound; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/core/data/Binding.java b/src/main/java/wayoftime/bloodmagic/core/data/Binding.java new file mode 100644 index 00000000..e6a4bbc8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/data/Binding.java @@ -0,0 +1,89 @@ +package wayoftime.bloodmagic.core.data; + +import java.util.UUID; + +import javax.annotation.Nullable; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.INBT; +import net.minecraft.nbt.NBTUtil; +import net.minecraftforge.common.util.INBTSerializable; + +public class Binding implements INBTSerializable +{ + private UUID uuid; + private String name; + + public Binding(UUID uuid, String name) + { + this.uuid = uuid; + this.name = name; + } + + private Binding() + { + // No-op + } + + @Override + public CompoundNBT serializeNBT() + { + CompoundNBT tag = new CompoundNBT(); +// tag.put("id", NBTUtil.writeUniqueId(uuid)); + tag.put("id", NBTUtil.func_240626_a_(uuid)); + tag.putString("name", name); + return tag; + } + + @Override + public void deserializeNBT(CompoundNBT nbt) + { + this.uuid = NBTUtil.readUniqueId(nbt.get("id")); + this.name = nbt.getString("name"); + } + + public UUID getOwnerId() + { + return uuid; + } + + public Binding setOwnerId(UUID uuid) + { + this.uuid = uuid; + return this; + } + + public String getOwnerName() + { + return name; + } + + public Binding setOwnerName(String name) + { + this.name = name; + return this; + } + + @Nullable + public static Binding fromStack(ItemStack stack) + { + if (!stack.hasTag()) // Definitely hasn't been bound yet. + return null; + + INBT bindingTag = stack.getTag().get("binding"); + if (bindingTag == null || bindingTag.getId() != 10) // Make sure it's both a tag compound and that it has actual + // data. + return null; + + Binding binding = new Binding(); + binding.deserializeNBT((CompoundNBT) bindingTag); + return binding; + } + + @Override + public String toString() + { + return "Binding{" + "uuid=" + uuid + ", name='" + name + '\'' + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/core/data/SoulNetwork.java b/src/main/java/wayoftime/bloodmagic/core/data/SoulNetwork.java new file mode 100644 index 00000000..aa63bc1e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/data/SoulNetwork.java @@ -0,0 +1,293 @@ +package wayoftime.bloodmagic.core.data; + +import java.util.List; +import java.util.Queue; +import java.util.UUID; + +import javax.annotation.Nullable; + +import com.google.common.collect.EvictingQueue; +import com.google.common.collect.ImmutableList; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.INBTSerializable; +import wayoftime.bloodmagic.event.SoulNetworkEvent; +import wayoftime.bloodmagic.util.BMLog; +import wayoftime.bloodmagic.util.BooleanResult; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; +import wayoftime.bloodmagic.util.helper.PlayerHelper; + +public class SoulNetwork implements INBTSerializable +{ + + private final Queue ticketHistory; + private BMWorldSavedData parent; + private PlayerEntity cachedPlayer; + private UUID playerId; + private int currentEssence; + private int orbTier; + + private SoulNetwork() + { + // No-op - For creation via NBT only + ticketHistory = EvictingQueue.create(16); + } + + public void clear() + { + ticketHistory.clear(); + } + + public int add(SoulTicket ticket, int maximum) + { + SoulNetworkEvent.Fill event = new SoulNetworkEvent.Fill(this, ticket, maximum); + if (MinecraftForge.EVENT_BUS.post(event)) + return 0; + + int currEss = getCurrentEssence(); + + if (currEss >= event.getMaximum()) + return 0; + + int newEss = Math.min(event.getMaximum(), currEss + event.getTicket().getAmount()); + setCurrentEssence(newEss); + + if (ticketHistory.contains(ticket)) + ticketHistory.remove(ticket); // "Pops" the existing ticket to the top of the queue + + ticketHistory.add(ticket); + + return newEss - currEss; + } + + /** + * @deprecated For future proofing, use {@link #add(SoulTicket, int)} instead. + */ + @Deprecated + public int add(int toAdd, int maximum) + { + return add(new SoulTicket(toAdd), maximum); + } + + /** + * @deprecated Use {@link #add(SoulTicket, int)} instead. + */ + @Deprecated + public int addLifeEssence(int toAdd, int maximum) + { + return add(toAdd, maximum); + } + + public int syphon(SoulTicket ticket) + { + return syphon(ticket, false); + } + + public int syphon(SoulTicket ticket, boolean skipEvent) + { + SoulNetworkEvent.Syphon event = new SoulNetworkEvent.Syphon(this, ticket); + if (!skipEvent && MinecraftForge.EVENT_BUS.post(event)) + return 0; + + int syphon = event.getTicket().getAmount(); + if (getCurrentEssence() >= syphon) + { + setCurrentEssence(getCurrentEssence() - syphon); + if (ticketHistory.contains(ticket)) + ticketHistory.remove(ticket); + + ticketHistory.add(ticket); + return syphon; + } + + return 0; + } + + /** + * @deprecated For future proofing, use {@link #syphon(SoulTicket)} instead. + */ + @Deprecated + public int syphon(int amount) + { + return syphon(new SoulTicket(amount)); + } + + public BooleanResult syphonAndDamage(PlayerEntity user, SoulTicket ticket) + { + if (user.getEntityWorld().isRemote) + return BooleanResult.newResult(false, 0); + + SoulNetworkEvent.Syphon.User event = new SoulNetworkEvent.Syphon.User(this, ticket, user); + + if (MinecraftForge.EVENT_BUS.post(event)) + return BooleanResult.newResult(false, 0); + + int drainAmount = syphon(event.getTicket(), true); + + if (drainAmount <= 0 || event.shouldDamage()) + hurtPlayer(user, event.getTicket().getAmount()); + + if (ticketHistory.contains(ticket)) + ticketHistory.remove(ticket); + + ticketHistory.add(ticket); + + return BooleanResult.newResult(true, event.getTicket().getAmount()); + } + + /** + * @deprecated Use {@link #syphonAndDamage(PlayerEntity, SoulTicket)} instead. + */ + @Deprecated + public boolean syphonAndDamage(PlayerEntity user, int amount) + { + return syphonAndDamage(user, new SoulTicket(amount)).isSuccess(); + } + + public void causeNausea() + { + if (getPlayer() != null) + getPlayer().addPotionEffect(new EffectInstance(Effects.NAUSEA, 99)); + } + + /** + * @deprecated - Please use {@link #causeNausea()} + */ + @Deprecated + public void causeNauseaToPlayer() + { + causeNausea(); + } + + public void hurtPlayer(PlayerEntity user, float syphon) + { + if (user != null) + { + if (syphon < 100 && syphon > 0) + { + if (!user.isCreative()) + { + user.hurtResistantTime = 0; + user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F); + } + + } else if (syphon >= 100) + { + if (!user.isCreative()) + { + for (int i = 0; i < ((syphon + 99) / 100); i++) + { + user.hurtResistantTime = 0; + user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F); + } + } + } + } + } + + private void markDirty() + { + if (getParent() != null) + getParent().markDirty(); + else + BMLog.DEFAULT.error("A SoulNetwork was created, but a parent was not set to allow saving."); + } + + @Nullable + public PlayerEntity getPlayer() + { + if (cachedPlayer == null) + cachedPlayer = PlayerHelper.getPlayerFromUUID(playerId); + + return cachedPlayer; + } + + public BMWorldSavedData getParent() + { + return parent; + } + + public SoulNetwork setParent(BMWorldSavedData parent) + { + this.parent = parent; + markDirty(); + return this; + } + + public PlayerEntity getCachedPlayer() + { + return cachedPlayer; + } + + public UUID getPlayerId() + { + return playerId; + } + + public int getCurrentEssence() + { + return currentEssence; + } + + public SoulNetwork setCurrentEssence(int currentEssence) + { + this.currentEssence = currentEssence; + markDirty(); + return this; + } + + public int getOrbTier() + { + return orbTier; + } + + public SoulNetwork setOrbTier(int orbTier) + { + this.orbTier = orbTier; + markDirty(); + return this; + } + + public List getTicketHistory() + { + return ImmutableList.copyOf(ticketHistory); + } + + // INBTSerializable + + @Override + public CompoundNBT serializeNBT() + { + CompoundNBT tagCompound = new CompoundNBT(); + tagCompound.putString("playerId", getPlayerId().toString()); + tagCompound.putInt("currentEssence", getCurrentEssence()); + tagCompound.putInt("orbTier", getOrbTier()); + return tagCompound; + } + + @Override + public void deserializeNBT(CompoundNBT nbt) + { + this.playerId = UUID.fromString(nbt.getString("playerId")); + this.currentEssence = nbt.getInt("currentEssence"); + this.orbTier = nbt.getInt("orbTier"); + } + + public static SoulNetwork fromNBT(CompoundNBT tagCompound) + { + SoulNetwork soulNetwork = new SoulNetwork(); + soulNetwork.deserializeNBT(tagCompound); + return soulNetwork; + } + + public static SoulNetwork newEmpty(UUID uuid) + { + SoulNetwork network = new SoulNetwork(); + network.playerId = uuid; + return network; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/core/data/SoulTicket.java b/src/main/java/wayoftime/bloodmagic/core/data/SoulTicket.java new file mode 100644 index 00000000..fd20d500 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/data/SoulTicket.java @@ -0,0 +1,107 @@ +package wayoftime.bloodmagic.core.data; + +import net.minecraft.command.ICommandSource; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.world.World; + +/** + * Wrapper for any interactions with the SoulNetwork + * Contains a description on what the interaction is and any extra data + */ +public class SoulTicket +{ + private static final ITextComponent EMPTY = new StringTextComponent(""); + + private final ITextComponent description; + private final int amount; + + public SoulTicket(ITextComponent description, int amount) + { + this.description = description; + this.amount = amount; + } + + public SoulTicket(int amount) + { + this(EMPTY, amount); + } + + public boolean isSyphon() + { + return amount < 0; + } + + public ITextComponent getDescription() + { + return description; + } + + public int getAmount() + { + return amount; + } + + /** + * @return A description in the format block|dimensionID|pos + */ + public static SoulTicket block(World world, BlockPos pos, int amount) + { + // func_234923_W_() = getDimension + return new SoulTicket(new StringTextComponent("block|" + world.getDimensionKey().getRegistryName() + "|" + + pos.toLong()), amount); + } + + /** + * @return A description in the format item|item registry + * name|dimensionID|entityName|entityPos + */ + public static SoulTicket item(ItemStack itemStack, World world, Entity entity, int amount) + { + return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + + world.getDimensionKey().getRegistryName() + "|" + entity.getCachedUniqueIdString()), amount); + } + + /** + * @return A description in the format item|item registry name|dimensionID|pos + */ + public static SoulTicket item(ItemStack itemStack, World world, BlockPos pos, int amount) + { + return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + + world.getDimensionKey().getRegistryName() + "|" + pos.toLong()), amount); + } + + /** + * @return A description in the format item|item registry name|dimensionID + */ + public static SoulTicket item(ItemStack itemStack, int amount) + { + return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName()), amount); + } + + public static SoulTicket command(ICommandSource sender, String command, int amount) + { + return new SoulTicket(new StringTextComponent("command|" + command + "|" + sender.toString()), amount); + } + + // TODO maybe make it check the amount?? + @Override + public boolean equals(Object o) + { + if (this == o) + return true; + if (o instanceof SoulTicket) + return ((SoulTicket) o).getDescription().equals(description); + + return false; + } + + @Override + public int hashCode() + { + return description.hashCode(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/core/living/ILivingContainer.java b/src/main/java/wayoftime/bloodmagic/core/living/ILivingContainer.java new file mode 100644 index 00000000..0e6db181 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/living/ILivingContainer.java @@ -0,0 +1,60 @@ +package wayoftime.bloodmagic.core.living; + +import java.util.List; + +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public interface ILivingContainer +{ + default LivingStats getLivingStats(ItemStack stack) + { + if (!stack.hasTag() || !stack.getTag().contains("livingStats")) + return null; + + return LivingStats.fromNBT(stack.getTag().getCompound("livingStats")); + } + + default void updateLivingStats(ItemStack stack, LivingStats stats) + { + if (stats == null) + { + if (stack.hasTag()) + stack.getTag().remove("livingStats"); + return; + } + + if (!stack.hasTag()) + stack.setTag(new CompoundNBT()); + + stack.getTag().put("livingStats", stats.serialize()); + } + + @OnlyIn(Dist.CLIENT) + static void appendLivingTooltip(LivingStats stats, List tooltip, boolean trainable) + { + if (stats != null) + { + if (trainable) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.livingarmour.upgrade.points", stats.getUsedPoints(), stats.getMaxPoints()).mergeStyle(TextFormatting.GOLD)); + + stats.getUpgrades().forEach((k, v) -> { + if (k.getLevel(v.intValue()) <= 0) + return; + + boolean sneaking = Screen.hasShiftDown(); +// if (!InputUtil.isKeyPressed(MinecraftClient.getInstance().getWindow().getHandle(), 340) || k.getNextRequirement(v) == 0) + if (!sneaking || k.getNextRequirement(v.intValue()) == 0) + tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), new TranslationTextComponent("enchantment.level." + k.getLevel(v.intValue()))).mergeStyle(TextFormatting.GRAY)); + else + tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), (": " + v.intValue() + "/" + k.getNextRequirement(v.intValue()))).mergeStyle(TextFormatting.GRAY)); + }); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/living/LivingStats.java b/src/main/java/wayoftime/bloodmagic/core/living/LivingStats.java new file mode 100644 index 00000000..3e158c7d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/living/LivingStats.java @@ -0,0 +1,163 @@ +package wayoftime.bloodmagic.core.living; + +import java.util.Map; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.ListNBT; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.core.LivingArmorRegistrar; + +public class LivingStats +{ + + public static final int DEFAULT_UPGRADE_POINTS = 100; + + private final Map upgrades; + private int maxPoints = DEFAULT_UPGRADE_POINTS; + + public LivingStats(Map upgrades) + { + this.upgrades = upgrades; + } + + public LivingStats() + { + this(Maps.newHashMap()); + } + + public Map getUpgrades() + { + return ImmutableMap.copyOf(upgrades); + } + + public LivingStats addExperience(ResourceLocation key, double experience) + { +// LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADES.getOrDefault(key); + LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADE_MAP.getOrDefault(key, LivingUpgrade.DUMMY); + double current = upgrades.getOrDefault(upgrade, 0d); + +// System.out.println("Upgrade: " + upgrade); + + if (upgrade.getNextRequirement((int) current) == 0) + return this; + + upgrades.put(upgrade, current + experience); + return this; + } + + public LivingStats resetExperience(ResourceLocation key) + { + LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADE_MAP.getOrDefault(key, LivingUpgrade.DUMMY); + double current = upgrades.getOrDefault(upgrade, 0d); + + if (upgrade.getNextRequirement((int) current) == 0) + return this; + + upgrades.put(upgrade, 0d); + + return this; + } + + public int getLevel(ResourceLocation key) + { + LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADE_MAP.getOrDefault(key, LivingUpgrade.DUMMY); +// LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADES.getOrDefault(key); + return upgrade.getLevel(upgrades.getOrDefault(upgrade, 0d).intValue()); + } + + public int getUsedPoints() + { + int total = 0; + for (Map.Entry applied : upgrades.entrySet()) + { + double experience = applied.getValue(); + int level = applied.getKey().getLevel((int) experience); + int cost = applied.getKey().getLevelCost(level); + total += cost; + } + + return total; + } + + public int getMaxPoints() + { + return maxPoints; + } + + public LivingStats setMaxPoints(int maxPoints) + { + this.maxPoints = maxPoints; + return this; + } + + public CompoundNBT serialize() + { + CompoundNBT compound = new CompoundNBT(); + ListNBT statList = new ListNBT(); + upgrades.forEach((k, v) -> { + CompoundNBT upgrade = new CompoundNBT(); + upgrade.putString("key", k.getKey().toString()); + upgrade.putDouble("exp", v); + statList.add(upgrade); + }); + compound.put("upgrades", statList); + + compound.putInt("maxPoints", maxPoints); + + return compound; + } + + public void deserialize(CompoundNBT nbt) + { + ListNBT statList = nbt.getList("upgrades", 10); + statList.forEach(tag -> { + if (!(tag instanceof CompoundNBT)) + return; + + LivingUpgrade upgrade = LivingArmorRegistrar.UPGRADE_MAP.getOrDefault(new ResourceLocation(((CompoundNBT) tag).getString("key")), LivingUpgrade.DUMMY); + if (upgrade == LivingUpgrade.DUMMY) + return; + double experience = ((CompoundNBT) tag).getDouble("exp"); + upgrades.put(upgrade, experience); + }); + + maxPoints = nbt.getInt("maxPoints"); + } + + public static LivingStats fromNBT(CompoundNBT statTag) + { + LivingStats stats = new LivingStats(); + stats.deserialize(statTag); + return stats; + } + + public static LivingStats fromPlayer(PlayerEntity player) + { + return fromPlayer(player, false); + } + + public static LivingStats fromPlayer(PlayerEntity player, boolean createNew) + { + if (!LivingUtil.hasFullSet(player)) + return null; + + ItemStack chest = player.getItemStackFromSlot(EquipmentSlotType.CHEST); + LivingStats stats = ((ILivingContainer) chest.getItem()).getLivingStats(chest); + return stats == null && createNew ? new LivingStats() : stats; + } + + public static void toPlayer(PlayerEntity player, LivingStats stats) + { + if (!LivingUtil.hasFullSet(player)) + return; + + ItemStack chest = player.getItemStackFromSlot(EquipmentSlotType.CHEST); + ((ILivingContainer) chest.getItem()).updateLivingStats(chest, stats); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/living/LivingUpgrade.java b/src/main/java/wayoftime/bloodmagic/core/living/LivingUpgrade.java new file mode 100644 index 00000000..8f6b0e82 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/living/LivingUpgrade.java @@ -0,0 +1,267 @@ +package wayoftime.bloodmagic.core.living; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.UUID; +import java.util.function.Consumer; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Multimap; +import com.google.common.collect.Sets; +import com.google.common.reflect.TypeToken; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Util; +import net.minecraftforge.registries.ForgeRegistryEntry; + +@JsonAdapter(LivingUpgrade.Deserializer.class) +public class LivingUpgrade extends ForgeRegistryEntry +{ + public static final LivingUpgrade DUMMY = new LivingUpgrade(new ResourceLocation("dummy"), levels -> levels.add(new Level(0, 0))); + + private final ResourceLocation key; + private final Set incompatible; + private final TreeMap experienceToLevel; + private final Map levelToCost; + private final Map bonuses; + private boolean isNegative; + private String translationKey = null; + private IAttributeProvider attributeProvider; + private IArmorProvider armorProvider; + private IDamageProvider damageProvider; + + public LivingUpgrade(ResourceLocation key, Consumer> experienceMapper) + { + this.key = key; + this.incompatible = Sets.newHashSet(); + this.experienceToLevel = Maps.newTreeMap(); + this.levelToCost = Maps.newHashMap(); + this.bonuses = Maps.newHashMap(); + + List levels = Lists.newArrayList(); + experienceMapper.accept(levels); + + for (int i = 0; i < levels.size(); i++) + { + Level level = levels.get(i); + experienceToLevel.put(level.experienceNeeded, i + 1); + levelToCost.put(i + 1, level.upgradeCost); + } + } + + public LivingUpgrade withBonusSet(String id, Consumer> modifiers) + { +// List values = DefaultedList.of(); + List values = new ArrayList(); + modifiers.accept(values); + if (values.size() != levelToCost.size()) + throw new RuntimeException("Bonus size and level size must be the same."); + + bonuses.put(id, new Bonus(id, values)); + return this; + } + + public Number getBonusValue(String id, int level) + { + List modifiers = bonuses.getOrDefault(id, Bonus.DEFAULT).modifiers; + if (modifiers.isEmpty() || level == 0) + return 0; + + return modifiers.get(level - 1); + } + + public LivingUpgrade withAttributeProvider(IAttributeProvider attributeProvider) + { + this.attributeProvider = attributeProvider; + return this; + } + + public IAttributeProvider getAttributeProvider() + { + return attributeProvider; + } + + public LivingUpgrade withArmorProvider(IArmorProvider armorProvider) + { + this.armorProvider = armorProvider; + return this; + } + + public IArmorProvider getArmorProvider() + { + return armorProvider; + } + + public LivingUpgrade withDamageProvider(IDamageProvider damageProvider) + { + this.damageProvider = damageProvider; + return this; + } + + public IDamageProvider getDamageProvider() + { + return damageProvider; + } + + public String getTranslationKey() + { + return translationKey == null ? translationKey = Util.makeTranslationKey("living_upgrade", key) + : translationKey; + } + + public boolean isNegative() + { + return isNegative; + } + + public boolean isCompatible(ResourceLocation otherUpgrade) + { + return !incompatible.contains(otherUpgrade); + } + + public LivingUpgrade addIncompatibility(ResourceLocation key, ResourceLocation... otherKeys) + { + incompatible.add(key); + Collections.addAll(incompatible, otherKeys); + return this; + } + + public int getLevel(int experience) + { + Map.Entry floor = experienceToLevel.floorEntry(experience); + return floor == null ? 0 : floor.getValue(); + } + + public int getNextRequirement(int experience) + { + Integer ret = experienceToLevel.ceilingKey(experience + 1); + return ret == null ? 0 : ret; + } + + public int getLevelCost(int level) + { + return levelToCost.getOrDefault(level, 0); + } + + public ResourceLocation getKey() + { + return key; + } + + public LivingUpgrade asDowngrade() + { + this.isNegative = true; + return this; + } + + @Override + public String toString() + { + return key.toString(); + } + + public interface IAttributeProvider + { + void handleAttributes(LivingStats stats, Multimap modifiers, UUID uuid, LivingUpgrade upgrade, int level); + } + + public interface IArmorProvider + { + double getProtection(PlayerEntity player, LivingStats stats, DamageSource source, LivingUpgrade upgrade, int level); + } + + public interface IDamageProvider + { + double getAdditionalDamage(PlayerEntity player, ItemStack weapon, double damage, LivingStats stats, LivingEntity attacked, LivingUpgrade upgrade, int level); + } + + public static class Level + { + @SerializedName("xp") + private final int experienceNeeded; + @SerializedName("cost") + private final int upgradeCost; + + public Level(int experienceNeeded, int upgradeCost) + { + this.experienceNeeded = experienceNeeded; + this.upgradeCost = upgradeCost; + } + } + + public static class Bonus + { + + private static final Bonus DEFAULT = new Bonus("null", Collections.emptyList()); + + private final String id; + private final List modifiers; + + public Bonus(String id, List modifiers) + { + this.id = id; + this.modifiers = modifiers; + } + + public String getId() + { + return id; + } + } + + public static class Deserializer implements JsonDeserializer + { + @Override + public LivingUpgrade deserialize(JsonElement element, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + JsonObject json = element.getAsJsonObject(); + ResourceLocation id = new ResourceLocation(json.getAsJsonPrimitive("id").getAsString()); + List levels = context.deserialize(json.getAsJsonArray("levels"), new TypeToken>() + { + }.getType()); + boolean negative = json.has("negative") && json.getAsJsonPrimitive("negative").getAsBoolean(); + + LivingUpgrade upgrade = new LivingUpgrade(id, upgradeLevels -> upgradeLevels.addAll(levels)); + if (negative) + upgrade.asDowngrade(); + + if (json.has("incompatibilities")) + { + String[] incompatibilities = context.deserialize(json.getAsJsonArray("incompatibilities"), String[].class); + for (String incompatible : incompatibilities) + upgrade.addIncompatibility(new ResourceLocation(incompatible)); + } + + if (json.has("bonuses")) + { + Map bonuses = context.deserialize(json.getAsJsonObject("bonuses"), new TypeToken>() + { + }.getType()); + bonuses.forEach((k, v) -> upgrade.withBonusSet(k, numbers -> Collections.addAll(numbers, v))); + } + + return upgrade; + } + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/core/living/LivingUtil.java b/src/main/java/wayoftime/bloodmagic/core/living/LivingUtil.java new file mode 100644 index 00000000..605d8616 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/living/LivingUtil.java @@ -0,0 +1,191 @@ +package wayoftime.bloodmagic.core.living; + +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.commons.lang3.tuple.Pair; + +import com.google.common.collect.Multimap; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ArmorItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraftforge.common.MinecraftForge; +import wayoftime.bloodmagic.common.item.ItemLivingTrainer; +import wayoftime.bloodmagic.core.util.PlayerUtil; +import wayoftime.bloodmagic.event.LivingEquipmentEvent; + +public class LivingUtil +{ + // @return Pair containing the LivingStats of the player, and if the LivingStats + // upgraded due to the applied EXP. + public static Pair applyNewExperience(PlayerEntity player, LivingUpgrade upgrade, double experience) + { + LivingStats stats = LivingStats.fromPlayer(player, true); + if (stats == null) + return Pair.of(null, false); + + if (!canTrain(player, upgrade, upgrade.getLevel((int) experience))) + return Pair.of(stats, false); + + LivingEquipmentEvent.GainExperience event = new LivingEquipmentEvent.GainExperience(player, stats, upgrade, experience); +// EventResult result = LivingEquipmentEvent.EXPERIENCE_GAIN.invoker().gainExperience(event); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) + return Pair.of(stats, false); + + experience = event.getExperience(); + + double currentExperience = stats.getUpgrades().getOrDefault(upgrade, 0d); + double requiredForLevel = upgrade.getNextRequirement((int) currentExperience) - currentExperience; + + // If we're going to level up from this, check points + if (requiredForLevel <= experience) + { + int currentPoints = stats.getUsedPoints(); + // If we're already capped or somehow over the cap, we don't want to add + // experience + if (currentPoints >= stats.getMaxPoints()) + return Pair.of(stats, false); + + int currentPointCost = upgrade.getLevelCost(upgrade.getLevel((int) currentExperience)); + int nextPointCost = upgrade.getLevelCost(upgrade.getLevel((int) (currentExperience + experience))); + +// System.out.println("Current point cost: " + currentPointCost + ", Next point cost: " + nextPointCost); + // If there's no more levels in this upgrade, we don't want to add experience + if (nextPointCost == -1) + return Pair.of(stats, false); + + int pointDif = nextPointCost - currentPointCost; + if (pointDif < 0) + { + return Pair.of(stats, false); + } + + // If applying this new level will go over our cap, we don't want to add + // experience + if (currentPoints + pointDif > stats.getMaxPoints()) + return Pair.of(stats, false); + } + + int newLevel = upgrade.getLevel((int) (currentExperience + experience)); + boolean didUpgrade = false; + if (upgrade.getLevel((int) currentExperience) != newLevel) + { + LivingEquipmentEvent.LevelUp levelUpEvent = new LivingEquipmentEvent.LevelUp(player, stats, upgrade); +// LivingEquipmentEvent.LEVEL_UP.invoker().levelUp(levelUpEvent); + MinecraftForge.EVENT_BUS.post(levelUpEvent); + didUpgrade = true; + + player.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.living_upgrade_level_increase", new TranslationTextComponent(upgrade.getTranslationKey()), newLevel), true); + } + +// System.out.println("Adding experience! Total experience is: " + currentExperience); + + stats.addExperience(upgrade.getKey(), experience); + LivingStats.toPlayer(player, stats); + return Pair.of(stats, didUpgrade); + } + + public static double getDamageReceivedForArmour(PlayerEntity player, DamageSource source, double damage) + { +// System.out.println("Initial damage from " + source + ": " + damage); + LivingStats stats = LivingStats.fromPlayer(player, true); + if (stats == null) + return damage; + + Map upgrades = stats.getUpgrades(); + for (Entry entry : upgrades.entrySet()) + { + LivingUpgrade upgrade = entry.getKey(); + if (upgrade.getArmorProvider() == null) + { + continue; + } + + int level = upgrade.getLevel(entry.getValue().intValue()); + damage *= 1 - upgrade.getArmorProvider().getProtection(player, stats, source, upgrade, level); + } + +// System.out.println("Final damage: " + damage); + + return damage; + } + + public static double getAdditionalDamage(PlayerEntity player, ItemStack weapon, LivingEntity attackedEntity, double damage) + { +// System.out.println("Initial damage from " + source + ": " + damage); + LivingStats stats = LivingStats.fromPlayer(player, true); + if (stats == null) + return 0; + + double additionalDamage = 0; + + Map upgrades = stats.getUpgrades(); + for (Entry entry : upgrades.entrySet()) + { + LivingUpgrade upgrade = entry.getKey(); + if (upgrade.getArmorProvider() == null) + { + continue; + } + + int level = upgrade.getLevel(entry.getValue().intValue()); + if (upgrade.getDamageProvider() == null) + { + continue; + } + additionalDamage += upgrade.getDamageProvider().getAdditionalDamage(player, weapon, damage, stats, attackedEntity, upgrade, level); + } + +// System.out.println("Final damage: " + damage); + + return additionalDamage; + } + + public static boolean canTrain(PlayerEntity player, LivingUpgrade upgrade, int currentLevel) + { + ItemStack trainer = PlayerUtil.findItem(player, stack -> stack.getItem() instanceof ItemLivingTrainer && stack.hasTag() && stack.getTag().contains("livingStats")); + if (trainer.isEmpty()) + return true; + + String mode = trainer.getTag().getString("livingLock"); + LivingStats stats = ((ILivingContainer) trainer.getItem()).getLivingStats(trainer); + + int levelLimit = stats.getLevel(upgrade.getKey()); + if (mode.equalsIgnoreCase("whitelist")) + { + return levelLimit != 0 && levelLimit > currentLevel; + } else if (mode.equalsIgnoreCase("blacklist")) + { + return levelLimit == 0; + } + + return true; + } + + public static boolean hasFullSet(PlayerEntity player) + { + for (ItemStack stack : player.inventory.armorInventory) + if (stack.isEmpty() || !(stack.getItem() instanceof ILivingContainer)) + return false; + + return true; + } + + public static void applyAttributes(Multimap attributes, ItemStack stack, PlayerEntity player, EquipmentSlotType slot) + { + if (player == null || !hasFullSet(player)) + return; + + Multimap newAttributes = ((ArmorItem) stack.getItem()).getAttributeModifiers(slot, stack); +// newAttributes.values().forEach(e -> e.setSerialize(false)); + attributes.putAll(newAttributes); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/core/living/ProjectileArmorProvider.java b/src/main/java/wayoftime/bloodmagic/core/living/ProjectileArmorProvider.java new file mode 100644 index 00000000..f1b10b44 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/living/ProjectileArmorProvider.java @@ -0,0 +1,15 @@ +package wayoftime.bloodmagic.core.living; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.DamageSource; + +public class ProjectileArmorProvider implements LivingUpgrade.IArmorProvider +{ + @Override + public double getProtection(PlayerEntity player, LivingStats stats, DamageSource source, LivingUpgrade upgrade, int level) + { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/core/recipe/IngredientBloodOrb.java b/src/main/java/wayoftime/bloodmagic/core/recipe/IngredientBloodOrb.java new file mode 100644 index 00000000..9e69b0f2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/recipe/IngredientBloodOrb.java @@ -0,0 +1,83 @@ +package wayoftime.bloodmagic.core.recipe; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import com.google.gson.JsonObject; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.crafting.IIngredientSerializer; +import net.minecraftforge.common.crafting.VanillaIngredientSerializer; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.registry.OrbRegistry; +import wayoftime.bloodmagic.common.item.BloodOrb; + +public class IngredientBloodOrb extends Ingredient +{ + public static final ResourceLocation NAME = new ResourceLocation(BloodMagic.MODID, "bloodorb"); + + public final int orbTier; + + public static IngredientBloodOrb fromTier(int orbTier) + { + return new IngredientBloodOrb(orbTier); + } + + public static IngredientBloodOrb fromOrb(BloodOrb orb) + { + return new IngredientBloodOrb(orb.getTier()); + } + + protected IngredientBloodOrb(int orbTier) + { + super(Stream.of(new ItemList(orbTier))); + this.orbTier = orbTier; + } + + public net.minecraftforge.common.crafting.IIngredientSerializer getSerializer() + { + return Serializer.INSTANCE; + } + + private static class ItemList implements IItemList + { + private final int orbTier; + + public ItemList(int orbTier) + { + this.orbTier = orbTier; + } + + @Override + public Collection getStacks() + { + List orbGet = OrbRegistry.getOrbsDownToTier(orbTier); + + return orbGet; + } + + @Override + public JsonObject serialize() + { + JsonObject object = new JsonObject(); + object.addProperty("type", NAME.toString()); + object.addProperty("orb_tier", orbTier); + return object; + } + } + + public static class Serializer extends VanillaIngredientSerializer + { + public static final IIngredientSerializer INSTANCE = new Serializer(); + + @Override + public Ingredient parse(JsonObject json) + { + return new IngredientBloodOrb(JSONUtils.getInt(json, "orb_tier")); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/registry/AlchemyArrayRegistry.java b/src/main/java/wayoftime/bloodmagic/core/registry/AlchemyArrayRegistry.java new file mode 100644 index 00000000..93dd38c6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/registry/AlchemyArrayRegistry.java @@ -0,0 +1,77 @@ +package wayoftime.bloodmagic.core.registry; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffect; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectBinding; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectBounce; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectCrafting; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectDay; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectMovement; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectNight; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectSpike; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectUpdraft; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; + +public class AlchemyArrayRegistry +{ + public static Map effectMap = new HashMap(); + public static final ResourceLocation BINDING_ARRAY = BloodMagic.rl("textures/models/alchemyarrays/bindingarray.png"); + + public static boolean registerEffect(ResourceLocation rl, AlchemyArrayEffect effect) + { + boolean hadKey = effectMap.containsKey(rl); + + effectMap.put(rl, effect); + + return hadKey; + } + + public static void registerBaseArrays() + { + registerEffect(BloodMagic.rl("array/movement"), new AlchemyArrayEffectMovement()); + registerEffect(BloodMagic.rl("array/updraft"), new AlchemyArrayEffectUpdraft()); + registerEffect(BloodMagic.rl("array/spike"), new AlchemyArrayEffectSpike()); + registerEffect(BloodMagic.rl("array/day"), new AlchemyArrayEffectDay()); + registerEffect(BloodMagic.rl("array/night"), new AlchemyArrayEffectNight()); + registerEffect(BloodMagic.rl("array/bounce"), new AlchemyArrayEffectBounce()); + } + + public static AlchemyArrayEffect getEffect(World world, ResourceLocation rl, RecipeAlchemyArray recipe) + { + if (effectMap.containsKey(rl)) + { + return effectMap.get(rl).getNewCopy(); + } + + if (!recipe.getOutput().isEmpty()) + { + if (recipe.getTexture().equals(BINDING_ARRAY)) + { + return new AlchemyArrayEffectBinding(recipe.getOutput()); + } + // Return a new instance of AlchemyEffectCrafting + return new AlchemyArrayEffectCrafting(recipe.getOutput()); + } + + return null; + } + + public static AlchemyArrayEffect getEffect(World world, ItemStack input, ItemStack catalyst) + { + Pair array = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAlchemyArray(world, input, catalyst); + if (array == null || array.getRight() == null || !array.getLeft()) + return null; + + return getEffect(world, array.getRight().getId(), array.getRight()); + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/core/registry/AlchemyArrayRendererRegistry.java b/src/main/java/wayoftime/bloodmagic/core/registry/AlchemyArrayRendererRegistry.java new file mode 100644 index 00000000..e650f454 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/registry/AlchemyArrayRendererRegistry.java @@ -0,0 +1,71 @@ +package wayoftime.bloodmagic.core.registry; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.client.render.alchemyarray.AlchemyArrayRenderer; +import wayoftime.bloodmagic.client.render.alchemyarray.BindingAlchemyCircleRenderer; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; + +public class AlchemyArrayRendererRegistry +{ + @OnlyIn(Dist.CLIENT) + public static final AlchemyArrayRenderer DEFAULT_RENDERER = new AlchemyArrayRenderer(new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/basearray.png")); + + @OnlyIn(Dist.CLIENT) + public static Map rendererMap = new HashMap(); + + /** + * + * @param rl + * @param renderer + * @return True if there was already a renderer registered for this rl. + */ + @OnlyIn(Dist.CLIENT) + public static boolean registerRenderer(ResourceLocation rl, AlchemyArrayRenderer renderer) + { + boolean hadKey = rendererMap.containsKey(rl); + + rendererMap.put(rl, renderer); + + return hadKey; + } + + @OnlyIn(Dist.CLIENT) + public static AlchemyArrayRenderer getRenderer(World world, ResourceLocation rl, RecipeAlchemyArray recipe) + { + if (rendererMap.containsKey(rl)) + { + return rendererMap.get(rl); + } + + ResourceLocation texture = recipe.getTexture(); + if (AlchemyArrayRegistry.BINDING_ARRAY.equals(texture)) + return new BindingAlchemyCircleRenderer(); + + if (texture != null) + return new AlchemyArrayRenderer(texture); + + return null; + } + + @OnlyIn(Dist.CLIENT) + public static AlchemyArrayRenderer getRenderer(World world, ItemStack input, ItemStack catalyst) + { + Pair array = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAlchemyArray(world, input, catalyst); + if (array == null || array.getRight() == null) + { + return null; + } + + return getRenderer(world, array.getRight().getId(), array.getRight()); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/registry/OrbRegistry.java b/src/main/java/wayoftime/bloodmagic/core/registry/OrbRegistry.java new file mode 100644 index 00000000..9db6a683 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/registry/OrbRegistry.java @@ -0,0 +1,63 @@ +package wayoftime.bloodmagic.core.registry; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.google.common.collect.ArrayListMultimap; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.altar.AltarTier; +import wayoftime.bloodmagic.common.item.BloodOrb; + +/** + * This is only for those who wish to add a basic {@link BloodOrb}. If you need + * custom handling, you will need your own item class. + */ +public class OrbRegistry +{ + public static ArrayListMultimap tierMap = ArrayListMultimap.create(); + private static List orbs = new ArrayList<>(); + + public static List getOrbsForTier(int tier) + { + if (getTierMap().containsKey(tier)) + return getTierMap().get(tier); + + return Collections.emptyList(); + } + + public static List getOrbsUpToTier(int tier) + { + List ret = new ArrayList<>(); + + for (int i = 1; i <= tier; i++) ret.addAll(getOrbsForTier(i)); + + return ret; + } + + public static List getOrbsDownToTier(int tier) + { + List ret = new ArrayList<>(); + + for (int i = AltarTier.MAXTIERS; i >= tier; i--) ret.addAll(getOrbsForTier(i)); + + return ret; + } + + public static ItemStack getOrbStack(BloodOrb orb) + { + Item orbItem = ForgeRegistries.ITEMS.getValue(orb.getResourceLocation()); + if (orbItem == null) + return null; + + return new ItemStack(orbItem); + } + + public static ArrayListMultimap getTierMap() + { + return ArrayListMultimap.create(tierMap); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/core/util/PlayerUtil.java b/src/main/java/wayoftime/bloodmagic/core/util/PlayerUtil.java new file mode 100644 index 00000000..5c6e2f42 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/util/PlayerUtil.java @@ -0,0 +1,57 @@ +package wayoftime.bloodmagic.core.util; + +import java.util.function.Predicate; + +import com.google.common.collect.Multimap; + +import net.minecraft.entity.ai.attributes.Attribute; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import wayoftime.bloodmagic.common.item.ExpandedArmor; +import wayoftime.bloodmagic.core.living.LivingUtil; + +public class PlayerUtil +{ + + public static ItemStack findItem(PlayerEntity player, Predicate requirements) + { + + // Check offhand first + ItemStack offHand = player.getHeldItemOffhand(); + if (requirements.test(offHand)) + return offHand; + + // Check inventory next + for (int slot = 0; slot < player.inventory.getSizeInventory(); slot++) + { + ItemStack foundStack = player.inventory.getStackInSlot(slot); + if (!foundStack.isEmpty() && requirements.test(foundStack)) + return foundStack; + } + + return ItemStack.EMPTY; + } + + public static Multimap handle(PlayerEntity player, Multimap existing) + { + + ItemStack chest = player.getItemStackFromSlot(EquipmentSlotType.CHEST); + boolean hasFullSet = LivingUtil.hasFullSet(player); + + if (hasFullSet && existing == null) + { + existing = ((ExpandedArmor) chest.getItem()).getAttributeModifiers(EquipmentSlotType.CHEST, chest); + player.getAttributeManager().reapplyModifiers(existing); + } + + if (!hasFullSet && existing != null) + { + player.getAttributeManager().removeModifiers(existing); + existing = null; + } + + return existing; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/util/ResourceUtil.java b/src/main/java/wayoftime/bloodmagic/core/util/ResourceUtil.java new file mode 100644 index 00000000..81f6b0d1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/util/ResourceUtil.java @@ -0,0 +1,78 @@ +package wayoftime.bloodmagic.core.util; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.FileSystem; +import java.nio.file.FileSystemAlreadyExistsException; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.commons.io.IOUtils; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; + +public class ResourceUtil +{ + public static Set gatherResources(String home, String following, Predicate predicate) + { + FileSystem fileSystem = null; + try + { + URL url = ResourceUtil.class.getResource(home); + if (url != null) + { + URI uri = url.toURI(); + Path path; + if (uri.getScheme().equals("file")) + { + path = Paths.get(ResourceUtil.class.getResource(home + "/" + following).toURI()); + } else + { + if (!uri.getScheme().equals("jar")) + { + BloodMagic.LOGGER.error("Unsupported URI scheme {}", uri.getScheme()); + return Collections.emptySet(); + } + + try + { + fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap()); + } catch (FileSystemAlreadyExistsException e) + { + fileSystem = FileSystems.getFileSystem(uri); + } + path = fileSystem.getPath(home + "/" + following); + } + + return Files.walk(path).filter(predicate).collect(Collectors.toSet()); + } + } catch (IOException | URISyntaxException e) + { + e.printStackTrace(); + } finally + { + IOUtils.closeQuietly(fileSystem); + } + + return Collections.emptySet(); + } + + public static Set gatherResources(String home, String following) + { + return gatherResources(home, following, p -> true); + } + + public static ResourceLocation addContext(ResourceLocation rl, String context) + { + return new ResourceLocation(rl.getNamespace(), context + rl.getPath()); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/core/util/Value.java b/src/main/java/wayoftime/bloodmagic/core/util/Value.java new file mode 100644 index 00000000..4ffbd20f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/core/util/Value.java @@ -0,0 +1,27 @@ +package wayoftime.bloodmagic.core.util; + +public final class Value +{ + private T value; + + private Value(T t) + { + this.value = t; + } + + public T get() + { + return value; + } + + public Value set(T t) + { + this.value = t; + return this; + } + + public static Value of(T t) + { + return new Value<>(t); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/demonaura/PosXY.java b/src/main/java/wayoftime/bloodmagic/demonaura/PosXY.java new file mode 100644 index 00000000..2e2fd6da --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/demonaura/PosXY.java @@ -0,0 +1,76 @@ +package wayoftime.bloodmagic.demonaura; + +import org.apache.commons.lang3.builder.ToStringBuilder; + +public class PosXY implements Comparable +{ + public int x; + public int y; + + public PosXY() + { + } + + public PosXY(int x, int y) + { + this.x = x; + this.y = y; + } + + @Override + public int compareTo(PosXY c) + { + return this.y == c.y ? this.x - c.x : this.y - c.y; + } + + public float getDistanceSquared(int x, int z) + { + float f = this.x - x; + float f2 = this.y - z; + return f * f + f2 * f2; + } + + public float getDistanceSquaredToChunkCoordinates(PosXY c) + { + return getDistanceSquared(c.x, c.y); + } + + public void setX(int x) + { + this.x = x; + } + + public void setY(int y) + { + this.y = y; + } + + @Override + public String toString() + { + return new ToStringBuilder(this).append("x", x).append("y", y).toString(); + } + + @Override + public boolean equals(Object o) + { + if (this == o) + return true; + if (!(o instanceof PosXY)) + return false; + + PosXY posXY = (PosXY) o; + + if (x != posXY.x) + return false; + return y == posXY.y; + } + + @Override + public int hashCode() + { + int result = x; + result = 31 * result + y; + return result; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/demonaura/WillChunk.java b/src/main/java/wayoftime/bloodmagic/demonaura/WillChunk.java new file mode 100644 index 00000000..14cb3f02 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/demonaura/WillChunk.java @@ -0,0 +1,72 @@ +package wayoftime.bloodmagic.demonaura; + +import java.lang.ref.WeakReference; + +import net.minecraft.world.chunk.IChunk; +import wayoftime.bloodmagic.will.DemonWillHolder; + +public class WillChunk +{ + PosXY loc; + private short base; + private DemonWillHolder currentWill = new DemonWillHolder(); + private WeakReference chunkRef; + + public WillChunk(PosXY loc) + { + this.loc = loc; + } + + public WillChunk(IChunk chunk, short base, DemonWillHolder currentWill) + { + this.loc = new PosXY(chunk.getPos().x, chunk.getPos().z); + this.chunkRef = new WeakReference(chunk); + this.base = base; + this.currentWill = currentWill; + } + + public boolean isModified() + { + return (this.chunkRef != null) && (this.chunkRef.get() != null) && this.chunkRef.get().isModified(); + } + + public PosXY getLoc() + { + return loc; + } + + public void setLoc(PosXY loc) + { + this.loc = loc; + } + + public short getBase() + { + return base; + } + + public void setBase(short base) + { + this.base = base; + } + + public DemonWillHolder getCurrentWill() + { + return currentWill; + } + + public void setCurrentWill(DemonWillHolder currentWill) + { + this.currentWill = currentWill; + } + + public WeakReference getChunkRef() + { + return chunkRef; + } + + public void setChunkRef(WeakReference chunkRef) + { + this.chunkRef = chunkRef; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/demonaura/WillWorld.java b/src/main/java/wayoftime/bloodmagic/demonaura/WillWorld.java new file mode 100644 index 00000000..b1f92d9a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/demonaura/WillWorld.java @@ -0,0 +1,49 @@ +package wayoftime.bloodmagic.demonaura; + +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.util.ResourceLocation; + +public class WillWorld +{ + // TODO: It was noted I may need to use RegistryKey instead. + ResourceLocation dim; + ConcurrentHashMap willChunks = new ConcurrentHashMap<>(); + +// private static ConcurrentHashMap nodeTickets = new ConcurrentHashMap(); + + public WillWorld(ResourceLocation resourceLocation) + { + this.dim = resourceLocation; + } + + public WillChunk getWillChunkAt(int x, int y) + { + return getWillChunkAt(new PosXY(x, y)); + } + + public WillChunk getWillChunkAt(PosXY loc) + { + return this.willChunks.get(loc); + } + + public ConcurrentHashMap getWillChunks() + { + return willChunks; + } + + public void setWillChunks(ConcurrentHashMap willChunks) + { + this.willChunks = willChunks; + } + +// public static ConcurrentHashMap getNodeTickets() +// { +// return nodeTickets; +// } +// +// public static void setNodeTickets(ConcurrentHashMap nodeTickets) +// { +// nodeTickets = nodeTickets; +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/demonaura/WorldDemonWillHandler.java b/src/main/java/wayoftime/bloodmagic/demonaura/WorldDemonWillHandler.java new file mode 100644 index 00000000..eccb6748 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/demonaura/WorldDemonWillHandler.java @@ -0,0 +1,220 @@ +package wayoftime.bloodmagic.demonaura; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; + +import javax.annotation.Nullable; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunk; +import wayoftime.bloodmagic.util.BMLog; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class WorldDemonWillHandler +{ + public static ConcurrentHashMap> dirtyChunks = new ConcurrentHashMap<>(); + static ConcurrentHashMap containedWills = new ConcurrentHashMap<>(); + + @Nullable + public static DemonWillHolder getWillHolder(ResourceLocation resourceLocation, int x, int y) + { + WillChunk chunk = getWillChunk(resourceLocation, x, y); + if (chunk != null) + { + return chunk.getCurrentWill(); + } + + return null; + } + + public static DemonWillHolder getWillHolder(World world, BlockPos pos) + { + return getWillHolder(getDimensionResourceLocation(world), pos.getX() >> 4, pos.getZ() >> 4); + } + + public static WillWorld getWillWorld(ResourceLocation rl) + { + return containedWills.get(rl); + } + + @Nullable + public static WillChunk getWillChunk(ResourceLocation resourceLocation, int x, int y) + { + if (!containedWills.containsKey(resourceLocation)) + { + addWillWorld(resourceLocation); + } + + return (containedWills.get(resourceLocation)).getWillChunkAt(x, y); + } + + public static void addWillWorld(ResourceLocation resourceLocation) + { + if (!containedWills.containsKey(resourceLocation)) + { + containedWills.put(resourceLocation, new WillWorld(resourceLocation)); + BMLog.DEBUG.info("Creating demon will cache for world {}", resourceLocation); + } + } + + public static void removeWillWorld(ResourceLocation rl) + { + containedWills.remove(rl); + BMLog.DEBUG.info("Removing demon will cache for world {}", rl); + } + + public static void addWillChunk(ResourceLocation resourceLocation, IChunk chunk, short base, DemonWillHolder currentWill) + { + WillWorld aw = containedWills.get(resourceLocation); + if (aw == null) + { + aw = new WillWorld(resourceLocation); + } + aw.getWillChunks().put(new PosXY(chunk.getPos().x, chunk.getPos().z), new WillChunk(chunk, base, currentWill)); + + containedWills.put(resourceLocation, aw); + } + + public static void removeWillChunk(ResourceLocation resourceLocation, int x, int y) + { + WillWorld aw = containedWills.get(resourceLocation); + if (aw != null) + { + WillChunk chunk = aw.getWillChunks().remove(new PosXY(x, y)); + if (chunk != null) + { + markChunkAsDirty(chunk, resourceLocation); + } + } + } + + public static EnumDemonWillType getHighestDemonWillType(World world, BlockPos pos) + { + double currentMax = 0; + EnumDemonWillType currentHighest = EnumDemonWillType.DEFAULT; + + WillChunk willChunk = getWillChunk(world, pos); + + DemonWillHolder currentWill = willChunk.getCurrentWill(); + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + if (currentWill.getWill(type) > currentMax) + { + currentMax = currentWill.getWill(type); + currentHighest = type; + } + } + + return currentHighest; + } + + public static double drainWill(World world, BlockPos pos, EnumDemonWillType type, double amount, boolean doDrain) + { + WillChunk willChunk = getWillChunk(world, pos); + + DemonWillHolder currentWill = willChunk.getCurrentWill(); + double drain = Math.min(currentWill.getWill(type), amount); + if (!doDrain) + { + return drain; + } + + drain = currentWill.drainWill(type, drain); + markChunkAsDirty(willChunk, getDimensionResourceLocation(world)); + + return drain; + } + + public static double fillWillToMaximum(World world, BlockPos pos, EnumDemonWillType type, double amount, double max, boolean doFill) + { + WillChunk willChunk = getWillChunk(world, pos); + + DemonWillHolder currentWill = willChunk.getCurrentWill(); + double fill = Math.min(amount, max - currentWill.getWill(type)); + if (!doFill || fill <= 0) + { + return fill > 0 ? fill : 0; + } + + fill = currentWill.addWill(type, amount, max); + markChunkAsDirty(willChunk, getDimensionResourceLocation(world)); + + return fill; + } + + public static double fillWill(World world, BlockPos pos, EnumDemonWillType type, double amount, boolean doFill) + { + WillChunk willChunk = getWillChunk(world, pos); + + DemonWillHolder currentWill = willChunk.getCurrentWill(); + if (!doFill) + { + return amount; + } + + currentWill.addWill(type, amount); + markChunkAsDirty(willChunk, getDimensionResourceLocation(world)); + + return amount; + } + + public static WillChunk getWillChunk(World world, BlockPos pos) + { + WillChunk willChunk = getWillChunk(getDimensionResourceLocation(world), pos.getX() >> 4, pos.getZ() >> 4); + if (willChunk == null) + { + Chunk chunk = world.getChunk(pos.getX() >> 4, pos.getZ() >> 4); + generateWill(chunk, world); + + willChunk = getWillChunk(getDimensionResourceLocation(world), pos.getX() >> 4, pos.getZ() >> 4); + } + + return willChunk; + } + + public static double getCurrentWill(World world, BlockPos pos, EnumDemonWillType type) + { + WillChunk willChunk = getWillChunk(world, pos); + + if (willChunk == null) + { + return 0; + } + + DemonWillHolder currentWill = willChunk.getCurrentWill(); + return currentWill.getWill(type); + } + + private static void markChunkAsDirty(WillChunk chunk, ResourceLocation resourceLocation) + { + if (chunk.isModified()) + { + return; + } + PosXY pos = new PosXY(chunk.loc.x, chunk.loc.y); + if (!dirtyChunks.containsKey(resourceLocation)) + { + dirtyChunks.put(resourceLocation, new ConcurrentLinkedQueue<>()); + } + ConcurrentLinkedQueue dc = dirtyChunks.get(resourceLocation); + if (!dc.contains(pos)) + { + dc.add(pos); + } + } + + public static void generateWill(IChunk chunk, World world) + { + addWillChunk(getDimensionResourceLocation(world), chunk, (short) 1, new DemonWillHolder()); + } + + public static ResourceLocation getDimensionResourceLocation(World world) + { + return world.getDimensionKey().getLocation(); + } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/entity/BloodMagicEntities.java b/src/main/java/wayoftime/bloodmagic/entity/BloodMagicEntities.java new file mode 100644 index 00000000..9ae8814d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/BloodMagicEntities.java @@ -0,0 +1,30 @@ +package wayoftime.bloodmagic.entity; + +import net.minecraft.entity.EntityType; +import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import wayoftime.bloodmagic.BloodMagic; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class BloodMagicEntities +{ + private BloodMagicEntities() + { + } + + @SubscribeEvent + public static void registerEntities(RegistryEvent.Register> event) + { +// System.out.println("Ow O"); +// event.getRegistry().register(EntityType.Builder.create(EntitySoulSnare::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).setShouldReceiveVelocityUpdates(false).setCustomClientFactory(((spawnEntity, world) -> new EntitySoulSnare(EntitySoulSnare.TYPE, world))).build("").setRegistryName(BloodMagic.rl("entitysoulsnare"))); + } + + @SubscribeEvent + public static void registerModels(ModelRegistryEvent evt) + { +// System.out.println("O wO"); +// RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.SNARE.getEntityType(), SoulSnareRenderer::new); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/AbstractEntityThrowingDagger.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/AbstractEntityThrowingDagger.java new file mode 100644 index 00000000..ad24d4ba --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/AbstractEntityThrowingDagger.java @@ -0,0 +1,687 @@ +package wayoftime.bloodmagic.entity.projectile; + +import java.util.List; + +import javax.annotation.Nullable; + +import com.google.common.collect.Lists; + +import it.unimi.dsi.fastutil.ints.IntOpenHashSet; +import net.minecraft.block.BlockState; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.MoverType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.entity.projectile.AbstractArrowEntity; +import net.minecraft.entity.projectile.ProjectileHelper; +import net.minecraft.entity.projectile.ProjectileItemEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.network.IPacket; +import net.minecraft.network.play.server.SChangeGameStatePacket; +import net.minecraft.particles.IParticleData; +import net.minecraft.particles.ItemParticleData; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.DamageSource; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.EntityRayTraceResult; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.registry.Registry; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class AbstractEntityThrowingDagger extends ProjectileItemEntity +{ + @Nullable + private BlockState inBlockState; + protected boolean inGround; + protected int timeInGround; + public AbstractArrowEntity.PickupStatus pickupStatus = AbstractArrowEntity.PickupStatus.ALLOWED; + public int arrowShake; + private int ticksInGround; + private double damage = 2.0D; + private int knockbackStrength; + private SoundEvent hitSound = this.getHitEntitySound(); + private IntOpenHashSet piercedEntities; + private List hitEntities; + +// private ItemStack containedStack = ItemStack.EMPTY; + private double willDrop = 0; + private EnumDemonWillType willType = EnumDemonWillType.DEFAULT; + + public AbstractEntityThrowingDagger(EntityType type, World world) + { + super(type, world); + } + + public AbstractEntityThrowingDagger(EntityType type, ItemStack stack, World worldIn, LivingEntity throwerIn) + { + super(type, throwerIn, worldIn); + this.setItem(stack); + if (throwerIn instanceof PlayerEntity) + { + this.pickupStatus = AbstractArrowEntity.PickupStatus.ALLOWED; + } + } + + public AbstractEntityThrowingDagger(EntityType type, ItemStack stack, World worldIn, double x, double y, double z) + { + super(type, x, y, z, worldIn); + this.setItem(stack); + } + + @Override + public void setItem(ItemStack stack) + { + super.setItem(stack); +// this.containedStack = stack; + } + + protected Item getDefaultItem() + { + return BloodMagicItems.THROWING_DAGGER.get(); + } + + @Override + public IPacket createSpawnPacket() + { + return NetworkHooks.getEntitySpawningPacket(this); + } + + @Override + public void tick() + { +// super.tick(); +// RayTraceResult raytraceresult = ProjectileHelper.func_234618_a_(this, this::func_230298_a_); +//// boolean flag = false; +// if (raytraceresult.getType() == RayTraceResult.Type.BLOCK) +// { +// BlockPos blockpos = ((BlockRayTraceResult) raytraceresult).getPos().offset(((BlockRayTraceResult) raytraceresult).getFace()); +// BlockState blockstate = this.world.getBlockState(blockpos); +// Material material = blockstate.getMaterial(); +// if (blockstate.isAir() || blockstate.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable()) +// { +// this.getEntityWorld().setBlockState(blockpos, BloodMagicBlocks.BLOOD_LIGHT.get().getDefaultState()); +// this.setDead(); +// } +// } + +// super.tick(); + this.baseTick(); + boolean flag = this.getNoClip(); + flag = false; + Vector3d vector3d = this.getMotion(); + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt(horizontalMag(vector3d)); + this.rotationYaw = (float) (MathHelper.atan2(vector3d.x, vector3d.z) * (double) (180F / (float) Math.PI)); + this.rotationPitch = (float) (MathHelper.atan2(vector3d.y, (double) f) * (double) (180F / (float) Math.PI)); + this.prevRotationYaw = this.rotationYaw; + this.prevRotationPitch = this.rotationPitch; + } + + BlockPos blockpos = this.getPosition(); + BlockState blockstate = this.world.getBlockState(blockpos); + if (!blockstate.isAir(this.world, blockpos) && !flag) + { + VoxelShape voxelshape = blockstate.getCollisionShape(this.world, blockpos); + if (!voxelshape.isEmpty()) + { + Vector3d vector3d1 = this.getPositionVec(); + + for (AxisAlignedBB axisalignedbb : voxelshape.toBoundingBoxList()) + { + if (axisalignedbb.offset(blockpos).contains(vector3d1)) + { + this.inGround = true; + break; + } + } + } + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + + if (this.isWet()) + { + this.extinguish(); + } + +// this.inBlockState.getBlock() + + if (this.inGround && !flag) + { + if (this.inBlockState != blockstate && this.func_234593_u_()) + { + this.func_234594_z_(); + } else if (!this.world.isRemote) + { + this.func_225516_i_(); + } + + ++this.timeInGround; + } else + { + this.timeInGround = 0; + Vector3d vector3d2 = this.getPositionVec(); + Vector3d vector3d3 = vector3d2.add(vector3d); + RayTraceResult raytraceresult = this.world.rayTraceBlocks(new RayTraceContext(vector3d2, vector3d3, RayTraceContext.BlockMode.COLLIDER, RayTraceContext.FluidMode.NONE, this)); + if (raytraceresult.getType() != RayTraceResult.Type.MISS) + { + vector3d3 = raytraceresult.getHitVec(); + } + + while (!this.removed) + { + EntityRayTraceResult entityraytraceresult = this.rayTraceEntities(vector3d2, vector3d3); + if (entityraytraceresult != null) + { + raytraceresult = entityraytraceresult; + } + + if (raytraceresult != null && raytraceresult.getType() == RayTraceResult.Type.ENTITY) + { + Entity entity = ((EntityRayTraceResult) raytraceresult).getEntity(); + Entity entity1 = this.func_234616_v_(); + if (entity instanceof PlayerEntity && entity1 instanceof PlayerEntity && !((PlayerEntity) entity1).canAttackPlayer((PlayerEntity) entity)) + { + raytraceresult = null; + entityraytraceresult = null; + } + } + + if (raytraceresult != null && raytraceresult.getType() != RayTraceResult.Type.MISS && !flag && !net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, raytraceresult)) + { + this.onImpact(raytraceresult); + this.isAirBorne = true; + } + + if (entityraytraceresult == null || this.getPierceLevel() <= 0) + { + break; + } + + raytraceresult = null; + } + + vector3d = this.getMotion(); + double d3 = vector3d.x; + double d4 = vector3d.y; + double d0 = vector3d.z; + if (this.getIsCritical()) + { + for (int i = 0; i < 4; ++i) + { + this.world.addParticle(ParticleTypes.CRIT, this.getPosX() + d3 * (double) i / 4.0D, this.getPosY() + d4 * (double) i / 4.0D, this.getPosZ() + d0 * (double) i / 4.0D, -d3, -d4 + 0.2D, -d0); + } + } + + double d5 = this.getPosX() + d3; + double d1 = this.getPosY() + d4; + double d2 = this.getPosZ() + d0; + float f1 = MathHelper.sqrt(horizontalMag(vector3d)); + if (flag) + { + this.rotationYaw = (float) (MathHelper.atan2(-d3, -d0) * (double) (180F / (float) Math.PI)); + } else + { + this.rotationYaw = (float) (MathHelper.atan2(d3, d0) * (double) (180F / (float) Math.PI)); + } + + this.rotationPitch = (float) (MathHelper.atan2(d4, (double) f1) * (double) (180F / (float) Math.PI)); + this.rotationPitch = func_234614_e_(this.prevRotationPitch, this.rotationPitch); + this.rotationYaw = func_234614_e_(this.prevRotationYaw, this.rotationYaw); + float f2 = 0.99F; + float f3 = 0.05F; + if (this.isInWater()) + { + for (int j = 0; j < 4; ++j) + { + float f4 = 0.25F; + this.world.addParticle(ParticleTypes.BUBBLE, d5 - d3 * 0.25D, d1 - d4 * 0.25D, d2 - d0 * 0.25D, d3, d4, d0); + } + + f2 = this.getWaterDrag(); + } + + this.setMotion(vector3d.scale((double) f2)); + if (!this.hasNoGravity() && !flag) + { + Vector3d vector3d4 = this.getMotion(); + this.setMotion(vector3d4.x, vector3d4.y - (double) 0.05F, vector3d4.z); + } + + this.setPosition(d5, d1, d2); + this.doBlockCollisions(); + } + } + + @Override + public void move(MoverType typeIn, Vector3d pos) + { + super.move(typeIn, pos); + if (typeIn != MoverType.SELF && this.func_234593_u_()) + { + this.func_234594_z_(); + } + + } + + public void writeAdditional(CompoundNBT compound) + { + super.writeAdditional(compound); + compound.putShort("life", (short) this.ticksInGround); + if (this.inBlockState != null) + { + compound.put("inBlockState", NBTUtil.writeBlockState(this.inBlockState)); + } + + compound.putByte("shake", (byte) this.arrowShake); + compound.putBoolean("inGround", this.inGround); + compound.putByte("pickup", (byte) this.pickupStatus.ordinal()); + compound.putDouble("damage", this.damage); +// compound.putBoolean("crit", this.getIsCritical()); +// compound.putByte("PierceLevel", this.getPierceLevel()); + compound.putString("SoundEvent", Registry.SOUND_EVENT.getKey(this.hitSound).toString()); +// compound.putBoolean("ShotFromCrossbow", this.getShotFromCrossbow()); + compound.putDouble("willDrop", willDrop); +// this.containedStack.write(compound); + compound.putString("willType", this.willType.name); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readAdditional(CompoundNBT compound) + { + super.readAdditional(compound); + this.ticksInGround = compound.getShort("life"); + if (compound.contains("inBlockState", 10)) + { + this.inBlockState = NBTUtil.readBlockState(compound.getCompound("inBlockState")); + } + + this.arrowShake = compound.getByte("shake") & 255; + this.inGround = compound.getBoolean("inGround"); + if (compound.contains("damage", 99)) + { + this.damage = compound.getDouble("damage"); + } + + if (compound.contains("pickup", 99)) + { + this.pickupStatus = AbstractArrowEntity.PickupStatus.getByOrdinal(compound.getByte("pickup")); + } else if (compound.contains("player", 99)) + { + this.pickupStatus = compound.getBoolean("player") ? AbstractArrowEntity.PickupStatus.ALLOWED + : AbstractArrowEntity.PickupStatus.DISALLOWED; + } + this.willDrop = compound.getDouble("willDrop"); +// this.containedStack = ItemStack.read(compound); + this.willType = EnumDemonWillType.getType(compound.getString("willType")); + +// this.setIsCritical(compound.getBoolean("crit")); +// this.setPierceLevel(compound.getByte("PierceLevel")); +// if (compound.contains("SoundEvent", 8)) { +// this.hitSound = Registry.SOUND_EVENT.getOptional(new ResourceLocation(compound.getString("SoundEvent"))).orElse(this.getHitEntitySound()); +// } +// +// this.setShotFromCrossbow(compound.getBoolean("ShotFromCrossbow")); + } + + public void setDamage(double damage) + { + this.damage = damage; + } + + public double getDamage() + { + return this.damage; + } + + protected void onEntityHit(EntityRayTraceResult p_213868_1_) + { + super.onEntityHit(p_213868_1_); + Entity entity = p_213868_1_.getEntity(); + float f = (float) this.getMotion().length(); + int i = MathHelper.ceil(MathHelper.clamp(this.damage, 0.0D, 2.147483647E9D)); + if (this.getPierceLevel() > 0) + { + if (this.piercedEntities == null) + { + this.piercedEntities = new IntOpenHashSet(5); + } + + if (this.hitEntities == null) + { + this.hitEntities = Lists.newArrayListWithCapacity(5); + } + + if (this.piercedEntities.size() >= this.getPierceLevel() + 1) + { + this.remove(); + return; + } + + this.piercedEntities.add(entity.getEntityId()); + } + + if (this.getIsCritical()) + { + long j = (long) this.rand.nextInt(i / 2 + 2); + i = (int) Math.min(j + (long) i, 2147483647L); + } + + Entity entity1 = this.func_234616_v_(); + DamageSource damagesource; + if (entity1 == null) + { + damagesource = DamageSource.causeThrownDamage(this, this); + } else + { + damagesource = DamageSource.causeThrownDamage(this, entity1); + if (entity1 instanceof LivingEntity) + { + ((LivingEntity) entity1).setLastAttackedEntity(entity); + } + } + + boolean flag = entity.getType() == EntityType.ENDERMAN; + int k = entity.getFireTimer(); + if (this.isBurning() && !flag) + { + entity.setFire(5); + } + + if (entity.attackEntityFrom(damagesource, (float) i)) + { + if (flag) + { + return; + } + + if (!entity.isAlive() && entity1 instanceof PlayerEntity && entity instanceof LivingEntity) + { + PlayerDemonWillHandler.addDemonWill(willType, (PlayerEntity) entity1, this.getWillDropForMobHealth(((LivingEntity) entity).getMaxHealth())); + } + + if (entity instanceof LivingEntity) + { + LivingEntity livingentity = (LivingEntity) entity; +// if (!this.world.isRemote && this.getPierceLevel() <= 0) +// { +// livingentity.setArrowCountInEntity(livingentity.getArrowCountInEntity() + 1); +// } + + if (this.knockbackStrength > 0) + { + Vector3d vector3d = this.getMotion().mul(1.0D, 0.0D, 1.0D).normalize().scale((double) this.knockbackStrength * 0.6D); + if (vector3d.lengthSquared() > 0.0D) + { + livingentity.addVelocity(vector3d.x, 0.1D, vector3d.z); + } + } + + if (!this.world.isRemote && entity1 instanceof LivingEntity) + { + EnchantmentHelper.applyThornEnchantments(livingentity, entity1); + EnchantmentHelper.applyArthropodEnchantments((LivingEntity) entity1, livingentity); + } + + this.daggerHit(livingentity); + if (entity1 != null && livingentity != entity1 && livingentity instanceof PlayerEntity && entity1 instanceof ServerPlayerEntity && !this.isSilent()) + { + ((ServerPlayerEntity) entity1).connection.sendPacket(new SChangeGameStatePacket(SChangeGameStatePacket.field_241770_g_, 0.0F)); + } + + if (!entity.isAlive() && this.hitEntities != null) + { + this.hitEntities.add(livingentity); + } + } + + this.playSound(this.hitSound, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + if (this.getPierceLevel() <= 0) + { + this.remove(); + } + } else + { + entity.forceFireTicks(k); + this.setMotion(this.getMotion().scale(-0.1D)); + this.rotationYaw += 180.0F; + this.prevRotationYaw += 180.0F; + if (!this.world.isRemote && this.getMotion().lengthSquared() < 1.0E-7D) + { + if (this.pickupStatus == AbstractArrowEntity.PickupStatus.ALLOWED) + { + this.entityDropItem(this.getArrowStack(), 0.1F); + } + + this.remove(); + } + } + + } + + /** + * Called by a player entity when they collide with an entity + */ + @Override + public void onCollideWithPlayer(PlayerEntity entityIn) + { + if (!this.world.isRemote && (this.inGround || this.getNoClip()) && this.arrowShake <= 0) + { + boolean flag = this.pickupStatus == AbstractArrowEntity.PickupStatus.ALLOWED || this.pickupStatus == AbstractArrowEntity.PickupStatus.CREATIVE_ONLY && entityIn.abilities.isCreativeMode || this.getNoClip() && this.func_234616_v_().getUniqueID() == entityIn.getUniqueID(); + if (this.pickupStatus == AbstractArrowEntity.PickupStatus.ALLOWED && !entityIn.inventory.addItemStackToInventory(this.getArrowStack())) + { + flag = false; + } + + if (flag) + { +// System.out.println("Um test?"); + +// entityIn.onItemPickup(this, 1); + world.playSound(null, entityIn.getPosX(), entityIn.getPosY() + 0.5, entityIn.getPosZ(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); + this.remove(); + } + + } + } + + protected ItemStack getArrowStack() + { + // Gets the item from the data manager + return getItem(); + } + + // OnHitBlock + protected void func_230299_a_(BlockRayTraceResult p_230299_1_) + { + this.inBlockState = this.world.getBlockState(p_230299_1_.getPos()); + super.func_230299_a_(p_230299_1_); + Vector3d vector3d = p_230299_1_.getHitVec().subtract(this.getPosX(), this.getPosY(), this.getPosZ()); + this.setMotion(vector3d); + Vector3d vector3d1 = vector3d.normalize().scale((double) 0.05F); + this.setRawPosition(this.getPosX() - vector3d1.x, this.getPosY() - vector3d1.y, this.getPosZ() - vector3d1.z); + this.playSound(this.getHitGroundSound(), 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + this.inGround = true; + this.arrowShake = 7; +// this.setIsCritical(false); +// this.setPierceLevel((byte) 0); + this.setHitSound(SoundEvents.ENTITY_ARROW_HIT); +// this.setShotFromCrossbow(false); + this.func_213870_w(); + } + + private void func_234594_z_() + { + this.inGround = false; + Vector3d vector3d = this.getMotion(); + this.setMotion(vector3d.mul((double) (this.rand.nextFloat() * 0.2F), (double) (this.rand.nextFloat() * 0.2F), (double) (this.rand.nextFloat() * 0.2F))); + this.ticksInGround = 0; + } + + private boolean func_234593_u_() + { + return this.inGround && this.world.hasNoCollisions((new AxisAlignedBB(this.getPositionVec(), this.getPositionVec())).grow(0.06D)); + } + + protected void func_225516_i_() + { + ++this.ticksInGround; + if (this.ticksInGround >= 1200) + { + this.remove(); + } + + } + + protected void daggerHit(LivingEntity living) + { + } + + /** + * The sound made when an entity is hit by this projectile + */ + protected SoundEvent getHitEntitySound() + { + return SoundEvents.ENTITY_ARROW_HIT; + } + + protected final SoundEvent getHitGroundSound() + { + return this.hitSound; + } + + private void func_213870_w() + { + if (this.hitEntities != null) + { + this.hitEntities.clear(); + } + + if (this.piercedEntities != null) + { + this.piercedEntities.clear(); + } + + } + + public void setHitSound(SoundEvent soundIn) + { + this.hitSound = soundIn; + } + + public boolean getNoClip() + { + if (!this.world.isRemote) + { + return this.noClip; + } else + { + return false; +// return (this.dataManager.get(CRITICAL) & 2) != 0; + } + } + + public boolean getIsCritical() + { +// byte b0 = this.dataManager.get(CRITICAL); +// return (b0 & 1) != 0; + return false; + } + + public byte getPierceLevel() + { + return 0; +// return this.dataManager.get(PIERCE_LEVEL); + } + + protected float getWaterDrag() + { + return 0.6F; + } + + /** + * Gets the EntityRayTraceResult representing the entity hit + */ + @Nullable + protected EntityRayTraceResult rayTraceEntities(Vector3d startVec, Vector3d endVec) + { + return ProjectileHelper.rayTraceEntities(this.world, this, startVec, endVec, this.getBoundingBox().expand(this.getMotion()).grow(1.0D), this::func_230298_a_); + } + + protected boolean func_230298_a_(Entity p_230298_1_) + { + return super.func_230298_a_(p_230298_1_) && (this.piercedEntities == null || !this.piercedEntities.contains(p_230298_1_.getEntityId())); + } + +// protected float getGravityVelocity() +// { +// return 0; +// } + + public void setWillDrop(double willDrop) + { + this.willDrop = willDrop; + } + + public double getWillDropForMobHealth(double hp) + { + return this.willDrop * hp / 20D; + } + + public void setWillType(EnumDemonWillType type) + { + this.willType = type; + } + + @OnlyIn(Dist.CLIENT) + private IParticleData makeParticle() + { + ItemStack itemstack = this.func_213882_k(); + return (IParticleData) (itemstack.isEmpty() ? ParticleTypes.LAVA + : new ItemParticleData(ParticleTypes.ITEM, itemstack)); + } + + /** + * Handler for {@link World#setEntityState} + */ + @OnlyIn(Dist.CLIENT) + public void handleStatusUpdate(byte id) + { + if (id == 3) + { + IParticleData iparticledata = this.makeParticle(); + + for (int i = 0; i < 8; ++i) + { + this.world.addParticle(iparticledata, this.getPosX(), this.getPosY(), this.getPosZ(), 0.0D, 0.0D, 0.0D); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java new file mode 100644 index 00000000..2a82cb10 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java @@ -0,0 +1,103 @@ +package wayoftime.bloodmagic.entity.projectile; + +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.projectile.ProjectileHelper; +import net.minecraft.entity.projectile.ProjectileItemEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.network.IPacket; +import net.minecraft.particles.IParticleData; +import net.minecraft.particles.ItemParticleData; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; + +public class EntityBloodLight extends ProjectileItemEntity +{ + public EntityBloodLight(EntityType p_i50159_1_, World p_i50159_2_) + { + super(p_i50159_1_, p_i50159_2_); + } + + public EntityBloodLight(World worldIn, LivingEntity throwerIn) + { + super(BloodMagicEntityTypes.BLOOD_LIGHT.getEntityType(), throwerIn, worldIn); + } + + public EntityBloodLight(World worldIn, double x, double y, double z) + { + super(BloodMagicEntityTypes.BLOOD_LIGHT.getEntityType(), x, y, z, worldIn); + } + + protected Item getDefaultItem() + { + return BloodMagicItems.REAGENT_BLOOD_LIGHT.get(); + } + + @Override + public IPacket createSpawnPacket() + { + return NetworkHooks.getEntitySpawningPacket(this); + } + + @Override + public void tick() + { + super.tick(); + RayTraceResult raytraceresult = ProjectileHelper.func_234618_a_(this, this::func_230298_a_); +// boolean flag = false; + if (raytraceresult.getType() == RayTraceResult.Type.BLOCK) + { + BlockPos blockpos = ((BlockRayTraceResult) raytraceresult).getPos().offset(((BlockRayTraceResult) raytraceresult).getFace()); + BlockState blockstate = this.world.getBlockState(blockpos); + Material material = blockstate.getMaterial(); + if (blockstate.isAir() || blockstate.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable()) + { + this.getEntityWorld().setBlockState(blockpos, BloodMagicBlocks.BLOOD_LIGHT.get().getDefaultState()); + this.setDead(); + } + } + } + + protected float getGravityVelocity() + { + return 0; + } + + @OnlyIn(Dist.CLIENT) + private IParticleData makeParticle() + { + ItemStack itemstack = this.func_213882_k(); + return (IParticleData) (itemstack.isEmpty() ? ParticleTypes.LAVA + : new ItemParticleData(ParticleTypes.ITEM, itemstack)); + } + + /** + * Handler for {@link World#setEntityState} + */ + @OnlyIn(Dist.CLIENT) + public void handleStatusUpdate(byte id) + { + if (id == 3) + { + IParticleData iparticledata = this.makeParticle(); + + for (int i = 0; i < 8; ++i) + { + this.world.addParticle(iparticledata, this.getPosX(), this.getPosY(), this.getPosZ(), 0.0D, 0.0D, 0.0D); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityShapedCharge.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityShapedCharge.java new file mode 100644 index 00000000..7c2304a2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityShapedCharge.java @@ -0,0 +1,191 @@ +package wayoftime.bloodmagic.entity.projectile; + +import java.util.Optional; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.projectile.ProjectileHelper; +import net.minecraft.entity.projectile.ThrowableEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.network.IPacket; +import net.minecraft.network.datasync.DataParameter; +import net.minecraft.network.datasync.DataSerializers; +import net.minecraft.network.datasync.EntityDataManager; +import net.minecraft.tags.BlockTags; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.common.block.BlockShapedExplosive; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; +import wayoftime.bloodmagic.tile.TileExplosiveCharge; + +public class EntityShapedCharge extends ThrowableEntity +{ + private static final DataParameter> ITEMSTACK_DATA = EntityDataManager.createKey(EntityShapedCharge.class, DataSerializers.OPTIONAL_BLOCK_STATE); +// private BlockState fallTile = BloodMagicBlocks.SHAPED_CHARGE.get().getDefaultState(); + private AnointmentHolder holder; + + public EntityShapedCharge(EntityType p_i50159_1_, World p_i50159_2_) + { + super(p_i50159_1_, p_i50159_2_); + } + + public EntityShapedCharge(World worldIn, Block block, LivingEntity throwerIn) + { + super(BloodMagicEntityTypes.SHAPED_CHARGE.getEntityType(), throwerIn, worldIn); +// this.fallTile = block.getDefaultState(); + this.setFallTile(block.getDefaultState()); + } + + public EntityShapedCharge(World worldIn, Block block, double x, double y, double z) + { + super(BloodMagicEntityTypes.SHAPED_CHARGE.getEntityType(), x, y, z, worldIn); +// this.fallTile = block.getDefaultState(); + this.setFallTile(block.getDefaultState()); + } + + public void setAnointmentHolder(AnointmentHolder holder) + { + this.holder = holder; + } + + public void setFallTile(BlockState state) + { + this.dataManager.set(ITEMSTACK_DATA, Optional.of(state)); + } + + @Override + public void tick() + { + super.tick(); + RayTraceResult raytraceresult = ProjectileHelper.func_234618_a_(this, this::func_230298_a_); +// boolean flag = false; + if (world.isRemote) + { + return; + } + if (raytraceresult.getType() == RayTraceResult.Type.BLOCK) + { + Direction faceHit = ((BlockRayTraceResult) raytraceresult).getFace(); + BlockPos blockpos = ((BlockRayTraceResult) raytraceresult).getPos().offset(((BlockRayTraceResult) raytraceresult).getFace()); + BlockState blockstate = this.world.getBlockState(blockpos); + Material material = blockstate.getMaterial(); +// return state.isAir() || state.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable(); + BlockState fallTile = this.getBlockState(); + if (blockstate.isAir() || blockstate.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable()) + { + this.getEntityWorld().setBlockState(blockpos, fallTile.with(BlockShapedExplosive.ATTACHED, faceHit)); + TileEntity tile = this.getEntityWorld().getTileEntity(blockpos); + if (tile instanceof TileExplosiveCharge) + { + ((TileExplosiveCharge) tile).setAnointmentHolder(holder); + } + this.setDead(); + } else + { +// BlockItem d; + this.entityDropItem(fallTile.getBlock()); + this.setDead(); +// blockstate.isReplaceable(BlockItemUseContext) + } + } + } + + @Override + protected void writeAdditional(CompoundNBT compound) + { + compound.put("BlockState", NBTUtil.writeBlockState(this.getBlockState())); + if (holder != null) + compound.put("holder", holder.serialize()); +// compound.putInt("Time", this.fallTime); +// compound.putBoolean("DropItem", this.shouldDropItem); +// compound.putBoolean("HurtEntities", this.hurtEntities); +// compound.putFloat("FallHurtAmount", this.fallHurtAmount); +// compound.putInt("FallHurtMax", this.fallHurtMax); +// if (this.tileEntityData != null) { +// compound.put("TileEntityData", this.tileEntityData); +// } + + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + protected void readAdditional(CompoundNBT compound) + { + BlockState fallTile = NBTUtil.readBlockState(compound.getCompound("BlockState")); + this.setFallTile(fallTile); + if (compound.contains("holder")) + this.holder = AnointmentHolder.fromNBT(compound.getCompound("holder")); +// this.fallTime = compound.getInt("Time"); +// if (compound.contains("HurtEntities", 99)) { +// this.hurtEntities = compound.getBoolean("HurtEntities"); +// this.fallHurtAmount = compound.getFloat("FallHurtAmount"); +// this.fallHurtMax = compound.getInt("FallHurtMax"); +// } else if (this.fallTile.isIn(BlockTags.ANVIL)) { +// this.hurtEntities = true; +// } +// +// if (compound.contains("DropItem", 99)) { +// this.shouldDropItem = compound.getBoolean("DropItem"); +// } +// +// if (compound.contains("TileEntityData", 10)) { +// this.tileEntityData = compound.getCompound("TileEntityData"); +// } + + if (fallTile.isAir()) + { + fallTile = BloodMagicBlocks.SHAPED_CHARGE.get().getDefaultState(); + } + + } + + @Override + protected void registerData() + { +// FallingBlockEntity d; +// super.registerData(); + // TODO Auto-generated method stub +// super.registerData(); + this.dataManager.register(ITEMSTACK_DATA, Optional.of(Blocks.SAND.getDefaultState())); + } + + public BlockState getBlockState() + { + // TODO Auto-generated method stub + return this.dataManager.get(ITEMSTACK_DATA).get(); + } + + @OnlyIn(Dist.CLIENT) + public World getWorldObj() + { + return this.world; + } + +// @Override +// public IPacket createSpawnPacket() +// { +// return new SSpawnObjectPacket(this, Block.getStateId(this.getBlockState())); +// } + + @Override + public IPacket createSpawnPacket() + { + return NetworkHooks.getEntitySpawningPacket(this); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java new file mode 100644 index 00000000..699f79a8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java @@ -0,0 +1,95 @@ +package wayoftime.bloodmagic.entity.projectile; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.projectile.ArrowEntity; +import net.minecraft.entity.projectile.ProjectileItemEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.network.IPacket; +import net.minecraft.particles.IParticleData; +import net.minecraft.particles.ItemParticleData; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.potion.EffectInstance; +import net.minecraft.util.DamageSource; +import net.minecraft.util.math.EntityRayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; +import wayoftime.bloodmagic.potion.BloodMagicPotions; + +public class EntitySoulSnare extends ProjectileItemEntity +{ + public EntitySoulSnare(EntityType p_i50159_1_, World p_i50159_2_) + { + super(p_i50159_1_, p_i50159_2_); + } + + public EntitySoulSnare(World worldIn, LivingEntity throwerIn) + { + super(BloodMagicEntityTypes.SNARE.getEntityType(), throwerIn, worldIn); + } + + public EntitySoulSnare(World worldIn, double x, double y, double z) + { + super(BloodMagicEntityTypes.SNARE.getEntityType(), x, y, z, worldIn); + } + + protected Item getDefaultItem() + { + ArrowEntity d; + return BloodMagicItems.SOUL_SNARE.get(); + } + + @Override + public IPacket createSpawnPacket() + { + return NetworkHooks.getEntitySpawningPacket(this); + } + + /** + * Called when the arrow hits an entity + */ + protected void onEntityHit(EntityRayTraceResult result) + { + if (result.getEntity() == this.func_234616_v_() || this.ticksExisted < 2 || getEntityWorld().isRemote) + return; + + if (result.getEntity() instanceof LivingEntity) + { + ((LivingEntity) result.getEntity()).addPotionEffect(new EffectInstance(BloodMagicPotions.SOUL_SNARE, 300, 0)); + + result.getEntity().attackEntityFrom(DamageSource.causeThrownDamage(this, this.func_234616_v_()), (float) 0); + } + + this.setDead(); + } + + @OnlyIn(Dist.CLIENT) + private IParticleData makeParticle() + { + ItemStack itemstack = this.func_213882_k(); + return (IParticleData) (itemstack.isEmpty() ? ParticleTypes.ITEM_SNOWBALL + : new ItemParticleData(ParticleTypes.ITEM, itemstack)); + } + + /** + * Handler for {@link World#setEntityState} + */ + @OnlyIn(Dist.CLIENT) + public void handleStatusUpdate(byte id) + { + if (id == 3) + { + IParticleData iparticledata = this.makeParticle(); + + for (int i = 0; i < 8; ++i) + { + this.world.addParticle(iparticledata, this.getPosX(), this.getPosY(), this.getPosZ(), 0.0D, 0.0D, 0.0D); + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityThrowingDagger.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityThrowingDagger.java new file mode 100644 index 00000000..259d70f3 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityThrowingDagger.java @@ -0,0 +1,26 @@ +package wayoftime.bloodmagic.entity.projectile; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; + +public class EntityThrowingDagger extends AbstractEntityThrowingDagger +{ + public EntityThrowingDagger(EntityType type, World world) + { + super(type, world); + } + + public EntityThrowingDagger(ItemStack stack, World worldIn, LivingEntity throwerIn) + { + super(BloodMagicEntityTypes.THROWING_DAGGER.get(), stack, worldIn, throwerIn); + + } + + public EntityThrowingDagger(ItemStack stack, World worldIn, double x, double y, double z) + { + super(BloodMagicEntityTypes.THROWING_DAGGER.get(), stack, worldIn, x, y, z); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityThrowingDaggerSyringe.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityThrowingDaggerSyringe.java new file mode 100644 index 00000000..96838084 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityThrowingDaggerSyringe.java @@ -0,0 +1,48 @@ +package wayoftime.bloodmagic.entity.projectile; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.EntityRayTraceResult; +import net.minecraft.world.World; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; + +public class EntityThrowingDaggerSyringe extends AbstractEntityThrowingDagger +{ + public EntityThrowingDaggerSyringe(EntityType type, World world) + { + super(type, world); + } + + public EntityThrowingDaggerSyringe(ItemStack stack, World worldIn, LivingEntity throwerIn) + { + super(BloodMagicEntityTypes.THROWING_DAGGER.get(), stack, worldIn, throwerIn); + + } + + public EntityThrowingDaggerSyringe(ItemStack stack, World worldIn, double x, double y, double z) + { + super(BloodMagicEntityTypes.THROWING_DAGGER.get(), stack, worldIn, x, y, z); + } + + @Override + protected void onEntityHit(EntityRayTraceResult p_213868_1_) + { + super.onEntityHit(p_213868_1_); + Entity entity = p_213868_1_.getEntity(); + + if (entity instanceof LivingEntity) + { + double maxHealth = ((LivingEntity) entity).getMaxHealth(); + if (!entity.isAlive()) + { + int count = (int) (maxHealth / 20D) + (world.rand.nextDouble() < ((maxHealth % 20D) / 20D) ? 1 : 0); + if (count > 0) + InventoryHelper.spawnItemStack(world, this.getPosX(), this.getPosY(), this.getPosZ(), new ItemStack(BloodMagicItems.SLATE_AMPOULE.get(), count)); + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/event/ItemBindEvent.java b/src/main/java/wayoftime/bloodmagic/event/ItemBindEvent.java new file mode 100644 index 00000000..80e11c1c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/event/ItemBindEvent.java @@ -0,0 +1,39 @@ +package wayoftime.bloodmagic.event; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.eventbus.api.Cancelable; +import net.minecraftforge.eventbus.api.Event; +import wayoftime.bloodmagic.common.item.IBindable; + +@Cancelable +public class ItemBindEvent extends Event +{ + private final PlayerEntity player; + private final ItemStack itemStack; + + /** + * This event is called whenever a player attempts to bind a + * {@link IBindable} item. + * + * @param player The player doing the binding + * @param itemStack The {@link ItemStack} that the player is binding + *

+ * This event is {@link Cancelable}.
+ */ + public ItemBindEvent(PlayerEntity player, ItemStack itemStack) + { + this.player = player; + this.itemStack = itemStack; + } + + public PlayerEntity getNewOwner() + { + return player; + } + + public ItemStack getBindingStack() + { + return itemStack; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/event/LivingEquipmentEvent.java b/src/main/java/wayoftime/bloodmagic/event/LivingEquipmentEvent.java new file mode 100644 index 00000000..82d9e007 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/event/LivingEquipmentEvent.java @@ -0,0 +1,96 @@ +package wayoftime.bloodmagic.event; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraftforge.eventbus.api.Event; +import wayoftime.bloodmagic.core.living.LivingStats; +import wayoftime.bloodmagic.core.living.LivingUpgrade; + +public class LivingEquipmentEvent extends Event +{ + +// public static final Event EXPERIENCE_GAIN = EventFactory.createArrayBacked(OnExperienceGain.class, handlers -> e -> { +// for (OnExperienceGain gain : handlers) if (gain.gainExperience(e) == EventResult.CANCEL) +// return EventResult.CANCEL; +// +// return EventResult.PASS; +// }); +// public static final Event LEVEL_UP = EventFactory.createArrayBacked(OnLevelUp.class, handlers -> e -> { +// for (OnLevelUp levelUp : handlers) levelUp.levelUp(e); +// }); +// +// public interface OnExperienceGain +// { +// EventResult gainExperience(GainExperience event); +// } +// +// public interface OnLevelUp +// { +// void levelUp(LevelUp event); +// } + + private final PlayerEntity player; + private final LivingStats stats; + + private LivingEquipmentEvent(PlayerEntity player, LivingStats stats) + { + this.player = player; + this.stats = stats; + } + + public PlayerEntity getPlayer() + { + return player; + } + + public LivingStats getStats() + { + return stats; + } + + public static class GainExperience extends LivingEquipmentEvent + { + + private final LivingUpgrade upgrade; + private double experience; + + public GainExperience(PlayerEntity player, LivingStats stats, LivingUpgrade upgrade, double experience) + { + super(player, stats); + this.upgrade = upgrade; + this.experience = experience; + } + + public LivingUpgrade getUpgrade() + { + return upgrade; + } + + public double getExperience() + { + return experience; + } + + public void setExperience(double experience) + { + this.experience = experience; + } + } + + public static class LevelUp extends LivingEquipmentEvent + { + + private final LivingUpgrade upgrade; + + public LevelUp(PlayerEntity player, LivingStats stats, LivingUpgrade upgrade) + { + super(player, stats); + + this.upgrade = upgrade; + } + + public LivingUpgrade getUpgrade() + { + return upgrade; + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/event/LivingEvent.java b/src/main/java/wayoftime/bloodmagic/event/LivingEvent.java new file mode 100644 index 00000000..57172317 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/event/LivingEvent.java @@ -0,0 +1,30 @@ +package wayoftime.bloodmagic.event; + +import net.minecraftforge.eventbus.api.Event; + +public class LivingEvent extends Event +{ + +// public static final Event JUMP = EventFactory.createArrayBacked(Jump.class, handlers -> e -> { +// for (Jump handler : handlers) if (handler.onJump(e) == EventResult.CANCEL) +// return EventResult.CANCEL; +// +// return EventResult.PASS; +// }); +// public static final Event DAMAGE = EventFactory.createArrayBacked(Damage.class, handlers -> (e, s, d) -> { +// for (Damage handler : handlers) if (handler.onDamage(e, s, d) == EventResult.CANCEL) +// return EventResult.CANCEL; +// +// return EventResult.PASS; +// }); +// +// public interface Jump +// { +// EventResult onJump(LivingEntity livingEntity); +// } +// +// public interface Damage +// { +// EventResult onDamage(LivingEntity livingEntity, DamageSource source, Value damage); +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/event/RitualEvent.java b/src/main/java/wayoftime/bloodmagic/event/RitualEvent.java new file mode 100644 index 00000000..f5356ec8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/event/RitualEvent.java @@ -0,0 +1,151 @@ +package wayoftime.bloodmagic.event; + +import java.util.UUID; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.eventbus.api.Cancelable; +import net.minecraftforge.eventbus.api.Event; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.imperfect.IImperfectRitualStone; +import wayoftime.bloodmagic.ritual.imperfect.ImperfectRitual; + +public class RitualEvent extends Event +{ + private final IMasterRitualStone mrs; + private final UUID ownerId; + private final Ritual ritual; + + private RitualEvent(IMasterRitualStone mrs, UUID ownerId, Ritual ritual) + { + this.mrs = mrs; + this.ownerId = ownerId; + this.ritual = ritual; + } + + public IMasterRitualStone getRitualStone() + { + return mrs; + } + + public UUID getOwnerId() + { + return ownerId; + } + + public Ritual getRitual() + { + return ritual; + } + + /** + * This event is called when a ritual is activated. If cancelled, it will not + * activate. + *

+ * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, PlayerEntity, Ritual)} + */ + @Cancelable + public static class RitualActivatedEvent extends RitualEvent + { + + private final PlayerEntity player; + private final ItemStack crystalStack; + private final int crystalTier; + + public RitualActivatedEvent(IMasterRitualStone mrs, UUID ownerId, Ritual ritual, PlayerEntity player, ItemStack activationCrystal, int crystalTier) + { + super(mrs, ownerId, ritual); + + this.player = player; + this.crystalStack = activationCrystal; + this.crystalTier = crystalTier; + } + + public PlayerEntity getPlayer() + { + return player; + } + + public ItemStack getCrystalStack() + { + return crystalStack; + } + + public int getCrystalTier() + { + return crystalTier; + } + } + + /** + * This event is called when a Ritual effect is performed. If cancelled, the + * effect will not happen. + *

+ * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, net.minecraft.util.math.BlockPos)} + */ + @Cancelable + public static class RitualRunEvent extends RitualEvent + { + + public RitualRunEvent(IMasterRitualStone mrs, UUID ownerId, Ritual ritual) + { + super(mrs, ownerId, ritual); + } + } + + /** + * This event is called when a Ritual is stopped by a {@link Ritual.BreakType}. + *

+ * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(Ritual.BreakType)} + */ + public static class RitualStopEvent extends RitualEvent + { + + private final Ritual.BreakType method; + + public RitualStopEvent(IMasterRitualStone mrs, UUID ownerId, Ritual ritual, Ritual.BreakType method) + { + super(mrs, ownerId, ritual); + + this.method = method; + } + + public Ritual.BreakType getMethod() + { + return method; + } + } + + @Cancelable + public static class ImperfectRitualActivatedEvent extends Event + { + + private final IImperfectRitualStone ims; + private final PlayerEntity activator; + private final ImperfectRitual imperfectRitual; + + public ImperfectRitualActivatedEvent(IImperfectRitualStone ims, PlayerEntity activator, ImperfectRitual imperfectRitual) + { + this.ims = ims; + this.activator = activator; + this.imperfectRitual = imperfectRitual; + } + + public IImperfectRitualStone getRitualStone() + { + return ims; + } + + public PlayerEntity getActivator() + { + return activator; + } + + public ImperfectRitual getImperfectRitual() + { + return imperfectRitual; + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/event/SacrificeKnifeUsedEvent.java b/src/main/java/wayoftime/bloodmagic/event/SacrificeKnifeUsedEvent.java new file mode 100644 index 00000000..6fc6bbd4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/event/SacrificeKnifeUsedEvent.java @@ -0,0 +1,37 @@ +package wayoftime.bloodmagic.event; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraftforge.eventbus.api.Cancelable; +import net.minecraftforge.eventbus.api.Event; + +@Cancelable +public class SacrificeKnifeUsedEvent extends Event +{ + public final PlayerEntity player; + public final int healthDrained; + public int lpAdded; + public boolean shouldDrainHealth; + public boolean shouldFillAltar; + + /** + * This event is called whenever a player attempts to use a + * {@link WayofTime.bloodmagic.item.ItemSacrificialDagger} to self-sacrifice + * near an altar. + * + * @param player The player doing the sacrificing + * @param shouldDrainHealth Determines whether or not health is lost + * @param shouldFillAltar Determines whether or not an altar should be filled + * @param hp Amount of health lost + * @param lpAdded Amount of LP added to the altar + *

+ * This event is {@link Cancelable}.
+ */ + public SacrificeKnifeUsedEvent(PlayerEntity player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp, int lpAdded) + { + this.player = player; + this.shouldDrainHealth = shouldDrainHealth; + this.shouldFillAltar = shouldFillAltar; + this.healthDrained = hp; + this.lpAdded = lpAdded; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/event/SoulNetworkEvent.java b/src/main/java/wayoftime/bloodmagic/event/SoulNetworkEvent.java new file mode 100644 index 00000000..c4079c4d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/event/SoulNetworkEvent.java @@ -0,0 +1,116 @@ +package wayoftime.bloodmagic.event; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.eventbus.api.Cancelable; +import net.minecraftforge.eventbus.api.Event; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.data.SoulTicket; + +public class SoulNetworkEvent extends Event +{ + private final SoulNetwork network; + private SoulTicket ticket; + + public SoulNetworkEvent(SoulNetwork network, SoulTicket ticket) + { + this.network = network; + this.ticket = ticket; + } + + public SoulNetwork getNetwork() + { + return network; + } + + public SoulTicket getTicket() + { + return ticket; + } + + public void setTicket(SoulTicket ticket) + { + this.ticket = ticket; + } + + @Cancelable + public static class Syphon extends SoulNetworkEvent + { + private boolean shouldDamage; + + public Syphon(SoulNetwork network, SoulTicket ticket) + { + super(network, ticket); + } + + public boolean shouldDamage() + { + return shouldDamage; + } + + public void setShouldDamage(boolean shouldDamage) + { + this.shouldDamage = shouldDamage; + } + + public static class Item extends Syphon + { + + private final ItemStack stack; + + public Item(SoulNetwork network, SoulTicket ticket, ItemStack stack) + { + super(network, ticket); + + this.stack = stack; + } + + public ItemStack getStack() + { + return stack; + } + } + + public static class User extends Syphon + { + + private final PlayerEntity user; + + public User(SoulNetwork network, SoulTicket ticket, PlayerEntity user) + { + super(network, ticket); + + this.user = user; + } + + public PlayerEntity getUser() + { + return user; + } + } + } + + @Cancelable + public static class Fill extends SoulNetworkEvent + { + + private int maximum; + + public Fill(SoulNetwork network, SoulTicket ticket, int maximum) + { + super(network, ticket); + + this.maximum = maximum; + } + + public int getMaximum() + { + return maximum; + } + + public void setMaximum(int maximum) + { + this.maximum = maximum; + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java b/src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java new file mode 100644 index 00000000..80bd8135 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java @@ -0,0 +1,28 @@ +package wayoftime.bloodmagic.gson; + +import java.lang.reflect.Type; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; + +public abstract class SerializerBase implements JsonDeserializer, JsonSerializer +{ + @Override + public T deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + return context.deserialize(json, getType()); + } + + @Override + public JsonElement serialize(T src, Type typeOfSrc, JsonSerializationContext context) + { + return context.serialize(src); + } + + public abstract Class getType(); +} diff --git a/src/main/java/wayoftime/bloodmagic/gson/Serializers.java b/src/main/java/wayoftime/bloodmagic/gson/Serializers.java new file mode 100644 index 00000000..f5546799 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/gson/Serializers.java @@ -0,0 +1,128 @@ +package wayoftime.bloodmagic.gson; + +import java.lang.reflect.Type; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.JsonSerializationContext; + +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraft.network.datasync.DataParameter; +import net.minecraft.network.datasync.DataSerializers; +import net.minecraft.network.datasync.IDataSerializer; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class Serializers +{ + // Data serializers + public static final IDataSerializer WILL_TYPE_SERIALIZER = new IDataSerializer() + { + @Override + public void write(PacketBuffer buf, EnumDemonWillType value) + { + buf.writeEnumValue(value); + } + + @Override + public EnumDemonWillType read(PacketBuffer buf) + { + return buf.readEnumValue(EnumDemonWillType.class); + } + + @Override + public DataParameter createKey(int id) + { + return new DataParameter<>(id, this); + } + + @Override + public EnumDemonWillType copyValue(EnumDemonWillType value) + { + return EnumDemonWillType.valueOf(value.name()); + } + }; + + // Serializers + public static final SerializerBase FACING_SERIALIZER = new SerializerBase() + { + @Override + public Class getType() + { + return Direction.class; + } + + @Override + public Direction deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + return Direction.byName(json.getAsString()); + } + }; + public static final SerializerBase RESOURCELOCATION_SERIALIZER = new SerializerBase() + { + @Override + public Class getType() + { + return ResourceLocation.class; + } + + @Override + public ResourceLocation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + String domain = json.getAsJsonObject().get("domain").getAsString(); + String path = json.getAsJsonObject().get("path").getAsString(); + return new ResourceLocation(domain, path); + } + + @Override + public JsonElement serialize(ResourceLocation src, Type typeOfSrc, JsonSerializationContext context) + { + JsonObject object = new JsonObject(); + object.addProperty("domain", src.getNamespace()); + object.addProperty("path", src.getPath()); + return object; + } + }; + public static final SerializerBase ITEMMETA_SERIALIZER = new SerializerBase() + { + @Override + public Class getType() + { + return ItemStack.class; + } + + @Override + public ItemStack deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + ResourceLocation registryName = context.deserialize(json.getAsJsonObject().get("registryName").getAsJsonObject(), ResourceLocation.class); + int meta = json.getAsJsonObject().get("meta").getAsInt(); + return new ItemStack(ForgeRegistries.ITEMS.getValue(registryName), 1); + } + + @Override + public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) + { + JsonObject jsonObject = new JsonObject(); + jsonObject.add("registryName", context.serialize(src.getItem().getRegistryName())); + jsonObject.addProperty("meta", src.getDamage()); + return jsonObject; + } + }; + + public static final Gson GSON = new GsonBuilder().serializeNulls().setPrettyPrinting().disableHtmlEscaping().registerTypeAdapter(FACING_SERIALIZER.getType(), FACING_SERIALIZER).registerTypeAdapter(RESOURCELOCATION_SERIALIZER.getType(), RESOURCELOCATION_SERIALIZER).registerTypeAdapter(ITEMMETA_SERIALIZER.getType(), ITEMMETA_SERIALIZER).create(); + + static + { + DataSerializers.registerSerializer(WILL_TYPE_SERIALIZER); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/impl/BloodMagicAPI.java b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicAPI.java new file mode 100644 index 00000000..2b4b1143 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicAPI.java @@ -0,0 +1,114 @@ +package wayoftime.bloodmagic.impl; + +import java.util.List; +import java.util.function.Predicate; + +import javax.annotation.Nonnull; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import wayoftime.bloodmagic.altar.ComponentType; +import wayoftime.bloodmagic.api.IBloodMagicAPI; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.incense.EnumTranquilityType; +import wayoftime.bloodmagic.incense.IncenseTranquilityRegistry; +import wayoftime.bloodmagic.incense.TranquilityStack; +import wayoftime.bloodmagic.util.BMLog; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +public class BloodMagicAPI implements IBloodMagicAPI +{ + + public static final BloodMagicAPI INSTANCE = new BloodMagicAPI(); + + private final BloodMagicBlacklist blacklist; + private final BloodMagicRecipeRegistrar recipeRegistrar; + private final BloodMagicValueManager valueManager; + private final Multimap altarComponents; + + public BloodMagicAPI() + { + this.blacklist = new BloodMagicBlacklist(); + this.recipeRegistrar = new BloodMagicRecipeRegistrar(); + this.valueManager = new BloodMagicValueManager(); + this.altarComponents = ArrayListMultimap.create(); + } + + @Nonnull + @Override + public BloodMagicBlacklist getBlacklist() + { + return blacklist; + } + + @Nonnull + public BloodMagicRecipeRegistrar getRecipeRegistrar() + { + return recipeRegistrar; + } + +// + @Nonnull + @Override + public BloodMagicValueManager getValueManager() + { + return valueManager; + } + + @Override + public void registerAltarComponent(@Nonnull BlockState state, @Nonnull String componentType) + { + ComponentType component = ComponentType.getType(componentType); + + if (component != null) + { + BMLog.API_VERBOSE.info("Registered {} as a {} altar component.", state, componentType); + altarComponents.put(component, state); + } else + BMLog.API.warn("Invalid Altar component type: {}.", componentType); + } + + @Override + public void unregisterAltarComponent(@Nonnull BlockState state, @Nonnull String componentType) + { + ComponentType component = ComponentType.getType(componentType); + + if (component != null) + { + BMLog.API_VERBOSE.info("Unregistered {} from being a {} altar component.", state, componentType); + altarComponents.remove(component, state); + } else + BMLog.API.warn("Invalid Altar component type: {}.", componentType); + } + + @Override + public void registerTranquilityHandler(@Nonnull Predicate blockState, @Nonnull String tranquilityType, double value) + { + EnumTranquilityType type = EnumTranquilityType.getType(tranquilityType); + + if (type != null) + { + IncenseTranquilityRegistry.registerTranquilityHandler((world, pos, block, state) -> blockState.test(state) + ? new TranquilityStack(type, value) + : null); + } else + { + BMLog.API.warn("Invalid Tranquility type: {}.", tranquilityType); + } + } + + @Override + public double getTotalDemonWill(String willType, PlayerEntity player) + { + return PlayerDemonWillHandler.getTotalDemonWill(EnumDemonWillType.getType(willType), player); + } + + @Nonnull + public List getComponentStates(ComponentType component) + { + return (List) altarComponents.get(component); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/impl/BloodMagicBlacklist.java b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicBlacklist.java new file mode 100644 index 00000000..e9d5d81b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicBlacklist.java @@ -0,0 +1,125 @@ +package wayoftime.bloodmagic.impl; + +import java.util.Set; + +import javax.annotation.Nonnull; + +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.api.IBloodMagicBlacklist; +import wayoftime.bloodmagic.util.BMLog; + +public class BloodMagicBlacklist implements IBloodMagicBlacklist +{ + + private final Set teleposer; + private final Set teleposerEntities; + private final Set transposition; + private final Set greenGrove; + private final Set sacrifice; + + public BloodMagicBlacklist() + { + this.teleposer = Sets.newHashSet(); + this.teleposerEntities = Sets.newHashSet(); + this.transposition = Sets.newHashSet(); + this.greenGrove = Sets.newHashSet(); + this.sacrifice = Sets.newHashSet(); + } + + @Override + public void addTeleposer(@Nonnull BlockState state) + { + if (!teleposer.contains(state)) + { + BMLog.API_VERBOSE.info("Blacklist: Added {} to the Teleposer blacklist.", state); + teleposer.add(state); + } + } + + public void addTeleposer(@Nonnull Block block) + { + for (BlockState state : block.getStateContainer().getValidStates()) addTeleposer(state); + } + + @Override + public void addTeleposer(@Nonnull ResourceLocation entityId) + { + if (!teleposerEntities.contains(entityId)) + { + BMLog.API_VERBOSE.info("Blacklist: Added {} to the Teleposer blacklist.", entityId); + teleposerEntities.add(entityId); + } + } + + @Override + public void addTransposition(@Nonnull BlockState state) + { + if (!transposition.contains(state)) + { + BMLog.API_VERBOSE.info("Blacklist: Added {} to the Transposition blacklist.", state); + transposition.add(state); + } + } + + public void addTransposition(@Nonnull Block block) + { + for (BlockState state : block.getStateContainer().getValidStates()) addTransposition(state); + } + + @Override + public void addGreenGrove(@Nonnull BlockState state) + { + if (!greenGrove.contains(state)) + { + BMLog.API_VERBOSE.info("Blacklist: Added {} to the Green Grove blacklist.", state); + greenGrove.add(state); + } + } + + public void addGreenGrove(@Nonnull Block block) + { + for (BlockState state : block.getStateContainer().getValidStates()) addGreenGrove(state); + } + + @Override + public void addWellOfSuffering(@Nonnull ResourceLocation entityId) + { + if (!sacrifice.contains(entityId)) + { + BMLog.API_VERBOSE.info("Blacklist: Added {} to the Well of Suffering blacklist.", entityId); + sacrifice.add(entityId); + } + } + + // Internal use getters + + public Set getTeleposer() + { + return ImmutableSet.copyOf(teleposer); + } + + public Set getTeleposerEntities() + { + return ImmutableSet.copyOf(teleposerEntities); + } + + public Set getTransposition() + { + return ImmutableSet.copyOf(transposition); + } + + public Set getGreenGrove() + { + return ImmutableSet.copyOf(greenGrove); + } + + public Set getSacrifice() + { + return ImmutableSet.copyOf(sacrifice); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/impl/BloodMagicCorePlugin.java b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicCorePlugin.java new file mode 100644 index 00000000..20d58bb1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicCorePlugin.java @@ -0,0 +1,60 @@ +package wayoftime.bloodmagic.impl; + +import net.minecraft.block.Blocks; +import net.minecraft.block.FireBlock; +import net.minecraft.block.GrassBlock; +import net.minecraft.block.LeavesBlock; +import net.minecraft.tags.BlockTags; +import wayoftime.bloodmagic.altar.ComponentType; +import wayoftime.bloodmagic.api.IBloodMagicAPI; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.incense.EnumTranquilityType; +import wayoftime.bloodmagic.incense.IncenseTranquilityRegistry; +import wayoftime.bloodmagic.incense.TranquilityStack; + +public class BloodMagicCorePlugin +{ + public static final BloodMagicCorePlugin INSTANCE = new BloodMagicCorePlugin(); + + public void register(IBloodMagicAPI apiInterface) + { + BloodMagicAPI api = (BloodMagicAPI) apiInterface; + api.getValueManager().setTranquility(Blocks.LAVA, new TranquilityStack(EnumTranquilityType.LAVA, 1.2D)); +// api.getValueManager().setTranquility(Blocks.FLOWING_LAVA, new TranquilityStack(EnumTranquilityType.LAVA, 1.2D)); + api.getValueManager().setTranquility(Blocks.WATER, new TranquilityStack(EnumTranquilityType.WATER, 1.0D)); +// api.getValueManager().setTranquility(Blocks.water, new TranquilityStack(EnumTranquilityType.WATER, 1.0D)); + api.getValueManager().setTranquility(BloodMagicBlocks.LIFE_ESSENCE_BLOCK.get(), new TranquilityStack(EnumTranquilityType.WATER, 1.5D)); + api.getValueManager().setTranquility(Blocks.NETHERRACK, new TranquilityStack(EnumTranquilityType.FIRE, 0.5D)); + api.getValueManager().setTranquility(Blocks.DIRT, new TranquilityStack(EnumTranquilityType.EARTHEN, 0.25D)); + api.getValueManager().setTranquility(Blocks.FARMLAND, new TranquilityStack(EnumTranquilityType.EARTHEN, 1.0D)); + api.getValueManager().setTranquility(Blocks.POTATOES, new TranquilityStack(EnumTranquilityType.CROP, 1.0D)); + api.getValueManager().setTranquility(Blocks.CARROTS, new TranquilityStack(EnumTranquilityType.CROP, 1.0D)); + api.getValueManager().setTranquility(Blocks.WHEAT, new TranquilityStack(EnumTranquilityType.CROP, 1.0D)); + api.getValueManager().setTranquility(Blocks.NETHER_WART, new TranquilityStack(EnumTranquilityType.CROP, 1.0D)); + api.getValueManager().setTranquility(Blocks.BEETROOTS, new TranquilityStack(EnumTranquilityType.CROP, 1.0D)); + + apiInterface.registerTranquilityHandler(state -> state.getBlock() instanceof LeavesBlock, EnumTranquilityType.PLANT.name(), 1.0D); + apiInterface.registerTranquilityHandler(state -> state.getBlock() instanceof FireBlock, EnumTranquilityType.FIRE.name(), 1.0D); + apiInterface.registerTranquilityHandler(state -> state.getBlock() instanceof GrassBlock, EnumTranquilityType.EARTHEN.name(), 0.5D); + apiInterface.registerTranquilityHandler(state -> BlockTags.LOGS.contains(state.getBlock()), EnumTranquilityType.TREE.name(), 1.0D); + + IncenseTranquilityRegistry.registerTranquilityHandler((world, pos, block, state) -> BloodMagicAPI.INSTANCE.getValueManager().getTranquility().get(state)); + + apiInterface.registerAltarComponent(Blocks.GLOWSTONE.getDefaultState(), ComponentType.GLOWSTONE.name()); + apiInterface.registerAltarComponent(Blocks.SEA_LANTERN.getDefaultState(), ComponentType.GLOWSTONE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.BLOODSTONE.get().getDefaultState(), ComponentType.BLOODSTONE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.BLOODSTONE_BRICK.get().getDefaultState(), ComponentType.BLOODSTONE.name()); + apiInterface.registerAltarComponent(Blocks.BEACON.getDefaultState(), ComponentType.BEACON.name()); + + apiInterface.registerAltarComponent(BloodMagicBlocks.BLANK_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.SPEED_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.SACRIFICE_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.SELF_SACRIFICE_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.DISPLACEMENT_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.CAPACITY_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.AUGMENTED_CAPACITY_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.ORB_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.ACCELERATION_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + apiInterface.registerAltarComponent(BloodMagicBlocks.CHARGING_RUNE.get().getDefaultState(), ComponentType.BLOODRUNE.name()); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/impl/BloodMagicRecipeRegistrar.java b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicRecipeRegistrar.java new file mode 100644 index 00000000..ee31e7b1 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicRecipeRegistrar.java @@ -0,0 +1,231 @@ +package wayoftime.bloodmagic.impl; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import org.apache.commons.lang3.tuple.Pair; + +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableSet; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.recipe.RecipeAlchemyArray; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.recipe.RecipeBloodAltar; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; + +public class BloodMagicRecipeRegistrar +{ + @Nullable + public RecipeBloodAltar getBloodAltar(World world, @Nonnull ItemStack input) + { + Preconditions.checkNotNull(input, "input cannot be null."); + if (input.isEmpty()) + return null; + + List altarRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ALTAR); + + for (RecipeBloodAltar recipe : altarRecipes) if (recipe.getInput().test(input)) + return recipe; + + return null; + } + + public RecipeARC getARC(World world, @Nonnull ItemStack input, @Nonnull ItemStack arcToolInput, @Nonnull FluidStack inputFluid) + { + Preconditions.checkNotNull(input, "input cannot be null."); + Preconditions.checkNotNull(arcToolInput, "tool cannot be null."); + if (input.isEmpty() || arcToolInput.isEmpty()) + return null; + + List arcRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ARC); + + for (RecipeARC recipe : arcRecipes) + { + if (recipe.getInput().test(input) && recipe.getTool().test(arcToolInput)) + { + if (recipe.getFluidIngredient() == null) + { + return recipe; + } else if (recipe.getFluidIngredient().test(inputFluid)) + { + return recipe; + } + } + } + +// if (input.isEmpty()) +// return null; +// +// List altarRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ALTAR); +// +// for (RecipeBloodAltar recipe : altarRecipes) if (recipe.getInput().test(input)) +// return recipe; + + return null; + } + + @Nullable + public RecipeAlchemyTable getAlchemyTable(World world, @Nonnull List input) + { + Preconditions.checkNotNull(input, "input cannot be null."); + if (input.isEmpty()) + return null; + + List tartaricForgeRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ALCHEMYTABLE); + mainLoop: for (RecipeAlchemyTable recipe : tartaricForgeRecipes) + { + if (recipe.getInput().size() != input.size()) + continue; + + List recipeInput = new ArrayList<>(recipe.getInput()); + + for (int i = 0; i < input.size(); i++) + { + boolean matched = false; + for (int j = 0; j < recipeInput.size(); j++) + { + Ingredient ingredient = recipeInput.get(j); + if (ingredient.test(input.get(i))) + { + matched = true; + recipeInput.remove(j); + break; + } + } + + if (!matched) + continue mainLoop; + } + + return recipe; + } + + return null; + } + + @Nullable + public RecipeTartaricForge getTartaricForge(World world, @Nonnull List input) + { + Preconditions.checkNotNull(input, "input cannot be null."); + if (input.isEmpty()) + return null; + + List tartaricForgeRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.TARTARICFORGE); + mainLoop: for (RecipeTartaricForge recipe : tartaricForgeRecipes) + { + if (recipe.getInput().size() != input.size()) + continue; + + List recipeInput = new ArrayList<>(recipe.getInput()); + + for (int i = 0; i < input.size(); i++) + { + boolean matched = false; + for (int j = 0; j < recipeInput.size(); j++) + { + Ingredient ingredient = recipeInput.get(j); + if (ingredient.test(input.get(i))) + { + matched = true; + recipeInput.remove(j); + break; + } + } + + if (!matched) + continue mainLoop; + } + + return recipe; + } + + return null; + } + + /** + * + * @param world + * @param input + * @param catalyst + * @return If false and the recipe is nonnull, it is a partial match. If true, + * the returned recipe is a full match. + */ + @Nullable + public Pair getAlchemyArray(World world, @Nonnull ItemStack input, @Nonnull ItemStack catalyst) + { + Preconditions.checkNotNull(input, "input cannot be null."); + if (input.isEmpty()) + return null; + + List altarRecipes = world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ARRAY); + + RecipeAlchemyArray partialMatch = null; + for (RecipeAlchemyArray recipe : altarRecipes) + { + if (recipe.getBaseInput().test(input)) + { + if (recipe.getAddedInput().test(catalyst)) + { + return Pair.of(true, recipe); + } else if (partialMatch == null) + { + partialMatch = recipe; + } + } + } + + return Pair.of(false, partialMatch); + } + + public Set getAltarRecipes(World world) + { + return ImmutableSet.copyOf(world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ALTAR)); + } + + public Set getTartaricForgeRecipes(World world) + { + return ImmutableSet.copyOf(world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.TARTARICFORGE)); + } + + public Set getAlchemyArrayRecipes(World world) + { + return ImmutableSet.copyOf(world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ARRAY)); + } + + public Set getARCRecipes(World world) + { + return ImmutableSet.copyOf(world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ARC)); + } + + public Set getAlchemyTableRecipes(World world) + { + return ImmutableSet.copyOf(world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ALCHEMYTABLE)); + } + + public Set getCraftingAlchemyArrayRecipes(World world) + { + Set recipes = new HashSet(world.getRecipeManager().getRecipesForType(BloodMagicRecipeType.ARRAY)); + + Set copyRecipes = new HashSet(); + for (RecipeAlchemyArray recipe : recipes) + { + if (!recipe.getOutput().isEmpty()) + { + copyRecipes.add(recipe); + } + } + + return copyRecipes; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/impl/BloodMagicValueManager.java b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicValueManager.java new file mode 100644 index 00000000..da7d6cd5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/impl/BloodMagicValueManager.java @@ -0,0 +1,76 @@ +package wayoftime.bloodmagic.impl; + +import java.util.Map; + +import javax.annotation.Nonnull; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.api.IBloodMagicValueManager; +import wayoftime.bloodmagic.incense.EnumTranquilityType; +import wayoftime.bloodmagic.incense.TranquilityStack; +import wayoftime.bloodmagic.util.BMLog; + +public class BloodMagicValueManager implements IBloodMagicValueManager +{ + + private final Map sacrificial; + private final Map tranquility; + + public BloodMagicValueManager() + { + this.sacrificial = Maps.newHashMap(); + this.tranquility = Maps.newHashMap(); + } + + @Override + public void setSacrificialValue(@Nonnull ResourceLocation entityId, int value) + { + BMLog.API_VERBOSE.info("Value Manager: Set sacrificial value of {} to {}.", entityId, value); + sacrificial.put(entityId, value); + } + + @Override + public void setTranquility(@Nonnull BlockState state, @Nonnull String tranquilityType, double value) + { + EnumTranquilityType tranquility = null; + for (EnumTranquilityType type : EnumTranquilityType.values()) + { + if (type.name().equalsIgnoreCase(tranquilityType)) + { + tranquility = type; + break; + } + } + + if (tranquility != null) + { + BMLog.API_VERBOSE.info("Value Manager: Set tranquility value of {} to {} @ {}", state, tranquilityType, value); + this.tranquility.put(state, new TranquilityStack(tranquility, value)); + } else + BMLog.API.warn("Invalid tranquility type: {}.", tranquilityType); + } + + public void setTranquility(Block block, TranquilityStack tranquilityStack) + { + for (BlockState state : block.getStateContainer().getValidStates()) + { + BMLog.API_VERBOSE.info("Value Manager: Set tranquility value of {} to {} @ {}", state, tranquilityStack.type, tranquilityStack.value); + tranquility.put(state, tranquilityStack); + } + } + + public Map getSacrificial() + { + return ImmutableMap.copyOf(sacrificial); + } + + public Map getTranquility() + { + return ImmutableMap.copyOf(tranquility); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/incense/EnumTranquilityType.java b/src/main/java/wayoftime/bloodmagic/incense/EnumTranquilityType.java new file mode 100644 index 00000000..4c1dc495 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/incense/EnumTranquilityType.java @@ -0,0 +1,25 @@ +package wayoftime.bloodmagic.incense; + +public enum EnumTranquilityType +{ + PLANT(), + CROP(), + TREE(), + EARTHEN(), + WATER(), + FIRE(), + LAVA(),; + + public static EnumTranquilityType getType(String type) + { + for (EnumTranquilityType t : values()) + { + if (t.name().equalsIgnoreCase(type)) + { + return t; + } + } + + return null; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/incense/ITranquilityHandler.java b/src/main/java/wayoftime/bloodmagic/incense/ITranquilityHandler.java new file mode 100644 index 00000000..e0b8d7c0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/incense/ITranquilityHandler.java @@ -0,0 +1,14 @@ +package wayoftime.bloodmagic.incense; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +/** + * This is a functional interface to return the TranquilityStack of a certain Block type + */ +public interface ITranquilityHandler +{ + TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, BlockState state); +} diff --git a/src/main/java/wayoftime/bloodmagic/incense/IncenseAltarComponent.java b/src/main/java/wayoftime/bloodmagic/incense/IncenseAltarComponent.java new file mode 100644 index 00000000..2bceb3f5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/incense/IncenseAltarComponent.java @@ -0,0 +1,60 @@ +package wayoftime.bloodmagic.incense; + +import net.minecraft.block.Block; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; + +public class IncenseAltarComponent +{ + public final BlockPos offsetPos; + public final Block block; + + public IncenseAltarComponent(BlockPos offsetPos, Block block) + { + this.offsetPos = offsetPos; + this.block = block; + } + + public boolean doesBlockMatch(Block block) + { + return this.block == block; + } + + /** + * Base rotation is north. + */ + public BlockPos getOffset(Direction rotation) + { + return new BlockPos(this.getX(rotation), offsetPos.getY(), this.getZ(rotation)); + } + + public int getX(Direction direction) + { + switch (direction) + { + case EAST: + return -this.offsetPos.getZ(); + case SOUTH: + return -this.offsetPos.getX(); + case WEST: + return this.offsetPos.getZ(); + default: + return this.offsetPos.getX(); + } + } + + public int getZ(Direction direction) + { + switch (direction) + { + case EAST: + return this.offsetPos.getX(); + case SOUTH: + return -this.offsetPos.getZ(); + case WEST: + return -this.offsetPos.getX(); + default: + return this.offsetPos.getZ(); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/incense/IncenseAltarHandler.java b/src/main/java/wayoftime/bloodmagic/incense/IncenseAltarHandler.java new file mode 100644 index 00000000..eb68885f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/incense/IncenseAltarHandler.java @@ -0,0 +1,114 @@ +package wayoftime.bloodmagic.incense; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class IncenseAltarHandler +{ + public static Map> incenseComponentMap = new TreeMap<>(); + // Incense bonus maximum applied for the tier of blocks. + public static double[] incenseBonuses = new double[] { 0.2, 0.6, 1.2, 2, 3, 4.5 }; + public static double[] tranquilityRequired = new double[] { 0, 6, 14.14, 28, 44.09, 83.14 }; + public static int[] roadsRequired = new int[] { 0, 1, 4, 6, 8, 10, 12 }; // TODO: Change for when the roads are + // fully implemented + + public static void registerIncenseComponent(int altarLevel, IncenseAltarComponent component) + { + if (incenseComponentMap.containsKey(altarLevel)) + { + incenseComponentMap.get(altarLevel).add(component); + } else + { + List list = new ArrayList<>(); + list.add(component); + incenseComponentMap.put(altarLevel, list); + } + } + + public static void registerIncenseComponent(int altarLevel, BlockPos offsetPos, Block block, BlockState state) + { + registerIncenseComponent(altarLevel, new IncenseAltarComponent(offsetPos, block)); + } + + public static double getMaxIncenseBonusFromComponents(World world, BlockPos pos) + { + double accumulatedBonus = 0; + for (int i = 0; i < incenseBonuses.length; i++) + { + double previousBonus = (i <= 0 ? 0 : incenseBonuses[i - 1]); + double nextBonus = incenseBonuses[i]; + if (!incenseComponentMap.containsKey(i)) + { + accumulatedBonus += (nextBonus - previousBonus); + } else + { + boolean hasAllComponentsThisTier = true; + for (IncenseAltarComponent component : incenseComponentMap.get(i)) + { + BlockPos offsetPos = pos.add(component.getOffset(Direction.NORTH)); + BlockState state = world.getBlockState(offsetPos); + Block block = state.getBlock(); + if (component.doesBlockMatch(block)) + { + hasAllComponentsThisTier = false; + } else + { + accumulatedBonus += (nextBonus - previousBonus) / incenseComponentMap.get(i).size(); + } + } + + if (!hasAllComponentsThisTier) + { + break; + } + } + } + + return accumulatedBonus; + } + + public static double getMaxIncenseBonusFromRoads(int roads) + { + double previousBonus = 0; + for (int i = 0; i < incenseBonuses.length; i++) + { + if (roads >= roadsRequired[i]) + { + previousBonus = incenseBonuses[i]; + } else + { + return previousBonus; + } + } + + return previousBonus; + } + + public static double getIncenseBonusFromComponents(World world, BlockPos pos, double tranquility, int roads) + { + double maxBonus = Math.min(getMaxIncenseBonusFromComponents(world, pos), getMaxIncenseBonusFromRoads(roads)); + double possibleBonus = 0; + + for (int i = 0; i < incenseBonuses.length; i++) + { + if (tranquility >= tranquilityRequired[i]) + { + possibleBonus = incenseBonuses[i]; + } else if (i >= 1) + { + possibleBonus += (incenseBonuses[i] - possibleBonus) * (tranquility - tranquilityRequired[i - 1]) / (tranquilityRequired[i] - tranquilityRequired[i - 1]); + break; + } + } + + return Math.min(maxBonus, possibleBonus); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/incense/IncenseTranquilityRegistry.java b/src/main/java/wayoftime/bloodmagic/incense/IncenseTranquilityRegistry.java new file mode 100644 index 00000000..86fe5f01 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/incense/IncenseTranquilityRegistry.java @@ -0,0 +1,33 @@ +package wayoftime.bloodmagic.incense; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class IncenseTranquilityRegistry +{ + public static List handlerList = new ArrayList<>(); + + public static void registerTranquilityHandler(ITranquilityHandler handler) + { + handlerList.add(handler); + } + + public static TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, BlockState state) + { + for (ITranquilityHandler handler : handlerList) + { + TranquilityStack tranq = handler.getTranquilityOfBlock(world, pos, block, state); + if (tranq != null) + { + return tranq; + } + } + + return null; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/incense/TranquilityStack.java b/src/main/java/wayoftime/bloodmagic/incense/TranquilityStack.java new file mode 100644 index 00000000..470f7b81 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/incense/TranquilityStack.java @@ -0,0 +1,16 @@ +package wayoftime.bloodmagic.incense; + +/** + * Holds the tranquility type and value for valid tranquility modifiers + */ +public class TranquilityStack +{ + public final EnumTranquilityType type; + public double value; + + public TranquilityStack(EnumTranquilityType type, double value) + { + this.type = type; + this.value = value; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/loot/BloodMagicLootConditions.java b/src/main/java/wayoftime/bloodmagic/loot/BloodMagicLootConditions.java new file mode 100644 index 00000000..6e322b92 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/loot/BloodMagicLootConditions.java @@ -0,0 +1,16 @@ +package wayoftime.bloodmagic.loot; + +import net.minecraft.loot.LootConditionType; +import net.minecraft.loot.conditions.MatchTool; +import net.minecraft.util.registry.Registry; +import wayoftime.bloodmagic.BloodMagic; + +public class BloodMagicLootConditions +{ + public static final LootConditionType INVERTED = Registry.register(Registry.LOOT_CONDITION_TYPE, BloodMagic.rl("testing"), new LootConditionType(new MatchTool.Serializer())); + + static + { + + } +} diff --git a/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java b/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java new file mode 100644 index 00000000..d2762d38 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java @@ -0,0 +1,302 @@ +package wayoftime.bloodmagic.loot; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonObject; + +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.enchantment.Enchantments; +import net.minecraft.inventory.Inventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameterSets; +import net.minecraft.loot.LootParameters; +import net.minecraft.loot.LootTable; +import net.minecraft.loot.conditions.ILootCondition; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.loot.GlobalLootModifierSerializer; +import net.minecraftforge.common.loot.LootModifier; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.core.AnointmentRegistrar; + +public class GlobalLootModifier +{ + public static final DeferredRegister> GLM = DeferredRegister.create(ForgeRegistries.LOOT_MODIFIER_SERIALIZERS, BloodMagic.MODID); + public static final RegistryObject SILKTOUCH = GLM.register("silk_touch_bamboo", SilkTouchTestModifier.Serializer::new); + public static final RegistryObject FORTUNE = GLM.register("fortune", FortuneModifier.Serializer::new); + public static final RegistryObject LOOTING = GLM.register("looting", LootingModifier.Serializer::new); + public static final RegistryObject SMELT = GLM.register("smelt", SmeltingModifier.Serializer::new); + + private static class SilkTouchTestModifier extends LootModifier + { + public SilkTouchTestModifier(ILootCondition[] conditionsIn) + { + super(conditionsIn); +// System.out.println("Registering silk touch modifier"); + } + + @Nonnull + @Override + public List doApply(List generatedLoot, LootContext context) + { +// System.out.println("Testing to see if we gotta check it~"); + ItemStack ctxTool = context.get(LootParameters.TOOL); + // return early if silk-touch is already applied (otherwise we'll get stuck in + // an infinite loop). + if (EnchantmentHelper.getEnchantments(ctxTool).containsKey(Enchantments.SILK_TOUCH)) + return generatedLoot; + AnointmentHolder holder = AnointmentHolder.fromItemStack(ctxTool); + if (holder == null || holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) <= 0) + { + return generatedLoot; + } + ItemStack fakeTool = ctxTool.copy(); + fakeTool.addEnchantment(Enchantments.SILK_TOUCH, 1); + LootContext.Builder builder = new LootContext.Builder(context); + builder.withParameter(LootParameters.TOOL, fakeTool); + LootContext ctx = builder.build(LootParameterSets.BLOCK); + LootTable loottable = context.getWorld().getServer().getLootTableManager().getLootTableFromLocation(context.get(LootParameters.BLOCK_STATE).getBlock().getLootTable()); + return loottable.generate(ctx); + } + + private static class Serializer extends GlobalLootModifierSerializer + { + @Override + public SilkTouchTestModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) + { + return new SilkTouchTestModifier(conditionsIn); + } + + @Override + public JsonObject write(SilkTouchTestModifier instance) + { + return makeConditions(instance.conditions); + } + } + } + + private static class FortuneModifier extends LootModifier + { + public FortuneModifier(ILootCondition[] conditionsIn) + { + super(conditionsIn); +// System.out.println("Registering silk touch modifier"); + } + +// List bufferList = new ArrayList(); + + @Nonnull + @Override + public List doApply(List generatedLoot, LootContext context) + { + ItemStack ctxTool = context.get(LootParameters.TOOL); + // return early if silk-touch is already applied (otherwise we'll get stuck in + // an infinite loop). + if (ctxTool.getTag() != null && ctxTool.getTag().getBoolean("bloodmagic:checked_fortune")) + { + return generatedLoot; + } + + if (EnchantmentHelper.getEnchantments(ctxTool).containsKey(Enchantments.SILK_TOUCH)) + return generatedLoot; + AnointmentHolder holder = AnointmentHolder.fromItemStack(ctxTool); + if (holder == null) + { + return generatedLoot; + } + + int additionalFortune = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_FORTUNE.get()); + if (additionalFortune <= 0) + { + return generatedLoot; + } + +// if (holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) > 0) +// { +// return generatedLoot; +// } + + ItemStack fakeTool = ctxTool.copy(); + fakeTool.getOrCreateTag().putBoolean("bloodmagic:checked_fortune", true); + int baseFortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, ctxTool); + + fakeTool.addEnchantment(Enchantments.FORTUNE, baseFortuneLevel + additionalFortune); + LootContext.Builder builder = new LootContext.Builder(context); + builder.withParameter(LootParameters.TOOL, fakeTool); + LootContext ctx = builder.build(LootParameterSets.BLOCK); + LootTable loottable = context.getWorld().getServer().getLootTableManager().getLootTableFromLocation(context.get(LootParameters.BLOCK_STATE).getBlock().getLootTable()); + return loottable.generate(ctx); + } + + private static class Serializer extends GlobalLootModifierSerializer + { + @Override + public FortuneModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) + { + return new FortuneModifier(conditionsIn); + } + + @Override + public JsonObject write(FortuneModifier instance) + { + return makeConditions(instance.conditions); + } + } + } + + private static class LootingModifier extends LootModifier + { + public LootingModifier(ILootCondition[] conditionsIn) + { + super(conditionsIn); + } + + @Nonnull + @Override + public List doApply(List generatedLoot, LootContext context) + { +// System.out.println("Checking for looting"); +// Entity killerEntity = context.get(LootParameters.KILLER_ENTITY); +// if (!(killerEntity instanceof PlayerEntity)) +// { + return generatedLoot; +// } +// Entity killedEntity = context.get(LootParameters.THIS_ENTITY); +// if (!(killedEntity instanceof LivingEntity)) +// { +// return generatedLoot; +// } +// ItemStack ctxTool = ((PlayerEntity) killerEntity).getHeldItemMainhand(); +// // return early if silk-touch is already applied (otherwise we'll get stuck in +// // an infinite loop). +// +// System.out.println("Checking looting. ItemStack context: "); +//// EndermanEntity d; +// if (ctxTool.getTag() != null && ctxTool.getTag().getBoolean("bloodmagic:checked_looting")) +// { +// return generatedLoot; +// } +// +// if (EnchantmentHelper.getEnchantments(ctxTool).containsKey(Enchantments.SILK_TOUCH)) +// return generatedLoot; +// AnointmentHolder holder = AnointmentHolder.fromItemStack(ctxTool); +// if (holder == null) +// { +// return generatedLoot; +// } +// +// int additionalLooting = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_LOOTING.get()) * 20; +// if (additionalLooting <= 0) +// { +// return generatedLoot; +// } +// +//// if (holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) > 0) +//// { +//// return generatedLoot; +//// } +// +// ItemStack fakeTool = ctxTool.copy(); +// fakeTool.getOrCreateTag().putBoolean("bloodmagic:checked_looting", true); +// int baseLootingLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, ctxTool); +// +// fakeTool.addEnchantment(Enchantments.LOOTING, baseLootingLevel + additionalLooting); +// LootContext.Builder builder = new LootContext.Builder(context); +// builder.withParameter(LootParameters.TOOL, fakeTool); +// LootContext ctx = builder.build(LootParameterSets.ENTITY); +// ResourceLocation resource = ((LivingEntity) killedEntity).getLootTableResourceLocation(); +// LootTable loottable = context.getWorld().getServer().getLootTableManager().getLootTableFromLocation(resource); +// return loottable.generate(ctx); + } + + private static class Serializer extends GlobalLootModifierSerializer + { + @Override + public LootingModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) + { + return new LootingModifier(conditionsIn); + } + + @Override + public JsonObject write(LootingModifier instance) + { + return makeConditions(instance.conditions); + } + } + +// private static class ExtendedLootContext extends LootContext +// { +// public ExtendedLootContext() +// { +// +// } +// } + } + + private static class SmeltingModifier extends LootModifier + { + public SmeltingModifier(ILootCondition[] conditionsIn) + { + super(conditionsIn); + } + + @Nonnull + @Override + public List doApply(List generatedLoot, LootContext context) + { + ItemStack ctxTool = context.get(LootParameters.TOOL); + // return early if silk-touch is already applied (otherwise we'll get stuck in + // an infinite loop). + if (ctxTool.getTag() == null) + { + return generatedLoot; + } + + AnointmentHolder holder = AnointmentHolder.fromItemStack(ctxTool); + if (holder == null) + { + return generatedLoot; + } + + int smeltingLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SMELTING.get()); + if (smeltingLevel <= 0) + { + return generatedLoot; + } + + ArrayList ret = new ArrayList(); + generatedLoot.forEach((stack) -> ret.add(smelt(stack, context))); + return ret; + } + + private static ItemStack smelt(ItemStack stack, LootContext context) + { + return context.getWorld().getRecipeManager().getRecipe(IRecipeType.SMELTING, new Inventory(stack), context.getWorld()).map(FurnaceRecipe::getRecipeOutput).filter(itemStack -> !itemStack.isEmpty()).map(itemStack -> ItemHandlerHelper.copyStackWithSize(itemStack, stack.getCount() * itemStack.getCount())).orElse(stack); + } + + private static class Serializer extends GlobalLootModifierSerializer + { + @Override + public SmeltingModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) + { + return new SmeltingModifier(conditionsIn); + } + + @Override + public JsonObject write(SmeltingModifier instance) + { + return makeConditions(instance.conditions); + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/network/ARCTanksPacket.java b/src/main/java/wayoftime/bloodmagic/network/ARCTanksPacket.java new file mode 100644 index 00000000..60be5d5c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/ARCTanksPacket.java @@ -0,0 +1,72 @@ +package wayoftime.bloodmagic.network; + +import java.util.function.Supplier; + +import net.minecraft.client.Minecraft; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.network.PacketBuffer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import wayoftime.bloodmagic.tile.TileAlchemicalReactionChamber; + +public class ARCTanksPacket +{ + private BlockPos pos; + private CompoundNBT inputNBT; + private CompoundNBT outputNBT; + + public ARCTanksPacket() + { + pos = BlockPos.ZERO; + inputNBT = new CompoundNBT(); + outputNBT = new CompoundNBT(); + } + + public ARCTanksPacket(TileAlchemicalReactionChamber tile) + { + this(tile.getPos(), tile.inputTank.writeToNBT(new CompoundNBT()), tile.outputTank.writeToNBT(new CompoundNBT())); + } + + public ARCTanksPacket(BlockPos pos, CompoundNBT inputNBT, CompoundNBT outputNBT) + { + this.pos = pos; + this.inputNBT = inputNBT; + this.outputNBT = outputNBT; + } + + public static void encode(ARCTanksPacket pkt, PacketBuffer buf) + { + buf.writeBlockPos(pkt.pos); + buf.writeCompoundTag(pkt.inputNBT); + buf.writeCompoundTag(pkt.outputNBT); + } + + public static ARCTanksPacket decode(PacketBuffer buf) + { + ARCTanksPacket pkt = new ARCTanksPacket(buf.readBlockPos(), buf.readCompoundTag(), buf.readCompoundTag()); + + return pkt; + } + + public static void handle(ARCTanksPacket message, Supplier context) + { + context.get().enqueueWork(() -> updateTanks(message.pos, message.inputNBT, message.outputNBT)); + context.get().setPacketHandled(true); + } + + @OnlyIn(Dist.CLIENT) + public static void updateTanks(BlockPos pos, CompoundNBT inputNBT, CompoundNBT outputNBT) + { + World world = Minecraft.getInstance().world; + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof TileAlchemicalReactionChamber) + { + ((TileAlchemicalReactionChamber) tile).inputTank.readFromNBT(inputNBT); + ((TileAlchemicalReactionChamber) tile).outputTank.readFromNBT(outputNBT); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/network/AlchemyTableButtonPacket.java b/src/main/java/wayoftime/bloodmagic/network/AlchemyTableButtonPacket.java new file mode 100644 index 00000000..4202043c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/AlchemyTableButtonPacket.java @@ -0,0 +1,76 @@ +package wayoftime.bloodmagic.network; + +import java.util.function.Supplier; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.network.PacketBuffer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import wayoftime.bloodmagic.tile.TileAlchemyTable; + +public class AlchemyTableButtonPacket +{ + private BlockPos pos; + private int slot; + private Direction dir; + private boolean enable; + + public AlchemyTableButtonPacket() + { + this(BlockPos.ZERO, 0, Direction.DOWN, true); + } + + public AlchemyTableButtonPacket(BlockPos pos, int slot, Direction dir, boolean enable) + { + this.pos = pos; + this.slot = slot; + this.dir = dir; + this.enable = enable; + } + + public static void encode(AlchemyTableButtonPacket pkt, PacketBuffer buf) + { + buf.writeBlockPos(pkt.pos); + buf.writeInt(pkt.slot); + buf.writeInt(pkt.dir.ordinal()); + buf.writeBoolean(pkt.enable); + } + + public static AlchemyTableButtonPacket decode(PacketBuffer buf) + { + AlchemyTableButtonPacket pkt = new AlchemyTableButtonPacket(buf.readBlockPos(), buf.readInt(), Direction.byIndex(buf.readInt()), buf.readBoolean()); + + return pkt; + } + + public static void handle(AlchemyTableButtonPacket message, Supplier context) + { + context.get().enqueueWork(() -> { + PlayerEntity player = context.get().getSender(); + if (player == null) + { + return; + } + TileEntity tile = player.getEntityWorld().getTileEntity(message.pos); + if (tile instanceof TileAlchemyTable) + { + ((TileAlchemyTable) tile).setSlotEnabled(message.enable, message.slot, message.dir); + } + }); + context.get().setPacketHandled(true); + } + +// @OnlyIn(Dist.CLIENT) +// public static void updateTanks(BlockPos pos, CompoundNBT inputNBT, CompoundNBT outputNBT) +// { +// World world = Minecraft.getInstance().world; +// TileEntity tile = world.getTileEntity(pos); +// if (tile instanceof TileAlchemicalReactionChamber) +// { +// ((TileAlchemicalReactionChamber) tile).inputTank.readFromNBT(inputNBT); +// ((TileAlchemicalReactionChamber) tile).outputTank.readFromNBT(outputNBT); +// } +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/network/BasePacketHandler.java b/src/main/java/wayoftime/bloodmagic/network/BasePacketHandler.java new file mode 100644 index 00000000..74d39066 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/BasePacketHandler.java @@ -0,0 +1,151 @@ +package wayoftime.bloodmagic.network; + +import java.util.Optional; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.Supplier; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.network.PacketBuffer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.RegistryKey; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.fml.network.NetworkDirection; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import net.minecraftforge.fml.network.NetworkRegistry; +import net.minecraftforge.fml.network.PacketDistributor; +import net.minecraftforge.fml.network.simple.SimpleChannel; + +/** + * Copied liberally from Mekanism. Many thanks to pupnewfster! + * + */ +public abstract class BasePacketHandler +{ + + protected static SimpleChannel createChannel(ResourceLocation name) + { + return NetworkRegistry.ChannelBuilder.named(name).clientAcceptedVersions(getProtocolVersion()::equals).serverAcceptedVersions(getProtocolVersion()::equals).networkProtocolVersion(BasePacketHandler::getProtocolVersion).simpleChannel(); + } + + private static String getProtocolVersion() + { + return "1"; + } + + /** + * Helper for reading strings to make sure we don't accidentally call + * PacketBuffer#readString on the server + */ + public static String readString(PacketBuffer buffer) + { + return buffer.readString(Short.MAX_VALUE); + } + +// public static void log(String log) +// { +// // TODO: Add more logging for packets using this +// if (MekanismConfig.general.logPackets.get()) +// { +// Mekanism.logger.info(log); +// } +// } +// + public static PlayerEntity getPlayer(Supplier context) + { + return context.get().getSender(); + } + + private int index = 0; + + protected abstract SimpleChannel getChannel(); + + public abstract void initialize(); + + protected void registerClientToServer(Class type, BiConsumer encoder, + Function decoder, BiConsumer> consumer) + { + getChannel().registerMessage(index++, type, encoder, decoder, consumer, Optional.of(NetworkDirection.PLAY_TO_SERVER)); + } + + protected void registerServerToClient(Class type, BiConsumer encoder, + Function decoder, BiConsumer> consumer) + { + getChannel().registerMessage(index++, type, encoder, decoder, consumer, Optional.of(NetworkDirection.PLAY_TO_CLIENT)); + } + + /** + * Send this message to the specified player. + * + * @param message - the message to send + * @param player - the player to send it to + */ + public void sendTo(MSG message, ServerPlayerEntity player) + { + getChannel().sendTo(message, player.connection.getNetworkManager(), NetworkDirection.PLAY_TO_CLIENT); + } + + /** + * Send this message to everyone connected to the server. + * + * @param message - message to send + */ + public void sendToAll(MSG message) + { + getChannel().send(PacketDistributor.ALL.noArg(), message); + } + + /** + * Send this message to everyone within the supplied dimension. + * + * @param message - the message to send + * @param dimension - the dimension to target + */ + public void sendToDimension(MSG message, RegistryKey dimension) + { + getChannel().send(PacketDistributor.DIMENSION.with(() -> dimension), message); + } + + /** + * Send this message to the server. + * + * @param message - the message to send + */ + public void sendToServer(MSG message) + { + getChannel().sendToServer(message); + } + + public void sendToAllTracking(MSG message, Entity entity) + { + getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), message); + } + + public void sendToAllTracking(MSG message, TileEntity tile) + { + sendToAllTracking(message, tile.getWorld(), tile.getPos()); + } + + public void sendToAllTracking(MSG message, World world, BlockPos pos) + { + if (world instanceof ServerWorld) + { + // If we have a ServerWorld just directly figure out the ChunkPos so as to not + // require looking up the chunk + // This provides a decent performance boost over using the packet distributor + ((ServerWorld) world).getChunkProvider().chunkManager.getTrackingPlayers(new ChunkPos(pos), false).forEach(p -> sendTo(message, p)); + } else + { + // Otherwise fallback to entities tracking the chunk if some mod did something + // odd and our world is not a ServerWorld + getChannel().send(PacketDistributor.TRACKING_CHUNK.with(() -> world.getChunk(pos.getX() >> 4, pos.getZ() >> 4)), message); + } + } + +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/network/BloodMagicPacketHandler.java b/src/main/java/wayoftime/bloodmagic/network/BloodMagicPacketHandler.java new file mode 100644 index 00000000..fd0d365c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/BloodMagicPacketHandler.java @@ -0,0 +1,54 @@ +package wayoftime.bloodmagic.network; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.network.simple.SimpleChannel; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.ChatUtil; + +public class BloodMagicPacketHandler extends BasePacketHandler +{ +// public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(new ResourceLocation(BloodMagic.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals); + public static final SimpleChannel INSTANCE = createChannel(new ResourceLocation(BloodMagic.MODID, "main")); + + @Override + public void initialize() + { + registerServerToClient(ChatUtil.PacketNoSpamChat.class, ChatUtil.PacketNoSpamChat::encode, ChatUtil.PacketNoSpamChat::decode, ChatUtil.PacketNoSpamChat::handle); + registerServerToClient(ARCTanksPacket.class, ARCTanksPacket::encode, ARCTanksPacket::decode, ARCTanksPacket::handle); + registerServerToClient(DemonAuraClientPacket.class, DemonAuraClientPacket::encode, DemonAuraClientPacket::decode, DemonAuraClientPacket::handle); + registerServerToClient(SetClientHealthPacket.class, SetClientHealthPacket::encode, SetClientHealthPacket::decode, SetClientHealthPacket::handle); + + registerClientToServer(KeyProcessorPacket.class, KeyProcessorPacket::encode, KeyProcessorPacket::decode, KeyProcessorPacket::handle); + registerClientToServer(SigilHoldingPacket.class, SigilHoldingPacket::encode, SigilHoldingPacket::decode, SigilHoldingPacket::handle); + registerClientToServer(AlchemyTableButtonPacket.class, AlchemyTableButtonPacket::encode, AlchemyTableButtonPacket::decode, AlchemyTableButtonPacket::handle); +// INSTANCE.registerMessage(id, messageType, encoder, decoder, messageConsumer); +// INSTANCE.registerMessage(ChatUtil.PacketNoSpamChat.Handler.class, ChatUtil.PacketNoSpamChat.class, 0, Side.CLIENT); +// INSTANCE.registerMessage(ItemRouterButtonPacketProcessor.class, ItemRouterButtonPacketProcessor.class, 1, Side.SERVER); +// INSTANCE.registerMessage(PlayerVelocityPacketProcessor.class, PlayerVelocityPacketProcessor.class, 2, Side.CLIENT); +// INSTANCE.registerMessage(PlayerFallDistancePacketProcessor.class, PlayerFallDistancePacketProcessor.class, 3, Side.SERVER); +// INSTANCE.registerMessage(SigilHoldingPacketProcessor.class, SigilHoldingPacketProcessor.class, 4, Side.SERVER); +// INSTANCE.registerMessage(KeyProcessor.class, KeyProcessor.class, 5, Side.SERVER); +// INSTANCE.registerMessage(DemonAuraPacketProcessor.class, DemonAuraPacketProcessor.class, 6, Side.CLIENT); +// INSTANCE.registerMessage(ItemRouterAmountPacketProcessor.class, ItemRouterAmountPacketProcessor.class, 7, Side.SERVER); + } + + protected SimpleChannel getChannel() + { + return INSTANCE; + } + +// public static void sendToAllAround(IMessage message, TileEntity te, int range) +// { +// INSTANCE.sendToAllAround(message, new NetworkRegistry.TargetPoint(te.getWorld().provider.getDimension(), te.getPos().getX(), te.getPos().getY(), te.getPos().getZ(), range)); +// } +// +// public static void sendToAllAround(IMessage message, TileEntity te) +// { +// sendToAllAround(message, te, 64); +// } +// +// public static void sendTo(IMessage message, EntityPlayerMP player) +// { +// INSTANCE.sendTo(message, player); +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/network/DemonAuraClientPacket.java b/src/main/java/wayoftime/bloodmagic/network/DemonAuraClientPacket.java new file mode 100644 index 00000000..a3d29b9e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/DemonAuraClientPacket.java @@ -0,0 +1,64 @@ +package wayoftime.bloodmagic.network; + +import java.util.function.Supplier; + +import net.minecraft.network.PacketBuffer; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import wayoftime.bloodmagic.util.handler.event.ClientHandler; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class DemonAuraClientPacket +{ + public DemonWillHolder currentWill = new DemonWillHolder(); + + public DemonAuraClientPacket() + { + + } + + public DemonAuraClientPacket(DemonWillHolder holder) + { + this.currentWill = holder; + } + + public static void encode(DemonAuraClientPacket pkt, PacketBuffer buf) + { + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + if (pkt.currentWill.willMap.containsKey(type)) + { + buf.writeDouble(pkt.currentWill.willMap.get(type)); + } else + { + buf.writeDouble(0); + } + } + + } + + public static DemonAuraClientPacket decode(PacketBuffer buf) + { + DemonAuraClientPacket pkt = new DemonAuraClientPacket(); + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + pkt.currentWill.willMap.put(type, buf.readDouble()); + } + + return pkt; + } + + public static void handle(DemonAuraClientPacket message, Supplier context) + { + context.get().enqueueWork(() -> updateClientHolder(message.currentWill)); + context.get().setPacketHandled(true); + } + + @OnlyIn(Dist.CLIENT) + public static void updateClientHolder(DemonWillHolder holder) + { + ClientHandler.currentAura = holder; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/network/KeyProcessorPacket.java b/src/main/java/wayoftime/bloodmagic/network/KeyProcessorPacket.java new file mode 100644 index 00000000..7f79dc72 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/KeyProcessorPacket.java @@ -0,0 +1,64 @@ +package wayoftime.bloodmagic.network; + +import java.util.function.Supplier; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import wayoftime.bloodmagic.client.key.IKeybindable; +import wayoftime.bloodmagic.client.key.KeyBindings; + +public class KeyProcessorPacket +{ + public int keyId; + public boolean showInChat; + + public KeyProcessorPacket(int keyId, boolean showInChat) + { + this.keyId = keyId; + this.showInChat = showInChat; + } + + public KeyProcessorPacket(KeyBindings key, boolean showInChat) + { + this(key.ordinal(), showInChat); + } + + public static void encode(KeyProcessorPacket pkt, PacketBuffer buf) + { + buf.writeInt(pkt.keyId); + buf.writeBoolean(pkt.showInChat); + } + + public static KeyProcessorPacket decode(PacketBuffer buf) + { + KeyProcessorPacket pkt = new KeyProcessorPacket(buf.readInt(), buf.readBoolean()); + + return pkt; + } + + public static void handle(KeyProcessorPacket message, Supplier context) + { + context.get().enqueueWork(() -> sendKeyToServer(message, context.get().getSender())); + context.get().setPacketHandled(true); + } + + public static void sendKeyToServer(KeyProcessorPacket msg, PlayerEntity playerEntity) + { + if (playerEntity != null) + { + ItemStack heldStack = playerEntity.getHeldItemMainhand(); + if (heldStack.getItem() instanceof IKeybindable) + { + if (msg.keyId < 0 || msg.keyId >= KeyBindings.values().length) + { + return; + } + KeyBindings key = KeyBindings.values()[msg.keyId]; + + ((IKeybindable) heldStack.getItem()).onKeyPressed(heldStack, playerEntity, key, msg.showInChat); + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/network/SetClientHealthPacket.java b/src/main/java/wayoftime/bloodmagic/network/SetClientHealthPacket.java new file mode 100644 index 00000000..d89345dc --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/SetClientHealthPacket.java @@ -0,0 +1,48 @@ +package wayoftime.bloodmagic.network; + +import java.util.function.Supplier; + +import net.minecraft.client.Minecraft; +import net.minecraft.network.PacketBuffer; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkEvent.Context; + +public class SetClientHealthPacket +{ + public float health; + + public SetClientHealthPacket() + { + + } + + public SetClientHealthPacket(float health) + { + this.health = health; + } + + public static void encode(SetClientHealthPacket pkt, PacketBuffer buf) + { + buf.writeFloat(pkt.health); + } + + public static SetClientHealthPacket decode(PacketBuffer buf) + { + SetClientHealthPacket pkt = new SetClientHealthPacket(buf.readFloat()); + + return pkt; + } + + public static void handle(SetClientHealthPacket message, Supplier context) + { + context.get().enqueueWork(() -> updateClientHealth(message.health)); + context.get().setPacketHandled(true); + } + + @OnlyIn(Dist.CLIENT) + public static void updateClientHealth(float health) + { + Minecraft.getInstance().player.setHealth(health); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/network/SigilHoldingPacket.java b/src/main/java/wayoftime/bloodmagic/network/SigilHoldingPacket.java new file mode 100644 index 00000000..015827b9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/network/SigilHoldingPacket.java @@ -0,0 +1,59 @@ +package wayoftime.bloodmagic.network; + +import java.util.function.Supplier; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import wayoftime.bloodmagic.common.item.sigil.ItemSigilHolding; + +public class SigilHoldingPacket +{ + private int slot; + private int mode; + + public SigilHoldingPacket() + { + } + + public SigilHoldingPacket(int slot, int mode) + { + this.slot = slot; + this.mode = mode; + } + + public static void encode(SigilHoldingPacket pkt, PacketBuffer buf) + { + buf.writeInt(pkt.slot); + buf.writeInt(pkt.mode); + } + + public static SigilHoldingPacket decode(PacketBuffer buf) + { + SigilHoldingPacket pkt = new SigilHoldingPacket(buf.readInt(), buf.readInt()); + + return pkt; + } + + public static void handle(SigilHoldingPacket message, Supplier context) + { + context.get().enqueueWork(() -> sendKeyToServer(message, context.get().getSender())); + context.get().setPacketHandled(true); + } + + public static void sendKeyToServer(SigilHoldingPacket msg, PlayerEntity playerEntity) + { + ItemStack itemStack = ItemStack.EMPTY; + + if (msg.slot > -1 && msg.slot < 9) + { + itemStack = playerEntity.inventory.getStackInSlot(msg.slot); + } + + if (!itemStack.isEmpty()) + { + ItemSigilHolding.cycleToNextSigil(itemStack, msg.mode); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/potion/BMPotionUtils.java b/src/main/java/wayoftime/bloodmagic/potion/BMPotionUtils.java new file mode 100644 index 00000000..94df642c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/potion/BMPotionUtils.java @@ -0,0 +1,78 @@ +package wayoftime.bloodmagic.potion; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.IGrowable; +import net.minecraft.entity.LivingEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; + +public class BMPotionUtils +{ + public static Random rand = new Random(); + + public static double damageMobAndGrowSurroundingPlants(LivingEntity entity, int horizontalRadius, int verticalRadius, double damageRatio, int maxPlantsGrown) + { + World world = entity.getEntityWorld(); + if (world.isRemote) + { + return 0; + } + + if (!entity.isAlive()) + { + return 0; + } + + double incurredDamage = 0; + + List growList = new ArrayList<>(); + + for (int i = 0; i < maxPlantsGrown; i++) + { + BlockPos blockPos = entity.getPosition().add(rand.nextInt(horizontalRadius * 2 + 1) - horizontalRadius, rand.nextInt(verticalRadius * 2 + 1) - verticalRadius, rand.nextInt(horizontalRadius * 2 + 1) - horizontalRadius); + BlockState state = world.getBlockState(blockPos); + + if (!BloodMagicAPI.INSTANCE.getBlacklist().getGreenGrove().contains(state)) + { + if (state.getBlock() instanceof IGrowable) + { + growList.add(blockPos); + } + } + } + + for (BlockPos blockPos : growList) + { + Block block = world.getBlockState(blockPos).getBlock(); +// if (world.rand.nextInt(50) == 0) + { + BlockState preBlockState = world.getBlockState(blockPos); + for (int n = 0; n < 10; n++) + block.randomTick(world.getBlockState(blockPos), (ServerWorld) world, blockPos, world.rand); + + BlockState newState = world.getBlockState(blockPos); + if (!newState.equals(preBlockState)) + { + world.playEvent(2005, blockPos, 0); + incurredDamage += damageRatio; + } + } + } + + if (incurredDamage > 0) + { + entity.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, (float) incurredDamage); + } + + return incurredDamage; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/potion/BloodMagicPotions.java b/src/main/java/wayoftime/bloodmagic/potion/BloodMagicPotions.java new file mode 100644 index 00000000..eafe2fe7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/potion/BloodMagicPotions.java @@ -0,0 +1,25 @@ +package wayoftime.bloodmagic.potion; + +import net.minecraft.potion.Effect; +import net.minecraft.potion.EffectType; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.registries.IForgeRegistry; + +public class BloodMagicPotions +{ + public static final Effect SOUL_SNARE = new PotionSoulSnare(); + public static final Effect FIRE_FUSE = new PotionFireFuse(); + public static final Effect SOUL_FRAY = new PotionBloodMagic(EffectType.HARMFUL, 0xFFFFFFFF); + public static final Effect PLANT_LEECH = new PotionBloodMagic(EffectType.HARMFUL, 0x00FF00FF); + public static final Effect SACRIFICIAL_LAMB = new PotionBloodMagic(EffectType.HARMFUL, 0xFFFFFF); + + public static void registerPotions(RegistryEvent.Register evt) + { + IForgeRegistry reg = evt.getRegistry(); + reg.register(SOUL_SNARE.setRegistryName("soulsnare")); + reg.register(FIRE_FUSE.setRegistryName("firefuse")); + reg.register(SOUL_FRAY.setRegistryName("soulfray")); + reg.register(PLANT_LEECH.setRegistryName("plantleech")); + reg.register(SACRIFICIAL_LAMB.setRegistryName("sacrificiallamb")); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/potion/PotionBloodMagic.java b/src/main/java/wayoftime/bloodmagic/potion/PotionBloodMagic.java new file mode 100644 index 00000000..057c44c9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/potion/PotionBloodMagic.java @@ -0,0 +1,12 @@ +package wayoftime.bloodmagic.potion; + +import net.minecraft.potion.Effect; +import net.minecraft.potion.EffectType; + +public class PotionBloodMagic extends Effect +{ + public PotionBloodMagic(EffectType typeIn, int liquidColorIn) + { + super(typeIn, liquidColorIn); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/potion/PotionFireFuse.java b/src/main/java/wayoftime/bloodmagic/potion/PotionFireFuse.java new file mode 100644 index 00000000..639a6ed7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/potion/PotionFireFuse.java @@ -0,0 +1,40 @@ +package wayoftime.bloodmagic.potion; + +import java.util.Random; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.potion.EffectType; +import net.minecraft.world.Explosion; + +public class PotionFireFuse extends PotionBloodMagic +{ + public PotionFireFuse() + { + super(EffectType.HARMFUL, 0xFF0000FF); + } + + @Override + public void performEffect(LivingEntity entity, int amplifier) + { + if (entity.world.isRemote) + { + return; + } + + Random random = entity.world.rand; + entity.getEntityWorld().addParticle(ParticleTypes.FLAME, entity.getPosX() + + random.nextDouble() * 0.3, entity.getPosY() + + random.nextDouble() * 0.3, entity.getPosZ() + random.nextDouble() * 0.3, 0, 0.06d, 0); + + int radius = amplifier + 1; + + if (entity.getActivePotionEffect(BloodMagicPotions.FIRE_FUSE).getDuration() <= 3) + { + Explosion.Mode explosion$mode = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(entity.world, entity) + ? Explosion.Mode.DESTROY + : Explosion.Mode.NONE; + entity.getEntityWorld().createExplosion(null, entity.getPosX(), entity.getPosY(), entity.getPosZ(), radius, false, explosion$mode); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/potion/PotionSoulSnare.java b/src/main/java/wayoftime/bloodmagic/potion/PotionSoulSnare.java new file mode 100644 index 00000000..34e0cc68 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/potion/PotionSoulSnare.java @@ -0,0 +1,11 @@ +package wayoftime.bloodmagic.potion; + +import net.minecraft.potion.EffectType; + +public class PotionSoulSnare extends PotionBloodMagic +{ + public PotionSoulSnare() + { + super(EffectType.NEUTRAL, 0xFFFFFF); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/BloodMagicRecipe.java b/src/main/java/wayoftime/bloodmagic/recipe/BloodMagicRecipe.java new file mode 100644 index 00000000..06555bcd --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/BloodMagicRecipe.java @@ -0,0 +1,69 @@ +package wayoftime.bloodmagic.recipe; + +import javax.annotation.Nonnull; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import wayoftime.bloodmagic.recipe.helper.IgnoredIInventory; + +public abstract class BloodMagicRecipe implements IRecipe +{ + private final ResourceLocation id; + + protected BloodMagicRecipe(ResourceLocation id) + { + this.id = id; + } + + /** + * Writes this recipe to a PacketBuffer. + * + * @param buffer The buffer to write to. + */ + public abstract void write(PacketBuffer buffer); + + @Nonnull + @Override + public ResourceLocation getId() + { + return id; + } + + @Override + public boolean matches(@Nonnull IgnoredIInventory inv, @Nonnull World world) + { + return true; + } + + @Override + public boolean isDynamic() + { + // Note: If we make this non dynamic, we can make it show in vanilla's crafting + // book and also then obey the recipe locking. + // For now none of that works/makes sense in our concept so don't lock it + return true; + } + + @Nonnull + @Override + public ItemStack getCraftingResult(@Nonnull IgnoredIInventory inv) + { + return ItemStack.EMPTY; + } + + @Override + public boolean canFit(int width, int height) + { + return true; + } + + @Nonnull + @Override + public ItemStack getRecipeOutput() + { + return ItemStack.EMPTY; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/RecipeARC.java b/src/main/java/wayoftime/bloodmagic/recipe/RecipeARC.java new file mode 100644 index 00000000..702794eb --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/RecipeARC.java @@ -0,0 +1,182 @@ +package wayoftime.bloodmagic.recipe; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import javax.annotation.Nonnull; + +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.IRecipeType; +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.common.registries.BloodMagicRecipeSerializers; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; + +public class RecipeARC extends BloodMagicRecipe +{ + public static final int MAX_RANDOM_OUTPUTS = 3; + + @Nonnull + private final Ingredient input; + @Nonnull + private final Ingredient arc_tool; + private final FluidStackIngredient inputFluid; + @Nonnull + private final ItemStack output; + private final FluidStack outputFluid; + private final boolean consumeIngredient; + + private final List> addedItems; + + public RecipeARC(ResourceLocation id, Ingredient input, Ingredient arc_tool, FluidStackIngredient inputFluid, ItemStack output, FluidStack outputFluid, boolean consumeIngredient) + { + this(id, input, arc_tool, inputFluid, output, new ArrayList>(), outputFluid, consumeIngredient); + } + + public RecipeARC(ResourceLocation id, Ingredient input, Ingredient arc_tool, FluidStackIngredient inputFluid, ItemStack output, List> addedItems, FluidStack outputFluid, boolean consumeIngredient) + { + super(id); + this.input = input; + this.arc_tool = arc_tool; + this.inputFluid = inputFluid; + this.output = output; + this.addedItems = addedItems; + this.outputFluid = outputFluid; + this.consumeIngredient = consumeIngredient; + } + + public RecipeARC addRandomOutput(ItemStack stack, double chance) + { + if (addedItems.size() >= MAX_RANDOM_OUTPUTS) + { + return this; + } + + addedItems.add(Pair.of(stack, chance)); + + return this; + } + + @Nonnull + public final Ingredient getInput() + { + return input; + } + + @Nonnull + public final Ingredient getTool() + { + return arc_tool; + } + + public final FluidStackIngredient getFluidIngredient() + { + return inputFluid; + } + + public final FluidStack getFluidOutput() + { + return outputFluid; + } + + @Override + public final NonNullList getIngredients() + { + NonNullList list = NonNullList.create(); + list.add(getInput()); + list.add(getTool()); + return list; + } + + public List getAllListedOutputs() + { + List list = new ArrayList(); + + list.add(output.copy()); + for (Pair pair : addedItems) + { + list.add(pair.getLeft().copy()); + } + + return list; + } + + public List getAllOutputs(Random rand) + { + List list = new ArrayList(); + + list.add(output.copy()); + for (Pair pair : addedItems) + { + if (rand.nextDouble() < pair.getRight()) + list.add(pair.getLeft().copy()); + } + + return list; + } + + public double[] getAllOutputChances() + { + int size = addedItems.size(); + + double[] chanceArray = new double[size]; + for (int i = 0; i < size; i++) + { + chanceArray[i] = addedItems.get(i).getRight(); + } + + return chanceArray; + } + + public boolean getConsumeIngredient() + { + return consumeIngredient; + } + + @Override + public void write(PacketBuffer buffer) + { + input.write(buffer); + arc_tool.write(buffer); + buffer.writeItemStack(output); + buffer.writeInt(addedItems.size()); + for (Pair pair : addedItems) + { + buffer.writeItemStack(pair.getLeft()); + buffer.writeDouble(pair.getValue()); + } + + buffer.writeBoolean(inputFluid != null); + if (inputFluid != null) + { + inputFluid.write(buffer); + } + + buffer.writeBoolean(outputFluid != null); + if (outputFluid != null) + { + outputFluid.writeToPacket(buffer); + } + buffer.writeBoolean(consumeIngredient); + } + + @Override + public IRecipeSerializer getSerializer() + { + return BloodMagicRecipeSerializers.ARC.getRecipeSerializer(); + } + + @Override + public IRecipeType getType() + { + return BloodMagicRecipeType.ARC; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/RecipeAlchemyArray.java b/src/main/java/wayoftime/bloodmagic/recipe/RecipeAlchemyArray.java new file mode 100644 index 00000000..0c0a92a4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/RecipeAlchemyArray.java @@ -0,0 +1,103 @@ +package wayoftime.bloodmagic.recipe; + +import javax.annotation.Nonnull; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.common.registries.BloodMagicRecipeSerializers; + +public class RecipeAlchemyArray extends BloodMagicRecipe +{ + private final ResourceLocation id; + private final ResourceLocation texture; + @Nonnull + private final Ingredient baseInput; + @Nonnull + private final Ingredient addedInput; + @Nonnull + private final ItemStack output; + + public RecipeAlchemyArray(ResourceLocation id, ResourceLocation texture, @Nonnull Ingredient baseIngredient, @Nonnull Ingredient addedIngredient, @Nonnull ItemStack result) + { + super(id); + this.id = id; + this.texture = texture; + this.baseInput = baseIngredient; + this.addedInput = addedIngredient; + this.output = result; + } + + @Nonnull + public final ResourceLocation getId() + { + return id; + } + + @Nonnull + public final ResourceLocation getTexture() + { + return texture; + } + + @Nonnull + public final Ingredient getBaseInput() + { + return baseInput; + } + + @Nonnull + public final Ingredient getAddedInput() + { + return addedInput; + } + + @Override + public final NonNullList getIngredients() + { + NonNullList list = NonNullList.create(); + list.add(getBaseInput()); + list.add(getAddedInput()); + return list; + } + + @Nonnull + public final ItemStack getOutput() + { + return output; + } + + @Override + public void write(PacketBuffer buffer) + { + if (texture != null) + { + buffer.writeBoolean(true); + buffer.writeResourceLocation(texture); + } else + { + buffer.writeBoolean(false); + } + + baseInput.write(buffer); + addedInput.write(buffer); + buffer.writeItemStack(output); + } + + @Override + public IRecipeSerializer getSerializer() + { + return BloodMagicRecipeSerializers.ARRAY.getRecipeSerializer(); + } + + @Override + public IRecipeType getType() + { + return BloodMagicRecipeType.ARRAY; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/RecipeAlchemyTable.java b/src/main/java/wayoftime/bloodmagic/recipe/RecipeAlchemyTable.java new file mode 100644 index 00000000..96306e2f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/RecipeAlchemyTable.java @@ -0,0 +1,102 @@ +package wayoftime.bloodmagic.recipe; + +import java.util.List; + +import javax.annotation.Nonnegative; +import javax.annotation.Nonnull; + +import com.google.common.base.Preconditions; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.common.registries.BloodMagicRecipeSerializers; + +public class RecipeAlchemyTable extends BloodMagicRecipe +{ + @Nonnull + private final List input; + @Nonnull + private final ItemStack output; + @Nonnegative + private final int syphon; + @Nonnegative + private final int ticks; + @Nonnegative + private final int minimumTier; + + public static final int MAX_INPUTS = 6; + + public RecipeAlchemyTable(ResourceLocation id, List input, @Nonnull ItemStack output, int syphon, int ticks, int minimumTier) + { + super(id); + Preconditions.checkNotNull(input, "input cannot be null."); + Preconditions.checkNotNull(output, "output cannot be null."); + Preconditions.checkArgument(syphon >= 0, "syphon cannot be negative."); + Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative."); + Preconditions.checkArgument(minimumTier >= 0, "minimumTier cannot be negative."); + + this.input = input; + this.output = output; + this.syphon = syphon; + this.ticks = ticks; + this.minimumTier = minimumTier; + } + + @Nonnull + public final List getInput() + { + return input; + } + + @Nonnull + public final ItemStack getOutput() + { + return output; + } + + public final int getSyphon() + { + return syphon; + } + + public final int getTicks() + { + return ticks; + } + + public final int getMinimumTier() + { + return minimumTier; + } + + @Override + public void write(PacketBuffer buffer) + { + buffer.writeInt(input.size()); + for (int i = 0; i < input.size(); i++) + { + input.get(i).write(buffer); + } + buffer.writeItemStack(output); + buffer.writeInt(syphon); + buffer.writeInt(ticks); + buffer.writeInt(minimumTier); + } + + @Override + public IRecipeSerializer getSerializer() + { + return BloodMagicRecipeSerializers.ALCHEMYTABLE.getRecipeSerializer(); + } + + @Override + public IRecipeType getType() + { + return BloodMagicRecipeType.ALCHEMYTABLE; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/RecipeBloodAltar.java b/src/main/java/wayoftime/bloodmagic/recipe/RecipeBloodAltar.java new file mode 100644 index 00000000..1633e130 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/RecipeBloodAltar.java @@ -0,0 +1,117 @@ +package wayoftime.bloodmagic.recipe; + +import javax.annotation.Nonnegative; +import javax.annotation.Nonnull; + +import com.google.common.base.Preconditions; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.common.registries.BloodMagicRecipeSerializers; + +public class RecipeBloodAltar extends BloodMagicRecipe +{ + @Nonnull + private final Ingredient input; + @Nonnull + private final ItemStack output; + @Nonnull + private final int minimumTier; + @Nonnegative + private final int syphon; + @Nonnegative + private final int consumeRate; + @Nonnegative + private final int drainRate; + + public RecipeBloodAltar(ResourceLocation id, @Nonnull Ingredient input, @Nonnull ItemStack output, @Nonnegative int minimumTier, @Nonnegative int syphon, @Nonnegative int consumeRate, @Nonnegative int drainRate) + { + super(id); + Preconditions.checkNotNull(input, "input cannot be null."); + Preconditions.checkNotNull(output, "output cannot be null."); + Preconditions.checkArgument(minimumTier >= 0, "minimumTier cannot be negative."); + Preconditions.checkArgument(minimumTier <= 6, "minimumTier cannot be higher than max tier"); + Preconditions.checkArgument(syphon >= 0, "syphon cannot be negative."); + Preconditions.checkArgument(consumeRate >= 0, "consumeRate cannot be negative."); + Preconditions.checkArgument(drainRate >= 0, "drain cannot be negative."); + + this.input = input; + this.output = output; + this.minimumTier = minimumTier; + this.syphon = syphon; + this.consumeRate = consumeRate; + this.drainRate = drainRate; + } + + @Nonnull + public final Ingredient getInput() + { + return input; + } + + @Override + public final NonNullList getIngredients() + { + NonNullList list = NonNullList.create(); + list.add(getInput()); + return list; + } + + @Nonnull + public final ItemStack getOutput() + { + return output; + } + + public int getMinimumTier() + { + return minimumTier; + } + + @Nonnegative + public final int getSyphon() + { + return syphon; + } + + @Nonnegative + public final int getConsumeRate() + { + return consumeRate; + } + + @Nonnegative + public final int getDrainRate() + { + return drainRate; + } + + @Override + public void write(PacketBuffer buffer) + { + input.write(buffer); + buffer.writeItemStack(output); + buffer.writeInt(minimumTier); + buffer.writeInt(syphon); + buffer.writeInt(consumeRate); + buffer.writeInt(drainRate); + } + + @Override + public IRecipeSerializer getSerializer() + { + return BloodMagicRecipeSerializers.ALTAR.getRecipeSerializer(); + } + + @Override + public IRecipeType getType() + { + return BloodMagicRecipeType.ALTAR; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/recipe/RecipeTartaricForge.java b/src/main/java/wayoftime/bloodmagic/recipe/RecipeTartaricForge.java new file mode 100644 index 00000000..6fb61f2b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/RecipeTartaricForge.java @@ -0,0 +1,92 @@ +package wayoftime.bloodmagic.recipe; + +import java.util.List; + +import javax.annotation.Nonnegative; +import javax.annotation.Nonnull; + +import com.google.common.base.Preconditions; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.common.recipe.BloodMagicRecipeType; +import wayoftime.bloodmagic.common.registries.BloodMagicRecipeSerializers; + +public class RecipeTartaricForge extends BloodMagicRecipe +{ + @Nonnull + private final List input; + @Nonnull + private final ItemStack output; + @Nonnegative + private final double minimumSouls; + @Nonnegative + private final double soulDrain; + + public RecipeTartaricForge(ResourceLocation id, @Nonnull List input, @Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain) + { + super(id); + Preconditions.checkNotNull(input, "input cannot be null."); + Preconditions.checkNotNull(output, "output cannot be null."); + Preconditions.checkArgument(minimumSouls >= 0, "minimumSouls cannot be negative."); + Preconditions.checkArgument(soulDrain >= 0, "soulDrain cannot be negative."); + + this.input = input; + this.output = output; + this.minimumSouls = minimumSouls; + this.soulDrain = soulDrain; + } + + @Nonnull + public final List getInput() + { + return input; + } + + @Nonnull + public final ItemStack getOutput() + { + return output; + } + + @Nonnegative + public final double getMinimumSouls() + { + return minimumSouls; + } + + @Nonnegative + public final double getSoulDrain() + { + return soulDrain; + } + + @Override + public void write(PacketBuffer buffer) + { + buffer.writeInt(input.size()); + for (int i = 0; i < input.size(); i++) + { + input.get(i).write(buffer); + } + buffer.writeItemStack(output); + buffer.writeDouble(minimumSouls); + buffer.writeDouble(soulDrain); + } + + @Override + public IRecipeSerializer getSerializer() + { + return BloodMagicRecipeSerializers.TARTARIC.getRecipeSerializer(); + } + + @Override + public IRecipeType getType() + { + return BloodMagicRecipeType.TARTARICFORGE; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/recipe/helper/FluidStackIngredient.java b/src/main/java/wayoftime/bloodmagic/recipe/helper/FluidStackIngredient.java new file mode 100644 index 00000000..16bf4a28 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/helper/FluidStackIngredient.java @@ -0,0 +1,384 @@ +package wayoftime.bloodmagic.recipe.helper; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Objects; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.JsonSyntaxException; + +import net.minecraft.fluid.Fluid; +import net.minecraft.network.PacketBuffer; +import net.minecraft.tags.FluidTags; +import net.minecraft.tags.ITag; +import net.minecraft.tags.TagCollectionManager; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import wayoftime.bloodmagic.util.Constants; + +/** + * Created by Thiakil on 12/07/2019. + */ +public abstract class FluidStackIngredient implements InputIngredient +{ + + public static FluidStackIngredient from(@Nonnull Fluid instance, int amount) + { + return from(new FluidStack(instance, amount)); + } + + public static FluidStackIngredient from(@Nonnull FluidStack instance) + { + return new Single(instance); + } + + public static FluidStackIngredient from(@Nonnull ITag fluidTag, int minAmount) + { + return new Tagged(fluidTag, minAmount); + } + + public static FluidStackIngredient read(PacketBuffer buffer) + { + // TODO: Allow supporting serialization of different types than just the ones we + // implement? + IngredientType type = buffer.readEnumValue(IngredientType.class); + if (type == IngredientType.SINGLE) + { + return Single.read(buffer); + } else if (type == IngredientType.TAGGED) + { + return Tagged.read(buffer); + } + return Multi.read(buffer); + } + + public static FluidStackIngredient deserialize(@Nullable JsonElement json) + { + if (json == null || json.isJsonNull()) + { + throw new JsonSyntaxException("Ingredient cannot be null"); + } + if (json.isJsonArray()) + { + JsonArray jsonArray = json.getAsJsonArray(); + int size = jsonArray.size(); + if (size == 0) + { + throw new JsonSyntaxException("Ingredient array cannot be empty, at least one ingredient must be defined"); + } else if (size > 1) + { + FluidStackIngredient[] ingredients = new FluidStackIngredient[size]; + for (int i = 0; i < size; i++) + { + // Read all the ingredients + ingredients[i] = deserialize(jsonArray.get(i)); + } + return createMulti(ingredients); + } + // If we only have a single element, just set our json as that so that we don't + // have to use Multi for efficiency reasons + json = jsonArray.get(0); + } + if (!json.isJsonObject()) + { + throw new JsonSyntaxException("Expected fluid to be object or array of objects"); + } + JsonObject jsonObject = json.getAsJsonObject(); + if (jsonObject.has(Constants.JSON.FLUID) && jsonObject.has(Constants.JSON.TAG)) + { + throw new JsonParseException("An ingredient entry is either a tag or an fluid, not both"); + } else if (jsonObject.has(Constants.JSON.FLUID)) + { + return from(SerializerHelper.deserializeFluid(jsonObject)); + } else if (jsonObject.has(Constants.JSON.TAG)) + { + if (!jsonObject.has(Constants.JSON.AMOUNT)) + { + throw new JsonSyntaxException("Expected to receive a amount that is greater than zero"); + } + JsonElement count = jsonObject.get(Constants.JSON.AMOUNT); + if (!JSONUtils.isNumber(count)) + { + throw new JsonSyntaxException("Expected amount to be a number greater than zero."); + } + int amount = count.getAsJsonPrimitive().getAsInt(); + if (amount < 1) + { + throw new JsonSyntaxException("Expected amount to be greater than zero."); + } + ResourceLocation resourceLocation = new ResourceLocation(JSONUtils.getString(jsonObject, Constants.JSON.TAG)); + ITag tag = TagCollectionManager.getManager().getFluidTags().get(resourceLocation); + if (tag == null) + { + throw new JsonSyntaxException("Unknown fluid tag '" + resourceLocation + "'"); + } + return from(tag, amount); + } + throw new JsonSyntaxException("Expected to receive a resource location representing either a tag or a fluid."); + } + + public static FluidStackIngredient createMulti(FluidStackIngredient... ingredients) + { + if (ingredients.length == 0) + { + // TODO: Throw error + } else if (ingredients.length == 1) + { + return ingredients[0]; + } + List cleanedIngredients = new ArrayList<>(); + for (FluidStackIngredient ingredient : ingredients) + { + if (ingredient instanceof Multi) + { + // Don't worry about if our inner ingredients are multi as well, as if this is + // the only external method for + // creating a multi ingredient, then we are certified they won't be of a higher + // depth + cleanedIngredients.addAll(Arrays.asList(((Multi) ingredient).ingredients)); + } else + { + cleanedIngredients.add(ingredient); + } + } + // There should be more than a single fluid or we would have split out earlier + return new Multi(cleanedIngredients.toArray(new FluidStackIngredient[0])); + } + + public static class Single extends FluidStackIngredient + { + + @Nonnull + private final FluidStack fluidInstance; + + public Single(@Nonnull FluidStack fluidInstance) + { + this.fluidInstance = Objects.requireNonNull(fluidInstance); + } + + @Override + public boolean test(@Nonnull FluidStack fluidStack) + { + return testType(fluidStack) && fluidStack.getAmount() >= fluidInstance.getAmount(); + } + + @Override + public boolean testType(@Nonnull FluidStack fluidStack) + { + return Objects.requireNonNull(fluidStack).isFluidEqual(fluidInstance); + } + + @Nonnull + @Override + public FluidStack getMatchingInstance(@Nonnull FluidStack fluidStack) + { + return test(fluidStack) ? fluidInstance : FluidStack.EMPTY; + } + + @Nonnull + @Override + public List getRepresentations() + { + return Collections.singletonList(fluidInstance); + } + + @Override + public void write(PacketBuffer buffer) + { + buffer.writeEnumValue(IngredientType.SINGLE); + fluidInstance.writeToPacket(buffer); + } + + @Nonnull + @Override + public JsonElement serialize() + { + JsonObject json = new JsonObject(); + json.addProperty(Constants.JSON.AMOUNT, fluidInstance.getAmount()); + json.addProperty(Constants.JSON.FLUID, fluidInstance.getFluid().getRegistryName().toString()); + if (fluidInstance.hasTag()) + { + json.addProperty(Constants.JSON.NBT, fluidInstance.getTag().toString()); + } + return json; + } + + public static Single read(PacketBuffer buffer) + { + return new Single(FluidStack.readFromPacket(buffer)); + } + } + + public static class Tagged extends FluidStackIngredient + { + + @Nonnull + private final ITag tag; + private final int amount; + + public Tagged(@Nonnull ITag tag, int amount) + { + this.tag = tag; + this.amount = amount; + } + + @Override + public boolean test(@Nonnull FluidStack fluidStack) + { + return testType(fluidStack) && fluidStack.getAmount() >= amount; + } + + @Override + public boolean testType(@Nonnull FluidStack fluidStack) + { + return Objects.requireNonNull(fluidStack).getFluid().isIn(tag); + } + + @Nonnull + @Override + public FluidStack getMatchingInstance(@Nonnull FluidStack fluidStack) + { + if (test(fluidStack)) + { + // Our fluid is in the tag so we make a new stack with the given amount + return new FluidStack(fluidStack, amount); + } + return FluidStack.EMPTY; + } + + @Nonnull + @Override + public List getRepresentations() + { + // TODO: Can this be cached some how + List representations = new ArrayList<>(); + for (Fluid fluid : TagResolverHelper.getRepresentations(tag)) + { + representations.add(new FluidStack(fluid, amount)); + } + return representations; + } + + @Override + public void write(PacketBuffer buffer) + { + buffer.writeEnumValue(IngredientType.TAGGED); + buffer.writeResourceLocation(TagCollectionManager.getManager().getFluidTags().getValidatedIdFromTag(tag)); + buffer.writeVarInt(amount); + } + + @Nonnull + @Override + public JsonElement serialize() + { + JsonObject json = new JsonObject(); + json.addProperty(Constants.JSON.AMOUNT, amount); + json.addProperty(Constants.JSON.TAG, TagCollectionManager.getManager().getFluidTags().getValidatedIdFromTag(tag).toString()); + return json; + } + + public static Tagged read(PacketBuffer buffer) + { + return new Tagged(FluidTags.makeWrapperTag(buffer.readResourceLocation().toString()), buffer.readVarInt()); + } + } + + public static class Multi extends FluidStackIngredient + { + + private final FluidStackIngredient[] ingredients; + + protected Multi(@Nonnull FluidStackIngredient... ingredients) + { + this.ingredients = ingredients; + } + + @Override + public boolean test(@Nonnull FluidStack stack) + { + return Arrays.stream(ingredients).anyMatch(ingredient -> ingredient.test(stack)); + } + + @Override + public boolean testType(@Nonnull FluidStack stack) + { + return Arrays.stream(ingredients).anyMatch(ingredient -> ingredient.testType(stack)); + } + + @Nonnull + @Override + public FluidStack getMatchingInstance(@Nonnull FluidStack stack) + { + for (FluidStackIngredient ingredient : ingredients) + { + FluidStack matchingInstance = ingredient.getMatchingInstance(stack); + if (!matchingInstance.isEmpty()) + { + return matchingInstance; + } + } + return FluidStack.EMPTY; + } + + @Nonnull + @Override + public List getRepresentations() + { + List representations = new ArrayList<>(); + for (FluidStackIngredient ingredient : ingredients) + { + representations.addAll(ingredient.getRepresentations()); + } + return representations; + } + + @Override + public void write(PacketBuffer buffer) + { + buffer.writeEnumValue(IngredientType.MULTI); + buffer.writeVarInt(ingredients.length); + for (FluidStackIngredient ingredient : ingredients) + { + ingredient.write(buffer); + } + } + + @Nonnull + @Override + public JsonElement serialize() + { + JsonArray json = new JsonArray(); + for (FluidStackIngredient ingredient : ingredients) + { + json.add(ingredient.serialize()); + } + return json; + } + + public static FluidStackIngredient read(PacketBuffer buffer) + { + FluidStackIngredient[] ingredients = new FluidStackIngredient[buffer.readVarInt()]; + for (int i = 0; i < ingredients.length; i++) + { + ingredients[i] = FluidStackIngredient.read(buffer); + } + return createMulti(ingredients); + } + } + + private enum IngredientType + { + SINGLE, + TAGGED, + MULTI + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/recipe/helper/IgnoredIInventory.java b/src/main/java/wayoftime/bloodmagic/recipe/helper/IgnoredIInventory.java new file mode 100644 index 00000000..be062c29 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/helper/IgnoredIInventory.java @@ -0,0 +1,67 @@ +package wayoftime.bloodmagic.recipe.helper; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public final class IgnoredIInventory implements IInventory +{ + public static final IgnoredIInventory INSTANCE = new IgnoredIInventory(); + + private IgnoredIInventory() + { + } + + @Override + public int getSizeInventory() + { + return 0; + } + + @Override + public boolean isEmpty() + { + return true; + } + + @Override + public ItemStack getStackInSlot(int index) + { + return ItemStack.EMPTY; + } + + @Override + public ItemStack decrStackSize(int index, int count) + { + return ItemStack.EMPTY; + } + + @Override + public ItemStack removeStackFromSlot(int index) + { + return ItemStack.EMPTY; + } + + @Override + public void setInventorySlotContents(int index, @Nonnull ItemStack stack) + { + } + + @Override + public void markDirty() + { + } + + @Override + public boolean isUsableByPlayer(@Nonnull PlayerEntity player) + { + return false; + } + + @Override + public void clear() + { + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/helper/InputIngredient.java b/src/main/java/wayoftime/bloodmagic/recipe/helper/InputIngredient.java new file mode 100644 index 00000000..366e712d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/helper/InputIngredient.java @@ -0,0 +1,52 @@ +package wayoftime.bloodmagic.recipe.helper; + +import java.util.List; +import java.util.function.Predicate; + +import javax.annotation.Nonnull; + +import com.google.gson.JsonElement; + +import net.minecraft.network.PacketBuffer; + +public interface InputIngredient extends Predicate +{ + + /** + * Evaluates this predicate on the given argument, ignoring any size data. + * + * @param type the input argument + * + * @return {@code true} if the input argument matches the predicate, otherwise + * {@code false} + */ + boolean testType(@Nonnull TYPE type); + + TYPE getMatchingInstance(TYPE type); + + /** + * Primarily for JEI, a list of valid instances of the type + * + * @return List (empty means no valid registrations found and recipe is to be + * hidden) + * + * @apiNote Do not modify any of the values returned by the representations + */ + @Nonnull + List getRepresentations(); + + /** + * Writes this ingredient to a PacketBuffer. + * + * @param buffer The buffer to write to. + */ + void write(PacketBuffer buffer); + + /** + * Serializes this ingredient to a JsonElement + * + * @return JsonElement representation of this ingredient. + */ + @Nonnull + JsonElement serialize(); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/recipe/helper/SerializerHelper.java b/src/main/java/wayoftime/bloodmagic/recipe/helper/SerializerHelper.java new file mode 100644 index 00000000..da325df7 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/helper/SerializerHelper.java @@ -0,0 +1,129 @@ +package wayoftime.bloodmagic.recipe.helper; + +import javax.annotation.Nonnull; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; +import com.mojang.brigadier.exceptions.CommandSyntaxException; + +import net.minecraft.fluid.Fluid; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.ShapedRecipe; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.JsonToNBT; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.util.Constants; + +/** + * Copied liberally from Mekanism. Thanks, pupnewfster! + * + */ +public class SerializerHelper +{ + private SerializerHelper() + { + } + + private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create(); + + private static void validateKey(@Nonnull JsonObject json, @Nonnull String key) + { + if (!json.has(key)) + { + throw new JsonSyntaxException("Missing '" + key + "', expected to find an object"); + } + if (!json.get(key).isJsonObject()) + { + throw new JsonSyntaxException("Expected '" + key + "' to be an object"); + } + } + + public static ItemStack getItemStack(@Nonnull JsonObject json, @Nonnull String key) + { + validateKey(json, key); + return ShapedRecipe.deserializeItem(JSONUtils.getJsonObject(json, key)); + } + + public static JsonElement serializeItemStack(@Nonnull ItemStack stack) + { + JsonObject json = new JsonObject(); + json.addProperty(Constants.JSON.ITEM, stack.getItem().getRegistryName().toString()); + if (stack.getCount() > 1) + { + json.addProperty(Constants.JSON.COUNT, stack.getCount()); + } + if (stack.hasTag()) + { + json.addProperty(Constants.JSON.NBT, stack.getTag().toString()); + } + return json; + } + + public static FluidStack getFluidStack(@Nonnull JsonObject json, @Nonnull String key) + { + validateKey(json, key); + return deserializeFluid(JSONUtils.getJsonObject(json, key)); + } + + public static FluidStack deserializeFluid(@Nonnull JsonObject json) + { + if (!json.has(Constants.JSON.AMOUNT)) + { + throw new JsonSyntaxException("Expected to receive a amount that is greater than zero"); + } + JsonElement count = json.get(Constants.JSON.AMOUNT); + if (!JSONUtils.isNumber(count)) + { + throw new JsonSyntaxException("Expected amount to be a number greater than zero."); + } + int amount = count.getAsJsonPrimitive().getAsInt(); + if (amount < 1) + { + throw new JsonSyntaxException("Expected amount to be greater than zero."); + } + ResourceLocation resourceLocation = new ResourceLocation(JSONUtils.getString(json, Constants.JSON.FLUID)); + Fluid fluid = ForgeRegistries.FLUIDS.getValue(resourceLocation); + if (fluid == null || fluid == Fluids.EMPTY) + { + throw new JsonSyntaxException("Invalid fluid type '" + resourceLocation + "'"); + } + CompoundNBT nbt = null; + if (json.has(Constants.JSON.NBT)) + { + JsonElement jsonNBT = json.get(Constants.JSON.NBT); + try + { + if (jsonNBT.isJsonObject()) + { + nbt = JsonToNBT.getTagFromJson(GSON.toJson(jsonNBT)); + } else + { + nbt = JsonToNBT.getTagFromJson(JSONUtils.getString(jsonNBT, Constants.JSON.NBT)); + } + } catch (CommandSyntaxException e) + { + throw new JsonSyntaxException("Invalid NBT entry for fluid '" + resourceLocation + "'"); + } + } + return new FluidStack(fluid, amount, nbt); + } + + public static JsonElement serializeFluidStack(@Nonnull FluidStack stack) + { + JsonObject json = new JsonObject(); + json.addProperty(Constants.JSON.FLUID, stack.getFluid().getRegistryName().toString()); + json.addProperty(Constants.JSON.AMOUNT, stack.getAmount()); + if (stack.hasTag()) + { + json.addProperty(Constants.JSON.NBT, stack.getTag().toString()); + } + return json; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/recipe/helper/TagResolverHelper.java b/src/main/java/wayoftime/bloodmagic/recipe/helper/TagResolverHelper.java new file mode 100644 index 00000000..02a5eaac --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/recipe/helper/TagResolverHelper.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.recipe.helper; + +import java.util.Collections; +import java.util.List; + +import net.minecraft.tags.ITag; + +/** + * Copied from Mekanism, including the author's rant about tags. + */ +public class TagResolverHelper +{ + + public static List getRepresentations(ITag tag) + { + try + { + return tag.getAllElements(); + } catch (IllegalStateException e) + { + // Why do tags have to be such an annoyance in 1.16 + // This is needed so that we can ensure we give JEI an empty list of + // representations + // instead of crashing on the first run, as recipes get "initialized" before + // tags are + // done initializing, and we don't want to spam the log with errors. JEI and + // things + // still work fine regardless of this + return Collections.emptyList(); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/AreaDescriptor.java b/src/main/java/wayoftime/bloodmagic/ritual/AreaDescriptor.java new file mode 100644 index 00000000..b37eeb80 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/AreaDescriptor.java @@ -0,0 +1,654 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.gen.feature.template.Template; +import wayoftime.bloodmagic.util.Constants; + +public abstract class AreaDescriptor implements Iterator +{ + public List getContainedPositions(BlockPos pos) + { + return new ArrayList<>(); + } + + public AxisAlignedBB getAABB(BlockPos pos) + { + return null; + } + + public abstract void resetCache(); + + public abstract boolean isWithinArea(BlockPos pos); + + public abstract void resetIterator(); + + public void readFromNBT(CompoundNBT tag) + { + + } + + public void writeToNBT(CompoundNBT tag) + { + + } + + public abstract AreaDescriptor copy(); + + public abstract int getVolumeForOffsets(BlockPos offset1, BlockPos offset2); + + public abstract boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit); + + public abstract int getVolume(); + + public abstract int getHeight(); + + public abstract boolean isWithinRange(int verticalLimit, int horizontalLimit); + + /** + * This method changes the area descriptor so that its range matches the two + * blocks that are selected. When implementing this method, assume that these + * positions are the blocks that are clicked by the player. + * + * @param pos1 + * @param pos2 + */ + public abstract void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2); + + public abstract boolean intersects(AreaDescriptor descriptor); + + public abstract AreaDescriptor offset(BlockPos offset); + + public abstract AreaDescriptor rotateDescriptor(PlacementSettings settings); + + public static class Rectangle extends AreaDescriptor + { + protected BlockPos minimumOffset; + protected BlockPos maximumOffset; // Non-inclusive maximum offset. + private BlockPos currentPosition; + + private ArrayList blockPosCache; + private BlockPos cachedPosition; + + private boolean cache = true; + + /** + * This constructor takes in the minimum and maximum BlockPos. The maximum + * offset is non-inclusive, meaning if you pass in (0,0,0) and (1,1,1), calling + * getContainedPositions() will only give (0,0,0). + * + * @param minimumOffset - + * @param maximumOffset - + */ + public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset) + { + setOffsets(minimumOffset, maximumOffset); + } + + public Rectangle(BlockPos minimumOffset, int sizeX, int sizeY, int sizeZ) + { + this(minimumOffset, minimumOffset.add(sizeX, sizeY, sizeZ)); + } + + public Rectangle(BlockPos minimumOffset, int size) + { + this(minimumOffset, size, size, size); + } + + public Rectangle(AreaDescriptor.Rectangle rectangle) + { + this(rectangle.minimumOffset, rectangle.maximumOffset); + } + + public AreaDescriptor.Rectangle copy() + { + return new AreaDescriptor.Rectangle(this); + } + + @Override + public List getContainedPositions(BlockPos pos) + { + if (!cache || !pos.equals(cachedPosition) || blockPosCache.isEmpty()) + { + ArrayList posList = new ArrayList<>(); + + for (int j = minimumOffset.getY(); j < maximumOffset.getY(); j++) + { + for (int i = minimumOffset.getX(); i < maximumOffset.getX(); i++) + { + for (int k = minimumOffset.getZ(); k < maximumOffset.getZ(); k++) + { + posList.add(pos.add(i, j, k)); + } + } + } + + blockPosCache = posList; + cachedPosition = pos; + } + + return Collections.unmodifiableList(blockPosCache); + } + + @Override + public AxisAlignedBB getAABB(BlockPos pos) + { + AxisAlignedBB tempAABB = new AxisAlignedBB(minimumOffset, maximumOffset); + return tempAABB.offset(pos.getX(), pos.getY(), pos.getZ()); + } + + @Override + public int getHeight() + { + return this.maximumOffset.getY() - this.minimumOffset.getY(); + } + + public BlockPos getMinimumOffset() + { + return minimumOffset; + } + + public BlockPos getMaximumOffset() + { + return maximumOffset; + } + + /** + * Sets the offsets of the AreaDescriptor in a safe way that will make + * minimumOffset the lowest corner + * + * @param offset1 - + * @param offset2 - + */ + public void setOffsets(BlockPos offset1, BlockPos offset2) + { + this.minimumOffset = new BlockPos(Math.min(offset1.getX(), offset2.getX()), Math.min(offset1.getY(), offset2.getY()), Math.min(offset1.getZ(), offset2.getZ())); + this.maximumOffset = new BlockPos(Math.max(offset1.getX(), offset2.getX()), Math.max(offset1.getY(), offset2.getY()), Math.max(offset1.getZ(), offset2.getZ())); + blockPosCache = new ArrayList<>(); + } + + @Override + public void resetCache() + { + this.blockPosCache = new ArrayList<>(); + } + + @Override + public boolean isWithinArea(BlockPos pos) + { + int x = pos.getX(); + int y = pos.getY(); + int z = pos.getZ(); + + return x >= minimumOffset.getX() && x < maximumOffset.getX() && y >= minimumOffset.getY() + && y < maximumOffset.getY() && z >= minimumOffset.getZ() && z < maximumOffset.getZ(); + } + + @Override + public boolean hasNext() + { + return currentPosition == null || !(currentPosition.getX() + 1 == maximumOffset.getX() + && currentPosition.getY() + 1 == maximumOffset.getY() + && currentPosition.getZ() + 1 == maximumOffset.getZ()); + } + + @Override + public BlockPos next() + { + if (currentPosition != null) + { + int nextX = currentPosition.getX() + 1 >= maximumOffset.getX() ? minimumOffset.getX() + : currentPosition.getX() + 1; + int nextZ = nextX != minimumOffset.getX() ? currentPosition.getZ() + : (currentPosition.getZ() + 1 >= maximumOffset.getZ() ? minimumOffset.getZ() + : currentPosition.getZ() + 1); + int nextY = (nextZ != minimumOffset.getZ() || nextX != minimumOffset.getX()) ? currentPosition.getY() + : (currentPosition.getY() + 1); + currentPosition = new BlockPos(nextX, nextY, nextZ); + } else + { + currentPosition = minimumOffset; + } + + return currentPosition; + } + + @Override + public void remove() + { + + } + + @Override + public void resetIterator() + { + currentPosition = null; + } + + @Override + public void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2) + { + setOffsets(pos1, pos2); + maximumOffset = maximumOffset.add(1, 1, 1); + resetIterator(); + resetCache(); + } + + @Override + public void readFromNBT(CompoundNBT tag) + { + minimumOffset = new BlockPos(tag.getInt(Constants.NBT.X_COORD + "min"), tag.getInt(Constants.NBT.Y_COORD + "min"), tag.getInt(Constants.NBT.Z_COORD + "min")); + maximumOffset = new BlockPos(tag.getInt(Constants.NBT.X_COORD + "max"), tag.getInt(Constants.NBT.Y_COORD + "max"), tag.getInt(Constants.NBT.Z_COORD + "max")); + } + + @Override + public void writeToNBT(CompoundNBT tag) + { + tag.putInt(Constants.NBT.X_COORD + "min", minimumOffset.getX()); + tag.putInt(Constants.NBT.Y_COORD + "min", minimumOffset.getY()); + tag.putInt(Constants.NBT.Z_COORD + "min", minimumOffset.getZ()); + tag.putInt(Constants.NBT.X_COORD + "max", maximumOffset.getX()); + tag.putInt(Constants.NBT.Y_COORD + "max", maximumOffset.getY()); + tag.putInt(Constants.NBT.Z_COORD + "max", maximumOffset.getZ()); + } + + @Override + public int getVolumeForOffsets(BlockPos offset1, BlockPos offset2) + { + BlockPos minPos = new BlockPos(Math.min(offset1.getX(), offset2.getX()), Math.min(offset1.getY(), offset2.getY()), Math.min(offset1.getZ(), offset2.getZ())); + BlockPos maxPos = new BlockPos(Math.max(offset1.getX(), offset2.getX()), Math.max(offset1.getY(), offset2.getY()), Math.max(offset1.getZ(), offset2.getZ())); + + maxPos = maxPos.add(1, 1, 1); + + return (maxPos.getX() - minPos.getX()) * (maxPos.getY() - minPos.getY()) * (maxPos.getZ() - minPos.getZ()); + } + + @Override + public boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit) + { + BlockPos minPos = new BlockPos(Math.min(offset1.getX(), offset2.getX()), Math.min(offset1.getY(), offset2.getY()), Math.min(offset1.getZ(), offset2.getZ())); + BlockPos maxPos = new BlockPos(Math.max(offset1.getX(), offset2.getX()), Math.max(offset1.getY(), offset2.getY()), Math.max(offset1.getZ(), offset2.getZ())); + + return minPos.getY() >= -verticalLimit && maxPos.getY() <= verticalLimit + && minPos.getX() >= -horizontalLimit && maxPos.getX() <= horizontalLimit + && minPos.getZ() >= -horizontalLimit && maxPos.getZ() <= horizontalLimit; + } + + @Override + public int getVolume() + { + return (maximumOffset.getX() - minimumOffset.getX()) * (maximumOffset.getY() - minimumOffset.getY()) + * (maximumOffset.getZ() - minimumOffset.getZ()); + } + + @Override + public boolean isWithinRange(int verticalLimit, int horizontalLimit) + { + return minimumOffset.getY() >= -verticalLimit && maximumOffset.getY() <= verticalLimit + 1 + && minimumOffset.getX() >= -horizontalLimit && maximumOffset.getX() <= horizontalLimit + 1 + && minimumOffset.getZ() >= -horizontalLimit && maximumOffset.getZ() <= horizontalLimit + 1; + } + + @Override + public boolean intersects(AreaDescriptor descriptor) + { + if (descriptor instanceof AreaDescriptor.Rectangle) + { + AreaDescriptor.Rectangle rectangle = (AreaDescriptor.Rectangle) descriptor; + + return !(minimumOffset.getX() >= rectangle.maximumOffset.getX() + || minimumOffset.getY() >= rectangle.maximumOffset.getY() + || minimumOffset.getZ() >= rectangle.maximumOffset.getZ() + || rectangle.minimumOffset.getX() >= maximumOffset.getX() + || rectangle.minimumOffset.getY() >= maximumOffset.getY() + || rectangle.minimumOffset.getZ() >= maximumOffset.getZ()); + } + + return false; + } + + @Override + public AreaDescriptor offset(BlockPos offset) + { + return new AreaDescriptor.Rectangle(this.minimumOffset.add(offset), this.maximumOffset.add(offset)); + } + + @Override + public AreaDescriptor rotateDescriptor(PlacementSettings settings) + { + BlockPos rotatePos1 = Template.transformedBlockPos(settings, minimumOffset); + BlockPos rotatePos2 = Template.transformedBlockPos(settings, maximumOffset.add(-1, -1, -1)); // It works, + // shut up! + + AreaDescriptor.Rectangle rectangle = new AreaDescriptor.Rectangle(this.minimumOffset, 1); + rectangle.modifyAreaByBlockPositions(rotatePos1, rotatePos2); + + return rectangle; + } + } + + public static class HemiSphere extends AreaDescriptor + { + private BlockPos minimumOffset; + private int radius; + + private ArrayList blockPosCache; + private BlockPos cachedPosition; + + private boolean cache = true; + + public HemiSphere(BlockPos minimumOffset, int radius) + { + setRadius(minimumOffset, radius); + } + + public HemiSphere(AreaDescriptor.HemiSphere hemiSphere) + { + this(hemiSphere.minimumOffset, hemiSphere.radius); + } + + public AreaDescriptor.HemiSphere copy() + { + return new AreaDescriptor.HemiSphere(this); + } + + public void setRadius(BlockPos minimumOffset, int radius) + { + this.minimumOffset = new BlockPos(Math.min(minimumOffset.getX(), minimumOffset.getX()), Math.min(minimumOffset.getY(), minimumOffset.getY()), Math.min(minimumOffset.getZ(), minimumOffset.getZ())); + this.radius = radius; + blockPosCache = new ArrayList<>(); + } + + @Override + public int getHeight() + { + return this.radius * 2; + } + + @Override + public List getContainedPositions(BlockPos pos) + { + if (!cache || !pos.equals(cachedPosition) || blockPosCache.isEmpty()) + { + ArrayList posList = new ArrayList<>(); + + int i = -radius; + int j = minimumOffset.getY(); + int k = -radius; + + // TODO For some reason the bottom of the hemisphere is not going up with the + // minOffset + + while (i <= radius) + { + while (j <= radius) + { + while (k <= radius) + { + if (i * i + j * j + k * k >= (radius + 0.5F) * (radius + 0.5F)) + { + k++; + continue; + } + + posList.add(pos.add(i, j, k)); + k++; + } + + k = -radius; + j++; + } + + j = minimumOffset.getY(); + i++; + } + + blockPosCache = posList; + cachedPosition = pos; + } + + return Collections.unmodifiableList(blockPosCache); + } + + /** + * Since you can't make a box using a sphere, this returns null + */ + @Override + public AxisAlignedBB getAABB(BlockPos pos) + { + return null; + } + + @Override + public void resetCache() + { + this.blockPosCache = new ArrayList<>(); + } + + @Override + public boolean isWithinArea(BlockPos pos) + { + return blockPosCache.contains(pos); + } + + @Override + public boolean hasNext() + { + return false; + } + + @Override + public BlockPos next() + { + return null; + } + + @Override + public void remove() + { + + } + + @Override + public void resetIterator() + { + + } + + @Override + public void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2) + { + + } + + @Override + public int getVolumeForOffsets(BlockPos pos1, BlockPos pos2) + { + return 0; + } + + @Override + public boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit) + { + return false; + } + + @Override + public int getVolume() + { + return 0; + } + + @Override + public boolean isWithinRange(int verticalLimit, int horizontalLimit) + { + return false; + } + + @Override + public boolean intersects(AreaDescriptor descriptor) + { + return false; + } + + @Override + public AreaDescriptor offset(BlockPos offset) + { + return new AreaDescriptor.HemiSphere(minimumOffset.add(offset), radius); + } + + @Override + public AreaDescriptor rotateDescriptor(PlacementSettings settings) + { + return this; + } + } + + public static class Cross extends AreaDescriptor + { + + private ArrayList blockPosCache; + private BlockPos cachedPosition; + + private BlockPos centerPos; + private int size; + + private boolean cache = true; + + public Cross(BlockPos center, int size) + { + this.centerPos = center; + this.size = size; + this.blockPosCache = new ArrayList<>(); + } + + public Cross(AreaDescriptor.Cross cross) + { + this(cross.centerPos, cross.size); + } + + public AreaDescriptor.Cross copy() + { + return new AreaDescriptor.Cross(this); + } + + @Override + public int getHeight() + { + return this.size * 2 + 1; + } + + @Override + public List getContainedPositions(BlockPos pos) + { + if (!cache || !pos.equals(cachedPosition) || blockPosCache.isEmpty()) + { + resetCache(); + + blockPosCache.add(centerPos.add(pos)); + for (int i = 1; i <= size; i++) + { + blockPosCache.add(centerPos.add(pos).add(i, 0, 0)); + blockPosCache.add(centerPos.add(pos).add(0, 0, i)); + blockPosCache.add(centerPos.add(pos).add(-i, 0, 0)); + blockPosCache.add(centerPos.add(pos).add(0, 0, -i)); + } + } + + cachedPosition = pos; + + return Collections.unmodifiableList(blockPosCache); + } + + @Override + public void resetCache() + { + blockPosCache = new ArrayList<>(); + } + + @Override + public boolean isWithinArea(BlockPos pos) + { + return blockPosCache.contains(pos); + } + + @Override + public boolean hasNext() + { + return false; + } + + @Override + public BlockPos next() + { + return null; + } + + @Override + public void remove() + { + + } + + @Override + public void resetIterator() + { + + } + + @Override + public void modifyAreaByBlockPositions(BlockPos pos1, BlockPos pos2) + { + + } + + @Override + public int getVolumeForOffsets(BlockPos pos1, BlockPos pos2) + { + return 0; + } + + @Override + public boolean isWithinRange(BlockPos offset1, BlockPos offset2, int verticalLimit, int horizontalLimit) + { + return false; + } + + @Override + public int getVolume() + { + return 0; + } + + @Override + public boolean isWithinRange(int verticalLimit, int horizontalLimit) + { + return false; + } + + @Override + public boolean intersects(AreaDescriptor descriptor) + { + return false; + } + + @Override + public AreaDescriptor offset(BlockPos offset) + { + return new AreaDescriptor.Cross(centerPos.add(offset), size); + } + + @Override + public AreaDescriptor rotateDescriptor(PlacementSettings settings) + { + return this; + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/CapabilityRuneType.java b/src/main/java/wayoftime/bloodmagic/ritual/CapabilityRuneType.java new file mode 100644 index 00000000..258867c4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/CapabilityRuneType.java @@ -0,0 +1,58 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.concurrent.Callable; + +import net.minecraft.nbt.ByteNBT; +import net.minecraft.nbt.INBT; +import net.minecraft.util.Direction; +import net.minecraftforge.common.capabilities.Capability; + +public final class CapabilityRuneType +{ + public static class RuneTypeStorage implements Capability.IStorage + { + @Override + public INBT writeNBT(Capability capability, IRitualStone.Tile instance, Direction side) + { + return ByteNBT.valueOf((byte) instance.getRuneType().ordinal()); + } + + @Override + public void readNBT(Capability capability, IRitualStone.Tile instance, Direction side, INBT nbt) + { + instance.setRuneType(EnumRuneType.byMetadata(((ByteNBT) nbt).getByte())); + } + } + + public static class RuneTypeWrapper implements IRitualStone.Tile + { + private EnumRuneType type = EnumRuneType.BLANK; + + @Override + public boolean isRuneType(EnumRuneType runeType) + { + return type == runeType; + } + + @Override + public EnumRuneType getRuneType() + { + return type; + } + + public void setRuneType(EnumRuneType runeType) + { + type = runeType; + } + } + + public static class Factory implements Callable + { + @Override + public IRitualStone.Tile call() + throws Exception + { + return new RuneTypeWrapper(); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/EnumReaderBoundaries.java b/src/main/java/wayoftime/bloodmagic/ritual/EnumReaderBoundaries.java new file mode 100644 index 00000000..3e664671 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/EnumReaderBoundaries.java @@ -0,0 +1,22 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.Locale; + +import net.minecraft.util.IStringSerializable; + +public enum EnumReaderBoundaries implements IStringSerializable +{ + SUCCESS, VOLUME_TOO_LARGE, NOT_WITHIN_BOUNDARIES; + + @Override + public String toString() + { + return name().toLowerCase(Locale.ROOT); + } + + @Override + public String getString() + { + return toString(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/EnumRitualReaderState.java b/src/main/java/wayoftime/bloodmagic/ritual/EnumRitualReaderState.java new file mode 100644 index 00000000..8ed0308a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/EnumRitualReaderState.java @@ -0,0 +1,8 @@ +package wayoftime.bloodmagic.ritual; + +public enum EnumRitualReaderState +{ + SET_AREA, + INFORMATION, + SET_WILL_TYPES,; +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/EnumRuneType.java b/src/main/java/wayoftime/bloodmagic/ritual/EnumRuneType.java new file mode 100644 index 00000000..959e771d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/EnumRuneType.java @@ -0,0 +1,54 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.Locale; + +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.text.TextFormatting; + +public enum EnumRuneType implements IStringSerializable +{ + BLANK(TextFormatting.GRAY), + WATER(TextFormatting.AQUA), + FIRE(TextFormatting.RED), + EARTH(TextFormatting.GREEN), + AIR(TextFormatting.WHITE), + DUSK(TextFormatting.DARK_GRAY), + DAWN(TextFormatting.GOLD); + + public final TextFormatting colorCode; + + EnumRuneType(TextFormatting colorCode) + { + this.colorCode = colorCode; + } + + @Override + public String toString() + { + return name().toLowerCase(Locale.ENGLISH); + } + + @Override + public String getString() + { + return this.toString(); + } + +// @Nonnull +// public ItemStack getStack(int count) +// { +// ItemStack ret = new ItemStack(RegistrarBloodMagicItems.INSCRIPTION_TOOL, count, ordinal()); +// CompoundNBT tag = new CompoundNBT(); +// tag.putInt(Constants.NBT.USES, 10); +// ret.setTag(tag); +// return ret; +// } + + public static EnumRuneType byMetadata(int meta) + { + if (meta < 0 || meta >= values().length) + meta = 0; + + return values()[meta]; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/IMasterRitualStone.java b/src/main/java/wayoftime/bloodmagic/ritual/IMasterRitualStone.java new file mode 100644 index 00000000..775e5642 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/IMasterRitualStone.java @@ -0,0 +1,81 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +/** + * This interface is for internal implementation only. + *

+ * It is provided via the API for easy obtaining of basic data. + */ +public interface IMasterRitualStone +{ + UUID getOwner(); + + SoulNetwork getOwnerNetwork(); + + boolean activateRitual(ItemStack activationCrystal, PlayerEntity activator, Ritual ritual); + + void performRitual(World world, BlockPos pos); + + void stopRitual(Ritual.BreakType breakType); + + int getCooldown(); + + void setCooldown(int cooldown); + + boolean isActive(); + + void setActive(boolean active); + + Direction getDirection(); + + boolean areTanksEmpty(); + + int getRunningTime(); + + World getWorldObj(); + + BlockPos getBlockPos(); + + String getNextBlockRange(String range); + + void provideInformationOfRitualToPlayer(PlayerEntity player); + + void provideInformationOfRangeToPlayer(PlayerEntity player, String range); + + void provideInformationOfWillConfigToPlayer(PlayerEntity player, List typeList); + + void setActiveWillConfig(PlayerEntity player, List typeList); + + EnumReaderBoundaries setBlockRangeByBounds(PlayerEntity player, String range, BlockPos offset1, BlockPos offset2); + + List getActiveWillConfig(); + + default SoulTicket ticket(int amount) + { + return SoulTicket.block(getWorldObj(), getBlockPos(), amount); + } + + AreaDescriptor getBlockRange(String range); + + void addBlockRanges(Map blockRanges); + + void addBlockRange(String range, AreaDescriptor defaultRange); + + void setBlockRanges(Map blockRanges); + + void setBlockRange(String range, AreaDescriptor defaultRange); + + Ritual getCurrentRitual(); +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/IRitualStone.java b/src/main/java/wayoftime/bloodmagic/ritual/IRitualStone.java new file mode 100644 index 00000000..a4409fe9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/IRitualStone.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.ritual; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public interface IRitualStone +{ + boolean isRuneType(World world, BlockPos pos, EnumRuneType runeType); + + void setRuneType(World world, BlockPos pos, EnumRuneType runeType); + + interface Tile + { + boolean isRuneType(EnumRuneType runeType); + + EnumRuneType getRuneType(); + + void setRuneType(EnumRuneType runeType); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/ModRituals.java b/src/main/java/wayoftime/bloodmagic/ritual/ModRituals.java new file mode 100644 index 00000000..e3421d7d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/ModRituals.java @@ -0,0 +1,26 @@ +package wayoftime.bloodmagic.ritual; + +import net.minecraft.block.Blocks; +import wayoftime.bloodmagic.ritual.harvest.HarvestHandlerPlantable; +import wayoftime.bloodmagic.ritual.harvest.HarvestHandlerStem; +import wayoftime.bloodmagic.ritual.harvest.HarvestHandlerTall; +import wayoftime.bloodmagic.ritual.harvest.HarvestRegistry; + +public class ModRituals +{ + public static void initHarvestHandlers() + { + HarvestRegistry.registerRangeAmplifier(Blocks.DIAMOND_BLOCK.getDefaultState(), 15); + HarvestRegistry.registerRangeAmplifier(Blocks.GOLD_BLOCK.getDefaultState(), 10); + HarvestRegistry.registerRangeAmplifier(Blocks.IRON_BLOCK.getDefaultState(), 6); + + HarvestRegistry.registerHandler(new HarvestHandlerPlantable()); + HarvestRegistry.registerHandler(new HarvestHandlerTall()); + HarvestRegistry.registerHandler(new HarvestHandlerStem()); + } +// +// public static void initCuttingFluids() { +// CrushingRegistry.registerCuttingFluid(new CrushingHandlerCuttingFluid(ItemCuttingFluid.FluidType.BASIC.getStack(), 250, 0.5)); +// CrushingRegistry.registerCuttingFluid(new CrushingHandlerCuttingFluid(ItemCuttingFluid.FluidType.EXPLOSIVE.getStack(), 25, 0.05)); +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/Ritual.java b/src/main/java/wayoftime/bloodmagic/ritual/Ritual.java new file mode 100644 index 00000000..648e18e6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/Ritual.java @@ -0,0 +1,427 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; +import java.util.function.Consumer; + +import org.apache.commons.lang3.builder.ToStringBuilder; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.ListNBT; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +/** + * Abstract class for creating new rituals. Register your ritual by annotating + * it with {@link RitualRegister} + */ +public abstract class Ritual +{ + + protected final Map modableRangeMap = new HashMap<>(); + protected final Map volumeRangeMap = new HashMap<>(); + protected final Map horizontalRangeMap = new HashMap<>(); + protected final Map verticalRangeMap = new HashMap<>(); + private final String name; + private final int crystalLevel; + private final int activationCost; + private final RitualRenderer renderer; + private final String unlocalizedName; + + public Ritual(String name, int crystalLevel, int activationCost, RitualRenderer renderer, String unlocalizedName) + { + this.name = name; + this.crystalLevel = crystalLevel; + this.activationCost = activationCost; + this.renderer = renderer; + this.unlocalizedName = unlocalizedName; + } + + /** + * @param name - The name of the ritual + * @param crystalLevel - Required Activation Crystal tier + * @param activationCost - Base LP cost for activating the ritual + */ + public Ritual(String name, int crystalLevel, int activationCost, String unlocalizedName) + { + this(name, crystalLevel, activationCost, null, unlocalizedName); + } + + public void readFromNBT(CompoundNBT tag) + { + ListNBT tags = tag.getList("areas", 10); + if (tags.isEmpty()) + { + return; + } + + for (int i = 0; i < tags.size(); i++) + { + CompoundNBT newTag = tags.getCompound(i); + String rangeKey = newTag.getString("key"); + + CompoundNBT storedTag = newTag.getCompound("area"); + AreaDescriptor desc = this.getBlockRange(rangeKey); + if (desc != null) + { + desc.readFromNBT(storedTag); + } + } + } + + public void writeToNBT(CompoundNBT tag) + { + ListNBT tags = new ListNBT(); + + for (Entry entry : modableRangeMap.entrySet()) + { + CompoundNBT newTag = new CompoundNBT(); + newTag.putString("key", entry.getKey()); + CompoundNBT storedTag = new CompoundNBT(); + + entry.getValue().writeToNBT(storedTag); + + newTag.put("area", storedTag); + + tags.add(newTag); + } + + tag.put("areas", tags); + } + + /** + * Called when the player attempts to activate the ritual. + *

+ * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, PlayerEntity, Ritual)} + * + * @param masterRitualStone - The {@link IMasterRitualStone} that the ritual is + * bound to + * @param player - The activating player + * @param owner - Owner of the crystal activating this ritual, or + * the current owner of the ritual if being + * reactivated. + * @return - Whether activation was successful + */ + public boolean activateRitual(IMasterRitualStone masterRitualStone, PlayerEntity player, UUID owner) + { + return true; + } + + /** + * Called every {@link #getRefreshTime()} ticks while active. + *

+ * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos)} + * + * @param masterRitualStone - The {@link IMasterRitualStone} that the ritual is + * bound to + */ + public abstract void performRitual(IMasterRitualStone masterRitualStone); + + /** + * Called when the ritual is stopped for a given {@link Ritual.BreakType}. + *

+ * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(Ritual.BreakType)} + * + * @param masterRitualStone - The {@link IMasterRitualStone} that the ritual is + * bound to + * @param breakType - The type of break that caused the stoppage. + */ + public void stopRitual(IMasterRitualStone masterRitualStone, BreakType breakType) + { + + } + + /** + * Used to set the amount of LP drained every {@link #getRefreshTime()} ticks. + * + * @return - The amount of LP drained per refresh + */ + public abstract int getRefreshCost(); + + /** + * Used to set the refresh rate of the ritual. (How often + * {@link #performRitual(IMasterRitualStone)} is called. + * + * @return - How often to perform the effect in ticks. + */ + public int getRefreshTime() + { + return 20; + } + + public void addBlockRange(String range, AreaDescriptor defaultRange) + { + modableRangeMap.put(range, defaultRange); + } + + /** + * Used to grab the range of a ritual for a given effect. + * + * @param range - Range that needs to be pulled. + * @return - + */ + public AreaDescriptor getBlockRange(String range) + { + if (modableRangeMap.containsKey(range)) + { + return modableRangeMap.get(range); + } + + return null; + } + + public List getListOfRanges() + { + return new ArrayList<>(modableRangeMap.keySet()); + } + + public String getNextBlockRange(String range) + { + List rangeList = getListOfRanges(); + + if (rangeList.isEmpty()) + { + return ""; + } + + if (!rangeList.contains(range)) + { + return rangeList.get(0); + } + + boolean hasMatch = false; + + for (String rangeCheck : rangeList) + { + if (hasMatch) + { + return rangeCheck; + } else if (rangeCheck.equals(range)) + { + hasMatch = true; + } + } + + return rangeList.get(0); + } + + public EnumReaderBoundaries canBlockRangeBeModified(String range, AreaDescriptor descriptor, IMasterRitualStone master, BlockPos offset1, BlockPos offset2, DemonWillHolder holder) + { + List willConfig = master.getActiveWillConfig(); + int maxVolume = getMaxVolumeForRange(range, willConfig, holder); + int maxVertical = getMaxVerticalRadiusForRange(range, willConfig, holder); + int maxHorizontal = getMaxHorizontalRadiusForRange(range, willConfig, holder); + + return (maxVolume <= 0 || descriptor.getVolumeForOffsets(offset1, offset2) <= maxVolume) + ? descriptor.isWithinRange(offset1, offset2, maxVertical, maxHorizontal) ? EnumReaderBoundaries.SUCCESS + : EnumReaderBoundaries.NOT_WITHIN_BOUNDARIES + : EnumReaderBoundaries.VOLUME_TOO_LARGE; + } + + protected void setMaximumVolumeAndDistanceOfRange(String range, int volume, int horizontalRadius, int verticalRadius) + { + volumeRangeMap.put(range, volume); + horizontalRangeMap.put(range, horizontalRadius); + verticalRangeMap.put(range, verticalRadius); + } + + protected boolean checkDescriptorIsWithinRange(AreaDescriptor descriptor, int maxVolume, int maxHorizontal, int maxVertical) + { + return descriptor.getVolume() <= maxVolume && descriptor.isWithinRange(maxVertical, maxHorizontal); + } + + public int getMaxVolumeForRange(String range, List activeTypes, DemonWillHolder holder) + { + return volumeRangeMap.get(range); + } + + public int getMaxVerticalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) + { + return verticalRangeMap.get(range); + } + + public int getMaxHorizontalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) + { + return horizontalRangeMap.get(range); + } + + public ITextComponent getErrorForBlockRangeOnFail(PlayerEntity player, String range, IMasterRitualStone master, BlockPos offset1, BlockPos offset2) + { + AreaDescriptor descriptor = this.getBlockRange(range); + if (descriptor == null) + { + return new TranslationTextComponent("ritual.bloodmagic.blockRange.tooBig", "?"); + } + + List willConfig = master.getActiveWillConfig(); + DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(master.getWorldObj(), master.getBlockPos()); + + int maxVolume = this.getMaxVolumeForRange(range, willConfig, holder); + int maxVertical = this.getMaxVerticalRadiusForRange(range, willConfig, holder); + int maxHorizontal = this.getMaxHorizontalRadiusForRange(range, willConfig, holder); + + if (maxVolume > 0 && descriptor.getVolumeForOffsets(offset1, offset2) > maxVolume) + { + return new TranslationTextComponent("ritual.bloodmagic.blockRange.tooBig", maxVolume); + } else + { + return new TranslationTextComponent("ritual.bloodmagic.blockRange.tooFar", maxVertical, maxHorizontal); + } + } + + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] + { new TranslationTextComponent(this.getTranslationKey() + ".info") }; + } + + public ITextComponent provideInformationOfRangeToPlayer(PlayerEntity player, String range) + { + if (getListOfRanges().contains(range)) + { + return new TranslationTextComponent(this.getTranslationKey() + "." + range + ".info"); + } else + { + return new TranslationTextComponent("ritual.bloodmagic.blockRange.noRange"); + } + } + + public abstract void gatherComponents(Consumer components); + + protected final void addRune(Consumer components, int offset1, int y, int offset2, EnumRuneType rune) + { + components.accept(new RitualComponent(new BlockPos(offset1, y, offset2), rune)); + } + + protected final void addOffsetRunes(Consumer components, int offset1, int offset2, int y, EnumRuneType rune) + { + addRune(components, offset1, y, offset2, rune); + addRune(components, offset2, y, offset1, rune); + addRune(components, offset1, y, -offset2, rune); + addRune(components, -offset2, y, offset1, rune); + addRune(components, -offset1, y, offset2, rune); + addRune(components, offset2, y, -offset1, rune); + addRune(components, -offset1, y, -offset2, rune); + addRune(components, -offset2, y, -offset1, rune); + } + + protected final void addCornerRunes(Consumer components, int offset, int y, EnumRuneType rune) + { + addRune(components, offset, y, offset, rune); + addRune(components, offset, y, -offset, rune); + addRune(components, -offset, y, -offset, rune); + addRune(components, -offset, y, offset, rune); + } + + protected final void addParallelRunes(Consumer components, int offset, int y, EnumRuneType rune) + { + addRune(components, offset, y, 0, rune); + addRune(components, -offset, y, 0, rune); + addRune(components, 0, y, -offset, rune); + addRune(components, 0, y, offset, rune); + } + + public double getWillRespectingConfig(World world, BlockPos pos, EnumDemonWillType type, List willConfig) + { + return willConfig.contains(type) ? WorldDemonWillHandler.getCurrentWill(world, pos, type) : 0; + } + + public abstract Ritual getNewCopy(); + + public String getName() + { + return name; + } + + public int getCrystalLevel() + { + return crystalLevel; + } + + public int getActivationCost() + { + return activationCost; + } + + public RitualRenderer getRenderer() + { + return renderer; + } + + public String getTranslationKey() + { + return unlocalizedName; + } + + public Map getModableRangeMap() + { + return modableRangeMap; + } + + public Map getVolumeRangeMap() + { + return volumeRangeMap; + } + + public Map getHorizontalRangeMap() + { + return horizontalRangeMap; + } + + public Map getVerticalRangeMap() + { + return verticalRangeMap; + } + + @Override + public String toString() + { + return new ToStringBuilder(this).append("name", name).append("crystalLevel", crystalLevel).append("activationCost", activationCost).append("renderer", renderer).append("unlocalizedName", unlocalizedName).append("modableRangeMap", modableRangeMap).append("volumeRangeMap", volumeRangeMap).append("horizontalRangeMap", horizontalRangeMap).append("verticalRangeMap", verticalRangeMap).append("refreshTime", getRefreshTime()).append("listOfRanges", getListOfRanges()).toString(); + } + + @Override + public boolean equals(Object o) + { + if (this == o) + return true; + if (!(o instanceof Ritual)) + return false; + + Ritual ritual = (Ritual) o; + + if (crystalLevel != ritual.crystalLevel) + return false; + if (activationCost != ritual.activationCost) + return false; + if (name != null ? !name.equals(ritual.name) : ritual.name != null) + return false; + return unlocalizedName != null ? unlocalizedName.equals(ritual.unlocalizedName) + : ritual.unlocalizedName == null; + } + + @Override + public int hashCode() + { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + crystalLevel; + result = 31 * result + activationCost; + result = 31 * result + (unlocalizedName != null ? unlocalizedName.hashCode() : 0); + return result; + } + + public enum BreakType + { + REDSTONE, BREAK_MRS, BREAK_STONE, ACTIVATE, DEACTIVATE, EXPLOSION, + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/RitualComponent.java b/src/main/java/wayoftime/bloodmagic/ritual/RitualComponent.java new file mode 100644 index 00000000..0f34813f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/RitualComponent.java @@ -0,0 +1,70 @@ +package wayoftime.bloodmagic.ritual; + +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; + +/** + * Used to set a {@link EnumRuneType} type to a given {@link BlockPos} for usage + * in Ritual creation. + */ +public class RitualComponent +{ + private final BlockPos offset; + private final EnumRuneType runeType; + + public RitualComponent(BlockPos offset, EnumRuneType runeType) + { + this.offset = offset; + this.runeType = runeType; + } + + public int getX(Direction direction) + { + switch (direction) + { + case EAST: + return -this.getOffset().getZ(); + case SOUTH: + return -this.getOffset().getX(); + case WEST: + return this.getOffset().getZ(); + default: + return this.getOffset().getX(); + } + } + + public int getY() + { + return this.getOffset().getY(); + } + + public int getZ(Direction direction) + { + switch (direction) + { + case EAST: + return this.getOffset().getX(); + case SOUTH: + return -this.getOffset().getZ(); + case WEST: + return -this.getOffset().getX(); + default: + return this.getOffset().getZ(); + } + } + + public BlockPos getOffset(Direction direction) + { + return new BlockPos(getX(direction), offset.getY(), getZ(direction)); + } + + public BlockPos getOffset() + { + return offset; + } + + public EnumRuneType getRuneType() + { + return runeType; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/RitualManager.java b/src/main/java/wayoftime/bloodmagic/ritual/RitualManager.java new file mode 100644 index 00000000..cfe912a4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/RitualManager.java @@ -0,0 +1,178 @@ +package wayoftime.bloodmagic.ritual; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + +import net.minecraft.block.BlockState; +import net.minecraft.util.DamageSource; +import net.minecraftforge.fml.ModList; +import wayoftime.bloodmagic.ritual.imperfect.ImperfectRitual; +import wayoftime.bloodmagic.util.BMLog; + +public class RitualManager +{ + public static final DamageSource RITUAL_DAMAGE = new DamageSource("ritual_damage").setDamageBypassesArmor(); + + private final Map rituals; + private final Map ritualsReverse; + private final List sortedRituals; + private final Map imperfectRituals; + private final Map imperfectRitualsReverse; +// private final Configuration config; + + public RitualManager() + { + this.rituals = Maps.newTreeMap(); + this.ritualsReverse = Maps.newHashMap(); + this.sortedRituals = Lists.newArrayList(); + this.imperfectRituals = Maps.newTreeMap(); + this.imperfectRitualsReverse = Maps.newHashMap(); +// this.config = config; + } + +// public void discover(ASMDataTable dataTable) + public void discover() + { + ModList.get().getAllScanData().forEach(scan -> { + scan.getAnnotations().forEach(a -> { + if (a.getAnnotationType().getClassName().equals(RitualRegister.class.getName())) + { + try + { + + Class clazz = Class.forName(a.getClassType().getClassName()); + RitualRegister ritualRegister = clazz.getAnnotation(RitualRegister.class); + String id = ritualRegister.value(); + if (Ritual.class.isAssignableFrom(clazz)) + { + Ritual ritual = (Ritual) clazz.newInstance(); + rituals.put(id, ritual); + ritualsReverse.put(ritual, id); + BMLog.DEBUG.info("Registered ritual {}", id); + } else + { + BMLog.DEFAULT.error("Error creating ritual instance for {}.", id); + } + } catch (Exception e) + { + e.printStackTrace(); + } + } + }); + }); + + ModList.get().getAllScanData().forEach(scan -> { + scan.getAnnotations().forEach(a -> { + if (a.getAnnotationType().getClassName().equals(RitualRegister.Imperfect.class.getName())) + { + try + { + + Class clazz = Class.forName(a.getClassType().getClassName()); + RitualRegister.Imperfect ritualRegister = clazz.getAnnotation(RitualRegister.Imperfect.class); + String id = ritualRegister.value(); + if (ImperfectRitual.class.isAssignableFrom(clazz)) + { + ImperfectRitual ritual = (ImperfectRitual) clazz.newInstance(); + imperfectRituals.put(id, ritual); + imperfectRitualsReverse.put(ritual, id); + BMLog.DEBUG.info("Registered imperfect ritual {}", id); + } else + { + BMLog.DEFAULT.error("Error creating imperfect ritual instance for {}.", id); + } + } catch (Exception e) + { + e.printStackTrace(); + } + } + }); + }); + +// syncConfig(); + + // Sort rituals + sortedRituals.addAll(rituals.values()); + // Oh dear this is probably so slow + sortedRituals.sort((o1, o2) -> { + Set components = Sets.newHashSet(); + o1.gatherComponents(components::add); + int initialSize = components.size(); + components.clear(); + o2.gatherComponents(components::add); + return Integer.compare(initialSize, components.size()); + }); + } + + public Ritual getRitual(String id) + { + Ritual ritual = rituals.get(id); + return ritual == null ? null : ritual.getNewCopy(); + } + + public String getId(Ritual ritual) + { + return ritualsReverse.get(ritual); + } + + public ImperfectRitual getImperfectRitual(BlockState state) + { + for (ImperfectRitual ritual : imperfectRituals.values()) if (ritual.getBlockRequirement().test(state)) + return ritual; + + return null; + } + + public String getId(ImperfectRitual ritual) + { + return imperfectRitualsReverse.get(ritual); + } + + public Collection getRituals() + { + return rituals.values(); + } + + public Collection getImperfectRituals() + { + return imperfectRituals.values(); + } + + public List getSortedRituals() + { + return sortedRituals; + } + +// public void syncConfig() +// { +// config.addCustomCategoryComment("rituals", "Toggles for all rituals"); +// rituals.forEach((k, v) -> config.getBoolean(k, "rituals", true, "Enable the " + k + " ritual.")); +// imperfectRituals.forEach((k, v) -> config.getBoolean(k, "rituals.imperfect", true, "Enable the " + k + " imperfect ritual.")); +// config.save(); +// } +// + public boolean enabled(String id, boolean imperfect) + { + return id != null; +// return id != null && config.getBoolean(id, "rituals" + (imperfect ? ".imperfect" : ""), true, ""); + } +// +// public Configuration getConfig() +// { +// return config; +// } + + public static class BadRitualException extends RuntimeException + { + public BadRitualException(String message) + { + super(message); + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/RitualRegister.java b/src/main/java/wayoftime/bloodmagic/ritual/RitualRegister.java new file mode 100644 index 00000000..56527fa6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/RitualRegister.java @@ -0,0 +1,58 @@ +package wayoftime.bloodmagic.ritual; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.util.function.Function; + +import wayoftime.bloodmagic.ritual.imperfect.ImperfectRitual; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface RitualRegister +{ + String value(); + + Class, Ritual>> factory() default DefaultRitualFactory.class; + + @Retention(RetentionPolicy.RUNTIME) + @Target(ElementType.TYPE) + @interface Imperfect + { + + String value(); + + Class, ImperfectRitual>> factory() default DefaultImperfectRitualFactory.class; + } + + class DefaultRitualFactory implements Function, Ritual> + { + @Override + public Ritual apply(Class aClass) + { + try + { + return aClass.newInstance(); + } catch (Exception e) + { + return null; + } + } + } + + class DefaultImperfectRitualFactory implements Function, ImperfectRitual> + { + @Override + public ImperfectRitual apply(Class aClass) + { + try + { + return aClass.newInstance(); + } catch (Exception e) + { + return null; + } + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/RitualRenderer.java b/src/main/java/wayoftime/bloodmagic/ritual/RitualRenderer.java new file mode 100644 index 00000000..a2172c45 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/RitualRenderer.java @@ -0,0 +1,14 @@ +package wayoftime.bloodmagic.ritual; + +import net.minecraft.client.Minecraft; +import net.minecraft.util.ResourceLocation; + +public abstract class RitualRenderer +{ + public abstract void renderAt(IMasterRitualStone masterRitualStone, double x, double y, double z); + + protected void bindTexture(ResourceLocation resourceLocation) + { + Minecraft.getInstance().getTextureManager().bindTexture(resourceLocation); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java new file mode 100644 index 00000000..0bfbc47d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java @@ -0,0 +1,190 @@ +package wayoftime.bloodmagic.ritual.harvest; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.CropsBlock; +import net.minecraft.item.BlockItem; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.fml.ModList; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.util.BMLog; + +/** + * Harvest handler for standard plantable crops such as Wheat, Potatoes, and + * Netherwart.
+ * Register a new crop for this handler with + * {@link HarvestRegistry#registerStandardCrop(Block, int)} + */ + +public class HarvestHandlerPlantable implements IHarvestHandler +{ + private static final ItemStack mockHoe = new ItemStack(Items.DIAMOND_HOE, 1); + + public HarvestHandlerPlantable() + { + HarvestRegistry.registerStandardCrop(Blocks.CARROTS, 7); + HarvestRegistry.registerStandardCrop(Blocks.WHEAT, 7); + HarvestRegistry.registerStandardCrop(Blocks.POTATOES, 7); + HarvestRegistry.registerStandardCrop(Blocks.BEETROOTS, 3); + HarvestRegistry.registerStandardCrop(Blocks.NETHER_WART, 3); + + addThirdPartyCrop("actuallyadditions", "flax_block", 7); + addThirdPartyCrop("actuallyadditions", "canola_block", 7); + addThirdPartyCrop("actuallyadditions", "rice_block", 7); + + addThirdPartyCrop("extrautils2", "redorchid", 6); + addThirdPartyCrop("extrautils2", "enderlily", 7); + + addThirdPartyCrop("roots", "moonglow", 7); + addThirdPartyCrop("roots", "terra_moss", 7); + addThirdPartyCrop("roots", "pereskia", 7); + addThirdPartyCrop("roots", "wildroot", 7); + addThirdPartyCrop("roots", "aubergine", 7); + addThirdPartyCrop("roots", "spirit_herb", 7); + + addPamCrops(); + + addMysticalCrops(); + } + + @Override + public boolean harvest(World world, BlockPos pos, BlockState state, List drops) + { +// NonNullList blockDrops = NonNullList.create(); +// state.getBlock().getDrops(blockDrops, world, pos, state, 0); + boolean foundSeed = false; + LootContext.Builder lootBuilder = new LootContext.Builder((ServerWorld) world); + Vector3d blockCenter = new Vector3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5); + List blockDrops = state.getDrops(lootBuilder.withParameter(LootParameters.field_237457_g_, blockCenter).withParameter(LootParameters.TOOL, mockHoe)); + +// System.out.println("Size of list: " + blockDrops.size()); + + for (ItemStack stack : blockDrops) + { + if (stack.isEmpty()) + continue; + + // This hurts my soul. + if (stack.getItem() instanceof BlockItem && ((BlockItem) stack.getItem()).getBlock() == state.getBlock()) + { + stack.shrink(1); + foundSeed = true; + break; + } + } + +// System.out.println("Found seed: " + foundSeed); + + if (foundSeed) + { + world.setBlockState(pos, state.getBlock().getDefaultState()); + world.playEvent(2001, pos, Block.getStateId(state)); + for (ItemStack stack : blockDrops) + { + if (stack.isEmpty()) + continue; + + drops.add(stack); + } + + return true; + } + + return false; + } + + @Override + public boolean test(World world, BlockPos pos, BlockState state) + { +// state.hasProperty(null); + return HarvestRegistry.getStandardCrops().containsKey(state.getBlock()) && state.getBlock() instanceof CropsBlock && ((CropsBlock) state.getBlock()).isMaxAge(state); +// return HarvestRegistry.getStandardCrops().containsKey(state.getBlock()) && state.getBlock().getMetaFromState(state) == HarvestRegistry.getStandardCrops().get(state.getBlock()); + } + + private static void addThirdPartyCrop(String modid, String regName, int matureMeta) + { + if (!ModList.get().isLoaded(modid)) + return; + + Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(modid, regName)); + if (block != null && block != Blocks.AIR) + HarvestRegistry.registerStandardCrop(block, matureMeta); + } + + private static void addPamCrops() + { + if (!ModList.get().isLoaded("harvestcraft")) + return; + + try + { + Class pamRegistry = Class.forName("com.pam.harvestcraft.blocks.CropRegistry"); + Field names = pamRegistry.getDeclaredField("cropNames"); + Method getCrop = pamRegistry.getMethod("getCrop", String.class); + for (String name : (String[]) names.get(null)) + { + CropsBlock crop = (CropsBlock) getCrop.invoke(null, name); + HarvestRegistry.registerStandardCrop(crop, crop.getMaxAge()); + } + } catch (ClassNotFoundException e) + { + BMLog.DEFAULT.error("HarvestCraft integration cancelled; unable to find registry class"); + } catch (NoSuchMethodException | NoSuchFieldException e) + { + BMLog.DEFAULT.error("HarvestCraft integration cancelled; unable to find crop name mapper"); + } catch (IllegalAccessException | InvocationTargetException e) + { + BMLog.DEFAULT.error("HarvestCraft integration cancelled; crop name lookup broke"); + } + } + + private static void addMysticalCrops() + { + if (!ModList.get().isLoaded("mysticalagriculture")) + return; + + try + { + Class mysticalAPI = Class.forName("com.blakebr0.mysticalagriculture.api.MysticalAgricultureAPI"); + Method getRegistry = mysticalAPI.getMethod("getCropRegistry"); + Object registry = getRegistry.invoke(null); + + Class mysticalRegistry = Class.forName("com.blakebr0.mysticalagriculture.api.registry.ICropRegistry"); + Method getCrops = mysticalRegistry.getMethod("getCrops"); + @SuppressWarnings("unchecked") + List crops = (List) getCrops.invoke(registry); + + Class mysticalCrop = Class.forName("com.blakebr0.mysticalagriculture.api.crop.ICrop"); + Method getCrop = mysticalCrop.getMethod("getCrop"); + + for (Object maCrop : crops) + { + CropsBlock crop = (CropsBlock) getCrop.invoke(maCrop); + HarvestRegistry.registerStandardCrop(crop, crop.getMaxAge()); + } + } catch (ClassNotFoundException e) + { + BMLog.DEFAULT.error("MysticalAgriculture integration cancelled: unable to find a class: " + e.getMessage()); + } catch (NoSuchMethodException e) + { + BMLog.DEFAULT.error("MysticalAgriculture integration cancelled: unable to find a method: " + e.getMessage()); + } catch (IllegalAccessException | InvocationTargetException e) + { + BMLog.DEFAULT.error("MysticalAgriculture integration cancelled: failed to invoke a method: " + e.getMessage()); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerStem.java b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerStem.java new file mode 100644 index 00000000..e2d876b8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerStem.java @@ -0,0 +1,72 @@ +package wayoftime.bloodmagic.ritual.harvest; + +import java.util.Collection; +import java.util.List; + +import net.minecraft.block.AttachedStemBlock; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; + +/** + * Harvest handler for crops with stems such as Pumpkins and Melons. Rotation + * based crop blocks are a good reason to use this (see pumpkins).
+ * Register a new crop for this handler with + * {@link HarvestRegistry#registerStemCrop(BlockState, BlockState)} + */ +public class HarvestHandlerStem implements IHarvestHandler +{ + private static final ItemStack mockHoe = new ItemStack(Items.DIAMOND_HOE, 1); + + public HarvestHandlerStem() + { + for (int i = 0; i < 4; i++) + { + Direction facing = Direction.byHorizontalIndex(i); + HarvestRegistry.registerStemCrop(Blocks.PUMPKIN.getDefaultState(), Blocks.ATTACHED_PUMPKIN_STEM.getDefaultState().with(AttachedStemBlock.FACING, facing)); + HarvestRegistry.registerStemCrop(Blocks.MELON.getDefaultState(), Blocks.ATTACHED_MELON_STEM.getDefaultState().with(AttachedStemBlock.FACING, facing)); + } + } + + @Override + public boolean harvest(World world, BlockPos pos, BlockState state, List drops) + { + Direction cropDir = state.get(AttachedStemBlock.FACING); + + if (cropDir != Direction.UP) + { + BlockPos cropPos = pos.offset(cropDir); + BlockState probableCrop = world.getBlockState(cropPos); + Collection registeredCrops = HarvestRegistry.getStemCrops().get(state); + + for (BlockState registeredCrop : registeredCrops) + { + if (registeredCrop == probableCrop) + { + LootContext.Builder lootBuilder = new LootContext.Builder((ServerWorld) world); + Vector3d blockCenter = new Vector3d(cropPos.getX() + 0.5, cropPos.getY() + 0.5, cropPos.getZ() + 0.5); + List blockDrops = registeredCrop.getDrops(lootBuilder.withParameter(LootParameters.field_237457_g_, blockCenter).withParameter(LootParameters.TOOL, mockHoe)); + drops.addAll(blockDrops); + world.destroyBlock(cropPos, false); + return true; + } + } + } + + return false; + } + + @Override + public boolean test(World world, BlockPos pos, BlockState state) + { + return HarvestRegistry.getStemCrops().containsKey(state); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerTall.java b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerTall.java new file mode 100644 index 00000000..4ca53ce8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerTall.java @@ -0,0 +1,59 @@ +package wayoftime.bloodmagic.ritual.harvest; + +import java.util.List; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.CactusBlock; +import net.minecraft.block.SugarCaneBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; + +/** + * Harvest handler for crops that grow vertically such as Sugar Cane and Cactus. + *
+ * Register a new crop for this handler with + * {@link HarvestRegistry#registerTallCrop(BlockState)} + */ +public class HarvestHandlerTall implements IHarvestHandler +{ + private static final ItemStack mockHoe = new ItemStack(Items.DIAMOND_HOE, 1); + + public HarvestHandlerTall() + { + for (int i = 0; i < 15; i++) + { + HarvestRegistry.registerTallCrop(Blocks.SUGAR_CANE.getDefaultState().with(SugarCaneBlock.AGE, i)); + HarvestRegistry.registerTallCrop(Blocks.CACTUS.getDefaultState().with(CactusBlock.AGE, i)); + } + } + + @Override + public boolean harvest(World world, BlockPos pos, BlockState state, List drops) + { + BlockState up = world.getBlockState(pos.up()); + if (up.getBlock() == state.getBlock()) + { + LootContext.Builder lootBuilder = new LootContext.Builder((ServerWorld) world); + Vector3d blockCenter = new Vector3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5); + List blockDrops = state.getDrops(lootBuilder.withParameter(LootParameters.field_237457_g_, blockCenter).withParameter(LootParameters.TOOL, mockHoe)); + drops.addAll(blockDrops); + world.destroyBlock(pos.up(), false); + return true; + } + + return false; + } + + @Override + public boolean test(World world, BlockPos pos, BlockState state) + { + return HarvestRegistry.getTallCrops().contains(state); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestRegistry.java b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestRegistry.java new file mode 100644 index 00000000..c4738256 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestRegistry.java @@ -0,0 +1,125 @@ +package wayoftime.bloodmagic.ritual.harvest; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Multimap; +import com.google.common.collect.Sets; + +import net.minecraft.block.AttachedStemBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.StemBlock; + +public class HarvestRegistry +{ + + private static final List HARVEST_HANDLERS = Lists.newArrayList(); + private static final Map STANDARD_CROPS = Maps.newHashMap(); + private static final Set TALL_CROPS = Sets.newHashSet(); + private static final Multimap STEM_CROPS = ArrayListMultimap.create(); + private static final Map AMPLIFIERS = Maps.newHashMap(); + + /** + * Registers a handler for the Harvest Ritual to call. + * + * @param handler - The custom handler to register + */ + public static void registerHandler(IHarvestHandler handler) + { + if (!HARVEST_HANDLERS.contains(handler)) + HARVEST_HANDLERS.add(handler); + } + + /** + * Registers a standard crop (IE: Wheat, Carrots, Potatoes, Netherwart, etc) for + * the {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable} + * handler to handle. + * + * @param crop - The crop block to handle. + * @param matureMeta - The meta value at which the crop is considered mature and + * ready to be harvested. + */ + public static void registerStandardCrop(Block crop, int matureMeta) + { + if (!STANDARD_CROPS.containsKey(crop)) + STANDARD_CROPS.put(crop, matureMeta); + } + + /** + * Registers a tall crop (Sugar Cane and Cactus) for the + * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall} handler to + * handle. + * + * @param crop - The crop block to handle. + */ + public static void registerTallCrop(BlockState crop) + { + if (!TALL_CROPS.contains(crop)) + TALL_CROPS.add(crop); + } + + /** + * Registers a stem crop (Melon and Pumpkin) for the + * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem} handler to + * handle. + *

+ * Use {@link net.minecraftforge.oredict.OreDictionary#WILDCARD_VALUE} to accept + * any meta for the crop block. + *

+ * The Stem must be instanceof {@link StemBlock} + * + * @param crop - The crop block to handle. + * @param stem - The stem of the crop + */ + public static void registerStemCrop(BlockState crop, BlockState stem) + { + if (!STEM_CROPS.containsKey(crop) && stem.getBlock() instanceof AttachedStemBlock) + STEM_CROPS.put(stem, crop); + } + + /** + * Registers a range amplifier for the Harvest Ritual. + * + * @param block - The block for the amplifier. + * @param range - The range the amplifier provides. + */ + public static void registerRangeAmplifier(BlockState block, int range) + { + if (!AMPLIFIERS.containsKey(block)) + AMPLIFIERS.put(block, range); + } + + public static List getHarvestHandlers() + { + return ImmutableList.copyOf(HARVEST_HANDLERS); + } + + public static Map getStandardCrops() + { + return ImmutableMap.copyOf(STANDARD_CROPS); + } + + public static Set getTallCrops() + { + return ImmutableSet.copyOf(TALL_CROPS); + } + + public static Multimap getStemCrops() + { + return ImmutableMultimap.copyOf(STEM_CROPS); + } + + public static Map getAmplifiers() + { + return ImmutableMap.copyOf(AMPLIFIERS); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/harvest/IHarvestHandler.java b/src/main/java/wayoftime/bloodmagic/ritual/harvest/IHarvestHandler.java new file mode 100644 index 00000000..82313dd5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/harvest/IHarvestHandler.java @@ -0,0 +1,39 @@ +package wayoftime.bloodmagic.ritual.harvest; + +import java.util.List; + +import net.minecraft.block.BlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +/** + * Used to define a HarvestHandler for the Harvest Ritual. + */ +public interface IHarvestHandler +{ + + /** + * Called whenever the Harvest Ritual attempts to harvest a block.
+ * Use this to break the block and plant a new one.
+ * Add the items to be dropped to the drops list.
+ * + * @param world - The world + * @param pos - The position of the {@link BlockState} being checked + * @param state - The {@link BlockState} being checked + * @param drops - The items to be dropped + * @return If the block was successfully harvested. + */ + boolean harvest(World world, BlockPos pos, BlockState state, List drops); + + /** + * Tests to see if the block is valid for harvest. + * + * @param world The world + * @param pos The position in the world of the {@link BlockState} being + * checked + * @param state The {@link BlockState} being checked + * @return if this block is valid for harvest. + */ + boolean test(World world, BlockPos pos, BlockState state); +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/imperfect/IImperfectRitualStone.java b/src/main/java/wayoftime/bloodmagic/ritual/imperfect/IImperfectRitualStone.java new file mode 100644 index 00000000..856f5c60 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/imperfect/IImperfectRitualStone.java @@ -0,0 +1,20 @@ +package wayoftime.bloodmagic.ritual.imperfect; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +/** + * This interface is for internal implementation only. + *

+ * It is provided via the API for easy obtaining of basic data. + */ +public interface IImperfectRitualStone +{ + + boolean performRitual(World world, BlockPos pos, ImperfectRitual imperfectRitual, PlayerEntity player); + + World getRitualWorld(); + + BlockPos getRitualPos(); +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/imperfect/ImperfectRitual.java b/src/main/java/wayoftime/bloodmagic/ritual/imperfect/ImperfectRitual.java new file mode 100644 index 00000000..6fe28e1f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/imperfect/ImperfectRitual.java @@ -0,0 +1,108 @@ +package wayoftime.bloodmagic.ritual.imperfect; + +import java.util.function.Predicate; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.world.World; + +/** + * Abstract class for creating new imperfect rituals. To register, annotate your + * class with {@link WayofTime.bloodmagic.ritual.RitualRegister.Imperfect} + */ +public abstract class ImperfectRitual +{ + + private final String name; + private final Predicate blockRequirement; + private final int activationCost; + private final boolean lightShow; + private final String unlocalizedName; + + public ImperfectRitual(String name, Predicate blockRequirement, int activationCost, boolean lightShow, String unlocalizedName) + { + this.name = name; + this.blockRequirement = blockRequirement; + this.activationCost = activationCost; + this.lightShow = lightShow; + this.unlocalizedName = unlocalizedName; + } + + /** + * @param name The name of the ritual + * @param blockRequirement The block required above the ImperfectRitualStone + * @param activationCost Base LP cost for activating the ritual + */ + public ImperfectRitual(String name, Predicate blockRequirement, int activationCost, String unlocalizedName) + { + this(name, blockRequirement, activationCost, false, unlocalizedName); + } + + /** + * Called when the player activates the ritual + * {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, net.minecraft.util.math.BlockPos, ImperfectRitual, PlayerEntity)} + * + * @param imperfectRitualStone - The {@link IImperfectRitualStone} that the + * ritual is bound to + * @param player - The player activating the ritual + * @return - Whether activation was successful + */ + public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, PlayerEntity player); + + public String getName() + { + return name; + } + + public Predicate getBlockRequirement() + { + return blockRequirement; + } + + public int getActivationCost() + { + return activationCost; + } + + public boolean isLightShow() + { + return lightShow; + } + + public String getTranslationKey() + { + return unlocalizedName; + } + + @Override + public String toString() + { + return getName() + "@" + getActivationCost(); + } + + @Override + public boolean equals(Object o) + { + if (this == o) + return true; + if (!(o instanceof ImperfectRitual)) + return false; + + ImperfectRitual that = (ImperfectRitual) o; + + if (activationCost != that.activationCost) + return false; + if (name != null ? !name.equals(that.name) : that.name != null) + return false; + return unlocalizedName != null ? unlocalizedName.equals(that.unlocalizedName) : that.unlocalizedName == null; + } + + @Override + public int hashCode() + { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + activationCost; + result = 31 * result + (unlocalizedName != null ? unlocalizedName.hashCode() : 0); + return result; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualAnimalGrowth.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualAnimalGrowth.java new file mode 100644 index 00000000..3a6aea63 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualAnimalGrowth.java @@ -0,0 +1,258 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.entity.passive.AnimalEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.EffectInstance; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.items.IItemHandler; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.Utils; + +@RitualRegister("animal_growth") +public class RitualAnimalGrowth extends Ritual +{ + public static final double rawWillDrain = 0.05; + public static final double vengefulWillDrain = 0.02; + public static final double steadfastWillDrain = 0.1; + public static final double destructiveWillDrain = 1; + + public static final String GROWTH_RANGE = "growing"; + public static final String CHEST_RANGE = "chest"; + public static int defaultRefreshTime = 20; + public int refreshTime = 20; + + public RitualAnimalGrowth() + { + super("ritualAnimalGrowth", 0, 10000, "ritual." + BloodMagic.MODID + ".animalGrowthRitual"); + addBlockRange(GROWTH_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, 1, -2), 5, 2, 5)); + addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); + + setMaximumVolumeAndDistanceOfRange(GROWTH_RANGE, 0, 7, 7); + setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + int maxGrowths = currentEssence / getRefreshCost(); + int totalGrowths = 0; + BlockPos pos = masterRitualStone.getBlockPos(); + + AreaDescriptor chestRange = masterRitualStone.getBlockRange(CHEST_RANGE); + TileEntity chest = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); + IItemHandler itemHandler = null; + if (chest != null) + { + itemHandler = Utils.getInventory(chest, null); + } + + List willConfig = masterRitualStone.getActiveWillConfig(); + + double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); + double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); + double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); + double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); + double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); + + refreshTime = getRefreshTimeForRawWill(rawWill); + + boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; + + double vengefulDrain = 0; + double steadfastDrain = 0; + double destructiveDrain = 0; + + boolean decreaseBreedTimer = vengefulWill >= vengefulWillDrain; + boolean breedAnimals = steadfastWill >= steadfastWillDrain && itemHandler != null; + boolean kamikaze = destructiveWill >= destructiveWillDrain; + + AreaDescriptor growingRange = masterRitualStone.getBlockRange(GROWTH_RANGE); + AxisAlignedBB axis = growingRange.getAABB(masterRitualStone.getBlockPos()); + List animalList = world.getEntitiesWithinAABB(AnimalEntity.class, axis); + + boolean performedEffect = false; + + for (AnimalEntity animal : animalList) + { + if (animal.getGrowingAge() < 0) + { + animal.addGrowth(5); + totalGrowths++; + performedEffect = true; + } else if (animal.getGrowingAge() > 0) + { + if (decreaseBreedTimer) + { + if (vengefulWill >= vengefulWillDrain) + { + animal.setGrowingAge(Math.max(0, animal.getGrowingAge() - getBreedingDecreaseForWill(vengefulWill))); + vengefulDrain += vengefulWillDrain; + vengefulWill -= vengefulWillDrain; + performedEffect = true; + } else + { + decreaseBreedTimer = false; + } + } + } else + { + if (kamikaze) + { + if (destructiveWill >= destructiveWillDrain) + { + if (!animal.isPotionActive(BloodMagicPotions.SACRIFICIAL_LAMB)) + { + animal.addPotionEffect(new EffectInstance(BloodMagicPotions.SACRIFICIAL_LAMB, 1200)); + destructiveDrain += destructiveWillDrain; + destructiveWill -= destructiveWillDrain; + performedEffect = true; + } + } else + { + kamikaze = false; + } + } + + if (breedAnimals) + { + if (steadfastWill >= steadfastWillDrain) + { + if (!animal.isInLove()) + { + for (int slot = 0; slot < itemHandler.getSlots(); slot++) + { + ItemStack foodStack = itemHandler.getStackInSlot(slot); + if (foodStack != null && animal.isBreedingItem(foodStack) && itemHandler.extractItem(slot, 1, true) != null) + { + animal.setInLove(null); + itemHandler.extractItem(slot, 1, false); + steadfastDrain += steadfastWillDrain; + steadfastWill -= steadfastWillDrain; + performedEffect = true; + break; + } + } + } + } else + { + breedAnimals = false; + } + } + } + + if (totalGrowths >= maxGrowths) + { + break; + } + } + + if (performedEffect && consumeRawWill) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawWillDrain, true); + } + + if (vengefulDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrain, true); + } + + if (steadfastDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastDrain, true); + } + + if (destructiveDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DESTRUCTIVE, destructiveDrain, true); + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(totalGrowths * getRefreshCost())); + } + + @Override + public int getRefreshCost() + { + return 2; + } + + @Override + public void gatherComponents(Consumer components) + { + + addParallelRunes(components, 2, 0, EnumRuneType.DUSK); + addParallelRunes(components, 1, 0, EnumRuneType.WATER); + components.accept(new RitualComponent(new BlockPos(1, 0, 2), EnumRuneType.EARTH)); + components.accept(new RitualComponent(new BlockPos(1, 0, -2), EnumRuneType.EARTH)); + components.accept(new RitualComponent(new BlockPos(-1, 0, 2), EnumRuneType.EARTH)); + components.accept(new RitualComponent(new BlockPos(-1, 0, -2), EnumRuneType.EARTH)); + components.accept(new RitualComponent(new BlockPos(2, 0, 1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(2, 0, -1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(-2, 0, 1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(-2, 0, -1), EnumRuneType.AIR)); + } + + @Override + public Ritual getNewCopy() + { + return new RitualAnimalGrowth(); + } + + @Override + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] { new TranslationTextComponent(this.getTranslationKey() + ".info"), + new TranslationTextComponent(this.getTranslationKey() + ".default.info"), + new TranslationTextComponent(this.getTranslationKey() + ".corrosive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".steadfast.info"), + new TranslationTextComponent(this.getTranslationKey() + ".destructive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".vengeful.info") }; + } + + public int getBreedingDecreaseForWill(double vengefulWill) + { + return (int) (10 + vengefulWill / 5); + } + + public int getRefreshTimeForRawWill(double rawWill) + { + if (rawWill >= rawWillDrain) + { + return (int) Math.max(defaultRefreshTime - rawWill / 10, 1); + } + + return defaultRefreshTime; + } + + @Override + public int getRefreshTime() + { + return refreshTime; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualArmourEvolve.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualArmourEvolve.java new file mode 100644 index 00000000..477f6704 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualArmourEvolve.java @@ -0,0 +1,110 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.effect.LightningBoltEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.core.living.LivingStats; +import wayoftime.bloodmagic.core.living.LivingUtil; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; + +@RitualRegister("armour_evolve") +public class RitualArmourEvolve extends Ritual +{ + public static final String CHECK_RANGE = "fillRange"; + + public RitualArmourEvolve() + { + super("ritualArmourEvolve", 0, 50000, "ritual." + BloodMagic.MODID + ".armourEvolveRitual"); + addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1)); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + + if (world.isRemote) + { + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + + AreaDescriptor checkRange = masterRitualStone.getBlockRange(CHECK_RANGE); + + List playerList = world.getEntitiesWithinAABB(PlayerEntity.class, checkRange.getAABB(pos)); + + for (PlayerEntity player : playerList) + { + if (LivingUtil.hasFullSet(player)) + { + ItemStack chestStack = player.getItemStackFromSlot(EquipmentSlotType.CHEST); + LivingStats stats = LivingStats.fromPlayer(player); + + if (stats.getMaxPoints() < 300) + { + stats.setMaxPoints(300); + LivingStats.toPlayer(player, stats); +// ((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true); + + masterRitualStone.setActive(false); + + LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(world); +// LightningBoltEntity lightning = new LightningBoltEntity(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ); + lightningboltentity.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); +// lightningboltentity.setEffectOnly(true); + world.addEntity(lightningboltentity); + } + + } + } + } + + @Override + public int getRefreshTime() + { + return 1; + } + + @Override + public int getRefreshCost() + { + return 0; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.DUSK); + addCornerRunes(components, 2, 0, EnumRuneType.FIRE); + addOffsetRunes(components, 1, 2, 0, EnumRuneType.FIRE); + addCornerRunes(components, 1, 1, EnumRuneType.DUSK); + addParallelRunes(components, 4, 0, EnumRuneType.EARTH); + addCornerRunes(components, 1, 3, EnumRuneType.DUSK); + addParallelRunes(components, 1, 4, EnumRuneType.EARTH); + + for (int i = 0; i < 4; i++) + { + addCornerRunes(components, 3, i, EnumRuneType.EARTH); + } + } + + @Override + public Ritual getNewCopy() + { + return new RitualArmourEvolve(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrushing.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrushing.java new file mode 100644 index 00000000..92af0383 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrushing.java @@ -0,0 +1,360 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; + +import com.mojang.authlib.GameProfile; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.enchantment.Enchantments; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.FakePlayerFactory; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BlockMasterRitualStone; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.IRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +@RitualRegister("crushing") +public class RitualCrushing extends Ritual +{ + public static final String CRUSHING_RANGE = "crushingRange"; + public static final String CHEST_RANGE = "chest"; + + public static double rawWillDrain = 0.05; + public static double steadfastWillDrain = 0.2; + public static double destructiveWillDrain = 0.2; + public static double vengefulWillDrain = 0.2; + + public static Map cuttingFluidLPMap = new HashMap<>(); + public static Map cuttingFluidWillMap = new HashMap<>(); + public static int defaultRefreshTime = 40; + private FakePlayer fakePlayer; + public int refreshTime = 40; + + private static final ItemStack mockPick = new ItemStack(Items.DIAMOND_PICKAXE, 1); + static + { + mockPick.addEnchantment(Enchantments.SILK_TOUCH, 1); + } + + public RitualCrushing() + { + super("ritualCrushing", 0, 5000, "ritual." + BloodMagic.MODID + ".crushingRitual"); + addBlockRange(CRUSHING_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, -3, -1), 3)); + addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); + + setMaximumVolumeAndDistanceOfRange(CRUSHING_RANGE, 50, 10, 10); + setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + if (world.isRemote) + { + return; + } + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + AreaDescriptor chestRange = masterRitualStone.getBlockRange(CHEST_RANGE); + TileEntity tile = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); + + if (tile != null && Utils.getNumberOfFreeSlots(tile, Direction.DOWN) < 1) + { + return; + } + + List willConfig = masterRitualStone.getActiveWillConfig(); + + double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); + double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); + double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); + double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); + double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); + + refreshTime = getRefreshTimeForRawWill(rawWill); + + boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; + + boolean isSilkTouch = steadfastWill >= steadfastWillDrain; + boolean useCuttingFluid = corrosiveWill > 0; + + int fortune = destructiveWill > 0 ? 3 : 0; + + AreaDescriptor crushingRange = masterRitualStone.getBlockRange(CRUSHING_RANGE); + boolean hasOperated = false; + + double rawDrain = 0; + + for (BlockPos newPos : crushingRange.getContainedPositions(pos)) + { + if (world.isAirBlock(newPos)) + { + continue; + } + + BlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + if (block instanceof BlockMasterRitualStone || block instanceof IRitualStone + || state.getBlockHardness(world, newPos) == -1.0F || Utils.isBlockLiquid(state)) + { + continue; + } + + boolean isBlockClaimed = false; +// if (useCuttingFluid) +// { +// ItemStack checkStack = block.getItem(world, newPos, state); +// if (checkStack.isEmpty()) +// { +// continue; +// } +// +// ItemStack copyStack = checkStack.copy(); +// +// for (ICrushingHandler handler : CrushingRegistry.getCrushingHandlerList()) +// { +// int lpDrain = handler.getLpDrain(); +// double willDrain = handler.getWillDrain(); +// +// if (corrosiveWill < willDrain || currentEssence < lpDrain + getRefreshCost()) +// { +// continue; +// } +// +// ItemStack result = handler.getRecipeOutput(copyStack, world, pos); +// +// if (result.isEmpty()) +// { +// continue; +// } +// +// if (tile != null) +// { +// result = Utils.insertStackIntoTile(result, tile, Direction.DOWN); +// if (!result.isEmpty()) +// { +// Utils.spawnStackAtBlock(world, pos, Direction.UP, result); +// } +// } else +// { +// Utils.spawnStackAtBlock(world, pos, Direction.UP, result); +// } +// +// WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, willDrain, true); +// corrosiveWill -= willDrain; +// +// masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(lpDrain)); +// currentEssence -= lpDrain; +// +// isBlockClaimed = true; +// } +// +// } + + Blocks d; + if (!isBlockClaimed && isSilkTouch) + { + LootContext.Builder lootBuilder = new LootContext.Builder((ServerWorld) world); + Vector3d blockCenter = new Vector3d(newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5); + List silkDrops = state.getDrops(lootBuilder.withParameter(LootParameters.field_237457_g_, blockCenter).withParameter(LootParameters.TOOL, mockPick)); + + for (ItemStack item : silkDrops) + { + ItemStack copyStack = item.copy(); + + if (tile != null) + { + copyStack = Utils.insertStackIntoTile(copyStack, tile, Direction.DOWN); + } else + { + Utils.spawnStackAtBlock(world, pos, Direction.UP, copyStack); + continue; + } + if (!copyStack.isEmpty()) + { + Utils.spawnStackAtBlock(world, pos, Direction.UP, copyStack); + } + } + + if (steadfastWill >= steadfastWillDrain) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastWillDrain, true); + steadfastWill -= steadfastWillDrain; + } else + { + continue; + } + + } else if (!isBlockClaimed) + { + if (fortune > 0 && destructiveWill < destructiveWillDrain) + { + fortune = 0; + } + + ItemStack mockFortunePick = new ItemStack(Items.DIAMOND_PICKAXE, 1); + mockFortunePick.addEnchantment(Enchantments.FORTUNE, fortune); + + LootContext.Builder lootBuilder = new LootContext.Builder((ServerWorld) world); + Vector3d blockCenter = new Vector3d(newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5); + List stackList = state.getDrops(lootBuilder.withParameter(LootParameters.field_237457_g_, blockCenter).withParameter(LootParameters.TOOL, mockFortunePick)); +// List stackList = Block.getDrops(state, world, newPos, world.getTileEntity(newPos)); + +// List stackList = block.getDrops(world, newPos, state, fortune); + + for (ItemStack item : stackList) + { + ItemStack copyStack = item.copy(); + + if (tile != null) + { + copyStack = Utils.insertStackIntoTile(copyStack, tile, Direction.DOWN); + } else + { + Utils.spawnStackAtBlock(world, pos, Direction.UP, copyStack); + continue; + } + if (!copyStack.isEmpty()) + { + Utils.spawnStackAtBlock(world, pos, Direction.UP, copyStack); + } + } + + if (fortune > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DESTRUCTIVE, destructiveWillDrain, true); + destructiveWill -= destructiveWillDrain; + } + } + + world.destroyBlock(newPos, false); + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost())); + hasOperated = true; + + if (consumeRawWill) + { + rawDrain += rawWillDrain; + rawWill -= rawWillDrain; + } + + break; + } + +// if (hasOperated && tile != null && vengefulWill >= vengefulWillDrain) +// { +// Pair pair = CompressionRegistry.compressInventory(tile, world); +// if (pair.getRight()) +// { +// ItemStack returned = pair.getLeft(); +// if (returned != null) +// { +// Utils.spawnStackAtBlock(world, pos, Direction.UP, returned); +// } +// +// WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulWillDrain, true); +// } +// } + + if (rawDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrain, true); + } + } + + public int getRefreshTimeForRawWill(double rawWill) + { + if (rawWill >= rawWillDrain) + { + return Math.max(1, (int) (40 - rawWill / 5)); + } + + return defaultRefreshTime; + } + + @Override + public int getRefreshTime() + { + return refreshTime; + } + + @Override + public int getRefreshCost() + { + return 7; + } + + @Override + public void gatherComponents(Consumer components) + { + addParallelRunes(components, 1, 0, EnumRuneType.EARTH); + addParallelRunes(components, 2, 0, EnumRuneType.FIRE); + addCornerRunes(components, 2, 0, EnumRuneType.DUSK); + addParallelRunes(components, 2, 1, EnumRuneType.AIR); + } + + @Override + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] + { new TranslationTextComponent(this.getTranslationKey() + ".info"), + new TranslationTextComponent(this.getTranslationKey() + ".default.info"), + new TranslationTextComponent(this.getTranslationKey() + ".corrosive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".steadfast.info"), + new TranslationTextComponent(this.getTranslationKey() + ".destructive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".vengeful.info") }; + } + + @Override + public Ritual getNewCopy() + { + return new RitualCrushing(); + } + + public static void registerCuttingFluid(ItemStack stack, int lpDrain, double willDrain) + { + cuttingFluidLPMap.put(stack, lpDrain); + cuttingFluidWillMap.put(stack, willDrain); + } + + private FakePlayer getFakePlayer(ServerWorld world) + { + return fakePlayer == null + ? fakePlayer = FakePlayerFactory.get(world, new GameProfile(null, BloodMagic.MODID + "_ritual_crushing")) + : fakePlayer; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalHarvest.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalHarvest.java new file mode 100644 index 00000000..1a8add72 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalHarvest.java @@ -0,0 +1,104 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.function.Consumer; + +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.tile.TileDemonCrystal; + +@RitualRegister("crystal_harvest") +public class RitualCrystalHarvest extends Ritual +{ + public static final String CRYSTAL_RANGE = "crystal"; + + public RitualCrystalHarvest() + { + super("ritualCrystalHarvest", 0, 40000, "ritual." + BloodMagic.MODID + ".crystalHarvestRitual"); + addBlockRange(CRYSTAL_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-3, 2, -3), 7, 5, 7)); + + setMaximumVolumeAndDistanceOfRange(CRYSTAL_RANGE, 250, 5, 7); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + BlockPos pos = masterRitualStone.getBlockPos(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + int maxEffects = 1; + int totalEffects = 0; + + AreaDescriptor crystalRange = masterRitualStone.getBlockRange(CRYSTAL_RANGE); + + crystalRange.resetIterator(); + while (crystalRange.hasNext()) + { + BlockPos nextPos = crystalRange.next().add(pos); + TileEntity tile = world.getTileEntity(nextPos); + if (tile instanceof TileDemonCrystal) + { + TileDemonCrystal demonCrystal = (TileDemonCrystal) tile; + if (demonCrystal.dropSingleCrystal()) + { + BlockState state = world.getBlockState(nextPos); + world.notifyBlockUpdate(nextPos, state, state, 3); + totalEffects++; + if (totalEffects >= maxEffects) + { + break; + } + } + } + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost() * totalEffects)); + } + + @Override + public int getRefreshTime() + { + return 25; + } + + @Override + public int getRefreshCost() + { + return 50; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.AIR); + addParallelRunes(components, 1, 1, EnumRuneType.DUSK); + addParallelRunes(components, 1, -1, EnumRuneType.FIRE); + addParallelRunes(components, 2, -1, EnumRuneType.FIRE); + addParallelRunes(components, 3, -1, EnumRuneType.FIRE); + addOffsetRunes(components, 3, 1, -1, EnumRuneType.FIRE); + addCornerRunes(components, 3, -1, EnumRuneType.EARTH); + addCornerRunes(components, 3, 0, EnumRuneType.EARTH); + addOffsetRunes(components, 3, 2, 0, EnumRuneType.DUSK); + } + + @Override + public Ritual getNewCopy() + { + return new RitualCrystalHarvest(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalSplit.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalSplit.java new file mode 100644 index 00000000..9e399aae --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalSplit.java @@ -0,0 +1,215 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.function.Consumer; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.tile.TileDemonCrystal; + +@RitualRegister("crystal_split") +public class RitualCrystalSplit extends Ritual +{ + public RitualCrystalSplit() + { + super("ritualCrystalSplit", 0, 20000, "ritual." + BloodMagic.MODID + ".crystalSplitRitual"); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + Direction direction = masterRitualStone.getDirection(); + BlockPos rawPos = pos.up(2); + + TileEntity tile = world.getTileEntity(rawPos); + if (!(tile instanceof TileDemonCrystal) || ((TileDemonCrystal) tile).getWillType() != EnumDemonWillType.DEFAULT) + { + return; + } + + BlockState rawState = world.getBlockState(rawPos); + + TileDemonCrystal rawTile = (TileDemonCrystal) tile; + if (rawTile.getCrystalCount() >= 5) + { + BlockPos vengefulPos = pos.offset(rotateFacing(Direction.NORTH, direction)).up(); + BlockPos corrosivePos = pos.offset(rotateFacing(Direction.EAST, direction)).up(); + BlockPos steadfastPos = pos.offset(rotateFacing(Direction.SOUTH, direction)).up(); + BlockPos destructivePos = pos.offset(rotateFacing(Direction.WEST, direction)).up(); + + int vengefulCrystals = 0; + int corrosiveCrystals = 0; + int steadfastCrystals = 0; + int destructiveCrystals = 0; + + tile = world.getTileEntity(vengefulPos); + if (tile instanceof TileDemonCrystal && ((TileDemonCrystal) tile).getWillType() == EnumDemonWillType.VENGEFUL && ((TileDemonCrystal) tile).getCrystalCount() < 7) + { + vengefulCrystals = ((TileDemonCrystal) tile).getCrystalCount(); + } else if (!(tile instanceof TileDemonCrystal) && world.isAirBlock(vengefulPos)) + { + // #donothing, no point setting the crystal to 0 again + } else + { + return; + } + + tile = world.getTileEntity(corrosivePos); + if (tile instanceof TileDemonCrystal && ((TileDemonCrystal) tile).getWillType() == EnumDemonWillType.CORROSIVE && ((TileDemonCrystal) tile).getCrystalCount() < 7) + { + corrosiveCrystals = ((TileDemonCrystal) tile).getCrystalCount(); + } else if (!(tile instanceof TileDemonCrystal) && world.isAirBlock(corrosivePos)) + { + + } else + { + return; + } + + tile = world.getTileEntity(steadfastPos); + if (tile instanceof TileDemonCrystal && ((TileDemonCrystal) tile).getWillType() == EnumDemonWillType.STEADFAST && ((TileDemonCrystal) tile).getCrystalCount() < 7) + { + steadfastCrystals = ((TileDemonCrystal) tile).getCrystalCount(); + } else if (!(tile instanceof TileDemonCrystal) && world.isAirBlock(steadfastPos)) + { + + } else + { + return; + } + + tile = world.getTileEntity(destructivePos); + if (tile instanceof TileDemonCrystal && ((TileDemonCrystal) tile).getWillType() == EnumDemonWillType.DESTRUCTIVE && ((TileDemonCrystal) tile).getCrystalCount() < 7) + { + destructiveCrystals = ((TileDemonCrystal) tile).getCrystalCount(); + } else if (!(tile instanceof TileDemonCrystal) && world.isAirBlock(destructivePos)) + { + + } else + { + return; + } + + rawTile.setCrystalCount(rawTile.getCrystalCount() - 4); + + growCrystal(world, vengefulPos, EnumDemonWillType.VENGEFUL, vengefulCrystals); + growCrystal(world, corrosivePos, EnumDemonWillType.CORROSIVE, corrosiveCrystals); + growCrystal(world, steadfastPos, EnumDemonWillType.STEADFAST, steadfastCrystals); + growCrystal(world, destructivePos, EnumDemonWillType.DESTRUCTIVE, destructiveCrystals); + rawTile.markDirty(); + world.notifyBlockUpdate(rawPos, rawState, rawState, 3); + } + } + + public Direction rotateFacing(Direction facing, Direction rotation) + { + switch (rotation) + { + case EAST: + return facing.rotateY(); + case SOUTH: + return facing.rotateY().rotateY(); + case WEST: + return facing.rotateYCCW(); + case NORTH: + default: + return facing; + } + } + + public void growCrystal(World world, BlockPos pos, EnumDemonWillType type, int currentCrystalCount) + { + if (currentCrystalCount <= 0) + { + BlockState state; + switch (type) + { + case CORROSIVE: + state = BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get().getDefaultState(); + break; + case DEFAULT: + state = BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get().getDefaultState(); + break; + case DESTRUCTIVE: + state = BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get().getDefaultState(); + break; + case STEADFAST: + state = BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get().getDefaultState(); + break; + case VENGEFUL: + state = BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get().getDefaultState(); + break; + default: + state = BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get().getDefaultState(); + } + world.setBlockState(pos, state, 3); + } else + { + TileDemonCrystal tile = (TileDemonCrystal) world.getTileEntity(pos); + tile.setCrystalCount(currentCrystalCount + 1); + tile.markDirty(); + BlockState state = world.getBlockState(pos); + world.notifyBlockUpdate(pos, state, state, 3); + } + } + + @Override + public int getRefreshTime() + { + return 20; + } + + @Override + public int getRefreshCost() + { + return 1000; + } + + @Override + public void gatherComponents(Consumer components) + { + addRune(components, 0, 0, -1, EnumRuneType.FIRE); + addRune(components, 1, 0, 0, EnumRuneType.EARTH); + addRune(components, 0, 0, 1, EnumRuneType.WATER); + addRune(components, -1, 0, 0, EnumRuneType.AIR); + + this.addOffsetRunes(components, 1, 2, -1, EnumRuneType.DUSK); + this.addCornerRunes(components, 1, 0, EnumRuneType.BLANK); + this.addParallelRunes(components, 2, 0, EnumRuneType.DUSK); + } + + @Override + public Ritual getNewCopy() + { + return new RitualCrystalSplit(); + } + + @Override + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] { new TranslationTextComponent(this.getTranslationKey() + ".info") }; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualEllipsoid.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualEllipsoid.java new file mode 100644 index 00000000..1587145d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualEllipsoid.java @@ -0,0 +1,272 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.function.Consumer; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.item.BlockItem; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; + +@RitualRegister("ellipsoid") +public class RitualEllipsoid extends Ritual +{ + public static final String SPHEROID_RANGE = "spheroidRange"; + public static final String CHEST_RANGE = "chest"; + + private boolean cached = false; + private BlockPos currentPos; // Offset + + public RitualEllipsoid() + { + super("ritualEllipsoid", 0, 20000, "ritual." + BloodMagic.MODID + ".ellipseRitual"); + addBlockRange(SPHEROID_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-10, -10, -10), new BlockPos(11, 11, 11))); + addBlockRange(CHEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); + + setMaximumVolumeAndDistanceOfRange(SPHEROID_RANGE, 0, 32, 32); + setMaximumVolumeAndDistanceOfRange(CHEST_RANGE, 1, 3, 3); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + BlockPos masterPos = masterRitualStone.getBlockPos(); + AreaDescriptor chestRange = masterRitualStone.getBlockRange(CHEST_RANGE); + TileEntity tileInventory = world.getTileEntity(chestRange.getContainedPositions(masterPos).get(0)); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + AreaDescriptor sphereRange = masterRitualStone.getBlockRange(SPHEROID_RANGE); + AxisAlignedBB sphereBB = sphereRange.getAABB(masterPos); + int minX = (int) (masterPos.getX() - sphereBB.minX); + int maxX = (int) (sphereBB.maxX - masterPos.getX()) - 1; + int minY = (int) (masterPos.getY() - sphereBB.minY); + int maxY = (int) (sphereBB.maxY - masterPos.getY()) - 1; + int minZ = (int) (masterPos.getZ() - sphereBB.minZ); + int maxZ = (int) (sphereBB.maxZ - masterPos.getZ()) - 1; + + if (tileInventory != null) + { +// System.out.println("Tile"); + if (tileInventory.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.DOWN).isPresent()) + { +// System.out.println("Have inv"); + IItemHandler itemHandler = tileInventory.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.DOWN).resolve().get(); + + if (itemHandler.getSlots() <= 0) + { + return; + } + + int blockSlot = -1; + for (int invSlot = 0; invSlot < itemHandler.getSlots(); invSlot++) + { + ItemStack stack = itemHandler.extractItem(invSlot, 1, true); + if (stack.isEmpty() || !(stack.getItem() instanceof BlockItem)) + continue; + + blockSlot = invSlot; + break; + } + +// System.out.println("Block slot: " + blockSlot); + + if (blockSlot == -1) + { + return; + } + + int xR = Math.max(maxX, minX); + int yR = Math.max(maxY, minY); + int zR = Math.max(maxZ, minZ); + + int j = -minX; + int i = -minY; + int k = -minZ; + + if (currentPos != null) + { + j = currentPos.getY(); + i = Math.min(xR, Math.max(-minX, currentPos.getX())); + k = Math.min(zR, Math.max(-minZ, currentPos.getZ())); + } + int checks = 0; + int maxChecks = 100; + + while (j <= maxY) + { + while (i <= maxX) + { + while (k <= maxZ) + { + checks++; + if (checks >= maxChecks) + { + this.currentPos = new BlockPos(i, j, k); +// System.out.println(this.currentPos); + return; + } + + if (checkIfEllipsoidShell(xR, yR, zR, i, j, k)) + { + BlockPos newPos = masterPos.add(i, j, k); +// + if (!world.isAirBlock(newPos)) + { + k++; + continue; + } + + BlockState placeState = Block.getBlockFromItem(itemHandler.getStackInSlot(blockSlot).getItem()).getDefaultState(); + world.setBlockState(newPos, placeState); + + itemHandler.extractItem(blockSlot, 1, false); + tileInventory.markDirty(); + // TODO: + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost())); + k++; + this.currentPos = new BlockPos(i, j, k); +// System.out.println(this.currentPos); + return; + } + k++; + } + i++; + k = -minZ; + } + j++; + i = -minX; + this.currentPos = new BlockPos(i, j, k); + return; + } + + j = -minY; + this.currentPos = new BlockPos(i, j, k); + return; + } + } + } + + public boolean checkIfEllipsoidShell(int xR, int yR, int zR, int xOff, int yOff, int zOff) + { + // Checking shell in the x-direction + if (!checkIfEllipsoid(xR, yR, zR, xOff, yOff, zOff)) + { + return false; + } + + return !((checkIfEllipsoid(xR, yR, zR, xOff + 1, yOff, zOff) && checkIfEllipsoid(xR, yR, zR, xOff - 1, yOff, zOff)) && (checkIfEllipsoid(xR, yR, zR, xOff, yOff + 1, zOff) && checkIfEllipsoid(xR, yR, zR, xOff, yOff - 1, zOff)) && (checkIfEllipsoid(xR, yR, zR, xOff, yOff, zOff + 1) && checkIfEllipsoid(xR, yR, zR, xOff, yOff, zOff - 1))); +// if (xOff * xOff + yOff * yOff + zOff * zOff >= (xR - 0.5) * (xR - 0.5) && xOff * xOff + yOff * yOff + zOff * zOff <= (xR + 0.5) * (xR + 0.5)) +// if (checkIfEllipsoid(xR, yR, zR, xOff, yOff, zOff)) +// { +// if (xOff * xOff / ((xR - 0.5) * (xR - 0.5)) + yOff * yOff / ((yR - 0.5) * (yR - 0.5)) >= 1 - zOff * zOff / ((zR + possOffset) * (zR + possOffset))) +// { +// return true; +// } +// +// if (xOff * xOff / ((xR - 0.5) * (xR - 0.5)) + zOff * zOff / ((zR - 0.5) * (zR - 0.5)) >= 1 - yOff * yOff / ((yR + possOffset) * (yR + possOffset))) +// { +// return true; +// } +// +// if (zOff * zOff / ((zR - 0.5) * (zR - 0.5)) + yOff * yOff / ((yR - 0.5) * (yR - 0.5)) >= 1 - xOff * xOff / ((xR + possOffset) * (xR + possOffset))) +// { +// return true; +// } +// } +// return false; + } + + public boolean checkIfEllipsoid(float xR, float yR, float zR, float xOff, float yOff, float zOff) + { + float possOffset = 0.5f; + return xOff * xOff / ((xR + possOffset) * (xR + possOffset)) + yOff * yOff / ((yR + possOffset) * (yR + possOffset)) + zOff * zOff / ((zR + possOffset) * (zR + possOffset)) <= 1; + } + + @Override + public int getRefreshCost() + { + return 10;// Temporary + } + + @Override + public int getRefreshTime() + { + return 1; + } + +// @Override +// public void readFromNBT(NBTTagCompound tag) +// { +// super.readFromNBT(tag); +// tag +// } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.DUSK); + + addRune(components, 4, 0, 0, EnumRuneType.FIRE); + addRune(components, 5, 0, 0, EnumRuneType.FIRE); + addRune(components, 5, 0, -1, EnumRuneType.FIRE); + addRune(components, 5, 0, -2, EnumRuneType.FIRE); + addRune(components, -4, 0, 0, EnumRuneType.FIRE); + addRune(components, -5, 0, 0, EnumRuneType.FIRE); + addRune(components, -5, 0, 1, EnumRuneType.FIRE); + addRune(components, -5, 0, 2, EnumRuneType.FIRE); + + addRune(components, 0, 0, 4, EnumRuneType.AIR); + addRune(components, 0, 0, 5, EnumRuneType.AIR); + addRune(components, 1, 0, 5, EnumRuneType.AIR); + addRune(components, 2, 0, 5, EnumRuneType.AIR); + addRune(components, 0, 0, -4, EnumRuneType.AIR); + addRune(components, 0, 0, -5, EnumRuneType.AIR); + addRune(components, -1, 0, -5, EnumRuneType.AIR); + addRune(components, -2, 0, -5, EnumRuneType.AIR); + + addRune(components, 3, 0, 1, EnumRuneType.EARTH); + addRune(components, 3, 0, 2, EnumRuneType.EARTH); + addRune(components, 3, 0, 3, EnumRuneType.EARTH); + addRune(components, 2, 0, 3, EnumRuneType.EARTH); + addRune(components, -3, 0, -1, EnumRuneType.EARTH); + addRune(components, -3, 0, -2, EnumRuneType.EARTH); + addRune(components, -3, 0, -3, EnumRuneType.EARTH); + addRune(components, -2, 0, -3, EnumRuneType.EARTH); + + addRune(components, 1, 0, -3, EnumRuneType.WATER); + addRune(components, 2, 0, -3, EnumRuneType.WATER); + addRune(components, 3, 0, -3, EnumRuneType.WATER); + addRune(components, 3, 0, -2, EnumRuneType.WATER); + addRune(components, -1, 0, 3, EnumRuneType.WATER); + addRune(components, -2, 0, 3, EnumRuneType.WATER); + addRune(components, -3, 0, 3, EnumRuneType.WATER); + addRune(components, -3, 0, 2, EnumRuneType.WATER); + } + + @Override + public Ritual getNewCopy() + { + return new RitualEllipsoid(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualFeatheredKnife.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualFeatheredKnife.java new file mode 100644 index 00000000..9f2a7734 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualFeatheredKnife.java @@ -0,0 +1,258 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.potion.EffectInstance; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ConfigHandler; +import wayoftime.bloodmagic.altar.IBloodAltar; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.network.SetClientHealthPacket; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.helper.PlayerSacrificeHelper; + +@RitualRegister("feathered_knife") +public class RitualFeatheredKnife extends Ritual +{ + public static final String ALTAR_RANGE = "altar"; + public static final String DAMAGE_RANGE = "damage"; + + public static double rawWillDrain = 0.05; + public static double destructiveWillDrain = 0.05; + public static double corrosiveWillThreshold = 10; + public static double steadfastWillThreshold = 10; + public static double vengefulWillThreshold = 10; + public static int defaultRefreshTime = 20; + public int refreshTime = 20; + public BlockPos altarOffsetPos = new BlockPos(0, 0, 0); // TODO: Save! + + public RitualFeatheredKnife() + { + super("ritualFeatheredKnife", 0, 25000, "ritual." + BloodMagic.MODID + ".featheredKnifeRitual"); + addBlockRange(ALTAR_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-5, -10, -5), 11, 21, 11)); + addBlockRange(DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-15, -20, -15), 31, 41, 31)); + + setMaximumVolumeAndDistanceOfRange(ALTAR_RANGE, 0, 10, 15); + setMaximumVolumeAndDistanceOfRange(DAMAGE_RANGE, 0, 25, 15); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); +// if (world.isRemote) +// { +// return; +// } + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + + List willConfig = masterRitualStone.getActiveWillConfig(); + + double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); + double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); + double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); + double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); + double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); + + refreshTime = getRefreshTimeForRawWill(rawWill); + + boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; + + int maxEffects = currentEssence / getRefreshCost(); + int totalEffects = 0; + + BlockPos altarPos = pos.add(altarOffsetPos); + + TileEntity tile = world.getTileEntity(altarPos); + + AreaDescriptor altarRange = masterRitualStone.getBlockRange(ALTAR_RANGE); + + if (!altarRange.isWithinArea(altarOffsetPos) || !(tile instanceof IBloodAltar)) + { + for (BlockPos newPos : altarRange.getContainedPositions(pos)) + { + TileEntity nextTile = world.getTileEntity(newPos); + if (nextTile instanceof IBloodAltar) + { + tile = nextTile; + altarOffsetPos = newPos.subtract(pos); + + altarRange.resetCache(); + break; + } + } + } + + boolean useIncense = corrosiveWill >= corrosiveWillThreshold; + + if (tile instanceof IBloodAltar) + { + IBloodAltar tileAltar = (IBloodAltar) tile; + + AreaDescriptor damageRange = masterRitualStone.getBlockRange(DAMAGE_RANGE); + AxisAlignedBB range = damageRange.getAABB(pos); + + double destructiveDrain = 0; + + List entities = world.getEntitiesWithinAABB(PlayerEntity.class, range); + + for (PlayerEntity player : entities) + { + float healthThreshold = steadfastWill >= steadfastWillThreshold ? 0.7f : 0.3f; + + if (vengefulWill >= vengefulWillThreshold && !player.getGameProfile().getId().equals(masterRitualStone.getOwner())) + { + healthThreshold = 0.1f; + } + + float health = player.getHealth(); + float maxHealth = player.getMaxHealth(); + + float sacrificedHealth = 1; + double lpModifier = 1; + + if ((health / player.getMaxHealth() > healthThreshold) && (!useIncense || !player.isPotionActive(BloodMagicPotions.SOUL_FRAY))) + { + if (useIncense) + { + double incenseAmount = PlayerSacrificeHelper.getPlayerIncense(player); + + sacrificedHealth = health - maxHealth * healthThreshold; + lpModifier *= PlayerSacrificeHelper.getModifier(incenseAmount); + + PlayerSacrificeHelper.setPlayerIncense(player, 0); + player.addPotionEffect(new EffectInstance(BloodMagicPotions.SOUL_FRAY, PlayerSacrificeHelper.soulFrayDuration)); + } + + if (destructiveWill >= destructiveWillDrain * sacrificedHealth) + { + lpModifier *= getLPModifierForWill(destructiveWill); + destructiveWill -= destructiveWillDrain * sacrificedHealth; + destructiveDrain += destructiveWillDrain * sacrificedHealth; + } + +// if (LivingArmour.hasFullSet(player)) +// { +// ItemStack chestStack = player.getItemStackFromSlot(EquipmentSlotType.CHEST); +// LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack); +// if (armour != null) +// { +// LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(BloodMagic.MODID + ".upgrade.selfSacrifice", chestStack); +// +// if (upgrade instanceof LivingArmourUpgradeSelfSacrifice) +// { +// double modifier = ((LivingArmourUpgradeSelfSacrifice) upgrade).getSacrificeModifier(); +// +// lpModifier *= (1 + modifier); +// } +// } +// } + + player.setHealth(health - sacrificedHealth); + BloodMagic.packetHandler.sendTo(new SetClientHealthPacket(health - sacrificedHealth), (ServerPlayerEntity) player); + + tileAltar.sacrificialDaggerCall((int) (ConfigHandler.values.sacrificialDaggerConversion * lpModifier * sacrificedHealth), false); + + totalEffects++; + + if (totalEffects >= maxEffects) + { + break; + } + + } + } + + if (destructiveDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, destructiveDrain, true); + } + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost() * totalEffects)); + if (totalEffects > 0 && consumeRawWill) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawWillDrain, true); + } + } + + @Override + public int getRefreshTime() + { + return refreshTime; + } + + @Override + public int getRefreshCost() + { + return 20; + } + + @Override + public void gatherComponents(Consumer components) + { + addParallelRunes(components, 1, 0, EnumRuneType.DUSK); + addParallelRunes(components, 2, -1, EnumRuneType.WATER); + addCornerRunes(components, 1, -1, EnumRuneType.AIR); + addOffsetRunes(components, 2, 4, -1, EnumRuneType.FIRE); + addOffsetRunes(components, 2, 4, 0, EnumRuneType.EARTH); + addOffsetRunes(components, 4, 3, 0, EnumRuneType.EARTH); + addCornerRunes(components, 3, 0, EnumRuneType.AIR); + } + + @Override + public Ritual getNewCopy() + { + return new RitualFeatheredKnife(); + } + + @Override + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] { new TranslationTextComponent(this.getTranslationKey() + ".info"), + new TranslationTextComponent(this.getTranslationKey() + ".default.info"), + new TranslationTextComponent(this.getTranslationKey() + ".corrosive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".steadfast.info"), + new TranslationTextComponent(this.getTranslationKey() + ".destructive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".vengeful.info") }; + } + + public double getLPModifierForWill(double destructiveWill) + { + return 1 + destructiveWill * 0.2 / 100; + } + + public int getRefreshTimeForRawWill(double rawWill) + { + if (rawWill >= rawWillDrain) + { + return 10; + } + + return defaultRefreshTime; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualGreenGrove.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualGreenGrove.java new file mode 100644 index 00000000..a8d67d12 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualGreenGrove.java @@ -0,0 +1,345 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.Random; +import java.util.function.Consumer; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.CactusBlock; +import net.minecraft.block.FarmlandBlock; +import net.minecraft.block.IGrowable; +import net.minecraft.block.SugarCaneBlock; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.potion.EffectInstance; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.will.DemonWillHolder; + +@RitualRegister("green_grove") +public class RitualGreenGrove extends Ritual +{ + public static final String GROW_RANGE = "growing"; + public static final String LEECH_RANGE = "leech"; + public static final String HYDRATE_RANGE = "hydrate"; + + public static double corrosiveWillDrain = 0.2; + public static double rawWillDrain = 0.05; + public static double vengefulWillDrain = 0.05; + public static double steadfastWillDrain = 0.05; + public static int defaultRefreshTime = 20; + public static double defaultGrowthChance = 0.3; + public static BlockState farmlandState = Blocks.FARMLAND.getDefaultState().with(FarmlandBlock.MOISTURE, 7); + public int refreshTime = 20; + + public RitualGreenGrove() + { + super("ritualGreenGrove", 0, 5000, "ritual." + BloodMagic.MODID + ".greenGroveRitual"); + addBlockRange(GROW_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, 2, -1), 3, 1, 3)); + addBlockRange(LEECH_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); + addBlockRange(HYDRATE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); + setMaximumVolumeAndDistanceOfRange(GROW_RANGE, 81, 4, 4); + setMaximumVolumeAndDistanceOfRange(LEECH_RANGE, 0, 15, 15); + setMaximumVolumeAndDistanceOfRange(HYDRATE_RANGE, 0, 15, 15); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + if (!(world instanceof ServerWorld)) + { + return; + } + + ServerWorld serverWorld = (ServerWorld) world; + BlockPos pos = masterRitualStone.getBlockPos(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + int maxGrowths = currentEssence / getRefreshCost(); + int totalGrowths = 0; + + List willConfig = masterRitualStone.getActiveWillConfig(); + + DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, pos); + double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); + double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); + double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); + double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); + + refreshTime = getRefreshTimeForRawWill(rawWill); + double growthChance = getPlantGrowthChanceForWill(vengefulWill); + + boolean consumeRawWill = rawWill >= rawWillDrain && refreshTime != defaultRefreshTime; + boolean consumeVengefulWill = vengefulWill >= vengefulWillDrain && growthChance != defaultGrowthChance; + + double rawDrain = 0; + double vengefulDrain = 0; + + AreaDescriptor growingRange = masterRitualStone.getBlockRange(GROW_RANGE); + + int maxGrowthVolume = getMaxVolumeForRange(GROW_RANGE, willConfig, holder); + if (!growingRange.isWithinRange(getMaxVerticalRadiusForRange(GROW_RANGE, willConfig, holder), getMaxHorizontalRadiusForRange(GROW_RANGE, willConfig, holder)) || (maxGrowthVolume != 0 && growingRange.getVolume() > maxGrowthVolume)) + { + return; + } + + for (BlockPos newPos : growingRange.getContainedPositions(pos)) + { + BlockState state = world.getBlockState(newPos); + + if (!BloodMagicAPI.INSTANCE.getBlacklist().getGreenGrove().contains(state)) + { + boolean flag = state.getBlock() instanceof IGrowable || state.getBlock() instanceof CactusBlock || state.getBlock() instanceof SugarCaneBlock; + if (flag) + { + if (world.rand.nextDouble() < growthChance) + { + state.getBlock().randomTick(state, serverWorld, newPos, new Random()); + BlockState newState = world.getBlockState(newPos); + if (!newState.equals(state)) + { + world.playEvent(2005, newPos, 0); + totalGrowths++; + if (consumeRawWill) + { + rawWill -= rawWillDrain; + rawDrain += rawWillDrain; + } + + if (consumeVengefulWill) + { + vengefulWill -= vengefulWillDrain; + vengefulDrain += vengefulWillDrain; + } + } + } + } + } + + if (totalGrowths >= maxGrowths || (consumeRawWill && rawWill < rawWillDrain) || (consumeVengefulWill && vengefulWill < vengefulWillDrain)) + { + break; + } + } + + if (rawDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrain, true); + } + + if (vengefulDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrain, true); + } + + AreaDescriptor hydrateRange = masterRitualStone.getBlockRange(HYDRATE_RANGE); + + double steadfastDrain = 0; + if (steadfastWill > steadfastWillDrain) + { + AxisAlignedBB aabb = hydrateRange.getAABB(pos); + steadfastDrain += steadfastWillDrain * Utils.plantSeedsInArea(world, aabb, 2, 1); + steadfastWill -= steadfastDrain; + + for (BlockPos newPos : hydrateRange.getContainedPositions(pos)) + { + if (steadfastWill < steadfastWillDrain) + { + break; + } + + BlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + boolean hydratedBlock = false; + if (block == Blocks.DIRT || block == Blocks.GRASS) + { + world.setBlockState(newPos, farmlandState); + hydratedBlock = true; + } else if (block == Blocks.FARMLAND) + { + int meta = state.get(FarmlandBlock.MOISTURE); + if (meta < 7) + { + world.setBlockState(newPos, farmlandState); + hydratedBlock = true; + } + } + + if (hydratedBlock) + { + steadfastWill -= steadfastWillDrain; + steadfastDrain += steadfastWillDrain; + } + } + } + + if (steadfastDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastDrain, true); + } + + double corrosiveDrain = 0; + if (corrosiveWill > corrosiveWillDrain) + { + AreaDescriptor leechRange = masterRitualStone.getBlockRange(LEECH_RANGE); + AxisAlignedBB mobArea = leechRange.getAABB(pos); + List entityList = world.getEntitiesWithinAABB(LivingEntity.class, mobArea); + for (LivingEntity entityLiving : entityList) + { + if (corrosiveWill < corrosiveWillDrain) + { + break; + } + + if (entityLiving instanceof PlayerEntity) + { + continue; + } + + if (entityLiving.isPotionActive(BloodMagicPotions.PLANT_LEECH) || !entityLiving.isPotionApplicable(new EffectInstance(BloodMagicPotions.PLANT_LEECH))) + { + continue; + } + + entityLiving.addPotionEffect(new EffectInstance(BloodMagicPotions.PLANT_LEECH, 200, 0)); + + corrosiveWill -= corrosiveWillDrain; + corrosiveDrain += corrosiveWillDrain; + } + + if (corrosiveDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveDrain, true); + } + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(totalGrowths * getRefreshCost())); + } + + public double getPlantGrowthChanceForWill(double will) + { + if (will > 0) + { + return 0.3 + will / 200; + } + + return defaultGrowthChance; + } + + public int getRefreshTimeForRawWill(double rawWill) + { + if (rawWill > 0) + { + return 10; + } + + return defaultRefreshTime; + } + + @Override + public int getRefreshTime() + { + return refreshTime; + } + + @Override + public int getMaxVolumeForRange(String range, List activeTypes, DemonWillHolder holder) + { + if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) + { + double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); + if (destructiveWill > 0) + { + return 81 + (int) Math.pow(destructiveWill / 4, 1.5); + } + } + + return volumeRangeMap.get(range); + } + + @Override + public int getMaxVerticalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) + { + if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) + { + double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); + if (destructiveWill > 0) + { + return (int) (4 + destructiveWill / 10d); + } + } + + return verticalRangeMap.get(range); + } + + @Override + public int getMaxHorizontalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) + { + if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) + { + double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); + if (destructiveWill > 0) + { + return (int) (4 + destructiveWill / 10d); + } + } + + return horizontalRangeMap.get(range); + } + + @Override + public int getRefreshCost() + { + return 20; // TODO: Need to find a way to balance this + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.EARTH); + addParallelRunes(components, 1, 0, EnumRuneType.WATER); + } + + @Override + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] { new TranslationTextComponent(this.getTranslationKey() + ".info"), + new TranslationTextComponent(this.getTranslationKey() + ".default.info"), + new TranslationTextComponent(this.getTranslationKey() + ".corrosive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".steadfast.info"), + new TranslationTextComponent(this.getTranslationKey() + ".destructive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".vengeful.info") }; + } + + @Override + public Ritual getNewCopy() + { + return new RitualGreenGrove(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualHarvest.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualHarvest.java new file mode 100644 index 00000000..1ac4433e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualHarvest.java @@ -0,0 +1,145 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.function.Consumer; + +import com.google.common.collect.Lists; + +import net.minecraft.block.BlockState; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.ritual.harvest.HarvestRegistry; +import wayoftime.bloodmagic.ritual.harvest.IHarvestHandler; + +/** + * This ritual uses registered {@link IHarvestHandler}'s to harvest blocks. + *

+ * To register a new Handler for this ritual use + * {@link HarvestRegistry#registerHandler(IHarvestHandler)} + *

+ * This ritual includes a way to change the range based on what block is above + * the MasterRitualStone. You can use + * {@link HarvestRegistry#registerRangeAmplifier(BlockState, int)} to register a + * new amplifier. + */ +@RitualRegister("harvest") +public class RitualHarvest extends Ritual +{ + public static final String HARVEST_RANGE = "harvestRange"; + + public RitualHarvest() + { + super("ritualHarvest", 0, 20000, "ritual." + BloodMagic.MODID + ".harvestRitual"); + addBlockRange(HARVEST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-4, 1, -4), 9, 5, 9)); + setMaximumVolumeAndDistanceOfRange(HARVEST_RANGE, 0, 15, 15); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + BlockPos pos = masterRitualStone.getBlockPos(); + + if (masterRitualStone.getOwnerNetwork().getCurrentEssence() < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + int harvested = 0; + + AreaDescriptor harvestArea = masterRitualStone.getBlockRange(HARVEST_RANGE); + + harvestArea.resetIterator(); + while (harvestArea.hasNext()) + { + BlockPos nextPos = harvestArea.next().add(pos); + if (harvestBlock(world, nextPos, masterRitualStone.getBlockPos())) + { + harvested++; + } + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost() * harvested)); + } + + @Override + public int getRefreshCost() + { + return 20; + } + + @Override + public int getRefreshTime() + { + return 5; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.DUSK); + addParallelRunes(components, 2, 0, EnumRuneType.EARTH); + addOffsetRunes(components, 3, 1, 0, EnumRuneType.EARTH); + addOffsetRunes(components, 3, 2, 0, EnumRuneType.WATER); + } + + @Override + public Ritual getNewCopy() + { + return new RitualHarvest(); + } + + public static boolean harvestBlock(World world, BlockPos cropPos, BlockPos controllerPos) + { + BlockState harvestState = world.getBlockState(cropPos); + TileEntity potentialInventory = world.getTileEntity(controllerPos.up()); + IItemHandler itemHandler = null; + if (potentialInventory != null && potentialInventory.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.DOWN).isPresent()) + itemHandler = potentialInventory.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.DOWN).resolve().get(); + + for (IHarvestHandler handler : HarvestRegistry.getHarvestHandlers()) + { + if (handler.test(world, cropPos, harvestState)) + { + List drops = Lists.newArrayList(); + if (handler.harvest(world, cropPos, harvestState, drops)) + { + for (ItemStack stack : drops) + { + if (stack.isEmpty()) + continue; + + // TODO I wrote this, but didn't actually think about whether it should be a + // thing. Remove the true if we want to keep it + if (itemHandler == null || true) + InventoryHelper.spawnItemStack(world, cropPos.getX(), cropPos.getY(), cropPos.getZ(), stack); + else + { + ItemStack remainder = ItemHandlerHelper.insertItemStacked(itemHandler, stack, false); + if (!remainder.isEmpty()) + InventoryHelper.spawnItemStack(world, cropPos.getX(), cropPos.getY(), cropPos.getZ(), remainder); + } + } + return true; + } + } + } + + return false; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualLava.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualLava.java new file mode 100644 index 00000000..2cbfba90 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualLava.java @@ -0,0 +1,359 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.Fluids; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; +import wayoftime.bloodmagic.util.Utils; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +@RitualRegister("lava") +public class RitualLava extends Ritual +{ + public static final String LAVA_RANGE = "lavaRange"; + public static final String FIRE_FUSE_RANGE = "fireFuse"; + public static final String FIRE_RESIST_RANGE = "fireResist"; + public static final String FIRE_DAMAGE_RANGE = "fireDamage"; + public static final String LAVA_TANK_RANGE = "lavaTank"; + + public static final double vengefulWillDrain = 1; + public static final double steadfastWillDrain = 0.5; + public static final double corrosiveWillDrain = 0.2; + public static final int corrosiveRefreshTime = 20; + public int timer = 0; + + public RitualLava() + { + super("ritualLava", 0, 10000, "ritual." + BloodMagic.MODID + ".lavaRitual"); + addBlockRange(LAVA_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); + addBlockRange(FIRE_FUSE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, -2, -2), 5)); + addBlockRange(FIRE_RESIST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); + addBlockRange(FIRE_DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1)); + addBlockRange(LAVA_TANK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); + + setMaximumVolumeAndDistanceOfRange(LAVA_RANGE, 9, 3, 3); + setMaximumVolumeAndDistanceOfRange(FIRE_FUSE_RANGE, 0, 10, 10); + setMaximumVolumeAndDistanceOfRange(FIRE_RESIST_RANGE, 0, 10, 10); + setMaximumVolumeAndDistanceOfRange(FIRE_DAMAGE_RANGE, 0, 10, 10); + setMaximumVolumeAndDistanceOfRange(LAVA_TANK_RANGE, 1, 10, 10); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + timer++; + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + int lpDrain = 0; + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + List willConfig = masterRitualStone.getActiveWillConfig(); + + double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); + double rawDrained = 0; + + DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, pos); + AreaDescriptor lavaRange = masterRitualStone.getBlockRange(LAVA_RANGE); + + int maxLavaVolume = getMaxVolumeForRange(LAVA_RANGE, willConfig, holder); + if (!lavaRange.isWithinRange(getMaxVerticalRadiusForRange(LAVA_RANGE, willConfig, holder), getMaxHorizontalRadiusForRange(LAVA_RANGE, willConfig, holder)) || (maxLavaVolume != 0 && lavaRange.getVolume() > maxLavaVolume)) + { + return; + } + + for (BlockPos newPos : lavaRange.getContainedPositions(pos)) + { + BlockState state = world.getBlockState(newPos); + if (world.isAirBlock(newPos) || Utils.isFlowingLiquid(world, newPos, state)) + { + int lpCost = getLPCostForRawWill(rawWill); + if (currentEssence < lpCost) + { + break; + } + world.setBlockState(newPos, Blocks.LAVA.getDefaultState()); + currentEssence -= lpCost; + lpDrain += lpCost; + if (rawWill > 0) + { + double drain = getWillCostForRawWill(rawWill); + rawWill -= drain; + rawDrained += drain; + } + } + } + + if (rawWill > 0) + { + AreaDescriptor chestRange = masterRitualStone.getBlockRange(LAVA_TANK_RANGE); + TileEntity tile = world.getTileEntity(chestRange.getContainedPositions(pos).get(0)); + double drain = getWillCostForRawWill(rawWill); + int lpCost = getLPCostForRawWill(rawWill); + + if (rawWill >= drain && currentEssence >= lpCost) + { + if (tile != null) + { + LazyOptional capability = tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null); + if (capability.isPresent()) + { + IFluidHandler handler = capability.resolve().get(); + double filled = handler.fill(new FluidStack(Fluids.LAVA, 1000), FluidAction.EXECUTE); + + double ratio = filled / 1000; + + rawWill -= drain * ratio; + rawDrained += drain * ratio; + + currentEssence -= Math.ceil(lpCost * ratio); + lpDrain += Math.ceil(lpCost * ratio); + } + } + } + } + + double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); + double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); + double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); + + if (vengefulWill >= vengefulWillDrain) + { + double vengefulDrained = 0; + AreaDescriptor fuseRange = masterRitualStone.getBlockRange(FIRE_FUSE_RANGE); + + AxisAlignedBB fuseArea = fuseRange.getAABB(pos); + List entities = world.getEntitiesWithinAABB(LivingEntity.class, fuseArea); + + for (LivingEntity entity : entities) + { + if (vengefulWill < vengefulWillDrain) + { + break; + } + + if (entity instanceof PlayerEntity) + { + continue; + } + + if (!entity.isPotionActive(BloodMagicPotions.FIRE_FUSE)) + { + entity.addPotionEffect(new EffectInstance(BloodMagicPotions.FIRE_FUSE, 100, 0)); + + vengefulDrained += vengefulWillDrain; + vengefulWill -= vengefulWillDrain; + } + } + + if (vengefulDrained > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.VENGEFUL, vengefulDrained, true); + } + } + + if (steadfastWill >= steadfastWillDrain) + { + double steadfastDrained = 0; + AreaDescriptor resistRange = masterRitualStone.getBlockRange(FIRE_RESIST_RANGE); + + int duration = getFireResistForWill(steadfastWill); + + AxisAlignedBB resistArea = resistRange.getAABB(pos); + List entities = world.getEntitiesWithinAABB(PlayerEntity.class, resistArea); + + for (PlayerEntity entity : entities) + { + if (steadfastWill < steadfastWillDrain) + { + break; + } + if (!entity.isPotionActive(Effects.FIRE_RESISTANCE) || (entity.getActivePotionEffect(Effects.FIRE_RESISTANCE).getDuration() < 2)) + { + entity.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE, 100, 0)); + + steadfastDrained += steadfastWillDrain; + steadfastWill -= steadfastWillDrain; + } + } + + if (steadfastDrained > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.STEADFAST, steadfastDrained, true); + } + } + + if (timer % corrosiveRefreshTime == 0 && corrosiveWill >= corrosiveWillDrain) + { + double corrosiveDrained = 0; + AreaDescriptor resistRange = masterRitualStone.getBlockRange(FIRE_DAMAGE_RANGE); + + float damage = getCorrosiveDamageForWill(corrosiveWill); + + AxisAlignedBB damageArea = resistRange.getAABB(pos); + List entities = world.getEntitiesWithinAABB(LivingEntity.class, damageArea); + + for (LivingEntity entity : entities) + { + if (corrosiveWill < corrosiveWillDrain) + { + break; + } + + if (!entity.isAlive() && entity.hurtTime <= 0 && Utils.isImmuneToFireDamage(entity)) + { + if (entity.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, damage)) + { + corrosiveDrained += corrosiveWillDrain; + corrosiveWill -= corrosiveWillDrain; + } + } + } + + if (corrosiveDrained > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveDrained, true); + } + } + + if (rawDrained > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.DEFAULT, rawDrained, true); + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(lpDrain)); + } + + @Override + public int getRefreshTime() + { + return 1; + } + + @Override + public int getRefreshCost() + { + return 500; + } + + @Override + public ITextComponent[] provideInformationOfRitualToPlayer(PlayerEntity player) + { + return new ITextComponent[] { new TranslationTextComponent(this.getTranslationKey() + ".info"), + new TranslationTextComponent(this.getTranslationKey() + ".default.info"), + new TranslationTextComponent(this.getTranslationKey() + ".corrosive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".steadfast.info"), + new TranslationTextComponent(this.getTranslationKey() + ".destructive.info"), + new TranslationTextComponent(this.getTranslationKey() + ".vengeful.info") }; + } + + @Override + public void gatherComponents(Consumer components) + { + addParallelRunes(components, 1, 0, EnumRuneType.FIRE); + } + + @Override + public Ritual getNewCopy() + { + return new RitualLava(); + } + + @Override + public int getMaxVolumeForRange(String range, List activeTypes, DemonWillHolder holder) + { + if (LAVA_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) + { + double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); + if (destructiveWill > 0) + { + return 9 + (int) Math.pow(destructiveWill / 10, 1.5); + } + } + + return volumeRangeMap.get(range); + } + + @Override + public int getMaxVerticalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) + { + if (LAVA_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) + { + double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); + if (destructiveWill > 0) + { + return (int) (3 + destructiveWill / 10d); + } + } + + return verticalRangeMap.get(range); + } + + @Override + public int getMaxHorizontalRadiusForRange(String range, List activeTypes, DemonWillHolder holder) + { + if (LAVA_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE)) + { + double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE); + if (destructiveWill > 0) + { + return (int) (3 + destructiveWill / 10d); + } + } + + return horizontalRangeMap.get(range); + } + + public int getFireResistForWill(double steadfastWill) + { + return (int) (200 + steadfastWill * 3); + } + + public float getCorrosiveDamageForWill(double corrosiveWill) + { + return (float) (1 + corrosiveWill * 0.05); + } + + public int getLPCostForRawWill(double raw) + { + return Math.max((int) (500 - raw), 0); + } + + public double getWillCostForRawWill(double raw) + { + return Math.min(1, raw / 500); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualMagnetic.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualMagnetic.java new file mode 100644 index 00000000..16aab5ef --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualMagnetic.java @@ -0,0 +1,202 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.function.Consumer; + +import com.mojang.authlib.GameProfile; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.common.Tags; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.FakePlayerFactory; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.Utils; + +@RitualRegister("magnetism") +public class RitualMagnetic extends Ritual +{ + public static final String PLACEMENT_RANGE = "placementRange"; + // public static final String SEARCH_RANGE = "searchRange"; + public BlockPos lastPos; // An offset + private FakePlayer fakePlayer; + + public RitualMagnetic() + { + super("ritualMagnetic", 0, 5000, "ritual." + BloodMagic.MODID + ".magneticRitual"); + addBlockRange(PLACEMENT_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-1, 1, -1), 3)); + setMaximumVolumeAndDistanceOfRange(PLACEMENT_RANGE, 50, 4, 4); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + Vector3d MRSpos = new Vector3d(masterRitualStone.getBlockPos().getX(), masterRitualStone.getBlockPos().getY(), masterRitualStone.getBlockPos().getZ()); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + + AreaDescriptor placementRange = masterRitualStone.getBlockRange(PLACEMENT_RANGE); + + BlockPos replacement = pos; + boolean replace = false; + + for (BlockPos offset : placementRange.getContainedPositions(pos)) + { + if (world.isAirBlock(offset)) + { + replacement = offset; + replace = true; + break; + } + } + + BlockState downState = world.getBlockState(pos.down()); + int radius = getRadius(downState.getBlock()); + + if (replace) + { + int j = -1; + int i = -radius; + int k = -radius; + + if (lastPos != null) + { + j = lastPos.getY(); + i = Math.min(radius, Math.max(-radius, lastPos.getX())); + k = Math.min(radius, Math.max(-radius, lastPos.getZ())); + } + + if (j + pos.getY() >= 0) + { + while (i <= radius) + { + while (k <= radius) + { + BlockPos newPos = pos.add(i, j, k); + Vector3d newPosVector = new Vector3d(newPos.getX(), newPos.getY(), newPos.getZ()); + BlockState state = world.getBlockState(newPos); +// RayTraceResult fakeRayTrace = world.rayTraceBlocks(MRSpos, newPosVector, false); +// ItemStack checkStack = state.getBlock().getPickBlock(state, fakeRayTrace, world, newPos, getFakePlayer((ServerWorld) world)); + ItemStack checkStack = new ItemStack(state.getBlock()); + if (isBlockOre(checkStack)) + { + Utils.swapLocations(world, newPos, world, replacement); + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost())); + k++; + this.lastPos = new BlockPos(i, j, k); + return; + } else + { + k++; + } + } + i++; + k = -radius; + } + j--; + i = -radius; + this.lastPos = new BlockPos(i, j, k); + return; + } + + j = -1; + this.lastPos = new BlockPos(i, j, k); + } + + } + + public int getRadius(Block block) + { + if (block == Blocks.IRON_BLOCK) + { + return 7; + } + + if (block == Blocks.GOLD_BLOCK) + { + return 15; + } + + if (block == Blocks.DIAMOND_BLOCK) + { + return 31; + } + + return 3; + } + + @Override + public int getRefreshTime() + { + return 40; + } + + @Override + public int getRefreshCost() + { + return 50; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.EARTH); + addParallelRunes(components, 2, 1, EnumRuneType.EARTH); + addCornerRunes(components, 2, 1, EnumRuneType.AIR); + addParallelRunes(components, 2, 2, EnumRuneType.FIRE); + } + + @Override + public Ritual getNewCopy() + { + return new RitualMagnetic(); + } + + private FakePlayer getFakePlayer(ServerWorld world) + { + return fakePlayer == null + ? fakePlayer = FakePlayerFactory.get(world, new GameProfile(null, BloodMagic.MODID + "_ritual_magnetic")) + : fakePlayer; + } + + public static boolean isBlockOre(ItemStack stack) + { + if (stack.isEmpty()) + return false; + + return stack.getItem().isIn(Tags.Items.ORES); + +// for(ResourceLocation rl : stack.getItem().getTags()) +// { +// rl.getPath() +// } + +// for (int id : OreDictionary.getOreIDs(stack)) +// { +// String oreName = OreDictionary.getOreName(id); +// if (oreName.contains("ore")) +// return true; +// } + +// return false; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualRegeneration.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualRegeneration.java new file mode 100644 index 00000000..d83cdb44 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualRegeneration.java @@ -0,0 +1,214 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.Collections; +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.util.DamageSourceBloodMagic; +import wayoftime.bloodmagic.util.Utils; + +@RitualRegister("regeneration") +public class RitualRegeneration extends Ritual +{ + public static final String HEAL_RANGE = "heal"; + public static final String VAMPIRE_RANGE = "vampire"; + + public static final int SACRIFICE_AMOUNT = 100; + + public static final double corrosiveWillDrain = 0.04; + + public RitualRegeneration() + { + super("ritualRegeneration", 0, 25000, "ritual." + BloodMagic.MODID + ".regenerationRitual"); + addBlockRange(HEAL_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-15, -15, -15), 31)); + addBlockRange(VAMPIRE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-15, -15, -15), 31)); + + setMaximumVolumeAndDistanceOfRange(HEAL_RANGE, 0, 20, 20); + setMaximumVolumeAndDistanceOfRange(VAMPIRE_RANGE, 0, 20, 20); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + + int maxEffects = currentEssence / getRefreshCost(); + int totalEffects = 0; + + int totalCost = 0; + + List willConfig = masterRitualStone.getActiveWillConfig(); + + double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); + double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); + double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); + double destructiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DESTRUCTIVE, willConfig); + double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig); + + double vengefulDrain = 0; + double steadfastDrain = 0; + double destructiveDrain = 0; + double corrosiveDrain = 0; + + boolean syphonHealth = corrosiveWill >= corrosiveWillDrain; + boolean applyAbsorption = false; + float absorptionRate = 1; + int maxAbsorption = 20; + + AreaDescriptor healArea = masterRitualStone.getBlockRange(HEAL_RANGE); + AxisAlignedBB healRange = healArea.getAABB(pos); + + AreaDescriptor damageArea = masterRitualStone.getBlockRange(VAMPIRE_RANGE); + AxisAlignedBB damageRange = damageArea.getAABB(pos); + + List entities = world.getEntitiesWithinAABB(LivingEntity.class, healRange); + List players = world.getEntitiesWithinAABB(PlayerEntity.class, healRange); + List damagedEntities = world.getEntitiesWithinAABB(LivingEntity.class, damageRange); + + if (syphonHealth) + { + for (PlayerEntity player : players) + { + if (player.getHealth() <= player.getMaxHealth() - 1) + { + float syphonedHealthAmount = getSyphonAmountForWill(corrosiveWill); + Collections.shuffle(damagedEntities); + for (LivingEntity damagedEntity : damagedEntities) + { + if (damagedEntity instanceof PlayerEntity) + { + continue; + } + + float currentHealth = damagedEntity.getHealth(); + + damagedEntity.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, Math.min(player.getMaxHealth() - player.getHealth(), syphonedHealthAmount)); + + float healthDifference = currentHealth - damagedEntity.getHealth(); + if (healthDifference > 0) + { + corrosiveDrain += corrosiveWillDrain; + corrosiveWill -= corrosiveWillDrain; + player.heal(healthDifference); + } + + break; + } + } + } + } + + for (LivingEntity entity : entities) + { + float health = entity.getHealth(); + if (health <= entity.getMaxHealth() - 1) + { + if (entity.isPotionApplicable(new EffectInstance(Effects.REGENERATION))) + { + if (entity instanceof PlayerEntity) + { + totalCost += getRefreshCost(); + currentEssence -= getRefreshCost(); + } else + { + totalCost += getRefreshCost() / 10; + currentEssence -= getRefreshCost() / 10; + } + + entity.addPotionEffect(new EffectInstance(Effects.REGENERATION, 50, 0, false, false)); + + totalEffects++; + + if (totalEffects >= maxEffects) + { + break; + } + } + } + if (applyAbsorption && entity instanceof PlayerEntity) + { + if (applyAbsorption) + { + float added = Utils.addAbsorptionToMaximum(entity, absorptionRate, maxAbsorption, 1000); + } + } + } + + if (corrosiveDrain > 0) + { + WorldDemonWillHandler.drainWill(world, pos, EnumDemonWillType.CORROSIVE, corrosiveDrain, true); + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(totalCost)); + } + + @Override + public int getRefreshTime() + { + return 50; + } + + @Override + public int getRefreshCost() + { + return SACRIFICE_AMOUNT; + } + + @Override + public void gatherComponents(Consumer components) + { + components.accept(new RitualComponent(new BlockPos(4, 0, 0), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(5, 0, -1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(5, 0, 1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(-4, 0, 0), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(-5, 0, -1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(-5, 0, 1), EnumRuneType.AIR)); + components.accept(new RitualComponent(new BlockPos(0, 0, 4), EnumRuneType.FIRE)); + components.accept(new RitualComponent(new BlockPos(1, 0, 5), EnumRuneType.FIRE)); + components.accept(new RitualComponent(new BlockPos(-1, 0, 5), EnumRuneType.FIRE)); + components.accept(new RitualComponent(new BlockPos(0, 0, -4), EnumRuneType.FIRE)); + components.accept(new RitualComponent(new BlockPos(1, 0, -5), EnumRuneType.FIRE)); + components.accept(new RitualComponent(new BlockPos(-1, 0, -5), EnumRuneType.FIRE)); + addOffsetRunes(components, 3, 5, 0, EnumRuneType.WATER); + addCornerRunes(components, 3, 0, EnumRuneType.DUSK); + addOffsetRunes(components, 4, 5, 0, EnumRuneType.EARTH); + addOffsetRunes(components, 4, 5, -1, EnumRuneType.EARTH); + addCornerRunes(components, 5, 0, EnumRuneType.EARTH); + } + + @Override + public Ritual getNewCopy() + { + return new RitualRegeneration(); + } + + public float getSyphonAmountForWill(double corrosiveWill) + { + return 1; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualUpgradeRemove.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualUpgradeRemove.java new file mode 100644 index 00000000..a0b15e0a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualUpgradeRemove.java @@ -0,0 +1,170 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.function.Consumer; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.effect.LightningBoltEntity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.core.living.ILivingContainer; +import wayoftime.bloodmagic.core.living.LivingStats; +import wayoftime.bloodmagic.core.living.LivingUpgrade; +import wayoftime.bloodmagic.core.living.LivingUtil; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; + +@RitualRegister("upgrade_remove") +public class RitualUpgradeRemove extends Ritual +{ + public static final String CHECK_RANGE = "fillRange"; + + public RitualUpgradeRemove() + { + super("ritualUpgradeRemove", 0, 25000, "ritual." + BloodMagic.MODID + ".upgradeRemoveRitual"); + addBlockRange(CHECK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1, 2, 1)); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + + if (world.isRemote) + { + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + + AreaDescriptor checkRange = masterRitualStone.getBlockRange(CHECK_RANGE); + + List playerList = world.getEntitiesWithinAABB(PlayerEntity.class, checkRange.getAABB(pos)); + + for (PlayerEntity player : playerList) + { + if (LivingUtil.hasFullSet(player)) + { + boolean removedUpgrade = false; + + ItemStack chestStack = player.getItemStackFromSlot(EquipmentSlotType.CHEST); + LivingStats stats = LivingStats.fromPlayer(player); + if (stats != null) + { + Map upgrades = stats.getUpgrades(); + + for (Entry entry : upgrades.entrySet()) + { + int exp = entry.getValue().intValue(); + LivingUpgrade upgrade = entry.getKey(); + int level = upgrade.getLevel(exp); + if (level >= 1) + { + ItemStack upgradeStack = new ItemStack(BloodMagicItems.LIVING_TOME.get()); +// int expForLevel = upgrade.getNextRequirement(upgrade.getLevel(exp) - 1); + ((ILivingContainer) BloodMagicItems.LIVING_TOME.get()).updateLivingStats(upgradeStack, new LivingStats().setMaxPoints(upgrade.getLevelCost(exp)).addExperience(upgrade.getKey(), exp)); + ItemEntity item = new ItemEntity(world, player.getPosX(), player.getPosY(), player.getPosZ(), upgradeStack); + world.addEntity(item); + removedUpgrade = true; + } + stats.resetExperience(upgrade.getKey()); + } + +// @SuppressWarnings("unchecked") +// HashMap upgradeMap = (HashMap) armour.upgradeMap.clone(); +// +// for (Entry entry : upgradeMap.entrySet()) +// { +// LivingArmourUpgrade upgrade = entry.getValue(); +// String upgradeKey = entry.getKey(); +// +// ItemStack upgradeStack = new ItemStack(RegistrarBloodMagicItems.UPGRADE_TOME); +// LivingUpgrades.setKey(upgradeStack, upgradeKey); +// LivingUpgrades.setLevel(upgradeStack, upgrade.getUpgradeLevel()); +// +// boolean successful = armour.removeUpgrade(player, upgrade); +// +// if (successful) +// { +// removedUpgrade = true; +// world.spawnEntity(new ItemEntity(world, player.posX, player.posY, player.posZ, upgradeStack)); +// for (Entry trackerEntry : armour.trackerMap.entrySet()) +// { +// StatTracker tracker = trackerEntry.getValue(); +// if (tracker != null) +// { +// if (tracker.providesUpgrade(upgradeKey)) +// { +// tracker.resetTracker(); // Resets the tracker if the upgrade corresponding to it +// // was removed. +// } +// } +// } +// } +// } + + if (removedUpgrade) + { + LivingStats.toPlayer(player, stats); + + masterRitualStone.setActive(false); + + LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(world); +// LightningBoltEntity lightning = new LightningBoltEntity(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ); + lightningboltentity.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); + lightningboltentity.setEffectOnly(true); + world.addEntity(lightningboltentity); + } + + } + } + } + } + + @Override + public int getRefreshTime() + { + return 1; + } + + @Override + public int getRefreshCost() + { + return 0; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.DUSK); + addCornerRunes(components, 2, 0, EnumRuneType.FIRE); + addOffsetRunes(components, 1, 2, 0, EnumRuneType.FIRE); + addCornerRunes(components, 1, 1, EnumRuneType.WATER); + addParallelRunes(components, 4, 0, EnumRuneType.EARTH); + addCornerRunes(components, 1, 3, EnumRuneType.WATER); + addParallelRunes(components, 1, 4, EnumRuneType.AIR); + + for (int i = 0; i < 4; i++) + { + addCornerRunes(components, 3, i, EnumRuneType.EARTH); + } + } + + @Override + public Ritual getNewCopy() + { + return new RitualUpgradeRemove(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualWater.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualWater.java new file mode 100644 index 00000000..aa7d230f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualWater.java @@ -0,0 +1,85 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.function.Consumer; + +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualRegister; + +@RitualRegister("water") +public class RitualWater extends Ritual +{ + public static final String WATER_RANGE = "waterRange"; + + public RitualWater() + { + super("ritualWater", 0, 500, "ritual." + BloodMagic.MODID + ".waterRitual"); + addBlockRange(WATER_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1)); + setMaximumVolumeAndDistanceOfRange(WATER_RANGE, 9, 3, 3); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + int maxEffects = currentEssence / getRefreshCost(); + int totalEffects = 0; + + AreaDescriptor waterRange = masterRitualStone.getBlockRange(WATER_RANGE); + + for (BlockPos newPos : waterRange.getContainedPositions(masterRitualStone.getBlockPos())) + { + if (world.isAirBlock(newPos)) + { + world.setBlockState(newPos, Blocks.WATER.getDefaultState()); + totalEffects++; + } + + if (totalEffects >= maxEffects) + { + break; + } + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost() * totalEffects)); + } + + @Override + public int getRefreshTime() + { + return 1; + } + + @Override + public int getRefreshCost() + { + return 25; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.WATER); + } + + @Override + public Ritual getNewCopy() + { + return new RitualWater(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/ritual/types/RitualWellOfSuffering.java b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualWellOfSuffering.java new file mode 100644 index 00000000..e802b53b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/ritual/types/RitualWellOfSuffering.java @@ -0,0 +1,157 @@ +package wayoftime.bloodmagic.ritual.types; + +import java.util.List; +import java.util.function.Consumer; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.ritual.RitualManager; +import wayoftime.bloodmagic.ritual.RitualRegister; +import wayoftime.bloodmagic.tile.TileAltar; + +@RitualRegister("well_of_suffering") +public class RitualWellOfSuffering extends Ritual +{ + public static final String ALTAR_RANGE = "altar"; + public static final String DAMAGE_RANGE = "damage"; + + public static final int SACRIFICE_AMOUNT = 25; + + public BlockPos altarOffsetPos = new BlockPos(0, 0, 0); // TODO: Save! + + public RitualWellOfSuffering() + { + super("ritualWellOfSuffering", 0, 40000, "ritual." + BloodMagic.MODID + ".wellOfSufferingRitual"); + addBlockRange(ALTAR_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-5, -10, -5), 11, 21, 11)); + addBlockRange(DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-10, -10, -10), 21)); + + setMaximumVolumeAndDistanceOfRange(ALTAR_RANGE, 0, 10, 15); + setMaximumVolumeAndDistanceOfRange(DAMAGE_RANGE, 0, 15, 15); + } + + @Override + public void performRitual(IMasterRitualStone masterRitualStone) + { + World world = masterRitualStone.getWorldObj(); + int currentEssence = masterRitualStone.getOwnerNetwork().getCurrentEssence(); + + if (currentEssence < getRefreshCost()) + { + masterRitualStone.getOwnerNetwork().causeNausea(); + return; + } + + BlockPos pos = masterRitualStone.getBlockPos(); + + int maxEffects = currentEssence / getRefreshCost(); + int totalEffects = 0; + + BlockPos altarPos = pos.add(altarOffsetPos); + + TileEntity tile = world.getTileEntity(altarPos); + + AreaDescriptor altarRange = masterRitualStone.getBlockRange(ALTAR_RANGE); + + if (!altarRange.isWithinArea(altarOffsetPos) || !(tile instanceof TileAltar)) + { + for (BlockPos newPos : altarRange.getContainedPositions(pos)) + { + TileEntity nextTile = world.getTileEntity(newPos); + if (nextTile instanceof TileAltar) + { + tile = nextTile; + altarOffsetPos = newPos.subtract(pos); + + altarRange.resetCache(); + break; + } + } + } + + if (tile instanceof TileAltar) + { + TileAltar tileAltar = (TileAltar) tile; + + AreaDescriptor damageRange = masterRitualStone.getBlockRange(DAMAGE_RANGE); + AxisAlignedBB range = damageRange.getAABB(pos); + + List entities = world.getEntitiesWithinAABB(LivingEntity.class, range); + + for (LivingEntity entity : entities) + { +// EntityEntry entityEntry = ForgeRegistries.ENTITIES.getKe; + ResourceLocation id = entity.getType().getRegistryName(); + + if (BloodMagicAPI.INSTANCE.getBlacklist().getSacrifice().contains(id)) + continue; + + int lifeEssenceRatio = BloodMagicAPI.INSTANCE.getValueManager().getSacrificial().getOrDefault(id, SACRIFICE_AMOUNT); + + if (lifeEssenceRatio <= 0) + continue; + + if (entity.isAlive() && !(entity instanceof PlayerEntity)) + { + if (entity.attackEntityFrom(RitualManager.RITUAL_DAMAGE, 1)) + { + if (entity.isChild()) + lifeEssenceRatio *= 0.5F; + + tileAltar.sacrificialDaggerCall(lifeEssenceRatio, true); + + totalEffects++; + + if (totalEffects >= maxEffects) + { + break; + } + } + } + } + } + + masterRitualStone.getOwnerNetwork().syphon(masterRitualStone.ticket(getRefreshCost() * totalEffects)); + } + + @Override + public int getRefreshTime() + { + return 25; + } + + @Override + public int getRefreshCost() + { + return 2; + } + + @Override + public void gatherComponents(Consumer components) + { + addCornerRunes(components, 1, 0, EnumRuneType.FIRE); + addCornerRunes(components, 2, -1, EnumRuneType.FIRE); + addParallelRunes(components, 2, -1, EnumRuneType.EARTH); + addCornerRunes(components, -3, -1, EnumRuneType.DUSK); + addOffsetRunes(components, 2, 4, -1, EnumRuneType.WATER); + addOffsetRunes(components, 1, 4, 0, EnumRuneType.WATER); + addParallelRunes(components, 4, 1, EnumRuneType.AIR); + } + + @Override + public Ritual getNewCopy() + { + return new RitualWellOfSuffering(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java b/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java new file mode 100644 index 00000000..f1cd36f9 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java @@ -0,0 +1,228 @@ +package wayoftime.bloodmagic.structures; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.util.Direction; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.util.BMLog; + +public class Dungeon +{ + public static boolean placeStructureAtPosition(Random rand, ServerWorld world, BlockPos pos) + { + long startTime = System.nanoTime(); + + Map> availableDoorMap = new HashMap<>(); // Map of doors. The EnumFacing indicates + // what way this door faces. + List descriptorList = new ArrayList<>(); + Map> roomMap = new HashMap<>(); // Placement positions in terms +// // of actual positions + +// List>> roomList = new ArrayList<>(); + + PlacementSettings settings = new PlacementSettings(); + Mirror mir = Mirror.NONE; + + settings.setMirror(mir); + + Rotation rot = Rotation.NONE; + + settings.setRotation(rot); + settings.setIgnoreEntities(true); + settings.setChunk(null); + + settings.addProcessor(new StoneToOreProcessor(0.2f)); + +// settings.setReplacedBlock(null); + +// settings.setIgnoreStructureBlock(false); + settings.func_215223_c(true); + +// PlacementSettings placementsettings = (new PlacementSettings()).setMirror(this.mirror).setRotation(this.rotation).setIgnoreEntities(this.ignoreEntities).setChunk((ChunkPos)null); +// if (this.integrity < 1.0F) { +// placementsettings.clearProcessors().addProcessor(new IntegrityProcessor(MathHelper.clamp(this.integrity, 0.0F, 1.0F))).setRandom(func_214074_b(this.seed)); +// } +// +// BlockPos blockpos2 = blockpos.add(this.position); +// p_242689_3_.func_237144_a_(p_242689_1_, blockpos2, placementsettings, func_214074_b(this.seed)); + +// List rotationInfo = new ArrayList(); + +// int n = 1; + DungeonRoom room = getRandomRoom(rand); + roomMap.put(pos, Pair.of(room, settings.copy())); +// roomList.add(Pair.of(pos, Pair.of(room, settings.copy()))); + descriptorList.addAll(room.getAreaDescriptors(settings, pos)); + for (Direction facing : Direction.values()) + { + if (availableDoorMap.containsKey(facing)) + { + List doorList = availableDoorMap.get(facing); + doorList.addAll(room.getDoorOffsetsForFacing(settings, facing, pos)); + } else + { + List doorList = room.getDoorOffsetsForFacing(settings, facing, pos); + availableDoorMap.put(facing, doorList); + } + } + +// rotationInfo.add(settings.getRotation()); + + // Initial AreaDescriptors and door positions are initialized. Time for fun! + for (int i = 0; i < 100; i++) + { + // Get which facing of doors are available. + List facingList = new ArrayList<>(); + for (Entry> entry : availableDoorMap.entrySet()) + { + if (entry.getValue() != null && !entry.getValue().isEmpty()) + { + facingList.add(entry.getKey()); + } + } + + Collections.shuffle(facingList); // Shuffle the list so that it is random what is chosen + + Pair removedDoor1 = null; + Pair removedDoor2 = null; + BlockPos roomLocation = null; + + testDirection: for (Direction doorFacing : facingList) + { + Direction oppositeDoorFacing = doorFacing.getOpposite(); + List availableDoorList = availableDoorMap.get(doorFacing); // May need to copy here + Collections.shuffle(availableDoorList); + + Rotation randRotation = Rotation.values()[rand.nextInt(Rotation.values().length)]; +// Rotation randRotation = Rotation.CLOCKWISE_90; + settings.setRotation(randRotation); // Same for the Mirror + DungeonRoom testingRoom = getRandomRoom(rand); + + List otherDoorList = testingRoom.getDoorOffsetsForFacing(settings, oppositeDoorFacing, BlockPos.ZERO); + if (otherDoorList != null && !otherDoorList.isEmpty()) + { + // See if one of these doors works. + Collections.shuffle(otherDoorList); + BlockPos testDoor = otherDoorList.get(0); + testDoor: for (BlockPos availableDoor : availableDoorList) + { + // TODO: Test if it fits, then add the doors to the list. + roomLocation = availableDoor.subtract(testDoor).add(doorFacing.getDirectionVec()); + + List descriptors = testingRoom.getAreaDescriptors(settings, roomLocation); + for (AreaDescriptor testDesc : descriptors) + { + for (AreaDescriptor currentDesc : descriptorList) + { + if (testDesc.intersects(currentDesc)) + { + break testDoor; + } + } + } + + roomMap.put(roomLocation, Pair.of(testingRoom, settings.copy())); +// roomList.add(Pair.of(roomLocation, Pair.of(testingRoom, settings.copy()))); + descriptorList.addAll(descriptors); + removedDoor1 = Pair.of(doorFacing, availableDoor); + removedDoor2 = Pair.of(oppositeDoorFacing, testDoor.add(roomLocation)); + + room = testingRoom; +// n++; +// rotationInfo.add(randRotation); +// System.out.println("Placement: " + n); +// +// for (Direction facing : Direction.values()) +// { +// List testingDoorList = testingRoom.getDoorOffsetsForFacing(settings, facing, BlockPos.ZERO); +// System.out.println("Door Facing: " + facing + ", Door List: " + testingDoorList); +// } + + break testDirection; + } + + break; + } + +// Collections.shuffle(otherDoorList); + } + + if (removedDoor1 != null) + { + for (Direction facing : Direction.values()) + { + if (availableDoorMap.containsKey(facing)) + { + List doorList = availableDoorMap.get(facing); + doorList.addAll(room.getDoorOffsetsForFacing(settings, facing, roomLocation)); + } else + { + List doorList = room.getDoorOffsetsForFacing(settings, facing, roomLocation); + availableDoorMap.put(facing, doorList); + } + } + + Direction face = removedDoor1.getKey(); + if (availableDoorMap.containsKey(face)) + { + availableDoorMap.get(face).remove(removedDoor1.getRight()); + } + } + + if (removedDoor2 != null) + { + Direction face = removedDoor2.getKey(); + if (availableDoorMap.containsKey(face)) + { + availableDoorMap.get(face).remove(removedDoor2.getRight()); + } + } + } + + long endTime = System.nanoTime(); + + long duration = (endTime - startTime); // divide by 1000000 to get milliseconds. + BMLog.DEBUG.info("Duration: " + duration + "(ns), " + duration / 1000000 + "(ms)"); + + // Building what I've got +// n = 0; + for (Entry> entry : roomMap.entrySet()) +// for (Pair> entry : roomList) + { +// n++; + BlockPos placementPos = entry.getKey(); + DungeonRoom placedRoom = entry.getValue().getKey(); + PlacementSettings placementSettings = entry.getValue().getValue(); + + placedRoom.placeStructureAtPosition(rand, placementSettings, world, placementPos); + +// world.setBlockState(placementPos, Blocks.REDSTONE_BLOCK.getDefaultState(), 3); +// System.out.println("Supposed Rotation for " + n + ": " + rotationInfo.get(n - 1)); +// System.out.println("Placement: " + n + ", BlockPos: " + placementPos + ", Rotation: " + placementSettings.getRotation()); + } + +// System.out.println(roomMap.size()); +// System.out.println(roomList.size()); + + return false; + } + + public static DungeonRoom getRandomRoom(Random rand) + { +// System.out.println("Dungeon size: " + DungeonRoomRegistry.dungeonWeightMap.size()); + return DungeonRoomRegistry.getRandomDungeonRoom(rand); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java new file mode 100644 index 00000000..9e2dc086 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java @@ -0,0 +1,78 @@ +package wayoftime.bloodmagic.structures; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.gen.feature.template.Template; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.ritual.AreaDescriptor; + +public class DungeonRoom +{ + public int dungeonWeight = 1; + public Map structureMap = new HashMap<>(); + + public Map> doorMap = new HashMap<>(); // Map of doors. The EnumFacing indicates what way + // this door faces. + public List descriptorList = new ArrayList<>(); + + public DungeonRoom(Map structureMap, Map> doorMap, List descriptorList) + { + this.structureMap = structureMap; + this.doorMap = doorMap; + this.descriptorList = descriptorList; + } + + public List getAreaDescriptors(PlacementSettings settings, BlockPos offset) + { + List newList = new ArrayList<>(); + + for (AreaDescriptor desc : descriptorList) + { + newList.add(desc.rotateDescriptor(settings).offset(offset)); + } + + return newList; + } + + public List getDoorOffsetsForFacing(PlacementSettings settings, Direction facing, BlockPos offset) + { + List offsetList = new ArrayList<>(); + +// Direction originalFacing = DungeonUtil.rotate(settings.getMirror(), settings.getRotation(), facing); + Direction originalFacing = DungeonUtil.reverseRotate(settings.getMirror(), settings.getRotation(), facing); +// Direction originalFacing = facing; + if (doorMap.containsKey(originalFacing)) + { + List doorList = doorMap.get(originalFacing); + for (BlockPos doorPos : doorList) + { + offsetList.add(Template.transformedBlockPos(settings, doorPos).add(offset)); + } + } + + return offsetList; + } + + public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, ServerWorld world, BlockPos pos) + { + for (Entry entry : structureMap.entrySet()) + { + ResourceLocation location = new ResourceLocation(entry.getKey()); + DungeonStructure structure = new DungeonStructure(location); + BlockPos offsetPos = Template.transformedBlockPos(settings, entry.getValue()); + + structure.placeStructureAtPosition(rand, settings, world, pos.add(offsetPos)); + } + + return true; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java new file mode 100644 index 00000000..9eabeb69 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java @@ -0,0 +1,102 @@ +package wayoftime.bloodmagic.structures; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.Writer; +import java.net.URL; +import java.util.List; +import java.util.Random; + +import org.apache.commons.io.IOUtils; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.common.reflect.TypeToken; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.gson.Serializers; + +public class DungeonRoomLoader +{ + public static void saveDungeons() + { + for (DungeonRoom room : DungeonRoomRegistry.dungeonWeightMap.keySet()) + { + saveSingleDungeon(room); + } + } + + public static void saveSingleDungeon(DungeonRoom room) + { + String json = Serializers.GSON.toJson(room); + + Writer writer; + try + { + File file = new File("config/BloodMagic/schematics"); + file.mkdirs(); + + writer = new FileWriter("config/BloodMagic/schematics/" + new Random().nextInt() + ".json"); + writer.write(json); + writer.close(); + } catch (IOException e) + { + e.printStackTrace(); + } + } + + public static void loadDungeons() + { + try + { +// System.out.println("LOADING DEMON DUNGEONS"); + + URL schematicURL = DungeonRoomLoader.class.getResource(resLocToResourcePath(new ResourceLocation("bloodmagic:schematics"))); + List schematics = Serializers.GSON.fromJson(Resources.toString(schematicURL, Charsets.UTF_8), new TypeToken>() + { + }.getType()); + for (String schematicKey : schematics) + { + ResourceLocation schematic = new ResourceLocation(schematicKey); + URL dungeonURL = DungeonRoomLoader.class.getResource(resLocToResourcePath(schematic)); + DungeonRoom dungeonRoom = Serializers.GSON.fromJson(Resources.toString(dungeonURL, Charsets.UTF_8), DungeonRoom.class); + DungeonRoomRegistry.registerDungeonRoom(dungeonRoom, Math.max(1, dungeonRoom.dungeonWeight)); + } + + System.out.println("# schematics: " + schematics.size()); + + } catch (Exception e) + { + e.printStackTrace(); + } + } + + public static void test() + { + ResourceLocation id = new ResourceLocation(BloodMagic.MODID, "testGson"); + String s = id.getNamespace(); + String s1 = id.getPath(); + InputStream inputstream = null; + + try + { + inputstream = DungeonRoomLoader.class.getResourceAsStream("/assets/" + s + "/schematics/" + s1 + ".nbt"); +// this.readTemplateFromStream(s1, inputstream); + return; + } catch (Throwable var10) + { + + } finally + { + IOUtils.closeQuietly(inputstream); + } + } + + public static String resLocToResourcePath(ResourceLocation resourceLocation) + { + return "/assets/" + resourceLocation.getNamespace() + "/schematics/" + resourceLocation.getPath() + ".json"; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java new file mode 100644 index 00000000..4a8f46f2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java @@ -0,0 +1,33 @@ +package wayoftime.bloodmagic.structures; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +public class DungeonRoomRegistry +{ + public static Map dungeonWeightMap = new HashMap<>(); + private static int totalWeight = 0; + + public static void registerDungeonRoom(DungeonRoom room, int weight) + { + dungeonWeightMap.put(room, weight); + totalWeight += weight; + } + + public static DungeonRoom getRandomDungeonRoom(Random rand) + { + int wantedWeight = rand.nextInt(totalWeight); + for (Entry entry : dungeonWeightMap.entrySet()) + { + wantedWeight -= entry.getValue(); + if (wantedWeight < 0) + { + return entry.getKey(); + } + } + + return null; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java new file mode 100644 index 00000000..4ecb12d4 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java @@ -0,0 +1,55 @@ +package wayoftime.bloodmagic.structures; + +import java.util.Random; + +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.gen.feature.template.Template; +import net.minecraft.world.gen.feature.template.TemplateManager; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.util.BMLog; + +public class DungeonStructure +{ + public ResourceLocation resource; + + public DungeonStructure(ResourceLocation resource) + { + this.resource = resource; + } + + public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, ServerWorld world, BlockPos pos) + { + if (pos == null) + return false; + + MinecraftServer minecraftserver = world.getServer(); + TemplateManager templatemanager = world.getStructureTemplateManager(); + + Template template = templatemanager.getTemplate(resource); + + if (template == null) + { + System.out.println("Invalid template for location: " + resource); + BMLog.DEBUG.warn("Invalid template for location: " + resource); + return false; + } + +// settings.func_189946_a(MathHelper.clamp_float(schema.integrity, 0.0F, 1.0F)); + + BlockPos offset = Template.transformedBlockPos(settings, new BlockPos(0, 0, 0)); + BlockPos finalPos = pos.add(offset); +// template.addBlocksToWorldChunk(world, finalPos, settings); + template.func_237144_a_(world, finalPos, settings, rand); +// template.func_237152_b_(world, finalPos, settings, rand); + + return true; + } + + public DungeonStructure copy() + { + return new DungeonStructure(resource); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java new file mode 100644 index 00000000..dafa1a15 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java @@ -0,0 +1,95 @@ +package wayoftime.bloodmagic.structures; + +import java.util.Random; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.server.ServerWorld; + +public class DungeonTester +{ + public static void testDungeonGeneration(ServerWorld world, BlockPos pos) + { + + } + + public static void testDungeonElementWithOutput(ServerWorld world, BlockPos pos) + { + Dungeon.placeStructureAtPosition(new Random(), world, pos); +// ResourceLocation resource = new ResourceLocation(BloodMagic.MODID, "t_corridor"); +// +//// DungeonStructure structure = new DungeonStructure(resource); +//// Map structureMap = new HashMap(); +//// structureMap.put(structure, new BlockPos(0, 0, 0)); +// +// Map structureMap = new HashMap(); +// structureMap.put(resource.toString(), BlockPos.ZERO); +// +//// Map> doorMap = new HashMap>(); +//// List descriptorList = new ArrayList(); +//// descriptorList.add(new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 11, 5, 8)); +//// +//// DungeonUtil.addRoom(doorMap, Direction.NORTH, new BlockPos(5, 0, 0)); +//// DungeonUtil.addRoom(doorMap, Direction.EAST, new BlockPos(10, 0, 5)); +//// DungeonUtil.addRoom(doorMap, Direction.WEST, new BlockPos(0, 0, 5)); +//// +//// DungeonRoom room = new DungeonRoom(structureMap, doorMap, descriptorList); +// +// DungeonRoom room = Dungeon.getRandomRoom(new Random()); +// +// PlacementSettings settings = new PlacementSettings(); +// +// Mirror mir = Mirror.NONE; +// settings.setMirror(mir); +// +// net.minecraft.util.Rotation rot = Rotation.NONE; +// settings.setRotation(rot); +// +// settings.setIgnoreEntities(true); +// settings.setChunk((ChunkPos) null); +// settings.func_215223_c(true); +//// settings.setReplacedBlock((Block) null); +//// settings.setIgnoreStructureBlock(false); +// +// int i = 0; +// +// for (Mirror mirror : Mirror.values()) +// { +// System.out.print("Mirror: " + mirror + '\n'); +// int j = 0; +// for (Rotation rotation : Rotation.values()) +// { +// System.out.print("Rotation: " + rotation + '\n'); +// settings.setRotation(rotation); +// settings.setMirror(mirror); +// +// BlockPos offsetPos = pos.add(i * 32, 0, j * 32); +// room.placeStructureAtPosition(new Random(), settings, world, offsetPos); +// +// world.setBlockState(offsetPos, Blocks.REDSTONE_BLOCK.getDefaultState(), 3); +// +//// List descriptors = room.getAreaDescriptors(settings, offsetPos); +//// for (AreaDescriptor desc : descriptors) +//// { +//// List posList = desc.getContainedPositions(new BlockPos(0, 0, 0)); +//// for (BlockPos placePos : posList) +//// { +//// world.setBlockState(placePos, Blocks.REDSTONE_BLOCK.getDefaultState()); +//// } +//// } +// +//// for (Direction facing : Direction.HORIZONTALS) +// for (int k = 0; k < 4; k++) +// { +// Direction facing = Direction.byHorizontalIndex(k); +// List doorList = room.getDoorOffsetsForFacing(settings, facing, offsetPos); +// for (BlockPos doorPos : doorList) +// { +// System.out.print("Door at " + doorPos + " facing " + facing + '\n'); +// } +// } +// j++; +// } +// i++; +// } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java new file mode 100644 index 00000000..e302e03d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java @@ -0,0 +1,55 @@ +package wayoftime.bloodmagic.structures; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import net.minecraft.util.Direction; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; + +public class DungeonUtil +{ + public static Direction rotate(Mirror mirror, Rotation rotation, Direction original) + { + return rotation.rotate(mirror.mirror(original)); + } + + public static Direction reverseRotate(Mirror mirror, Rotation rotation, Direction original) + { + return mirror.mirror(getOppositeRotation(rotation).rotate(original)); + } + + public static Direction getFacingForSettings(PlacementSettings settings, Direction original) + { + return rotate(settings.getMirror(), settings.getRotation(), original); + } + + public static Rotation getOppositeRotation(Rotation rotation) + { + switch (rotation) + { + case CLOCKWISE_90: + return Rotation.COUNTERCLOCKWISE_90; + case COUNTERCLOCKWISE_90: + return Rotation.CLOCKWISE_90; + default: + return rotation; + } + } + + public static void addRoom(Map> doorMap, Direction facing, BlockPos offsetPos) + { + if (doorMap.containsKey(facing)) + { + doorMap.get(facing).add(offsetPos); + } else + { + List doorList = new ArrayList<>(); + doorList.add(offsetPos); + doorMap.put(facing, doorList); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java b/src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java new file mode 100644 index 00000000..d5527888 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java @@ -0,0 +1,29 @@ +package wayoftime.bloodmagic.structures; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.BloodMagic; + +public class ItemDungeonTester extends Item +{ + public ItemDungeonTester() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + if (!world.isRemote && world instanceof ServerWorld) + { + System.out.println("Test"); + DungeonTester.testDungeonElementWithOutput((ServerWorld) world, player.getPosition()); + } + return super.onItemRightClick(world, player, hand); + } +} diff --git a/src/main/java/WayofTime/bloodmagic/structures/ModDungeons.java b/src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java similarity index 88% rename from src/main/java/WayofTime/bloodmagic/structures/ModDungeons.java rename to src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java index d7d493b2..6c066b6e 100644 --- a/src/main/java/WayofTime/bloodmagic/structures/ModDungeons.java +++ b/src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java @@ -1,9 +1,9 @@ -package WayofTime.bloodmagic.structures; +package wayoftime.bloodmagic.structures; public class ModDungeons { - public static void init() - { + public static void init() + { // ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "HallChest1"); // // Map structureMap = new HashMap(); @@ -23,6 +23,6 @@ public class ModDungeons // // DungeonRoomLoader.saveDungeons(); - DungeonRoomLoader.loadDungeons(); - } + DungeonRoomLoader.loadDungeons(); + } } diff --git a/src/main/java/wayoftime/bloodmagic/structures/StoneToOreProcessor.java b/src/main/java/wayoftime/bloodmagic/structures/StoneToOreProcessor.java new file mode 100644 index 00000000..e4d325d6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/StoneToOreProcessor.java @@ -0,0 +1,46 @@ +package wayoftime.bloodmagic.structures; + +import java.util.Random; + +import javax.annotation.Nullable; + +import com.mojang.serialization.Codec; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.gen.feature.template.IStructureProcessorType; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.gen.feature.template.StructureProcessor; +import net.minecraft.world.gen.feature.template.Template; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; + +public class StoneToOreProcessor extends StructureProcessor +{ + public static final Codec field_237077_a_ = Codec.FLOAT.fieldOf("integrity").orElse(1.0F).xmap(StoneToOreProcessor::new, (p_237078_0_) -> { + return p_237078_0_.integrity; + }).codec(); + private final float integrity; + + public StoneToOreProcessor(float integrity) + { + this.integrity = integrity; + } + + @Nullable + public Template.BlockInfo func_230386_a_(IWorldReader p_230386_1_, BlockPos p_230386_2_, BlockPos p_230386_3_, Template.BlockInfo p_230386_4_, Template.BlockInfo p_230386_5_, PlacementSettings p_230386_6_) + { + if (p_230386_5_.state.getBlock() != BloodMagicBlocks.DUNGEON_STONE.get()) + { + return p_230386_5_; + } + Random random = p_230386_6_.getRandom(p_230386_5_.pos); + return !(this.integrity >= 1.0F) && !(random.nextFloat() <= this.integrity) + ? new Template.BlockInfo(p_230386_5_.pos, BloodMagicBlocks.DUNGEON_ORE.get().getDefaultState(), p_230386_5_.nbt) + : p_230386_5_; + } + + protected IStructureProcessorType getType() + { + return IStructureProcessorType.BLOCK_ROT; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileAlchemicalReactionChamber.java b/src/main/java/wayoftime/bloodmagic/tile/TileAlchemicalReactionChamber.java new file mode 100644 index 00000000..2196d608 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileAlchemicalReactionChamber.java @@ -0,0 +1,510 @@ +package wayoftime.bloodmagic.tile; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipe; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidAttributes; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidUtil; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandlerItem; +import net.minecraftforge.fluids.capability.templates.FluidTank; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.recipe.helper.FluidStackIngredient; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.recipe.RecipeARC; +import wayoftime.bloodmagic.common.item.arc.IARCTool; +import wayoftime.bloodmagic.common.item.inventory.InventoryWrapper; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.network.ARCTanksPacket; +import wayoftime.bloodmagic.tile.container.ContainerAlchemicalReactionChamber; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.MultiSlotItemHandler; + +public class TileAlchemicalReactionChamber extends TileInventory implements ITickableTileEntity, INamedContainerProvider, ISidedInventory, IFluidHandler +{ + @ObjectHolder("bloodmagic:alchemicalreactionchamber") + public static TileEntityType TYPE; + + public static final int ARC_TOOL_SLOT = 0; + public static final int OUTPUT_SLOT = 1; + public static final int NUM_OUTPUTS = 5; + public static final int INPUT_SLOT = 6; + public static final int INPUT_BUCKET_SLOT = 7; + public static final int OUTPUT_BUCKET_SLOT = 8; + + public FluidTank inputTank = new FluidTank(FluidAttributes.BUCKET_VOLUME * 20); + public FluidTank outputTank = new FluidTank(FluidAttributes.BUCKET_VOLUME * 20); + + public double currentProgress = 0; + public static final double DEFAULT_SPEED = 0.005; + + public TileAlchemicalReactionChamber(TileEntityType type) + { + super(type, 9, "alchemicalreactionchamber"); + } + + public TileAlchemicalReactionChamber() + { + this(TYPE); + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + + currentProgress = tag.getDouble(Constants.NBT.ARC_PROGRESS); + + CompoundNBT inputTankTag = tag.getCompound("inputtank"); + inputTank.readFromNBT(inputTankTag); + + CompoundNBT outputTankTag = tag.getCompound("outputtank"); + outputTank.readFromNBT(outputTankTag); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + super.serialize(tag); + + tag.putDouble(Constants.NBT.ARC_PROGRESS, currentProgress); + + CompoundNBT inputTankTag = new CompoundNBT(); + inputTank.writeToNBT(inputTankTag); + tag.put("inputtank", inputTankTag); + + CompoundNBT outputTankTag = new CompoundNBT(); + outputTank.writeToNBT(outputTankTag); + tag.put("outputtank", outputTankTag); + + return tag; + } + + @Override + public void tick() + { +// if (world.isRemote) +// { +// return; +// } + +// if (world.getGameTime() % 20 == 0) +// { +// outputTank.fill(new FluidStack(Fluids.WATER, 100), FluidAction.EXECUTE); +// } + + boolean outputChanged = false; + + ItemStack fullBucketStack = this.getStackInSlot(INPUT_BUCKET_SLOT); + ItemStack emptyBucketStack = this.getStackInSlot(OUTPUT_BUCKET_SLOT); + + ItemStack[] outputInventory = new ItemStack[] { getStackInSlot(1), getStackInSlot(2), getStackInSlot(3), + getStackInSlot(4), getStackInSlot(5) }; + + MultiSlotItemHandler outputSlotHandler = new MultiSlotItemHandler(outputInventory, 64); + + if (!world.isRemote) + { + if (!fullBucketStack.isEmpty() && inputTank.getSpace() >= 1000) + { + ItemStack testFullBucketStack = ItemHandlerHelper.copyStackWithSize(fullBucketStack, 1); + LazyOptional fluidHandlerWrapper = FluidUtil.getFluidHandler(testFullBucketStack); + if (fluidHandlerWrapper.isPresent()) + { + IFluidHandlerItem fluidHandler = fluidHandlerWrapper.resolve().get(); + FluidStack transferedStack = FluidUtil.tryFluidTransfer(inputTank, fluidHandler, 1000, false); + if (!transferedStack.isEmpty()) + { + fluidHandler.drain(transferedStack, FluidAction.EXECUTE); + List arrayList = new ArrayList<>(); + arrayList.add(fluidHandler.getContainer()); + if (outputSlotHandler.canTransferAllItemsToSlots(arrayList, true)) + { + outputChanged = true; + inputTank.fill(transferedStack, FluidAction.EXECUTE); + outputSlotHandler.canTransferAllItemsToSlots(arrayList, false); + if (fullBucketStack.getCount() > 1) + { + fullBucketStack.setCount(fullBucketStack.getCount() - 1); + } else + { + setInventorySlotContents(INPUT_BUCKET_SLOT, ItemStack.EMPTY); + } + } + } + } + } + + if (!emptyBucketStack.isEmpty() && outputTank.getFluidAmount() >= 1000) + { + ItemStack testEmptyBucketStack = ItemHandlerHelper.copyStackWithSize(emptyBucketStack, 1); + LazyOptional fluidHandlerWrapper = FluidUtil.getFluidHandler(testEmptyBucketStack); + if (fluidHandlerWrapper.isPresent()) + { + IFluidHandlerItem fluidHandler = fluidHandlerWrapper.resolve().get(); + FluidStack transferedStack = FluidUtil.tryFluidTransfer(fluidHandler, outputTank, 1000, false); + if (!transferedStack.isEmpty()) + { + fluidHandler.fill(transferedStack, FluidAction.EXECUTE); + List arrayList = new ArrayList<>(); + arrayList.add(fluidHandler.getContainer()); + if (outputSlotHandler.canTransferAllItemsToSlots(arrayList, true)) + { + outputChanged = true; + outputTank.drain(transferedStack, FluidAction.EXECUTE); + outputSlotHandler.canTransferAllItemsToSlots(arrayList, false); + if (emptyBucketStack.getCount() > 1) + { + emptyBucketStack.setCount(emptyBucketStack.getCount() - 1); + } else + { + setInventorySlotContents(OUTPUT_BUCKET_SLOT, ItemStack.EMPTY); + } + } + } + } + } + } + + ItemStack inputStack = this.getStackInSlot(INPUT_SLOT); + ItemStack toolStack = this.getStackInSlot(ARC_TOOL_SLOT); + + double craftingMultiplier = 1; + if (toolStack.getItem() instanceof IARCTool) + { + craftingMultiplier = ((IARCTool) toolStack.getItem()).getCraftingSpeedMultiplier(toolStack); + } + + RecipeARC recipe = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getARC(world, inputStack, toolStack, inputTank.getFluid()); + if (canCraft(recipe, outputSlotHandler)) + { + // We have enough fluid (if applicable) and the theoretical outputs can fit. + currentProgress += craftingMultiplier * DEFAULT_SPEED; + if (currentProgress >= 1) + { + if (!world.isRemote) + { + outputChanged = true; + craftItem(recipe, outputSlotHandler); + } + + currentProgress = 0; + } + } else + { + if (toolStack.getItem().isIn(BloodMagicTags.ARC_TOOL_FURNACE)) + { + InventoryWrapper invWrapper = new InventoryWrapper(1); + invWrapper.setInventorySlotContents(0, inputStack.copy()); +// ItemStack[] outputInventory = new ItemStack[] +// { input }; + +// MultiSlotItemHandler outputSlotHandler = new MultiSlotItemHandler(outputInventory, 64); + Optional furnaceRecipe = world.getRecipeManager().getRecipe(IRecipeType.SMELTING, invWrapper, world); + if (furnaceRecipe.isPresent()) + { + ItemStack outputStack = furnaceRecipe.get().getCraftingResult(invWrapper); + if (canCraftFurnace(outputStack, outputSlotHandler)) + { + currentProgress += craftingMultiplier * DEFAULT_SPEED; + if (currentProgress >= 1) + { + if (!world.isRemote) + { + craftFurnace(outputStack, outputSlotHandler); + outputChanged = true; + } + + currentProgress = 0; + } + } + } else + { + currentProgress = 0; + } + } else + { + currentProgress = 0; + } + } + + if (outputChanged && !world.isRemote) + { + for (int i = 0; i < NUM_OUTPUTS; i++) + { + this.setInventorySlotContents(OUTPUT_SLOT + i, outputSlotHandler.getStackInSlot(i)); + } + } + +// FluidUtil.tryEmptyContainer(container, fluidDestination, maxAmount, player, doDrain) + } + + private boolean canCraft(RecipeARC recipe, MultiSlotItemHandler outputSlotHandler) + { + if (recipe == null) + return false; + + FluidStackIngredient inputFluidIngredient = recipe.getFluidIngredient(); + if (inputFluidIngredient != null && !inputFluidIngredient.test(inputTank.getFluid())) + { + return false; + } + + if (outputSlotHandler.canTransferAllItemsToSlots(recipe.getAllListedOutputs(), true)) + { + FluidStack outputStack = recipe.getFluidOutput(); + return outputStack.isEmpty() ? true + : outputTank.fill(outputStack, FluidAction.SIMULATE) >= outputStack.getAmount(); + } + + return false; + } + + private void craftItem(RecipeARC recipe, MultiSlotItemHandler outputSlotHandler) + { + if (this.canCraft(recipe, outputSlotHandler)) + { + if (recipe.getFluidIngredient() != null) + { + FluidStack inputStack = recipe.getFluidIngredient().getMatchingInstance(inputTank.getFluid()); + inputTank.drain(inputStack, FluidAction.EXECUTE); + } + + outputSlotHandler.canTransferAllItemsToSlots(recipe.getAllOutputs(world.rand), false); + outputTank.fill(recipe.getFluidOutput().copy(), FluidAction.EXECUTE); + consumeInventory(recipe.getConsumeIngredient()); + } + } + + private boolean canCraftFurnace(ItemStack outputStack, MultiSlotItemHandler outputSlotHandler) + { + List outputList = new ArrayList<>(); + outputList.add(outputStack); + return outputSlotHandler.canTransferAllItemsToSlots(outputList, true); + } + + private void craftFurnace(ItemStack outputStack, MultiSlotItemHandler outputSlotHandler) + { + List outputList = new ArrayList<>(); + outputList.add(outputStack); + outputSlotHandler.canTransferAllItemsToSlots(outputList, false); + consumeInventory(false); + } + + public void consumeInventory(boolean consumeInput) + { + ItemStack inputStack = getStackInSlot(INPUT_SLOT); + if (!inputStack.isEmpty()) + { + if (!consumeInput && inputStack.getItem().hasContainerItem(inputStack)) + { + setInventorySlotContents(INPUT_SLOT, inputStack.getItem().getContainerItem(inputStack)); + } else + { + inputStack.shrink(1); + if (inputStack.isEmpty()) + { + setInventorySlotContents(INPUT_SLOT, ItemStack.EMPTY); + } + } + } + + ItemStack toolStack = getStackInSlot(ARC_TOOL_SLOT); + if (!toolStack.isEmpty()) + { + if (toolStack.isDamageable()) + { + toolStack.setDamage(toolStack.getDamage() + 1); + if (toolStack.getDamage() >= toolStack.getMaxDamage()) + { + setInventorySlotContents(ARC_TOOL_SLOT, ItemStack.EMPTY); + } + } else if (toolStack.getItem().hasContainerItem(toolStack)) + { + setInventorySlotContents(ARC_TOOL_SLOT, toolStack.getItem().getContainerItem(inputStack)); + } else + { + toolStack.shrink(1); + if (toolStack.isEmpty()) + { + setInventorySlotContents(ARC_TOOL_SLOT, ItemStack.EMPTY); + } + } + } + } + + @Override + public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) + { + assert world != null; + return new ContainerAlchemicalReactionChamber(this, p_createMenu_1_, p_createMenu_2_); + } + + @Override + public ITextComponent getDisplayName() + { + return new StringTextComponent("Alchemical Reaction Chamber"); + } + + public double getProgressForGui() + { + return currentProgress; + } + + @Override + public int[] getSlotsForFace(Direction side) + { + switch (side) + { + case UP: + return new int[] { ARC_TOOL_SLOT }; + case DOWN: + return new int[] { 1, 2, 3, 4, 5 }; + default: + return new int[] { 6, 7, 8 }; + } + } + + @Override + public boolean canInsertItem(int index, ItemStack itemStack, Direction direction) + { + if (index == INPUT_BUCKET_SLOT || index == OUTPUT_BUCKET_SLOT) + { + Optional fluidStackOptional = FluidUtil.getFluidContained(itemStack); + + return fluidStackOptional.isPresent() && ((index == OUTPUT_BUCKET_SLOT && !fluidStackOptional.get().isEmpty()) || (index == INPUT_BUCKET_SLOT && fluidStackOptional.get().isEmpty())); + } + + if (index >= OUTPUT_SLOT && index < OUTPUT_SLOT + NUM_OUTPUTS) + { + return false; + } + + if (index == ARC_TOOL_SLOT) + { + return itemStack.getItem().isIn(BloodMagicTags.ARC_TOOL); + } + + return true; + } + + @Override + public boolean canExtractItem(int index, ItemStack stack, Direction direction) + { + return index >= OUTPUT_SLOT && index < OUTPUT_SLOT + NUM_OUTPUTS; + } + + @SuppressWarnings("unchecked") + @Override + public LazyOptional getCapability(@Nonnull Capability capability, @Nullable Direction facing) + { + if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + { + return LazyOptional.of(() -> this).cast(); + } + + return super.getCapability(capability, facing); + } + + @Override + public int getTanks() + { + return 2; + } + + @Override + public FluidStack getFluidInTank(int tank) + { + switch (tank) + { + case 0: + return inputTank.getFluid(); + default: + return outputTank.getFluid(); + } + } + + @Override + public int getTankCapacity(int tank) + { + switch (tank) + { + case 0: + return inputTank.getCapacity(); + default: + return outputTank.getCapacity(); + } + } + + @Override + public boolean isFluidValid(int tank, FluidStack stack) + { + switch (tank) + { + case 0: + return inputTank.isFluidValid(stack); + default: + return outputTank.isFluidValid(stack); + } + } + + @Override + public int fill(FluidStack resource, FluidAction action) + { + int fillAmount = inputTank.fill(resource, action); + if (fillAmount > 0 && !world.isRemote) + { + BloodMagic.packetHandler.sendToAllTracking(new ARCTanksPacket(this), this); +// this.world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), 3); + } + return fillAmount; + } + + @Override + public FluidStack drain(FluidStack resource, FluidAction action) + { + FluidStack drainedStack = outputTank.drain(resource, action); + if (!drainedStack.isEmpty() && !world.isRemote) + { + BloodMagic.packetHandler.sendToAllTracking(new ARCTanksPacket(this), this); +// this.world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), 3); + } + return drainedStack; + } + + @Override + public FluidStack drain(int maxDrain, FluidAction action) + { + FluidStack drainedStack = outputTank.drain(maxDrain, action); + if (!drainedStack.isEmpty() && !world.isRemote) + { + BloodMagic.packetHandler.sendToAllTracking(new ARCTanksPacket(this), this); +// this.world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), 3); + } + return drainedStack; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileAlchemyArray.java b/src/main/java/wayoftime/bloodmagic/tile/TileAlchemyArray.java new file mode 100644 index 00000000..e18fd6b8 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileAlchemyArray.java @@ -0,0 +1,168 @@ +package wayoftime.bloodmagic.tile; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffect; +import wayoftime.bloodmagic.core.registry.AlchemyArrayRegistry; +import wayoftime.bloodmagic.util.Constants; + +public class TileAlchemyArray extends TileInventory implements ITickableTileEntity +{ + @ObjectHolder("bloodmagic:alchemyarray") + public static TileEntityType TYPE; + + public boolean isActive = false; + public int activeCounter = 0; + public Direction rotation = Direction.byHorizontalIndex(0); + public int rotateCooldown = 0; + + private String key = ""; + public AlchemyArrayEffect arrayEffect; + private boolean doDropIngredients = true; + + public TileAlchemyArray(TileEntityType type) + { + super(type, 2, "alchemyarray"); +// this.bloodAltar = new BloodAltar(this); + } + + public TileAlchemyArray() + { + this(TYPE); + } + + public void onEntityCollidedWithBlock(BlockState state, Entity entity) + { + if (arrayEffect != null) + { + arrayEffect.onEntityCollidedWithBlock(this, getWorld(), pos, state, entity); + } + } + + @Override + public void deserialize(CompoundNBT tagCompound) + { + super.deserialize(tagCompound); + this.isActive = tagCompound.getBoolean("isActive"); + this.activeCounter = tagCompound.getInt("activeCounter"); + this.key = tagCompound.getString("stringKey"); + if (!tagCompound.contains("doDropIngredients")) // Check if the array is old + { + this.doDropIngredients = true; + } else + { + this.doDropIngredients = tagCompound.getBoolean("doDropIngredients"); + } + this.rotation = Direction.byHorizontalIndex(tagCompound.getInt(Constants.NBT.DIRECTION)); + + CompoundNBT arrayTag = tagCompound.getCompound("arrayTag"); +// arrayEffect = AlchemyArrayRegistry.getEffect(world, this.getStackInSlot(0), this.getStackInSlot(1)); + if (arrayEffect != null) + { + arrayEffect.readFromNBT(arrayTag); + } + } + + public void doDropIngredients(boolean drop) + { + this.doDropIngredients = drop; + } + + @Override + public CompoundNBT serialize(CompoundNBT tagCompound) + { + super.serialize(tagCompound); + tagCompound.putBoolean("isActive", isActive); + tagCompound.putInt("activeCounter", activeCounter); + tagCompound.putString("stringKey", "".equals(key) ? "empty" : key.toString()); + tagCompound.putBoolean("doDropIngredients", doDropIngredients); + tagCompound.putInt(Constants.NBT.DIRECTION, rotation.getHorizontalIndex()); + + CompoundNBT arrayTag = new CompoundNBT(); + if (arrayEffect != null) + { + arrayEffect.writeToNBT(arrayTag); + } + tagCompound.put("arrayTag", arrayTag); + + return tagCompound; + } + + @Override + public void tick() + { +// System.out.println("Active counter: " + this.activeCounter); + if (isActive && attemptCraft()) + { + activeCounter++; + } else + { + isActive = false; + doDropIngredients = true; + activeCounter = 0; + arrayEffect = null; + key = "empty"; + } + if (rotateCooldown > 0) + rotateCooldown--; + } + + public boolean attemptCraft() + { + if (arrayEffect != null) + { + isActive = true; + + } else + { + AlchemyArrayEffect effect = AlchemyArrayRegistry.getEffect(world, this.getStackInSlot(0), this.getStackInSlot(1)); +// System.out.println("Effect: " + effect); + if (effect == null) + { +// key = effect.i + return false; + } else + { + arrayEffect = effect; + } + } + + if (arrayEffect != null) + { + isActive = true; + if (arrayEffect.update(this, this.activeCounter)) + { + this.decrStackSize(0, 1); + this.decrStackSize(1, 1); + this.getWorld().setBlockState(getPos(), Blocks.AIR.getDefaultState()); + } + + return true; + } + return false; + } + +// @Override + public Direction getRotation() + { + return rotation; + } + + public void setRotation(Direction rotation) + { + this.rotation = rotation; + } + + @Override + public boolean isItemValidForSlot(int slot, ItemStack itemstack) + { + return slot == 0 || slot == 1; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileAlchemyTable.java b/src/main/java/wayoftime/bloodmagic/tile/TileAlchemyTable.java new file mode 100644 index 00000000..02d9ec37 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileAlchemyTable.java @@ -0,0 +1,593 @@ +package wayoftime.bloodmagic.tile; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.ArrayUtils; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.api.event.BloodMagicCraftedEvent; +import wayoftime.bloodmagic.common.item.BloodOrb; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.common.item.IBloodOrb; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.recipe.RecipeAlchemyTable; +import wayoftime.bloodmagic.tile.container.ContainerAlchemyTable; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.NetworkHelper; + +public class TileAlchemyTable extends TileInventory implements ISidedInventory, ITickableTileEntity, INamedContainerProvider +{ + @ObjectHolder("bloodmagic:alchemytable") + public static TileEntityType TYPE; + + public static final int orbSlot = 6; + public static final int outputSlot = 7; + + public Direction direction = Direction.NORTH; + public boolean isSlave = false; + public int burnTime = 0; + public int ticksRequired = 1; + + public BlockPos connectedPos = BlockPos.ZERO; + public boolean[] blockedSlots = new boolean[] { false, false, false, false, false, false }; + public boolean[] allowedDirectionsSlot0 = new boolean[] { false, false, true, true, true, true }; + public boolean[] allowedDirectionsSlot1 = new boolean[] { false, false, true, true, true, true }; + public boolean[] allowedDirectionsSlot2 = new boolean[] { false, false, true, true, true, true }; + public boolean[] allowedDirectionsSlot3 = new boolean[] { false, false, true, true, true, true }; + public boolean[] allowedDirectionsSlot4 = new boolean[] { false, false, true, true, true, true }; + public boolean[] allowedDirectionsSlot5 = new boolean[] { false, false, true, true, true, true }; + public boolean[] allowedDirectionsOrb = new boolean[] { false, true, false, false, false, false }; + public boolean[] allowedDirectionsOutput = new boolean[] { true, false, false, false, false, false }; + + public int activeSlot = -1; + + public TileAlchemyTable(TileEntityType type) + { + super(type, 8, "alchemytable"); + } + + public TileAlchemyTable() + { + this(TYPE); + } + + public void setInitialTableParameters(Direction direction, boolean isSlave, BlockPos connectedPos) + { + this.isSlave = isSlave; + this.connectedPos = connectedPos; + + if (!isSlave) + { + this.direction = direction; + } + } + + public boolean isInvisible() + { + return isSlave(); + } + + public boolean isInputSlotAccessible(int slot) + { + return !(slot < 6 && slot >= 0) || !blockedSlots[slot]; + } + + public void toggleInputSlotAccessible(int slot) + { + if (slot < 6 && slot >= 0) + blockedSlots[slot] = !blockedSlots[slot]; + } + + public boolean isSlotEnabled(int slot, Direction dir) + { + switch (slot) + { + case 0: + return allowedDirectionsSlot0[dir.ordinal()]; + case 1: + return allowedDirectionsSlot1[dir.ordinal()]; + case 2: + return allowedDirectionsSlot2[dir.ordinal()]; + case 3: + return allowedDirectionsSlot3[dir.ordinal()]; + case 4: + return allowedDirectionsSlot4[dir.ordinal()]; + case 5: + return allowedDirectionsSlot5[dir.ordinal()]; + case 6: + return allowedDirectionsOrb[dir.ordinal()]; + case 7: + return allowedDirectionsOutput[dir.ordinal()]; + } + + return false; + } + + public void setSlotEnabled(boolean enabled, int slot, Direction dir) + { + switch (slot) + { + case 0: + allowedDirectionsSlot0[dir.ordinal()] = enabled; + break; + case 1: + allowedDirectionsSlot1[dir.ordinal()] = enabled; + break; + case 2: + allowedDirectionsSlot2[dir.ordinal()] = enabled; + break; + case 3: + allowedDirectionsSlot3[dir.ordinal()] = enabled; + break; + case 4: + allowedDirectionsSlot4[dir.ordinal()] = enabled; + break; + case 5: + allowedDirectionsSlot5[dir.ordinal()] = enabled; + break; + case 6: + allowedDirectionsOrb[dir.ordinal()] = enabled; + break; + case 7: + allowedDirectionsOutput[dir.ordinal()] = enabled; + break; + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + + isSlave = tag.getBoolean("isSlave"); + direction = Direction.byIndex(tag.getInt(Constants.NBT.DIRECTION)); + connectedPos = new BlockPos(tag.getInt(Constants.NBT.X_COORD), tag.getInt(Constants.NBT.Y_COORD), tag.getInt(Constants.NBT.Z_COORD)); + + burnTime = tag.getInt("burnTime"); + ticksRequired = tag.getInt("ticksRequired"); + + byte[] array = tag.getByteArray("blockedSlots"); + for (int i = 0; i < array.length; i++) blockedSlots[i] = array[i] != 0; + + for (int i = 0; i <= outputSlot; i++) + { + byte[] allowedSlotArray = tag.getByteArray("allowedDirections" + i); + for (int j = 0; j < Math.min(allowedSlotArray.length, Direction.values().length); j++) + { + this.setSlotEnabled(allowedSlotArray[j] == 1 ? true : false, i, Direction.values()[j]); + } +// tag.putByteArray("allowedDirections" + i, allowedSlotArray); + } + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + super.serialize(tag); + + tag.putBoolean("isSlave", isSlave); + tag.putInt(Constants.NBT.DIRECTION, direction.getIndex()); + tag.putInt(Constants.NBT.X_COORD, connectedPos.getX()); + tag.putInt(Constants.NBT.Y_COORD, connectedPos.getY()); + tag.putInt(Constants.NBT.Z_COORD, connectedPos.getZ()); + + tag.putInt("burnTime", burnTime); + tag.putInt("ticksRequired", ticksRequired); + + byte[] blockedSlotArray = new byte[blockedSlots.length]; + for (int i = 0; i < blockedSlots.length; i++) blockedSlotArray[i] = (byte) (blockedSlots[i] ? 1 : 0); + + tag.putByteArray("blockedSlots", blockedSlotArray); + + for (int i = 0; i <= outputSlot; i++) + { + byte[] allowedSlotArray = new byte[Direction.values().length]; + for (int j = 0; j < Direction.values().length; j++) + { + allowedSlotArray[j] = (byte) (this.isSlotEnabled(i, Direction.values()[j]) ? 1 : 0); + } + tag.putByteArray("allowedDirections" + i, allowedSlotArray); + } + + return tag; + } + + @Override + public LazyOptional getCapability(Capability capability, Direction facing) + { + if (facing != null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + { + if (this.isSlave()) + { + TileEntity tile = getWorld().getTileEntity(connectedPos); + if (tile instanceof TileAlchemyTable && !((TileAlchemyTable) tile).isSlave) + { + return (LazyOptional) tile.getCapability(capability, facing); + } + } else + { + return super.getCapability(capability, facing); + } + } + + return super.getCapability(capability, facing); + } + + @Override + public int[] getSlotsForFace(Direction side) + { + List integerList = new ArrayList(); + for (int i = 0; i <= outputSlot; i++) + { + if (this.isSlotEnabled(i, side)) + { + integerList.add(i); + } + } + + int[] intArray = new int[integerList.size()]; + for (int i = 0; i < intArray.length; i++) + { + intArray[i] = integerList.get(i); + } + + return intArray; +// switch (side) +// { +// case DOWN: +// return new int[] { outputSlot }; +// case UP: +// return new int[] { orbSlot }; +// default: +// return new int[] { 0, 1, 2, 3, 4, 5 }; +// } + } + + @Override + public boolean canInsertItem(int index, ItemStack stack, Direction direction) + { + switch (index) + { + case outputSlot: + return false; + case orbSlot: + return !stack.isEmpty() && stack.getItem() instanceof IBloodOrb; + default: + return this.isSlotEnabled(index, direction); + } +// switch (direction) +// { +// case DOWN: +// return index != outputSlot && index != orbSlot; +// case UP: +// if (index == orbSlot && !stack.isEmpty() && stack.getItem() instanceof IBloodOrb) +// { +// return true; +// } else +// { +// return true; +// } +// default: +// if (this.isSlave) +// { +// TileEntity tile = getWorld().getTileEntity(connectedPos); +// if (tile instanceof TileAlchemyTable && !((TileAlchemyTable) tile).isSlave) +// { +// return ((TileAlchemyTable) tile).canInsertItem(index, stack, direction); +// } +// } +// return getAccessibleInputSlots(direction).contains(index); +// } + } + + @Override + public boolean canExtractItem(int index, ItemStack stack, Direction direction) + { + switch (direction) + { + default: + return this.isSlotEnabled(index, direction); + } + } + + public List getAccessibleInputSlots(Direction direction) + { + List list = new ArrayList<>(); + + for (int i = 0; i < 6; i++) + { + if (isInputSlotAccessible(i)) + { + list.add(i); + } + } + + return list; + } + + @Override + public void tick() + { + if (isSlave()) + { + return; + } + + List inputList = new ArrayList<>(); + + for (int i = 0; i < 6; i++) + { + if (!getStackInSlot(i).isEmpty()) + { + inputList.add(getStackInSlot(i)); + } + } + + int tier = getTierOfOrb(); + + // Simple recipes + RecipeAlchemyTable recipeAlchemyTable = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAlchemyTable(world, inputList); + if (recipeAlchemyTable != null && (burnTime > 0 || (!getWorld().isRemote && tier >= recipeAlchemyTable.getMinimumTier() && getContainedLp() >= recipeAlchemyTable.getSyphon()))) + { + if (burnTime == 1) + notifyUpdate(); + + if (canCraft(recipeAlchemyTable.getOutput())) + { + ticksRequired = recipeAlchemyTable.getTicks(); + burnTime++; + if (burnTime >= ticksRequired) + { + if (!getWorld().isRemote) + { + if (recipeAlchemyTable.getSyphon() > 0) + { + if (consumeLp(recipeAlchemyTable.getSyphon()) < recipeAlchemyTable.getSyphon()) + { + // There was not enough LP to craft or there was no orb + burnTime = 0; + notifyUpdate(); + return; + } + } + + ItemStack[] inputs = new ItemStack[0]; + for (ItemStack stack : inputList) ArrayUtils.add(inputs, stack.copy()); + + BloodMagicCraftedEvent.AlchemyTable event = new BloodMagicCraftedEvent.AlchemyTable(recipeAlchemyTable.getOutput().copy(), inputs); + MinecraftForge.EVENT_BUS.post(event); + + ItemStack outputSlotStack = getStackInSlot(outputSlot); + if (outputSlotStack.isEmpty()) + setInventorySlotContents(outputSlot, event.getOutput()); + else + outputSlotStack.grow(event.getOutput().getCount()); + + consumeInventory(recipeAlchemyTable); + + burnTime = 0; + notifyUpdate(); + } + } + } + } else + { + burnTime = 0; + } + + } + + public double getProgressForGui() + { + return ((double) burnTime) / ticksRequired; + } + + private boolean canCraft(ItemStack output) + { + ItemStack currentOutputStack = getStackInSlot(outputSlot); + if (output.isEmpty()) + return false; + if (currentOutputStack.isEmpty()) + return true; + if (!ItemHandlerHelper.canItemStacksStack(output, currentOutputStack)) + return false; + int result = currentOutputStack.getCount() + output.getCount(); + return result <= getInventoryStackLimit() && result <= currentOutputStack.getMaxStackSize(); + } + + public int getTierOfOrb() + { + ItemStack orbStack = getStackInSlot(orbSlot); + if (!orbStack.isEmpty()) + { + if (orbStack.getItem() instanceof IBloodOrb) + { + BloodOrb orb = ((IBloodOrb) orbStack.getItem()).getOrb(orbStack); + return orb == null ? 0 : orb.getTier(); + } + } + + return 0; + } + + public int getContainedLp() + { + ItemStack orbStack = getStackInSlot(orbSlot); + if (!orbStack.isEmpty()) + { + if (orbStack.getItem() instanceof IBloodOrb) + { + Binding binding = ((IBindable) orbStack.getItem()).getBinding(orbStack); + if (binding == null) + { + return 0; + } + + SoulNetwork network = NetworkHelper.getSoulNetwork(binding); + + return network.getCurrentEssence(); + } + } + + return 0; + } + + public void craftItem(List inputList, RecipeAlchemyTable recipe) + { + ItemStack outputStack = recipe.getOutput(); + if (this.canCraft(outputStack)) + { + ItemStack currentOutputStack = getStackInSlot(outputSlot); + + ItemStack[] inputs = new ItemStack[0]; + for (ItemStack stack : inputList) ArrayUtils.add(inputs, stack.copy()); + + BloodMagicCraftedEvent.AlchemyTable event = new BloodMagicCraftedEvent.AlchemyTable(outputStack.copy(), inputs); + MinecraftForge.EVENT_BUS.post(event); + outputStack = event.getOutput(); + + if (currentOutputStack.isEmpty()) + { + setInventorySlotContents(outputSlot, outputStack); + } else if (ItemHandlerHelper.canItemStacksStack(outputStack, currentOutputStack)) + { + currentOutputStack.grow(outputStack.getCount()); + } + + consumeInventory(recipe); + } + } + + public int consumeLp(int requested) + { + ItemStack orbStack = getStackInSlot(orbSlot); + + if (!orbStack.isEmpty()) + { + if (orbStack.getItem() instanceof IBloodOrb) + { + if (NetworkHelper.syphonFromContainer(orbStack, SoulTicket.item(orbStack, world, pos, requested))) + { + return requested; + } + } + } + + return 0; + } + + public void consumeInventory(RecipeAlchemyTable recipe) + { + for (int i = 0; i < 6; i++) + { + ItemStack inputStack = getStackInSlot(i); + if (!inputStack.isEmpty()) + { + if (inputStack.getItem().hasContainerItem(inputStack)) + { + setInventorySlotContents(i, inputStack.getItem().getContainerItem(inputStack)); + continue; + } else if (inputStack.getMaxDamage() > 0) + { +// inputStack.setDamage(inputStack.getDamage() + 1); +// if (inputStack.getDamage() >= inputStack.getMaxDamage()) +// { +// +// } + + if (!inputStack.isDamageable()) + { + continue; + } + if (inputStack.attemptDamageItem(1, world.rand, null)) + { + setInventorySlotContents(i, ItemStack.EMPTY); + } + continue; + } + + inputStack.shrink(1); + if (inputStack.isEmpty()) + { + setInventorySlotContents(i, ItemStack.EMPTY); + } + } + } + } + + public Direction getDirection() + { + return direction; + } + + public boolean isSlave() + { + return isSlave; + } + + public int getBurnTime() + { + return burnTime; + } + + public int getTicksRequired() + { + return ticksRequired; + } + + public BlockPos getConnectedPos() + { + return connectedPos; + } + + public boolean[] getBlockedSlots() + { + return blockedSlots; + } + + public static int getOrbSlot() + { + return orbSlot; + } + + public static int getOutputSlot() + { + return outputSlot; + } + + @Override + public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) + { + assert world != null; + return new ContainerAlchemyTable(this, p_createMenu_1_, p_createMenu_2_); + } + + @Override + public ITextComponent getDisplayName() + { + return new StringTextComponent("Alchemy Table"); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileAltar.java b/src/main/java/wayoftime/bloodmagic/tile/TileAltar.java new file mode 100644 index 00000000..897d72d6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileAltar.java @@ -0,0 +1,253 @@ +package wayoftime.bloodmagic.tile; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.altar.AltarTier; +import wayoftime.bloodmagic.altar.BloodAltar; +import wayoftime.bloodmagic.altar.IBloodAltar; + +public class TileAltar extends TileInventory implements IBloodAltar, ITickableTileEntity +{ + @ObjectHolder("bloodmagic:altar") + public static TileEntityType TYPE; + private BloodAltar bloodAltar; + + private LazyOptional fluidOptional; + + public TileAltar(TileEntityType type) + { + super(type, 1, "altar"); + this.bloodAltar = new BloodAltar(this); + } + + public TileAltar() + { + this(TYPE); + } + + @Override + public void deserialize(CompoundNBT tagCompound) + { + super.deserialize(tagCompound); + + CompoundNBT altarTag = tagCompound.getCompound("bloodAltar"); + + this.bloodAltar.readFromNBT(altarTag); + } + + @Override + public CompoundNBT serialize(CompoundNBT tagCompound) + { + super.serialize(tagCompound); + + CompoundNBT altarTag = new CompoundNBT(); + this.bloodAltar.writeToNBT(altarTag); + + tagCompound.put("bloodAltar", altarTag); + return tagCompound; + } + + @Override + public void tick() + { + bloodAltar.update(); + } + + @Override + public void sacrificialDaggerCall(int amount, boolean isSacrifice) + { + bloodAltar.sacrificialDaggerCall(amount, isSacrifice); + } + + @Override + public boolean isItemValidForSlot(int slot, ItemStack itemstack) + { + return slot == 0; + } + + @Override + public int getCapacity() + { + return bloodAltar.getCapacity(); + } + + @Override + public int getCurrentBlood() + { + return bloodAltar.getCurrentBlood(); + } + + @Override + public int getTier() + { + return bloodAltar.getTier().toInt(); + } + + @Override + public int getProgress() + { + return bloodAltar.getProgress(); + } + + @Override + public float getSacrificeMultiplier() + { + return bloodAltar.getSacrificeMultiplier(); + } + + @Override + public float getSelfSacrificeMultiplier() + { + return bloodAltar.getSelfSacrificeMultiplier(); + } + + @Override + public float getOrbMultiplier() + { + return bloodAltar.getOrbMultiplier(); + } + + @Override + public float getDislocationMultiplier() + { + return bloodAltar.getDislocationMultiplier(); + } + + @Override + public float getConsumptionMultiplier() + { + return bloodAltar.getConsumptionMultiplier(); + } + + @Override + public float getConsumptionRate() + { + return bloodAltar.getConsumptionRate(); + } + + @Override + public int getLiquidRequired() + { + return bloodAltar.getLiquidRequired(); + } + + @Override + public int getBufferCapacity() + { + return bloodAltar.getBufferCapacity(); + } + + @Override + public void startCycle() + { + bloodAltar.startCycle(); + } + + @Override + public void checkTier() + { + bloodAltar.checkTier(); + } + + @Override + public void requestPauseAfterCrafting(int cooldown) + { + bloodAltar.requestPauseAfterCrafting(cooldown); + } + + @Override + public boolean isActive() + { + return bloodAltar.isActive(); + } + + @Override + public int fillMainTank(int amount) + { + return bloodAltar.fillMainTank(amount); + } + + @Override + public void setActive() + { + bloodAltar.setActive(); + } + + @Override + public int getChargingRate() + { + return bloodAltar.getChargingRate(); + } + + @Override + public int getTotalCharge() + { + return bloodAltar.getTotalCharge(); + } + + @Override + public int getChargingFrequency() + { + return bloodAltar.getChargingFrequency(); + } + + public AltarTier getCurrentTierDisplayed() + { + return bloodAltar.getCurrentTierDisplayed(); + } + + public boolean setCurrentTierDisplayed(AltarTier altarTier) + { + return bloodAltar.setCurrentTierDisplayed(altarTier); + } +// +// @Override +// public boolean hasCapability(@Nonnull Capability capability, @Nullable Direction facing) +// { +// if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) +// { +// return true; +// } +// +// return super.hasCapability(capability, facing); +// } + + @Override + protected void invalidateCaps() + { + super.invalidateCaps(); + if (fluidOptional != null) + { + fluidOptional.invalidate(); + fluidOptional = null; + } + + } + + @SuppressWarnings("unchecked") + @Override + public LazyOptional getCapability(@Nonnull Capability capability, @Nullable Direction facing) + { + if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + { + if (fluidOptional == null) + { + fluidOptional = LazyOptional.of(() -> new BloodAltar.VariableSizeFluidHandler(bloodAltar)); + } + return fluidOptional.cast(); +// return (T) bloodAltar; + } + + return super.getCapability(capability, facing); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileDeforesterCharge.java b/src/main/java/wayoftime/bloodmagic/tile/TileDeforesterCharge.java new file mode 100644 index 00000000..110f1d6c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileDeforesterCharge.java @@ -0,0 +1,231 @@ +package wayoftime.bloodmagic.tile; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.mojang.datafixers.util.Pair; + +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.tags.BlockTags; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.block.BlockShapedExplosive; + +public class TileDeforesterCharge extends TileExplosiveCharge +{ + @ObjectHolder("bloodmagic:deforester_charge") + public static TileEntityType TYPE; + + private Map treePartsMap; + private List treePartsCache; + private boolean finishedAnalysis; +// private Iterator blockPosIterator; + +// private boolean cached = false; + + public double internalCounter = 0; + + public int currentLogs = 0; + + public int maxLogs = 128; + + public TileDeforesterCharge(TileEntityType type, int maxLogs) + { + super(type); + + this.maxLogs = maxLogs; + } + + public TileDeforesterCharge() + { + this(TYPE, 128); + } + + @Override + public void onUpdate() + { + if (world.isRemote) + { + return; + } +// System.out.println("Counter: " + internalCounter); + + Direction explosiveDirection = this.getBlockState().get(BlockShapedExplosive.ATTACHED).getOpposite(); + BlockState attachedState = world.getBlockState(pos.offset(explosiveDirection)); + if (!BlockTags.LOGS.contains(attachedState.getBlock()) && !BlockTags.LEAVES.contains(attachedState.getBlock())) + { + return; + } + + if (treePartsMap == null) + { + treePartsMap = new HashMap(); + treePartsMap.put(pos.offset(explosiveDirection), false); + treePartsCache = new LinkedList(); + treePartsCache.add(pos.offset(explosiveDirection)); + internalCounter = 0; +// treePartsMap.add(pos.offset(explosiveDirection)); + } + + boolean foundNew = false; + List newPositions = new LinkedList(); + for (BlockPos currentPos : treePartsCache) + { + if (!treePartsMap.getOrDefault(currentPos, false)) // If the BlockPos wasn't checked yet + { +// BlockPos currentPos = entry.getKey(); + for (Direction dir : Direction.values()) + { + BlockPos checkPos = currentPos.offset(dir); + if (treePartsMap.containsKey(checkPos)) + { + continue; + } + + BlockState checkState = world.getBlockState(checkPos); + + boolean isTree = false; + if (currentLogs >= maxLogs) + { + continue; + } + if (BlockTags.LOGS.contains(checkState.getBlock())) + { + currentLogs++; + isTree = true; + + } else if (BlockTags.LEAVES.contains(checkState.getBlock())) + { + isTree = true; + } + + if (isTree) + { + treePartsMap.put(checkPos, false); + newPositions.add(checkPos); + foundNew = true; + } + } + + treePartsMap.put(currentPos, true); + if (currentLogs >= maxLogs) + { + finishedAnalysis = true; + break; + } + } + } + + treePartsCache.addAll(newPositions); + +// System.out.println("Found blocks: " + treePartsMap.size()); + + if (foundNew) + { + return; + } + + internalCounter++; + if (internalCounter == 20) + { +// worldIn.playSound((PlayerEntity)null, tntentity.getPosX(), tntentity.getPosY(), tntentity.getPosZ(), SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F); + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); + ((ServerWorld) this.world).spawnParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 5, 0.02, 0.03, 0.02, 0); + } + + if (internalCounter == 30) + { + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F); + } + + if (internalCounter < 30) + { + return; + } + + if (world.rand.nextDouble() < 0.3) + { + ((ServerWorld) this.world).spawnParticle(ParticleTypes.SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 0.0D, 0.0D, 0.0D, 0); + } + + if (internalCounter == 100) + { + ItemStack toolStack = this.getHarvestingTool(); + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 4.0F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F); + + int numParticles = 10; + + ((ServerWorld) this.world).spawnParticle(ParticleTypes.EXPLOSION, pos.getX() + 0.5 + explosiveDirection.getXOffset(), pos.getY() + 0.5 + explosiveDirection.getYOffset(), pos.getZ() + 0.5 + explosiveDirection.getZOffset(), numParticles, 1.0D, 1.0D, 1.0D, 0); + + ObjectArrayList> objectarraylist = new ObjectArrayList<>(); + + for (BlockPos blockPos : treePartsCache) + { +// BlockPos blockpos = initialPos.offset(explosiveDirection, i).offset(sweepDir1, j).offset(sweepDir2, k); + + BlockState blockstate = this.world.getBlockState(blockPos); + Block block = blockstate.getBlock(); + if (!blockstate.isAir(this.world, blockPos)) + { + BlockPos blockpos1 = blockPos.toImmutable(); +// this.world.getProfiler().startSection("explosion_blocks"); + if (this.world instanceof ServerWorld) + { + TileEntity tileentity = blockstate.hasTileEntity() ? this.world.getTileEntity(blockPos) : null; + LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld) this.world)).withRandom(this.world.rand).withParameter(LootParameters.field_237457_g_, Vector3d.copyCentered(blockPos)).withParameter(LootParameters.TOOL, toolStack).withNullableParameter(LootParameters.BLOCK_ENTITY, tileentity); +// if (this.mode == Explosion.Mode.DESTROY) { +// lootcontext$builder.withParameter(LootParameters.EXPLOSION_RADIUS, this.size); +// } + + blockstate.getDrops(lootcontext$builder).forEach((stack) -> { + handleExplosionDrops(objectarraylist, stack, blockpos1); + }); + + world.setBlockState(blockPos, Blocks.AIR.getDefaultState(), 3); + +// blockstate.onBlockExploded(this.world, blockpos, null); +// this.world.getProfiler().endSection(); + } + } + } + + for (Pair pair : objectarraylist) + { + Block.spawnAsEntity(this.world, pair.getSecond(), pair.getFirst()); + } + + world.setBlockState(getPos(), Blocks.AIR.getDefaultState()); + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + internalCounter = tag.getDouble("internalCounter"); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + tag.putDouble("internalCounter", internalCounter); + return tag; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrucible.java b/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrucible.java new file mode 100644 index 00000000..8e1cd973 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrucible.java @@ -0,0 +1,271 @@ +package wayoftime.bloodmagic.tile; + +import java.util.HashMap; +import java.util.Map.Entry; + +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWillConduit; +import wayoftime.bloodmagic.api.compat.IDemonWillGem; +import wayoftime.bloodmagic.api.compat.IDiscreteDemonWill; + +public class TileDemonCrucible extends TileInventory implements ITickableTileEntity, IDemonWillConduit, ISidedInventory +{ + @ObjectHolder("bloodmagic:demoncrucible") + public static TileEntityType TYPE; + public final int maxWill = 100; + public final double gemDrainRate = 10; + public HashMap willMap = new HashMap<>(); // TODO: Change to DemonWillHolder + public int internalCounter = 0; + + public TileDemonCrucible(TileEntityType type) + { + super(type, 1, "demoncrucible"); + } + + public TileDemonCrucible() + { + this(TYPE); + } + + @Override + public void tick() + { + if (getWorld().isRemote) + { + return; + } + + internalCounter++; + + if (getWorld().isBlockPowered(getPos())) + { + // TODO: Fill the contained gem if it is there. + ItemStack stack = this.getStackInSlot(0); + if (stack.getItem() instanceof IDemonWillGem) + { + IDemonWillGem gemItem = (IDemonWillGem) stack.getItem(); + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + if (willMap.containsKey(type)) + { + double current = willMap.get(type); + double fillAmount = Math.min(gemDrainRate, current); + if (fillAmount > 0) + { + fillAmount = gemItem.fillWill(type, stack, fillAmount, true); + if (willMap.get(type) - fillAmount <= 0) + { + willMap.remove(type); + } else + { + willMap.put(type, willMap.get(type) - fillAmount); + } + } + } + } + } + } else + { + ItemStack stack = this.getStackInSlot(0); + if (!stack.isEmpty()) + { + if (stack.getItem() instanceof IDemonWillGem) + { + IDemonWillGem gemItem = (IDemonWillGem) stack.getItem(); + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + double currentAmount = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, type); + double drainAmount = Math.min(maxWill - currentAmount, gemDrainRate); + double filled = WorldDemonWillHandler.fillWillToMaximum(getWorld(), pos, type, drainAmount, maxWill, false); + + filled = gemItem.drainWill(type, stack, filled, false); + if (filled > 0) + { + filled = gemItem.drainWill(type, stack, filled, true); + WorldDemonWillHandler.fillWillToMaximum(getWorld(), pos, type, filled, maxWill, true); + } + } + } else if (stack.getItem() instanceof IDiscreteDemonWill) // TODO: Limit the speed of this process + { + IDiscreteDemonWill willItem = (IDiscreteDemonWill) stack.getItem(); + EnumDemonWillType type = willItem.getType(stack); + double currentAmount = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, type); + double needed = maxWill - currentAmount; + double discreteAmount = willItem.getDiscretization(stack); + if (needed >= discreteAmount) + { + double filled = willItem.drainWill(stack, discreteAmount); + if (filled > 0) + { + WorldDemonWillHandler.fillWillToMaximum(getWorld(), pos, type, filled, maxWill, true); + if (stack.getCount() <= 0) + { + this.setInventorySlotContents(0, ItemStack.EMPTY); + } + } + } + } + } + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + + willMap.clear(); + + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + double amount = tag.getDouble("EnumWill" + type.name()); + if (amount > 0) + { + willMap.put(type, amount); + } + } + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + super.serialize(tag); + + for (Entry entry : willMap.entrySet()) + { + tag.putDouble("EnumWill" + entry.getKey().name(), entry.getValue()); + } + return tag; + } + + // IDemonWillConduit + + @Override + public int getWeight() + { + return 10; + } + + @Override + public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) + { + if (amount <= 0) + { + return 0; + } + + if (!canFill(type)) + { + return 0; + } + + if (!doFill) + { + if (!willMap.containsKey(type)) + { + return Math.min(maxWill, amount); + } + + return Math.min(maxWill - willMap.get(type), amount); + } + + if (!willMap.containsKey(type)) + { + double max = Math.min(maxWill, amount); + + willMap.put(type, max); + + return max; + } + + double current = willMap.get(type); + double filled = maxWill - current; + + if (amount < filled) + { + willMap.put(type, current + amount); + filled = amount; + } else + { + willMap.put(type, (double) maxWill); + } + + return filled; + } + + @Override + public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) + { + if (!willMap.containsKey(type)) + { + return 0; + } + + double drained = amount; + double current = willMap.get(type); + if (current < drained) + { + drained = current; + } + + if (doDrain) + { + current -= drained; + if (current <= 0) + { + willMap.remove(type); + } else + { + willMap.put(type, current); + } + } + + return drained; + } + + @Override + public boolean canFill(EnumDemonWillType type) + { + return true; + } + + @Override + public boolean canDrain(EnumDemonWillType type) + { + return true; + } + + @Override + public double getCurrentWill(EnumDemonWillType type) + { + return willMap.containsKey(type) ? willMap.get(type) : 0; + } + + @Override + public int[] getSlotsForFace(Direction side) + { + return new int[] + { 0 }; + } + + @Override + public boolean canInsertItem(int index, ItemStack stack, Direction direction) + { + return !stack.isEmpty() && inventory.get(0).isEmpty() + && (stack.getItem() instanceof IDemonWillGem || stack.getItem() instanceof IDiscreteDemonWill); + } + + @Override + public boolean canExtractItem(int index, ItemStack stack, Direction direction) + { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrystal.java b/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrystal.java new file mode 100644 index 00000000..b7310f7e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrystal.java @@ -0,0 +1,253 @@ +package wayoftime.bloodmagic.tile; + +import java.util.Locale; + +import net.minecraft.block.BlockState; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.common.block.BlockDemonCrystal; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.tile.base.TileTicking; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.will.DemonWillHolder; + +public class TileDemonCrystal extends TileTicking +{ + public static final double sameWillConversionRate = 45; + public static final double defaultWillConversionRate = 90; + public static final double timeDelayForWrongWill = 0.6; + public final int maxWill = 100; + public final double drainRate = 1; + public DemonWillHolder holder = new DemonWillHolder(); + public double progressToNextCrystal = 0; + public int internalCounter = 0; + public Direction placement = Direction.UP; // Side that this crystal is placed on. + + public EnumDemonWillType willType; + + @ObjectHolder("bloodmagic:demoncrystal") + public static TileEntityType TYPE; + + public TileDemonCrystal(TileEntityType type, EnumDemonWillType willType) + { + super(type); + this.willType = willType; + } + + public TileDemonCrystal(EnumDemonWillType willType) + { + this(TYPE, willType); + } + + public TileDemonCrystal() + { + this(TYPE, EnumDemonWillType.DEFAULT); + } + + @Override + public void onUpdate() + { + if (world.isRemote) + { + return; + } + + internalCounter++; + + if (internalCounter % 20 == 0) + { + int crystalCount = getCrystalCount(); + if (crystalCount < 7) + { +// this.setCrystalCount(crystalCount + 1); + EnumDemonWillType type = getWillType(); + + double value = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, type); + if (type != EnumDemonWillType.DEFAULT) + { + if (value >= 0.5) + { + double nextProgress = getCrystalGrowthPerSecond(value); + progressToNextCrystal += WorldDemonWillHandler.drainWill(getWorld(), getPos(), type, nextProgress * sameWillConversionRate, true) / sameWillConversionRate; + } else + { + value = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, EnumDemonWillType.DEFAULT); + if (value > 0.5) + { + double nextProgress = getCrystalGrowthPerSecond(value) * timeDelayForWrongWill; + progressToNextCrystal += WorldDemonWillHandler.drainWill(getWorld(), getPos(), EnumDemonWillType.DEFAULT, nextProgress * defaultWillConversionRate, true) / defaultWillConversionRate; + } + } + } else + { + if (value > 0.5) + { + + double nextProgress = getCrystalGrowthPerSecond(value); + progressToNextCrystal += WorldDemonWillHandler.drainWill(getWorld(), getPos(), type, nextProgress * sameWillConversionRate, true) / sameWillConversionRate; + } + } + + checkAndGrowCrystal(); + } + } + + } + + /** + * Encourages the crystal to grow by a large percentage by telling it to drain + * will from the aura. + * + * @param willDrain The amount of drain that is needed for the crystal + * to grow successfully for the desired amount. Can be + * more than the base amount. + * @param progressPercentage + * @return percentage actually grown. + */ + public double growCrystalWithWillAmount(double willDrain, double progressPercentage) + { + int crystalCount = getCrystalCount(); + if (crystalCount >= 7) + { + return 0; + } + + EnumDemonWillType type = this.getWillType(); + + double value = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, type); + double percentDrain = willDrain <= 0 ? 1 : Math.min(1, value / willDrain); + if (percentDrain <= 0) + { + return 0; + } + + // Verification that you can actually drain the will from this chunk, for future + // proofing. + WorldDemonWillHandler.drainWill(getWorld(), pos, type, percentDrain * willDrain, true); + progressToNextCrystal += percentDrain * progressPercentage; + + checkAndGrowCrystal(); + + return percentDrain * progressPercentage; + } + + public EnumDemonWillType getWillType() + { + return willType; + } + + public void checkAndGrowCrystal() + { + int crystalCount = getCrystalCount(); + if (progressToNextCrystal >= 1 && internalCounter % 100 == 0 && crystalCount < 7) + { + progressToNextCrystal--; + this.setCrystalCount(crystalCount + 1); + markDirty(); + notifyUpdate(); + } + } + + public double getMaxWillForCrystal() + { + return 50; + } + + public boolean dropSingleCrystal() + { + int crystalCount = getCrystalCount(); + if (!getWorld().isRemote && crystalCount > 1) + { + EnumDemonWillType type = getWillType(); +// EnumDemonWillType type = state.getValue(BlockDemonCrystal.TYPE); + ItemStack stack = BlockDemonCrystal.getItemStackDropped(type, 1); + if (!stack.isEmpty()) + { + setCrystalCount(crystalCount - 1); + InventoryHelper.spawnItemStack(getWorld(), pos.getX(), pos.getY(), pos.getZ(), stack); + notifyUpdate(); + return true; + } + } + + return false; + } + + public double getCrystalGrowthPerSecond(double will) + { +// return 0.1; + return 1.0 / 200 * Math.sqrt(will / 200); + } + + @Override + public void deserialize(CompoundNBT tag) + { + holder.readFromNBT(tag, "Will"); + placement = Direction.byIndex(tag.getInt("placement")); + progressToNextCrystal = tag.getDouble("progress"); + + if (!tag.contains(Constants.NBT.WILL_TYPE)) + { + this.willType = EnumDemonWillType.DEFAULT; + } else + { + this.willType = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH)); + } + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + holder.writeToNBT(tag, "Will"); + tag.putInt("placement", placement.getIndex()); + tag.putDouble("progress", progressToNextCrystal); + + if (willType == EnumDemonWillType.DEFAULT) + { + if (tag.contains(Constants.NBT.WILL_TYPE)) + { + tag.remove(Constants.NBT.WILL_TYPE); + } + + } else + { + tag.putString(Constants.NBT.WILL_TYPE, willType.toString()); + } + + return tag; + } + + public int getCrystalCount() + { + BlockState state = world.getBlockState(getPos()); + return state.get(BlockDemonCrystal.AGE) + 1; + } + + public void setCrystalCount(int crystalCount) + { + BlockState state = world.getBlockState(getPos()); + world.setBlockState(getPos(), state.with(BlockDemonCrystal.AGE, crystalCount - 1)); + } + + public Direction getPlacement() + { + return placement; + } + + public void setPlacement(Direction placement) + { + this.placement = placement; + } + +// @Override +// protected void onDataPacketClientReceived() +// { +// super.onDataPacketClientReceived(); +// notifyUpdate(); +// } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrystallizer.java b/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrystallizer.java new file mode 100644 index 00000000..96f91f52 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileDemonCrystallizer.java @@ -0,0 +1,187 @@ +package wayoftime.bloodmagic.tile; + +import net.minecraft.block.Block; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.tile.base.TileTicking; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWillConduit; + +public class TileDemonCrystallizer extends TileTicking implements IDemonWillConduit +{ + @ObjectHolder("bloodmagic:demoncrystallizer") + public static TileEntityType TYPE; + + public static final int maxWill = 100; + public static final double drainRate = 1; + public static final double willToFormCrystal = 99; + public static final double totalFormationTime = 1000; + // The whole purpose of this block is to grow a crystal initially. The + // acceleration and crystal growing is up to the crystal itself afterwards. + public DemonWillHolder holder = new DemonWillHolder(); + public double internalCounter = 0; + + public TileDemonCrystallizer(TileEntityType type) + { + super(type); + } + + public TileDemonCrystallizer() + { + this(TYPE); + } + + @Override + public void onUpdate() + { + if (world.isRemote) + { + return; + } + + BlockPos offsetPos = pos.offset(Direction.UP); + if (getWorld().isAirBlock(offsetPos)) // Room for a crystal to grow + { + EnumDemonWillType highestType = WorldDemonWillHandler.getHighestDemonWillType(getWorld(), pos); + double amount = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, highestType); + if (amount >= willToFormCrystal) + { + internalCounter += getCrystalFormationRate(amount); + if (internalCounter >= totalFormationTime) + { + if (WorldDemonWillHandler.drainWill(getWorld(), getPos(), highestType, willToFormCrystal, false) >= willToFormCrystal) + { + if (formCrystal(highestType, offsetPos)) + { + WorldDemonWillHandler.drainWill(getWorld(), getPos(), highestType, willToFormCrystal, true); + internalCounter = 0; + } + } + } + } + } + } + + public boolean formCrystal(EnumDemonWillType type, BlockPos position) + { + Block block = BloodMagicBlocks.RAW_CRYSTAL_BLOCK.get(); + switch (type) + { + case CORROSIVE: + block = BloodMagicBlocks.CORROSIVE_CRYSTAL_BLOCK.get(); + break; + case DESTRUCTIVE: + block = BloodMagicBlocks.DESTRUCTIVE_CRYSTAL_BLOCK.get(); + break; + case STEADFAST: + block = BloodMagicBlocks.STEADFAST_CRYSTAL_BLOCK.get(); + break; + case VENGEFUL: + block = BloodMagicBlocks.VENGEFUL_CRYSTAL_BLOCK.get(); + break; + default: + break; + } + getWorld().setBlockState(position, block.getDefaultState()); + TileEntity tile = getWorld().getTileEntity(position); + if (tile instanceof TileDemonCrystal) + { + ((TileDemonCrystal) tile).setPlacement(Direction.UP); + return true; + } + + return false; + } + + public double getCrystalFormationRate(double currentWill) + { + return 1; + } + + @Override + public void deserialize(CompoundNBT tag) + { + holder.readFromNBT(tag, "Will"); + internalCounter = tag.getDouble("internalCounter"); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + holder.writeToNBT(tag, "Will"); + tag.putDouble("internalCounter", internalCounter); + return tag; + } + + // IDemonWillConduit + + @Override + public int getWeight() + { + return 10; + } + + @Override + public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) + { + if (amount <= 0) + { + return 0; + } + + if (!canFill(type)) + { + return 0; + } + + if (!doFill) + { + return Math.min(maxWill - holder.getWill(type), amount); + } + + return holder.addWill(type, amount, maxWill); + } + + @Override + public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) + { + double drained = amount; + double current = holder.getWill(type); + if (current < drained) + { + drained = current; + } + + if (doDrain) + { + return holder.drainWill(type, amount); + } + + return drained; + } + + @Override + public boolean canFill(EnumDemonWillType type) + { + return true; + } + + @Override + public boolean canDrain(EnumDemonWillType type) + { + return true; + } + + @Override + public double getCurrentWill(EnumDemonWillType type) + { + return holder.getWill(type); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileExplosiveCharge.java b/src/main/java/wayoftime/bloodmagic/tile/TileExplosiveCharge.java new file mode 100644 index 00000000..d334ef65 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileExplosiveCharge.java @@ -0,0 +1,97 @@ +package wayoftime.bloodmagic.tile; + +import com.mojang.datafixers.util.Pair; + +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.math.BlockPos; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.tile.base.TileTicking; + +public class TileExplosiveCharge extends TileTicking +{ + public AnointmentHolder anointmentHolder = new AnointmentHolder(); + + public TileExplosiveCharge(TileEntityType type) + { + super(type); + } + + protected static void handleExplosionDrops(ObjectArrayList> dropPositionArray, ItemStack stack, BlockPos pos) + { + int i = dropPositionArray.size(); + + for (int j = 0; j < i; ++j) + { + Pair pair = dropPositionArray.get(j); + ItemStack itemstack = pair.getFirst(); + if (ItemEntity.canMergeStacks(itemstack, stack)) + { + ItemStack itemstack1 = ItemEntity.mergeStacks(itemstack, stack, 16); + dropPositionArray.set(j, Pair.of(itemstack1, pair.getSecond())); + if (stack.isEmpty()) + { + return; + } + } + } + + dropPositionArray.add(Pair.of(stack, pos)); + } + + public ItemStack getHarvestingTool() + { + ItemStack stack = new ItemStack(Items.DIAMOND_PICKAXE); + if (anointmentHolder != null) + anointmentHolder.toItemStack(stack); + return stack; + } + + @Override + public void deserialize(CompoundNBT tag) + { + if (tag.contains("holder")) + { + anointmentHolder = AnointmentHolder.fromNBT(tag.getCompound("holder")); + } + + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + if (anointmentHolder != null) + { + tag.put("holder", anointmentHolder.serialize()); + } + + return tag; + } + + public void setAnointmentHolder(AnointmentHolder holder) + { + this.anointmentHolder = holder; + } + + public void dropSelf() + { + ItemStack stack = new ItemStack(getBlockState().getBlock()); + if (anointmentHolder != null && !anointmentHolder.isEmpty()) + { + anointmentHolder.toItemStack(stack); + } + + InventoryHelper.spawnItemStack(world, pos.getX(), pos.getY(), pos.getZ(), stack); + } + + @Override + public void onUpdate() + { + + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileFungalCharge.java b/src/main/java/wayoftime/bloodmagic/tile/TileFungalCharge.java new file mode 100644 index 00000000..36d61f09 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileFungalCharge.java @@ -0,0 +1,40 @@ +package wayoftime.bloodmagic.tile; + +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntityType; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; + +public class TileFungalCharge extends TileVeinMineCharge +{ + @ObjectHolder("bloodmagic:fungal_charge") + public static TileEntityType TYPE; + + public TileFungalCharge(TileEntityType type, int maxBlocks) + { + super(type, maxBlocks); + } + + public TileFungalCharge() + { + this(TYPE, 64 * 3); + } + + @Override + public boolean isValidBlock(BlockState originalBlockState, BlockState testState) + { + return isValidStartingBlock(testState); + } + + @Override + public boolean isValidStartingBlock(BlockState originalBlockState) + { + return BloodMagicTags.Blocks.MUSHROOM_HYPHAE.contains(originalBlockState.getBlock()) || BloodMagicTags.Blocks.MUSHROOM_STEM.contains(originalBlockState.getBlock()); + } + + @Override + public boolean checkDiagonals() + { + return true; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileIncenseAltar.java b/src/main/java/wayoftime/bloodmagic/tile/TileIncenseAltar.java new file mode 100644 index 00000000..e68eb31c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileIncenseAltar.java @@ -0,0 +1,206 @@ +package wayoftime.bloodmagic.tile; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.incense.EnumTranquilityType; +import wayoftime.bloodmagic.api.compat.IIncensePath; +import wayoftime.bloodmagic.incense.IncenseAltarHandler; +import wayoftime.bloodmagic.incense.IncenseTranquilityRegistry; +import wayoftime.bloodmagic.incense.TranquilityStack; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.util.helper.PlayerSacrificeHelper; + +public class TileIncenseAltar extends TileInventory implements ITickableTileEntity +{ + public static int maxCheckRange = 5; + public AreaDescriptor incenseArea = new AreaDescriptor.Rectangle(new BlockPos(-5, -5, -5), 11); + public Map tranquilityMap = new HashMap<>(); + + public double incenseAddition = 0; // Self-sacrifice is multiplied by 1 plus this value. + public double tranquility = 0; + public int roadDistance = 0; // Number of road blocks laid down + + @ObjectHolder("bloodmagic:incensealtar") + public static TileEntityType TYPE; + + public TileIncenseAltar(TileEntityType type) + { + super(type, 1, "incensealtar"); + } + + public TileIncenseAltar() + { + this(TYPE); + } + + @Override + public void tick() + { + AxisAlignedBB aabb = incenseArea.getAABB(getPos()); + List playerList = getWorld().getEntitiesWithinAABB(PlayerEntity.class, aabb); + if (playerList.isEmpty()) + { + return; + } + + if (getWorld().getGameTime() % 100 == 0) + { + recheckConstruction(); + } + + boolean hasPerformed = false; + + for (PlayerEntity player : playerList) + { + if (PlayerSacrificeHelper.incrementIncense(player, 0, incenseAddition, incenseAddition / 100)) + { + hasPerformed = true; + } + } + + if (hasPerformed) + { + if (getWorld().rand.nextInt(4) == 0 && getWorld() instanceof ServerWorld) + { + ServerWorld server = (ServerWorld) getWorld(); + server.spawnParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 1, 0.02, 0.03, 0.02, 0); + } + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + tranquility = tag.getDouble("tranquility"); + incenseAddition = tag.getDouble("incenseAddition"); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + super.serialize(tag); + tag.putDouble("tranquility", tranquility); + tag.putDouble("incenseAddition", incenseAddition); + return tag; + } + + public void recheckConstruction() + { + // TODO: Check the physical construction of the incense altar to determine the + // maximum length. + int maxLength = 11; // Max length of the path. The path starts two blocks away from the center + // block. + int yOffset = 0; + + Map tranquilityMap = new HashMap<>(); + + for (int currentDistance = 2; currentDistance < currentDistance + maxLength; currentDistance++) + { + boolean canFormRoad = false; + + for (int i = -maxCheckRange + yOffset; i <= maxCheckRange + yOffset; i++) + { + BlockPos verticalPos = pos.add(0, i, 0); + + canFormRoad = true; + level: for (int index = 0; index < 4; index++) + { + Direction horizontalFacing = Direction.byHorizontalIndex(index); + BlockPos facingOffsetPos = verticalPos.offset(horizontalFacing, currentDistance); + for (int j = -1; j <= 1; j++) + { + BlockPos offsetPos = facingOffsetPos.offset(horizontalFacing.rotateY(), j); + BlockState state = getWorld().getBlockState(offsetPos); + Block block = state.getBlock(); + if (!(block instanceof IIncensePath && ((IIncensePath) block).getLevelOfPath(getWorld(), offsetPos, state) >= currentDistance - 2)) + { + canFormRoad = false; + break level; + } + } + } + + if (canFormRoad) + { + yOffset = i; + break; + } + } + + if (canFormRoad) + { + for (int i = -currentDistance; i <= currentDistance; i++) + { + for (int j = -currentDistance; j <= currentDistance; j++) + { + if (Math.abs(i) != currentDistance && Math.abs(j) != currentDistance) + { + continue; // TODO: Can make this just set j to currentDistance to speed it up. + } + + for (int y = yOffset; y <= 2 + yOffset; y++) + { + BlockPos offsetPos = pos.add(i, y, j); + BlockState state = getWorld().getBlockState(offsetPos); + Block block = state.getBlock(); + TranquilityStack stack = IncenseTranquilityRegistry.getTranquilityOfBlock(getWorld(), offsetPos, block, state); + if (stack != null) + { + if (!tranquilityMap.containsKey(stack.type)) + { + tranquilityMap.put(stack.type, stack.value); + } else + { + tranquilityMap.put(stack.type, tranquilityMap.get(stack.type) + stack.value); + } + } + } + } + } + } else + { + roadDistance = currentDistance - 2; + break; + } + } + + this.tranquilityMap = tranquilityMap; + + double totalTranquility = 0; + for (Entry entry : tranquilityMap.entrySet()) + { + totalTranquility += entry.getValue(); + } + + if (totalTranquility < 0) + { + return; + } + + double appliedTranquility = 0; + for (Entry entry : tranquilityMap.entrySet()) + { + appliedTranquility += Math.sqrt(entry.getValue()); + } + + double bonus = IncenseAltarHandler.getIncenseBonusFromComponents(getWorld(), pos, appliedTranquility, roadDistance); + incenseAddition = bonus; + this.tranquility = appliedTranquility; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileInventory.java b/src/main/java/wayoftime/bloodmagic/tile/TileInventory.java new file mode 100644 index 00000000..961fc1fd --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileInventory.java @@ -0,0 +1,317 @@ +package wayoftime.bloodmagic.tile; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.inventory.ItemStackHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.NonNullList; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.wrapper.InvWrapper; +import net.minecraftforge.items.wrapper.SidedInvWrapper; +import wayoftime.bloodmagic.tile.base.TileBase; + +public class TileInventory extends TileBase implements IInventory +{ + protected int[] syncedSlots = new int[0]; + protected NonNullList inventory; + LazyOptional handlerDown; + LazyOptional handlerUp; + LazyOptional handlerNorth; + LazyOptional handlerSouth; + LazyOptional handlerWest; + LazyOptional handlerEast; + private int size; + + // IInventory + private String name; + + public TileInventory(TileEntityType type, int size, String name) + { + super(type); + this.inventory = NonNullList.withSize(size, ItemStack.EMPTY); + this.size = size; + this.name = name; + initializeItemHandlers(); + } + + protected boolean isSyncedSlot(int slot) + { + for (int s : this.syncedSlots) + { + if (s == slot) + { + return true; + } + } + return false; + } + + @Override + public void deserialize(CompoundNBT tagCompound) + { + super.deserialize(tagCompound); + + this.inventory = NonNullList.withSize(this.getSizeInventory(), ItemStack.EMPTY); + + ItemStackHelper.loadAllItems(tagCompound, this.inventory); + +// ListNBT tags = tagCompound.getList("Items", 10); +// inventory = NonNullList.withSize(size, ItemStack.EMPTY); +// +// +// +// for (int i = 0; i < tags.size(); i++) +// { +// if (!isSyncedSlot(i)) +// { +// CompoundNBT data = tags.getCompoundTagAt(i); +// byte j = data.getByte("Slot"); +// +// if (j >= 0 && j < inventory.size()) +// { +// inventory.set(j, new ItemStack(data)); // No matter how much an i looks like a j, it is not one. +// // They are drastically different characters and cause +// // drastically different things to happen. Apparently I +// // didn't know this at one point. - TehNut +// } +// } +// } + } + + @Override + public CompoundNBT serialize(CompoundNBT tagCompound) + { + super.serialize(tagCompound); + + ItemStackHelper.saveAllItems(tagCompound, this.inventory); +// NBTTagList tags = new NBTTagList(); +// +// for (int i = 0; i < inventory.size(); i++) +// { +// if ((!inventory.get(i).isEmpty()) && !isSyncedSlot(i)) +// { +// CompoundNBT data = new CompoundNBT(); +// data.putByte("Slot", (byte) i); +// inventory.get(i).write(data); +// tags.appendTag(data); +// } +// } +// +// tagCompound.setTag("Items", tags); + return tagCompound; + } + + public void dropItems() + { + InventoryHelper.dropInventoryItems(getWorld(), getPos(), this); + } + + @Override + public int getSizeInventory() + { + return size; + } + + @Override + public ItemStack getStackInSlot(int index) + { + return inventory.get(index); + } + + @Override + public ItemStack decrStackSize(int index, int count) + { + if (!getStackInSlot(index).isEmpty()) + { + if (!getWorld().isRemote) + getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); + + if (getStackInSlot(index).getCount() <= count) + { + ItemStack itemStack = inventory.get(index); + inventory.set(index, ItemStack.EMPTY); + markDirty(); + return itemStack; + } + + ItemStack itemStack = inventory.get(index).split(count); + markDirty(); + return itemStack; + } + + return ItemStack.EMPTY; + } + + @Override + public ItemStack removeStackFromSlot(int slot) + { + if (!inventory.get(slot).isEmpty()) + { + ItemStack itemStack = inventory.get(slot); + setInventorySlotContents(slot, ItemStack.EMPTY); + return itemStack; + } + return ItemStack.EMPTY; + } + + @Override + public void setInventorySlotContents(int slot, ItemStack stack) + { + inventory.set(slot, stack); + if (!stack.isEmpty() && stack.getCount() > getInventoryStackLimit()) + stack.setCount(getInventoryStackLimit()); + markDirty(); + if (!getWorld().isRemote) + getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3); + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + @Override + public void openInventory(PlayerEntity player) + { + + } + + @Override + public void closeInventory(PlayerEntity player) + { + + } + + @Override + public boolean isItemValidForSlot(int index, ItemStack stack) + { + return true; + } + + // IWorldNameable + +// @Override +// public int getField(int id) +// { +// return 0; +// } +// +// @Override +// public void setField(int id, int value) +// { +// +// } +// +// @Override +// public int getFieldCount() +// { +// return 0; +// } + + @Override + public void clear() + { + this.inventory = NonNullList.withSize(size, ItemStack.EMPTY); + } + + @Override + public boolean isEmpty() + { + for (ItemStack stack : inventory) if (!stack.isEmpty()) + return false; + + return true; + } + + @Override + public boolean isUsableByPlayer(PlayerEntity player) + { + return true; + } + +// @Override +// public String getName() +// { +// return TextHelper.localize("tile.bloodmagic." + name + ".name"); +// } +// +// @Override +// public boolean hasCustomName() +// { +// return true; +// } +// +// @Override +// public ITextComponent getDisplayName() +// { +// return new TextComponentString(getName()); +// } + + protected void initializeItemHandlers() + { + if (this instanceof ISidedInventory) + { + handlerDown = LazyOptional.of(() -> new SidedInvWrapper((ISidedInventory) this, Direction.DOWN)); + handlerUp = LazyOptional.of(() -> new SidedInvWrapper((ISidedInventory) this, Direction.UP)); + handlerNorth = LazyOptional.of(() -> new SidedInvWrapper((ISidedInventory) this, Direction.NORTH)); + handlerSouth = LazyOptional.of(() -> new SidedInvWrapper((ISidedInventory) this, Direction.SOUTH)); + handlerWest = LazyOptional.of(() -> new SidedInvWrapper((ISidedInventory) this, Direction.WEST)); + handlerEast = LazyOptional.of(() -> new SidedInvWrapper((ISidedInventory) this, Direction.EAST)); + } else + { + handlerDown = LazyOptional.of(() -> new InvWrapper(this)); + handlerUp = handlerDown; + handlerNorth = handlerDown; + handlerSouth = handlerDown; + handlerWest = handlerDown; + handlerEast = handlerDown; + } + } + + @SuppressWarnings("unchecked") + @Override + public LazyOptional getCapability(@Nonnull Capability capability, @Nullable Direction facing) + { + if (facing != null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + { + switch (facing) + { + case DOWN: + return handlerDown.cast(); + case EAST: + return handlerEast.cast(); + case NORTH: + return handlerNorth.cast(); + case SOUTH: + return handlerSouth.cast(); + case UP: + return handlerUp.cast(); + case WEST: + return handlerWest.cast(); + } + } else if (facing == null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + { + return handlerDown.cast(); + } + + return super.getCapability(capability, facing); + } + +// @Override +// public boolean hasCapability(Capability capability, Direction facing) +// { +// return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing); +// } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileMasterRitualStone.java b/src/main/java/wayoftime/bloodmagic/tile/TileMasterRitualStone.java new file mode 100644 index 00000000..5aa0f181 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileMasterRitualStone.java @@ -0,0 +1,582 @@ +package wayoftime.bloodmagic.tile; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; + +import javax.annotation.Nullable; + +import com.google.common.base.Strings; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.ItemActivationCrystal; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.event.RitualEvent; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumReaderBoundaries; +import wayoftime.bloodmagic.ritual.IMasterRitualStone; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.tile.base.TileTicking; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Constants; +import wayoftime.bloodmagic.util.helper.BindableHelper; +import wayoftime.bloodmagic.util.helper.NBTHelper; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; +import wayoftime.bloodmagic.util.helper.RitualHelper; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class TileMasterRitualStone extends TileTicking implements IMasterRitualStone +{ + @ObjectHolder("bloodmagic:masterritualstone") + public static TileEntityType TYPE; + protected final Map modableRangeMap = new HashMap<>(); + private UUID owner; + private SoulNetwork cachedNetwork; + private boolean active; + private boolean redstoned; + private int activeTime; + private int cooldown; + private Ritual currentRitual; + private Direction direction = Direction.NORTH; + private boolean inverted; + private List currentActiveWillConfig = new ArrayList<>(); + + public TileMasterRitualStone(TileEntityType type) + { + super(type); + } + + public TileMasterRitualStone() + { + this(TYPE); + } + + @Override + public void onUpdate() + { + if (getWorld().isRemote) + return; + + if (isPowered() && isActive()) + { + active = false; + redstoned = true; + stopRitual(Ritual.BreakType.REDSTONE); + return; + } + + if (!isActive() && !isPowered() && isRedstoned() && getCurrentRitual() != null) + { + active = true; + ItemStack crystalStack = NBTHelper.checkNBT(ItemActivationCrystal.CrystalType.getStack(getCurrentRitual().getCrystalLevel())); + BindableHelper.applyBinding(crystalStack, new Binding(owner, PlayerHelper.getUsernameFromUUID(owner))); + activateRitual(crystalStack, null, getCurrentRitual()); + redstoned = false; + } + + if (getCurrentRitual() != null && isActive()) + { + if (activeTime % getCurrentRitual().getRefreshTime() == 0) + performRitual(getWorld(), getPos()); + + activeTime++; + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + owner = tag.hasUniqueId("owner") ? tag.getUniqueId("owner") : null; + if (owner != null) + cachedNetwork = NetworkHelper.getSoulNetwork(owner); + currentRitual = BloodMagic.RITUAL_MANAGER.getRitual(tag.getString(Constants.NBT.CURRENT_RITUAL)); + if (currentRitual != null) + { + CompoundNBT ritualTag = tag.getCompound(Constants.NBT.CURRENT_RITUAL_TAG); + if (!ritualTag.isEmpty()) + { + currentRitual.readFromNBT(ritualTag); + } + addBlockRanges(currentRitual.getModableRangeMap()); + for (Entry entry : modableRangeMap.entrySet()) + { + CompoundNBT descriptorTag = ritualTag.getCompound(entry.getKey()); + entry.getValue().readFromNBT(descriptorTag); +// ritualTag.put(entry.getKey(), descriptorTag); + } + } + active = tag.getBoolean(Constants.NBT.IS_RUNNING); + activeTime = tag.getInt(Constants.NBT.RUNTIME); + direction = Direction.values()[tag.getInt(Constants.NBT.DIRECTION)]; + redstoned = tag.getBoolean(Constants.NBT.IS_REDSTONED); + + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + if (tag.getBoolean("EnumWill" + type)) + { + currentActiveWillConfig.add(type); + } + } + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + String ritualId = BloodMagic.RITUAL_MANAGER.getId(getCurrentRitual()); + if (owner != null) + tag.putUniqueId("owner", owner); + tag.putString(Constants.NBT.CURRENT_RITUAL, Strings.isNullOrEmpty(ritualId) ? "" : ritualId); + if (currentRitual != null) + { + CompoundNBT ritualTag = new CompoundNBT(); + currentRitual.writeToNBT(ritualTag); + for (Entry entry : modableRangeMap.entrySet()) + { + CompoundNBT descriptorTag = new CompoundNBT(); + entry.getValue().writeToNBT(descriptorTag); + ritualTag.put(entry.getKey(), descriptorTag); + } + tag.put(Constants.NBT.CURRENT_RITUAL_TAG, ritualTag); + } + tag.putBoolean(Constants.NBT.IS_RUNNING, isActive()); + tag.putInt(Constants.NBT.RUNTIME, getActiveTime()); + tag.putInt(Constants.NBT.DIRECTION, direction.getIndex()); + tag.putBoolean(Constants.NBT.IS_REDSTONED, redstoned); + + for (EnumDemonWillType type : currentActiveWillConfig) + { + tag.putBoolean("EnumWill" + type, true); + } + + return tag; + } + + @Override + public boolean activateRitual(ItemStack activationCrystal, @Nullable PlayerEntity activator, Ritual ritual) + { + if (PlayerHelper.isFakePlayer(activator)) + return false; + + Binding binding = ((IBindable) activationCrystal.getItem()).getBinding(activationCrystal); + if (binding != null && ritual != null) + { + if (activationCrystal.getItem() instanceof ItemActivationCrystal) + { + int crystalLevel = ((ItemActivationCrystal) activationCrystal.getItem()).getCrystalLevel(activationCrystal); + if (RitualHelper.canCrystalActivate(ritual, crystalLevel)) + { + if (!getWorld().isRemote) + { + SoulNetwork network = NetworkHelper.getSoulNetwork(binding); + + if (!isRedstoned() && network.getCurrentEssence() < ritual.getActivationCost() + && (activator != null && !activator.isCreative())) + { + activator.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.weak"), true); + return false; + } + + if (currentRitual != null) + currentRitual.stopRitual(this, Ritual.BreakType.ACTIVATE); + + RitualEvent.RitualActivatedEvent event = new RitualEvent.RitualActivatedEvent(this, binding.getOwnerId(), ritual, activator, activationCrystal, crystalLevel); + + if (MinecraftForge.EVENT_BUS.post(event)) + { + if (activator != null) + activator.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.prevent"), true); + return false; + } + + if (ritual.activateRitual(this, activator, binding.getOwnerId())) + { + if (!isRedstoned() && (activator != null && !activator.isCreative())) + network.syphon(ticket(ritual.getActivationCost())); + + if (activator != null) + activator.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.activate"), true); + + this.active = true; + this.owner = binding.getOwnerId(); + this.cachedNetwork = network; + this.currentRitual = ritual; + + if (!checkBlockRanges(ritual.getModableRangeMap())) + addBlockRanges(ritual.getModableRangeMap()); + + notifyUpdate(); + return true; + } + } + + notifyUpdate(); + return true; + } + } + } else + { + if (activator != null) + activator.sendStatusMessage(new TranslationTextComponent("chat.bloodmagic.ritual.notValid"), true); + } + + return false; + } + + @Override + public void performRitual(World world, BlockPos pos) + { + if (!world.isRemote && getCurrentRitual() != null + && BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(currentRitual), false)) + { + if (RitualHelper.checkValidRitual(getWorld(), getPos(), currentRitual, getDirection())) + { + Ritual ritual = getCurrentRitual(); + RitualEvent.RitualRunEvent event = new RitualEvent.RitualRunEvent(this, getOwner(), ritual); + + if (MinecraftForge.EVENT_BUS.post(event)) + return; + + if (!checkBlockRanges(getCurrentRitual().getModableRangeMap())) + addBlockRanges(getCurrentRitual().getModableRangeMap()); + + getCurrentRitual().performRitual(this); + } else + { + stopRitual(Ritual.BreakType.BREAK_STONE); + } + } + } + + @Override + public void stopRitual(Ritual.BreakType breakType) + { + if (!getWorld().isRemote && getCurrentRitual() != null) + { + RitualEvent.RitualStopEvent event = new RitualEvent.RitualStopEvent(this, getOwner(), getCurrentRitual(), breakType); + + if (MinecraftForge.EVENT_BUS.post(event)) + return; + + getCurrentRitual().stopRitual(this, breakType); + if (breakType != Ritual.BreakType.REDSTONE) + { + this.currentRitual = null; + this.active = false; + this.activeTime = 0; + } + notifyUpdate(); + } + } + + @Override + public int getCooldown() + { + return cooldown; + } + + @Override + public void setCooldown(int cooldown) + { + this.cooldown = cooldown; + } + + @Override + public Direction getDirection() + { + return direction; + } + + public void setDirection(Direction direction) + { + this.direction = direction; + } + + @Override + public boolean areTanksEmpty() + { + return false; + } + + @Override + public int getRunningTime() + { + return activeTime; + } + + @Override + public UUID getOwner() + { + return owner; + } + + public void setOwner(UUID owner) + { + this.owner = owner; + } + + @Override + public SoulNetwork getOwnerNetwork() + { + return cachedNetwork; + } + + @Override + public World getWorld() + { + return super.getWorld(); + } + + @Override + public BlockPos getPos() + { + return super.getPos(); + } + + @Override + public World getWorldObj() + { + return getWorld(); + } + + @Override + public BlockPos getBlockPos() + { + return getPos(); + } + + @Override + public String getNextBlockRange(String range) + { + if (this.currentRitual != null) + { + return this.currentRitual.getNextBlockRange(range); + } + + return ""; + } + + @Override + public void provideInformationOfRitualToPlayer(PlayerEntity player) + { + if (this.currentRitual != null) + { + ChatUtil.sendNoSpam(player, this.currentRitual.provideInformationOfRitualToPlayer(player)); + } + } + + @Override + public void provideInformationOfRangeToPlayer(PlayerEntity player, String range) + { + if (this.currentRitual != null && this.currentRitual.getListOfRanges().contains(range)) + { + ChatUtil.sendNoSpam(player, this.currentRitual.provideInformationOfRangeToPlayer(player, range)); + } + } + + @Override + public void setActiveWillConfig(PlayerEntity player, List typeList) + { + this.currentActiveWillConfig = typeList; + } + + @Override + public EnumReaderBoundaries setBlockRangeByBounds(PlayerEntity player, String range, BlockPos offset1, BlockPos offset2) + { + AreaDescriptor descriptor = this.getBlockRange(range); + DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, getBlockPos()); + + EnumReaderBoundaries modificationType = currentRitual.canBlockRangeBeModified(range, descriptor, this, offset1, offset2, holder); + if (modificationType == EnumReaderBoundaries.SUCCESS) + descriptor.modifyAreaByBlockPositions(offset1, offset2); + + world.notifyBlockUpdate(pos, this.getBlockState(), this.getBlockState(), 3); + + return modificationType; + } + + @Override + public List getActiveWillConfig() + { + return new ArrayList<>(currentActiveWillConfig); + } + + @Override + public void provideInformationOfWillConfigToPlayer(PlayerEntity player, List typeList) + { + // There is probably an easier way to make expanded chat messages + if (typeList.size() >= 1) + { + Object[] translations = new TranslationTextComponent[typeList.size()]; + StringBuilder constructedString = new StringBuilder("%s"); + + for (int i = 1; i < typeList.size(); i++) + { + constructedString.append(", %s"); + } + + for (int i = 0; i < typeList.size(); i++) + { + translations[i] = new TranslationTextComponent("tooltip.bloodmagic.currentBaseType." + typeList.get(i).name.toLowerCase()); + } + + ChatUtil.sendNoSpam(player, new TranslationTextComponent("ritual.bloodmagic.willConfig.set", new TranslationTextComponent(constructedString.toString(), translations))); + } else + { + ChatUtil.sendNoSpam(player, new TranslationTextComponent("ritual.bloodmagic.willConfig.void")); + } + } + + public boolean isPowered() + { + if (inverted) + return !getWorld().isBlockPowered(getPos()); + + return getWorld().isBlockPowered(getPos()); + } + + public SoulNetwork getCachedNetwork() + { + return cachedNetwork; + } + + public void setCachedNetwork(SoulNetwork cachedNetwork) + { + this.cachedNetwork = cachedNetwork; + } + + public boolean isActive() + { + return active; + } + + @Override + public void setActive(boolean active) + { + this.active = active; + } + + public boolean isRedstoned() + { + return redstoned; + } + + public void setRedstoned(boolean redstoned) + { + this.redstoned = redstoned; + } + + public int getActiveTime() + { + return activeTime; + } + + public void setActiveTime(int activeTime) + { + this.activeTime = activeTime; + } + + public Ritual getCurrentRitual() + { + return currentRitual; + } + + public void setCurrentRitual(Ritual currentRitual) + { + this.currentRitual = currentRitual; + } + + public boolean isInverted() + { + return inverted; + } + + public void setInverted(boolean inverted) + { + this.inverted = inverted; + } + + public List getCurrentActiveWillConfig() + { + return currentActiveWillConfig; + } + + public void setCurrentActiveWillConfig(List currentActiveWillConfig) + { + this.currentActiveWillConfig = currentActiveWillConfig; + } + + /** + * Used to grab the range of a ritual for a given effect. + * + * @param range - Range that needs to be pulled. + * @return - + */ + public AreaDescriptor getBlockRange(String range) + { + if (modableRangeMap.containsKey(range)) + { + return modableRangeMap.get(range); + } + + return null; + } + + @Override + public void addBlockRange(String range, AreaDescriptor defaultRange) + { + modableRangeMap.putIfAbsent(range, defaultRange.copy()); + } + + @Override + public void addBlockRanges(Map blockRanges) + { + for (Map.Entry entry : blockRanges.entrySet()) + { + modableRangeMap.putIfAbsent(entry.getKey(), entry.getValue().copy()); + } + } + + @Override + public void setBlockRange(String range, AreaDescriptor defaultRange) + { + modableRangeMap.put(range, defaultRange.copy()); + } + + @Override + public void setBlockRanges(Map blockRanges) + { + for (Map.Entry entry : blockRanges.entrySet()) + { + modableRangeMap.put(entry.getKey(), entry.getValue().copy()); + } + } + + public boolean checkBlockRanges(Map blockRanges) + { + for (Map.Entry entry : blockRanges.entrySet()) + { + if (modableRangeMap.get(entry.getKey()) == null) + return false; + } + return true; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileMimic.java b/src/main/java/wayoftime/bloodmagic/tile/TileMimic.java new file mode 100644 index 00000000..6652fc9b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileMimic.java @@ -0,0 +1,357 @@ +package wayoftime.bloodmagic.tile; + +import java.util.List; +import java.util.Objects; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.BlockItem; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.SUpdateTileEntityPacket; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.PotionUtils; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.client.model.ModelDataManager; +import net.minecraftforge.client.model.data.IModelData; +import net.minecraftforge.client.model.data.ModelDataMap; +import net.minecraftforge.client.model.data.ModelProperty; +import net.minecraftforge.common.util.Constants; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.util.ChatUtil; +import wayoftime.bloodmagic.util.Utils; + +public class TileMimic extends TileInventory +{ + @ObjectHolder("bloodmagic:mimic") + public static TileEntityType TYPE; + + public static final ModelProperty MIMIC = new ModelProperty<>(); + + private BlockState mimic; + + public boolean dropItemsOnBreak = true; + public CompoundNBT tileTag = new CompoundNBT(); + public TileEntity mimicedTile = null; + + public int playerCheckRadius = 5; + public int potionSpawnRadius = 5; + public int potionSpawnInterval = 40; + + private int internalCounter = 0; + + public TileMimic(TileEntityType type) + { + super(type, 2, "mimic"); + } + + public TileMimic() + { + this(TYPE); + } + + public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, ItemStack heldItem, Direction side) + { + if (!heldItem.isEmpty() && player.isCreative()) + { + List list = PotionUtils.getEffectsFromStack(heldItem); + if (!list.isEmpty()) + { + if (!world.isRemote) + { + setInventorySlotContents(1, heldItem.copy()); + world.notifyBlockUpdate(pos, state, state, 3); + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.potionSet")); + } + return true; + } +// } else if (heldItem.getItem() == RegistrarBloodMagicItems.POTION_FLASK) +// { +// // The potion flask is empty, therefore we have to reset the stored potion. +// if (!world.isRemote) +// { +// setInventorySlotContents(1, ItemStack.EMPTY); +// world.notifyBlockUpdate(pos, state, state, 3); +// ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.potionRemove")); +// } +// return true; +// } + } + + if (performSpecialAbility(player, side)) + { + return true; + } + + if (player.isSneaking()) + return false; + + if (!player.getHeldItem(hand).isEmpty() && player.getHeldItem(hand).getItem() == new ItemStack(BloodMagicBlocks.MIMIC.get()).getItem()) + return false; + + if (!getStackInSlot(0).isEmpty() && !player.getHeldItem(hand).isEmpty()) + return false; + + if (!dropItemsOnBreak && !player.isCreative()) + return false; + + Utils.insertItemToTile(this, player, 0); + ItemStack stack = getStackInSlot(0); + if (mimic == null || mimic == Blocks.AIR.getDefaultState()) + { + if (!stack.isEmpty() && stack.getItem() instanceof BlockItem && !world.isRemote) + { + Block block = ((BlockItem) stack.getItem()).getBlock(); + this.setMimic(block.getDefaultState()); +// mimic = block.getDefaultState(); +// markDirty(); + } + } + this.refreshTileEntity(); + + if (player.isCreative()) + { + dropItemsOnBreak = getStackInSlot(0).isEmpty(); + } + +// world.notifyBlockUpdate(pos, state, state, 3); + return true; + } + + public boolean performSpecialAbility(PlayerEntity player, Direction sideHit) + { + if (!player.isCreative()) + { + return false; + } + + if (player.getActiveItemStack().isEmpty() && !getStackInSlot(1).isEmpty()) + { + switch (sideHit) + { + case EAST: // When the block is clicked on the EAST or WEST side, potionSpawnRadius is + // edited. + case WEST: + if (player.isSneaking()) + { + potionSpawnRadius = Math.max(potionSpawnRadius - 1, 0); + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.potionSpawnRadius.down", potionSpawnRadius)); + } else + { + potionSpawnRadius++; + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.potionSpawnRadius.up", potionSpawnRadius)); + } + break; + case NORTH: // When the block is clicked on the NORTH or SOUTH side, detectRadius is edited. + case SOUTH: + if (player.isSneaking()) + { + playerCheckRadius = Math.max(playerCheckRadius - 1, 0); + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.detectRadius.down", playerCheckRadius)); + } else + { + playerCheckRadius++; + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.detectRadius.up", playerCheckRadius)); + } + break; + case UP: // When the block is clicked on the UP or DOWN side, potionSpawnInterval is + // edited. + case DOWN: + if (player.isSneaking()) + { + potionSpawnInterval = Math.max(potionSpawnInterval - 1, 1); + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.potionInterval.down", potionSpawnInterval)); + } else + { + potionSpawnInterval++; + ChatUtil.sendNoSpam(player, new TranslationTextComponent("chat.bloodmagic.mimic.potionInterval.up", potionSpawnInterval)); + } + break; + default: + break; + + } + + return true; + } + + return false; + } + + public void refreshTileEntity() + { + if (mimicedTile != null) + { + dropMimicedTileInventory(); + } + mimicedTile = getTileFromStackWithTag(getWorld(), pos, getStackInSlot(0), tileTag, mimic); + } + + public void dropMimicedTileInventory() + { + if (!getWorld().isRemote && mimicedTile instanceof IInventory) + { + InventoryHelper.dropInventoryItems(getWorld(), getPos(), (IInventory) mimicedTile); + } + } + + @Nullable + public static TileEntity getTileFromStackWithTag(World world, BlockPos pos, ItemStack stack, @Nullable CompoundNBT tag, BlockState replacementState) + { + if (!stack.isEmpty() && stack.getItem() instanceof BlockItem) + { + Block block = ((BlockItem) stack.getItem()).getBlock(); + BlockState state = replacementState; + if (block.hasTileEntity(state)) + { + TileEntity tile = block.createTileEntity(state, world); + + if (tile == null) + return null; + + if (tag != null) + { + CompoundNBT copyTag = tag.copy(); + copyTag.putInt("x", pos.getX()); + copyTag.putInt("y", pos.getY()); + copyTag.putInt("z", pos.getZ()); + tile.deserializeNBT(copyTag); + } + + tile.setWorldAndPos(world, pos); + + return tile; + } + } + + return null; + } + + public void setMimic(BlockState mimic) + { + this.mimic = mimic; + markDirty(); + world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), Constants.BlockFlags.BLOCK_UPDATE + Constants.BlockFlags.NOTIFY_NEIGHBORS); + } + + public BlockState getMimic() + { + return mimic; + } + + // The getUpdateTag()/handleUpdateTag() pair is called whenever the client + // receives a new chunk + // it hasn't seen before. i.e. the chunk is loaded + + @Override + public CompoundNBT getUpdateTag() + { + CompoundNBT tag = super.getUpdateTag(); + writeMimic(tag); + return tag; + } + + // The getUpdatePacket()/onDataPacket() pair is used when a block update happens + // on the client + // (a blockstate change or an explicit notificiation of a block update from the + // server). It's + // easiest to implement them based on getUpdateTag()/handleUpdateTag() + + @Nullable + @Override + public SUpdateTileEntityPacket getUpdatePacket() + { + return new SUpdateTileEntityPacket(pos, 1, getUpdateTag()); + } + + @Override + public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) + { + BlockState oldMimic = mimic; + CompoundNBT tag = pkt.getNbtCompound(); + deserialize(tag); + if (!Objects.equals(oldMimic, mimic)) + { + ModelDataManager.requestModelDataRefresh(this); + world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), Constants.BlockFlags.BLOCK_UPDATE + Constants.BlockFlags.NOTIFY_NEIGHBORS); + } + } + + @Nonnull + @Override + public IModelData getModelData() + { + return new ModelDataMap.Builder().withInitial(MIMIC, mimic).build(); + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + + dropItemsOnBreak = tag.getBoolean("dropItemsOnBreak"); + tileTag = tag.getCompound("tileTag"); +// stateOfReplacedBlock = StateUtil.parseState(tag.getString("stateOfReplacedBlock")); + readMimic(tag); + mimicedTile = getTileFromStackWithTag(getWorld(), pos, getStackInSlot(0), tileTag, mimic); + playerCheckRadius = tag.getInt("playerCheckRadius"); + potionSpawnRadius = tag.getInt("potionSpawnRadius"); + potionSpawnInterval = Math.max(1, tag.getInt("potionSpawnInterval")); + } + + private void readMimic(CompoundNBT tag) + { + if (tag.contains("mimic")) + { + mimic = NBTUtil.readBlockState(tag.getCompound("mimic")); + } + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + tag.putBoolean("dropItemsOnBreak", dropItemsOnBreak); + tag.put("tileTag", tileTag); + tag.putInt("playerCheckRadius", playerCheckRadius); + tag.putInt("potionSpawnRadius", potionSpawnRadius); + tag.putInt("potionSpawnInterval", potionSpawnInterval); +// tag.putString("stateOfReplacedBlock", stateOfReplacedBlock.toString()); + writeMimic(tag); + return super.serialize(tag); + } + + private void writeMimic(CompoundNBT tag) + { + if (mimic != null) + { + tag.put("mimic", NBTUtil.writeBlockState(mimic)); + } + } + + @Override + public void dropItems() + { + if (dropItemsOnBreak) + { + InventoryHelper.dropInventoryItems(getWorld(), getPos(), this); + } + + dropMimicedTileInventory(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileShapedExplosive.java b/src/main/java/wayoftime/bloodmagic/tile/TileShapedExplosive.java new file mode 100644 index 00000000..5fe75fcd --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileShapedExplosive.java @@ -0,0 +1,176 @@ +package wayoftime.bloodmagic.tile; + +import com.mojang.datafixers.util.Pair; + +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.block.BlockShapedExplosive; + +public class TileShapedExplosive extends TileExplosiveCharge +{ + @ObjectHolder("bloodmagic:shaped_explosive") + public static TileEntityType TYPE; + + public double internalCounter = 0; + public int explosionRadius; + public int explosionDepth; + + public TileShapedExplosive(TileEntityType type, int explosionRadius, int explosionDepth) + { + super(type); + this.explosionRadius = explosionRadius; + this.explosionDepth = explosionDepth; + } + + public TileShapedExplosive() + { + this(TYPE, 2, 5); + } + + @Override + public void onUpdate() + { + if (world.isRemote) + { + return; + } +// System.out.println("Counter: " + internalCounter); + + internalCounter++; + if (internalCounter == 20) + { +// worldIn.playSound((PlayerEntity)null, tntentity.getPosX(), tntentity.getPosY(), tntentity.getPosZ(), SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F); + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); + ((ServerWorld) this.world).spawnParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 5, 0.02, 0.03, 0.02, 0); + } + + if (internalCounter == 30) + { + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F); + } + + if (internalCounter < 30) + { + return; + } + + if (world.rand.nextDouble() < 0.3) + { + ((ServerWorld) this.world).spawnParticle(ParticleTypes.SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 0.0D, 0.0D, 0.0D, 0); + } + + if (internalCounter == 100) + { + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 4.0F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F); + + Direction explosiveDirection = this.getBlockState().get(BlockShapedExplosive.ATTACHED).getOpposite(); + Direction sweepDir1 = Direction.UP; + Direction sweepDir2 = Direction.UP; + + int numParticles = explosionDepth * (explosionRadius + 1); + + ((ServerWorld) this.world).spawnParticle(ParticleTypes.EXPLOSION, pos.getX() + 0.5 + explosiveDirection.getXOffset() * explosionDepth / 2d, pos.getY() + 0.5 + explosiveDirection.getYOffset() * explosionDepth / 2d, pos.getZ() + 0.5 + explosiveDirection.getZOffset() * explosionDepth / 2d, numParticles, 1.0D, 1.0D, 1.0D, 0); + + switch (explosiveDirection) + { + case UP: + case DOWN: + sweepDir1 = Direction.NORTH; + sweepDir2 = Direction.EAST; + break; + case EAST: + case WEST: + sweepDir1 = Direction.NORTH; + sweepDir2 = Direction.UP; + break; + case NORTH: + case SOUTH: + sweepDir1 = Direction.EAST; + sweepDir2 = Direction.UP; + break; + } + + ItemStack toolStack = this.getHarvestingTool(); + + ObjectArrayList> objectarraylist = new ObjectArrayList<>(); + + BlockPos initialPos = getPos(); + for (int i = 1; i <= explosionDepth; i++) + { + for (int j = -explosionRadius; j <= explosionRadius; j++) + { + for (int k = -explosionRadius; k <= explosionRadius; k++) + { + BlockPos blockpos = initialPos.offset(explosiveDirection, i).offset(sweepDir1, j).offset(sweepDir2, k); + + BlockState blockstate = this.world.getBlockState(blockpos); + Block block = blockstate.getBlock(); + if (!blockstate.isAir(this.world, blockpos) && blockstate.getBlockHardness(world, blockpos) != -1.0F) + { + BlockPos blockpos1 = blockpos.toImmutable(); +// this.world.getProfiler().startSection("explosion_blocks"); + if (this.world instanceof ServerWorld) + { + TileEntity tileentity = blockstate.hasTileEntity() ? this.world.getTileEntity(blockpos) + : null; + LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld) this.world)).withRandom(this.world.rand).withParameter(LootParameters.field_237457_g_, Vector3d.copyCentered(blockpos)).withParameter(LootParameters.TOOL, toolStack).withNullableParameter(LootParameters.BLOCK_ENTITY, tileentity); +// if (this.mode == Explosion.Mode.DESTROY) { +// lootcontext$builder.withParameter(LootParameters.EXPLOSION_RADIUS, this.size); +// } + + blockstate.getDrops(lootcontext$builder).forEach((stack) -> { + handleExplosionDrops(objectarraylist, stack, blockpos1); + }); + + world.setBlockState(blockpos, Blocks.AIR.getDefaultState(), 3); + +// blockstate.onBlockExploded(this.world, blockpos, null); +// this.world.getProfiler().endSection(); + } + } + } + } + } + + for (Pair pair : objectarraylist) + { + Block.spawnAsEntity(this.world, pair.getSecond(), pair.getFirst()); + } + + world.setBlockState(getPos(), Blocks.AIR.getDefaultState()); + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + internalCounter = tag.getDouble("internalCounter"); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + super.serialize(tag); + tag.putDouble("internalCounter", internalCounter); + + return tag; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileSoulForge.java b/src/main/java/wayoftime/bloodmagic/tile/TileSoulForge.java new file mode 100644 index 00000000..76c8aee2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileSoulForge.java @@ -0,0 +1,448 @@ +package wayoftime.bloodmagic.tile; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.IIntArray; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillConduit; +import wayoftime.bloodmagic.api.compat.IDemonWillGem; +import wayoftime.bloodmagic.api.event.BloodMagicCraftedEvent; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.impl.BloodMagicAPI; +import wayoftime.bloodmagic.recipe.RecipeTartaricForge; +import wayoftime.bloodmagic.tile.container.ContainerSoulForge; +import wayoftime.bloodmagic.util.Constants; + +public class TileSoulForge extends TileInventory implements ITickableTileEntity, INamedContainerProvider, IDemonWillConduit +{ + @ObjectHolder("bloodmagic:soulforge") + public static TileEntityType TYPE; + + public static final int ticksRequired = 100; + public static final double worldWillTransferRate = 1; + + public static final int soulSlot = 4; + public static final int outputSlot = 5; + + // Input slots are from 0 to 3. + + public int burnTime = 0; + + public TileSoulForge(TileEntityType type) + { + super(type, 6, "soulforge"); + } + + public TileSoulForge() + { + this(TYPE); + } + + @Override + public void deserialize(CompoundNBT tag) + { + super.deserialize(tag); + + burnTime = tag.getInt(Constants.NBT.SOUL_FORGE_BURN); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + super.serialize(tag); + + tag.putInt(Constants.NBT.SOUL_FORGE_BURN, burnTime); + return tag; + } + + public final IIntArray TileData = new IIntArray() + { + @Override + public int get(int index) + { + switch (index) + { + case 0: + return burnTime; + case 1: + return ticksRequired; + case 2: + return 0; + default: + throw new IllegalArgumentException("Invalid index: " + index); + } + } + + @Override + public void set(int index, int value) + { + throw new IllegalStateException("Cannot set values through IIntArray"); + } + + @Override + public int size() + { + return 3; + } + }; + + @Override + public void tick() + { + if (!hasSoulGemOrSoul()) + { + burnTime = 0; + return; + } + + if (!getWorld().isRemote) + { + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + double willInWorld = WorldDemonWillHandler.getCurrentWill(getWorld(), pos, type); + double filled = Math.min(willInWorld, worldWillTransferRate); + + if (filled > 0) + { + filled = this.fillDemonWill(type, filled, false); + filled = WorldDemonWillHandler.drainWill(getWorld(), pos, type, filled, false); + + if (filled > 0) + { + this.fillDemonWill(type, filled, true); + WorldDemonWillHandler.drainWill(getWorld(), pos, type, filled, true); + } + } + } + } + + double soulsInGem = getWill(EnumDemonWillType.DEFAULT); + + List inputList = new ArrayList<>(); + + for (int i = 0; i < 4; i++) if (!getStackInSlot(i).isEmpty()) + inputList.add(getStackInSlot(i)); + + RecipeTartaricForge recipe = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getTartaricForge(world, inputList); + if (recipe != null && (soulsInGem >= recipe.getMinimumSouls() || burnTime > 0)) + { + if (canCraft(recipe)) + { + burnTime++; + + if (burnTime == ticksRequired) + { + if (!getWorld().isRemote) + { + double requiredSouls = recipe.getSoulDrain(); + if (requiredSouls > 0) + { + if (!getWorld().isRemote && soulsInGem >= recipe.getMinimumSouls()) + { + consumeSouls(EnumDemonWillType.DEFAULT, requiredSouls); + } + } + + if (!getWorld().isRemote && soulsInGem >= recipe.getMinimumSouls()) + craftItem(recipe); + } + + burnTime = 0; + } else if (burnTime > ticksRequired + 10) + { + burnTime = 0; + } + } else + { + burnTime = 0; + } + } else + { + burnTime = 0; + } + } + + private boolean canCraft(RecipeTartaricForge recipe) + { + if (recipe == null) + return false; + + ItemStack currentOutputStack = getStackInSlot(outputSlot); + if (recipe.getOutput().isEmpty()) + return false; + if (currentOutputStack.isEmpty()) + return true; + if (!currentOutputStack.isItemEqual(recipe.getOutput())) + return false; + int result = currentOutputStack.getCount() + recipe.getOutput().getCount(); + return result <= getInventoryStackLimit() && result <= currentOutputStack.getMaxStackSize(); + + } + + public void craftItem(RecipeTartaricForge recipe) + { + if (this.canCraft(recipe)) + { + ItemStack currentOutputStack = getStackInSlot(outputSlot); + + List inputList = new ArrayList<>(); + for (int i = 0; i < 4; i++) if (!getStackInSlot(i).isEmpty()) + inputList.add(getStackInSlot(i).copy()); + + BloodMagicCraftedEvent.SoulForge event = new BloodMagicCraftedEvent.SoulForge(recipe.getOutput().copy(), inputList.toArray(new ItemStack[0])); + MinecraftForge.EVENT_BUS.post(event); + + if (currentOutputStack.isEmpty()) + { + setInventorySlotContents(outputSlot, event.getOutput()); + } else if (ItemHandlerHelper.canItemStacksStack(currentOutputStack, event.getOutput())) + { + currentOutputStack.grow(event.getOutput().getCount()); + } + + moveRemainingWillInConsumedInv(); + + consumeInventory(); + } + } + + @Override + public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) + { + assert world != null; + return new ContainerSoulForge(this, TileData, p_createMenu_1_, p_createMenu_2_); + } + + @Override + public ITextComponent getDisplayName() + { + return new StringTextComponent("Hellfire Forge"); + } + + public boolean hasSoulGemOrSoul() + { + for (int i = 0; i <= 4; i++) + { + ItemStack soulStack = getStackInSlot(i); + + if (!soulStack.isEmpty()) + { + if (soulStack.getItem() instanceof IDemonWill || soulStack.getItem() instanceof IDemonWillGem) + { + return true; + } + } + } + + return false; + } + + public double getProgressForGui() + { + return ((double) burnTime) / ticksRequired; + } + + public double getWill(EnumDemonWillType type) + { + double will = 0; + for (int i = 0; i <= 4; i++) + { + ItemStack soulStack = getStackInSlot(i); + + if (soulStack != null) + { + if (soulStack.getItem() instanceof IDemonWill && ((IDemonWill) soulStack.getItem()).getType(soulStack) == type) + { + IDemonWill soul = (IDemonWill) soulStack.getItem(); + will += soul.getWill(type, soulStack); + } + + if (soulStack.getItem() instanceof IDemonWillGem) + { + IDemonWillGem soul = (IDemonWillGem) soulStack.getItem(); + will += soul.getWill(type, soulStack); + } + } + } + + return will; + } + + public void moveRemainingWillInConsumedInv() + { + ItemStack outputStack = getStackInSlot(outputSlot); + if (outputStack != null) + { + if (outputStack.getItem() instanceof IDemonWillGem) + { + IDemonWillGem filledGem = (IDemonWillGem) outputStack.getItem(); + for (int i = 0; i < 4; i++) + { + ItemStack soulStack = getStackInSlot(i); + if (soulStack != null && soulStack.getItem() instanceof IDemonWillGem) + { + IDemonWillGem syphonedGem = (IDemonWillGem) soulStack.getItem(); + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + // Skipped a few possibly redundant checks. Also could blow up in my face rooVV + double willInGem = syphonedGem.getWill(type, soulStack); + if (willInGem > 0) + { + filledGem.fillWill(type, outputStack, willInGem, true); + } + } + } + + } + } + } + } + + public double consumeSouls(EnumDemonWillType type, double requested) + { + double consumed = 0; + + for (int i = 0; i <= 4; i++) + { + ItemStack soulStack = getStackInSlot(i); + if (soulStack != null) + { + if (soulStack.getItem() instanceof IDemonWill && ((IDemonWill) soulStack.getItem()).getType(soulStack) == type) + { + IDemonWill soul = (IDemonWill) soulStack.getItem(); + double souls = soul.drainWill(type, soulStack, requested - consumed); + if (soul.getWill(type, soulStack) <= 0) + { + setInventorySlotContents(i, ItemStack.EMPTY); + } + consumed += souls; +// return souls; + } + + if (soulStack.getItem() instanceof IDemonWillGem) + { + IDemonWillGem soul = (IDemonWillGem) soulStack.getItem(); + double souls = soul.drainWill(type, soulStack, requested - consumed, true); + consumed += souls; + } + } + + if (consumed >= requested) + { + return consumed; + } + } + + return consumed; + } + + public void consumeInventory() + { + for (int i = 0; i < 4; i++) + { + ItemStack inputStack = getStackInSlot(i); + if (!inputStack.isEmpty()) + { + if (inputStack.getItem().hasContainerItem(inputStack)) + { + setInventorySlotContents(i, inputStack.getItem().getContainerItem(inputStack)); + continue; + } + + inputStack.shrink(1); + if (inputStack.isEmpty()) + { + setInventorySlotContents(i, ItemStack.EMPTY); + } + } + } + } + + @Override + public int getWeight() + { + return 50; + } + + @Override + public double fillDemonWill(EnumDemonWillType type, double amount, boolean doFill) + { + if (amount <= 0) + { + return 0; + } + + if (!canFill(type)) + { + return 0; + } + + ItemStack stack = this.getStackInSlot(soulSlot); + if (stack.isEmpty() || !(stack.getItem() instanceof IDemonWillGem)) + { + return 0; + } + + IDemonWillGem willGem = (IDemonWillGem) stack.getItem(); + return willGem.fillWill(type, stack, amount, doFill); + } + + @Override + public double drainDemonWill(EnumDemonWillType type, double amount, boolean doDrain) + { + ItemStack stack = this.getStackInSlot(soulSlot); + if (stack.isEmpty() || !(stack.getItem() instanceof IDemonWillGem)) + { + return 0; + } + + IDemonWillGem willGem = (IDemonWillGem) stack.getItem(); + + double drained = amount; + double current = willGem.getWill(type, stack); + if (current < drained) + { + drained = current; + } + + if (doDrain) + { + drained = willGem.drainWill(type, stack, drained, true); + } + + return drained; + } + + @Override + public boolean canFill(EnumDemonWillType type) + { + return true; + } + + @Override + public boolean canDrain(EnumDemonWillType type) + { + return true; + } + + @Override + public double getCurrentWill(EnumDemonWillType type) + { + return 0; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/TileVeinMineCharge.java b/src/main/java/wayoftime/bloodmagic/tile/TileVeinMineCharge.java new file mode 100644 index 00000000..60222fb0 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/TileVeinMineCharge.java @@ -0,0 +1,285 @@ +package wayoftime.bloodmagic.tile; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.mojang.datafixers.util.Pair; + +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.LootContext; +import net.minecraft.loot.LootParameters; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.math.vector.Vector3i; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.registries.ObjectHolder; +import wayoftime.bloodmagic.common.block.BlockShapedExplosive; + +public class TileVeinMineCharge extends TileExplosiveCharge +{ + @ObjectHolder("bloodmagic:veinmine_charge") + public static TileEntityType TYPE; + + private Map veinPartsMap; + private List veinPartsCache; + private boolean finishedAnalysis; + + private Vector3i[] diagonals = new Vector3i[] { new Vector3i(0, 1, 1), new Vector3i(0, 1, -1), + new Vector3i(0, -1, 1), new Vector3i(0, -1, -1), new Vector3i(1, 0, 1), new Vector3i(-1, 0, 1), + new Vector3i(1, 0, -1), new Vector3i(-1, 0, -1), new Vector3i(1, 1, 0), new Vector3i(-1, 1, 0), + new Vector3i(1, -1, 0), new Vector3i(-1, -1, 0) }; + + public double internalCounter = 0; + + public int currentBlocks = 0; + + public int maxBlocks = 128; + + public TileVeinMineCharge(TileEntityType type, int maxBlocks) + { + super(type); + + this.maxBlocks = maxBlocks; + } + + public TileVeinMineCharge() + { + this(TYPE, 64 * 3); + } + + @Override + public void onUpdate() + { + if (world.isRemote) + { + return; + } +// System.out.println("Counter: " + internalCounter); + + Direction explosiveDirection = this.getBlockState().get(BlockShapedExplosive.ATTACHED).getOpposite(); + BlockState attachedState = world.getBlockState(pos.offset(explosiveDirection)); + Block attachedBlock = attachedState.getBlock(); + if (!isValidStartingBlock(attachedState)) + { + return; + } +// if (!BlockTags.LOGS.contains(attachedState.getBlock()) && !BlockTags.LEAVES.contains(attachedState.getBlock())) +// { +// return; +// } + + if (veinPartsMap == null) + { + veinPartsMap = new HashMap(); + veinPartsMap.put(pos.offset(explosiveDirection), false); + veinPartsCache = new LinkedList(); + veinPartsCache.add(pos.offset(explosiveDirection)); + internalCounter = 0; +// veinPartsMap.add(pos.offset(explosiveDirection)); + } + + boolean foundNew = false; + List newPositions = new LinkedList(); + for (BlockPos currentPos : veinPartsCache) + { + if (!veinPartsMap.getOrDefault(currentPos, false)) // If the BlockPos wasn't checked yet + { +// BlockPos currentPos = entry.getKey(); + for (Direction dir : Direction.values()) + { + BlockPos checkPos = currentPos.offset(dir); + if (veinPartsMap.containsKey(checkPos)) + { + continue; + } + + BlockState checkState = world.getBlockState(checkPos); + + boolean isTree = false; + if (currentBlocks >= maxBlocks) + { + continue; + } + if (isValidBlock(attachedState, checkState)) + { + currentBlocks++; + isTree = true; + + } + + if (isTree) + { + veinPartsMap.put(checkPos, false); + newPositions.add(checkPos); + foundNew = true; + } + } + + if (this.checkDiagonals()) + { + for (Vector3i vec : this.diagonals) + { + BlockPos checkPos = currentPos.add(vec); + if (veinPartsMap.containsKey(checkPos)) + { + continue; + } + + BlockState checkState = world.getBlockState(checkPos); + + boolean isTree = false; + if (currentBlocks >= maxBlocks) + { + continue; + } + if (isValidBlock(attachedState, checkState)) + { + currentBlocks++; + isTree = true; + + } + + if (isTree) + { + veinPartsMap.put(checkPos, false); + newPositions.add(checkPos); + foundNew = true; + } + } + } + + veinPartsMap.put(currentPos, true); + if (currentBlocks >= maxBlocks) + { + finishedAnalysis = true; + break; + } + } + } + + veinPartsCache.addAll(newPositions); + +// System.out.println("Found blocks: " + veinPartsMap.size()); + + if (foundNew) + { + return; + } + + internalCounter++; + if (internalCounter == 20) + { +// worldIn.playSound((PlayerEntity)null, tntentity.getPosX(), tntentity.getPosY(), tntentity.getPosZ(), SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F); + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); + ((ServerWorld) this.world).spawnParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 5, 0.02, 0.03, 0.02, 0); + } + + if (internalCounter == 30) + { + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F); + } + + if (internalCounter < 30) + { + return; + } + + if (world.rand.nextDouble() < 0.3) + { + ((ServerWorld) this.world).spawnParticle(ParticleTypes.SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 0.0D, 0.0D, 0.0D, 0); + } + + if (internalCounter == 100) + { + ItemStack toolStack = this.getHarvestingTool(); + world.playSound((PlayerEntity) null, this.getPos().getX() + 0.5, this.getPos().getY() + 0.5, this.getPos().getZ() + 0.5, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 4.0F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F); + + int numParticles = 10; + + ((ServerWorld) this.world).spawnParticle(ParticleTypes.EXPLOSION, pos.getX() + 0.5 + explosiveDirection.getXOffset(), pos.getY() + 0.5 + explosiveDirection.getYOffset(), pos.getZ() + 0.5 + explosiveDirection.getZOffset(), numParticles, 1.0D, 1.0D, 1.0D, 0); + + ObjectArrayList> objectarraylist = new ObjectArrayList<>(); + + for (BlockPos blockPos : veinPartsCache) + { +// BlockPos blockpos = initialPos.offset(explosiveDirection, i).offset(sweepDir1, j).offset(sweepDir2, k); + + BlockState blockstate = this.world.getBlockState(blockPos); + Block block = blockstate.getBlock(); + if (!blockstate.isAir(this.world, blockPos)) + { + BlockPos blockpos1 = blockPos.toImmutable(); +// this.world.getProfiler().startSection("explosion_blocks"); + if (this.world instanceof ServerWorld) + { + TileEntity tileentity = blockstate.hasTileEntity() ? this.world.getTileEntity(blockPos) : null; + LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld) this.world)).withRandom(this.world.rand).withParameter(LootParameters.field_237457_g_, Vector3d.copyCentered(blockPos)).withParameter(LootParameters.TOOL, toolStack).withNullableParameter(LootParameters.BLOCK_ENTITY, tileentity); +// if (this.mode == Explosion.Mode.DESTROY) { +// lootcontext$builder.withParameter(LootParameters.EXPLOSION_RADIUS, this.size); +// } + + blockstate.getDrops(lootcontext$builder).forEach((stack) -> { + handleExplosionDrops(objectarraylist, stack, blockpos1); + }); + + world.setBlockState(blockPos, Blocks.AIR.getDefaultState(), 3); + +// blockstate.onBlockExploded(this.world, blockpos, null); +// this.world.getProfiler().endSection(); + } + } + } + + for (Pair pair : objectarraylist) + { + Block.spawnAsEntity(this.world, pair.getSecond(), pair.getFirst()); + } + + world.setBlockState(getPos(), Blocks.AIR.getDefaultState()); + } + } + + @Override + public void deserialize(CompoundNBT tag) + { + internalCounter = tag.getDouble("internalCounter"); + maxBlocks = tag.getInt("maxBlocks"); + } + + @Override + public CompoundNBT serialize(CompoundNBT tag) + { + tag.putDouble("internalCounter", internalCounter); + tag.putInt("maxBlocks", maxBlocks); + return tag; + } + + public boolean isValidBlock(BlockState originalBlockState, BlockState testState) + { + return originalBlockState.getBlock() == testState.getBlock(); + } + + public boolean isValidStartingBlock(BlockState originalBlockState) + { + return true; + } + + public boolean checkDiagonals() + { + return true; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/tile/base/TileBase.java b/src/main/java/wayoftime/bloodmagic/tile/base/TileBase.java new file mode 100644 index 00000000..6e7171db --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/base/TileBase.java @@ -0,0 +1,138 @@ +package wayoftime.bloodmagic.tile.base; + +import net.minecraft.block.BlockState; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.SUpdateTileEntityPacket; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +/** + * Base tile class. + *

+ * Handles data syncing and core data writing/reading. + */ +public abstract class TileBase extends TileEntity +{ + public TileBase(TileEntityType type) + { + super(type); + } + + /** + * read method + */ + @Override + public final void read(BlockState state, CompoundNBT compound) + { + super.read(state, compound); + deserializeBase(compound); + deserialize(compound); + } + + @Override + public final CompoundNBT write(CompoundNBT compound) + { + super.write(compound); + serializeBase(compound); + return serialize(compound); + } + + /** + * Called by {@link #func_230337_a_(BlockState, CompoundNBT)} + *

+ * Internal data (such as coordinates) are handled for you. Just read the data + * you need. + * + * @param tagCompound - The tag compound to read from + */ + public void deserialize(CompoundNBT tagCompound) + { + + } + + /** + * Package private method for reading base data from the tag compound. + * + * @param tagCompound - The tag compound to read from + * @see TileTicking + */ + void deserializeBase(CompoundNBT tagCompound) + { + + } + + /** + * Called by {@link #writeToNBT(CompoundNBT)} + *

+ * Internal data (such as coordinates) are handled for you. Just read the data + * you need. + * + * @param tagCompound - The tag compound to write to. + * @return the modified tag compound + */ + public CompoundNBT serialize(CompoundNBT tagCompound) + { + return tagCompound; + } + + /** + * Package private method for writing base data to the tag compound. + * + * @param tagCompound - The tag compound to write to. + * @return the modified tag compound + * @see TileTicking + */ + CompoundNBT serializeBase(CompoundNBT tagCompound) + { + return tagCompound; + } + + public void notifyUpdate() + { + BlockState state = getWorld().getBlockState(getPos()); + getWorld().notifyBlockUpdate(getPos(), state, state, 3); + } + +// // Data syncing +// +// @Override +// public boolean shouldRefresh(World world, BlockPos pos, BlockState oldState, BlockState newState) +// { +// return oldState.getBlock() != newState.getBlock(); +// } + + @Override + public SUpdateTileEntityPacket getUpdatePacket() + { + return new SUpdateTileEntityPacket(getPos(), -999, getUpdateTag()); + } + +// @Override +// public void handleUpdateTag(BlockState state, CompoundNBT tag) +// { +// read(state, tag); +// } + + @Override + @OnlyIn(Dist.CLIENT) + public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) + { + super.onDataPacket(net, pkt); + handleUpdateTag(getBlockState(), pkt.getNbtCompound()); + } + + @Override + public CompoundNBT getUpdateTag() + { + return write(new CompoundNBT()); + } + + @Override + public void handleUpdateTag(BlockState state, CompoundNBT tag) + { + read(state, tag); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/base/TileTicking.java b/src/main/java/wayoftime/bloodmagic/tile/base/TileTicking.java new file mode 100644 index 00000000..ffc70ebc --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/base/TileTicking.java @@ -0,0 +1,71 @@ +package wayoftime.bloodmagic.tile.base; + +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; + +/** + * Base class for tiles that tick. Allows disabling the ticking + * programmatically. + */ +// TODO - Move implementations that depend on existed ticks to new methods from here. +public abstract class TileTicking extends TileBase implements ITickableTileEntity +{ + private int ticksExisted; + private boolean shouldTick = true; + + public TileTicking(TileEntityType type) + { + super(type); + } + + @Override + public final void tick() + { + if (shouldTick()) + { + ticksExisted++; + onUpdate(); + } + } + + @Override + void deserializeBase(CompoundNBT tagCompound) + { + this.ticksExisted = tagCompound.getInt("ticksExisted"); + this.shouldTick = tagCompound.getBoolean("shouldTick"); + } + + @Override + CompoundNBT serializeBase(CompoundNBT tagCompound) + { + tagCompound.putInt("ticksExisted", getTicksExisted()); + tagCompound.putBoolean("shouldTick", shouldTick()); + return tagCompound; + } + + /** + * Called every tick that {@link #shouldTick()} is true. + */ + public abstract void onUpdate(); + + public int getTicksExisted() + { + return ticksExisted; + } + + public void resetLifetime() + { + ticksExisted = 0; + } + + public boolean shouldTick() + { + return shouldTick; + } + + public void setShouldTick(boolean shouldTick) + { + this.shouldTick = shouldTick; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/container/ContainerAlchemicalReactionChamber.java b/src/main/java/wayoftime/bloodmagic/tile/container/ContainerAlchemicalReactionChamber.java new file mode 100644 index 00000000..75dd0583 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/container/ContainerAlchemicalReactionChamber.java @@ -0,0 +1,198 @@ +package wayoftime.bloodmagic.tile.container; + +import java.util.Optional; + +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidUtil; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.tags.BloodMagicTags; +import wayoftime.bloodmagic.tile.TileAlchemicalReactionChamber; + +public class ContainerAlchemicalReactionChamber extends Container +{ + public final TileAlchemicalReactionChamber tileARC; + +// public ContainerSoulForge(InventoryPlayer inventoryPlayer, IInventory tileARC) +// { +// this.tileARC = tileARC; +// +// } + + public ContainerAlchemicalReactionChamber(int windowId, PlayerInventory playerInventory, PacketBuffer extraData) + { + this((TileAlchemicalReactionChamber) playerInventory.player.world.getTileEntity(extraData.readBlockPos()), windowId, playerInventory); + } + + public ContainerAlchemicalReactionChamber(@Nullable TileAlchemicalReactionChamber tile, int windowId, PlayerInventory playerInventory) + { + super(BloodMagicBlocks.ARC_CONTAINER.get(), windowId); + this.tileARC = tile; + this.setup(playerInventory, tile); + } + + public void setup(PlayerInventory inventory, IInventory tileARC) + { + this.addSlot(new SlotARCTool(tileARC, TileAlchemicalReactionChamber.ARC_TOOL_SLOT, 35, 51)); + for (int i = 0; i < TileAlchemicalReactionChamber.NUM_OUTPUTS; i++) + { + this.addSlot(new SlotOutput(tileARC, TileAlchemicalReactionChamber.OUTPUT_SLOT + i, 116, 15 + i * 18)); + } + this.addSlot(new Slot(tileARC, TileAlchemicalReactionChamber.INPUT_SLOT, 71, 15)); + this.addSlot(new SlotBucket(tileARC, TileAlchemicalReactionChamber.INPUT_BUCKET_SLOT, 8, 15, true)); + this.addSlot(new SlotBucket(tileARC, TileAlchemicalReactionChamber.OUTPUT_BUCKET_SLOT, 152, 87, false)); + +// this.addSlot(new SlotSoul(tileARC, TileSoulForge.soulSlot, 152, 51)); + + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 9; j++) + { + addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 123 + i * 18)); + } + } + + for (int i = 0; i < 9; i++) + { + addSlot(new Slot(inventory, i, 8 + i * 18, 181)); + } + } + + @Override + public ItemStack transferStackInSlot(PlayerEntity playerIn, int index) + { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if ((index >= 1 && index < 1 + 5) || (index == 7 || index == 8))// Attempting to transfer from output slots + // or bucket slots + { + if (!this.mergeItemStack(itemstack1, 9, 9 + 36, true)) + { + return ItemStack.EMPTY; + } + + slot.onSlotChange(itemstack1, itemstack); + } else if (index > 9) // Attempting to transfer from main inventory + { + if (itemstack1.getItem().isIn(BloodMagicTags.ARC_TOOL)) // Try the tool slot first + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return ItemStack.EMPTY; + } + } else if (isBucket(itemstack1, true)) // If it's a full bucket, transfer to tank filler slot. + { + if (!this.mergeItemStack(itemstack1, 7, 8, false)) + { + return ItemStack.EMPTY; + } + } else if (isBucket(itemstack1, false)) // If it's an empty bucket, transfer to tank emptier slot. + { + if (!this.mergeItemStack(itemstack1, 8, 9, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(itemstack1, 6, 7, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(itemstack1, 9, 45, false)) // Attempting to transfer from input slots + { + return ItemStack.EMPTY; + } + + if (itemstack1.getCount() == 0) + { + slot.putStack(ItemStack.EMPTY); + } else + { + slot.onSlotChanged(); + } + + if (itemstack1.getCount() == itemstack.getCount()) + { + return ItemStack.EMPTY; + } + + slot.onTake(playerIn, itemstack1); + } + + return itemstack; + } + + @Override + public boolean canInteractWith(PlayerEntity playerIn) + { + return this.tileARC.isUsableByPlayer(playerIn); + } + + private class SlotARCTool extends Slot + { + public SlotARCTool(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack itemStack) + { + return itemStack.getItem().isIn(BloodMagicTags.ARC_TOOL); + } + } + + private class SlotBucket extends Slot + { + private final boolean needsFullBucket; + + public SlotBucket(IInventory inventory, int slotIndex, int x, int y, boolean needsFullBucket) + { + super(inventory, slotIndex, x, y); + this.needsFullBucket = needsFullBucket; + } + + @Override + public boolean isItemValid(ItemStack itemStack) + { + Optional fluidStackOptional = FluidUtil.getFluidContained(itemStack); + + return fluidStackOptional.isPresent() && ((needsFullBucket && !fluidStackOptional.get().isEmpty()) + || (!needsFullBucket && fluidStackOptional.get().isEmpty())); + } + } + + private static boolean isBucket(ItemStack stack, boolean requiredFull) + { + Optional fluidStackOptional = FluidUtil.getFluidContained(stack); + + return fluidStackOptional.isPresent() && ((requiredFull && !fluidStackOptional.get().isEmpty()) + || (!requiredFull && fluidStackOptional.get().isEmpty())); + } + + private class SlotOutput extends Slot + { + public SlotOutput(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack stack) + { + return false; + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/container/ContainerAlchemyTable.java b/src/main/java/wayoftime/bloodmagic/tile/container/ContainerAlchemyTable.java new file mode 100644 index 00000000..ab509370 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/container/ContainerAlchemyTable.java @@ -0,0 +1,176 @@ +package wayoftime.bloodmagic.tile.container; + +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.container.ClickType; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.IBloodOrb; +import wayoftime.bloodmagic.tile.TileAlchemyTable; + +public class ContainerAlchemyTable extends Container +{ + public final TileAlchemyTable tileTable; + +// public ContainerSoulForge(InventoryPlayer inventoryPlayer, IInventory tileForge) +// { +// this.tileForge = tileForge; +// +// } + + public ContainerAlchemyTable(int windowId, PlayerInventory playerInventory, PacketBuffer extraData) + { + this((TileAlchemyTable) playerInventory.player.world.getTileEntity(extraData.readBlockPos()), windowId, playerInventory); + } + + public ContainerAlchemyTable(@Nullable TileAlchemyTable tile, int windowId, PlayerInventory playerInventory) + { + super(BloodMagicBlocks.ALCHEMY_TABLE_CONTAINER.get(), windowId); + this.tileTable = tile; + this.setup(playerInventory, tile); + } + + public void setup(PlayerInventory inventory, IInventory tileForge) + { + this.addSlot(new Slot(tileTable, 0, 62, 15)); + this.addSlot(new Slot(tileTable, 1, 80, 51)); + this.addSlot(new Slot(tileTable, 2, 62, 87)); + this.addSlot(new Slot(tileTable, 3, 26, 87)); + this.addSlot(new Slot(tileTable, 4, 8, 51)); + this.addSlot(new Slot(tileTable, 5, 26, 15)); + this.addSlot(new SlotOrb(tileTable, TileAlchemyTable.orbSlot, 143, 24)); + this.addSlot(new SlotOutput(tileTable, TileAlchemyTable.outputSlot, 44, 51)); + + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 9; j++) + { + addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 123 + i * 18)); + } + } + + for (int i = 0; i < 9; i++) + { + addSlot(new Slot(inventory, i, 8 + i * 18, 181)); + } + } + + @Override + public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) + { + PlayerInventory inventoryPlayer = player.inventory; + + if (slotId <= TileAlchemyTable.outputSlot && slotId >= 0) + { + Slot slot = this.getSlot(slotId); + if (!slot.getHasStack() && inventoryPlayer.getItemStack().isEmpty()) + { +// ((TileAlchemyTable) tileTable).toggleInputSlotAccessible(slotId); + if (tileTable.activeSlot == slotId) + { + tileTable.activeSlot = -1; + } else + { + tileTable.activeSlot = slotId; + } + } + } + + return super.slotClick(slotId, dragType, clickTypeIn, player); + } + + @Override + public ItemStack transferStackInSlot(PlayerEntity playerIn, int index) + { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (index == 7) + { + if (!this.mergeItemStack(itemstack1, 8, 8 + 36, true)) + { + return ItemStack.EMPTY; + } + + slot.onSlotChange(itemstack1, itemstack); + } else if (index > 7) + { + if (itemstack1.getItem() instanceof IBloodOrb) + { + if (!this.mergeItemStack(itemstack1, 6, 7, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(itemstack1, 0, 6, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(itemstack1, 8, 8 + 36, false)) + { + return ItemStack.EMPTY; + } + + if (itemstack1.getCount() == 0) + { + slot.putStack(ItemStack.EMPTY); + } else + { + slot.onSlotChanged(); + } + + if (itemstack1.getCount() == itemstack.getCount()) + { + return ItemStack.EMPTY; + } + + slot.onTake(playerIn, itemstack1); + } + + return itemstack; + } + + @Override + public boolean canInteractWith(PlayerEntity playerIn) + { + return this.tileTable.isUsableByPlayer(playerIn); + } + + private class SlotOrb extends Slot + { + public SlotOrb(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack itemStack) + { + return itemStack.getItem() instanceof IBloodOrb; + } + } + + private class SlotOutput extends Slot + { + public SlotOutput(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack stack) + { + return false; + } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/tile/container/ContainerSoulForge.java b/src/main/java/wayoftime/bloodmagic/tile/container/ContainerSoulForge.java new file mode 100644 index 00000000..9dd10330 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/tile/container/ContainerSoulForge.java @@ -0,0 +1,154 @@ +package wayoftime.bloodmagic.tile.container; + +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.IIntArray; +import net.minecraft.util.IntArray; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.tile.TileSoulForge; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillGem; + +public class ContainerSoulForge extends Container +{ + public final IInventory tileForge; + public final IIntArray data; + +// public ContainerSoulForge(InventoryPlayer inventoryPlayer, IInventory tileForge) +// { +// this.tileForge = tileForge; +// +// } + + public ContainerSoulForge(int windowId, PlayerInventory playerInventory, PacketBuffer extraData) + { + this((TileSoulForge) playerInventory.player.world.getTileEntity(extraData.readBlockPos()), new IntArray(5), windowId, playerInventory); + } + + public ContainerSoulForge(@Nullable TileSoulForge tile, IIntArray data, int windowId, PlayerInventory playerInventory) + { + super(BloodMagicBlocks.SOUL_FORGE_CONTAINER.get(), windowId); + this.tileForge = tile; + this.setup(playerInventory, tile); + this.data = data; + } + + public void setup(PlayerInventory inventory, IInventory tileForge) + { + this.addSlot(new Slot(tileForge, 0, 8, 15)); + this.addSlot(new Slot(tileForge, 1, 80, 15)); + this.addSlot(new Slot(tileForge, 2, 8, 87)); + this.addSlot(new Slot(tileForge, 3, 80, 87)); + this.addSlot(new SlotSoul(tileForge, TileSoulForge.soulSlot, 152, 51)); + this.addSlot(new SlotOutput(tileForge, TileSoulForge.outputSlot, 44, 51)); + + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 9; j++) + { + addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 123 + i * 18)); + } + } + + for (int i = 0; i < 9; i++) + { + addSlot(new Slot(inventory, i, 8 + i * 18, 181)); + } + } + + @Override + public ItemStack transferStackInSlot(PlayerEntity playerIn, int index) + { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (index == 5) + { + if (!this.mergeItemStack(itemstack1, 6, 6 + 36, true)) + { + return ItemStack.EMPTY; + } + + slot.onSlotChange(itemstack1, itemstack); + } else if (index > 5) + { + if (itemstack1.getItem() instanceof IDemonWill || itemstack1.getItem() instanceof IDemonWillGem) + { + if (!this.mergeItemStack(itemstack1, 4, 5, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(itemstack1, 0, 4, false)) + { + return ItemStack.EMPTY; + } + } else if (!this.mergeItemStack(itemstack1, 6, 42, false)) + { + return ItemStack.EMPTY; + } + + if (itemstack1.getCount() == 0) + { + slot.putStack(ItemStack.EMPTY); + } else + { + slot.onSlotChanged(); + } + + if (itemstack1.getCount() == itemstack.getCount()) + { + return ItemStack.EMPTY; + } + + slot.onTake(playerIn, itemstack1); + } + + return itemstack; + } + + @Override + public boolean canInteractWith(PlayerEntity playerIn) + { + return this.tileForge.isUsableByPlayer(playerIn); + } + + private class SlotSoul extends Slot + { + public SlotSoul(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack itemStack) + { + return itemStack.getItem() instanceof IDemonWillGem || itemStack.getItem() instanceof IDemonWill; + } + } + + private class SlotOutput extends Slot + { + public SlotOutput(IInventory inventory, int slotIndex, int x, int y) + { + super(inventory, slotIndex, x, y); + } + + @Override + public boolean isItemValid(ItemStack stack) + { + return false; + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/BMLog.java b/src/main/java/wayoftime/bloodmagic/util/BMLog.java new file mode 100644 index 00000000..c3b164a5 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/BMLog.java @@ -0,0 +1,79 @@ +package wayoftime.bloodmagic.util; + +import org.apache.commons.lang3.text.WordUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import wayoftime.bloodmagic.BloodMagic; + +public enum BMLog +{ + + DEFAULT(BloodMagic.MODID) + { + @Override + boolean enabled() + { + return true; + } + }, + DEBUG() + { + @Override + boolean enabled() + { + return false; +// return ConfigHandler.general.enableDebugLogging; + } + }, + API() + { + @Override + boolean enabled() + { + return false; +// return ConfigHandler.general.enableAPILogging; + } + }, + API_VERBOSE() + { + @Override + boolean enabled() + { + return false; +// return ConfigHandler.general.enableVerboseAPILogging; + } + },; + + private final Logger logger; + + BMLog(String logName) + { + logger = LogManager.getLogger(logName); + } + + BMLog() + { + logger = LogManager.getLogger(BloodMagic.MODID + "|" + WordUtils.capitalizeFully(name().replace("_", " "))); + } + + abstract boolean enabled(); + + public void info(String input, Object... args) + { + if (enabled()) + logger.info(input, args); + } + + public void error(String input, Object... args) + { + if (enabled()) + logger.error(input, args); + } + + public void warn(String input, Object... args) + { + if (enabled()) + logger.warn(input, args); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/BooleanResult.java b/src/main/java/wayoftime/bloodmagic/util/BooleanResult.java new file mode 100644 index 00000000..1bba4aa6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/BooleanResult.java @@ -0,0 +1,28 @@ +package wayoftime.bloodmagic.util; + +public class BooleanResult +{ + private final boolean result; + private final T value; + + private BooleanResult(boolean result, T value) + { + this.result = result; + this.value = value; + } + + public boolean isSuccess() + { + return result; + } + + public T getValue() + { + return value; + } + + public static BooleanResult newResult(boolean success, T value) + { + return new BooleanResult<>(success, value); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/ChatUtil.java b/src/main/java/wayoftime/bloodmagic/util/ChatUtil.java new file mode 100644 index 00000000..1bc22f5b --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/ChatUtil.java @@ -0,0 +1,270 @@ +package wayoftime.bloodmagic.util; + +import java.text.DecimalFormat; +import java.util.function.Supplier; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.NewChatGui; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.Util; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraftforge.fml.network.NetworkEvent.Context; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.util.helper.TextHelper; + +public class ChatUtil +{ + private static final int DELETION_ID = 2525277; + private static int lastAdded; + public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###,###.##"); + + private static void sendNoSpamMessages(ITextComponent[] messages) + { + NewChatGui chat = Minecraft.getInstance().ingameGUI.getChatGUI(); +// Minecraft.getMinecraft().ingameGUI.getChatGUI(); +// for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++) +// { +// chat. +//// chat.deleteChatLine(i); +// } + for (int i = 0; i < messages.length; i++) + { + chat.printChatMessage(messages[i]); +// chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i); + } + lastAdded = DELETION_ID + messages.length - 1; + } + + /** + * Returns a standard {@link TextComponentString} for the given {@link String} . + * + * @param s The string to wrap. + * @return An {@link ITextComponent} containing the string. + */ + public static ITextComponent wrap(String s) + { + return new StringTextComponent(s); + } + + /** + * @see #wrap(String) + */ + public static ITextComponent[] wrap(String... s) + { + ITextComponent[] ret = new ITextComponent[s.length]; + for (int i = 0; i < ret.length; i++) + { + ret[i] = wrap(s[i]); + } + return ret; + } + + /** + * Returns a translatable chat component for the given string and format args. + * + * @param s The string to format + * @param args The args to apply to the format + */ + public static ITextComponent wrapFormatted(String s, Object... args) + { + return new TranslationTextComponent(s, args); + } + + /** + * Simply sends the passed lines to the player in a chat message. + * + * @param player The player to send the chat to + * @param lines The lines to send + */ + public static void sendChat(PlayerEntity player, String... lines) + { + sendChat(player, wrap(lines)); + } + + /** + * Localizes the lines before sending them. + * + * @see #sendChat(EntityPlayer, String...) + */ + public static void sendChatUnloc(PlayerEntity player, String... unlocLines) + { + sendChat(player, TextHelper.localizeAll(unlocLines)); + } + + /** + * Sends all passed chat components to the player. + * + * @param player The player to send the chat lines to. + * @param lines The {@link ITextComponent chat components} to send.yes + */ + public static void sendChat(PlayerEntity player, ITextComponent... lines) + { + for (ITextComponent c : lines) + { +// BloodMagic.packetHandler.send + player.sendMessage(c, Util.DUMMY_UUID); +// player.sendMessage(c); + } + } + + /** + * Localizes the strings before sending them. + * + * @see #sendNoSpamClient(String...) + */ + public static void sendNoSpamClientUnloc(String... unlocLines) + { + sendNoSpamClient(TextHelper.localizeAll(unlocLines)); + } + + /** + * Same as {@link #sendNoSpamClient(ITextComponent...)}, but wraps the Strings + * automatically. + * + * @param lines The chat lines to send + * @see #wrap(String) + */ + public static void sendNoSpamClient(String... lines) + { + sendNoSpamClient(wrap(lines)); + } + + /** + * Skips the packet sending, unsafe to call on servers. + * + * @see #sendNoSpam(ServerPlayerEntity, ITextComponent...) + */ + public static void sendNoSpamClient(ITextComponent... lines) + { + sendNoSpamMessages(lines); + } + + /** + * Localizes the strings before sending them. + * + * @see #sendNoSpam(EntityPlayer, String...) + */ + public static void sendNoSpamUnloc(PlayerEntity player, String... unlocLines) + { + sendNoSpam(player, TextHelper.localizeAll(unlocLines)); + } + + /** + * @see #wrap(String) + * @see #sendNoSpam(EntityPlayer, ITextComponent...) + */ + public static void sendNoSpam(PlayerEntity player, String... lines) + { + sendNoSpam(player, wrap(lines)); + } + + /** + * First checks if the player is instanceof {@link ServerPlayerEntity} before + * casting. + * + * @see #sendNoSpam(ServerPlayerEntity, ITextComponent...) + */ + public static void sendNoSpam(PlayerEntity player, ITextComponent... lines) + { + if (player instanceof ServerPlayerEntity) + { + sendNoSpam((ServerPlayerEntity) player, lines); + } + } + + /** + * Localizes the strings before sending them. + * + * @see #sendNoSpam(ServerPlayerEntity, String...) + */ + public static void sendNoSpamUnloc(ServerPlayerEntity player, String... unlocLines) + { + sendNoSpam(player, TextHelper.localizeAll(unlocLines)); + } + + /** + * @see #wrap(String) + * @see #sendNoSpam(ServerPlayerEntity, ITextComponent...) + */ + public static void sendNoSpam(ServerPlayerEntity player, String... lines) + { + sendNoSpam(player, wrap(lines)); + } + + /** + * Sends a chat message to the client, deleting past messages also sent via this + * method. + *

+ * Credit to RWTema for the idea + * + * @param player The player to send the chat message to + * @param lines The chat lines to send. + */ + public static void sendNoSpam(ServerPlayerEntity player, ITextComponent... lines) + { + if (lines.length > 0) + BloodMagic.packetHandler.sendTo(new PacketNoSpamChat(lines), player); + } + + /** + * @author tterrag1098 + *

+ * Ripped from EnderCore (and slightly altered) + */ + public static class PacketNoSpamChat + { + private ITextComponent[] chatLines; + + public PacketNoSpamChat() + { + chatLines = new ITextComponent[0]; + } + + private PacketNoSpamChat(ITextComponent... lines) + { + // this is guaranteed to be >1 length by accessing methods + this.chatLines = lines; + } + + public static void encode(PacketNoSpamChat pkt, PacketBuffer buf) + { + buf.writeInt(pkt.chatLines.length); + for (ITextComponent c : pkt.chatLines) + { +// ByteBufUtils.writeUTF8String(buf, ITextComponent.Serializer.componentToJson(c)); + buf.writeString(ITextComponent.Serializer.toJson(c)); + } + } + + public static PacketNoSpamChat decode(PacketBuffer buf) + { + PacketNoSpamChat pkt = new PacketNoSpamChat(new ITextComponent[buf.readInt()]); + for (int i = 0; i < pkt.chatLines.length; i++) + { +// pkt.chatLines[i] = ITextComponent.Serializer.jsonToComponent(ByteBufUtils.readUTF8String(buf)); + pkt.chatLines[i] = ITextComponent.Serializer.getComponentFromJsonLenient(buf.readString()); + } + return pkt; + } + + public static void handle(PacketNoSpamChat message, Supplier context) + { + context.get().enqueueWork(() -> sendNoSpamMessages(message.chatLines)); + context.get().setPacketHandled(true); + } + +// public static class Handler implements IMessageHandler +// { +// @Override +// public IMessage onMessage(final PacketNoSpamChat message, MessageContext ctx) +// { +// Minecraft.getMinecraft().addScheduledTask(() -> sendNoSpamMessages(message.chatLines)); +// return null; +// } +// } + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/Constants.java b/src/main/java/wayoftime/bloodmagic/util/Constants.java new file mode 100644 index 00000000..a264b5dc --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/Constants.java @@ -0,0 +1,186 @@ +package wayoftime.bloodmagic.util; + +import wayoftime.bloodmagic.BloodMagic; + +public class Constants +{ + public static final String SPEED_RUNE = "speed_rune"; + + public static class NBT + { + public static final String OWNER_UUID = "ownerUUID"; + public static final String OWNER_NAME = "ownerNAME"; + public static final String USES = "uses"; + public static final String ACTIVATED = "activated"; + public static final String UNUSABLE = "unusable"; + public static final String SACRIFICE = "sacrifice"; + public static final String DIMENSION_ID = "dimensionId"; + public static final String X_COORD = "xCoord"; + public static final String Y_COORD = "yCoord"; + public static final String Z_COORD = "zCoord"; + public static final String PORTAL_LOCATION = "portalLocation"; + public static final String ORB_TIER = "orbTier"; + public static final String CURRENT_ESSENCE = "currentEssence"; + public static final String CURRENT_RITUAL = "currentRitual"; + public static final String CURRENT_RITUAL_TAG = "currentRitualTag"; + public static final String IS_RUNNING = "isRunning"; + public static final String IS_REDSTONED = "isStoned"; + public static final String RUNTIME = "runtime"; + public static final String DIRECTION = "direction"; + public static final String REAGENT_TANKS = "reagentTanks"; + public static final String CURRENT_INCENSE = "BM:CurrentIncense"; + public static final String MAX_INCENSE = "BM:MaxIncenseFromLastAltar"; + public static final String HAS_MAX_INCENSE = "BM:CurrentIsMaxIncense"; + public static final String CURRENT_PURITY = "BM:CurrentPurity"; + public static final String EMPTY = "Empty"; + public static final String OUTPUT_AMOUNT = "outputAmount"; + public static final String INPUT_AMOUNT = "inputAmount"; + public static final String STORED_LP = "storedLP"; + public static final String RITUAL_READER = "ritualReaderState"; + public static final String ITEMS = "Items"; + public static final String SLOT = "Slot"; + + public static final String ALTAR = "bloodAltar"; + public static final String ALTAR_TIER = "upgradeLevel"; + public static final String ALTAR_ACTIVE = "isActive"; + public static final String ALTAR_LIQUID_REQ = "liquidRequired"; + public static final String ALTAR_FILLABLE = "fillable"; + public static final String ALTAR_UPGRADED = "isUpgraded"; + public static final String ALTAR_CONSUMPTION_RATE = "consumptionRate"; + public static final String ALTAR_DRAIN_RATE = "drainRate"; + public static final String ALTAR_CONSUMPTION_MULTIPLIER = "consumptionMultiplier"; + public static final String ALTAR_EFFICIENCY_MULTIPLIER = "efficiencyMultiplier"; + public static final String ALTAR_SELF_SACRIFICE_MULTIPLIER = "selfSacrificeMultiplier"; + public static final String ALTAR_SACRIFICE_MULTIPLIER = "sacrificeMultiplier"; + public static final String ALTAR_CAPACITY_MULTIPLIER = "capacityMultiplier"; + public static final String ALTAR_ORB_CAPACITY_MULTIPLIER = "orbCapacityMultiplier"; + public static final String ALTAR_DISLOCATION_MULTIPLIER = "dislocationMultiplier"; + public static final String ALTAR_CAPACITY = "capacity"; + public static final String ALTAR_BUFFER_CAPACITY = "bufferCapacity"; + public static final String ALTAR_PROGRESS = "progress"; + public static final String ALTAR_IS_RESULT_BLOCK = "isResultBlock"; + public static final String ALTAR_LOCKDOWN_DURATION = "lockdownDuration"; + public static final String ALTAR_ACCELERATION_UPGRADES = "accelerationUpgrades"; + public static final String ALTAR_DEMON_BLOOD_DURATION = "demonBloodDuration"; + public static final String ALTAR_COOLDOWN_AFTER_CRAFTING = "cooldownAfterCrafting"; + public static final String ALTAR_TOTAL_CHARGE = "totalCharge"; + public static final String ALTAR_MAX_CHARGE = "maxCharge"; + public static final String ALTAR_CHARGE_RATE = "chargeRate"; + public static final String ALTAR_CHARGE_FREQUENCY = "chargeFrequency"; + public static final String ALTAR_CURRENT_TIER_DISPLAYED = "currentTierDisplayed"; + + public static final String ALTARMAKER_CURRENT_TIER = "currentTier"; + + public static final String PROJECTILE_TICKS_IN_AIR = "projectileTicksInAir"; + public static final String PROJECTILE_MAX_TICKS_IN_AIR = "projectileMaxTicksInAir"; + + public static final String TICKS_REMAINING = "ticksRemaining"; + public static final String CONTAINED_BLOCK_NAME = "containedBlockName"; + public static final String CONTAINED_BLOCK_META = "containedBlockMeta"; + public static final String CONTAINED_TILE_ENTITY = "containedTileEntity"; + + public static final String PREVIOUS_INPUT = "previousInput"; + + public static final String LIVING_ARMOUR = "livingArmour"; + + public static final String CHARGE_TIME = "chargeTime"; + public static final String HELD_DOWN = "heldDown"; + + public static final String UPGRADE_POISON_TIMER = "poisonTimer"; + public static final String UPGRADE_FIRE_TIMER = "fireTimer"; + + public static final String SOULS = "souls"; + public static final String SOUL_SWORD_DAMAGE = "soulSwordDamage"; + public static final String SOUL_SWORD_ACTIVE_DRAIN = "soulSwordActiveDrain"; + public static final String SOUL_SWORD_DROP = "soulSwordDrop"; + public static final String SOUL_SWORD_STATIC_DROP = "soulSwordStaticDrop"; + public static final String SOUL_SWORD_HEALTH = "soulSwordHealth"; + public static final String SOUL_SWORD_ATTACK_SPEED = "soulSwordAttackSpeed"; + public static final String SOUL_SWORD_SPEED = "soulSwordSpeed"; + public static final String SOUL_SWORD_DIG_SPEED = "soulSwordDigSpeed"; + public static final String WILL_TYPE = "demonWillType"; + + public static final String SOUL_FORGE_BURN = "burnTime"; + public static final String SOUL_FORGE_CONSUMED = "consumedSouls"; + + public static final String ARC_PROGRESS = "progress"; + + public static final String ROUTING_MASTER = "master"; + public static final String ROUTING_CONNECTION = "connections"; + public static final String ROUTING_PRIORITY = "prioritiesPeople"; + public static final String ROUTING_MASTER_GENERAL = "generalList"; + public static final String ROUTING_MASTER_INPUT = "inputList"; + public static final String ROUTING_MASTER_OUTPUT = "outputList"; + + public static final String GHOST_STACK_SIZE = "stackSize"; + + public static final String ITEM_INVENTORY = "itemInventory"; + + public static final String BLOCKPOS_CONNECTION = "connections"; + + public static final String CURRENT_SIGIL = "currentSigil"; + public static final String MOST_SIG = "mostSig"; + public static final String LEAST_SIG = "leastSig"; + public static final String COLOR = "color"; + + public static final String POTION_AUGMENT_LENGHT = "length:"; + public static final String POTION_AUGMENT_STRENGTH = "strength:"; + public static final String POTION_IMPURITY = "impurity"; + + public static final String TANK = "tank"; + + public static final String BREATH = "breath"; + + public static final String ANOINTMENTS = "anointment_holder"; + } + + public static class JSON + { + public static final String INPUT = "input"; + public static final String TOOL = "tool"; + public static final String BASEINPUT = "baseinput"; + public static final String ADDEDINPUT = "addedinput"; + public static final String ADDEDOUTPUT = "addedoutput"; + public static final String OUTPUT = "output"; + public static final String ITEM = "item"; + public static final String COUNT = "count"; + public static final String NBT = "nbt"; + public static final String TAG = "tag"; + public static final String TYPE = "type"; + public static final String TEXTURE = "texture"; + public static final String CONDITIONS = "conditions"; + public static final String CHANCE = "chance"; + public static final String FLUID = "fluid"; + public static final String AMOUNT = "amount"; + public static final String INPUT_FLUID = "inputfluid"; + public static final String OUTPUT_FLUID = "outputfluid"; + + public static final String SYPHON = "syphon"; + public static final String TICKS = "ticks"; + + public static final String ALTAR_TIER = Constants.NBT.ALTAR_TIER; + public static final String ALTAR_SYPHON = "altarSyphon"; + public static final String ALTAR_CONSUMPTION_RATE = Constants.NBT.ALTAR_CONSUMPTION_RATE; + public static final String ALTAR_DRAIN_RATE = Constants.NBT.ALTAR_DRAIN_RATE; + + public static final String TARTARIC_DRAIN = "drain"; + public static final String TARTARIC_MINIMUM = "minimumDrain"; + } + + public static class Compat + { + public static final String JEI_CATEGORY_ALTAR = "altar"; + public static final String JEI_CATEGORY_BINDING = "binding"; + public static final String JEI_CATEGORY_ALCHEMYARRAY = "alchemyarray"; + public static final String JEI_CATEGORY_SOULFORGE = "soulforge"; + public static final String JEI_CATEGORY_ALCHEMYTABLE = "alchemytable"; + public static final String JEI_CATEGORY_ARMOURDOWNGRADE = "armourdowngrade"; + public static final String JEI_CATEGORY_ARC = "arc"; + + public static final String WAILA_CONFIG_ALTAR = BloodMagic.MODID + ".bloodaltar"; + public static final String WAILA_CONFIG_TELEPOSER = BloodMagic.MODID + ".teleposer"; + public static final String WAILA_CONFIG_RITUAL = BloodMagic.MODID + ".ritualController"; + public static final String WAILA_CONFIG_ARRAY = BloodMagic.MODID + ".array"; + public static final String WAILA_CONFIG_BLOOD_TANK = BloodMagic.MODID + ".bloodTank"; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/DamageSourceBloodMagic.java b/src/main/java/wayoftime/bloodmagic/util/DamageSourceBloodMagic.java new file mode 100644 index 00000000..19ff1231 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/DamageSourceBloodMagic.java @@ -0,0 +1,25 @@ +package wayoftime.bloodmagic.util; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.util.DamageSource; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; + +public class DamageSourceBloodMagic extends DamageSource +{ + public static final DamageSourceBloodMagic INSTANCE = new DamageSourceBloodMagic(); + + public DamageSourceBloodMagic() + { + super("bloodMagic"); + + setDamageBypassesArmor(); + setDamageIsAbsolute(); + } + + @Override + public ITextComponent getDeathMessage(LivingEntity livingBase) + { + return new TranslationTextComponent("chat.bloodmagic.damageSource", livingBase.getName()); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/MultiSlotItemHandler.java b/src/main/java/wayoftime/bloodmagic/util/MultiSlotItemHandler.java new file mode 100644 index 00000000..5125c26f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/MultiSlotItemHandler.java @@ -0,0 +1,295 @@ +package wayoftime.bloodmagic.util; + +import java.util.List; + +import javax.annotation.Nonnull; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; + +public class MultiSlotItemHandler implements IItemHandler +{ + private ItemStack[] items; + + private final int invLimit; + + public MultiSlotItemHandler(int size, int invLimit) + { + items = new ItemStack[size]; + for (int i = 0; i < size; i++) + { + items[i] = ItemStack.EMPTY; + } + + this.invLimit = invLimit; + } + + public MultiSlotItemHandler(ItemStack[] items, int invLimit) + { + this.items = items; + this.invLimit = invLimit; + } + + @Override + public int getSlots() + { + return items.length; + } + + @Override + public ItemStack getStackInSlot(int slot) + { + return items[slot]; + } + + public boolean isItemValid(int slot, ItemStack stack) + { + return true; + } + + public void setInventorySlotContents(int slot, ItemStack stack) + { + items[slot] = stack; + } + + @Override + @Nonnull + public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) + { + if (stack.isEmpty()) + return ItemStack.EMPTY; + + ItemStack stackInSlot = getStackInSlot(slot); + + int m; + if (!stackInSlot.isEmpty()) + { + if (stackInSlot.getCount() >= Math.min(stackInSlot.getMaxStackSize(), getSlotLimit(slot))) + return stack; + + if (!ItemHandlerHelper.canItemStacksStack(stack, stackInSlot)) + return stack; + + if (!isItemValid(slot, stack)) + return stack; + + m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)) - stackInSlot.getCount(); + + if (stack.getCount() <= m) + { + if (!simulate) + { + ItemStack copy = stack.copy(); + copy.grow(stackInSlot.getCount()); + setInventorySlotContents(slot, copy); + } + + return ItemStack.EMPTY; + } else + { + // copy the stack to not modify the original one + stack = stack.copy(); + if (!simulate) + { + ItemStack copy = stack.split(m); + copy.grow(stackInSlot.getCount()); + setInventorySlotContents(slot, copy); + return stack; + } else + { + stack.shrink(m); + return stack; + } + } + } else + { + if (!isItemValid(slot, stack)) + return stack; + + m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)); + if (m < stack.getCount()) + { + // copy the stack to not modify the original one + stack = stack.copy(); + if (!simulate) + { + setInventorySlotContents(slot, stack.split(m)); + return stack; + } else + { + stack.shrink(m); + return stack; + } + } else + { + if (!simulate) + { + setInventorySlotContents(slot, stack); + } + return ItemStack.EMPTY; + } + } + } + + public boolean canTransferAllItemsToSlots(List stackList, boolean simulate) + { + ItemStack[] copyList = new ItemStack[items.length]; + for (int i = 0; i < copyList.length; i++) + { + copyList[i] = items[i].copy(); + } + + boolean hasStashedAll = true; + + for (ItemStack stack : stackList) + { + if (stack.isEmpty()) + { + continue; + } + + slots: for (int slot = 0; slot < copyList.length; slot++) + { + ItemStack stackInSlot = copyList[slot]; + + int m; + if (!stackInSlot.isEmpty()) + { + if (stackInSlot.getCount() >= Math.min(stackInSlot.getMaxStackSize(), getSlotLimit(slot))) + continue; + + if (!ItemHandlerHelper.canItemStacksStack(stack, stackInSlot)) + continue; + + if (!isItemValid(slot, stack)) + continue; + + m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)) - stackInSlot.getCount(); + + if (stack.getCount() <= m) + { + ItemStack copy = stack.copy(); + if (!simulate) + { + copy.grow(stackInSlot.getCount()); + copyList[slot] = copy; + } + stack = ItemStack.EMPTY; + + break slots; + } else + { + // copy the stack to not modify the original one + stack = stack.copy(); + if (!simulate) + { + ItemStack copy = stack.split(m); + copy.grow(stackInSlot.getCount()); + copyList[slot] = copy; + } else + { + stack.shrink(m); + } + } + } else + { + if (!isItemValid(slot, stack)) + continue; + + m = Math.min(stack.getMaxStackSize(), getSlotLimit(slot)); + if (m < stack.getCount()) + { + // copy the stack to not modify the original one + stack = stack.copy(); + if (!simulate) + { + copyList[slot] = stack.split(m); + } else + { + stack.shrink(m); + } + } else + { + if (!simulate) + { + copyList[slot] = stack; + } + + stack = ItemStack.EMPTY; + } + } + } + + if (!stack.isEmpty()) + { + hasStashedAll = false; + break; + } + } + + if (!simulate) + { + items = copyList; + } + + return hasStashedAll; + } + + @Override + @Nonnull + public ItemStack extractItem(int slot, int amount, boolean simulate) + { + if (amount == 0) + return ItemStack.EMPTY; + + ItemStack stackInSlot = getStackInSlot(slot); + + if (stackInSlot.isEmpty()) + return ItemStack.EMPTY; + + if (simulate) + { + if (stackInSlot.getCount() < amount) + { + return stackInSlot.copy(); + } else + { + ItemStack copy = stackInSlot.copy(); + copy.setCount(amount); + return copy; + } + } else + { + int m = Math.min(stackInSlot.getCount(), amount); + + ItemStack decrStackSize = decrStackSize(slot, m); + return decrStackSize; + } + } + + public ItemStack decrStackSize(int slot, int amount) + { + if (!getStackInSlot(slot).isEmpty()) + { + if (getStackInSlot(slot).getCount() <= amount) + { + ItemStack itemStack = getStackInSlot(slot); + setInventorySlotContents(slot, ItemStack.EMPTY); + return itemStack; + } + + ItemStack itemStack = getStackInSlot(slot).split(amount); + return itemStack; + } + + return ItemStack.EMPTY; + } + + @Override + public int getSlotLimit(int slot) + { + return invLimit; + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/util/Utils.java b/src/main/java/wayoftime/bloodmagic/util/Utils.java new file mode 100644 index 00000000..cfcf2328 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/Utils.java @@ -0,0 +1,763 @@ +package wayoftime.bloodmagic.util; + +import java.util.List; +import java.util.Locale; +import java.util.UUID; + +import javax.annotation.Nullable; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.FlowingFluidBlock; +import net.minecraft.block.NetherPortalBlock; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.items.wrapper.InvWrapper; +import net.minecraftforge.items.wrapper.PlayerMainInvWrapper; +import net.minecraftforge.items.wrapper.SidedInvWrapper; +import wayoftime.bloodmagic.api.compat.IDemonWillViewer; +import wayoftime.bloodmagic.tile.TileInventory; +import wayoftime.bloodmagic.util.helper.NBTHelper; + +public class Utils +{ + /** + * @param tile - The {@link TileInventory} to input the item to + * @param player - The player to take the item from. + * @return {@code true} if the ItemStack is inserted, {@code false} otherwise + * @see #insertItemToTile(TileInventory, PlayerEntity, int) + */ + public static boolean insertItemToTile(TileInventory tile, PlayerEntity player) + { + return insertItemToTile(tile, player, 0); + } + + /** + * Used for inserting an ItemStack with a stacksize of 1 to a tile's inventory + * at slot 0 + *

+ * EG: Block Altar + * + * @param tile - The {@link TileInventory} to input the item to + * @param player - The player to take the item from. + * @param slot - The slot to attempt to insert to + * @return {@code true} if the ItemStack is inserted, {@code false} otherwise + */ + public static boolean insertItemToTile(TileInventory tile, PlayerEntity player, int slot) + { + ItemStack slotStack = tile.getStackInSlot(slot); + if (slotStack.isEmpty() && !player.getHeldItemMainhand().isEmpty()) + { + ItemStack input = player.getHeldItemMainhand().copy(); + input.setCount(1); + player.getHeldItemMainhand().shrink(1); + tile.setInventorySlotContents(slot, input); + return true; + } else if (!slotStack.isEmpty() && player.getHeldItemMainhand().isEmpty()) + { + ItemHandlerHelper.giveItemToPlayer(player, slotStack); + tile.clear(); + return false; + } + + return false; + } + + public static String toFancyCasing(String input) + { + return String.valueOf(input.charAt(0)).toUpperCase(Locale.ENGLISH) + input.substring(1); + } + + public static boolean isImmuneToFireDamage(LivingEntity entity) + { + return entity.isImmuneToFire() || entity.isPotionActive(Effects.FIRE_RESISTANCE); + } + + public static boolean isBlockLiquid(BlockState state) + { + return (state instanceof IFluidBlock || state.getMaterial().isLiquid()); + } + + public static boolean isFlowingLiquid(World world, BlockPos pos, BlockState state) + { + Block block = state.getBlock(); + return ((block instanceof IFluidBlock && Math.abs(((IFluidBlock) block).getFilledPercentage(world, pos)) == 1) || (block instanceof FlowingFluidBlock && !((FlowingFluidBlock) block).getFluidState(state).isSource())); + } + + public static boolean spawnStackAtBlock(World world, BlockPos pos, @Nullable Direction pushDirection, ItemStack stack) + { + BlockPos spawnPos = new BlockPos(pos); + + double velX = 0; + double velY = 0; + double velZ = 0; + double velocity = 0.15D; + if (pushDirection != null) + { + spawnPos = spawnPos.offset(pushDirection); + + switch (pushDirection) + { + case DOWN: + { + velY = -velocity; + break; + } + case UP: + { + velY = velocity; + break; + } + case NORTH: + { + velZ = -velocity; + break; + } + case SOUTH: + { + velZ = velocity; + break; + } + case WEST: + { + velX = -velocity; + break; + } + case EAST: + { + velX = velocity; + break; + } + } + } + + double posX = spawnPos.getX() + 0.5; + double posY = spawnPos.getY() + 0.5; + double posZ = spawnPos.getZ() + 0.5; + + ItemEntity entityItem = new ItemEntity(world, posX, posY, posZ, stack); + entityItem.setMotion(velX, velY, velZ); + + entityItem.setItem(stack); + return world.addEntity(entityItem); + } + + public static boolean swapLocations(World initialWorld, BlockPos initialPos, World finalWorld, BlockPos finalPos) + { + return swapLocations(initialWorld, initialPos, finalWorld, finalPos, true); + } + + public static boolean swapLocations(World initialWorld, BlockPos initialPos, World finalWorld, BlockPos finalPos, boolean playSound) + { + TileEntity initialTile = initialWorld.getTileEntity(initialPos); + TileEntity finalTile = finalWorld.getTileEntity(finalPos); + CompoundNBT initialTag = new CompoundNBT(); + CompoundNBT finalTag = new CompoundNBT(); + if (initialTile != null) + initialTile.write(initialTag); + if (finalTile != null) + finalTile.write(finalTag); + + BlockState initialState = initialWorld.getBlockState(initialPos); + BlockState finalState = finalWorld.getBlockState(finalPos); + + if ((initialState.getBlock().equals(Blocks.AIR) && finalState.getBlock().equals(Blocks.AIR)) || initialState.getBlock() instanceof NetherPortalBlock || finalState.getBlock() instanceof NetherPortalBlock) + return false; + + if (playSound) + { + initialWorld.playSound(null, initialPos.getX(), initialPos.getY(), initialPos.getZ(), SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F); + finalWorld.playSound(null, finalPos.getX(), finalPos.getY(), finalPos.getZ(), SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F); + } + + // Finally, we get to do something! (CLEARING TILES) + if (finalState.getBlock().hasTileEntity(finalState)) + finalWorld.removeTileEntity(finalPos); + if (initialState.getBlock().hasTileEntity(initialState)) + initialWorld.removeTileEntity(initialPos); + + // TILES CLEARED + BlockState initialBlockState = initialWorld.getBlockState(initialPos); + BlockState finalBlockState = finalWorld.getBlockState(finalPos); + finalWorld.setBlockState(finalPos, initialBlockState, 3); + + if (initialTile != null) + { +// TileEntity newTileInitial = TileEntity.create(finalWorld, initialTag); + TileEntity newTileInitial = TileEntity.readTileEntity(finalBlockState, initialTag); + + finalWorld.setTileEntity(finalPos, newTileInitial); +// newTileInitial.setPos(finalPos); + newTileInitial.setWorldAndPos(finalWorld, finalPos); + } + + initialWorld.setBlockState(initialPos, finalBlockState, 3); + + if (finalTile != null) + { +// TileEntity newTileFinal = TileEntity.create(initialWorld, finalTag); + TileEntity newTileFinal = TileEntity.readTileEntity(initialBlockState, finalTag); + + initialWorld.setTileEntity(initialPos, newTileFinal); +// newTileFinal.setPos(initialPos); + newTileFinal.setWorldAndPos(initialWorld, initialPos); + } + + initialWorld.notifyNeighborsOfStateChange(initialPos, finalState.getBlock()); + finalWorld.notifyNeighborsOfStateChange(finalPos, initialState.getBlock()); + + return true; + } + + public static ItemStack insertStackIntoTile(ItemStack stack, TileEntity tile, Direction dir) + { + LazyOptional capability = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir); + if (capability.isPresent()) + { + IItemHandler handler = capability.resolve().get(); + + return insertStackIntoTile(stack, handler); + } else if (tile instanceof IInventory) + { + return insertStackIntoInventory(stack, (IInventory) tile, dir); + } + + return stack; + } + + public static ItemStack insertStackIntoTile(ItemStack stack, IItemHandler handler) + { + int numberOfSlots = handler.getSlots(); + + ItemStack copyStack = stack.copy(); + + for (int slot = 0; slot < numberOfSlots; slot++) + { + copyStack = handler.insertItem(slot, copyStack, false); + if (copyStack.isEmpty()) + { + return ItemStack.EMPTY; + } + } + + return copyStack; + } + + public static int getNumberOfFreeSlots(TileEntity tile, Direction dir) + { + int slots = 0; + + LazyOptional capability = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir); + if (capability.isPresent()) + { + IItemHandler handler = capability.resolve().get(); + + for (int i = 0; i < handler.getSlots(); i++) + { + if (handler.getStackInSlot(i).isEmpty()) + { + slots++; + } + } + } else if (tile instanceof IInventory) + { + for (int i = 0; i < ((IInventory) tile).getSizeInventory(); i++) + { + if (((IInventory) tile).getStackInSlot(i).isEmpty()) + { + slots++; + } + } + } + + return slots; + } + + public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, Direction dir) + { + if (stack.isEmpty()) + { + return ItemStack.EMPTY; + } + + boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; + + if (inventory instanceof ISidedInventory) + { + int[] array = ((ISidedInventory) inventory).getSlotsForFace(dir); + for (int in : array) + { + canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory) inventory).canInsertItem(in, stack, dir); + } + } else + { + for (int i = 0; i < canBeInserted.length; i++) + { + canBeInserted[i] = inventory.isItemValidForSlot(i, stack); + } + } + + for (int i = 0; i < inventory.getSizeInventory(); i++) + { + if (!canBeInserted[i]) + { + continue; + } + + ItemStack[] combinedStacks = combineStacks(stack, inventory.getStackInSlot(i)); + stack = combinedStacks[0]; + inventory.setInventorySlotContents(i, combinedStacks[1]); + + if (stack.isEmpty()) + { + return ItemStack.EMPTY; + } + } + + return stack; + } + + public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, Direction dir, boolean fillToLimit, int limit) + { + if (stack.isEmpty()) + { + return true; + } + + int itemsLeft = stack.getCount(); + + boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; + + if (inventory instanceof ISidedInventory) + { + int[] array = ((ISidedInventory) inventory).getSlotsForFace(dir); + for (int in : array) + { + canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory) inventory).canInsertItem(in, stack, dir); + } + } else + { + for (int i = 0; i < canBeInserted.length; i++) + { + canBeInserted[i] = inventory.isItemValidForSlot(i, stack); + } + } + + int numberMatching = 0; + + if (fillToLimit) + { + for (int i = 0; i < inventory.getSizeInventory(); i++) + { + if (!canBeInserted[i]) + { + continue; + } + + ItemStack invStack = inventory.getStackInSlot(i); + + if (!invStack.isEmpty() && ItemHandlerHelper.canItemStacksStack(stack, invStack)) + { + numberMatching += invStack.getCount(); + } + } + } + + if (fillToLimit && limit < stack.getCount() + numberMatching) + { + return false; + } + + for (int i = 0; i < inventory.getSizeInventory(); i++) + { + if (!canBeInserted[i]) + { + continue; + } + + ItemStack invStack = inventory.getStackInSlot(i); + boolean canCombine = ItemHandlerHelper.canItemStacksStack(stack, invStack); + if (canCombine) + { + if (invStack.isEmpty()) + { + itemsLeft = 0; + } else + { + itemsLeft -= (invStack.getMaxStackSize() - invStack.getCount()); + } + } + + if (itemsLeft <= 0) + { + return true; + } + } + + return false; + } + + /** + * @param stack1 Stack that is placed into a slot + * @param stack2 Slot content that stack1 is placed into + * @return Stacks after stacking + */ + public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2) + { + ItemStack[] returned = new ItemStack[2]; + + if (ItemHandlerHelper.canItemStacksStack(stack1, stack2)) + { + int transferedAmount = stack2.isEmpty() ? stack1.getCount() + : Math.min(stack2.getMaxStackSize() - stack2.getCount(), stack1.getCount()); + if (transferedAmount > 0) + { + ItemStack copyStack = stack1.split(transferedAmount); + if (stack2.isEmpty()) + { + stack2 = copyStack; + } else + { + stack2.grow(transferedAmount); + } + } + } + + returned[0] = stack1; + returned[1] = stack2; + + return returned; + } + + public static boolean canPlayerSeeDemonWill(PlayerEntity player) + { + IItemHandler inventory = new PlayerMainInvWrapper(player.inventory); + + for (int i = 0; i < inventory.getSlots(); i++) + { + ItemStack stack = inventory.getStackInSlot(i); + if (stack.isEmpty()) + { + continue; + } + + if (stack.getItem() instanceof IDemonWillViewer && ((IDemonWillViewer) stack.getItem()).canSeeDemonWillAura(player.getEntityWorld(), stack, player)) + { + return true; + } + } + + return false; + } + + public static double getDemonWillResolution(PlayerEntity player) + { + IItemHandler inventory = new PlayerMainInvWrapper(player.inventory); + + for (int i = 0; i < inventory.getSlots(); i++) + { + ItemStack stack = inventory.getStackInSlot(i); + if (stack.isEmpty()) + { + continue; + } + + if (stack.getItem() instanceof IDemonWillViewer && ((IDemonWillViewer) stack.getItem()).canSeeDemonWillAura(player.getEntityWorld(), stack, player)) + { + return ((IDemonWillViewer) stack.getItem()).getDemonWillAuraResolution(player.getEntityWorld(), stack, player); + } + } + + return 100; + } + + public static int plantSeedsInArea(World world, AxisAlignedBB aabb, int horizontalRadius, int verticalRadius) + { + int placedBlocks = 0; + List itemEntities = world.getEntitiesWithinAABB(ItemEntity.class, aabb); + + for (ItemEntity itemEntity : itemEntities) + { + placedBlocks += plantEntityItem(itemEntity, horizontalRadius, verticalRadius); + } + + return placedBlocks; + } + + public static int plantItemStack(World world, BlockPos centralPos, ItemStack stack, int horizontalRadius, int verticalRadius) + { + if (stack.isEmpty()) + { + return 0; + } + + Item item = stack.getItem(); + if (!(item instanceof IPlantable)) + { + return 0; + } + + int planted = 0; + + for (int hR = 0; hR <= horizontalRadius; hR++) + { + for (int vR = 0; vR <= verticalRadius; vR++) + { + for (int i = -hR; i <= hR; i++) + { + for (int k = -hR; k <= hR; k++) + { + for (int j = -vR; j <= vR; j += 2 * vR + (vR > 0 ? 0 : 1)) + { + if (!(Math.abs(i) == hR || Math.abs(k) == hR)) + { + continue; + } + + BlockPos newPos = centralPos.add(i, j, k); + if (world.isAirBlock(newPos)) + { + BlockPos offsetPos = newPos.offset(Direction.DOWN); + BlockState state = world.getBlockState(offsetPos); + if (state.getBlock().canSustainPlant(state, world, offsetPos, Direction.UP, (IPlantable) item)) + { + BlockState plantState = ((IPlantable) item).getPlant(world, newPos); + world.setBlockState(newPos, plantState, 3); +// Block. + world.playEvent(2001, newPos, Block.getStateId(plantState)); + stack.shrink(1); + planted++; + if (stack.isEmpty() || stack.getCount() <= 0) + { + return planted; + } + } + } + } + } + } + } + } + + return planted; + } + + public static int plantEntityItem(ItemEntity itemEntity, int horizontalRadius, int verticalRadius) + { + if (itemEntity == null || !itemEntity.isAlive()) + { + return 0; + } + + World world = itemEntity.getEntityWorld(); + BlockPos pos = itemEntity.getPosition(); + ItemStack stack = itemEntity.getItem(); + + int planted = plantItemStack(world, pos, stack, horizontalRadius, verticalRadius); + + if (stack.isEmpty()) + { + itemEntity.remove(); + } + + return planted; + } + + @Nullable + public static IItemHandler getInventory(TileEntity tile, @Nullable Direction facing) + { + if (facing == null) + facing = Direction.DOWN; + + IItemHandler itemHandler = null; + + if (tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing).isPresent()) + itemHandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing).resolve().get(); + else if (tile instanceof ISidedInventory) + itemHandler = ((ISidedInventory) tile).getSlotsForFace(facing).length != 0 + ? new SidedInvWrapper((ISidedInventory) tile, facing) + : null; + else if (tile instanceof IInventory) + itemHandler = new InvWrapper((IInventory) tile); + + return itemHandler; + } + + public static float addAbsorptionToMaximum(LivingEntity entity, float added, int maximum, int duration) + { + float currentAmount = entity.getAbsorptionAmount(); + added = Math.min(maximum - currentAmount, added); + + if (added <= 0) + { + return 0; + } + + if (duration > 0) + { + int potionLevel = (int) ((currentAmount + added) / 4); + entity.addPotionEffect(new EffectInstance(Effects.ABSORPTION, duration, potionLevel, true, false)); + } + + entity.setAbsorptionAmount(currentAmount + added); + + return added; + } + +// public static float getModifiedDamage(LivingEntity attackedEntity, DamageSource source, float amount) +// { +// if (!attackedEntity.isInvulnerableTo(source)) +// { +// if (amount <= 0) +// return 0; +// +// amount = applyArmor(attackedEntity, Iterables.toArray(attackedEntity.getEquipmentAndArmor(), ItemStack.class), source, amount); +// if (amount <= 0) +// return 0; +// amount = applyPotionDamageCalculations(attackedEntity, source, amount); +// +// return amount; +// } +// +// return 0; +// } +// +// public static float applyArmor(LivingEntity entity, ItemStack[] inventory, DamageSource source, double damage) +// { +// damage *= 25; +// ArrayList dmgVals = new ArrayList<>(); +// for (int x = 0; x < inventory.length; x++) +// { +// ItemStack stack = inventory[x]; +// if (stack.isEmpty()) +// { +// continue; +// } +// ArmorProperties prop = null; +// if (stack.getItem() instanceof ISpecialArmor) +// { +// ISpecialArmor armor = (ISpecialArmor) stack.getItem(); +// prop = armor.getProperties(entity, stack, source, damage / 25D, x).copy(); +// } else if (stack.getItem() instanceof ArmorItem && !source.isUnblockable()) +// { +// ArmorItem armor = (ArmorItem) stack.getItem(); +// prop = new ArmorProperties(0, armor.damageReduceAmount / 25D, Integer.MAX_VALUE); +// } +// if (prop != null) +// { +// prop.Slot = x; +// dmgVals.add(prop); +// } +// } +// if (dmgVals.size() > 0) +// { +// ArmorProperties[] props = dmgVals.toArray(new ArmorProperties[dmgVals.size()]); +// int level = props[0].Priority; +// double ratio = 0; +// for (ArmorProperties prop : props) +// { +// if (level != prop.Priority) +// { +// damage -= (damage * ratio); +// ratio = 0; +// level = prop.Priority; +// } +// ratio += prop.AbsorbRatio; +// +// } +// damage -= (damage * ratio); +// } +// +// return (float) (damage / 25.0F); +// } +// +// public static float applyPotionDamageCalculations(LivingEntity attackedEntity, DamageSource source, float damage) +// { +// Effect resistance = Effects.RESISTANCE; +// +// if (source.isDamageAbsolute()) +// { +// return damage; +// } else +// { +// if (attackedEntity.isPotionActive(resistance) && source != DamageSource.OUT_OF_WORLD) +// { +// int i = (attackedEntity.getActivePotionEffect(resistance).getAmplifier() + 1) * 5; +// int j = 25 - i; +// float f = damage * (float) j; +// damage = f / 25.0F; +// } +// +// if (damage <= 0.0F) +// { +// return 0.0F; +// } else +// { +// int k = EnchantmentHelper.getEnchantmentModifierDamage(attackedEntity.getArmorInventoryList(), source); +// +// if (k > 20) +// { +// k = 20; +// } +// +// if (k > 0 && k <= 20) +// { +// int l = 25 - k; +// float f1 = damage * (float) l; +// damage = f1 / 25.0F; +// } +// +// return damage; +// } +// } +// } + + public static boolean hasUUID(ItemStack stack) + { + return stack.hasTag() && stack.getTag().contains(Constants.NBT.MOST_SIG) && stack.getTag().contains(Constants.NBT.LEAST_SIG); + } + + public static UUID getUUID(ItemStack stack) + { + if (!hasUUID(stack)) + { + return null; + } + + return new UUID(stack.getTag().getLong(Constants.NBT.MOST_SIG), stack.getTag().getLong(Constants.NBT.LEAST_SIG)); + } + + public static void setUUID(ItemStack stack) + { + stack = NBTHelper.checkNBT(stack); + + if (!stack.getTag().contains(Constants.NBT.MOST_SIG) && !stack.getTag().contains(Constants.NBT.LEAST_SIG)) + { + UUID itemUUID = UUID.randomUUID(); + stack.getTag().putLong(Constants.NBT.MOST_SIG, itemUUID.getMostSignificantBits()); + stack.getTag().putLong(Constants.NBT.LEAST_SIG, itemUUID.getLeastSignificantBits()); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/handler/event/ClientHandler.java b/src/main/java/wayoftime/bloodmagic/util/handler/event/ClientHandler.java new file mode 100644 index 00000000..c2235560 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/handler/event/ClientHandler.java @@ -0,0 +1,563 @@ +package wayoftime.bloodmagic.util.handler.event; + +import java.util.HashMap; +import java.util.List; + +import com.google.common.collect.Lists; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.IVertexBuilder; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.renderer.ActiveRenderInfo; +import net.minecraft.client.renderer.Atlases; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.inventory.container.PlayerContainer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.vector.Matrix4f; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.IFormattableTextComponent; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.Style; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.client.event.TextureStitchEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; +import net.minecraftforge.fml.common.Mod; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer; +import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model3D; +import wayoftime.bloodmagic.client.render.RenderResizableCuboid; +import wayoftime.bloodmagic.client.utils.BMRenderTypes; +import wayoftime.bloodmagic.common.item.ItemRitualDiviner; +import wayoftime.bloodmagic.common.item.ItemRitualReader; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.ritual.EnumRitualReaderState; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.tile.TileMasterRitualStone; +import wayoftime.bloodmagic.will.DemonWillHolder; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID, value = Dist.CLIENT) +//@OnlyIn(Dist.CLIENT) +public class ClientHandler +{ + public static final boolean SUPPRESS_ASSET_ERRORS = true; + public static ResourceLocation ritualStoneBlank = BloodMagic.rl("block/ritualstone");; + public static ResourceLocation ritualStoneWater = BloodMagic.rl("block/waterritualstone");; + public static ResourceLocation ritualStoneFire = BloodMagic.rl("block/fireritualstone");; + public static ResourceLocation ritualStoneEarth = BloodMagic.rl("block/earthritualstone");; + public static ResourceLocation ritualStoneAir = BloodMagic.rl("block/airritualstone");; + public static ResourceLocation ritualStoneDawn = BloodMagic.rl("block/dawnritualstone");; + public static ResourceLocation ritualStoneDusk = BloodMagic.rl("block/duskritualstone");; + public static ResourceLocation boarder = new ResourceLocation("block/chiseled_sandstone"); + public static TextureAtlasSprite blankBloodRune; + public static TextureAtlasSprite stoneBrick; + public static TextureAtlasSprite glowstone; +// public static TextureAtlasSprite bloodStoneBrick; + public static TextureAtlasSprite beacon; +// public static TextureAtlasSprite crystalCluster; + public static Minecraft minecraft = Minecraft.getInstance(); + private static TileMasterRitualStone mrsHoloTile; + private static TileMasterRitualStone mrsRangeTile; + private static Ritual mrsHoloRitual; + private static Direction mrsHoloDirection; + private static boolean mrsHoloDisplay; + private static boolean mrsRangeDisplay; + + public static DemonWillHolder currentAura; + + static HashMap resourceMap = new HashMap(); + + public static Minecraft mc() + { + return Minecraft.getInstance(); + } + + public static void bindTexture(String path) + { + mc().getTextureManager().bindTexture(getResource(path)); + } + + public static void bindAtlas() + { + mc().getTextureManager().bindTexture(PlayerContainer.LOCATION_BLOCKS_TEXTURE); + } + + public static ResourceLocation getResource(String path) + { + ResourceLocation rl = resourceMap.containsKey(path) ? resourceMap.get(path) : new ResourceLocation(path); + if (!resourceMap.containsKey(path)) + resourceMap.put(path, rl); + return rl; + } + + public static TextureAtlasSprite getSprite(ResourceLocation rl) + { + return mc().getModelManager().getAtlasTexture(PlayerContainer.LOCATION_BLOCKS_TEXTURE).getSprite(rl); + } + + @SubscribeEvent + public static void onTextureStitch(TextureStitchEvent.Pre event) + { + final String BLOCKS = "block/"; + +// ritualStoneBlank = Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(BloodMagic.rl(block//" + "blankrune")); +//// ritualStoneBlank = forName(event.getMap(), "ritualstone", BLOCKS); +// ritualStoneWater = forName(event.getMap(), "waterritualstone", BLOCKS); +// ritualStoneFire = forName(event.getMap(), "fireritualstone", BLOCKS); +// ritualStoneEarth = forName(event.getMap(), "earthritualstone", BLOCKS); +// ritualStoneAir = forName(event.getMap(), "airritualstone", BLOCKS); +// ritualStoneDawn = forName(event.getMap(), "lightritualstone", BLOCKS); +// ritualStoneDusk = forName(event.getMap(), "duskritualstone", BLOCKS); + + blankBloodRune = forName(event.getMap(), "blankrune", BLOCKS); + stoneBrick = event.getMap().getSprite(new ResourceLocation("minecraft:block/stonebrick")); + glowstone = event.getMap().getSprite(new ResourceLocation("minecraft:block/glowstone")); +// bloodStoneBrick = forName(event.getMap(), "BloodStoneBrick", BLOCKS); + beacon = event.getMap().getSprite(new ResourceLocation("minecraft:block/beacon")); +// crystalCluster = forName(event.getMap(), "ShardCluster", BLOCKS); + } + + @SubscribeEvent + public static void render(RenderWorldLastEvent event) + { + ClientPlayerEntity player = minecraft.player; + World world = player.getEntityWorld(); + + if (mrsHoloTile != null) + { + if (world.getTileEntity(mrsHoloTile.getPos()) instanceof TileMasterRitualStone) + { + if (mrsHoloDisplay) + { + IRenderTypeBuffer.Impl buffers = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); + MatrixStack stack = event.getMatrixStack(); + renderRitualStones(stack, buffers, mrsHoloTile, event.getPartialTicks()); + RenderSystem.disableDepthTest(); + buffers.finish(); + } else + ClientHandler.setRitualHoloToNull(); + } else + { + ClientHandler.setRitualHoloToNull(); + } + } + + if (mrsRangeTile != null) + { + if (world.getTileEntity(mrsRangeTile.getPos()) instanceof TileMasterRitualStone) + { + if (mrsRangeDisplay) + { + IRenderTypeBuffer.Impl buffers = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); + MatrixStack stack = event.getMatrixStack(); + renderRangeHologram(stack, buffers, mrsRangeTile, event.getPartialTicks()); + RenderSystem.disableDepthTest(); + buffers.finish(); + } else + ClientHandler.setRitualRangeHoloToNull(); + } else + { + ClientHandler.setRitualRangeHoloToNull(); + } + } + + if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.getType() != RayTraceResult.Type.BLOCK) + return; + + TileEntity tileEntity = world.getTileEntity(((BlockRayTraceResult) minecraft.objectMouseOver).getPos()); + + if (tileEntity instanceof TileMasterRitualStone && !player.getHeldItemMainhand().isEmpty() && player.getHeldItemMainhand().getItem() instanceof ItemRitualDiviner) + { + IRenderTypeBuffer.Impl buffers = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); + MatrixStack stack = event.getMatrixStack(); + renderRitualStones(stack, buffers, player, event.getPartialTicks()); + RenderSystem.disableDepthTest(); + buffers.finish(); + } + } + + private static TextureAtlasSprite forName(AtlasTexture textureMap, String name, String dir) + { + return textureMap.getSprite(new ResourceLocation(BloodMagic.MODID + dir + "/" + name)); + } + + private static void renderRitualStones(MatrixStack stack, IRenderTypeBuffer renderer, ClientPlayerEntity player, float partialTicks) + { + ActiveRenderInfo activerenderinfo = Minecraft.getInstance().gameRenderer.getActiveRenderInfo(); + Vector3d eyePos = activerenderinfo.getProjectedView(); + IVertexBuilder buffer = renderer.getBuffer(Atlases.getTranslucentCullBlockType()); + World world = player.getEntityWorld(); + ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem(); + Direction direction = ritualDiviner.getDirection(player.inventory.getCurrentItem()); + Ritual ritual = BloodMagic.RITUAL_MANAGER.getRitual(ritualDiviner.getCurrentRitual(player.inventory.getCurrentItem())); + + if (ritual == null) + return; + + BlockPos vec3, vX; + vec3 = ((BlockRayTraceResult) minecraft.objectMouseOver).getPos(); + + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + for (RitualComponent ritualComponent : components) + { + stack.push(); + vX = vec3.add(ritualComponent.getOffset(direction)); + double minX = vX.getX() - eyePos.x; + double minY = vX.getY() - eyePos.y; + double minZ = vX.getZ() - eyePos.z; + + stack.translate(minX, minY, minZ); + + if (!world.getBlockState(vX).isOpaqueCube(world, vX)) + { + ResourceLocation rl = null; + + switch (ritualComponent.getRuneType()) + { + case BLANK: + rl = ritualStoneBlank; + break; + case WATER: + rl = ritualStoneWater; + break; + case FIRE: + rl = ritualStoneFire; + break; + case EARTH: + rl = ritualStoneEarth; + break; + case AIR: + rl = ritualStoneAir; + break; + case DAWN: + rl = ritualStoneDawn; + break; + case DUSK: + rl = ritualStoneDusk; + break; + } + + Model3D model = getBlockModel(rl); + + RenderResizableCuboid.INSTANCE.renderCube(model, stack, buffer, 0xDDFFFFFF, 0x00F000F0, OverlayTexture.NO_OVERLAY); + } + stack.pop(); + } + } + + public static void renderRitualStones(MatrixStack stack, IRenderTypeBuffer renderer, TileMasterRitualStone masterRitualStone, float partialTicks) + { + ActiveRenderInfo activerenderinfo = Minecraft.getInstance().gameRenderer.getActiveRenderInfo(); + Vector3d eyePos = activerenderinfo.getProjectedView(); + IVertexBuilder buffer = renderer.getBuffer(Atlases.getTranslucentCullBlockType()); + ClientPlayerEntity player = minecraft.player; + World world = player.getEntityWorld(); + Direction direction = mrsHoloDirection; + Ritual ritual = mrsHoloRitual; + + if (ritual == null) + { + return; + } + + BlockPos vec3, vX; + vec3 = masterRitualStone.getPos(); + + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + for (RitualComponent ritualComponent : components) + { + stack.push(); + vX = vec3.add(ritualComponent.getOffset(direction)); + + double minX = vX.getX() - eyePos.x; + double minY = vX.getY() - eyePos.y; + double minZ = vX.getZ() - eyePos.z; + + stack.translate(minX, minY, minZ); + + if (!world.getBlockState(vX).isOpaqueCube(world, vX)) + { + ResourceLocation rl = null; + + switch (ritualComponent.getRuneType()) + { + case BLANK: + rl = ritualStoneBlank; + break; + case WATER: + rl = ritualStoneWater; + break; + case FIRE: + rl = ritualStoneFire; + break; + case EARTH: + rl = ritualStoneEarth; + break; + case AIR: + rl = ritualStoneAir; + break; + case DAWN: + rl = ritualStoneDawn; + break; + case DUSK: + rl = ritualStoneDusk; + break; + } + + Model3D model = getBlockModel(rl); + + RenderResizableCuboid.INSTANCE.renderCube(model, stack, buffer, 0xDDFFFFFF, 0x00F000F0, OverlayTexture.NO_OVERLAY); + } + + stack.pop(); + } + } + + public static void renderRangeHologram(MatrixStack stack, IRenderTypeBuffer renderer, TileMasterRitualStone masterRitualStone, float partialTicks) + { + ActiveRenderInfo activerenderinfo = Minecraft.getInstance().gameRenderer.getActiveRenderInfo(); + Vector3d eyePos = activerenderinfo.getProjectedView(); + IVertexBuilder buffer = renderer.getBuffer(Atlases.getTranslucentCullBlockType()); + ClientPlayerEntity player = minecraft.player; + World world = player.getEntityWorld(); + + if (!player.getHeldItemMainhand().isEmpty() && player.getHeldItemMainhand().getItem() instanceof ItemRitualReader) + { + ItemStack itemStack = player.getHeldItemMainhand(); + EnumRitualReaderState state = ((ItemRitualReader) itemStack.getItem()).getState(itemStack); + if (state == EnumRitualReaderState.SET_AREA) + { + String range = ((ItemRitualReader) itemStack.getItem()).getCurrentBlockRange(itemStack); + AreaDescriptor descriptor = masterRitualStone.getBlockRange(range); + if (descriptor == null) + { + return; + } + + stack.push(); + BlockPos vec3; + vec3 = masterRitualStone.getPos(); + AxisAlignedBB aabb = descriptor.getAABB(vec3); + double sizeOffset = -1d / 16d; + if (aabb.contains(eyePos)) + { + sizeOffset *= -1; + } + + double minX = aabb.minX - eyePos.x + sizeOffset; + double minY = aabb.minY - eyePos.y + sizeOffset; + double minZ = aabb.minZ - eyePos.z + sizeOffset; + + stack.translate(minX, minY, minZ); + + ResourceLocation rl = boarder; + Model3D model = getBlockModelWithSize(rl, aabb.getXSize() - 2 * sizeOffset, aabb.getYSize() - 2 * sizeOffset, aabb.getZSize() - 2 * sizeOffset); + RenderResizableCuboid.INSTANCE.renderCube(model, stack, buffer, 0x99FF4444, 0x00F000F0, OverlayTexture.NO_OVERLAY); + stack.pop(); + } + } + } + + private static Model3D getBlockModel(ResourceLocation rl) + { + Model3D model = new BloodMagicRenderer.Model3D(); + model.setTexture(Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(rl)); + model.minX = 0; + model.minY = 0; + model.minZ = 0; + model.maxX = 1; + model.maxY = 1; + model.maxZ = 1; + + return model; + } + + private static Model3D getBlockModelWithSize(ResourceLocation rl, double maxX, double maxY, double maxZ) + { + Model3D model = new BloodMagicRenderer.Model3D(); + model.setTexture(Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(rl)); + model.minX = 0; + model.minY = 0; + model.minZ = 0; + model.maxX = maxX; + model.maxY = maxY; + model.maxZ = maxZ; + + return model; + } + + public static void setRitualHolo(TileMasterRitualStone masterRitualStone, Ritual ritual, Direction direction, boolean displayed) + { + mrsHoloDisplay = displayed; + mrsHoloTile = masterRitualStone; + mrsHoloRitual = ritual; + mrsHoloDirection = direction; + } + + public static void setRitualHoloToNull() + { + mrsHoloDisplay = false; + mrsHoloTile = null; + mrsHoloRitual = null; + mrsHoloDirection = Direction.NORTH; + } + + public static void setRitualRangeHolo(TileMasterRitualStone masterRitualStone, boolean displayed) + { + mrsRangeDisplay = displayed; + mrsRangeTile = masterRitualStone; + } + + public static void setRitualRangeHoloToNull() + { + mrsRangeDisplay = false; + mrsRangeTile = null; + } + + public static void handleGuiTank(MatrixStack transform, IFluidTank tank, int x, int y, int w, int h, int oX, int oY, int oW, int oH, int mX, int mY, String originalTexture, List tooltip) + { + handleGuiTank(transform, tank.getFluid(), tank.getCapacity(), x, y, w, h, oX, oY, oW, oH, mX, mY, originalTexture, tooltip); + } + + public static void handleGuiTank(MatrixStack transform, FluidStack fluid, int capacity, int x, int y, int w, int h, int oX, int oY, int oW, int oH, int mX, int mY, String originalTexture, List tooltip) + { + if (tooltip == null) + { + transform.push(); + IRenderTypeBuffer.Impl buffer = IRenderTypeBuffer.getImpl(Tessellator.getInstance().getBuffer()); + if (fluid != null && fluid.getFluid() != null) + { + int fluidHeight = (int) (h * (fluid.getAmount() / (float) capacity)); + drawRepeatedFluidSpriteGui(buffer, transform, fluid, x, y + h - fluidHeight, w, fluidHeight); + RenderSystem.color3f(1, 1, 1); + } + int xOff = (w - oW) / 2; + int yOff = (h - oH) / 2; + RenderType renderType = BMRenderTypes.getGui(new ResourceLocation(originalTexture)); + drawTexturedRect(buffer.getBuffer(renderType), transform, x + xOff, y + yOff, oW, oH, 256f, oX, oX + oW, oY, oY + oH); + buffer.finish(renderType); + transform.pop(); + } else + { + if (mX >= x && mX < x + w && mY >= y && mY < y + h) + addFluidTooltip(fluid, tooltip, capacity); + } + } + + public static void drawRepeatedFluidSpriteGui(IRenderTypeBuffer buffer, MatrixStack transform, FluidStack fluid, float x, float y, float w, float h) + { + RenderType renderType = BMRenderTypes.getGui(PlayerContainer.LOCATION_BLOCKS_TEXTURE); + IVertexBuilder builder = buffer.getBuffer(renderType); + drawRepeatedFluidSprite(builder, transform, fluid, x, y, w, h); + } + + public static void drawRepeatedFluidSprite(IVertexBuilder builder, MatrixStack transform, FluidStack fluid, float x, float y, float w, float h) + { + TextureAtlasSprite sprite = getSprite(fluid.getFluid().getAttributes().getStillTexture(fluid)); + int col = fluid.getFluid().getAttributes().getColor(fluid); + int iW = sprite.getWidth(); + int iH = sprite.getHeight(); + if (iW > 0 && iH > 0) + drawRepeatedSprite(builder, transform, x, y, w, h, iW, iH, sprite.getMinU(), sprite.getMaxU(), sprite.getMinV(), sprite.getMaxV(), (col >> 16 & 255) / 255.0f, (col >> 8 & 255) / 255.0f, (col & 255) / 255.0f, 1); + } + + public static void drawRepeatedSprite(IVertexBuilder builder, MatrixStack transform, float x, float y, float w, float h, int iconWidth, int iconHeight, float uMin, float uMax, float vMin, float vMax, float r, float g, float b, float alpha) + { + int iterMaxW = (int) (w / iconWidth); + int iterMaxH = (int) (h / iconHeight); + float leftoverW = w % iconWidth; + float leftoverH = h % iconHeight; + float leftoverWf = leftoverW / (float) iconWidth; + float leftoverHf = leftoverH / (float) iconHeight; + float iconUDif = uMax - uMin; + float iconVDif = vMax - vMin; + for (int ww = 0; ww < iterMaxW; ww++) + { + for (int hh = 0; hh < iterMaxH; hh++) + drawTexturedRect(builder, transform, x + ww * iconWidth, y + hh * iconHeight, iconWidth, iconHeight, r, g, b, alpha, uMin, uMax, vMin, vMax); + drawTexturedRect(builder, transform, x + ww * iconWidth, y + iterMaxH * iconHeight, iconWidth, leftoverH, r, g, b, alpha, uMin, uMax, vMin, (vMin + iconVDif * leftoverHf)); + } + if (leftoverW > 0) + { + for (int hh = 0; hh < iterMaxH; hh++) + drawTexturedRect(builder, transform, x + iterMaxW * iconWidth, y + hh * iconHeight, leftoverW, iconHeight, r, g, b, alpha, uMin, (uMin + iconUDif * leftoverWf), vMin, vMax); + drawTexturedRect(builder, transform, x + iterMaxW * iconWidth, y + iterMaxH * iconHeight, leftoverW, leftoverH, r, g, b, alpha, uMin, (uMin + iconUDif * leftoverWf), vMin, (vMin + iconVDif * leftoverHf)); + } + } + + public static void drawTexturedRect(IVertexBuilder builder, MatrixStack transform, float x, float y, float w, float h, float r, float g, float b, float alpha, float u0, float u1, float v0, float v1) + { + Matrix4f mat = transform.getLast().getMatrix(); + builder.pos(mat, x, y + h, 0).color(r, g, b, alpha).tex(u0, v1).overlay(OverlayTexture.NO_OVERLAY).lightmap(0xf000f0).normal(1, 1, 1).endVertex(); + builder.pos(mat, x + w, y + h, 0).color(r, g, b, alpha).tex(u1, v1).overlay(OverlayTexture.NO_OVERLAY).lightmap(15728880).normal(1, 1, 1).endVertex(); + builder.pos(mat, x + w, y, 0).color(r, g, b, alpha).tex(u1, v0).overlay(OverlayTexture.NO_OVERLAY).lightmap(15728880).normal(1, 1, 1).endVertex(); + builder.pos(mat, x, y, 0).color(r, g, b, alpha).tex(u0, v0).overlay(OverlayTexture.NO_OVERLAY).lightmap(15728880).normal(1, 1, 1).endVertex(); + } + + public static void drawTexturedRect(IVertexBuilder builder, MatrixStack transform, int x, int y, int w, int h, float picSize, int u0, int u1, int v0, int v1) + { + drawTexturedRect(builder, transform, x, y, w, h, 1, 1, 1, 1, u0 / picSize, u1 / picSize, v0 / picSize, v1 / picSize); + } + + public static void addFluidTooltip(FluidStack fluid, List tooltip, int tankCapacity) + { + if (!fluid.isEmpty()) + tooltip.add(applyFormat(fluid.getDisplayName(), fluid.getFluid().getAttributes().getRarity(fluid).color)); + else + tooltip.add(new TranslationTextComponent("gui.bloodmagic.empty")); +// if (fluid.getFluid() instanceof IEFluid) +// ((IEFluid) fluid.getFluid()).addTooltipInfo(fluid, null, tooltip); + + if (mc().gameSettings.advancedItemTooltips && !fluid.isEmpty()) + { + if (!Screen.hasShiftDown()) + tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.holdShiftForInfo")); + else + { + // TODO translation keys + tooltip.add(applyFormat(new StringTextComponent("Fluid Registry: " + fluid.getFluid().getRegistryName()), TextFormatting.DARK_GRAY)); + tooltip.add(applyFormat(new StringTextComponent("Density: " + fluid.getFluid().getAttributes().getDensity(fluid)), TextFormatting.DARK_GRAY)); + tooltip.add(applyFormat(new StringTextComponent("Temperature: " + fluid.getFluid().getAttributes().getTemperature(fluid)), TextFormatting.DARK_GRAY)); + tooltip.add(applyFormat(new StringTextComponent("Viscosity: " + fluid.getFluid().getAttributes().getViscosity(fluid)), TextFormatting.DARK_GRAY)); + tooltip.add(applyFormat(new StringTextComponent("NBT Data: " + fluid.getTag()), TextFormatting.DARK_GRAY)); + } + } + + if (tankCapacity > 0) + tooltip.add(applyFormat(new StringTextComponent(fluid.getAmount() + "/" + tankCapacity + "mB"), TextFormatting.GRAY)); + else + tooltip.add(applyFormat(new StringTextComponent(fluid.getAmount() + "mB"), TextFormatting.GRAY)); + } + + public static IFormattableTextComponent applyFormat(ITextComponent component, TextFormatting... color) + { + Style style = component.getStyle(); + for (TextFormatting format : color) style = style.applyFormatting(format); + return component.deepCopy().setStyle(style); + } + +} diff --git a/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java b/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java new file mode 100644 index 00000000..7ccf30fe --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java @@ -0,0 +1,717 @@ +package wayoftime.bloodmagic.util.handler.event; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; + +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.enchantment.Enchantments; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.entity.projectile.ArrowEntity; +import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.BowItem; +import net.minecraft.item.CrossbowItem; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.util.DamageSource; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.Tags; +import net.minecraftforge.common.ToolType; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import net.minecraftforge.event.entity.living.LivingDamageEvent; +import net.minecraftforge.event.entity.living.LivingEntityUseItemEvent; +import net.minecraftforge.event.entity.living.LivingEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import net.minecraftforge.event.entity.living.LivingHealEvent; +import net.minecraftforge.event.entity.living.LivingHurtEvent; +import net.minecraftforge.event.entity.living.LootingLevelEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerXpEvent; +import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.event.world.BlockEvent.BlockToolInteractEvent; +import net.minecraftforge.eventbus.api.EventPriority; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.anointment.AnointmentHolder; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.item.BloodOrb; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.common.item.IBloodOrb; +import wayoftime.bloodmagic.common.item.ItemExperienceBook; +import wayoftime.bloodmagic.core.AnointmentRegistrar; +import wayoftime.bloodmagic.core.LivingArmorRegistrar; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.living.LivingStats; +import wayoftime.bloodmagic.core.living.LivingUtil; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.event.ItemBindEvent; +import wayoftime.bloodmagic.event.SacrificeKnifeUsedEvent; +import wayoftime.bloodmagic.network.DemonAuraClientPacket; +import wayoftime.bloodmagic.potion.BMPotionUtils; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.util.helper.BindableHelper; +import wayoftime.bloodmagic.util.helper.NetworkHelper; +import wayoftime.bloodmagic.util.helper.PlayerHelper; +import wayoftime.bloodmagic.will.DemonWillHolder; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class GenericHandler +{ + // Handles binding of IBindable's as well as setting a player's highest orb tier + @SubscribeEvent + public void onInteract(PlayerInteractEvent.RightClickItem event) + { + if (event.getWorld().isRemote) + return; + + PlayerEntity player = event.getPlayer(); + + if (PlayerHelper.isFakePlayer(player)) + return; + + ItemStack held = event.getItemStack(); + if (!held.isEmpty() && held.getItem() instanceof IBindable) + { // Make sure it's bindable + IBindable bindable = (IBindable) held.getItem(); + Binding binding = bindable.getBinding(held); + if (binding == null) + { // If the binding is null, let's create one + if (bindable.onBind(player, held)) + { + ItemBindEvent toPost = new ItemBindEvent(player, held); + if (MinecraftForge.EVENT_BUS.post(toPost)) // Allow cancellation of binding + return; + + BindableHelper.applyBinding(held, player); // Bind item to the player + } + // If the binding exists, we'll check if the player's name has changed since + // they last used it and update that if so. + } else if (binding.getOwnerId().equals(player.getGameProfile().getId()) && !binding.getOwnerName().equals(player.getGameProfile().getName())) + { + binding.setOwnerName(player.getGameProfile().getName()); + BindableHelper.applyBinding(held, binding); + } + } + + if (!held.isEmpty() && held.getItem() instanceof IBloodOrb) + { + IBloodOrb bloodOrb = (IBloodOrb) held.getItem(); + SoulNetwork network = NetworkHelper.getSoulNetwork(player); + + BloodOrb orb = bloodOrb.getOrb(held); + if (orb == null) + return; + + if (orb.getTier() > network.getOrbTier()) + network.setOrbTier(orb.getTier()); + } + } + + @SubscribeEvent + public void onPlayerLeftClickAir(PlayerInteractEvent.LeftClickEmpty event) + { +// if (event.getItemStack().getItem() instanceof ItemSentientScythe) +// { +// ((ItemSentientScythe) event.getItemStack().getItem()).onLeftClickAir(event.getItemStack(), event.getEntityLiving()); +// } + } + + @SubscribeEvent + // Called when an entity is set to be hurt. Called before vanilla armour + // calculations. + public void onLivingHurt(LivingHurtEvent event) + { + Entity sourceEntity = event.getSource().getTrueSource(); + LivingEntity living = event.getEntityLiving(); + + if (sourceEntity instanceof PlayerEntity) + { + PlayerEntity sourcePlayer = (PlayerEntity) sourceEntity; + if (LivingUtil.hasFullSet(sourcePlayer)) + { + ItemStack mainWeapon = sourcePlayer.getActiveItemStack(); + double additionalDamage = LivingUtil.getAdditionalDamage(sourcePlayer, mainWeapon, living, event.getAmount()); + event.setAmount((float) (event.getAmount() + additionalDamage)); + } + + ItemStack heldStack = sourcePlayer.getHeldItemMainhand(); + AnointmentHolder holder = AnointmentHolder.fromItemStack(heldStack); + + if (holder != null) + { + double additionalDamage = holder.getAdditionalDamage(sourcePlayer, heldStack, event.getAmount(), living); + + event.setAmount((float) (event.getAmount() + additionalDamage)); + } + } + + if (living instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) living; + if (LivingUtil.hasFullSet(player)) + { + event.setAmount((float) LivingUtil.getDamageReceivedForArmour(player, event.getSource(), event.getAmount())); + } + } + } + + @SubscribeEvent + // Called after armour calculations (including LivingHurtEvent) are parsed. + // Damage that the player should receive after armour/absorption hearts. + public void onLivingDamage(LivingDamageEvent event) + { + Entity sourceEntity = event.getSource().getTrueSource(); + LivingEntity living = event.getEntityLiving(); + + if (sourceEntity instanceof PlayerEntity) + { + PlayerEntity sourcePlayer = (PlayerEntity) sourceEntity; + if (LivingUtil.hasFullSet(sourcePlayer)) + { + if (sourcePlayer.isSprinting()) + { + LivingUtil.applyNewExperience(sourcePlayer, LivingArmorRegistrar.UPGRADE_SPRINT_ATTACK.get(), event.getAmount()); + } + } + + ItemStack heldStack = sourcePlayer.getHeldItemMainhand(); + AnointmentHolder holder = AnointmentHolder.fromItemStack(heldStack); +// AnointmentHolder holder = AnointmentHolder.fromPlayer(sourcePlayer, Hand.MAIN_HAND); + +// System.out.println("Checking consumption. Holder is: " + holder); + if (holder != null && holder.consumeAnointmentDurabilityOnHit(heldStack, EquipmentSlotType.MAINHAND)) + { + holder.toItemStack(heldStack); + } + } + + if (living instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) living; + if (LivingUtil.hasFullSet(player)) + { + if (event.getSource().isProjectile()) + { +// LivingStats stats = LivingStats.fromPlayer(player); +// stats.addExperience(LivingArmorRegistrar.TEST_UPGRADE.get().getKey(), 10); + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_ARROW_PROTECT.get(), event.getAmount()); + } else + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_PHYSICAL_PROTECT.get(), event.getAmount()); + } + + if (event.getSource() == DamageSource.FALL) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_FALL_PROTECT.get(), event.getAmount()); + } + } + } + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onExperiencePickupHighest(PlayerXpEvent.PickupXp event) + { + LivingEntity living = event.getEntityLiving(); + if (living instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) living; + if (LivingUtil.hasFullSet(player)) + { + LivingStats stats = LivingStats.fromPlayer(player, true); + double expModifier = 1 + LivingArmorRegistrar.UPGRADE_EXPERIENCE.get().getBonusValue("exp", stats.getLevel(LivingArmorRegistrar.UPGRADE_EXPERIENCE.get().getKey())).doubleValue(); +// System.out.println("Experience modifier: " + expModifier); + + int xp = event.getOrb().xpValue; + + event.getOrb().xpValue = ((int) Math.floor(xp * expModifier) + (player.world.rand.nextDouble() < (xp * expModifier) % 1 + ? 1 + : 0)); + + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_EXPERIENCE.get(), event.getOrb().getXpValue()); + } + } + } + + @SubscribeEvent + public void onHoe(BlockToolInteractEvent event) + { + if (event.getToolType() == ToolType.HOE && Tags.Blocks.NETHERRACK.contains(event.getState().getBlock())) + { + event.setFinalState(BloodMagicBlocks.NETHER_SOIL.get().getDefaultState()); + } + } + + // Experience Tome + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onExperiencePickup(PlayerXpEvent.PickupXp event) + { + PlayerEntity player = event.getPlayer(); + Entry entry = EnchantmentHelper.getRandomItemWithEnchantment(Enchantments.MENDING, player); + + if (entry != null) + { + ItemStack itemStack = entry.getValue(); + if (!itemStack.isEmpty() && itemStack.isDamaged()) + { + int i = Math.min(xpToDurability(event.getOrb().xpValue), itemStack.getDamage()); + event.getOrb().xpValue -= durabilityToXp(i); + itemStack.setDamage(itemStack.getDamage() - i); + } + } + + if (!player.getEntityWorld().isRemote) + { + for (ItemStack stack : player.inventory.mainInventory) + { + if (stack.getItem() instanceof ItemExperienceBook) + { + ItemExperienceBook.addExperience(stack, event.getOrb().xpValue); + event.getOrb().xpValue = 0; + break; + } + } + } + } + + private static int xpToDurability(int xp) + { + return xp * 2; + } + + private static int durabilityToXp(int durability) + { + return durability / 2; + } + + public static void sendPlayerDemonWillAura(PlayerEntity player) + { + if (player instanceof ServerPlayerEntity) + { + BlockPos pos = player.getPosition(); + DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(WorldDemonWillHandler.getDimensionResourceLocation(player.world), pos.getX() >> 4, pos.getZ() >> 4); + if (holder != null) + { + BloodMagic.packetHandler.sendTo(new DemonAuraClientPacket(holder), (ServerPlayerEntity) player); + } else + { + BloodMagic.packetHandler.sendTo(new DemonAuraClientPacket(new DemonWillHolder()), (ServerPlayerEntity) player); + } + } + } + + // Handles sending the client the Demon Will Aura updates + @SubscribeEvent + public void onLivingUpdate(LivingUpdateEvent event) + { + if (!event.getEntityLiving().getEntityWorld().isRemote) + { + LivingEntity entity = event.getEntityLiving(); + if (entity.isPotionActive(BloodMagicPotions.PLANT_LEECH)) + { + int amplifier = entity.getActivePotionEffect(BloodMagicPotions.PLANT_LEECH).getAmplifier(); + int timeRemaining = entity.getActivePotionEffect(BloodMagicPotions.PLANT_LEECH).getDuration(); + if (timeRemaining % 10 == 0) + { + BMPotionUtils.damageMobAndGrowSurroundingPlants(entity, 2 + amplifier, 1, 0.5 * 3 / (amplifier + 3), 25 * (1 + amplifier)); + } + } + } + } + + @SubscribeEvent + public void onHeal(LivingHealEvent event) + { + LivingEntity living = event.getEntityLiving(); + if (living instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) living; + if (LivingUtil.hasFullSet(player)) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_HEALTH.get(), event.getAmount()); + } + } + } + + @SubscribeEvent + public void onSelfSacrifice(SacrificeKnifeUsedEvent event) + { + if (LivingUtil.hasFullSet(event.player)) + { + LivingStats stats = LivingStats.fromPlayer(event.player, true); + double bonus = LivingArmorRegistrar.UPGRADE_SELF_SACRIFICE.get().getBonusValue("self_mod", stats.getLevel(LivingArmorRegistrar.UPGRADE_SELF_SACRIFICE.get().getKey())).doubleValue(); + event.lpAdded = (int) Math.round(event.lpAdded * (1 + bonus)); + LivingUtil.applyNewExperience(event.player, LivingArmorRegistrar.UPGRADE_SELF_SACRIFICE.get(), event.healthDrained); + } + } + + public static Map posXMap = new HashMap<>(); + public static Map posZMap = new HashMap<>(); + public static Map foodMap = new HashMap<>(); + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onEntityUpdate(LivingEvent.LivingUpdateEvent event) + { + if (event.getEntity().world.isRemote) + { + if (event.getEntityLiving() instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) event.getEntityLiving(); + if (LivingUtil.hasFullSet(player)) + { + LivingStats stats = LivingStats.fromPlayer(player, true); + if (!player.isOnGround() && player.getMotion().getY() < 0) + { + + int jumpLevel = stats.getLevel(LivingArmorRegistrar.UPGRADE_JUMP.get().getKey()); + double fallDistanceMultiplier = LivingArmorRegistrar.UPGRADE_JUMP.get().getBonusValue("fall", jumpLevel).doubleValue(); + player.fallDistance = (float) Math.max(0, player.fallDistance + fallDistanceMultiplier * player.getMotion().getY()); +// System.out.println("Player's motion: " + player.getMotion().getY() + ", Player's fall reduction multiplier: " + fallDistanceMultiplier + ", Player's final fall distance: " + player.fallDistance); + } + return; + } + } + } + if (event.getEntityLiving() instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) event.getEntityLiving(); + float percentIncrease = 0; + +// System.out.println("Player's motion: " + player.getMotion().getY() + ", Player's final fall distance: " + player.fallDistance); + + if (LivingUtil.hasFullSet(player)) + { + LivingStats stats = LivingStats.fromPlayer(player, true); + ItemStack chestStack = player.getItemStackFromSlot(EquipmentSlotType.CHEST); +// percentIncrease += LivingArmorRegistrar.UPGRADE_SPEED.get().getBonusValue("speed_modifier", stats.getLevel(LivingArmorRegistrar.UPGRADE_SPEED.get().getKey())).doubleValue(); + if (player.isSprinting()) + { + int speedTime = LivingArmorRegistrar.UPGRADE_SPEED.get().getBonusValue("speed_time", stats.getLevel(LivingArmorRegistrar.UPGRADE_SPEED.get().getKey())).intValue(); + if (speedTime > 0) + { + int speedLevel = LivingArmorRegistrar.UPGRADE_SPEED.get().getBonusValue("speed_level", stats.getLevel(LivingArmorRegistrar.UPGRADE_SPEED.get().getKey())).intValue(); + player.addPotionEffect(new EffectInstance(Effects.SPEED, speedTime, speedLevel, true, false)); + } + } + + double distance = 0; + + if (posXMap.containsKey(player.getUniqueID())) + { + distance = Math.sqrt((player.getPosX() - posXMap.get(player.getUniqueID())) * (player.getPosX() - posXMap.get(player.getUniqueID())) + (player.getPosZ() - posZMap.get(player.getUniqueID())) * (player.getPosZ() - posZMap.get(player.getUniqueID()))); + } + + int currentFood = player.getFoodStats().getFoodLevel(); + + if (foodMap.getOrDefault(player.getUniqueID(), 19) < currentFood) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_KNOCKBACK_RESIST.get(), currentFood - foodMap.getOrDefault(player.getUniqueID(), 19)); + } + + foodMap.put(player.getUniqueID(), currentFood); + +// System.out.println("Distance travelled: " + distance); + if (player.isOnGround() && distance > 0 && distance < 50) + { + distance *= (1 + percentIncrease); + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_SPEED.get(), distance); + } + + if (!player.isOnGround() && player.getMotion().getY() < 0) + { + + int jumpLevel = stats.getLevel(LivingArmorRegistrar.UPGRADE_JUMP.get().getKey()); + double fallDistanceMultiplier = LivingArmorRegistrar.UPGRADE_JUMP.get().getBonusValue("fall", jumpLevel).doubleValue(); + player.fallDistance = (float) Math.max(0, player.fallDistance + fallDistanceMultiplier * player.getMotion().getY()); +// System.out.println("Player's motion: " + player.getMotion().getY() + ", Player's fall reduction multiplier: " + fallDistanceMultiplier + ", Player's final fall distance: " + player.fallDistance); + } + + if (player.getFireTimer() > 0) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_FIRE_RESIST.get(), 1); + int fireLevel = stats.getLevel(LivingArmorRegistrar.UPGRADE_FIRE_RESIST.get().getKey()); + if (fireLevel > 0) + { + boolean hasChanged = false; + int fireCooldown = chestStack.getTag().getInt("fire_cooldown"); + if (fireCooldown > 0) + { + fireCooldown--; + hasChanged = true; + } + + if (player.getFireTimer() > 0 && fireCooldown <= 0) + { + fireCooldown = LivingArmorRegistrar.UPGRADE_FIRE_RESIST.get().getBonusValue("cooldown_time", fireLevel).intValue(); + player.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE, LivingArmorRegistrar.UPGRADE_FIRE_RESIST.get().getBonusValue("resist_duration", fireLevel).intValue(), 0, true, false)); + hasChanged = true; + } + + if (hasChanged) + { + chestStack.getTag().putInt("fire_cooldown", fireCooldown); + } + } + } + + int poisonLevel = stats.getLevel(LivingArmorRegistrar.UPGRADE_POISON_RESIST.get().getKey()); + if (player.isPotionActive(Effects.POISON)) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_POISON_RESIST.get(), 1); + } + if (poisonLevel > 0) + { + boolean hasChanged = false; + int poisonCooldown = chestStack.getTag().getInt("poison_cooldown"); + if (poisonCooldown > 0) + { + poisonCooldown--; + hasChanged = true; + } + + if (player.isPotionActive(Effects.POISON) && poisonCooldown <= 0 && LivingArmorRegistrar.UPGRADE_POISON_RESIST.get().getBonusValue("max_cure", poisonLevel).intValue() >= player.getActivePotionEffect(Effects.POISON).getAmplifier()) + { + poisonCooldown = LivingArmorRegistrar.UPGRADE_POISON_RESIST.get().getBonusValue("cooldown", poisonLevel).intValue(); + player.removePotionEffect(Effects.POISON); + hasChanged = true; + } + + if (hasChanged) + { + chestStack.getTag().putInt("poison_cooldown", poisonCooldown); + } + } + } + +// if (percentIncrease > 0 && (player.isOnGround()) && (Math.abs(player.moveForward) > 0 || Math.abs(player.moveStrafing) > 0)) +// { +// player.travel(new Vector3d(player.moveStrafing * percentIncrease, 0, player.moveForward * percentIncrease)); +// } + + posXMap.put(player.getUniqueID(), player.getPosX()); + posZMap.put(player.getUniqueID(), player.getPosZ()); + } + } + + @SubscribeEvent + public void onMiningSpeedCheck(PlayerEvent.BreakSpeed event) + { + PlayerEntity player = event.getPlayer(); + float percentIncrease = 0; + + if (LivingUtil.hasFullSet(player)) + { + LivingStats stats = LivingStats.fromPlayer(player, true); + percentIncrease += LivingArmorRegistrar.UPGRADE_DIGGING.get().getBonusValue("speed_modifier", stats.getLevel(LivingArmorRegistrar.UPGRADE_DIGGING.get().getKey())).doubleValue(); + } + + event.setNewSpeed((1 + percentIncrease) * event.getNewSpeed()); + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onBreakBlock(BlockEvent.BreakEvent event) + { + PlayerEntity player = event.getPlayer(); + if (player != null) + { + if (LivingUtil.hasFullSet(player)) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_DIGGING.get(), 1); + LivingStats stats = LivingStats.fromPlayer(player); + int mineTime = LivingArmorRegistrar.UPGRADE_DIGGING.get().getBonusValue("speed_time", stats.getLevel(LivingArmorRegistrar.UPGRADE_DIGGING.get().getKey())).intValue(); + if (mineTime > 0) + { + player.addPotionEffect(new EffectInstance(Effects.HASTE, mineTime, LivingArmorRegistrar.UPGRADE_DIGGING.get().getBonusValue("speed_level", stats.getLevel(LivingArmorRegistrar.UPGRADE_DIGGING.get().getKey())).intValue(), true, false)); + } + } + + ItemStack heldStack = player.getHeldItemMainhand(); + AnointmentHolder holder = AnointmentHolder.fromItemStack(heldStack); + + if (holder != null) + { + if (holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) >= 1) + { + int bonusLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()); + int exp = event.getState().getExpDrop(event.getWorld(), event.getPos(), bonusLevel, holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get())); + event.setExpToDrop(exp); + } + + int hiddenLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_HIDDEN_KNOWLEDGE.get()); + if (hiddenLevel > 0) + { + double expBonus = AnointmentRegistrar.ANOINTMENT_HIDDEN_KNOWLEDGE.get().getBonusValue("exp", hiddenLevel).doubleValue(); + int expAdded = (int) expBonus + (expBonus % 1 > event.getWorld().getRandom().nextDouble() ? 1 : 0); + event.setExpToDrop(event.getExpToDrop() + expAdded); + } + + if (holder.consumeAnointmentDurabilityOnHarvest(heldStack, EquipmentSlotType.MAINHAND)) + holder.toItemStack(heldStack); + } + } + } + + @SubscribeEvent + public void onJump(LivingJumpEvent event) + { + if (event.getEntityLiving() instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) event.getEntityLiving(); + + if (LivingUtil.hasFullSet(player)) + { + LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_JUMP.get(), 1); + if (!player.isSneaking()) + { + LivingStats stats = LivingStats.fromPlayer(player); + double jumpModifier = LivingArmorRegistrar.UPGRADE_JUMP.get().getBonusValue("jump", stats.getLevel(LivingArmorRegistrar.UPGRADE_JUMP.get().getKey())).doubleValue(); + player.setMotion(player.getMotion().add(0, jumpModifier, 0)); + } + } + } + } + + private static final Map rollMap = new HashMap(); + + @SubscribeEvent + public void onEntityUseTick(LivingEntityUseItemEvent.Tick event) + { + ItemStack stack = event.getItem(); + if (stack.getItem() instanceof BowItem || stack.getItem() instanceof CrossbowItem) + { + AnointmentHolder holder = AnointmentHolder.fromItemStack(stack); + if (holder == null) + { + return; + } + int quickDrawLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_QUICK_DRAW.get()); + if (quickDrawLevel > 0) + { + double amount = rollMap.getOrDefault(stack, 0D) + AnointmentRegistrar.ANOINTMENT_QUICK_DRAW.get().getBonusValue("speed", quickDrawLevel).doubleValue(); + if (amount >= 1) + { + int drawReduction = (int) amount; + event.setDuration(event.getDuration() - drawReduction); + } else + { + rollMap.put(stack, amount); + } + } + } + } + + @SubscribeEvent + public void onEntityFinishUse(LivingEntityUseItemEvent.Stop event) + { + ItemStack stack = event.getItem(); + if (stack.getItem() instanceof CrossbowItem) + { + int i = stack.getUseDuration() - event.getDuration(); + float f = getCharge(i, stack); + if (f < 0) + { + return; + } + } + AnointmentHolder holder = AnointmentHolder.fromItemStack(stack); + if (holder != null) + { + if (holder.consumeAnointmentDurabilityOnUseFinish(stack, EquipmentSlotType.MAINHAND)) + { + + holder.toItemStack(stack); + } + } + } + + @SubscribeEvent + public void onEntityJoinEvent(EntityJoinWorldEvent event) + { + Entity entity = event.getEntity(); + if (entity instanceof ArrowEntity) + { + if (entity.ticksExisted <= 0) + { +// System.out.println("An arrow joined the world! Looking for the shooter..."); + ArrowEntity arrowEntity = (ArrowEntity) entity; + Entity shooter = arrowEntity.func_234616_v_(); + if (shooter instanceof PlayerEntity) + { + PlayerEntity playerShooter = (PlayerEntity) shooter; + for (Hand hand : Hand.values()) + { + ItemStack heldStack = playerShooter.getHeldItem(hand); + AnointmentHolder holder = AnointmentHolder.fromItemStack(heldStack); + if (holder == null) + { + continue; + } + + int powerLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_BOW_POWER.get()); + if (powerLevel > 0) + { + arrowEntity.setDamage(arrowEntity.getDamage() * AnointmentRegistrar.ANOINTMENT_BOW_POWER.get().getBonusValue("damage", powerLevel).doubleValue()); + +// System.out.println("Arrow damage is now: " + arrowEntity.getDamage()); + } + + break; + } + } + } + } + } + + @SubscribeEvent + public void onCheckLooting(LootingLevelEvent event) + { + DamageSource source = event.getDamageSource(); + if (source == null) + { + return; + } + Entity entity = source.getTrueSource(); + if (entity instanceof PlayerEntity) + { + ItemStack heldStack = ((PlayerEntity) entity).getHeldItemMainhand(); + AnointmentHolder holder = AnointmentHolder.fromItemStack(heldStack); + if (holder == null) + { + return; + } + + int plunderLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_LOOTING.get()); + if (plunderLevel > 0) + { + event.setLootingLevel(event.getLootingLevel() + plunderLevel); + } + } + } + + private static float getCharge(int useTime, ItemStack stack) + { + float f = (float) useTime / (float) getChargeTime(stack); + if (f > 1.0F) + { + f = 1.0F; + } + + return f; + } + + public static int getChargeTime(ItemStack stack) + { + int i = EnchantmentHelper.getEnchantmentLevel(Enchantments.QUICK_CHARGE, stack); + return i == 0 ? 25 : 25 - 5 * i; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/handler/event/WillHandler.java b/src/main/java/wayoftime/bloodmagic/util/handler/event/WillHandler.java new file mode 100644 index 00000000..1474aa41 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/handler/event/WillHandler.java @@ -0,0 +1,235 @@ +package wayoftime.bloodmagic.util.handler.event; + +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ConcurrentLinkedQueue; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.MobEntity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.potion.EffectInstance; +import net.minecraft.util.DamageSource; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.Difficulty; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import net.minecraft.world.chunk.ChunkStatus; +import net.minecraft.world.chunk.IChunk; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; +import net.minecraftforge.event.world.ChunkDataEvent; +import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.item.BloodMagicItems; +import wayoftime.bloodmagic.demonaura.PosXY; +import wayoftime.bloodmagic.demonaura.WillChunk; +import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler; +import wayoftime.bloodmagic.potion.BloodMagicPotions; +import wayoftime.bloodmagic.will.DemonWillHolder; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillWeapon; +import wayoftime.bloodmagic.will.PlayerDemonWillHandler; + +@Mod.EventBusSubscriber(modid = BloodMagic.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class WillHandler +{ + private static final HashMap SERVER_TICKS = new HashMap<>(); + + // Adds Will to player + @SubscribeEvent + public void onItemPickup(EntityItemPickupEvent event) + { + ItemStack stack = event.getItem().getItem(); + if (stack.getItem() instanceof IDemonWill) + { + PlayerEntity player = event.getPlayer(); + EnumDemonWillType pickupType = ((IDemonWill) stack.getItem()).getType(stack); + ItemStack remainder = PlayerDemonWillHandler.addDemonWill(player, stack); + + if (remainder == null || ((IDemonWill) stack.getItem()).getWill(pickupType, stack) < 0.0001 + || PlayerDemonWillHandler.isDemonWillFull(pickupType, player)) + { + stack.setCount(0); + event.setResult(Event.Result.ALLOW); + } + } + } + +// @SubscribeEvent +// public static void onEntityAttacked(LivingDeathEvent event) +// { +// if (event.getSource() instanceof EntityDamageSourceIndirect) +// { +// Entity sourceEntity = event.getSource().getImmediateSource(); +// +// if (sourceEntity instanceof EntitySentientArrow) +// { +// ((EntitySentientArrow) sourceEntity).reimbursePlayer(event.getEntityLiving(), event.getEntityLiving().getMaxHealth()); +// } +// } +// } + + // Add/Drop Demon Will for Player + @SubscribeEvent + public void onLivingDrops(LivingDropsEvent event) + { + LivingEntity attackedEntity = event.getEntityLiving(); + DamageSource source = event.getSource(); + Entity entity = source.getTrueSource(); + + if (attackedEntity.isPotionActive(BloodMagicPotions.SOUL_SNARE) && (attackedEntity instanceof MobEntity + || attackedEntity.getEntityWorld().getDifficulty() == Difficulty.PEACEFUL)) + { + EffectInstance eff = attackedEntity.getActivePotionEffect(BloodMagicPotions.SOUL_SNARE); + int lvl = eff.getAmplifier(); + + double amountOfSouls = attackedEntity.getEntityWorld().rand.nextDouble() * (lvl + 1) * (lvl + 1) * 4 + 1; + ItemStack soulStack = ((IDemonWill) BloodMagicItems.MONSTER_SOUL_RAW.get()).createWill(amountOfSouls); + event.getDrops().add(new ItemEntity(attackedEntity.getEntityWorld(), attackedEntity.getPosX(), attackedEntity.getPosY(), attackedEntity.getPosZ(), soulStack)); + } + + if (entity != null && entity instanceof PlayerEntity) + { + PlayerEntity player = (PlayerEntity) entity; + ItemStack heldStack = player.getHeldItemMainhand(); + if (heldStack.getItem() instanceof IDemonWillWeapon && !player.getEntityWorld().isRemote) + { + IDemonWillWeapon demonWillWeapon = (IDemonWillWeapon) heldStack.getItem(); + List droppedSouls = demonWillWeapon.getRandomDemonWillDrop(attackedEntity, player, heldStack, event.getLootingLevel()); + if (!droppedSouls.isEmpty()) + { + ItemStack remainder; + for (ItemStack willStack : droppedSouls) + { + remainder = PlayerDemonWillHandler.addDemonWill(player, willStack); + + if (!remainder.isEmpty()) + { + EnumDemonWillType pickupType = ((IDemonWill) remainder.getItem()).getType(remainder); + if (((IDemonWill) remainder.getItem()).getWill(pickupType, remainder) >= 0.0001) + { + event.getDrops().add(new ItemEntity(attackedEntity.getEntityWorld(), attackedEntity.getPosX(), attackedEntity.getPosY(), attackedEntity.getPosZ(), remainder)); + } + } + } + player.container.detectAndSendChanges(); + } + } + } + } + + @SubscribeEvent + public void onServerWorldTick(TickEvent.WorldTickEvent event) + { + if (event.world.isRemote) + return; + + ResourceLocation rl = WorldDemonWillHandler.getDimensionResourceLocation(event.world); +// int dim = event.world.provider.getDimension(); + if (event.phase == TickEvent.Phase.END) + { + if (!SERVER_TICKS.containsKey(rl)) + SERVER_TICKS.put(rl, 0); + + int ticks = (SERVER_TICKS.get(rl)); + + if (ticks % 20 == 0) + { +// CopyOnWriteArrayList dirtyChunks = WorldDemonWillHandler.dirtyChunks.get(rl); + ConcurrentLinkedQueue dirtyChunks = WorldDemonWillHandler.dirtyChunks.get(rl); + if ((dirtyChunks != null) && (dirtyChunks.size() > 0)) + { + for (PosXY pos : dirtyChunks) + { + IChunk chunk = event.world.getChunk(pos.x, pos.y, ChunkStatus.FULL, false); + if (chunk != null) + { + chunk.setModified(true); + } + } + + dirtyChunks.clear(); + } + } + + SERVER_TICKS.put(rl, ticks + 1); + } + + } + + public static boolean isBlockLoaded(IBlockReader world, BlockPos pos) + { + if (world == null || !World.isValid(pos)) + { + return false; + } else if (world instanceof IWorldReader) + { + // Note: We don't bother checking if it is a world and then isBlockPresent + // because + // all that does is also validate the y value is in bounds, and we already check + // to make + // sure the position is valid both in the y and xz directions + return ((IWorldReader) world).isBlockLoaded(pos); + } + return true; + } + + @SubscribeEvent + public void chunkSave(ChunkDataEvent.Save event) + { + if (!(event.getWorld() instanceof World)) + { + return; + } + ResourceLocation rl = WorldDemonWillHandler.getDimensionResourceLocation((World) event.getWorld()); +// int dim = event.getWorld().provider.getDimension(); + + ChunkPos loc = event.getChunk().getPos(); + + CompoundNBT nbt = new CompoundNBT(); + event.getData().put("BloodMagic", nbt); + + WillChunk ac = WorldDemonWillHandler.getWillChunk(rl, loc.x, loc.z); + if (ac != null) + { + nbt.putShort("base", ac.getBase()); + ac.getCurrentWill().writeToNBT(nbt, "current"); +// if (event.getChunk() instanceof Chunk && !((Chunk) event.getChunk()).setLoaded(loaded);) + if (!event.getWorld().getChunkProvider().isChunkLoaded(event.getChunk().getPos())) + WorldDemonWillHandler.removeWillChunk(rl, loc.x, loc.z); + } + } + + @SubscribeEvent + public void chunkLoad(ChunkDataEvent.Load event) + { + if (!(event.getWorld() instanceof World)) + { + return; + } + ResourceLocation rl = WorldDemonWillHandler.getDimensionResourceLocation((World) event.getWorld()); +// int dim = event.getWorld().provider.getDimension(); + if (event.getData().getCompound("BloodMagic").contains("base")) + { + CompoundNBT nbt = event.getData().getCompound("BloodMagic"); + short base = nbt.getShort("base"); + DemonWillHolder current = new DemonWillHolder(); + current.readFromNBT(nbt, "current"); + WorldDemonWillHandler.addWillChunk(rl, event.getChunk(), base, current); + } else + { + WorldDemonWillHandler.generateWill(event.getChunk(), (World) event.getWorld()); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/BindableHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/BindableHelper.java new file mode 100644 index 00000000..061e6c6a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/BindableHelper.java @@ -0,0 +1,54 @@ +package wayoftime.bloodmagic.util.helper; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.event.ItemBindEvent; +import wayoftime.bloodmagic.util.Constants; + +public class BindableHelper +{ + + public static void applyBinding(ItemStack stack, PlayerEntity player) + { + Binding binding = new Binding(player.getGameProfile().getId(), player.getGameProfile().getName()); + applyBinding(stack, binding); + } + + public static void applyBinding(ItemStack stack, Binding binding) + { + if (!stack.hasTag()) + stack.setTag(new CompoundNBT()); + + stack.getTag().put("binding", binding.serializeNBT()); + } + + /** + * Sets the Owner Name of the item without checking if it is already bound. Also + * bypasses {@link ItemBindEvent}. + * + * @param stack - The ItemStack to bind + * @param ownerName - The username to bind the ItemStack to + */ + public static void setItemOwnerName(ItemStack stack, String ownerName) + { + stack = NBTHelper.checkNBT(stack); + + stack.getTag().putString(Constants.NBT.OWNER_NAME, ownerName); + } + + /** + * Sets the Owner UUID of the item without checking if it is already bound. Also + * bypasses {@link ItemBindEvent}. + * + * @param stack - The ItemStack to bind + * @param ownerUUID - The UUID to bind the ItemStack to + */ + public static void setItemOwnerUUID(ItemStack stack, String ownerUUID) + { + stack = NBTHelper.checkNBT(stack); + + stack.getTag().putString(Constants.NBT.OWNER_UUID, ownerUUID); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/IncenseHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/IncenseHelper.java new file mode 100644 index 00000000..4e071189 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/IncenseHelper.java @@ -0,0 +1,55 @@ +package wayoftime.bloodmagic.util.helper; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import wayoftime.bloodmagic.util.Constants; + +public class IncenseHelper +{ + + public static double getCurrentIncense(PlayerEntity player) + { + CompoundNBT data = player.getPersistentData(); + if (data.contains(Constants.NBT.CURRENT_INCENSE)) + { + return data.getDouble(Constants.NBT.CURRENT_INCENSE); + } + + return 0; + } + + public static void setCurrentIncense(PlayerEntity player, double amount) + { + CompoundNBT data = player.getPersistentData(); + data.putDouble(Constants.NBT.CURRENT_INCENSE, amount); + } + + public static void setMaxIncense(PlayerEntity player, double amount) + { + CompoundNBT data = player.getPersistentData(); + data.putDouble(Constants.NBT.MAX_INCENSE, amount); + } + + public static double getMaxIncense(PlayerEntity player) + { + CompoundNBT data = player.getPersistentData(); + if (data.contains(Constants.NBT.MAX_INCENSE)) + { + return data.getDouble(Constants.NBT.MAX_INCENSE); + } + return 0; + } + + public static void setHasMaxIncense(ItemStack stack, PlayerEntity player, boolean isMax) + { + stack = NBTHelper.checkNBT(stack); + stack.getTag().putBoolean(Constants.NBT.HAS_MAX_INCENSE, isMax); + } + + public static boolean getHasMaxIncense(ItemStack stack) + { + stack = NBTHelper.checkNBT(stack); + return stack.getTag().getBoolean(Constants.NBT.HAS_MAX_INCENSE); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/NBTHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/NBTHelper.java new file mode 100644 index 00000000..f7fdaa52 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/NBTHelper.java @@ -0,0 +1,15 @@ +package wayoftime.bloodmagic.util.helper; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; + +public class NBTHelper +{ + public static ItemStack checkNBT(ItemStack stack) + { + if (stack.getTag() == null) + stack.setTag(new CompoundNBT()); + + return stack; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/NetworkHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/NetworkHelper.java new file mode 100644 index 00000000..0dc98add --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/NetworkHelper.java @@ -0,0 +1,183 @@ +package wayoftime.bloodmagic.util.helper; + +import java.util.UUID; + +import javax.annotation.Nullable; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.storage.DimensionSavedDataManager; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.server.ServerLifecycleHooks; +import wayoftime.bloodmagic.core.data.BMWorldSavedData; +import wayoftime.bloodmagic.core.data.Binding; +import wayoftime.bloodmagic.core.data.SoulNetwork; +import wayoftime.bloodmagic.core.data.SoulTicket; +import wayoftime.bloodmagic.core.registry.OrbRegistry; +import wayoftime.bloodmagic.event.SoulNetworkEvent; +import wayoftime.bloodmagic.common.item.IBindable; +import wayoftime.bloodmagic.common.item.BloodOrb; +import wayoftime.bloodmagic.common.item.IBloodOrb; + +public class NetworkHelper +{ + @Nullable + private static BMWorldSavedData dataHandler; + + /** + * Gets the SoulNetwork for the player. + * + * @param uuid - The UUID of the SoulNetwork owner - this is UUID.toString(). + * @return - The SoulNetwork for the given name. + */ + public static SoulNetwork getSoulNetwork(String uuid) + { + if (dataHandler == null) + { + if (ServerLifecycleHooks.getCurrentServer() == null) + return null; + + DimensionSavedDataManager savedData = ServerLifecycleHooks.getCurrentServer().func_241755_D_().getSavedData(); + dataHandler = savedData.getOrCreate(() -> new BMWorldSavedData(), BMWorldSavedData.ID); + } + + return dataHandler.getNetwork(UUID.fromString(uuid)); + } + + /** + * @param uuid - The Player's Mojang UUID + * @see NetworkHelper#getSoulNetwork(String) + */ + public static SoulNetwork getSoulNetwork(UUID uuid) + { + return getSoulNetwork(uuid.toString()); + } + + /** + * @param player - The Player + * @see NetworkHelper#getSoulNetwork(String) + */ + public static SoulNetwork getSoulNetwork(PlayerEntity player) + { + return getSoulNetwork(PlayerHelper.getUUIDFromPlayer(player)); + } + + public static SoulNetwork getSoulNetwork(Binding binding) + { + return getSoulNetwork(binding.getOwnerId()); + } + + /** + * Gets the current orb tier of the SoulNetwork. + * + * @param soulNetwork - SoulNetwork to get the tier of. + * @return - The Orb tier of the given SoulNetwork + */ + public static int getCurrentMaxOrb(SoulNetwork soulNetwork) + { + return soulNetwork.getOrbTier(); + } + + public static int getMaximumForTier(int tier) + { + int ret = 0; + + if (tier > OrbRegistry.getTierMap().size() || tier < 0) + return ret; + + for (ItemStack orbStack : OrbRegistry.getOrbsForTier(tier)) + { + BloodOrb orb = ((IBloodOrb) orbStack.getItem()).getOrb(orbStack); + if (orb.getCapacity() > ret) + ret = orb.getCapacity(); + } + + return ret; + } + + // Syphon + + /** + * Syphons from the player and damages them if there was not enough stored LP. + *

+ * Handles null-checking the player for you. + * + * @param soulNetwork - SoulNetwork to syphon from + * @param user - User of the item. + * @param toSyphon - Amount of LP to syphon + * @return - Whether the action should be performed. + * @deprecated Use {@link #getSoulNetwork(PlayerEntity)} and + * {@link SoulNetwork#syphonAndDamage$(PlayerEntity, SoulTicket)} + */ + @Deprecated + public static boolean syphonAndDamage(SoulNetwork soulNetwork, PlayerEntity user, int toSyphon) + { + +// if (soulNetwork.getNewOwner() == null) +// { +// soulNetwork.syphon(toSyphon); +// return true; +// } + + return soulNetwork.syphonAndDamage(user, toSyphon); + } + + /** + * Syphons a player from within a container. + * + * @param stack - ItemStack in the Container. + * @param ticket - SoulTicket to syphon + * @return - If the syphon was successful. + */ + public static boolean syphonFromContainer(ItemStack stack, SoulTicket ticket) + { + if (!(stack.getItem() instanceof IBindable)) + return false; + + Binding binding = ((IBindable) stack.getItem()).getBinding(stack); + if (binding == null) + return false; + + SoulNetwork network = getSoulNetwork(binding); + SoulNetworkEvent.Syphon.Item event = new SoulNetworkEvent.Syphon.Item(network, ticket, stack); + + return !MinecraftForge.EVENT_BUS.post(event) && network.syphon(event.getTicket(), true) >= ticket.getAmount(); + } + + /** + * Checks if the ItemStack has a user to be syphoned from. + * + * @param stack - ItemStack to check + * @param toSyphon - Amount of LP to syphon + * @return - If syphoning is possible + */ + public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon) + { + if (!(stack.getItem() instanceof IBindable)) + return false; + + Binding binding = ((IBindable) stack.getItem()).getBinding(stack); + if (binding == null) + return false; + + SoulNetwork network = getSoulNetwork(binding); + if (network == null) + return false; + + return network.getCurrentEssence() >= toSyphon; + } + + // Set + + /** + * Sets the orb tier of the SoulNetwork to the given orb. Will not set if the + * given tier is lower than the current tier. + * + * @param soulNetwork - SoulNetwork to set the orb tier of + * @param maxOrb - Tier of orb to set to + */ + public static void setMaxOrb(SoulNetwork soulNetwork, int maxOrb) + { + soulNetwork.setOrbTier(Math.max(maxOrb, soulNetwork.getOrbTier())); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/NumeralHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/NumeralHelper.java new file mode 100644 index 00000000..f2c5d320 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/NumeralHelper.java @@ -0,0 +1,35 @@ +package wayoftime.bloodmagic.util.helper; + +import java.util.TreeMap; + +public class NumeralHelper +{ + + private static final TreeMap romanNumerals = new TreeMap(); + + static + { + romanNumerals.put(1000, "M"); + romanNumerals.put(900, "CM"); + romanNumerals.put(500, "D"); + romanNumerals.put(400, "CD"); + romanNumerals.put(100, "C"); + romanNumerals.put(90, "XC"); + romanNumerals.put(50, "L"); + romanNumerals.put(40, "XL"); + romanNumerals.put(10, "X"); + romanNumerals.put(9, "IX"); + romanNumerals.put(5, "V"); + romanNumerals.put(4, "IV"); + romanNumerals.put(1, "I"); + } + + public static String toRoman(int arabic) + { + int convert = romanNumerals.floorKey(arabic); + if (arabic == convert) + return romanNumerals.get(convert); + + return romanNumerals.get(convert) + toRoman(arabic - convert); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/PlayerHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/PlayerHelper.java new file mode 100644 index 00000000..7150adc2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/PlayerHelper.java @@ -0,0 +1,61 @@ +package wayoftime.bloodmagic.util.helper; + +import java.util.ArrayList; +import java.util.UUID; + +import com.google.common.collect.Lists; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraftforge.common.UsernameCache; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.fml.server.ServerLifecycleHooks; + +public class PlayerHelper +{ + /** + * A list of all known fake players that do not extend FakePlayer. + *

+ * Will be added to as needed. + */ + private static final ArrayList knownFakePlayers = Lists.newArrayList(); + + public static PlayerEntity getPlayerFromId(UUID uuid) + { + // TODO: Need to find a reliable way to get whether the side is Client or Server + + if (ServerLifecycleHooks.getCurrentServer() == null) + { + return null; + } + + return ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayerByUUID(uuid); + +// return FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerByUUID(uuid); + } + + public static PlayerEntity getPlayerFromUUID(UUID uuid) + { + return getPlayerFromId(uuid); + } + + public static UUID getUUIDFromPlayer(PlayerEntity player) + { + return player.getGameProfile().getId(); + } + + public static String getUsernameFromUUID(UUID uuid) + { + return UsernameCache.getLastKnownUsername(uuid); + } + + /** + * Checks whether or not the given player is an "actual" player + * + * @param player - The player in question + * @return If the player is fake or not + */ + public static boolean isFakePlayer(PlayerEntity player) + { + return player instanceof FakePlayer || (player != null && knownFakePlayers.contains(player.getClass().getCanonicalName())); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/PlayerSacrificeHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/PlayerSacrificeHelper.java new file mode 100644 index 00000000..0f247bbc --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/PlayerSacrificeHelper.java @@ -0,0 +1,159 @@ +package wayoftime.bloodmagic.util.helper; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.potion.Potion; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import wayoftime.bloodmagic.ConfigHandler; +import wayoftime.bloodmagic.altar.IBloodAltar; +import wayoftime.bloodmagic.event.SacrificeKnifeUsedEvent; + +public class PlayerSacrificeHelper +{ + public static float scalingOfSacrifice = 1f; + public static int soulFrayDuration = 400; + public static Potion soulFrayId; + + public static double getPlayerIncense(PlayerEntity player) + { +// return 0; + return IncenseHelper.getCurrentIncense(player); + } + + public static void setPlayerIncense(PlayerEntity player, double amount) + { + IncenseHelper.setCurrentIncense(player, amount); + } + + public static boolean incrementIncense(PlayerEntity player, double min, double incenseAddition, double increment) + { +// return true; + double amount = getPlayerIncense(player); + if (amount < min || amount >= incenseAddition) + { + return false; + } + + amount = amount + Math.min(increment, incenseAddition - amount); + setPlayerIncense(player, amount); + + if (amount == incenseAddition) + { + IncenseHelper.setMaxIncense(player, incenseAddition); + } + // System.out.println("Amount of incense: " + amount + ", Increment: " + + // increment); + + return true; + } + + /** + * Sacrifices a player's health while the player is under the influence of + * incense + * + * @param player - The player sacrificing + * @return Whether or not the health sacrificing succeeded + */ + public static boolean sacrificePlayerHealth(PlayerEntity player) + { +// if (player.isPotionActive(soulFrayId)) +// { +// return false; +// } + + double amount = getPlayerIncense(player); + + if (amount >= 0) + { + float health = player.getHealth(); + float maxHealth = player.getMaxHealth(); + + if (health > maxHealth / 10.0) + { + float sacrificedHealth = health - maxHealth / 10.0f; + int lpAdded = (int) (sacrificedHealth * ConfigHandler.values.sacrificialDaggerConversion * getModifier(amount)); + + IBloodAltar altar = getAltar(player.getEntityWorld(), player.getPosition()); + if (altar != null) + { + SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, (int) sacrificedHealth, lpAdded); + if (MinecraftForge.EVENT_BUS.post(evt)) + return false; + + altar.sacrificialDaggerCall(evt.lpAdded, false); + altar.startCycle(); + + player.setHealth(maxHealth / 10.0f); + setPlayerIncense(player, 0); +// player.addPotionEffect(new PotionEffect(RegistrarBloodMagic.SOUL_FRAY, soulFrayDuration)); + + return true; + } + } + } + + return false; + } + + public static double getModifier(double amount) + { + return 1 + amount * scalingOfSacrifice; + } + + /** + * Finds the nearest {@link IBloodAltar} and attempts to fill it + * + * @param world - The world + * @param sacrificingEntity - The entity having the sacrifice done on (can be + * {@link PlayerEntity} for self-sacrifice) + * @param amount - The amount of which the altar should be filled + * @param isSacrifice - Whether this is a Sacrifice or a Self-Sacrifice + * @return Whether the altar is found and (attempted) filled + */ + public static boolean findAndFillAltar(World world, LivingEntity sacrificingEntity, int amount, boolean isSacrifice) + { + IBloodAltar altarEntity = getAltar(world, sacrificingEntity.getPosition()); + + if (altarEntity == null) + return false; + + altarEntity.sacrificialDaggerCall(amount, isSacrifice); + altarEntity.startCycle(); + + return true; + } + + /** + * Gets the nearest {@link IBloodAltar} + * + * @param world - The world + * @param blockPos - The position of where the check should be in (in a 2 block + * radius from this) + * @return The nearest altar, if no altar is found, then this will return null + */ + public static IBloodAltar getAltar(World world, BlockPos blockPos) + { + TileEntity tileEntity; + + for (int x = -2; x <= 2; x++) + { + for (int y = -2; y <= 1; y++) + { + for (int z = -2; z <= 2; z++) + { + tileEntity = world.getTileEntity(blockPos.add(x, y, z)); + + if (tileEntity instanceof IBloodAltar) + { + return (IBloodAltar) tileEntity; + } + } + } + } + + return null; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/RitualHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/RitualHelper.java new file mode 100644 index 00000000..3862d73a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/RitualHelper.java @@ -0,0 +1,253 @@ +package wayoftime.bloodmagic.util.helper; + +import java.util.List; + +import org.apache.commons.lang3.tuple.Pair; + +import com.google.common.collect.Lists; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.CapabilityInject; +import net.minecraftforge.common.util.LazyOptional; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.common.block.BlockRitualStone; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.ritual.IRitualStone; +import wayoftime.bloodmagic.ritual.IRitualStone.Tile; +import wayoftime.bloodmagic.ritual.Ritual; +import wayoftime.bloodmagic.ritual.RitualComponent; +import wayoftime.bloodmagic.tile.TileMasterRitualStone; + +public class RitualHelper +{ + @CapabilityInject(IRitualStone.Tile.class) + static Capability RUNE_CAPABILITY = null; + + public static boolean canCrystalActivate(Ritual ritual, int crystalLevel) + { + return ritual.getCrystalLevel() <= crystalLevel + && BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(ritual), false); + } + + /** + * Checks the RitualRegistry to see if the configuration of the ritual stones in + * the world is valid for the given Direction. + * + * @param world - The world + * @param pos - Location of the MasterRitualStone + * @return The ID of the valid ritual + */ + public static String getValidRitual(World world, BlockPos pos) + { + for (Ritual ritual : BloodMagic.RITUAL_MANAGER.getRituals()) + { + for (int i = 0; i < 4; i++) + { + Direction direction = Direction.byHorizontalIndex(i); + + if (checkValidRitual(world, pos, ritual, direction)) + return BloodMagic.RITUAL_MANAGER.getId(ritual); + } + } + + return ""; + } + + public static Direction getDirectionOfRitual(World world, BlockPos pos, Ritual ritual) + { + for (int i = 0; i < 4; i++) + { + Direction direction = Direction.byHorizontalIndex(i); + if (checkValidRitual(world, pos, ritual, direction)) + return direction; + } + + return null; + } + + public static boolean checkValidRitual(World world, BlockPos pos, Ritual ritual, Direction direction) + { + if (ritual == null) + { + return false; + } + + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + + for (RitualComponent component : components) + { + BlockPos newPos = pos.add(component.getOffset(direction)); + if (!isRuneType(world, newPos, component.getRuneType())) + return false; + } + + return true; + } + + public static boolean isRuneType(World world, BlockPos pos, EnumRuneType type) + { + if (world == null) + return false; + Block block = world.getBlockState(pos).getBlock(); + TileEntity tile = world.getTileEntity(pos); + + if (block instanceof IRitualStone) + return ((IRitualStone) block).isRuneType(world, pos, type); + else if (tile instanceof IRitualStone.Tile) + return ((IRitualStone.Tile) tile).isRuneType(type); + else if (tile != null && tile.getCapability(RUNE_CAPABILITY, null).isPresent()) + return tile.getCapability(RUNE_CAPABILITY, null).resolve().get().isRuneType(type); + + return false; + } + + public static boolean isRune(World world, BlockPos pos) + { + if (world == null) + return false; + Block block = world.getBlockState(pos).getBlock(); + TileEntity tile = world.getTileEntity(pos); + + if (block instanceof IRitualStone) + return true; + else if (tile instanceof IRitualStone.Tile) + return true; + else + return tile != null && tile.getCapability(RUNE_CAPABILITY, null).isPresent(); + + } + + public static void setRuneType(World world, BlockPos pos, EnumRuneType type) + { + if (world == null) + return; + BlockState state = world.getBlockState(pos); + TileEntity tile = world.getTileEntity(pos); + + if (state.getBlock() instanceof IRitualStone) + ((IRitualStone) state.getBlock()).setRuneType(world, pos, type); + else if (tile instanceof IRitualStone.Tile) + ((IRitualStone.Tile) tile).setRuneType(type); + else + { + LazyOptional cap = tile.getCapability(RUNE_CAPABILITY, null); + if (cap.isPresent()) + { + cap.resolve().get().setRuneType(type); + world.notifyBlockUpdate(pos, state, state, 3); + } + + } + } + + public static boolean createRitual(World world, BlockPos pos, Direction direction, Ritual ritual, boolean safe) + { + + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + + if (abortConstruction(world, pos, direction, safe, components)) + return false; + + BlockState mrs = BloodMagicBlocks.MASTER_RITUAL_STONE.get().getDefaultState(); + world.setBlockState(pos, mrs); + + setRitualStones(direction, world, pos, components); + return true; + } + + public static boolean abortConstruction(World world, BlockPos pos, Direction direction, boolean safe, List components) + { + // TODO: can be optimized to check only for the first and last component if + // every ritual has those at the highest and lowest y-level respectivly. + for (RitualComponent component : components) + { + BlockPos offset = component.getOffset(direction); + BlockPos newPos = pos.add(offset); + if (world.isOutsideBuildHeight(newPos) || (safe && !world.isAirBlock(newPos))) + return true; + } + return false; + } + + public static boolean repairRitualFromRuins(TileMasterRitualStone tile, boolean safe) + { + Ritual ritual = tile.getCurrentRitual(); + Direction direction; + Pair pair; + if (ritual == null) + { + pair = getRitualFromRuins(tile); + ritual = pair.getKey(); + direction = pair.getValue(); + } else + direction = tile.getDirection(); + + World world = tile.getWorld(); + BlockPos pos = tile.getPos(); + + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + + if (abortConstruction(world, pos, direction, safe, components)) + return false; + + setRitualStones(direction, world, pos, components); + return true; + } + + public static void setRitualStones(Direction direction, World world, BlockPos pos, List gatheredComponents) + { + for (RitualComponent component : gatheredComponents) + { + BlockPos offset = component.getOffset(direction); + BlockPos newPos = pos.add(offset); + ((BlockRitualStone) BloodMagicBlocks.BLANK_RITUAL_STONE.get()).setRuneType(world, newPos, component.getRuneType()); + } + } + + public static Pair getRitualFromRuins(TileMasterRitualStone tile) + { + BlockPos pos = tile.getPos(); + World world = tile.getWorld(); + Ritual possibleRitual = tile.getCurrentRitual(); + Direction possibleDirection = tile.getDirection(); + int highestCount = 0; + + if (possibleRitual == null || possibleDirection == null) + for (Ritual ritual : BloodMagic.RITUAL_MANAGER.getRituals()) + { + for (int i = 0; i < 4; i++) + { + Direction direction = Direction.byHorizontalIndex(i); + List components = Lists.newArrayList(); + ritual.gatherComponents(components::add); + int currentCount = 0; + + for (RitualComponent component : components) + { + BlockPos newPos = pos.add(component.getOffset(direction)); + if (isRuneType(world, newPos, component.getRuneType())) + currentCount += 1; + } + if (currentCount > highestCount) + { + highestCount = currentCount; + possibleRitual = ritual; + possibleDirection = direction; + } + + } + + } + return Pair.of(possibleRitual, possibleDirection); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/util/helper/TextHelper.java b/src/main/java/wayoftime/bloodmagic/util/helper/TextHelper.java new file mode 100644 index 00000000..34d1da08 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/helper/TextHelper.java @@ -0,0 +1,77 @@ +package wayoftime.bloodmagic.util.helper; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.text.WordUtils; + +import net.minecraft.client.resources.I18n; + +public class TextHelper +{ + public static String getFormattedText(String string) + { + return string.replaceAll("&", "\u00A7"); + } + + public static String localize(String input, Object... format) + { + return I18n.format(input, format); + } + + public static String localizeEffect(String input, Object... format) + { + return getFormattedText(localize(input, format)); + } + + public static String[] localizeAll(String[] input) + { + String[] ret = new String[input.length]; + for (int i = 0; i < input.length; i++) + ret[i] = localize(input[i]); + + return ret; + } + + public static String[] localizeAllEffect(String[] input) + { + String[] ret = new String[input.length]; + for (int i = 0; i < input.length; i++) + ret[i] = localizeEffect(input[i]); + + return ret; + } + + public static ArrayList localizeAll(List input) + { + ArrayList ret = new ArrayList<>(input.size()); + for (int i = 0; i < input.size(); i++) + ret.add(i, localize(input.get(i))); + + return ret; + } + + public static ArrayList localizeAllEffect(List input) + { + ArrayList ret = new ArrayList<>(input.size()); + for (int i = 0; i < input.size(); i++) + ret.add(i, localizeEffect(input.get(i))); + + return ret; + } + + public static String[] cutLongString(String string, int characters) + { + return WordUtils.wrap(string, characters, "/cut", false).split("/cut"); + } + + public static String[] cutLongString(String string) + { + return cutLongString(string, 30); + } + + public static boolean canTranslate(String key) + { + return I18n.hasKey(key); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/providers/IBaseProvider.java b/src/main/java/wayoftime/bloodmagic/util/providers/IBaseProvider.java new file mode 100644 index 00000000..af0a7f94 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/providers/IBaseProvider.java @@ -0,0 +1,23 @@ +package wayoftime.bloodmagic.util.providers; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import wayoftime.bloodmagic.util.text.IHasTextComponent; +import wayoftime.bloodmagic.util.text.IHasTranslationKey; + +public interface IBaseProvider extends IHasTextComponent, IHasTranslationKey +{ + ResourceLocation getRegistryName(); + + default String getName() + { + return getRegistryName().getPath(); + } + + @Override + default ITextComponent getTextComponent() + { + return new TranslationTextComponent(getTranslationKey()); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/providers/IEntityTypeProvider.java b/src/main/java/wayoftime/bloodmagic/util/providers/IEntityTypeProvider.java new file mode 100644 index 00000000..07785354 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/providers/IEntityTypeProvider.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.util.providers; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.EntityType; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; + +public interface IEntityTypeProvider extends IBaseProvider +{ + + @Nonnull + EntityType getEntityType(); + + @Override + default ResourceLocation getRegistryName() + { + return getEntityType().getRegistryName(); + } + + @Override + default ITextComponent getTextComponent() + { + return getEntityType().getName(); + } + + @Override + default String getTranslationKey() + { + return getEntityType().getTranslationKey(); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/text/IHasTextComponent.java b/src/main/java/wayoftime/bloodmagic/util/text/IHasTextComponent.java new file mode 100644 index 00000000..9f77ad56 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/text/IHasTextComponent.java @@ -0,0 +1,8 @@ +package wayoftime.bloodmagic.util.text; + +import net.minecraft.util.text.ITextComponent; + +public interface IHasTextComponent +{ + ITextComponent getTextComponent(); +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/util/text/IHasTranslationKey.java b/src/main/java/wayoftime/bloodmagic/util/text/IHasTranslationKey.java new file mode 100644 index 00000000..b23d79b6 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/util/text/IHasTranslationKey.java @@ -0,0 +1,6 @@ +package wayoftime.bloodmagic.util.text; + +public interface IHasTranslationKey +{ + String getTranslationKey(); +} diff --git a/src/main/java/wayoftime/bloodmagic/will/DemonWillHolder.java b/src/main/java/wayoftime/bloodmagic/will/DemonWillHolder.java new file mode 100644 index 00000000..aa122e23 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/will/DemonWillHolder.java @@ -0,0 +1,100 @@ +package wayoftime.bloodmagic.will; + +import java.util.HashMap; +import java.util.Map.Entry; + +import net.minecraft.nbt.CompoundNBT; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; + +public class DemonWillHolder +{ + public HashMap willMap = new HashMap<>(); + + public double addWill(EnumDemonWillType type, double amount, double max) + { + double current = 0; + if (willMap.containsKey(type)) + { + current = willMap.get(type); + } + + double added = Math.min(max - current, amount); + addWill(type, amount); + + return added; + } + + public void addWill(EnumDemonWillType type, double amount) + { + if (willMap.containsKey(type)) + { + willMap.put(type, amount + willMap.get(type)); + } else + { + willMap.put(type, amount); + } + } + + public double drainWill(EnumDemonWillType type, double amount) + { + if (willMap.containsKey(type)) + { + double current = willMap.get(type); + double reduced = Math.min(current, amount); + + if (reduced >= current) + { + willMap.remove(type); + } else + { + willMap.put(type, current - reduced); + } + + return reduced; + } + + return 0; + } + + public double getWill(EnumDemonWillType type) + { + if (willMap.containsKey(type)) + { + return willMap.get(type); + } + + return 0; + } + + public void readFromNBT(CompoundNBT tag, String key) + { + CompoundNBT willTag = tag.getCompound(key); + + willMap.clear(); + + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + double amount = willTag.getDouble("EnumWill" + type.name()); + if (amount > 0) + { + willMap.put(type, amount); + } + } + } + + public void writeToNBT(CompoundNBT tag, String key) + { + CompoundNBT willTag = new CompoundNBT(); + for (Entry entry : willMap.entrySet()) + { + willTag.putDouble("EnumWill" + entry.getKey().name(), entry.getValue()); + } + + tag.put(key, willTag); + } + + public void clearWill() + { + willMap.clear(); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/will/PlayerDemonWillHandler.java b/src/main/java/wayoftime/bloodmagic/will/PlayerDemonWillHandler.java new file mode 100644 index 00000000..3a9de35a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/will/PlayerDemonWillHandler.java @@ -0,0 +1,203 @@ +package wayoftime.bloodmagic.will; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import wayoftime.bloodmagic.api.compat.EnumDemonWillType; +import wayoftime.bloodmagic.api.compat.IDemonWill; +import wayoftime.bloodmagic.api.compat.IDemonWillGem; +import wayoftime.bloodmagic.util.helper.NetworkHelper; + +/** + * This class provides several helper methods in order to handle soul + * consumption and use for a player. This refers to the Soul System, meaning + * Monster Souls and Soul Gems, etc. The Soul Network's helper methods are found + * in {@link NetworkHelper} + */ +public class PlayerDemonWillHandler +{ + /** + * Gets the total amount of Will a player contains in their inventory + * + * @param type - The type of Will to check for + * @param player - The player to check the will of + * @return - The amount of will the player contains + */ + public static double getTotalDemonWill(EnumDemonWillType type, PlayerEntity player) + { + NonNullList inventory = player.inventory.mainInventory; + double souls = 0; + + for (ItemStack stack : inventory) + { + if (stack.getItem() instanceof IDemonWill && ((IDemonWill) stack.getItem()).getType(stack) == type) + { + souls += ((IDemonWill) stack.getItem()).getWill(type, stack); + } else if (stack.getItem() instanceof IDemonWillGem) + { + souls += ((IDemonWillGem) stack.getItem()).getWill(type, stack); + } + } + + return souls; + } + + public static EnumDemonWillType getLargestWillType(PlayerEntity player) + { + EnumDemonWillType type = EnumDemonWillType.DEFAULT; + double max = getTotalDemonWill(type, player); + + for (EnumDemonWillType testType : EnumDemonWillType.values()) + { + double value = getTotalDemonWill(testType, player); + if (value > max) + { + type = testType; + } + } + + return type; + } + + /** + * Checks if the player's Tartaric gems are completely full. + * + * @param type - The type of Will to check for + * @param player - The player to check the Will of + * @return - True if all Will containers are full, false if not. + */ + public static boolean isDemonWillFull(EnumDemonWillType type, PlayerEntity player) + { + NonNullList inventory = player.inventory.mainInventory; + + boolean hasGem = false; + for (ItemStack stack : inventory) + { + if (stack.getItem() instanceof IDemonWillGem) + { + hasGem = true; + if (((IDemonWillGem) stack.getItem()).getWill(type, stack) < ((IDemonWillGem) stack.getItem()).getMaxWill(type, stack)) + return false; + } + } + + return hasGem; + } + + /** + * Consumes Will from the inventory of a given player + * + * @param player - The player to consume the will of + * @param amount - The amount of will to consume + * @return - The amount of will consumed. + */ + public static double consumeDemonWill(EnumDemonWillType type, PlayerEntity player, double amount) + { + double consumed = 0; + + NonNullList inventory = player.inventory.mainInventory; + + for (int i = 0; i < inventory.size(); i++) + { + if (consumed >= amount) + return consumed; + + ItemStack stack = inventory.get(i); + if (stack.getItem() instanceof IDemonWill && ((IDemonWill) stack.getItem()).getType(stack) == type) + { + consumed += ((IDemonWill) stack.getItem()).drainWill(type, stack, amount - consumed); + if (((IDemonWill) stack.getItem()).getWill(type, stack) <= 0) + inventory.set(i, ItemStack.EMPTY); + } else if (stack.getItem() instanceof IDemonWillGem) + { + consumed += ((IDemonWillGem) stack.getItem()).drainWill(type, stack, amount - consumed, true); + } + } + + return consumed; + } + + /** + * Adds an IDemonWill contained in an ItemStack to one of the Soul Gems in the + * player's inventory. + * + * @param player - The player to add will to + * @param willStack - ItemStack that contains an IDemonWill to be added + * @return - The modified willStack + */ + public static ItemStack addDemonWill(PlayerEntity player, ItemStack willStack) + { + if (willStack.isEmpty()) + return ItemStack.EMPTY; + + NonNullList inventory = player.inventory.mainInventory; + + for (ItemStack stack : inventory) + { + if (stack.getItem() instanceof IDemonWillGem) + { + ItemStack newStack = ((IDemonWillGem) stack.getItem()).fillDemonWillGem(stack, willStack); + if (newStack.isEmpty()) + return ItemStack.EMPTY; + } + } + + return willStack; + } + + /** + * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul Gems + * in the player's inventory. + * + * @param type - The type of Will to add + * @param player - The player to check the Will of + * @param amount - The amount of will to add + * @return - The amount of will added + */ + public static double addDemonWill(EnumDemonWillType type, PlayerEntity player, double amount) + { + NonNullList inventory = player.inventory.mainInventory; + double remaining = amount; + + for (ItemStack stack : inventory) + { + if (stack.getItem() instanceof IDemonWillGem) + { + remaining -= ((IDemonWillGem) stack.getItem()).fillWill(type, stack, remaining, true); + if (remaining <= 0) + break; + } + } + + return amount - remaining; + } + + /** + * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul Gems + * in the player's inventory while ignoring a specified stack. + * + * @param type - The type of Will to add + * @param player - The player to check the Will of + * @param amount - The amount of will to add + * @param ignored - A stack to ignore + * @return - The amount of will added + */ + public static double addDemonWill(EnumDemonWillType type, PlayerEntity player, double amount, ItemStack ignored) + { + NonNullList inventory = player.inventory.mainInventory; + double remaining = amount; + + for (ItemStack stack : inventory) + { + if (!stack.equals(ignored) && stack.getItem() instanceof IDemonWillGem) + { + remaining -= ((IDemonWillGem) stack.getItem()).fillWill(type, stack, remaining, true); + + if (remaining <= 0) + break; + } + } + + return amount - remaining; + } +} \ No newline at end of file diff --git a/src/main/resources/Guide-API-Version.info b/src/main/resources/Guide-API-Version.info deleted file mode 100644 index 27323dad..00000000 --- a/src/main/resources/Guide-API-Version.info +++ /dev/null @@ -1 +0,0 @@ -@VERSION@ \ No newline at end of file diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml new file mode 100644 index 00000000..182a4fe5 --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,55 @@ +# This is an example mods.toml file. It contains the data relating to the loading mods. +# There are several mandatory fields (#mandatory), and many more that are optional (#optional). +# The overall format is standard TOML format, v0.5.0. +# Note that there are a couple of TOML lists in this file. +# Find more information on toml format here: https://github.com/toml-lang/toml +# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml +modLoader="javafml" #mandatory +# A version range to match for said mod loader - for regular FML @Mod it will be the forge version +loaderVersion="[34,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. +# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. +license="All rights reserved" +# A URL to refer people to when problems occur with this mod +issueTrackerURL="http://my.issue.tracker/" #optional +# A list of mods - how many allowed here is determined by the individual mod loader +[[mods]] #mandatory +# The modid of the mod +modId="bloodmagic" #mandatory +# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it +version="${file.jarVersion}" #mandatory + # A display name for the mod +displayName="Blood Magic" #mandatory +# A file name (in the root of the mod JAR) containing a logo for display +logoFile="examplemod.png" #optional +# A text field displayed in the mod UI +credits="Thanks for this example mod goes to Java" #optional +# A text field displayed in the mod UI +authors="WayofTime" #optional +# The description text for the mod (multi line!) (#mandatory) +description=''' +This is a long form description of the mod. You can write whatever you want here + +Have some lorem ipsum. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. +''' +# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. +[[dependencies.bloodmagic]] #optional + # the modid of the dependency + modId="forge" #mandatory + # Does this dependency have to exist - if not, ordering below must be specified + mandatory=true #mandatory + # The version range of the dependency + versionRange="[34,)" #mandatory + # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory + ordering="NONE" + # Side this dependency is applied on - BOTH, CLIENT or SERVER + side="BOTH" +# Here's another dependency +[[dependencies.bloodmagic]] + modId="minecraft" + mandatory=true + versionRange="[1.16.3,)" + ordering="NONE" + side="BOTH" diff --git a/src/main/resources/assets/bloodmagic/armatures/block/pillar_mid.json b/src/main/resources/assets/bloodmagic/armatures/block/pillar_mid.json deleted file mode 100644 index 16d07d04..00000000 --- a/src/main/resources/assets/bloodmagic/armatures/block/pillar_mid.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "joints": { - "ring": { "0": [ 1.0 ], "1": [ 1.0 ], "2": [ 1.0 ], "3": [ 1.0 ], "4": [ 1.0 ], "5": [ 1.0 ], "6": [ 1.0 ], "7": [ 1.0 ], "8": [ 1.0 ], "9": [ 1.0 ], "10": [ 1.0 ], "11": [ 1.0 ], "12": [ 1.0 ], "13": [ 1.0 ], "14": [ 1.0 ], "15": [ 1.0 ], "16": [ 1.0 ], "17": [ 1.0 ], "18": [ 1.0 ], "19": [ 1.0 ], "20": [ 1.0 ], "21": [ 1.0 ], "22": [ 1.0 ] } - }, - "clips": { - "default": { - "loop": false, - "joint_clips": {}, - "events": {} - }, - "moving": { - "loop": true, - "joint_clips": { - "ring": [ - { - "variable": "offset_y", - "type": "uniform", - "interpolation": "linear", - "samples": [ -0.0625, -0.0442, 0, 0.0442, 0.0625, 0.0442, 0, -0.0442 ] - }, - { - "variable": "axis_y", - "type": "uniform", - "interpolation": "nearest", - "samples": [ 1 ] - }, - { - "variable": "angle", - "type": "uniform", - "interpolation": "linear", - "samples": [ - 0, 120, 240 - ] - } - ] - }, - "events": { - - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/asms/block/inversion_pillar.json b/src/main/resources/assets/bloodmagic/asms/block/inversion_pillar.json deleted file mode 100644 index 2ebde5e6..00000000 --- a/src/main/resources/assets/bloodmagic/asms/block/inversion_pillar.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "parameters": { - "clip_time": [ "-/", "#offset", "#cycle_length" ] - }, - "clips": { - "moving": [ "apply", "bloodmagic:block/pillar_mid@moving", "#clip_time" ] - }, - "states": [ - "moving" - ], - "transitions": {}, - "start_state": "moving" -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockAlchemyArray.json b/src/main/resources/assets/bloodmagic/blockstates/BlockAlchemyArray.json deleted file mode 100644 index 03ba5c90..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockAlchemyArray.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "variants": { - "normal": { - "model": "bloodmagic:BlockAlchemyArray", - "textures": { - "all": "bloodmagic:models/AlchemyArrays/StupidArray" - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockAlchemyTable.json b/src/main/resources/assets/bloodmagic/blockstates/BlockAlchemyTable.json deleted file mode 100644 index d1d44534..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockAlchemyTable.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:ModelAlchemyTable.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block", - "uvlock": true - }, - "variants": { - "direction": { - "down": { - }, - "up": { - }, - "north": { - "transform": { - "rotation": {"y": -90} - } - }, - "south": { - "transform": { - "rotation": {"y": 90} - } - }, - "east": { - "transform": { - "rotation": {"y": 180} - } - }, - "west": { - - } - }, - "invisible": { - "true": { - "model": "cube_all", - "textures": { - "all": "bloodmagic:blocks/empty" - } - }, - "false": { - - } - }, - "inventory": [{ - - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockAltar.json b/src/main/resources/assets/bloodmagic/blockstates/BlockAltar.json deleted file mode 100644 index 24191a55..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockAltar.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:BlockAltar.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "normal": [{ - - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodLight.json b/src/main/resources/assets/bloodmagic/blockstates/BlockBloodLight.json deleted file mode 100644 index c67139da..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodLight.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "variants": { - "normal": { - "model": "bloodmagic:BlockBloodLight", - "textures": { - "all": "bloodmagic:blocks/BlockBloodLight" - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodRune.json b/src/main/resources/assets/bloodmagic/blockstates/BlockBloodRune.json deleted file mode 100644 index f267e034..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodRune.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "blank": { - "textures": { - "all": "bloodmagic:blocks/BlankRune" - } - }, - "speed": { - "textures": { - "all": "bloodmagic:blocks/SpeedRune" - } - }, - "efficiency": { - "textures": { - "all": "bloodmagic:blocks/EfficiencyRune" - } - }, - "sacrifice": { - "textures": { - "all": "bloodmagic:blocks/RuneOfSacrifice" - } - }, - "selfsacrifice": { - "textures": { - "all": "bloodmagic:blocks/RuneOfSelfSacrifice" - } - }, - "displacement": { - "textures": { - "all": "bloodmagic:blocks/DislocationRune" - } - }, - "capacity": { - "textures": { - "all": "bloodmagic:blocks/AltarCapacityRune" - } - }, - "augcapacity": { - "textures": { - "all": "bloodmagic:blocks/BetterCapacityRune" - } - }, - "orb": { - "textures": { - "all": "bloodmagic:blocks/OrbCapacityRune" - } - }, - "acceleration": { - "textures": { - "all": "bloodmagic:blocks/AccelerationRune" - } - }, - "charging": { - "textures": { - "all": "bloodmagic:blocks/ChargingRune" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodStoneBrick.json b/src/main/resources/assets/bloodmagic/blockstates/BlockBloodStoneBrick.json deleted file mode 100644 index 9cce5ef3..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodStoneBrick.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "large": { - "textures": { - "all": "bloodmagic:blocks/LargeBloodStoneBrick" - } - }, - "brick": { - "textures": { - "all": "bloodmagic:blocks/BloodStoneBrick" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodTank.json b/src/main/resources/assets/bloodmagic/blockstates/BlockBloodTank.json deleted file mode 100644 index d71d03f6..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockBloodTank.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { "all": "bloodmagic:blocks/BloodTank" }, - "model": "bloodmagic:BlockBloodTank", - "uvlock": true - }, - "variants": { - "tier": { - "0": {}, - "1": {}, - "2": {}, - "3": {}, - "4": {}, - "5": {}, - "6": {}, - "7": {}, - "8": {}, - "9": {}, - "10": {}, - "11": {}, - "12": {}, - "13": {}, - "14": {}, - "15": {} - }, - "inventory": [{}] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockCrystal.json b/src/main/resources/assets/bloodmagic/blockstates/BlockCrystal.json deleted file mode 100644 index c997259c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockCrystal.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "large": { - "textures": { - "all": "bloodmagic:blocks/ShardCluster" - } - }, - "brick": { - "textures": { - "all": "bloodmagic:blocks/ShardClusterBrick" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonBricks1.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonBricks1.json deleted file mode 100644 index bff693ef..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonBricks1.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type=brick1_raw": [ - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick1"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick2"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick3"}} - ], - "type=brick1_corrosive": [ - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick1_c"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick2_c"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick3_c"}} - ], - "type=brick1_destructive": [ - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick1_d"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick2_d"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick3_d"}} - ], - "type=brick1_vengeful": [ - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick1_v"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick2_v"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick3_v"}} - ], - "type=brick1_steadfast": [ - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick1_s"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick2_s"}}, - {"textures": {"all": "bloodmagic:blocks/dungeon/dungeon_brick3_s"}} - ] - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonBricks2.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonBricks2.json deleted file mode 100644 index deef552c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonBricks2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "smallbrick_raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_smallbrick" - } - }, - "smallbrick_corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_smallbrick_c" - } - }, - "smallbrick_destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_smallbrick_d" - } - }, - "smallbrick_vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_smallbrick_v" - } - }, - "smallbrick_steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_smallbrick_s" - } - }, - "tile_raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tile" - } - }, - "tile_corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tile_c" - } - }, - "tile_destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tile_d" - } - }, - "tile_vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tile_v" - } - }, - "tile_steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tile_s" - } - }, - "tilespecial_raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tilespecial" - } - }, - "tilespecial_corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tilespecial_c" - } - }, - "tilespecial_destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tilespecial_d" - } - }, - "tilespecial_vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tilespecial_v" - } - }, - "tilespecial_steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_tilespecial_s" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrucible.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrucible.json deleted file mode 100644 index 6a1615be..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrucible.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:BlockDemonCrucible.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "normal": [{ - - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrystal.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrystal.json deleted file mode 100644 index 792e272f..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrystal.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { "#crystal" : "bloodmagic:models/DefaultCrystal" }, - "model": "bloodmagic:crystal/Crystal1.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "attached": { - "down": { - "transform": { - "rotation": {"x": 180} - } - }, - "up": { - }, - "north": { - "transform": { - "rotation": {"x": -90} - } - }, - "south": { - "transform": { - "rotation": {"x": 90} - } - }, - "east": { - "transform": { - "rotation": {"z": -90} - } - }, - "west": { - "transform": { - "rotation": {"z": 90} - } - } - }, - "type": { - "default": { - "textures": { - "#crystal" : "bloodmagic:models/DefaultCrystal" - } - }, - "corrosive": { - "textures": { - "#crystal" : "bloodmagic:models/CorrosiveCrystal" - } - }, - "destructive": { - "textures": { - "#crystal" : "bloodmagic:models/DestructiveCrystal" - } - }, - "vengeful": { - "textures": { - "#crystal" : "bloodmagic:models/VengefulCrystal" - } - }, - "steadfast": { - "textures": { - "#crystal" : "bloodmagic:models/SteadfastCrystal" - } - } - }, - "age": { - "0": { - - }, - "1": { - "submodel": "bloodmagic:crystal/Crystal2.obj" - }, - "2": { - "submodel": { - "crystal2": {"model": "bloodmagic:crystal/Crystal2.obj"}, - "crystal3": {"model": "bloodmagic:crystal/Crystal3.obj"} - } - }, - "3": { - "submodel": { - "crystal2": {"model": "bloodmagic:crystal/Crystal2.obj"}, - "crystal3": {"model": "bloodmagic:crystal/Crystal3.obj"}, - "crystal4": {"model": "bloodmagic:crystal/Crystal4.obj"} - } - }, - "4": { - "submodel": { - "crystal2": {"model": "bloodmagic:crystal/Crystal2.obj"}, - "crystal3": {"model": "bloodmagic:crystal/Crystal3.obj"}, - "crystal4": {"model": "bloodmagic:crystal/Crystal4.obj"}, - "crystal5": {"model": "bloodmagic:crystal/Crystal5.obj"} - } - }, - "5": { - "submodel": { - "crystal2": {"model": "bloodmagic:crystal/Crystal2.obj"}, - "crystal3": {"model": "bloodmagic:crystal/Crystal3.obj"}, - "crystal4": {"model": "bloodmagic:crystal/Crystal4.obj"}, - "crystal5": {"model": "bloodmagic:crystal/Crystal5.obj"}, - "crystal6": {"model": "bloodmagic:crystal/Crystal6.obj"} - } - }, - "6": { - "submodel": { - "crystal2": {"model": "bloodmagic:crystal/Crystal2.obj"}, - "crystal3": {"model": "bloodmagic:crystal/Crystal3.obj"}, - "crystal4": {"model": "bloodmagic:crystal/Crystal4.obj"}, - "crystal5": {"model": "bloodmagic:crystal/Crystal5.obj"}, - "crystal6": {"model": "bloodmagic:crystal/Crystal6.obj"}, - "crystal7": {"model": "bloodmagic:crystal/Crystal7.obj"} - } - } - }, - "inventory": [{ - "variants": { - "type": { - "default": { - "textures": { - "#crystal" : "bloodmagic:models/DefaultCrystal" - } - }, - "corrosive": { - "textures": { - "#crystal" : "bloodmagic:models/CorrosiveCrystal" - } - }, - "destructive": { - "textures": { - "#crystal" : "bloodmagic:models/DestructiveCrystal" - } - }, - "vengeful": { - "textures": { - "#crystal" : "bloodmagic:models/VengefulCrystal" - } - }, - "steadfast": { - "textures": { - "#crystal" : "bloodmagic:models/SteadfastCrystal" - } - } - } - } - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrystallizer.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrystallizer.json deleted file mode 100644 index ef8d9802..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonCrystallizer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:BlockDemonCrystallizer.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "normal": [{ - - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonExtra.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonExtra.json deleted file mode 100644 index 4854590c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonExtra.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "stone_raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_stone" - } - }, - "stone_corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_stone_c" - } - }, - "stone_destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_stone_d" - } - }, - "stone_vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_stone_v" - } - }, - "stone_steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_stone_s" - } - }, - "polished_raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_polished" - } - }, - "polished_corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_polished_c" - } - }, - "polished_destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_polished_d" - } - }, - "polished_vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_polished_v" - } - }, - "polished_steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_polished_s" - } - }, - "metal_raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_metal" - } - }, - "metal_corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_metal_c" - } - }, - "metal_destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_metal_d" - } - }, - "metal_vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_metal_v" - } - }, - "metal_steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_metal_s" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonLight.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonLight.json deleted file mode 100644 index 171bdd39..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonLight.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "raw": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_eye" - } - }, - "corrosive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_eye_c" - } - }, - "destructive": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_eye_d" - } - }, - "vengeful": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_eye_v" - } - }, - "steadfast": { - "textures": { - "all": "bloodmagic:blocks/dungeon/dungeon_eye_s" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonPylon.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDemonPylon.json deleted file mode 100644 index 4a2b009e..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDemonPylon.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:BlockDemonPylon.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "normal": [{ - - }] - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockDimensionalPortal.json b/src/main/resources/assets/bloodmagic/blockstates/BlockDimensionalPortal.json deleted file mode 100644 index 3ed3ae07..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockDimensionalPortal.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": {}, - "uvlock": true - }, - "variants": { - "meta": { - "0": {"model": "bloodmagic:BlockDimensionalPortalNS"}, - "1": {"model": "bloodmagic:BlockDimensionalPortalEW"} - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockIncenseAltar.json b/src/main/resources/assets/bloodmagic/blockstates/BlockIncenseAltar.json deleted file mode 100644 index f5c0414e..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockIncenseAltar.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:BlockIncenseAltar.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "normal": [{ - - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockInputRoutingNode.json b/src/main/resources/assets/bloodmagic/blockstates/BlockInputRoutingNode.json deleted file mode 100644 index 01f96406..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockInputRoutingNode.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { "#node" : "bloodmagic:models/ModelInputRoutingNode" }, - "model": "bloodmagic:routing/ModelRoutingNodeCore.obj", - "transform" : "forge:default-block", - "custom": { "flip-v": true }, - "uvlock": true - }, - "variants": { - "north": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"x": 90} - } - }, - "false": {} - }, - "south": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"x": -90} - } - }, - "false": {} - }, - "east": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": 90} - } - }, - "false": {} - }, - "west": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -90} - } - }, - "false": {} - }, - "down": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj" - }, - "false": {} - }, - "up": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -180} - } - }, - "false": {} - }, - "inventory": [{ - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj" - }] - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockInversionPillar.json b/src/main/resources/assets/bloodmagic/blockstates/BlockInversionPillar.json deleted file mode 100644 index fdf9e93d..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockInversionPillar.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "texture": "bloodmagic:models/pillar_mid", - "particle": "#texture" - }, - "transform" : "forge:default-block", - "model": "bloodmagic:pillar_mid" - }, - "variants": { - "type": { - "raw": { - "textures": { - - } - }, - "corrosive": { - "textures": { - "texture": "bloodmagic:models/pillar_mid_c" - } - }, - "vengeful": { - "textures": { - "texture": "bloodmagic:models/pillar_mid_v" - } - }, - "destructive": { - "textures": { - "texture": "bloodmagic:models/pillar_mid_d" - } - }, - "steadfast": { - "textures": { - "texture": "bloodmagic:models/pillar_mid_s" - } - } - }, - "static": { - "true": { - "model": "builtin/generated" - }, - "false": { - "model": "bloodmagic:pillar_mid" - } - }, - "inventory": [{}] - } -} - - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockInversionPillarEnd.json b/src/main/resources/assets/bloodmagic/blockstates/BlockInversionPillarEnd.json deleted file mode 100644 index 295c172a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockInversionPillarEnd.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "texture": "bloodmagic:models/pillar_base", - "particle": "#texture" - }, - "transform" : "forge:default-block", - "model": "bloodmagic:pillar_bottom" - }, - "variants": { - "type": { - "raw_bottom": { - "textures": { - - } - }, - "raw_top": { - "textures": { - - }, - "model": "bloodmagic:pillar_top" - }, - "corrosive_bottom": { - "textures": { - "texture": "bloodmagic:models/pillar_base_c" - } - }, - "corrosive_top": { - "textures": { - "texture": "bloodmagic:models/pillar_base_c" - }, - "model": "bloodmagic:pillar_top" - }, - "destructive_bottom": { - "textures": { - "texture": "bloodmagic:models/pillar_base_d" - } - }, - "destructive_top": { - "textures": { - "texture": "bloodmagic:models/pillar_base_d" - }, - "model": "bloodmagic:pillar_top" - }, - "vengeful_bottom": { - "textures": { - "texture": "bloodmagic:models/pillar_base_v" - } - }, - "vengeful_top": { - "textures": { - "texture": "bloodmagic:models/pillar_base_v" - }, - "model": "bloodmagic:pillar_top" - }, - "steadfast_bottom": { - "textures": { - "texture": "bloodmagic:models/pillar_base_s" - } - }, - "steadfast_top": { - "textures": { - "texture": "bloodmagic:models/pillar_base_s" - }, - "model": "bloodmagic:pillar_top" - } - } - } -} - - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockItemRoutingNode.json b/src/main/resources/assets/bloodmagic/blockstates/BlockItemRoutingNode.json deleted file mode 100644 index 9342eeea..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockItemRoutingNode.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { "#node" : "bloodmagic:models/modelroutingnode" }, - "model": "bloodmagic:routing/ModelRoutingNodeCore.obj", - "transform" : "forge:default-block", - "custom": { "flip-v": true }, - "uvlock": true - }, - "variants": { - "north": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"x": 90} - } - }, - "false": {} - }, - "south": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"x": -90} - } - }, - "false": {} - }, - "east": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": 90} - } - }, - "false": {} - }, - "west": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -90} - } - }, - "false": {} - }, - "down": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj" - }, - "false": {} - }, - "up": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -180} - } - }, - "false": {} - }, - "inventory": [{ - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj" - }] - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockLifeEssence.json b/src/main/resources/assets/bloodmagic/blockstates/BlockLifeEssence.json deleted file mode 100644 index 8d673ba3..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockLifeEssence.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "forge_marker": 1, - "variants": { - "fluid": { - "model": "forge:fluid", - "custom": { "fluid": "lifeessence" } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockMasterRoutingNode.json b/src/main/resources/assets/bloodmagic/blockstates/BlockMasterRoutingNode.json deleted file mode 100644 index a10dc2f5..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockMasterRoutingNode.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "bloodmagic:routing/ModelMasterRoutingNodeCore.obj", - "transform" : "forge:default-block", - "custom": { "flip-v": true }, - "uvlock": true - }, - "variants": { - "north": { - "true": { - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj", - "transform": { - "rotation": {"x": 90} - } - }, - "false": {} - }, - "south": { - "true": { - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj", - "transform": { - "rotation": {"x": -90} - } - }, - "false": {} - }, - "east": { - "true": { - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj", - "transform": { - "rotation": {"z": 90} - } - }, - "false": {} - }, - "west": { - "true": { - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -90} - } - }, - "false": {} - }, - "down": { - "true": { - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj" - }, - "false": {} - }, - "up": { - "true": { - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -180} - } - }, - "false": {} - }, - "inventory": [{ - "submodel": "bloodmagic:routing/ModelMasterRoutingNodeBase.obj" - }] - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockMimic.json b/src/main/resources/assets/bloodmagic/blockstates/BlockMimic.json deleted file mode 100644 index ae9c2042..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockMimic.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "nohitbox": { - "textures": { - "all": "bloodmagic:blocks/EtherealOpaqueMimic" - } - }, - "solidopaque": { - "textures": { - "all": "bloodmagic:blocks/SolidOpaqueMimic" - } - }, - "solidclear": { - "textures": { - "all": "bloodmagic:blocks/SolidClearMimic" - } - }, - "solidlight": { - "textures": { - "all": "bloodmagic:blocks/SolidLightMimic" - } - }, - "sentient": { - "textures": { - "all": "bloodmagic:blocks/SentientMimic" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockOutputRoutingNode.json b/src/main/resources/assets/bloodmagic/blockstates/BlockOutputRoutingNode.json deleted file mode 100644 index 11d0d9cf..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockOutputRoutingNode.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { "#node" : "bloodmagic:models/ModelOutputRoutingNode" }, - "model": "bloodmagic:routing/ModelRoutingNodeCore.obj", - "transform" : "forge:default-block", - "custom": { "flip-v": true }, - "uvlock": true - }, - "variants": { - "north": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"x": 90} - } - }, - "false": {} - }, - "south": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"x": -90} - } - }, - "false": {} - }, - "east": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": 90} - } - }, - "false": {} - }, - "west": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -90} - } - }, - "false": {} - }, - "down": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj" - }, - "false": {} - }, - "up": { - "true": { - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj", - "transform": { - "rotation": {"z": -180} - } - }, - "false": {} - }, - "inventory": [{ - "submodel": "bloodmagic:routing/ModelRoutingNodeBase.obj" - }] - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPath.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPath.json deleted file mode 100644 index 4ebe7070..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPath.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "wood": { - "textures": { - "all": "bloodmagic:blocks/WoodBrickPath" - } - }, - "woodtile": { - "textures": { - "all": "bloodmagic:blocks/WoodTilePath" - } - }, - "stone": { - "textures": { - "all": "bloodmagic:blocks/StoneBrickPath" - } - }, - "stonetile": { - "textures": { - "all": "bloodmagic:blocks/StoneTilePath" - } - }, - "wornstone": { - "textures": { - "all": "bloodmagic:blocks/WornStoneBrickPath" - } - }, - "wornstonetile": { - "textures": { - "all": "bloodmagic:blocks/WornStoneTilePath" - } - }, - "obsidian": { - "textures": { - "all": "bloodmagic:blocks/ObsidianBrickPath" - } - }, - "obsidiantile": { - "textures": { - "all": "bloodmagic:blocks/ObsidianTilePath" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPhantom.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPhantom.json deleted file mode 100644 index 7f83de76..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPhantom.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "bloodmagic:BlockPhantom" } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPillar1.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPillar1.json deleted file mode 100644 index c32dd8ac..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPillar1.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "minecraft:cube", - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart", - "side": "bloodmagic:blocks/dungeon/dungeon_pillar", - "particle": "#end" - } - }, - "variants": { - "axis": { - "x": { - "model": "bloodmagic:BlockPillarX" - }, - "y": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end" - } - }, - "z": { - "model": "bloodmagic:BlockPillarZ" - } - }, - "type": { - "raw": { - - }, - "corrosive": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c", - "side": "bloodmagic:blocks/dungeon/dungeon_pillar_c" - } - }, - "destructive": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d", - "side": "bloodmagic:blocks/dungeon/dungeon_pillar_d" - } - }, - "vengeful": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v", - "side": "bloodmagic:blocks/dungeon/dungeon_pillar_v" - } - }, - "steadfast": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s", - "side": "bloodmagic:blocks/dungeon/dungeon_pillar_s" - } - } - }, - "inventory": [{ }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPillar2.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPillar2.json deleted file mode 100644 index 9285da20..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPillar2.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "minecraft:cube", - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart", - "side": "bloodmagic:blocks/dungeon/dungeon_pillarspecial", - "particle": "#end" - } - }, - "variants": { - "axis": { - "x": { - "model": "bloodmagic:BlockPillarX" - }, - "y": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end" - } - }, - "z": { - "model": "bloodmagic:BlockPillarZ" - } - }, - "type": { - "raw": { - - }, - "corrosive": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c", - "side": "bloodmagic:blocks/dungeon/dungeon_pillarspecial_c" - } - }, - "destructive": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d", - "side": "bloodmagic:blocks/dungeon/dungeon_pillarspecial_d" - } - }, - "vengeful": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v", - "side": "bloodmagic:blocks/dungeon/dungeon_pillarspecial_v" - } - }, - "steadfast": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s", - "side": "bloodmagic:blocks/dungeon/dungeon_pillarspecial_s" - } - } - }, - "inventory": [{ }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap1.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap1.json deleted file mode 100644 index 01b3ebae..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap1.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "minecraft:cube", - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart", - "sideBottom": "bloodmagic:blocks/dungeon/dungeon_pillarbottom", - "sideTop": "bloodmagic:blocks/dungeon/dungeon_pillartop", - "particle": "#end" - } - }, - "variants": { - "facing": { - "down": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end", - "side": "#sideBottom" - } - }, - "up": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end", - "side": "#sideTop" - } - }, - "north": { - "model": "bloodmagic:BlockPillarCapNorth" - }, - "south": { - "model": "bloodmagic:BlockPillarCapSouth" - }, - "west": { - "model": "bloodmagic:BlockPillarCapWest" - }, - "east": { - "model": "bloodmagic:BlockPillarCapEast" - } - }, - "type": { - "raw": { - - }, - "corrosive": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c", - "sideBottom": "bloodmagic:blocks/dungeon/dungeon_pillarbottom_c", - "sideTop": "bloodmagic:blocks/dungeon/dungeon_pillartop_c" - } - } - }, - "inventory": [{ }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap2.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap2.json deleted file mode 100644 index 68d4de9a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap2.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "minecraft:cube", - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d", - "sideBottom": "bloodmagic:blocks/dungeon/dungeon_pillarbottom_d", - "sideTop": "bloodmagic:blocks/dungeon/dungeon_pillartop_d", - "particle": "#end" - } - }, - "variants": { - "facing": { - "down": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end", - "side": "#sideBottom" - } - }, - "up": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end", - "side": "#sideTop" - } - }, - "north": { - "model": "bloodmagic:BlockPillarCapNorth" - }, - "south": { - "model": "bloodmagic:BlockPillarCapSouth" - }, - "west": { - "model": "bloodmagic:BlockPillarCapWest" - }, - "east": { - "model": "bloodmagic:BlockPillarCapEast" - } - }, - "type": { - "destructive": { - - }, - "vengeful": { - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v", - "sideBottom": "bloodmagic:blocks/dungeon/dungeon_pillarbottom_v", - "sideTop": "bloodmagic:blocks/dungeon/dungeon_pillartop_v" - } - } - }, - "inventory": [{ }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap3.json b/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap3.json deleted file mode 100644 index e373b095..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockPillarCap3.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "minecraft:cube", - "textures": { - "end": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s", - "sideBottom": "bloodmagic:blocks/dungeon/dungeon_pillarbottom_s", - "sideTop": "bloodmagic:blocks/dungeon/dungeon_pillartop_s", - "particle": "#end" - } - }, - "variants": { - "facing": { - "down": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end", - "side": "#sideBottom" - } - }, - "up": { - "model": "minecraft:cube_bottom_top", - "textures": { - "top": "#end", - "bottom": "#end", - "side": "#sideTop" - } - }, - "north": { - "model": "bloodmagic:BlockPillarCapNorth" - }, - "south": { - "model": "bloodmagic:BlockPillarCapSouth" - }, - "west": { - "model": "bloodmagic:BlockPillarCapWest" - }, - "east": { - "model": "bloodmagic:BlockPillarCapEast" - } - }, - "type": { - "steadfast": { - - } - }, - "inventory": [{ }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockRitualController.json b/src/main/resources/assets/bloodmagic/blockstates/BlockRitualController.json deleted file mode 100644 index 784afa96..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockRitualController.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "master": { - "textures": { - "all": "bloodmagic:blocks/MasterRitualStone" - } - }, - "imperfect": { - "textures": { - "all": "bloodmagic:blocks/ImperfectRitualStone" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockRitualStone.json b/src/main/resources/assets/bloodmagic/blockstates/BlockRitualStone.json deleted file mode 100644 index 9eead647..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockRitualStone.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "type": { - "blank": { - "textures": { - "all": "bloodmagic:blocks/RitualStone" - } - }, - "water": { - "textures": { - "all": "bloodmagic:blocks/WaterRitualStone" - } - }, - "fire": { - "textures": { - "all": "bloodmagic:blocks/FireRitualStone" - } - }, - "earth": { - "textures": { - "all": "bloodmagic:blocks/EarthRitualStone" - } - }, - "air": { - "textures": { - "all": "bloodmagic:blocks/AirRitualStone" - } - }, - "dusk": { - "textures": { - "all": "bloodmagic:blocks/DuskRitualStone" - } - }, - "dawn": { - "textures": { - "all": "bloodmagic:blocks/LightRitualStone" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockSoulForge.json b/src/main/resources/assets/bloodmagic/blockstates/BlockSoulForge.json deleted file mode 100644 index 5abbb4e2..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockSoulForge.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "bloodmagic:BlockHellfireForge.obj", - "custom": { "flip-v": true }, - "transform" : "forge:default-block" - }, - "variants": { - "normal": [{ - - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockSpectral.json b/src/main/resources/assets/bloodmagic/blockstates/BlockSpectral.json deleted file mode 100644 index 1d43fa6a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockSpectral.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "variants": { - "normal": { - "model": "bloodmagic:BlockSpectral", - "textures": { - "all": "bloodmagic:blocks/SpectralBlock" - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockStairs1.json b/src/main/resources/assets/bloodmagic/blockstates/BlockStairs1.json deleted file mode 100644 index 8bb70c0c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockStairs1.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "texture1": "bloodmagic:blocks/dungeon/dungeon_pillarheart", - "texture2": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c", - "all": "#texture1", - "bottom": "#all", - "top": "#all", - "side": "#all", - "particle": "#all" - }, - "model": "minecraft:stairs", - "transform" : "forge:default-block" - }, - "variants": { - "facing=east,half=bottom,shape=straight,type=raw": { "model": "minecraft:stairs" }, - "facing=west,half=bottom,shape=straight,type=raw": { "model": "minecraft:stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=straight,type=raw": { "model": "minecraft:stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=straight,type=raw": { "model": "minecraft:stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs" }, - "facing=west,half=bottom,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs" }, - "facing=north,half=bottom,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true }, - "facing=east,half=bottom,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs" }, - "facing=west,half=bottom,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs" }, - "facing=north,half=bottom,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true }, - "facing=east,half=top,shape=straight,type=raw": { "model": "minecraft:stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=straight,type=raw": { "model": "minecraft:stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=straight,type=raw": { "model": "minecraft:stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=straight,type=raw": { "model": "minecraft:stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=outer_right,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=outer_left,type=raw": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=inner_right,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=inner_left,type=raw": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true }, - - "facing=east,half=bottom,shape=straight,type=corrosive": { "model": "minecraft:stairs", "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=straight,type=corrosive": { "model": "minecraft:stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=straight,type=corrosive": { "model": "minecraft:stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=straight,type=corrosive": { "model": "minecraft:stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=straight,type=corrosive": { "model": "minecraft:stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=straight,type=corrosive": { "model": "minecraft:stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=straight,type=corrosive": { "model": "minecraft:stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=straight,type=corrosive": { "model": "minecraft:stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=outer_right,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=outer_left,type=corrosive": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=inner_right,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=inner_left,type=corrosive": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "inventory": [{}] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockStairs2.json b/src/main/resources/assets/bloodmagic/blockstates/BlockStairs2.json deleted file mode 100644 index e3376cc8..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockStairs2.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "texture1": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d", - "texture2": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v", - "all": "#texture1", - "bottom": "#all", - "top": "#all", - "side": "#all", - "particle": "#all" - }, - "model": "minecraft:stairs", - "transform" : "forge:default-block" - }, - "variants": { - "facing=east,half=bottom,shape=straight,type=destructive": { "model": "minecraft:stairs" }, - "facing=west,half=bottom,shape=straight,type=destructive": { "model": "minecraft:stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=straight,type=destructive": { "model": "minecraft:stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=straight,type=destructive": { "model": "minecraft:stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs" }, - "facing=west,half=bottom,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs" }, - "facing=north,half=bottom,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true }, - "facing=east,half=bottom,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs" }, - "facing=west,half=bottom,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs" }, - "facing=north,half=bottom,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true }, - "facing=east,half=top,shape=straight,type=destructive": { "model": "minecraft:stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=straight,type=destructive": { "model": "minecraft:stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=straight,type=destructive": { "model": "minecraft:stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=straight,type=destructive": { "model": "minecraft:stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=outer_right,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=outer_left,type=destructive": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=inner_right,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=inner_left,type=destructive": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true }, - - "facing=east,half=bottom,shape=straight,type=vengeful": { "model": "minecraft:stairs", "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=straight,type=vengeful": { "model": "minecraft:stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=straight,type=vengeful": { "model": "minecraft:stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=straight,type=vengeful": { "model": "minecraft:stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=bottom,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=bottom,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=bottom,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "textures": {"all": "#texture2"} }, - "facing=north,half=bottom,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=straight,type=vengeful": { "model": "minecraft:stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=straight,type=vengeful": { "model": "minecraft:stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=straight,type=vengeful": { "model": "minecraft:stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=straight,type=vengeful": { "model": "minecraft:stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=outer_right,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=outer_left,type=vengeful": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=inner_right,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=east,half=top,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=west,half=top,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=south,half=top,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true, "textures": {"all": "#texture2"} }, - "facing=north,half=top,shape=inner_left,type=vengeful": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true, "textures": {"all": "#texture2"} }, - "inventory": [{}] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockStairs3.json b/src/main/resources/assets/bloodmagic/blockstates/BlockStairs3.json deleted file mode 100644 index 51640cbd..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockStairs3.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "texture1": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s", - "texture2": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c", - "all": "#texture1", - "bottom": "#all", - "top": "#all", - "side": "#all", - "particle": "#all" - }, - "model": "minecraft:stairs", - "transform" : "forge:default-block" - }, - "variants": { - "facing=east,half=bottom,shape=straight,type=steadfast": { "model": "minecraft:stairs" }, - "facing=west,half=bottom,shape=straight,type=steadfast": { "model": "minecraft:stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=straight,type=steadfast": { "model": "minecraft:stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=straight,type=steadfast": { "model": "minecraft:stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs" }, - "facing=west,half=bottom,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs" }, - "facing=north,half=bottom,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "y": 180, "uvlock": true }, - "facing=east,half=bottom,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs" }, - "facing=west,half=bottom,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true }, - "facing=south,half=bottom,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true }, - "facing=north,half=bottom,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true }, - "facing=east,half=bottom,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "y": 270, "uvlock": true }, - "facing=west,half=bottom,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "y": 90, "uvlock": true }, - "facing=south,half=bottom,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs" }, - "facing=north,half=bottom,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "y": 180, "uvlock": true }, - "facing=east,half=top,shape=straight,type=steadfast": { "model": "minecraft:stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=straight,type=steadfast": { "model": "minecraft:stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=straight,type=steadfast": { "model": "minecraft:stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=straight,type=steadfast": { "model": "minecraft:stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=outer_right,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=outer_left,type=steadfast": { "model": "minecraft:outer_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=east,half=top,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=west,half=top,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true }, - "facing=south,half=top,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=north,half=top,shape=inner_right,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true }, - "facing=east,half=top,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "uvlock": true }, - "facing=west,half=top,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "y": 180, "uvlock": true }, - "facing=south,half=top,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "y": 90, "uvlock": true }, - "facing=north,half=top,shape=inner_left,type=steadfast": { "model": "minecraft:inner_stairs", "x": 180, "y": 270, "uvlock": true }, - "inventory": [{}] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockTeleposer.json b/src/main/resources/assets/bloodmagic/blockstates/BlockTeleposer.json deleted file mode 100644 index 2a92da6c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockTeleposer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { }, - "model": "orientable" - }, - "variants": { - "normal": [{ - "textures": { - "top": "bloodmagic:blocks/Teleposer_Top", - "side": "bloodmagic:blocks/Teleposer_Side", - "front": "bloodmagic:blocks/Teleposer_Side", - "bottom": "bloodmagic:blocks/Teleposer_Side" - } - }] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockTestSpellBlock.json b/src/main/resources/assets/bloodmagic/blockstates/BlockTestSpellBlock.json deleted file mode 100644 index 8bdc9a94..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockTestSpellBlock.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "bloodmagic:sub/BlockSpellModifierCore", - "textures": { - "model": "bloodmagic:models/SpellModifierDefault" - }, - - "uvlock": false - }, - "variants": { - "input": { - "up": {"submodel": "bloodmagic:sub/BlockSpellModifierInput", "x": 90}, - "down": {"submodel": "bloodmagic:sub/BlockSpellModifierInput", "x": -90}, - "east": {"submodel": "bloodmagic:sub/BlockSpellModifierInput", "y": -90}, - "west": {"submodel": "bloodmagic:sub/BlockSpellModifierInput", "y": 90}, - "north": {"submodel": "bloodmagic:sub/BlockSpellModifierInput", "y": 180}, - "south": {"submodel": "bloodmagic:sub/BlockSpellModifierInput"} - }, - "output": { - "up": {"submodel": "bloodmagic:sub/BlockSpellModifierOutput", "transform": {"rotation": {"z": 90}} }, - "down": {"submodel": "bloodmagic:sub/BlockSpellModifierOutput", "transform": {"rotation": {"z": -90}} }, - "west": {"submodel": "bloodmagic:sub/BlockSpellModifierOutput", "y": 180}, - "east": {"submodel": "bloodmagic:sub/BlockSpellModifierOutput"}, - "north": {"submodel": "bloodmagic:sub/BlockSpellModifierOutput", "y": -90}, - "south": {"submodel": "bloodmagic:sub/BlockSpellModifierOutput", "y": 90} - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/BlockWall1.json b/src/main/resources/assets/bloodmagic/blockstates/BlockWall1.json deleted file mode 100644 index b7782a56..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/BlockWall1.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_pillarheart", - "particle": "#wall" - }, - "model": "bloodmagic:BlockBlank", - "transform" : "forge:default-block" - }, - "variants": { - "up": { - "true": {"submodel": "minecraft:wall_post"}, - "false": {} - }, - "north": { - "true": {"submodel": "minecraft:wall_side", "uvlock": true}, - "false": {} - }, - "south": { - "true": {"submodel": "minecraft:wall_side", "uvlock": true, "y": 180}, - "false": {} - }, - "east": { - "true": {"submodel": "minecraft:wall_side", "uvlock": true, "y": 90}, - "false": {} - }, - "west": { - "true": {"submodel": "minecraft:wall_side", "uvlock": true, "y": 270}, - "false": {} - }, - "type": { - "brick_raw": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_brick3" - } - }, - "brick_corrosive": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_brick3_c" - } - }, - "brick_destructive": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_brick3_d" - } - }, - "brick_vengeful": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_brick3_v" - } - }, - "brick_steadfast": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_brick3_s" - } - }, - "smallbrick_raw": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_smallbrick" - } - }, - "smallbrick_corrosive": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_smallbrick_c" - } - }, - "smallbrick_destructive": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_smallbrick_d" - } - }, - "smallbrick_vengeful": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_smallbrick_v" - } - }, - "smallbrick_steadfast": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_smallbrick_s" - } - }, - "large_raw": { - - }, - "large_corrosive": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c" - } - }, - "large_destructive": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d" - } - }, - "large_vengeful": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v" - } - }, - "large_steadfast": { - "textures": { - "wall": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s" - } - } - }, - "inventory": [{}] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/alchemy_array.json b/src/main/resources/assets/bloodmagic/blockstates/alchemy_array.json new file mode 100644 index 00000000..38eed1f0 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/alchemy_array.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/blockalchemyarray" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/alchemytable.json b/src/main/resources/assets/bloodmagic/blockstates/alchemytable.json new file mode 100644 index 00000000..3e963f47 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/alchemytable.json @@ -0,0 +1,31 @@ +{ + "variants": { + "direction=north,invisible=false": { + "model": "bloodmagic:block/alchemytable", + "y": 90 + }, + "direction=south,invisible=false": { + "model": "bloodmagic:block/alchemytable", + "y": 270 + }, + "direction=east,invisible=false": { + "model": "bloodmagic:block/alchemytable", + "y": 180 + }, + "direction=west,invisible=false": { + "model": "bloodmagic:block/alchemytable" + }, + "direction=north,invisible=true": { + "model": "bloodmagic:block/alchemytable_invis" + }, + "direction=south,invisible=true": { + "model": "bloodmagic:block/alchemytable_invis" + }, + "direction=east,invisible=true": { + "model": "bloodmagic:block/alchemytable_invis" + }, + "direction=west,invisible=true": { + "model": "bloodmagic:block/alchemytable_invis" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/altar.json b/src/main/resources/assets/bloodmagic/blockstates/altar.json new file mode 100644 index 00000000..256d4acd --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/altar.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/bloodaltar" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/demoncrucible.json b/src/main/resources/assets/bloodmagic/blockstates/demoncrucible.json new file mode 100644 index 00000000..376ae6c6 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/demoncrucible.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/demoncrucible" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/demoncrystallizer.json b/src/main/resources/assets/bloodmagic/blockstates/demoncrystallizer.json new file mode 100644 index 00000000..b309aac3 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/demoncrystallizer.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/demoncrystallizer" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/demonpylon.json b/src/main/resources/assets/bloodmagic/blockstates/demonpylon.json new file mode 100644 index 00000000..a3f6b11a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/demonpylon.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/demonpylon" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/ethereal_mimic.json b/src/main/resources/assets/bloodmagic/blockstates/ethereal_mimic.json new file mode 100644 index 00000000..8ea12c85 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/ethereal_mimic.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "bloodmagic:block/ethereal_mimic" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/incensealtar.json b/src/main/resources/assets/bloodmagic/blockstates/incensealtar.json new file mode 100644 index 00000000..a625a8b1 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/incensealtar.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/incensealtar" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemActivationCrystal.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemActivationCrystal.json deleted file mode 100644 index 913aa3f8..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemActivationCrystal.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "weak": { - "textures": { - "layer0": "bloodmagic:items/activationCrystalWeak" - } - }, - "demonic": { - "textures": { - "layer0": "bloodmagic:items/activationCrystalAwakened" - } - }, - "creative": { - "textures": { - "layer0": "bloodmagic:items/activationCrystalCreative" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemAltarMaker.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemAltarMaker.json deleted file mode 100644 index d9853286..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemAltarMaker.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "altarmaker": { - "textures": { - "layer0": "bloodmagic:items/AltarMaker" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemArcaneAshes.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemArcaneAshes.json deleted file mode 100644 index df9edd3c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemArcaneAshes.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "arcaneashes": { - "textures": { - "layer0": "bloodmagic:items/ArcaneAshes" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBlockDemonCrystal.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemBlockDemonCrystal.json deleted file mode 100644 index 492f59ee..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBlockDemonCrystal.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "bloodmagic:crystal/Crystal1.obj", - "custom": { "flip-v": true }, - "transform": { - "translation": [ 0, 0, 1] - } - }, - "variants": { - "type": { - "default": { - "textures": { - "#crystal" : "bloodmagic:models/DefaultCrystal" - } - }, - "corrosive": { - "textures": { - "#crystal" : "bloodmagic:models/CorrosiveCrystal" - } - }, - "destructive": { - "textures": { - "#crystal" : "bloodmagic:models/DestructiveCrystal" - } - }, - "vengeful": { - "textures": { - "#crystal" : "bloodmagic:models/VengefulCrystal" - } - }, - "steadfast": { - "textures": { - "#crystal" : "bloodmagic:models/SteadfastCrystal" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBloodShard.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemBloodShard.json deleted file mode 100644 index 4cf72004..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBloodShard.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "weak": { - "textures": { - "layer0": "bloodmagic:items/WeakBloodShard" - } - }, - "demonic": { - "textures": { - "layer0": "bloodmagic:items/DemonBloodShard" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundAxe.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundAxe.json deleted file mode 100644 index dc27b28a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundAxe.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "active": { - "true": { - "textures": { - "layer0": "bloodmagic:items/BoundAxe_activated" - } - }, - "false": { - "textures": { - "layer0": "bloodmagic:items/Item_deactivated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundPickaxe.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundPickaxe.json deleted file mode 100644 index 6acaacca..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundPickaxe.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "active": { - "true": { - "textures": { - "layer0": "bloodmagic:items/BoundPickaxe_activated" - } - }, - "false": { - "textures": { - "layer0": "bloodmagic:items/Item_deactivated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundShovel.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundShovel.json deleted file mode 100644 index adba2311..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundShovel.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "active": { - "true": { - "textures": { - "layer0": "bloodmagic:items/BoundShovel_activated" - } - }, - "false": { - "textures": { - "layer0": "bloodmagic:items/Item_deactivated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundSword.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundSword.json deleted file mode 100644 index ae592f33..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemBoundSword.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "active": { - "true": { - "textures": { - "layer0": "bloodmagic:items/BoundSword_activated" - } - }, - "false": { - "textures": { - "layer0": "bloodmagic:items/Item_deactivated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json deleted file mode 100644 index eb690f3b..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "reagentwater": { - "textures": { - "layer0": "bloodmagic:items/ReagentWater" - } - }, - "reagentlava": { - "textures": { - "layer0": "bloodmagic:items/ReagentLava" - } - }, - "reagentair": { - "textures": { - "layer0": "bloodmagic:items/ReagentAir" - } - }, - "reagentfastminer": { - "textures": { - "layer0": "bloodmagic:items/ReagentFastMiner" - } - }, - "reagentvoid": { - "textures": { - "layer0": "bloodmagic:items/ReagentVoid" - } - }, - "reagentgrowth": { - "textures": { - "layer0": "bloodmagic:items/ReagentGrowth" - } - }, - "reagentaffinity": { - "textures": { - "layer0": "bloodmagic:items/ReagentAffinity" - } - }, - "reagentsight": { - "textures": { - "layer0": "bloodmagic:items/ReagentSight" - } - }, - "reagentbinding": { - "textures": { - "layer0": "bloodmagic:items/ReagentBinding" - } - }, - "reagentsuppression": { - "textures": { - "layer0": "bloodmagic:items/ReagentSuppression" - } - }, - "frameparts": { - "textures": { - "layer0": "bloodmagic:items/ComponentFrameParts" - } - }, - "reagentbloodlight": { - "textures": { - "layer0": "bloodmagic:items/ReagentBloodLight" - } - }, - "reagentmagnetism": { - "textures": { - "layer0": "bloodmagic:items/ReagentMagnetism" - } - }, - "reagenthaste": { - "textures": { - "layer0": "bloodmagic:items/ReagentHaste" - } - }, - "reagentcompression": { - "textures": { - "layer0": "bloodmagic:items/ReagentCompression" - } - }, - "reagentbridge": { - "textures": { - "layer0": "bloodmagic:items/ReagentBridge" - } - }, - "reagentseverance": { - "textures": { - "layer0": "bloodmagic:items/ReagentSeverance" - } - }, - "reagentteleposition": { - "textures": { - "layer0": "bloodmagic:items/ReagentTeleposition" - } - }, - "reagenttransposition": { - "textures": { - "layer0": "bloodmagic:items/ReagentTransposition" - } - }, - "ironsand": { - "textures": { - "layer0": "bloodmagic:items/IronSand" - } - }, - "goldsand": { - "textures": { - "layer0": "bloodmagic:items/GoldSand" - } - }, - "coalsand": { - "textures": { - "layer0": "bloodmagic:items/CoalSand" - } - }, - "plantoil": { - "textures": { - "layer0": "bloodmagic:items/PlantOil" - } - }, - "sulfur": { - "textures": { - "layer0": "bloodmagic:items/Sulfur" - } - }, - "saltpeter": { - "textures": { - "layer0": "bloodmagic:items/Saltpeter" - } - }, - "neurotoxin": { - "textures": { - "layer0": "bloodmagic:items/NeuroToxin" - } - }, - "antiseptic": { - "textures": { - "layer0": "bloodmagic:items/Antiseptic" - } - }, - "reagentholding": { - "textures": { - "layer0": "bloodmagic:items/ReagentHolding" - } - }, - "mundanelength": { - "textures": { - "layer0": "bloodmagic:items/MundaneLengtheningCatalyst" - } - }, - "mundanepower": { - "textures": { - "layer0": "bloodmagic:items/MundanePowerCatalyst" - } - }, - "reagentclaw": { - "textures": { - "layer0": "bloodmagic:items/ReagentClaw" - } - }, - "reagentbounce": { - "textures": { - "layer0": "bloodmagic:items/ReagentBounce" - } - }, - "reagentfrost": { - "textures": { - "layer0": "bloodmagic:items/ReagentFrost" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemCuttingFluid.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemCuttingFluid.json deleted file mode 100644 index fbd1ac61..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemCuttingFluid.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "basiccuttingfluid": { - "textures": { - "layer0": "bloodmagic:items/BasicCuttingFluid" - } - }, - "explosive": { - "textures": { - "layer0": "bloodmagic:items/ExplosivePowder" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemDaggerOfSacrifice.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemDaggerOfSacrifice.json deleted file mode 100644 index 5cae9434..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemDaggerOfSacrifice.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/DaggerOfSacrifice" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemDemonCrystal.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemDemonCrystal.json deleted file mode 100644 index 0d65d0c3..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemDemonCrystal.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "crystaldefault": { - "textures": { - "layer0": "bloodmagic:items/DefaultCrystal" - } - }, - "crystalcorrosive": { - "textures": { - "layer0": "bloodmagic:items/CorrosiveCrystal" - } - }, - "crystalvengeful": { - "textures": { - "layer0": "bloodmagic:items/VengefulCrystal" - } - }, - "crystaldestructive": { - "textures": { - "layer0": "bloodmagic:items/DestructiveCrystal" - } - }, - "crystalsteadfast": { - "textures": { - "layer0": "bloodmagic:items/SteadfastCrystal" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemDemonWillGauge.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemDemonWillGauge.json deleted file mode 100644 index 33dc70e5..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemDemonWillGauge.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "willgauge": { - "textures": { - "layer0": "bloodmagic:items/DemonWillGauge" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemExperienceBook.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemExperienceBook.json deleted file mode 100644 index 0441a8e1..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemExperienceBook.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "experiencetome": { - "textures": { - "layer0": "bloodmagic:items/ExperienceBook" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemInscriptionTool.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemInscriptionTool.json deleted file mode 100644 index 941bdac9..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemInscriptionTool.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "water": { - "textures": { - "layer0": "bloodmagic:items/WaterScribeTool" - } - }, - "fire": { - "textures": { - "layer0": "bloodmagic:items/FireScribeTool" - } - }, - "earth": { - "textures": { - "layer0": "bloodmagic:items/EarthScribeTool" - } - }, - "air": { - "textures": { - "layer0": "bloodmagic:items/AirScribeTool" - } - }, - "dusk": { - "textures": { - "layer0": "bloodmagic:items/DuskScribeTool" - } - }, - "dawn": { - "textures": { - "layer0": "bloodmagic:items/DawnScribeTool" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemLavaCrystal.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemLavaCrystal.json deleted file mode 100644 index 12890a4d..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemLavaCrystal.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/LavaCrystal" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemLivingArmour.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemLivingArmour.json deleted file mode 100644 index a20acc7a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemLivingArmour.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "armour": { - "head": { - "textures": { - "layer0": "bloodmagic:items/LivingHelmet" - } - }, - "body": { - "textures": { - "layer0": "bloodmagic:items/LivingPlate" - } - }, - "leg": { - "textures": { - "layer0": "bloodmagic:items/LivingLeggings" - } - }, - "feet": { - "textures": { - "layer0": "bloodmagic:items/LivingBoots" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemLivingArmourPointsUpgrade.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemLivingArmourPointsUpgrade.json deleted file mode 100644 index 67ac1582..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemLivingArmourPointsUpgrade.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "draftangelus": { - "textures": { - "layer0": "bloodmagic:items/Coagulant" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemMonsterSoul.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemMonsterSoul.json deleted file mode 100644 index bbdebb50..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemMonsterSoul.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "base": { - "textures": { - "layer0": "bloodmagic:items/BaseMonsterSoul" - } - }, - "corrosive": { - "textures": { - "layer0": "bloodmagic:items/BaseMonsterSoul_corrosive" - } - }, - "destructive": { - "textures": { - "layer0": "bloodmagic:items/BaseMonsterSoul_destructive" - } - }, - "vengeful": { - "textures": { - "layer0": "bloodmagic:items/BaseMonsterSoul_vengeful" - } - }, - "steadfast": { - "textures": { - "layer0": "bloodmagic:items/BaseMonsterSoul_steadfast" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemNodeRouter.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemNodeRouter.json deleted file mode 100644 index c9a0de99..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemNodeRouter.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/NodeRouter" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemPackSacrifice.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemPackSacrifice.json deleted file mode 100644 index 024dc061..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemPackSacrifice.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/BloodPack" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemPackSelfSacrifice.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemPackSelfSacrifice.json deleted file mode 100644 index 024dc061..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemPackSelfSacrifice.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/BloodPack" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemPotionFlask.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemPotionFlask.json deleted file mode 100644 index 4af6432c..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemPotionFlask.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/PotionFlask_underlay", - "layer1": "bloodmagic:items/PotionFlask_outline", - "layer2": "bloodmagic:items/PotionFlask_overlay" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemRitualDiviner.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemRitualDiviner.json deleted file mode 100644 index e60702e6..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemRitualDiviner.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "basic": { - "textures": { - "layer0": "bloodmagic:items/RitualDiviner" - } - }, - "dusk": { - "textures": { - "layer0": "bloodmagic:items/RitualDiviner" - } - }, - "dawn": { - "textures": { - "layer0": "bloodmagic:items/RitualDiviner" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemRitualReader.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemRitualReader.json deleted file mode 100644 index 6178c0a9..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemRitualReader.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/RitualTinkerer" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemRouterFilter.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemRouterFilter.json deleted file mode 100644 index afe3e19d..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemRouterFilter.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "exact": { - "textures": { - "layer0": "bloodmagic:items/ItemRouterFilterExact" - } - }, - "ignorenbt": { - "textures": { - "layer0": "bloodmagic:items/ItemRouterFilterIgnoreNBT" - } - }, - "moditems": { - "textures": { - "layer0": "bloodmagic:items/ItemRouterFilterModItems" - } - }, - "oredict": { - "textures": { - "layer0": "bloodmagic:items/ItemRouterFilterOreDict" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSacrificialDagger.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSacrificialDagger.json deleted file mode 100644 index da29bad3..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSacrificialDagger.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/SacrificialDagger" - } - }, - "creative": { - "textures": { - "layer0": "bloodmagic:items/SacrificialDagger" - } - }, - "ceremonial": { - "textures": { - "layer0": "bloodmagic:items/CeremonialDagger" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSanguineBook.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSanguineBook.json deleted file mode 100644 index 3d241ffb..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSanguineBook.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/SanguineBook" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientArmour.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientArmour.json deleted file mode 100644 index 92324fbe..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientArmour.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "armour": { - "head_default": { - "textures": { - "layer0": "bloodmagic:items/SentientHelmet" - } - }, - "body_default": { - "textures": { - "layer0": "bloodmagic:items/SentientPlate" - } - }, - "leg_default": { - "textures": { - "layer0": "bloodmagic:items/SentientLeggings" - } - }, - "feet_default": { - "textures": { - "layer0": "bloodmagic:items/SentientBoots" - } - }, - "head_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SentientHelmet_corrosive" - } - }, - "body_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SentientPlate_corrosive" - } - }, - "leg_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SentientLeggings_corrosive" - } - }, - "feet_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SentientBoots_corrosive" - } - }, - "head_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SentientHelmet_vengeful" - } - }, - "body_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SentientPlate_vengeful" - } - }, - "leg_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SentientLeggings_vengeful" - } - }, - "feet_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SentientBoots_vengeful" - } - }, - "head_destructive": { - "textures": { - "layer0": "bloodmagic:items/SentientHelmet_destructive" - } - }, - "body_destructive": { - "textures": { - "layer0": "bloodmagic:items/SentientPlate_destructive" - } - }, - "leg_destructive": { - "textures": { - "layer0": "bloodmagic:items/SentientLeggings_destructive" - } - }, - "feet_destructive": { - "textures": { - "layer0": "bloodmagic:items/SentientBoots_destructive" - } - }, - "head_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SentientHelmet_steadfast" - } - }, - "body_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SentientPlate_steadfast" - } - }, - "leg_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SentientLeggings_steadfast" - } - }, - "feet_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SentientBoots_steadfast" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientArmourGem.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientArmourGem.json deleted file mode 100644 index 4a0cabfb..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientArmourGem.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "activated": { - "textures": { - "layer0": "bloodmagic:items/SentientArmourGem_activated" - } - }, - "deactivated": { - "textures": { - "layer0": "bloodmagic:items/SentientArmourGem_deactivated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientAxe.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientAxe.json deleted file mode 100644 index f93f679a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientAxe.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "type": { - "default": { - "textures": { - "layer0": "bloodmagic:items/SoulAxe" - } - }, - "corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulAxe_corrosive" - } - }, - "destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulAxe_destructive" - } - }, - "vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulAxe_vengeful" - } - }, - "steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulAxe_steadfast" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientBow.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientBow.json deleted file mode 100644 index 4ae06da9..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientBow.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "type": { - "default": { - "model": "bloodmagic:item/ItemSentientBow" - }, - "corrosive": { - "textures": { - "layer0": "bloodmagic:items/SentientBow_corrosive" - } - }, - "destructive": { - "textures": { - "layer0": "bloodmagic:items/SentientBow_destructive" - } - }, - "vengeful": { - "textures": { - "layer0": "bloodmagic:items/SentientBow_vengeful" - } - }, - "steadfast": { - "textures": { - "layer0": "bloodmagic:items/SentientBow_steadfast" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientPickaxe.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientPickaxe.json deleted file mode 100644 index fdf1b224..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientPickaxe.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "type": { - "default": { - "textures": { - "layer0": "bloodmagic:items/SoulPickaxe" - } - }, - "corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulPickaxe_corrosive" - } - }, - "destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulPickaxe_destructive" - } - }, - "vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulPickaxe_vengeful" - } - }, - "steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulPickaxe_steadfast" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientShovel.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientShovel.json deleted file mode 100644 index fe56d96d..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientShovel.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "type": { - "default": { - "textures": { - "layer0": "bloodmagic:items/SoulShovel" - } - }, - "corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulShovel_corrosive" - } - }, - "destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulShovel_destructive" - } - }, - "vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulShovel_vengeful" - } - }, - "steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulShovel_steadfast" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientSword.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientSword.json deleted file mode 100644 index 31620620..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSentientSword.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-tool" - }, - "variants": { - "type": { - "default": { - "textures": { - "layer0": "bloodmagic:items/SoulSword_activated" - } - }, - "corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulSword_corrosive_activated" - } - }, - "destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulSword_destructive_activated" - } - }, - "vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulSword_vengeful_activated" - } - }, - "steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulSword_steadfast_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilAir.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilAir.json deleted file mode 100644 index 32f44849..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilAir.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/AirSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilBloodLight.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilBloodLight.json deleted file mode 100644 index dc5b4f19..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilBloodLight.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/BloodLightSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilBounce.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilBounce.json deleted file mode 100644 index d4fdbefe..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilBounce.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/BounceSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/BounceSigil_activated" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilClaw.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilClaw.json deleted file mode 100644 index 54f6aa1b..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilClaw.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/ClawSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/ClawSigil_activated" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilCompression.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilCompression.json deleted file mode 100644 index ad29944e..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilCompression.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/CompressionSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/CompressionSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilDivination.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilDivination.json deleted file mode 100644 index 184354d6..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilDivination.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/DivinationSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilElementalAffinity.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilElementalAffinity.json deleted file mode 100644 index 313bbfe2..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilElementalAffinity.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/ElementalSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/ElementalSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilEnderSeverance.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilEnderSeverance.json deleted file mode 100644 index 9c73f810..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilEnderSeverance.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/SigilOfSeverance_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/SigilOfSeverance_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilFastMiner.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilFastMiner.json deleted file mode 100644 index 2c22c801..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilFastMiner.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/MiningSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/MiningSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilFrost.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilFrost.json deleted file mode 100644 index b7dcb443..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilFrost.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/IceSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/IceSigil_activated" - } - } - } - } -} - diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilGreenGrove.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilGreenGrove.json deleted file mode 100644 index b1bfb321..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilGreenGrove.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/GrowthSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/GrowthSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilHaste.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilHaste.json deleted file mode 100644 index 39b9302a..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilHaste.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/HasteSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/HasteSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilHolding.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilHolding.json deleted file mode 100644 index cfe4b8ec..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilHolding.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/SigilOfHolding" - } - }, - "color": { - "textures": { - "layer0": "bloodmagic:items/SigilOfHolding", - "layer1": "bloodmagic:items/SigilOverlay" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilLava.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilLava.json deleted file mode 100644 index fde7dbbc..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilLava.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/LavaSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilMagnetism.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilMagnetism.json deleted file mode 100644 index 8a3a3967..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilMagnetism.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/SigilOfMagnetism_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/SigilOfMagnetism_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilPhantomBridge.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilPhantomBridge.json deleted file mode 100644 index e37bf040..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilPhantomBridge.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/BridgeSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/BridgeSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilSeer.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilSeer.json deleted file mode 100644 index 26097e59..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilSeer.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/SeerSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilSuppression.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilSuppression.json deleted file mode 100644 index b48d90eb..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilSuppression.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/SigilOfSuppression_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/SigilOfSuppression_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilTeleposition.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilTeleposition.json deleted file mode 100644 index 84d1fe93..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilTeleposition.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/TelepositionSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilTransposition.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilTransposition.json deleted file mode 100644 index bb09cc7d..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilTransposition.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/TranspositionSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilVoid.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilVoid.json deleted file mode 100644 index 4bc0194f..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilVoid.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/VoidSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilWater.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilWater.json deleted file mode 100644 index 9f76d28b..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilWater.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "normal": { - "textures": { - "layer0": "bloodmagic:items/WaterSigil" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilWhirlwind.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilWhirlwind.json deleted file mode 100644 index 6c9faba0..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSigilWhirlwind.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "active": { - "false": { - "textures": { - "layer0": "bloodmagic:items/WindSigil_deactivated" - } - }, - "true": { - "textures": { - "layer0": "bloodmagic:items/WindSigil_activated" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSlate.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSlate.json deleted file mode 100644 index 7f6f59af..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSlate.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "blank": { - "textures": { - "layer0": "bloodmagic:items/BlankSlate" - } - }, - "reinforced": { - "textures": { - "layer0": "bloodmagic:items/ReinforcedSlate" - } - }, - "imbued": { - "textures": { - "layer0": "bloodmagic:items/InfusedSlate" - } - }, - "demonic": { - "textures": { - "layer0": "bloodmagic:items/DemonSlate" - } - }, - "ethereal": { - "textures": { - "layer0": "bloodmagic:items/EtherealSlate" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSoulGem.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSoulGem.json deleted file mode 100644 index 33d9b6e0..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSoulGem.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "petty_default": { - "textures": { - "layer0": "bloodmagic:items/SoulGemPetty" - } - }, - "lesser_default": { - "textures": { - "layer0": "bloodmagic:items/SoulGemLesser" - } - }, - "common_default": { - "textures": { - "layer0": "bloodmagic:items/SoulGemCommon" - } - }, - "greater_default": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGreater" - } - }, - "grand_default": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGrand" - } - }, - "petty_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemPetty_corrosive" - } - }, - "lesser_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemLesser_corrosive" - } - }, - "common_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemCommon_corrosive" - } - }, - "greater_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGreater_corrosive" - } - }, - "grand_corrosive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGrand_corrosive" - } - }, - "petty_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulGemPetty_vengeful" - } - }, - "lesser_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulGemLesser_vengeful" - } - }, - "common_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulGemCommon_vengeful" - } - }, - "greater_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGreater_vengeful" - } - }, - "grand_vengeful": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGrand_vengeful" - } - }, - "petty_destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemPetty_destructive" - } - }, - "lesser_destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemLesser_destructive" - } - }, - "common_destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemCommon_destructive" - } - }, - "greater_destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGreater_destructive" - } - }, - "grand_destructive": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGrand_destructive" - } - }, - "petty_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulGemPetty_steadfast" - } - }, - "lesser_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulGemLesser_steadfast" - } - }, - "common_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulGemCommon_steadfast" - } - }, - "greater_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGreater_steadfast" - } - }, - "grand_steadfast": { - "textures": { - "layer0": "bloodmagic:items/SoulGemGrand_steadfast" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSoulSnare.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemSoulSnare.json deleted file mode 100644 index e643b138..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemSoulSnare.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "soulsnare": { - "textures": { - "layer0": "bloodmagic:items/SoulSnare" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemTelepositionFocus.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemTelepositionFocus.json deleted file mode 100644 index 34f21365..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemTelepositionFocus.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "weak": { - "textures": { - "layer0": "bloodmagic:items/TeleposerFocus" - } - }, - "enhanced": { - "textures": { - "layer0": "bloodmagic:items/EnhancedTeleposerFocus" - } - }, - "reinforced": { - "textures": { - "layer0": "bloodmagic:items/ReinforcedTeleposerFocus" - } - }, - "demonic": { - "textures": { - "layer0": "bloodmagic:items/DemonicTeleposerFocus" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemUpgradeTome.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemUpgradeTome.json deleted file mode 100644 index 1562c045..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemUpgradeTome.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "upgradetome": { - "textures": { - "layer0": "bloodmagic:items/UpgradeTome" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemUpgradeTrainer.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemUpgradeTrainer.json deleted file mode 100644 index 37735a28..00000000 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemUpgradeTrainer.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "builtin/generated", - "transform": "forge:default-item" - }, - "variants": { - "type": { - "upgradetrainer": { - "textures": { - "layer0": "bloodmagic:items/UpgradeTrainer" - } - } - } - } -} diff --git a/src/main/resources/assets/bloodmagic/blockstates/mimic.json b/src/main/resources/assets/bloodmagic/blockstates/mimic.json new file mode 100644 index 00000000..697c5514 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/mimic.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "bloodmagic:block/opaquemimic" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/blockstates/soulforge.json b/src/main/resources/assets/bloodmagic/blockstates/soulforge.json new file mode 100644 index 00000000..12e4803a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/blockstates/soulforge.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/soulforge" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/books/architect.xml b/src/main/resources/assets/bloodmagic/books/architect.xml deleted file mode 100644 index d8bfebc9..00000000 --- a/src/main/resources/assets/bloodmagic/books/architect.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - The Architect - -My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. - -I was brought to a village nearby, where a magician named Magus helped tend to my wounds. The magic that he used was something that I had never seen before – it wasn’t Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. - - - - - Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. - -It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, “Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find yourself taking a nice vacation in Tartarus.†The thing was, I wanted to go there – I had some unfinished business with the demons. - - - - - The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of “Equivalent Exchange,†I managed to construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! - - - - - The Blood Altar - -To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. - -The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few - - - - - moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. - - - - - - Blood Altar - - bloodAltar - three - - - - - Sacrificial Knife - - sacrificialKnife - three - - - - - The Soul Network - -One thing that I initially didn’t understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I brought my notes to him he was really impressed with what I have found. - -When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus - - - - - - managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called “Life Points,†or LP. I experimented with this, and one heart equals 200 LP. - -I have christened this system to be the “Soul Network,†and is used in all branches of Blood Magic indirectly. - - - - - - Sigils - -Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather… static in nature. Sure, being able to summon a meteor is all fine and dandy, but won’t exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. - -The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, which I could link to my network and see - - - - - - how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. - - Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to view his network, for some reason I could not gleam any information from him. I don’t really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually … nothing from Magus is strange. - - - - - Divination Sigil - - divinationSigil - three - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/gui/jei/alchemyTable.png b/src/main/resources/assets/bloodmagic/gui/jei/alchemytable.png similarity index 100% rename from src/main/resources/assets/bloodmagic/gui/jei/alchemyTable.png rename to src/main/resources/assets/bloodmagic/gui/jei/alchemytable.png diff --git a/src/main/resources/assets/bloodmagic/gui/jei/arc.png b/src/main/resources/assets/bloodmagic/gui/jei/arc.png new file mode 100644 index 00000000..3c507024 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/gui/jei/arc.png differ diff --git a/src/main/resources/assets/bloodmagic/gui/jei/soulForge.png b/src/main/resources/assets/bloodmagic/gui/jei/soulforge.png similarity index 100% rename from src/main/resources/assets/bloodmagic/gui/jei/soulForge.png rename to src/main/resources/assets/bloodmagic/gui/jei/soulforge.png diff --git a/src/main/resources/assets/bloodmagic/gui/SigilHolding.png b/src/main/resources/assets/bloodmagic/gui/sigilholding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/gui/SigilHolding.png rename to src/main/resources/assets/bloodmagic/gui/sigilholding.png diff --git a/src/main/resources/assets/bloodmagic/gui/Teleposer.png b/src/main/resources/assets/bloodmagic/gui/teleposer.png similarity index 100% rename from src/main/resources/assets/bloodmagic/gui/Teleposer.png rename to src/main/resources/assets/bloodmagic/gui/teleposer.png diff --git a/src/main/resources/assets/bloodmagic/gui/WritingTable.png b/src/main/resources/assets/bloodmagic/gui/writingtable.png similarity index 100% rename from src/main/resources/assets/bloodmagic/gui/WritingTable.png rename to src/main/resources/assets/bloodmagic/gui/writingtable.png diff --git a/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/divination_array_1.png b/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/divination_array_1.png new file mode 100644 index 00000000..d2e4c7c4 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/divination_array_1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/divination_array_2.png b/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/divination_array_2.png new file mode 100644 index 00000000..a6d20ae3 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/divination_array_2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/simple_array.png b/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/simple_array.png new file mode 100644 index 00000000..04771848 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/alchemy_array/simple_array.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/alchemy_table/alchemy_table_gui.png b/src/main/resources/assets/bloodmagic/images/entries/alchemy_table/alchemy_table_gui.png new file mode 100644 index 00000000..ace6e562 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/alchemy_table/alchemy_table_gui.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t1.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t1.png new file mode 100644 index 00000000..bb04d3d8 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t2_1.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t2_1.png new file mode 100644 index 00000000..5eb54019 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t2_1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t2_2.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t2_2.png new file mode 100644 index 00000000..c3d953db Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t2_2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t3_1.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t3_1.png new file mode 100644 index 00000000..8d93789b Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t3_1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t3_2.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t3_2.png new file mode 100644 index 00000000..2d362a8d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t3_2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t4_1.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t4_1.png new file mode 100644 index 00000000..d0f5bc83 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t4_1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t4_2.png b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t4_2.png new file mode 100644 index 00000000..9f16d8f0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/altar/altar_t4_2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/demon_will/demon_crucible.png b/src/main/resources/assets/bloodmagic/images/entries/demon_will/demon_crucible.png new file mode 100644 index 00000000..143c444f Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/demon_will/demon_crucible.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/demon_will/demon_will.png b/src/main/resources/assets/bloodmagic/images/entries/demon_will/demon_will.png new file mode 100644 index 00000000..f75a0af8 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/demon_will/demon_will.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/demon_will/snare_particles.png b/src/main/resources/assets/bloodmagic/images/entries/demon_will/snare_particles.png new file mode 100644 index 00000000..b8723d3e Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/demon_will/snare_particles.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/demon_will/will_splitting.png b/src/main/resources/assets/bloodmagic/images/entries/demon_will/will_splitting.png new file mode 100644 index 00000000..9c0f66d0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/demon_will/will_splitting.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/divination_sigil.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/divination_sigil.png new file mode 100644 index 00000000..e50354ec Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/divination_sigil.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil1.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil1.png new file mode 100644 index 00000000..b9855936 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil2.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil2.png new file mode 100644 index 00000000..dc31e01c Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil3.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil3.png new file mode 100644 index 00000000..5dc6f01f Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/grove_sigil3.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/lava_sigil1.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/lava_sigil1.png new file mode 100644 index 00000000..8eee1885 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/lava_sigil1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/lava_sigil2.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/lava_sigil2.png new file mode 100644 index 00000000..083b1862 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/lava_sigil2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/mining_sigil1.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/mining_sigil1.png new file mode 100644 index 00000000..7b8ed509 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/mining_sigil1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/mining_sigil2.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/mining_sigil2.png new file mode 100644 index 00000000..223eb030 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/mining_sigil2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/seer_sigil_info.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/seer_sigil_info.png new file mode 100644 index 00000000..afb33dab Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/seer_sigil_info.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/water_sigil1.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/water_sigil1.png new file mode 100644 index 00000000..cf6e7ee9 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/water_sigil1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/sigil/water_sigil2.png b/src/main/resources/assets/bloodmagic/images/entries/sigil/water_sigil2.png new file mode 100644 index 00000000..e94e2021 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/sigil/water_sigil2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar.png b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar.png new file mode 100644 index 00000000..617e26c0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar1.png b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar1.png new file mode 100644 index 00000000..24a50817 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar1.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar2.png b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar2.png new file mode 100644 index 00000000..1a4ae8cf Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar2.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar3.png b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar3.png new file mode 100644 index 00000000..a8cb9062 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar3.png differ diff --git a/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar4.png b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar4.png new file mode 100644 index 00000000..dbdfe60e Binary files /dev/null and b/src/main/resources/assets/bloodmagic/images/entries/utility/incense_altar4.png differ diff --git a/src/main/resources/assets/bloodmagic/lang/bg_BG.lang b/src/main/resources/assets/bloodmagic/lang/bg_BG.lang deleted file mode 100644 index 792f06d2..00000000 --- a/src/main/resources/assets/bloodmagic/lang/bg_BG.lang +++ /dev/null @@ -1,85 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=МагиÑта на Кръвта -itemGroup.BloodMagic.creativeTabTome=МагиÑта на Кръвта Ъпгрейд Томове - -#Items -item.BloodMagic.activationCrystal.weak.name=Слаб КриÑтален Ðктиватор -item.BloodMagic.activationCrystal.awakened.name=Буднат КриÑтален Ðктиватор -item.BloodMagic.activationCrystal.creative.name=Креативен КриÑтален Ðктиватор - -item.BloodMagic.sacrificialDagger.normal.name=Жертвоприношителен Ðож -item.BloodMagic.sacrificialDagger.creative.name=Креативен Жертвоприношителен Ðож -item.BloodMagic.pack.selfSacrifice.name=Кървав Пакет -item.BloodMagic.pack.sacrifice.name=ГЕРБ -item.BloodMagic.daggerOfSacrifice.name=Ðож на Жертвоприношението - -item.BloodMagic.lavaCrystal.name=Лава КриÑтал - -item.BloodMagic.bound.sword.name=Обвързано ОÑтрие -item.BloodMagic.bound.pickaxe.name=Обвързана Кирка -item.BloodMagic.bound.axe.name=Обвързана Брадва -item.BloodMagic.bound.shovel.name=Обвързана Лопата - -item.BloodMagic.bucket.lifeEssence.name=Кофата на Живота - -item.BloodMagic.orb.weak.name=Слаб Кръвен Орб -item.BloodMagic.orb.apprentice.name=Apprentice Кръвен Орб -item.BloodMagic.orb.magician.name=Магичен Кръвен Орб -item.BloodMagic.orb.master.name=МаÑтер Кръвен Орб -item.BloodMagic.orb.archmage.name=Превъзходен Кръвен Орб -item.BloodMagic.orb.transcendent.name=Съвършен Кръвен Орб - -item.BloodMagic.bloodShard.weak.name=Слабо Кръвно Парче -item.BloodMagic.bloodShard.demon.name=Демонично Кръвно Парче - -item.BloodMagic.baseComponent.reagentWater.name=Ваден Реагент -item.BloodMagic.baseComponent.reagentLava.name=Лава Реагент -item.BloodMagic.baseComponent.reagentAir.name=Въздушен Реагент -item.BloodMagic.baseComponent.reagentFastMiner.name=Минен Реагент -item.BloodMagic.baseComponent.reagentVoid.name=Void Реагент -item.BloodMagic.baseComponent.reagentGrowth.name=РаÑтежен Реагент -item.BloodMagic.baseComponent.reagentAffinity.name=Елеменарно Ðфинитен Реагент -item.BloodMagic.baseComponent.reagentSight.name=Зрителен Реагент -item.BloodMagic.baseComponent.reagentBinding.name=Обвързващ Реагент -item.BloodMagic.baseComponent.reagentSuppression.name=ПотиÑкащ Реагент -item.BloodMagic.baseComponent.frameParts.name=ЧаÑти на Рамка -item.BloodMagic.baseComponent.reagentBloodLight.name=Светлинно Кръвен Реагент -item.BloodMagic.baseComponent.reagentMagnetism.name=Магнетичен Реагент -item.BloodMagic.baseComponent.reagentHaste.name=Бързинен Реагент -item.BloodMagic.baseComponent.reagentBridge.name=Фантомен МоÑÑ‚ Реагент -item.BloodMagic.baseComponent.reagentCompression.name=КомпреÑиращ Реагент -item.BloodMagic.baseComponent.reagentSeverance.name=СкъÑÑващ Реагент - -item.BloodMagic.baseComponent.reagentTeleposition.name=ПозициÑпроменÑщ Реагент -item.BloodMagic.baseComponent.reagentTransposition.name=ТранÑпонираЩ Реагент - -item.BloodMagic.baseComponent.ironSand.name=Железен ПÑÑък -item.BloodMagic.baseComponent.goldSand.name=Златен ПÑÑък -item.BloodMagic.baseComponent.coalSand.name=Въглищен ПÑÑък - -item.BloodMagic.demonCrystal.crystalDefault.name=КриÑтал на Демонична Ð’Ð¾Ð»Ñ -item.BloodMagic.demonCrystal.crystalCorrosive.name=КриÑтал на Корозивна Ð’Ð¾Ð»Ñ -item.BloodMagic.demonCrystal.crystalDestructive.name=КриÑтал на Разрушителна Ð’Ð¾Ð»Ñ -item.BloodMagic.demonCrystal.crystalVengeful.name=КриÑтал на ОтмъÑтителна Ð’Ð¾Ð»Ñ -item.BloodMagic.demonCrystal.crystalSteadfast.name=КриÑтал на Твърда Ð’Ð¾Ð»Ñ - -item.BloodMagic.monsterSoul.base.name=ДÑволÑка Ð’Ð¾Ð»Ñ - -item.BloodMagic.livingArmour.helmet.name=Живата КаÑка -item.BloodMagic.livingArmour.chest.name=ЖивÑÑ‰Ð¸Ñ Ðагръдник -item.BloodMagic.livingArmour.legs.name=Живите Гамаши -item.BloodMagic.livingArmour.boots.name=Живите Ботуши -item.BloodMagic.sentientArmour.helmet.name=ЧувÑтвителна КаÑка -item.BloodMagic.sentientArmour.chest.name=ЧувÑтвителен Ðагръдник -item.BloodMagic.sentientArmour.legs.name=ЧувÑтвителни Гамаши -item.BloodMagic.sentientArmour.boots.name=ЧувÑтвителни Ботуши - -item.BloodMagic.altarMaker.name=Създател на алтари - -item.BloodMagic.sentientSword.name=ЧувÑтвителен Меч -item.BloodMagic.sentientBow.name=ЧувÑтвителен Лък -item.BloodMagic.sentientArmourGem.name=Ñкъпоценен камък на ЧувÑтвителната Ð‘Ñ€Ð¾Ð½Ñ - -# JustEnoughItems -jei.BloodMagic.recipe.altar=Ðлтар на Кръвта -jei.BloodMagic.recipe.ticksRequired=Време: %,d Ticks diff --git a/src/main/resources/assets/bloodmagic/lang/de_DE.lang b/src/main/resources/assets/bloodmagic/lang/de_DE.lang deleted file mode 100644 index 643e3236..00000000 --- a/src/main/resources/assets/bloodmagic/lang/de_DE.lang +++ /dev/null @@ -1,310 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=Blood Magic -itemGroup.BloodMagic.creativeTabTome=Blood Magic - Upgrades - -#Items -item.BloodMagic.activationCrystal.weak.name=Schwacher Aktivierungskristall -item.BloodMagic.activationCrystal.awakened.name=Erweckter Aktivierungskristall -item.BloodMagic.activationCrystal.creative.name=Kreativer Aktivierungskristall - -item.BloodMagic.sacrificialDagger.normal.name=Opferdolch -item.BloodMagic.sacrificialDagger.creative.name=Kreativer Opferdolch -item.BloodMagic.pack.selfSacrifice.name=Blutweste -item.BloodMagic.pack.sacrifice.name=Vampirische Weste -item.BloodMagic.daggerOfSacrifice.name=Opfermesser - -item.BloodMagic.lavaCrystal.name=Lavakristall - -item.BloodMagic.bound.sword.name=Gebundene Klinge -item.BloodMagic.bound.pickaxe.name=Gebundene Spitzhacke -item.BloodMagic.bound.axe.name=Gebundene Axt -item.BloodMagic.bound.shovel.name=Gebundene Schaufel - -item.BloodMagic.bucket.lifeEssence.name=Eimer mit Lebensessenz - -item.BloodMagic.scribe.water.name=Elementar-Gravurwerkzeug: Wasser -item.BloodMagic.scribe.fire.name=Elementar-Gravurwerkzeug: Feuer -item.BloodMagic.scribe.earth.name=Elementar-Gravurwerkzeug: Erde -item.BloodMagic.scribe.air.name=Elementar-Gravurwerkzeug: Luft -item.BloodMagic.scribe.dusk.name=Elementar-Gravurwerkzeug: Morgendämmerung -item.BloodMagic.scribe.dawn.name=Elementar-Gravurwerkzeug: Abenddämmerung - -item.BloodMagic.focus.weak.name=Telepositionsfokus -item.BloodMagic.focus.enhanced.name=Verbesserter Telepositionsfokus -item.BloodMagic.focus.reinforced.name=Verstärkter Telepositionsfokus -item.BloodMagic.focus.demonic.name=Dämonischer Telepositionsfokus - -item.BloodMagic.slate.blank.name=Leere Tafel -item.BloodMagic.slate.reinforced.name=Verstärkte Tafel -item.BloodMagic.slate.imbued.name=Erfüllte Tafel -item.BloodMagic.slate.demonic.name=Dämonische Tafel -item.BloodMagic.slate.ethereal.name=Ätherische Tafel - -item.BloodMagic.orb.weak.name=Schwacher Blutorb -item.BloodMagic.orb.apprentice.name=Blutorb des Lehrlings -item.BloodMagic.orb.magician.name=Blutorb des Magiers -item.BloodMagic.orb.master.name=Blutorb des Meisters -item.BloodMagic.orb.archmage.name=Blutorb des Erzmagiers -item.BloodMagic.orb.transcendent.name=Transzendenter Blutorb - -item.BloodMagic.reagent.incendium.name=Incendium -item.BloodMagic.reagent.magicales.name=Magicales -item.BloodMagic.reagent.sanctus.name=Sanctus -item.BloodMagic.reagent.aether.name=Aether -item.BloodMagic.reagent.crepitous.name=Crepitous -item.BloodMagic.reagent.crystallos.name=Crystallos -item.BloodMagic.reagent.terrae.name=Terrae -item.BloodMagic.reagent.aquasalus.name=Aquasalus -item.BloodMagic.reagent.tennebrae.name=Tennebrae -item.BloodMagic.reagent.offensa.name=Offensa -item.BloodMagic.reagent.praesidium.name=Praesidium -item.BloodMagic.reagent.orbisterrae.name=Orbis Terrae -item.BloodMagic.reagent.virtus.name=Virtus -item.BloodMagic.reagent.reductus.name=Reductus -item.BloodMagic.reagent.potentia.name=Potentia - -item.BloodMagic.bloodShard.weak.name=Schwache Blutscherbe -item.BloodMagic.bloodShard.demon.name=Dämonische Blutscherbe - -item.BloodMagic.baseComponent.reagentWater.name=Wasserreagenz -item.BloodMagic.baseComponent.reagentLava.name=Lavareagenz -item.BloodMagic.baseComponent.reagentAir.name=Luftreagenz -item.BloodMagic.baseComponent.reagentFastMiner.name=Reagenz der Eile -item.BloodMagic.baseComponent.reagentVoid.name=reagenz der Leere -item.BloodMagic.baseComponent.reagentGrowth.name=Wachstumsreagenz -item.BloodMagic.baseComponent.reagentAffinity.name=Reagenz der elementaren Verbundenheit -item.BloodMagic.baseComponent.reagentSight.name=Sichtreagenz -item.BloodMagic.baseComponent.reagentBinding.name=Bindendes Reagenz -item.BloodMagic.baseComponent.reagentSuppression.name=Unterdrückendes Reagenz - -item.BloodMagic.monsterSoul.base.name=Dämonischer Wille - -item.BloodMagic.sigil.air.name=Luftsiegel -item.BloodMagic.sigil.bloodLight.name=Siegel der Blutlampe -item.BloodMagic.sigil.compression.name=Siegel der Kompression -item.BloodMagic.sigil.divination.name=Wahrheitssiegel -item.BloodMagic.sigil.water.name=Wassersiegel -item.BloodMagic.sigil.lava.name=Lavasiegel -item.BloodMagic.sigil.void.name=Siegel der Leere -item.BloodMagic.sigil.greenGrove.name=Siegel des Grünen Hains -item.BloodMagic.sigil.elementalAffinity.name=Siegel der elementaren Verbundenheit -item.BloodMagic.sigil.haste.name=Siegel der Hast -item.BloodMagic.sigil.suppression.name=Siegel der Unterdrückung -item.BloodMagic.sigil.magnetism.name=Siegel des Magnetismus -item.BloodMagic.sigil.fastMiner.name=Siegel des Eile -item.BloodMagic.sigil.seer.name=Siegel der Sicht -item.BloodMagic.sigil.phantomBridge.name=Siegel der Phantombrücke -item.BloodMagic.sigil.whirlwind.name=Siegel des Wirbelwindes -item.BloodMagic.sigil.enderSeverance.name=Siegel des Endertrennens - -item.BloodMagic.livingArmour.helmet.name=Lebender Helm -item.BloodMagic.livingArmour.chest.name=Lebender Brustpanzer -item.BloodMagic.livingArmour.legs.name=Lebender Beinschutz -item.BloodMagic.livingArmour.boots.name=Lebende Schuhe - -item.BloodMagic.altarMaker.name=Altarersteller - -item.BloodMagic.ritualDivinernormal.name=Ritualrute -item.BloodMagic.ritualDivinerdusk.name=Ritualrute [Morgendämmerung] -item.BloodMagic.ritualDivinerdawn.name=Ritualrute [Abenddämmerung] - -item.BloodMagic.arcaneAshes.name=Arkane Asche -item.BloodMagic.upgradeTome.name=Thesis zur Verbesserung lebender Rüstung - -item.BloodMagic.sentientSword.name=Intelligentes Schwert -item.BloodMagic.soulGem.petty.name=Winziges Juwel des Tartaros -item.BloodMagic.soulGem.lesser.name=Niederes Juwel des Tartaros -item.BloodMagic.soulGem.common.name=Gewöhnliches Juwel des Tartaros -item.BloodMagic.soulGem.greater.name=Größeres Juwel des Tartaros -item.BloodMagic.soulGem.grand.name=Großartiges Juwel des Tartaros -item.BloodMagic.soulSnare.base.name=Rudimentäre Falle -item.BloodMagic.sentientBow.name=Intelligenter Bogen - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=Lebensessenz - -tile.BloodMagic.stone.ritual.master.name=Haupt-Ritualstein -tile.BloodMagic.stone.ritual.imperfect.name=Imperfekter Ritualstein - -tile.BloodMagic.altar.name=Blutaltar -tile.BloodMagic.rune.blank.name=Blutrune -tile.BloodMagic.rune.speed.name=Geschwindigkeitsrune -tile.BloodMagic.rune.efficiency.name=Effizienzrune -tile.BloodMagic.rune.sacrifice.name=Rune der Opferung -tile.BloodMagic.rune.selfSacrifice.name=Rune der Selbstopferung -tile.BloodMagic.rune.displacement.name=Rune der Deplazierung -tile.BloodMagic.rune.capacity.name=Kapazitätsrune -tile.BloodMagic.rune.augCapacity.name=Rune der erweiterten Kapazität -tile.BloodMagic.rune.orb.name=Orbrune -tile.BloodMagic.rune.acceleration.name=Beschleunigungsrune -tile.BloodMagic.rune.charging.name=Laderune - -tile.BloodMagic.ritualStone.blank.name=Ritualstein -tile.BloodMagic.ritualStone.water.name=Wasserritualstein -tile.BloodMagic.ritualStone.fire.name=Feuerritualstein -tile.BloodMagic.ritualStone.earth.name=Erdritualstein -tile.BloodMagic.ritualStone.air.name=Luftritualstein -tile.BloodMagic.ritualStone.dusk.name=Morgendämmerungsritualstein -tile.BloodMagic.ritualStone.dawn.name=Abenddämmerungsritualstein - -tile.BloodMagic.bloodstonebrick.large.name=Großer Blutsteinziegel -tile.BloodMagic.bloodstonebrick.brick.name=Blutsteinziegel -tile.BloodMagic.crystal.large.name=Kristallklumpen -tile.BloodMagic.crystal.brick.name=Kristallklumpenziegel -tile.BloodMagic.bloodLight.name=Blutlampe -tile.BloodMagic.spectralBlock.name=Spektralblock -tile.BloodMagic.phantomBlock.name=Phantomblock - -tile.BloodMagic.teleposer.name=Teleposer -tile.BloodMagic.soulForge.name=Höllenfeuerschmiede - -# Tooltips -tooltip.BloodMagic.orb.desc=Speichert Lebensessenz -tooltip.BloodMagic.orb.owner=Hinzugefügt durch: %s -tooltip.BloodMagic.currentOwner=Eigentümer: %s -tooltip.BloodMagic.currentTier=Ausbaustufe: %d - -tooltip.BloodMagic.activated=Aktiviert -tooltip.BloodMagic.deactivated=Deaktiviert - -tooltip.BloodMagic.sigil.air.desc=&oIch fühl mich schon leichter... -tooltip.BloodMagic.sigil.bloodLight.desc=&oIch sehe ein Licht! -tooltip.BloodMagic.sigil.compression.desc=&oDiamanthände -tooltip.BloodMagic.sigil.divination.desc=&oSpähe in die Seele -tooltip.BloodMagic.sigil.divination.currentAltarTier=Ausbaustufe: %d -tooltip.BloodMagic.sigil.divination.currentEssence=Gespeicherte Lebensessenz: %d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=Maximale Kapazität: %d LP -tooltip.BloodMagic.sigil.water.desc=&oHat jemand nach unendlichem Wasser gefragt? -tooltip.BloodMagic.sigil.lava.desc=&oHEISS! NICHT ESSEN! -tooltip.BloodMagic.sigil.void.desc=&oBesser als Swiffer®! -tooltip.BloodMagic.sigil.greenGrove.desc=&oUmweltverträglich -tooltip.BloodMagic.sigil.magnetism.desc=&oIch habe eine anziehende Persönlichkeit -tooltip.BloodMagic.sigil.suppression.desc=&oBesser als Telekinese -tooltip.BloodMagic.sigil.haste.desc=&o42 Dosen Koffein später... -tooltip.BloodMagic.sigil.fastMiner.desc=&oHacke wie ein Weltmeister -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oAchtung! Fallende Feuerfische -tooltip.BloodMagic.sigil.seer.desc=&oWenn allsehend nicht genug ist -tooltip.BloodMagic.sigil.seer.currentAltarProgress=Fortschritt: %d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=Fortschritt: %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=Verbrauch: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=Ausbaustufe: %d -tooltip.BloodMagic.sigil.seer.currentEssence=Gespeicherte Lebensessenz: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=Maximale Kapazität: %d LP -tooltip.BloodMagic.sigil.seer.currentCharge=Ladung: %d -tooltip.BloodMagic.sigil.phantomBridge.desc=&oLaufen auf dünner Luft... -tooltip.BloodMagic.sigil.whirlwind.desc=&oBesser keinen Rock tragen -tooltip.BloodMagic.sigil.enderSeverance.desc=&oBringt Enderman in Notlage - -tooltip.BloodMagic.bound.sword.desc=&oErlegen der Schwachen -tooltip.BloodMagic.bound.pickaxe.desc=&oZerstören von Stein ohne Erbarmen -tooltip.BloodMagic.bound.axe.desc=&oDämonischer Kahlschlag -tooltip.BloodMagic.bound.shovel.desc=&oSchrubbt den Dreck vom Boden - -tooltip.BloodMagic.sacrificialDagger.desc=Schon ein Stich in den Finger genügt -tooltip.BloodMagic.slate.desc=Stein getränkt im Blutaltar -tooltip.BloodMagic.inscriber.desc=Die Zeichen an der Wand. - -tooltip.BloodMagic.pack.selfSacrifice.desc=Es scheuert richtig... -tooltip.BloodMagic.pack.sacrifice.desc=Beschreibung -tooltip.BloodMagic.pack.stored=Enthält: %d LP - -tooltip.BloodMagic.activationCrystal.weak=Aktiviert niedrig-levelige Rituale -tooltip.BloodMagic.activationCrystal.awakened=Aktiviert mächtigere Rituale -tooltip.BloodMagic.activationCrystal.creative=Kreativmodus: Aktiviert jedes Ritual - -tooltip.BloodMagic.diviner.currentRitual=Ritual: -tooltip.BloodMagic.diviner.blankRune=Leere Runen: %d -tooltip.BloodMagic.diviner.waterRune=Wasserrunen: %d -tooltip.BloodMagic.diviner.airRune=Luftrunen: %d -tooltip.BloodMagic.diviner.fireRune=Feuerrunen: %d -tooltip.BloodMagic.diviner.earthRune=Erdrunen: %d -tooltip.BloodMagic.diviner.duskRune=Runen der Morgendämmerung: %d -tooltip.BloodMagic.diviner.dawnRune=Runen der Abenddämmerung: %d -tooltip.BloodMagic.diviner.totalRune=Runen insgesamt: %d -tooltip.BloodMagic.diviner.extraInfo=Halte Shift für extra Info -tooltip.BloodMagic.diviner.currentDirection=Richtung: %s - -tooltip.BloodMagic.arcaneAshes=Asche gebraucht für einen alchemischen Kreis - -tooltip.BloodMagic.telepositionFocus.coords=Koordinaten: (%d, %d, %d) -tooltip.BloodMagic.telepositionFocus.dimension=Dimensions-ID: %d -tooltip.BloodMagic.telepositionFocus.weak=Benutzt, um Blöcke zu verschieben -tooltip.BloodMagic.telepositionFocus.enhanced=Benutzt, um Blöcke zu verschieben -tooltip.BloodMagic.telepositionFocus.reinforced=Benutzt, um Blöcke zu verschieben -tooltip.BloodMagic.telepositionFocus.demonic=Benutzt, um Blöcke zu teleportieren - -tooltip.BloodMagic.livingArmour.upgrade.speed=Schnelle Füße -tooltip.BloodMagic.livingArmour.upgrade.digging=Zwergenhafte Stärke -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Giftungsresistenz -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Zähe Handballen -tooltip.BloodMagic.livingArmour.upgrade.knockback=Body Builder -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=Zähe Haut -tooltip.BloodMagic.livingArmour.upgrade.health=Gesund -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=Heftiger Schlag -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=Trickschuss -tooltip.BloodMagic.livingArmour.upgrade.level=%s (Level %d) - -tooltip.BloodMagic.will=Willensqualität: %1$,.2f -tooltip.BloodMagic.sentientSword.desc=Benutzt Dämonenwille um volles Potential freizusetzen -tooltip.BloodMagic.soulGem.petty=Ein Juwel, das eine winzige Menge an Willen aufnehmen kann -tooltip.BloodMagic.soulGem.lesser=Ein Juwel, das ein wenig Willen festhalten kann -tooltip.BloodMagic.soulGem.common=Ein Juwel, das eine ordentliche Menge an Willen aufnehmen kann -tooltip.BloodMagic.soulGem.greater=Ein Juwel, das eine größere Menge an Willen aufnehmen kann -tooltip.BloodMagic.soulGem.grand=Ein Juwel, das eine große Menge an Willen aufnehmen kann -tooltip.BloodMagic.soulSnare.desc=Werfe nach einem Monster und töte es anschließend, um seinen Dämonischen Willen zu erhalten - -# Ritual -ritual.BloodMagic.testRitual=Testritual -ritual.BloodMagic.waterRitual=Ritual der vollen Quelle -ritual.BloodMagic.lavaRitual=Serenade des Nethers -ritual.BloodMagic.greenGroveRitual=Ritual des grünen Hains -ritual.BloodMagic.jumpRitual=Ritual des hohen Sprungs -ritual.BloodMagic.wellOfSufferingRitual=Quelle des Leidens -ritual.BloodMagic.featheredKnifeRitual=Ritual der gefederten Klinge -ritual.BloodMagic.regenerationRitual=Ritual der Regeneration -ritual.BloodMagic.harvestRitual=Ritual der Mondernte -ritual.BloodMagic.magneticRitual=Ritual des Magnetismus -ritual.BloodMagic.crushingRitual=Ritual des Brechers -ritual.BloodMagic.fullStomachRitual=Ritual des gefüllten Bauches -ritual.BloodMagic.interdictionRitual=Ritual der Verbietung -ritual.BloodMagic.containmentRitual=Ritual des Einschlusses -ritual.BloodMagic.speedRitual=Ritual der Geschwindigkeit -ritual.BloodMagic.suppressionRitual=Ritual der Unterdrückung -ritual.BloodMagic.expulsionRitual=Aura der Vertreibung -ritual.BloodMagic.zephyrRitual=Ruf des Zephir - -# Chat -chat.BloodMagic.altarMaker.setTier=Setze Ausbaustufe auf: %d -chat.BloodMagic.altarMaker.building=Baue Stufe %d-Altar -chat.BloodMagic.altarMaker.destroy=Stufe %d-Altar zerstört -chat.BloodMagic.altarMaker.creativeOnly=Diese Item ist nur im Kreativmodus erhältlich. - -chat.BloodMagic.damageSource=%ss Seele ist zu schwach geworden. - -chat.BloodMagic.ritual.weak=Du spürst einen Drang, bist aber zu schwach für ein Ritual. -chat.BloodMagic.ritual.prevent=Das Ritual versucht, dir zu widerstehen. -chat.BloodMagic.ritual.activate=Ein Energiestrom fließt durch das Ritual. -chat.BloodMagic.ritual.notValid=Du fühlst, dass die Runen nicht richtig eingerichtet sind... - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=Du fühlst dich schon wieder besser. -chat.BloodMagic.livingArmour.newUpgrade=Upgrade erworben! - -# JustEnoughItems -jei.BloodMagic.recipe.altar=Blutaltar -jei.BloodMagic.recipe.binding=Bindungsritual -jei.BloodMagic.recipe.alchemyArrayCrafting=Alchemische Anordnung -jei.BloodMagic.recipe.soulForge=Höllenfeuerschmiede -jei.BloodMagic.recipe.requiredLP=LP: %d -jei.BloodMagic.recipe.requiredTier=Ausbaustufe: %d -jei.BloodMagic.recipe.minimumSouls=Minimum: %d Wille -jei.BloodMagic.recipe.soulsDrained=Verbraucht: %d Wille - -jei.BloodMagic.desc.altarBuilder=Ein Item zum Testen. Nur im Kreativmodus erhältlich.\n\nShift+Rechtsklick um die Ausbaustufe zu ändern. Rechtsklicke auf einen Altar, um den Bau zu starten.\n\nZerstöre einen Altar mit ihm in der Hand, um alles abzubauen. -jei.BloodMagic.desc.demonicWill=Prägung eines dämonischen Wesens gebunden an eine Kreatur.\n\nKann durch das Töten eines Monsters mit einer empfindsamen Waffe, oder das Werfen einer Falle und Umbringen während as weiße Partikel aussendet, gesammelt werden. - -# WAILA -waila.BloodMagic.sneak=&oSchleiche für Info -option.BloodMagic.bypassSneak=Umgehe Schleichen -option.BloodMagic.bloodAltar=Blutaltar -option.BloodMagic.ritualController=Ritualsteine -option.BloodMagic.teleposer=Teleposer diff --git a/src/main/resources/assets/bloodmagic/lang/en_US.lang b/src/main/resources/assets/bloodmagic/lang/en_US.lang deleted file mode 100644 index b44a5716..00000000 --- a/src/main/resources/assets/bloodmagic/lang/en_US.lang +++ /dev/null @@ -1,890 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=Blood Magic -itemGroup.BloodMagic.creativeTabTome=Blood Magic Upgrade Tomes - -#Items -item.BloodMagic.activationCrystal.weak.name=Weak Activation Crystal -item.BloodMagic.activationCrystal.awakened.name=Awakened Activation Crystal -item.BloodMagic.activationCrystal.creative.name=Creative Activation Crystal - -item.BloodMagic.sacrificialDagger.normal.name=Sacrificial Dagger -item.BloodMagic.sacrificialDagger.creative.name=Creative Sacrificial Dagger -item.BloodMagic.pack.selfSacrifice.name=Blood Letter's Pack -item.BloodMagic.pack.sacrifice.name=Coat of Arms -item.BloodMagic.daggerOfSacrifice.name=Dagger of Sacrifice - -item.BloodMagic.lavaCrystal.name=Lava Crystal - -item.BloodMagic.bound.sword.name=Bound Blade -item.BloodMagic.bound.pickaxe.name=Bound Pickaxe -item.BloodMagic.bound.axe.name=Bound Axe -item.BloodMagic.bound.shovel.name=Bound Shovel - -item.BloodMagic.bucket.lifeEssence.name=Bucket of Life - -item.BloodMagic.scribe.water.name=Elemental Inscription Tool: Water -item.BloodMagic.scribe.fire.name=Elemental Inscription Tool: Fire -item.BloodMagic.scribe.earth.name=Elemental Inscription Tool: Earth -item.BloodMagic.scribe.air.name=Elemental Inscription Tool: Air -item.BloodMagic.scribe.dusk.name=Elemental Inscription Tool: Dusk -item.BloodMagic.scribe.dawn.name=Elemental Inscription Tool: Dawn - -item.BloodMagic.focus.weak.name=Teleposition Focus -item.BloodMagic.focus.enhanced.name=Enhanced Teleposition Focus -item.BloodMagic.focus.reinforced.name=Reinforced Teleposition Focus -item.BloodMagic.focus.demonic.name=Demonic Teleposition Focus - -item.BloodMagic.slate.blank.name=Blank Slate -item.BloodMagic.slate.reinforced.name=Reinforced Slate -item.BloodMagic.slate.imbued.name=Imbued Slate -item.BloodMagic.slate.demonic.name=Demonic Slate -item.BloodMagic.slate.ethereal.name=Ethereal Slate - -item.BloodMagic.orb.weak.name=Weak Blood Orb -item.BloodMagic.orb.apprentice.name=Apprentice Blood Orb -item.BloodMagic.orb.magician.name=Magician Blood Orb -item.BloodMagic.orb.master.name=Master Blood Orb -item.BloodMagic.orb.archmage.name=Archmage Blood Orb -item.BloodMagic.orb.transcendent.name=Transcendent Blood Orb - -item.BloodMagic.reagent.incendium.name=Incendium -item.BloodMagic.reagent.magicales.name=Magicales -item.BloodMagic.reagent.sanctus.name=Sanctus -item.BloodMagic.reagent.aether.name=Aether -item.BloodMagic.reagent.crepitous.name=Crepitous -item.BloodMagic.reagent.crystallos.name=Crystallos -item.BloodMagic.reagent.terrae.name=Terrae -item.BloodMagic.reagent.aquasalus.name=Aquasalus -item.BloodMagic.reagent.tennebrae.name=Tennebrae -item.BloodMagic.reagent.offensa.name=Offensa -item.BloodMagic.reagent.praesidium.name=Praesidium -item.BloodMagic.reagent.orbisterrae.name=Orbis Terrae -item.BloodMagic.reagent.virtus.name=Virtus -item.BloodMagic.reagent.reductus.name=Reductus -item.BloodMagic.reagent.potentia.name=Potentia - -item.BloodMagic.bloodShard.weak.name=Weak Blood Shard -item.BloodMagic.bloodShard.demon.name=Demon Blood Shard - -item.BloodMagic.baseComponent.reagentWater.name=Water Reagent -item.BloodMagic.baseComponent.reagentLava.name=Lava Reagent -item.BloodMagic.baseComponent.reagentAir.name=Air Reagent -item.BloodMagic.baseComponent.reagentFastMiner.name=Mining Reagent -item.BloodMagic.baseComponent.reagentVoid.name=Void Reagent -item.BloodMagic.baseComponent.reagentGrowth.name=Growth Reagent -item.BloodMagic.baseComponent.reagentAffinity.name=Elemental Affinity Reagent -item.BloodMagic.baseComponent.reagentSight.name=Sight Reagent -item.BloodMagic.baseComponent.reagentBinding.name=Binding Reagent -item.BloodMagic.baseComponent.reagentSuppression.name=Suppression Reagent -item.BloodMagic.baseComponent.frameParts.name=Frame Parts -item.BloodMagic.baseComponent.reagentBloodLight.name=Blood Lamp Reagent -item.BloodMagic.baseComponent.reagentMagnetism.name=Magnetism Reagent -item.BloodMagic.baseComponent.reagentHaste.name=Haste Reagent -item.BloodMagic.baseComponent.reagentBridge.name=Phantom Bridge Reagent -item.BloodMagic.baseComponent.reagentCompression.name=Compression Reagent -item.BloodMagic.baseComponent.reagentSeverance.name=Severance Reagent -item.BloodMagic.baseComponent.reagentHolding.name=Holding Reagent -item.BloodMagic.baseComponent.reagentClaw.name=Claw Reagent -item.BloodMagic.baseComponent.reagentBounce.name=Elasticity Reagent -item.BloodMagic.baseComponent.reagentFrost.name=Frost Reagent - -item.BloodMagic.baseComponent.reagentTeleposition.name=Teleposition Reagent -item.BloodMagic.baseComponent.reagentTransposition.name=Transposition Reagent - -item.BloodMagic.baseComponent.ironSand.name=Iron Sand -item.BloodMagic.baseComponent.goldSand.name=Gold Sand -item.BloodMagic.baseComponent.coalSand.name=Coal Sand -item.BloodMagic.baseComponent.plantOil.name=Plant Oil -item.BloodMagic.baseComponent.sulfur.name=Sulfur -item.BloodMagic.baseComponent.saltpeter.name=Saltpeter -item.BloodMagic.baseComponent.neurotoxin.name=Neuro Toxin -item.BloodMagic.baseComponent.antiseptic.name=Antiseptic - -item.BloodMagic.cuttingFluid.basicCuttingFluid.name=Basic Cutting Fluid -item.BloodMagic.cuttingFluid.explosive.name=Explosive Powder - -item.BloodMagic.baseComponent.mundaneLength.name=Simple Lengthening Catalyst -item.BloodMagic.baseComponent.mundanePower.name=Simple Power Catalyst - - -item.BloodMagic.demonCrystal.crystalDefault.name=Demon Will Crystal -item.BloodMagic.demonCrystal.crystalCorrosive.name=Corrosive Will Crystal -item.BloodMagic.demonCrystal.crystalDestructive.name=Destructive Will Crystal -item.BloodMagic.demonCrystal.crystalVengeful.name=Vengeful Will Crystal -item.BloodMagic.demonCrystal.crystalSteadfast.name=Steadfast Will Crystal - -item.BloodMagic.monsterSoul.base.name=Demonic Will -item.BloodMagic.monsterSoul.corrosive.name=Corrosive Demonic Will -item.BloodMagic.monsterSoul.destructive.name=Destructive Demonic Will -item.BloodMagic.monsterSoul.vengeful.name=Vengeful Demonic Will -item.BloodMagic.monsterSoul.steadfast.name=Steadfast Demonic Will - -item.BloodMagic.sigil.air.name=Air Sigil -item.BloodMagic.sigil.bloodLight.name=Sigil of the Blood Lamp -item.BloodMagic.sigil.compression.name=Sigil of Compression -item.BloodMagic.sigil.divination.name=Divination Sigil -item.BloodMagic.sigil.water.name=Water Sigil -item.BloodMagic.sigil.lava.name=Lava Sigil -item.BloodMagic.sigil.void.name=Void Sigil -item.BloodMagic.sigil.greenGrove.name=Sigil of the Green Grove -item.BloodMagic.sigil.elementalAffinity.name=Sigil of Elemental Affinity -item.BloodMagic.sigil.haste.name=Sigil of Haste -item.BloodMagic.sigil.suppression.name=Sigil of Suppression -item.BloodMagic.sigil.magnetism.name=Sigil of Magnetism -item.BloodMagic.sigil.fastMiner.name=Sigil of the Fast Miner -item.BloodMagic.sigil.seer.name=Seer's Sigil -item.BloodMagic.sigil.phantomBridge.name=Sigil of the Phantom Bridge -item.BloodMagic.sigil.whirlwind.name=Sigil of the Whirlwind -item.BloodMagic.sigil.enderSeverance.name=Sigil of Ender Severance -item.BloodMagic.sigil.holding.name=Sigil of Holding -item.BloodMagic.sigil.holding.display=&r%s: &o&n%s -item.BloodMagic.sigil.teleposition.name=Teleposition Sigil -item.BloodMagic.sigil.transposition.name=Transposition Sigil -item.BloodMagic.sigil.claw.name=Sigil of the Claw -item.BloodMagic.sigil.bounce.name=Sigil of Elasticity -item.BloodMagic.sigil.frost.name=Sigil of Winter's Breath - -item.BloodMagic.livingArmour.helmet.name=Living Helmet -item.BloodMagic.livingArmour.chest.name=Living Chestplate -item.BloodMagic.livingArmour.legs.name=Living Leggings -item.BloodMagic.livingArmour.boots.name=Living Boots -item.BloodMagic.sentientArmour.helmet.name=Sentient Helmet -item.BloodMagic.sentientArmour.chest.name=Sentient Chestplate -item.BloodMagic.sentientArmour.legs.name=Sentient Leggings -item.BloodMagic.sentientArmour.boots.name=Sentient Boots - -item.BloodMagic.altarMaker.name=Altar Maker - -item.BloodMagic.ritualDivinernormal.name=Ritual Diviner -item.BloodMagic.ritualDivinerdusk.name=Ritual Diviner [Dusk] -item.BloodMagic.ritualDivinerdawn.name=Ritual Diviner [Dawn] -item.BloodMagic.ritualReader.name=Ritual Tinkerer - -item.BloodMagic.arcaneAshes.name=Arcane Ashes -item.BloodMagic.upgradeTome.name=Living Armour Upgrade Tome -item.BloodMagic.upgradeTrainer.name=Living Armour Training Bracelet - -item.BloodMagic.sentientSword.name=Sentient Sword -item.BloodMagic.soulGem.petty.name=Petty Tartaric Gem -item.BloodMagic.soulGem.lesser.name=Lesser Tartaric Gem -item.BloodMagic.soulGem.common.name=Common Tartaric Gem -item.BloodMagic.soulGem.greater.name=Greater Tartaric Gem -item.BloodMagic.soulGem.grand.name=Grand Tartaric Gem -item.BloodMagic.soulSnare.base.name=Rudimentary Snare -item.BloodMagic.sentientBow.name=Sentient Bow -item.BloodMagic.sentientArmourGem.name=Sentient Armour Gem -item.BloodMagic.sentientAxe.name=Sentient Axe -item.BloodMagic.sentientPickaxe.name=Sentient Pickaxe -item.BloodMagic.sentientShovel.name=Sentient Shovel - -item.BloodMagic.nodeRouter.name=Node Router -item.BloodMagic.itemFilter.exact.name=Precise Item Filter -item.BloodMagic.itemFilter.ignoreNBT.name=NBT Item Filter -item.BloodMagic.itemFilter.modItems.name=Mod Item Filter -item.BloodMagic.itemFilter.oreDict.name=Ore Dictionary Item Filter - -item.BloodMagic.experienceTome.name=Tome of Peritia -item.BloodMagic.sanguineBook.name=Inspectoris Scandalum - -item.BloodMagic.livingPointUpgrade.draftAngelus.name=Draft of Angelus - -item.BloodMagic.willGauge.name=Demon Will Aura Gauge -item.BloodMagic.potionFlask.name=Potion Flask - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=Life Essence - -tile.BloodMagic.stone.ritual.master.name=Master Ritual Stone -tile.BloodMagic.stone.ritual.imperfect.name=Imperfect Ritual Stone - -tile.BloodMagic.altar.name=Blood Altar -tile.BloodMagic.alchemyArray.name=&r&fAlchemy Array - -tile.BloodMagic.rune.blank.name=Blank Rune -tile.BloodMagic.rune.speed.name=Speed Rune -tile.BloodMagic.rune.efficiency.name=Efficiency Rune -tile.BloodMagic.rune.sacrifice.name=Rune of Sacrifice -tile.BloodMagic.rune.selfsacrifice.name=Rune of Self Sacrifice -tile.BloodMagic.rune.displacement.name=Displacement Rune -tile.BloodMagic.rune.capacity.name=Rune of Capacity -tile.BloodMagic.rune.augcapacity.name=Rune of Augmented Capacity -tile.BloodMagic.rune.orb.name=Rune of the Orb -tile.BloodMagic.rune.acceleration.name=Acceleration Rune -tile.BloodMagic.rune.charging.name=Charging Rune - - -tile.BloodMagic.ritualStone.blank.name=Ritual Stone -tile.BloodMagic.ritualStone.water.name=Ritual Stone of Water -tile.BloodMagic.ritualStone.fire.name=Ritual Stone of Fire -tile.BloodMagic.ritualStone.earth.name=Ritual Stone of Earth -tile.BloodMagic.ritualStone.air.name=Ritual Stone of Air -tile.BloodMagic.ritualStone.dusk.name=Ritual Stone of Dusk -tile.BloodMagic.ritualStone.dawn.name=Ritual Stone of Dawn - -tile.BloodMagic.bloodstonebrick.large.name=Large Bloodstone Brick -tile.BloodMagic.bloodstonebrick.brick.name=Bloodstone Brick -tile.BloodMagic.crystal.large.name=Crystal Cluster -tile.BloodMagic.crystal.brick.name=Crystal Cluster Brick -tile.BloodMagic.bloodLight.name=Blood Light -tile.BloodMagic.spectralBlock.name=Spectral Block -tile.BloodMagic.phantom.name=Phantom Block -tile.BloodMagic.incenseAltar.name=Incense Altar - -tile.BloodMagic.teleposer.name=Teleposer -tile.BloodMagic.soulForge.name=Hellfire Forge -tile.BloodMagic.alchemyTable.name=Alchemy Table -tile.BloodMagic.demonCrucible.name=Demon Crucible -tile.BloodMagic.demonPylon.name=Demon Pylon -tile.BloodMagic.demonCrystallizer.name=Demon Crystallizer - -tile.BloodMagic.masterRouting.name=Master Routing Node -tile.BloodMagic.outputRouting.name=Output Routing Node -tile.BloodMagic.inputRouting.name=Input Routing Node -tile.BloodMagic.itemRouting.name=Routing Node - -tile.BloodMagic.path.wood.name=Wooden Path -tile.BloodMagic.path.woodtile.name=Tiled Wooden Path -tile.BloodMagic.path.stone.name=Stone Brick Path -tile.BloodMagic.path.stonetile.name=Tiled Stone Path -tile.BloodMagic.path.wornstone.name=Worn Stone Brick Path -tile.BloodMagic.path.wornstonetile.name=Tiled Worn Stone Path -tile.BloodMagic.path.obsidian.name=Obsidian Brick Path -tile.BloodMagic.path.obsidiantile.name=Tiled Obsidian Path - -tile.BloodMagic.dimensionalPortal.name=Dimensional Portal -tile.BloodMagic.bloodTank.name=Blood Tank - -tile.BloodMagic.demonCrystal.default.name=Demon Will Crystal Cluster -tile.BloodMagic.demonCrystal.corrosive.name=Corrosive Will Crystal Cluster -tile.BloodMagic.demonCrystal.destructive.name=Destructive Will Crystal Cluster -tile.BloodMagic.demonCrystal.vengeful.name=Vengeful Will Crystal Cluster -tile.BloodMagic.demonCrystal.steadfast.name=Steadfast Will Crystal Cluster - -tile.BloodMagic.mimic.nohitbox.name=Ethereal Opaque Mimic Block -tile.BloodMagic.mimic.solidopaque.name=Opaque Mimic Block -tile.BloodMagic.mimic.solidclear.name=Clear Mimic Block -tile.BloodMagic.mimic.solidlight.name=Lighted Mimic Block -tile.BloodMagic.mimic.sentient.name=Sentient Mimic Block - -tile.BloodMagic.bricks1.brick1_raw.name=Raw Stone Bricks -tile.BloodMagic.bricks1.brick1_corrosive.name=Corrosive Stone Bricks -tile.BloodMagic.bricks1.brick1_destructive.name=Destructive Stone Bricks -tile.BloodMagic.bricks1.brick1_vengeful.name=Vengeful Stone Bricks -tile.BloodMagic.bricks1.brick1_steadfast.name=Steadfast Stone Bricks - -tile.BloodMagic.bricks2.smallbrick_raw.name=Small Raw Stone Bricks -tile.BloodMagic.bricks2.smallbrick_corrosive.name=Small Corrosive Stone Bricks -tile.BloodMagic.bricks2.smallbrick_destructive.name=Small Destructive Stone Bricks -tile.BloodMagic.bricks2.smallbrick_vengeful.name=Small Vengeful Stone Bricks -tile.BloodMagic.bricks2.smallbrick_steadfast.name=Small Steadfast Stone Bricks -tile.BloodMagic.bricks2.tile_raw.name=Raw Stone Tiles -tile.BloodMagic.bricks2.tile_corrosive.name=Corrosive Stone Tiles -tile.BloodMagic.bricks2.tile_destructive.name=Destructive Stone Tiles -tile.BloodMagic.bricks2.tile_vengeful.name=Vengeful Stone Tiles -tile.BloodMagic.bricks2.tile_steadfast.name=Steadfast Stone Tiles -tile.BloodMagic.bricks2.tilespecial_raw.name=Accented Raw Stone Tiles -tile.BloodMagic.bricks2.tilespecial_corrosive.name=Accented Corrosive Stone Tiles -tile.BloodMagic.bricks2.tilespecial_destructive.name=Accented Destructive Stone Tiles -tile.BloodMagic.bricks2.tilespecial_vengeful.name=Accented Vengeful Stone Tiles -tile.BloodMagic.bricks2.tilespecial_steadfast.name=Accented Steadfast Stone Tiles - -tile.BloodMagic.inversionpillar.raw.name=Raw Inversion Pillar -tile.BloodMagic.inversionpillar.corrosive.name=Corrosive Inversion Pillar -tile.BloodMagic.inversionpillar.destructive.name=Destructive Inversion Pillar -tile.BloodMagic.inversionpillar.vengeful.name=Vengeful Inversion Pillar -tile.BloodMagic.inversionpillar.steadfast.name=Steadfast Inversion Pillar - -tile.BloodMagic.inversionpillarend.raw_bottom.name=Raw Inversion Pillar Base -tile.BloodMagic.inversionpillarend.corrosive_bottom.name=Corrosive Inversion Pillar Base -tile.BloodMagic.inversionpillarend.destructive_bottom.name=Destructive Inversion Pillar Base -tile.BloodMagic.inversionpillarend.vengeful_bottom.name=Vengeful Inversion Pillar Base -tile.BloodMagic.inversionpillarend.steadfast_bottom.name=Steadfast Inversion Pillar Base -tile.BloodMagic.inversionpillarend.raw_top.name=Raw Inversion Pillar Cap -tile.BloodMagic.inversionpillarend.corrosive_top.name=Corrosive Inversion Pillar Cap -tile.BloodMagic.inversionpillarend.destructive_top.name=Destructive Inversion Pillar Cap -tile.BloodMagic.inversionpillarend.vengeful_top.name=Vengeful Inversion Pillar Cap -tile.BloodMagic.inversionpillarend.steadfast_top.name=Steadfast Inversion Pillar Cap - -tile.BloodMagic.demonlight.raw.name=Raw Demon Eye -tile.BloodMagic.demonlight.corrosive.name=Corrosive Demon Eye -tile.BloodMagic.demonlight.destructive.name=Destructive Demon Eye -tile.BloodMagic.demonlight.vengeful.name=Vengeful Demon Eye -tile.BloodMagic.demonlight.steadfast.name=Steadfast Demon Eye - -tile.BloodMagic.extras.stone_raw.name=Raw Stone -tile.BloodMagic.extras.stone_corrosive.name=Corrosive Stone -tile.BloodMagic.extras.stone_destructive.name=Destructive Stone -tile.BloodMagic.extras.stone_vengeful.name=Vengeful Stone -tile.BloodMagic.extras.stone_steadfast.name=Steadfast Stone - -tile.BloodMagic.extras.polished_raw.name=Polished Raw Stone -tile.BloodMagic.extras.polished_corrosive.name=Polished Corrosive Stone -tile.BloodMagic.extras.polished_destructive.name=Polished Destructive Stone -tile.BloodMagic.extras.polished_vengeful.name=Polished Vengeful Stone -tile.BloodMagic.extras.polished_steadfast.name=Polished Steadfast Stone - -tile.BloodMagic.extras.metal_raw.name=Raw Demon Alloy -tile.BloodMagic.extras.metal_corrosive.name=Corrosive Demon Alloy -tile.BloodMagic.extras.metal_destructive.name=Destructive Demon Alloy -tile.BloodMagic.extras.metal_vengeful.name=Vengeful Demon Alloy -tile.BloodMagic.extras.metal_steadfast.name=Steadfast Demon Alloy - -tile.BloodMagic.pillar1.raw.name=Raw Stone Pillar -tile.BloodMagic.pillar1.corrosive.name=Corrosive Stone Pillar -tile.BloodMagic.pillar1.destructive.name=Destructive Stone Pillar -tile.BloodMagic.pillar1.vengeful.name=Vengeful Stone Pillar -tile.BloodMagic.pillar1.steadfast.name=Steadfast Stone Pillar - -tile.BloodMagic.pillar2.raw.name=Accented Raw Stone Pillar -tile.BloodMagic.pillar2.corrosive.name=Accented Corrosive Stone Pillar -tile.BloodMagic.pillar2.destructive.name=Accented Destructive Stone Pillar -tile.BloodMagic.pillar2.vengeful.name=Accented Vengeful Stone Pillar -tile.BloodMagic.pillar2.steadfast.name=Accented Steadfast Stone Pillar - -tile.BloodMagic.pillarCap1.raw.name=Raw Stone Pillar Cap -tile.BloodMagic.pillarCap1.corrosive.name=Corrosive Stone Pillar Cap -tile.BloodMagic.pillarCap2.destructive.name=Destructive Stone Pillar Cap -tile.BloodMagic.pillarCap2.vengeful.name=Vengeful Stone Pillar Cap -tile.BloodMagic.pillarCap3.steadfast.name=Steadfast Stone Pillar Cap - -tile.BloodMagic.wall1.brick_raw.name=Raw Stone Brick Wall -tile.BloodMagic.wall1.brick_corrosive.name=Corrosive Stone Brick Wall -tile.BloodMagic.wall1.brick_destructive.name=Destructive Stone Brick Wall -tile.BloodMagic.wall1.brick_vengeful.name=Vengeful Stone Brick Wall -tile.BloodMagic.wall1.brick_steadfast.name=Steadfast Stone Brick Wall -tile.BloodMagic.wall1.smallbrick_raw.name=Raw Small Stone Brick Wall -tile.BloodMagic.wall1.smallbrick_corrosive.name=Corrosive Small Stone Brick Wall -tile.BloodMagic.wall1.smallbrick_destructive.name=Destructive Small Stone Brick Wall -tile.BloodMagic.wall1.smallbrick_vengeful.name=Vengeful Small Stone Brick Wall -tile.BloodMagic.wall1.smallbrick_steadfast.name=Steadfast Small Stone Brick Wall -tile.BloodMagic.wall1.large_raw.name=Raw Stone Wall -tile.BloodMagic.wall1.large_corrosive.name=Corrosive Stone Wall -tile.BloodMagic.wall1.large_destructive.name=Destructive Stone Wall -tile.BloodMagic.wall1.large_vengeful.name=Vengeful Stone Wall -tile.BloodMagic.wall1.large_steadfast.name=Steadfast Stone Wall - -tile.BloodMagic.stairs1.raw.name=Raw Stone Stairs -tile.BloodMagic.stairs1.corrosive.name=Corrosive Stone Stairs -tile.BloodMagic.stairs2.destructive.name=Destructive Stone Stairs -tile.BloodMagic.stairs2.vengeful.name=Vengeful Stone Stairs -tile.BloodMagic.stairs3.steadfast.name=Steadfast Stone Stairs - -# Fluids -fluid.lifeEssence=Life Essence - -# Tooltips -tooltip.BloodMagic.extraInfo=&9-Hold shift for more info- - -tooltip.BloodMagic.orb.desc=Stores raw Life Essence -tooltip.BloodMagic.orb.owner=Added by: %s -tooltip.BloodMagic.currentOwner=Current owner: %s -tooltip.BloodMagic.currentTier=Current tier: %d -tooltip.BloodMagic.config.disabled=Currently disabled in the Config -tooltip.BloodMagic.tier=Tier %d - -tooltip.BloodMagic.activated=Activated -tooltip.BloodMagic.deactivated=Deactivated - -tooltip.BloodMagic.sigil.air.desc=&oI feel lighter already... -tooltip.BloodMagic.sigil.bloodLight.desc=&oI see a light! -tooltip.BloodMagic.sigil.compression.desc=&oHands of diamonds -tooltip.BloodMagic.sigil.divination.desc=&oPeer into the soul -tooltip.BloodMagic.sigil.divination.otherNetwork=Peering into the soul of %s -tooltip.BloodMagic.sigil.divination.currentAltarTier=Current Tier: %d -tooltip.BloodMagic.sigil.divination.currentEssence=Current Essence: %d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=Current Capacity: %d LP -tooltip.BloodMagic.sigil.divination.currentTranquility=Current Tranquility: %d -tooltip.BloodMagic.sigil.divination.currentInversion=Current Inversion: %d -tooltip.BloodMagic.sigil.divination.currentBonus=Current Bonus: +%d%% -tooltip.BloodMagic.sigil.water.desc=&oInfinite water, anyone? -tooltip.BloodMagic.sigil.lava.desc=&oHOT! DO NOT EAT -tooltip.BloodMagic.sigil.void.desc=&oBetter than a Swiffer®! -tooltip.BloodMagic.sigil.greenGrove.desc=&oEnvironmentally friendly -tooltip.BloodMagic.sigil.magnetism.desc=&oI have a very magnetic personality -tooltip.BloodMagic.sigil.suppression.desc=&oBetter than telekinesis... -tooltip.BloodMagic.sigil.haste.desc=&o42 doses of caffeine later... -tooltip.BloodMagic.sigil.fastMiner.desc=&oKeep mining, and mining... -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oFalling fire fishes! -tooltip.BloodMagic.sigil.seer.desc=&oWhen seeing all is not enough -tooltip.BloodMagic.sigil.seer.currentAltarProgress=Current Progress: %d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=Current Progress: %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=Consumption Rate: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=Current Tier: %d -tooltip.BloodMagic.sigil.seer.currentEssence=Current Essence: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=Current Capacity: %d LP -tooltip.BloodMagic.sigil.seer.currentCharge=Current Charge: %d -tooltip.BloodMagic.sigil.seer.currentTranquility=Current Tranquility: %d -tooltip.BloodMagic.sigil.seer.currentBonus=Current Bonus: +%d%% -tooltip.BloodMagic.sigil.phantomBridge.desc=&oWalking on thin air... -tooltip.BloodMagic.sigil.whirlwind.desc=&oBest not to wear a skirt -tooltip.BloodMagic.sigil.enderSeverance.desc=&oPutting Endermen in Dire situations! -tooltip.BloodMagic.sigil.teleposition.desc=I am very close to being moved by this. -tooltip.BloodMagic.sigil.transposition.desc=Feel the power of the Force, my young apprentice. -tooltip.BloodMagic.sigil.holding.press=Press &o%s&r&7 to modify -tooltip.BloodMagic.sigil.holding.desc=Sigil-ception -tooltip.BloodMagic.sigil.holding.sigilInSlot=Slot %d: %s - -tooltip.BloodMagic.livingArmourPointsUpgrade.desc=Increases the max points of Living Armour to %d. - -tooltip.BloodMagic.bound.sword.desc=&oCulling the weak -tooltip.BloodMagic.bound.pickaxe.desc=&oDestroying stone without mercy -tooltip.BloodMagic.bound.axe.desc=&oDemonic deforestation -tooltip.BloodMagic.bound.shovel.desc=&oScrubs floors clean of dirt - -tooltip.BloodMagic.sacrificialDagger.desc=Just a prick of the finger will suffice... -tooltip.BloodMagic.sacrificialDagger.creative=Right click an altar while sneaking to fill it -tooltip.BloodMagic.slate.desc=Infused stone inside of a Blood Altar -tooltip.BloodMagic.inscriber.desc=The writing is on the wall... - -tooltip.BloodMagic.pack.selfSacrifice.desc=This pack really chafes... -tooltip.BloodMagic.pack.sacrifice.desc=Description -tooltip.BloodMagic.pack.stored=Stored: %d LP - -tooltip.BloodMagic.activationCrystal.weak=Activates low-level rituals -tooltip.BloodMagic.activationCrystal.awakened=Activates more powerful rituals -tooltip.BloodMagic.activationCrystal.creative=Creative Only - Activates any ritual - -tooltip.BloodMagic.diviner.currentRitual=Current Ritual: -tooltip.BloodMagic.diviner.blankRune=Blank Runes: %d -tooltip.BloodMagic.diviner.waterRune=Water Runes: %d -tooltip.BloodMagic.diviner.airRune=Air Runes: %d -tooltip.BloodMagic.diviner.fireRune=Fire Runes: %d -tooltip.BloodMagic.diviner.earthRune=Earth Runes: %d -tooltip.BloodMagic.diviner.duskRune=Dusk Runes: %d -tooltip.BloodMagic.diviner.dawnRune=Dawn Runes: %d -tooltip.BloodMagic.diviner.totalRune=Total Runes: %d -tooltip.BloodMagic.diviner.extraInfo=&9-Hold shift for rune info- -tooltip.BloodMagic.diviner.extraExtraInfo=&9-Hold shift + M for augmentation info- -tooltip.BloodMagic.diviner.currentDirection=Current Direction: %s - -tooltip.BloodMagic.ritualReader.currentState=Current mode: %s -tooltip.BloodMagic.ritualReader.set_area=Define Area -tooltip.BloodMagic.ritualReader.information=Information -tooltip.BloodMagic.ritualReader.set_will_types=Set Will Consumed -tooltip.BloodMagic.ritualReader.desc.set_area=Right click on an active Master Ritual stone to cycle what area of the ritual you want to modify. Then click on the two corners of the new range you want to set the range. -tooltip.BloodMagic.ritualReader.desc.information=Right click on an active Master Ritual Stone to gather basic information about the ritual. -tooltip.BloodMagic.ritualReader.desc.set_will_types=Set the types of demon will that the ritual will consume from the aura by right clicking on the MRS with the same types of crystals on your hotbar. - -tooltip.BloodMagic.arcaneAshes=Ashes used to draw an alchemy circle - -tooltip.BloodMagic.telepositionFocus.coords=Current coordinates: (%d, %d, %d) -tooltip.BloodMagic.telepositionFocus.dimension=Dimension ID: %d -tooltip.BloodMagic.telepositionFocus.weak=Used to move blocks in the world -tooltip.BloodMagic.telepositionFocus.enhanced=Used to move blocks in the world -tooltip.BloodMagic.telepositionFocus.reinforced=Used to move blocks in the world -tooltip.BloodMagic.telepositionFocus.demonic=Used to move blocks in the world - -tooltip.BloodMagic.livingArmour.upgrade.speed=Quick Feet -tooltip.BloodMagic.livingArmour.upgrade.digging=Dwarven Might -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Poison Resistance -tooltip.BloodMagic.livingArmour.upgrade.fireResist=Gift of Ignis -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Tough Palms -tooltip.BloodMagic.livingArmour.upgrade.knockback=Body Builder -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=Tough Skin -tooltip.BloodMagic.livingArmour.upgrade.health=Healthy -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=Fierce Strike -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=Trick Shot -tooltip.BloodMagic.livingArmour.upgrade.stepAssist=Step Assist -tooltip.BloodMagic.livingArmour.upgrade.grimReaper=Grim Reaper's Sprint -tooltip.BloodMagic.livingArmour.upgrade.solarPowered=Solar Powered -tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=Runic Shielding -tooltip.BloodMagic.livingArmour.upgrade.revealing=Revealing -tooltip.BloodMagic.livingArmour.upgrade.experienced=Experienced -tooltip.BloodMagic.livingArmour.upgrade.jump=Strong Legs -tooltip.BloodMagic.livingArmour.upgrade.fallProtect=Soft Fall -tooltip.BloodMagic.livingArmour.upgrade.graveDigger=Grave Digger -tooltip.BloodMagic.livingArmour.upgrade.sprintAttack=Charging Strike -tooltip.BloodMagic.livingArmour.upgrade.criticalStrike=True Strike -tooltip.BloodMagic.livingArmour.upgrade.elytra=Elytra -tooltip.BloodMagic.livingArmour.upgrade.nightSight=Nocturnal Prowess -tooltip.BloodMagic.livingArmour.upgrade.repair=Repairing - - -tooltip.BloodMagic.livingArmour.upgrade.slowness=Limp Leg -tooltip.BloodMagic.livingArmour.upgrade.crippledArm=Crippled Arm -tooltip.BloodMagic.livingArmour.upgrade.slippery=Loose Traction -tooltip.BloodMagic.livingArmour.upgrade.battleHunger=Battle Hungry -tooltip.BloodMagic.livingArmour.upgrade.quenched=Quenched -tooltip.BloodMagic.livingArmour.upgrade.meleeDecrease=Dulled Blade -tooltip.BloodMagic.livingArmour.upgrade.digSlowdown=Weakened Pick -tooltip.BloodMagic.livingArmour.upgrade.stormTrooper=Storm Trooper -tooltip.BloodMagic.livingArmour.upgrade.slowHeal=Diseased -tooltip.BloodMagic.livingArmour.upgrade.level=%s (Level %d) -tooltip.BloodMagic.livingArmour.upgrade.progress=%s (%d/100) -tooltip.BloodMagic.livingArmour.upgrade.points=&6Upgrade points: %s / %s - -tooltip.BloodMagic.livingArmour.extraExtraInfo=&9-Hold shift + M for progress info- - -tooltip.BloodMagic.will=Will Quality: %1$,.2f -tooltip.BloodMagic.sentientSword.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.sentientAxe.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.sentientPickaxe.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.sentientShovel.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.soulGem.petty=A gem used to contain a little will -tooltip.BloodMagic.soulGem.lesser=A gem used to contain some will -tooltip.BloodMagic.soulGem.common=A gem used to contain more will -tooltip.BloodMagic.soulGem.greater=A gem used to contain a greater amount of will -tooltip.BloodMagic.soulGem.grand=A gem used to contain a large amount of will -tooltip.BloodMagic.soulSnare.desc=Throw at a monster and then kill them to obtain their demonic will - -tooltip.BloodMagic.itemFilter.exact=Will make sure the items match precisely -tooltip.BloodMagic.itemFilter.ignoreNBT=Ignores the NBT of the filter -tooltip.BloodMagic.itemFilter.modItems=Matches all items from the same mod -tooltip.BloodMagic.itemFilter.oreDict=Used to filter through the Ore Dictionary - -tooltip.BloodMagic.fluid.type=Fluid Contained -tooltip.BloodMagic.fluid.amount=Amount -tooltip.BloodMagic.fluid.capacity=Capacity - -tooltip.BloodMagic.ghost.everything=Everything -tooltip.BloodMagic.ghost.amount=Ghost item amount: %d - -tooltip.BloodMagic.currentType.default=Contains: Raw Will -tooltip.BloodMagic.currentType.corrosive=Contains: Corrosive Will -tooltip.BloodMagic.currentType.destructive=Contains: Destructive Will -tooltip.BloodMagic.currentType.vengeful=Contains: Vengeful Will -tooltip.BloodMagic.currentType.steadfast=Contains: Steadfast Will - -tooltip.BloodMagic.currentBaseType.default=Raw -tooltip.BloodMagic.currentBaseType.corrosive=Corrosive -tooltip.BloodMagic.currentBaseType.destructive=Destructive -tooltip.BloodMagic.currentBaseType.vengeful=Vengeful -tooltip.BloodMagic.currentBaseType.steadfast=Steadfast - -tooltip.BloodMagic.experienceTome=A book used to store experience -tooltip.BloodMagic.experienceTome.exp=Exp: %0.3f -tooltip.BloodMagic.experienceTome.expLevel=Level: %d - -tooltip.BloodMagic.decoration.safe=Safe for decoration -tooltip.BloodMagic.decoration.notSafe=Dangerous for decoration - -tooltip.BloodMagic.cuttingFluidRatio=%d/%d uses remaining - -tooltip.BloodMagic.potion.uses=%d uses remaining - -tooltip.BloodMagic.book.shifting=These symbols seem to be... &oshifting... - -tooltip.BloodMagic.willGauge=A strange device that can measure the Demon Will in the Aura. - -# Ritual -ritual.BloodMagic.blockRange.tooBig=The block range given is too big! Needs to be at most %s blocks. -ritual.BloodMagic.blockRange.tooFar=The block range given is too far! Needs to be within a vertical range of %s blocks and a horizontal range of %s blocks. -ritual.BloodMagic.blockRange.inactive=The ritual stone is currently inactive, and cannot have its range modified. -ritual.BloodMagic.blockRange.noRange=The range was not properly chosen. -ritual.BloodMagic.blockRange.firstBlock=First block for new range stored. -ritual.BloodMagic.blockRange.success=New range successfully set! -ritual.BloodMagic.willConfig.set=The ritual will use these Demon Will types: %s -ritual.BloodMagic.willConfig.void=The ritual no longer uses Demon Will - -ritual.BloodMagic.testRitual=Test Ritual -ritual.BloodMagic.waterRitual=Ritual of the Full Spring -ritual.BloodMagic.lavaRitual=Serenade of the Nether -ritual.BloodMagic.greenGroveRitual=Ritual of the Green Grove -ritual.BloodMagic.jumpRitual=Ritual of the High Jump -ritual.BloodMagic.wellOfSufferingRitual=Well of Suffering -ritual.BloodMagic.featheredKnifeRitual=Ritual of the Feathered Knife -ritual.BloodMagic.regenerationRitual=Ritual of Regeneration -ritual.BloodMagic.harvestRitual=Reap of the Harvest Moon -ritual.BloodMagic.magneticRitual=Ritual of Magnetism -ritual.BloodMagic.crushingRitual=Ritual of the Crusher -ritual.BloodMagic.fullStomachRitual=Ritual of the Satiated Stomach -ritual.BloodMagic.interdictionRitual=Ritual of Interdiction -ritual.BloodMagic.containmentRitual=Ritual of Containment -ritual.BloodMagic.speedRitual=Ritual of Speed -ritual.BloodMagic.suppressionRitual=Ritual of Suppression -ritual.BloodMagic.expulsionRitual=Aura of Expulsion -ritual.BloodMagic.zephyrRitual=Call of the Zephyr -ritual.BloodMagic.upgradeRemoveRitual=Sound of the Cleansing Soul -ritual.BloodMagic.armourEvolveRitual=Ritual of Living Evolution -ritual.BloodMagic.animalGrowthRitual=Ritual of the Shepherd -ritual.BloodMagic.forsakenSoulRitual=Gathering of the Forsaken Souls -ritual.BloodMagic.crystalHarvestRitual=Crack of the Fractured Crystal -ritual.BloodMagic.meteorRitual=Mark of the Falling Tower - -ritual.BloodMagic.cobblestoneRitual=Le Vulcanos Frigius -ritual.BloodMagic.placerRitual=Laying of the Filler -ritual.BloodMagic.fellingRitual=Crash of the Timberman -ritual.BloodMagic.pumpRitual=Hymn of Siphoning -ritual.BloodMagic.altarBuilderRitual=The Assembly of the High Altar -ritual.BloodMagic.portalRitual=The Gate of the Fold -ritual.BloodMagic.downgradeRitual=Penance of the Leadened Soul - -ritual.BloodMagic.waterRitual.info=Generates a source of water from the master ritual stone. -ritual.BloodMagic.lavaRitual.info=Generates a source of lava from the master ritual stone. -ritual.BloodMagic.lavaRitual.default.info=(Raw) Decreases the LP cost of placing lava and allows lava to be placed insided of a linked container. -ritual.BloodMagic.lavaRitual.corrosive.info=(Corrosive) Entities within range that are immune to fire are damaged severely. -ritual.BloodMagic.lavaRitual.destructive.info=(Destructive) Lava placement range is increased based on total Will. -ritual.BloodMagic.lavaRitual.vengeful.info=(Vengeful) Entities within range have Fire Fuse applied to them. -ritual.BloodMagic.lavaRitual.steadfast.info=(Steadfast) Players within a designated range have Fire Resistance applied to them. - -ritual.BloodMagic.greenGroveRitual.info=Grows crops within its area. -ritual.BloodMagic.jumpRitual.info=Causes entities to leap up into the air. -ritual.BloodMagic.wellOfSufferingRitual.info=Attacks mobs within its damage zone and puts the LP into a nearby blood altar. -ritual.BloodMagic.featheredKnifeRitual.info=Drains health from players in its area and puts the LP into a nearby blood altar. -ritual.BloodMagic.regenerationRitual.info=Casts regeneration on entities within its range if they are missing health. -ritual.BloodMagic.regenerationRitual.default.info=(Raw) -ritual.BloodMagic.regenerationRitual.corrosive.info=(Corrosive) Steals health from non-players inside of its Vampirism range and directly heals players. -ritual.BloodMagic.regenerationRitual.destructive.info=(Destructive) -ritual.BloodMagic.regenerationRitual.vengeful.info=(Vengeful) -ritual.BloodMagic.regenerationRitual.steadfast.info=(Steadfast) -ritual.BloodMagic.harvestRitual.info=Harvests plants within its range, dropping the results on the ground. -ritual.BloodMagic.magneticRitual.info=Pulls up ores from the ground and puts them into its placement range. -ritual.BloodMagic.crushingRitual.info=Breaks blocks within its crushing range and places the items into the linked chest. -ritual.BloodMagic.crushingRitual.destructive.info=(Destructive) Blocks are broken down forcefully: all blocks broken are affected by Fortune III. -ritual.BloodMagic.crushingRitual.steadfast.info=(Steadfast) Causes all blocks that are broken to be picked up with silk touch. Overrides Fortune where applicable. -ritual.BloodMagic.crushingRitual.corrosive.info=(Corrosive) All blocks are broken to be processed with a form of cutting fluid. Overrides Silk Touch where applicable. -ritual.BloodMagic.crushingRitual.vengeful.info=(Vengeful) Compresses the inventory on successful opperation. Currently only does one compression per operation. -ritual.BloodMagic.crushingRitual.default.info=(Raw) Increases the speed of the ritual based on total Will. -ritual.BloodMagic.greenGroveRitual.corrosive.info=(Corrosive) Entities within range are attacked by nearby plants, leeching away their life. -ritual.BloodMagic.greenGroveRitual.default.info=(Raw) Increases the speed of all of the ritual operations depending on the total Will in the Aura. -ritual.BloodMagic.greenGroveRitual.vengeful.info=(Vengeful) Increases the rate that a growth tick is successful. -ritual.BloodMagic.greenGroveRitual.steadfast.info=(Steadfast) Seeds are replanted and blocks are hydrated within the Hydration range. -ritual.BloodMagic.greenGroveRitual.destructive.info=(Destructive) Growing range is increased based on total Will. -ritual.BloodMagic.featheredKnifeRitual.default.info=(Raw) Increases the speed of the ritual based on the total Will in the Aura. -ritual.BloodMagic.featheredKnifeRitual.destructive.info=(Destructive) Increases the yield of the ritual based on total Will. -ritual.BloodMagic.featheredKnifeRitual.vengeful.info=(Vengeful) Sets the minimum health for sacrificing to 10%%. Overridden by Steadfast for the Owner if active. -ritual.BloodMagic.featheredKnifeRitual.corrosive.info=(Corrosive) Uses the player's Incense to increase the yield. -ritual.BloodMagic.featheredKnifeRitual.steadfast.info=(Steadfast) Sets the minimum health for sacrificing from 30%% to 70%%. -ritual.BloodMagic.speedRitual.default.info=(Raw) Increases the velocity caused by the ritual based on total Will. -ritual.BloodMagic.speedRitual.vengeful.info=(Vengeful) Prevents adult mobs and players from being transported. Players are transported if paired with Destructive. -ritual.BloodMagic.speedRitual.destructive.info=(Destructive) Prevents child mobs and players from being transported. Players are transported if paired with Vengeful. -ritual.BloodMagic.animalGrowthRitual.vengeful.info=(Vengeful) Decreases the time it takes for adults to breed again. -ritual.BloodMagic.animalGrowthRitual.steadfast.info=(Steadfast) Automatically breeds adults within its area using items in the connected chest. -ritual.BloodMagic.animalGrowthRitual.default.info=(Raw) Increases the speed of the ritual based on the total Will in the Aura. -ritual.BloodMagic.animalGrowthRitual.destructive.info=(Destructive) Causes adults that have not bred lately to run at mobs and explode. -ritual.BloodMagic.animalGrowthRitual.corrosive.info=(Corrosive) Unimplemented. - -ritual.BloodMagic.fullStomachRitual.info=Takes food from the linked chest and fills the player's saturation with it. -ritual.BloodMagic.interdictionRitual.info=Pushes all mobs within its area away from the master ritual stone. -ritual.BloodMagic.containmentRitual.info=Pulls all mobs within its area towards the master ritual stone. -ritual.BloodMagic.speedRitual.info=Launches players within its range in the direction of the ritual. -ritual.BloodMagic.suppressionRitual.info=Suppresses fluids within its range - deactivating the ritual returns the fluids back to the world. -ritual.BloodMagic.expulsionRitual.info=Expels players from its range that are neither the owner nor have a bound blood orb in the chest on top of the master ritual stone. -ritual.BloodMagic.zephyrRitual.info=Picks up items within its range and places them into the linked chest. -ritual.BloodMagic.upgradeRemoveRitual.info=Undocumented. -ritual.BloodMagic.armourEvolveRitual.info=Undocumented. -ritual.BloodMagic.animalGrowthRitual.info=Increases the maturity rate of baby animals within its range. -ritual.BloodMagic.forsakenSoulRitual.info=Damages mobs within its damage range and when the mob dies a demon crystal within its crystal range will be grown. -ritual.BloodMagic.crystalHarvestRitual.info=Breaks Demon Will crystal clusters within its range, dropping the results on top of the crystals. -ritual.BloodMagic.placerRitual.info=Grabs blocks that are inside of the connected inventory and places them into the world. -ritual.BloodMagic.fellingRitual.info=A standard tree-cutting machine, this ritual will cut down all trees and leaves within its area and collect the drops. -ritual.BloodMagic.pumpRitual.info=Looks around the world and grabs fluids from the defined area. Will only remove and put the fluid into the connected tank if the tank has at least a bucket's worth of the same fluid. -ritual.BloodMagic.altarBuilderRitual.info=Builds an altar out of the components inside of the connected inventory. -ritual.BloodMagic.portalRitual.info=Creates a portal network based on the activator and the immediately surrounding blocks. Blocks can be changed after activation without changing the network of portals, and portals with the same "key" will link together. -ritual.BloodMagic.meteorRitual.info=Consumes an item inside of its item range to summon a meteor full of resources from the sky, aimed directly at the ritual. - -ritual.BloodMagic.waterRitual.waterRange.info=(Water) The area that the ritual will place water source blocks. -ritual.BloodMagic.lavaRitual.lavaRange.info=(Lava) The area that the ritual will place lava source blocks. -ritual.BloodMagic.lavaRitual.lavaTank.info=(Raw) The tank that the ritual will place lava into. -ritual.BloodMagic.lavaRitual.fireFuse.info=(Vengeful) Entities in this range are afflicted by Fire Fuse. -ritual.BloodMagic.lavaRitual.fireResist.info=(Steadfast) Players in this range have Fire Resist applied. -ritual.BloodMagic.lavaRitual.fireDamage.info=(Corrosive) Entities within this range that are immune to fire damage are hurt proportional to the Will. -ritual.BloodMagic.greenGroveRitual.growing.info=(Growth) The area that the ritual will grow plants in. -ritual.BloodMagic.greenGroveRitual.leech.info=(Corrosive) Entities in this area have their life drained to grow nearby crops. -ritual.BloodMagic.greenGroveRitual.hydrate.info=(Steadfast) Blocks within this range are rehydrated into farmland, and seeds within the area are planted nearby. -ritual.BloodMagic.jumpRitual.jumpRange.info=(Jumping) Entities in this range will be launched in the air. -ritual.BloodMagic.wellOfSufferingRitual.altar.info=(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region. -ritual.BloodMagic.wellOfSufferingRitual.damage.info=(Damage) This defines where the ritual will damage a mob. All mobs inside of this range (except for players) will receive damage over time. -ritual.BloodMagic.featheredKnifeRitual.altar.info=(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region. -ritual.BloodMagic.featheredKnifeRitual.damage.info=(Damage) This defines where the ritual will damage a player. Players inside of this range will receive damage over time up to the specified limit. -ritual.BloodMagic.regenerationRitual.heal.info=(Healing) Mobs within this range will receive a regeneration buff. -ritual.BloodMagic.regenerationRitual.vampire.info=(Vampirism) Mobs within this range have their health syphoned to heal players in the Healing range. -ritual.BloodMagic.harvestRitual.harvestRange.info=(Harvesting) Plants within this range will be harvested. -ritual.BloodMagic.magneticRitual.placementRange.info=(Placement) The range that the ritual will place the grabbed ores into. -ritual.BloodMagic.crushingRitual.crushingRange.info=(Crushing) The blocks that the ritual will break. -ritual.BloodMagic.crushingRitual.chest.info=(Chest) The location of the inventory that the ritual will place the broken blocks into. -ritual.BloodMagic.fullStomachRitual.fillRange.info=(Feeding) The range that the ritual will look at to feed players. -ritual.BloodMagic.fullStomachRitual.chest.info=(Chest) The location of the inventory that the ritual will grab food from to feed players in range. -ritual.BloodMagic.interdictionRitual.interdictionRange.info=(Push) The area of the ritual where mobs will be pushed. All mobs are pushed away from the master ritual stone, regardless of where this area is. -ritual.BloodMagic.containmentRitual.containmentRange.info=(Containment) The area of the ritual where mobs will be pulled. All mobs are pulled towards the master ritual stone, regardless of where this area is. -ritual.BloodMagic.speedRitual.sanicRange.info=(Speed) All entities within this area are launched in the direction of the arrow formed by the ritual. -ritual.BloodMagic.suppressionRitual.suppressionRange.info=(Suppress) All liquids within the range are suppressed. -ritual.BloodMagic.expulsionRitual.expulsionRange.info=(Expulsion) -ritual.BloodMagic.zephyrRitual.zephyrRange.info=(Suction) Items within this range will be sucked into the linked chest. -ritual.BloodMagic.zephyrRitual.chest.info=(Chest) The location of the inventory that the ritual will place the picked up items into. -ritual.BloodMagic.animalGrowthRitual.growing.info=(Growth) Animals within this range will grow much faster. -ritual.BloodMagic.animalGrowthRitual.chest.info=(Chest) Chest for breeding items if properly augmented. -ritual.BloodMagic.forsakenSoulRitual.crystal.info=(Crystal) Demon Crystals in this range receive an increase in growth speed when a mob is killed by the ritual. -ritual.BloodMagic.forsakenSoulRitual.damage.info=(Damage) Mobs within this range will be slowly damaged, and when killed will grow the crystals. -ritual.BloodMagic.crystalHarvestRitual.crystal.info=(Crystal) All Demon Will crystal clusters have a single crystal broken off, spawning the crystal into the world. If there is only one crystal on the cluster, it will not break it. - -ritual.BloodMagic.placerRitual.placerRange.info=(Placement) The range that the ritual will place its blocks in. -ritual.BloodMagic.placerRitual.chest.info=(Chest) The location of the inventory that the ritual will grab blocks from to place in the world. -ritual.BloodMagic.fellingRitual.fellingRange.info=(Cutting) The range that the ritual will search out logs and leaves in order to cut down. -ritual.BloodMagic.fellingRitual.chest.info=(Chest) The location of the inventory that the ritual will place the results into. -ritual.BloodMagic.pumpRitual.pumpRange.info=(Pump) The region that the ritual will look for fluids to grab from the world. - -ritual.BloodMagic.downgradeRitual.dialogue.bow.1=So, mortal, you want to gain more power...? -ritual.BloodMagic.downgradeRitual.dialogue.bow.100=Of course you must know that everything has a cost... I cannot simply grant you more power without you paying something in return... -ritual.BloodMagic.downgradeRitual.dialogue.bow.300=If you lay an offering before me, you will forsake your perception, preventing you from using long-ranged projectiles with any form of accuracy. Arrows will no longer be your key to victory. -ritual.BloodMagic.downgradeRitual.dialogue.bow.500=But in return, I will unlock your armour so that it may grow even further... All you have to do is kneel before this altar with the correct offering... -ritual.BloodMagic.downgradeRitual.dialogue.quenched.1=Fufufu... Greetings. I see that you wish to become more powerful. -ritual.BloodMagic.downgradeRitual.dialogue.quenched.100=You must be fully aware that when one's cup becomes full, it invariably has to empty once more to be filled again. -ritual.BloodMagic.downgradeRitual.dialogue.quenched.300=As such, I offer you a deal: by forsaking one's ability to drink, I shall grant you a vast increase to your potential. Wether this is a deal you think is worth taking is another matter entirely... -ritual.BloodMagic.downgradeRitual.dialogue.quenched.500=So kneel, mortal, and drink from this cup that I offer to you, for it may be your last drink. -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.1=Hmmm... What is it that you truely desire? -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.100=If it is strength beyond mortal men, then I cannot provide that - instead, I can offer you a different deal... -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.300=I can expand the capabilities of your armour, allowing you to achieve greater heights. However, I will need something from you in return: your strength in physical combat. -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.500=By agreeing to this, you will no longer be able to swing a weapon with as much certainty, only able to do a fraction of the damage you could before. -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.700=So, the choice is yours: will you kneel at this altar, or will you still take up your sword? -ritual.BloodMagic.downgradeRitual.dialogue.slowHeal.1=Beware, mortal, for you are on shaky ground. -ritual.BloodMagic.downgradeRitual.dialogue.slowHeal.100=Unlike my comrades, I offer one of the most grim deals that you could possibly hope for as a magician that deals in your own health. -ritual.BloodMagic.downgradeRitual.dialogue.slowHeal.300=Although your wounds may heal, they will do so slowly if you accept my "offering," and the stings of battle will plague you even more. -ritual.BloodMagic.downgradeRitual.dialogue.slowHeal.500=So think carefully before you rush into something that you may regret, since even though your cup may be empty it will be almost impossible to fill once more... - -# Chat -chat.BloodMagic.altarMaker.setTier=Set Tier to: %d -chat.BloodMagic.altarMaker.building=Building a Tier %d Altar -chat.BloodMagic.altarMaker.destroy=Destroyed a Tier %d Altar -chat.BloodMagic.altarMaker.creativeOnly=This is a creative only item. - -chat.BloodMagic.damageSource=%s's soul became too weak - -chat.BloodMagic.ritual.weak=You feel a push, but are too weak to perform this ritual. -chat.BloodMagic.ritual.prevent=The ritual is actively resisting you! -chat.BloodMagic.ritual.activate=A rush of energy flows through the ritual! -chat.BloodMagic.ritual.notValid=You feel that these runes are not configured correctly... - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=You are starting to feel better already! -chat.BloodMagic.livingArmour.upgrade.fireRemove=&6A cool feeling envelopes you as the burning subsides. -chat.BloodMagic.livingArmour.upgrade.grimReaper=&6A shadowy force pulls you from the brink of death! -chat.BloodMagic.livingArmour.newUpgrade=&4Upgrade acquired! - -chat.BloodMagic.routing.remove=Removing contained location -chat.BloodMagic.routing.set=Setting node location -chat.BloodMagic.routing.link.master=Linked node to master! -chat.BloodMagic.routing.link=Linked nodes together - -chat.BloodMagic.altar.comp.glowstone=a block of glowstone -chat.BloodMagic.altar.comp.bloodstone=a large bloodstone brick -chat.BloodMagic.altar.comp.beacon=a beacon -chat.BloodMagic.altar.comp.bloodrune=a blood rune -chat.BloodMagic.altar.comp.crystal=an unimplemented item -chat.BloodMagic.altar.comp.notair=a solid block - -chat.BloodMagic.altar.nextTier=The next tier of blood altar is missing %s at %s. - -chat.BloodMagic.mimic.potionSet=Potion trap has been set. -chat.BloodMagic.mimic.potionRemove=Potion trap has been disabled. -chat.BloodMagic.mimic.potionInterval.up=Potion Interval has been increased to: %d ticks. -chat.BloodMagic.mimic.potionInterval.down=Potion Interval has been decreased to: %d ticks. -chat.BloodMagic.mimic.detectRadius.up=Player detection radius has been increased to: %d blocks. -chat.BloodMagic.mimic.detectRadius.down=Player detection radius has been decreased to: %d blocks. -chat.BloodMagic.mimic.potionSpawnRadius.up=Potion spawning radius has been increased to: %d blocks. -chat.BloodMagic.mimic.potionSpawnRadius.down=Potion spawning radius has been decreased to: %d blocks. - -# entity -entity.BloodMagic.SentientSpecter.name=Sentient Specter -entity.BloodMagic.Mimic.name=Mimic - -# sekrit - -secret.BloodMagic.bread.bloody=&r&cBloody Bread -secret.BloodMagic.bread.bloody.desc=Only for &odire &r&7emergencies. - -# Commands -commands.error.arg.invalid=Invalid arguments -commands.error.arg.missing=Not enough arguments -commands.error.arg.player.missing=You must specify which player you wish to perform this action on. -commands.error.404=Command not found! -commands.error.unknown=Unknown command! -commands.error.perm=You do not have permission to use this command. - -commands.success=Executed successfully - -commands.format.help=%s - %s -commands.format.error=%s - %s - -commands.help.usage=/bloodmagic help -commands.help.help=Displays the help information for the "/bloodmagic" command. - -commands.network.usage=/bloodmagic network [syphon|add|get|fill|cap] player [amount] -commands.network.help=LP network utilities -commands.network.syphon.help=Removes the given amount of LP from the given player's LP network. -commands.network.syphon.success=Successfully syphoned %d LP from %s. -commands.network.add.help=Adds the given amount of LP to the given player's LP network. Follows standard LP gain rules. -commands.network.add.success=Successfully added %d LP to %s's LP network. -commands.network.set.help=Sets the given player's LP to the given amount. -commands.network.set.success=Successfully set %s's LP network to %d LP. -commands.network.get.help=Returns the amount of LP in the given player's LP network. -commands.network.fill.help=Fills the given player's LP network to %d. -commands.network.fill.success=Successfully filled %s's LP network. -commands.network.cap.help=Fills the given player's LP network to the max that their highest Blood Orb can store. -commands.network.cap.success=Successfully capped off %s's LP network. - -commands.bind.usage=/bloodmagic bind [true|false] [player] -commands.bind.help=Attempts to (un)bind the currently held item. -commands.bind.success=Binding successful -commands.bind.remove.success=Unbinding successful - -commands.orb.usage=/bloodmagic orb [set|get] player [tier] -commands.orb.help=Used to set or get the Player's max Blood Orb tier. - -commands.bind.usage=/bind -commands.bind.success=Item successfully bound! -commands.bind.failed.noPlayer=There is no player specified -commands.bind.failed.alreadyBound=Item is already bound; use /unbind to unbind it -commands.bind.failed.notBindable=Item cannot be bound -commands.unbind.usage=/unbind -commands.unbind.success=Item successfully unbound! -commands.unbind.failed.notBindable=Item cannot be unbound -commands.soulnetwork.usage=/soulnetwork [amount] -commands.soulnetwork.add.success=Successfully added %dLP to %s's Soul Network! -commands.soulnetwork.subtract.success=Successfully subtracted %dLP from %s's Soul Network! -commands.soulnetwork.fill.success=Successfully filled %s's Soul Network! -commands.soulnetwork.empty.success=Successfully emptied %s's Soul Network! -commands.soulnetwork.get.success=There is %dLP in %s's Soul Network! -commands.soulnetwork.noPlayer=There is no player specified -commands.soulnetwork.noCommand=There is no command specified -commands.soulnetwork.notACommand=That is not a valid command -commands.soulnetwork.fillMax.success=Successfully filled %s's Soul Network to their orb max! -commands.soulnetwork.create.success=Successfully created %s's Soul Network (Orb tier: %d) - -# GUI -tile.BloodMagic.inputNode.name=Input Node -tile.BloodMagic.outputNode.name=Output Node - -# Keybinds -BloodMagic.keybind.open_holding=Open Sigil of Holding -BloodMagic.keybind.cycle_holding_pos=Cycle Sigil (+) -BloodMagic.keybind.cycle_holding_neg=Cycle Sigil (-) - -# JustEnoughItems -jei.BloodMagic.recipe.altar=Blood Altar -jei.BloodMagic.recipe.binding=Alchemy Array (Binding) -jei.BloodMagic.recipe.alchemyArrayCrafting=Alchemy Array -jei.BloodMagic.recipe.soulForge=Hellfire Forge -jei.BloodMagic.recipe.alchemyTable=Alchemy Table -jei.BloodMagic.recipe.armourDowngrade=Penance (Ritual) -jei.BloodMagic.recipe.requiredLP=LP: %d -jei.BloodMagic.recipe.requiredTier=Tier: %d -jei.BloodMagic.recipe.consumptionRate=Consumption: %d LP/t -jei.BloodMagic.recipe.drainRate=Drain: %d LP/t -jei.BloodMagic.recipe.minimumSouls=Minimum: %1$,.2f Will -jei.BloodMagic.recipe.soulsDrained=Drained: %1$,.2f Will -jei.BloodMagic.recipe.lpDrained=Drained: %,d LP -jei.BloodMagic.recipe.ticksRequired=Time: %,d Ticks - -jei.BloodMagic.desc.altarBuilder=A creative-only item for use in debugging and testing.\n\nShift + Right click to change the tier to build. Right click an Altar to initiate the build.\n\nBreak an Altar while holding to dismantle it. -jei.BloodMagic.desc.demonicWill=An imprint of a demonic entity attached to a creature.\n\nCan be obtained by killing a mob with a sentient weapon or by throwing a snare at a mob and killing it while it has white particles. - -# WAILA -waila.BloodMagic.sneak=&oSneak for Information -waila.BloodMagic.array.reagent=Reagent: %s -waila.BloodMagic.array.catalyst=Catalyst: %s -option.BloodMagic.bypassSneak=Bypass Sneak -option.BloodMagic.bloodAltar=Blood Altar -option.BloodMagic.ritualController=Ritual Stones -option.BloodMagic.teleposer=Teleposer -option.BloodMagic.array=Alchemy Array - -# Thaumcraft -tc.research_category.BLOODMAGIC=Sanguine Arcana - -# Thaumcraft Research -bloodmagic.research_name.BLOODMAGIC=Blood Magic -bloodmagic.research_text.BLOODMAGIC=Sanguine Arcana -bloodmagic.research_page.BLOODMAGIC.1=The realm of the Blood Magics has always appeared to be a more solitary and "individual" art with blood mages being notoriously reclusive and a bit insane at times. However, the powers of self-sacrifice and life essence have uses even beyond a normal blood mage's sight, in fact, it is quite apparent that it may have some uses in thaumaturgy after all! - -# Buttons -button.bloodmagic.tooltip.fill=Fill network \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/lang/en_US.lang_old b/src/main/resources/assets/bloodmagic/lang/en_US.lang_old deleted file mode 100644 index 2d74a6ce..00000000 --- a/src/main/resources/assets/bloodmagic/lang/en_US.lang_old +++ /dev/null @@ -1,542 +0,0 @@ -#Items -item.AlchemicalWizardry.bindable.activationCrystal.weak.name=Weak Activation Crystal -item.AlchemicalWizardry.bindable.activationCrystal.awakened.name=Awakened Activation Crystal -item.AlchemicalWizardry.bindable.activationCrystal.creative.name=Creative Activation Crystal - -item.AlchemicalWizardry.dagger.name=Sacrificial Dagger -item.AlchemicalWizardry.dagger.creative.name=Creative Sacrificial Dagger - -item.AlchemicalWizardry.scribe.water.name=Water Scribing Tools -item.AlchemicalWizardry.scribe.fire.name=Fire Scribing Tools -item.AlchemicalWizardry.scribe.earth.name=Earth Scribing Tools -item.AlchemicalWizardry.scribe.air.name=Air Scribing Tools -item.AlchemicalWizardry.scribe.dusk.name=Dusk Scribing Tools -item.AlchemicalWizardry.scribe.dawn.name=Dawn Scribing Tools - -item.AlchemicalWizardry.slate.blank.name=Blank Slate -item.AlchemicalWizardry.slate.reinforced.name=Reinforced Slate -item.AlchemicalWizardry.slate.imbued.name=Imbued Slate -item.AlchemicalWizardry.slate.demonic.name=Demonic Slate - -item.AlchemicalWizardry.focus.weak.name=Teleposition Focus -item.AlchemicalWizardry.focus.enhanced.name=Enhanced Teleposition Focus -item.AlchemicalWizardry.focus.reinforced.name=Reinforced Teleposition Focus -item.AlchemicalWizardry.focus.demonic.name=Demonic Teleposition Focus - -item.AlchemicalWizardry.orb.weak.name=Weak Blood Orb -item.AlchemicalWizardry.orb.apprentice.name=Apprentice Blood Orb -item.AlchemicalWizardry.orb.magician.name=Magician Blood Orb -item.AlchemicalWizardry.orb.master.name=Master Blood Orb -item.AlchemicalWizardry.orb.archmage.name=Archmage Blood Orb -item.AlchemicalWizardry.orb.transcendent.name=Transcendent Blood Orb - -item.AlchemicalWizardry.reagent.incendium.name=Incendium -item.AlchemicalWizardry.reagent.magicales.name=Magicales -item.AlchemicalWizardry.reagent.sanctus.name=Sanctus -item.AlchemicalWizardry.reagent.aether.name=Aether -item.AlchemicalWizardry.reagent.crepitous.name=Crepitous -item.AlchemicalWizardry.reagent.crystallos.name=Crystallos -item.AlchemicalWizardry.reagent.terrae.name=Terrae -item.AlchemicalWizardry.reagent.aquasalus.name=Aquasalus -item.AlchemicalWizardry.reagent.tennebrae.name=Tennebrae -item.AlchemicalWizardry.reagent.offensa.name=Offensa -item.AlchemicalWizardry.reagent.praesidium.name=Praesidium -item.AlchemicalWizardry.reagent.orbisterrae.name=Orbis Terrae -item.AlchemicalWizardry.reagent.virtus.name=Virtus -item.AlchemicalWizardry.reagent.reductus.name=Reductus -item.AlchemicalWizardry.reagent.potentia.name=Potentia - -item.AlchemicalWizardry.sigil.air.name=Air Sigil -item.AlchemicalWizardry.sigil.bloodLight.name=Sigil of the Blood Lamp -item.AlchemicalWizardry.sigil.compression.name=Sigil of Compression -item.AlchemicalWizardry.sigil.divination.name=Divination Sigil - -# Tooltips -tooltip.sigil.air.desc=I feel lighter already... -tooltip.sigil.bloodLight.desc=I see a light! -tooltip.sigil.compression.desc=Hands of Diamonds -tooltip.sigil.divination.desc=Peer into the soul - -#Block Localization -tile.altar.name=Blood Altar -tile.blood_rune.blank.name=Blood Rune -tile.blood_rune.fill.name=Rune of Augmented Capacity -tile.blood_rune.empty.name=Rune of Dislocation -tile.blood_rune.orb.name=Rune of the Orb -tile.blood_rune.betterCapacity.name=Rune of Superior Capacity -tile.blood_rune.acceleration.name=Rune of Acceleration -tile.speed_rune.name=Speed Rune -tile.efficiency_rune.name=Efficiency Rune -tile.sacrifice_rune.name=Rune of Sacrifice -tile.self_sacrifice_rune.name=Rune of Self-Sacrifice -tile.ritual_stone.name=Ritual Stone -tile.master_ritual_stone.name=Master Ritual Stone -tile.filled_socket.name=Filled Socket -tile.imperfect_ritual_stone.name=Imperfect Ritual Stone -tile.soul_armour_forge.name=Soul Armour Forge -tile.empty_socket.name=Empty Socket -tile.bloodstone_brick.name=Bloodstone Brick -tile.large_bloodstone_brick.name=Large Bloodstone Brick -tile.chemistry_set.name=Alchemical Chemistry Set -tile.spell_table.name=Spell Table -tile.pedestal.name=Arcane Pedestal -tile.plinth.name=Arcane Plinth -tile.teleposer.name=Teleposer -tile.spell_conduit.name=Spell Conduit -tile.spell_paradigm.projectile.name=Particle Generator -tile.spell_paradigm.self.name=Self Augmentator -tile.spell_paradigm.melee.name=Melee Aggregator -tile.spell_paradigm.tool.name=Tool Forger -tile.spell_enhancement.power1.name=Unstable Spell Empowerer -tile.spell_enhancement.power2.name=Standard Spell Empowerer -tile.spell_enhancement.power3.name=Reinforced Spell Empowerer -tile.spell_enhancement.power4.name=Imbued Spell Empowerer -tile.spell_enhancement.power5.name=Demonic Spell Empowerer -tile.spell_enhancement.cost1.name=Unstable Spell Dampener -tile.spell_enhancement.cost2.name=Standard Spell Dampener -tile.spell_enhancement.cost3.name=Reinforced Spell Dampener -tile.spell_enhancement.cost4.name=Imbued Spell Dampener -tile.spell_enhancement.cost5.name=Demonic Spell Dampener -tile.spell_enhancement.potency1.name=Unstable Spell Augmentor -tile.spell_enhancement.potency2.name=Standard Spell Augmentor -tile.spell_enhancement.potency3.name=Reinforced Spell Augmentor -tile.spell_enhancement.potency4.name=Imbued Spell Augmentor -tile.spell_enhancement.potency5.name=Demonic Spell Augmentor -tile.spell_modifier.default.name=Default Spell Modifier -tile.spell_modifier.offensive.name=Offensive Spell Modifier -tile.spell_modifier.defensive.name=Defensive Spell Modifier -tile.spell_modifier.environmental.name=Environmental Spell Modifier -tile.spell_effect.fire.name=Crucible of Fire -tile.spell_effect.ice.name=Ice Maker -tile.spell_effect.wind.name=Wind Generator -tile.spell_effect.earth.name=Earth Former -tile.alchemical_calcinator.name=Alchemical Calcinator -tile.crystal_belljar.name=Crystal Belljar -tile.reagent_conduit.name=Alchemy Relay -tile.life_essence.name=Life Essence -tile.crystal_block.fullCrystal.name=Crystal Cluster -tile.crystal_block.crystalBrick.name=Crystal Cluster Brick -tile.demon_portal.name=Demon Portal -tile.demon_chest.name=Demon's Chest -tile.enchantment_glyph.enchantability.name=Glyph of the Adept Enchanter -tile.enchantment_glyph.enchantmentLevel.name=Glyph of Arcane Potential -tile.stability_glyph.stability1.name=Glyph of Rigid Stability -tile.schematic_saver.name=Schematic Saver -tile.mimic_block.name=Mimic Block -tile.spectral_container.name=Spectral Container -tile.blood_light.name=Blood Light -tile.spectral_block.name=Spectral Block -tile.incense_crucible.name=Incense Crucible - -#Item Localization -item.weak_blood_orb.name=Weak Blood Orb -item.apprentice_blood_orb.name=Apprentice Blood Orb -item.magician_blood_orb.name=Magician's Blood Orb -item.master_blood_orb.name=Master Blood Orb -item.archmage_blood_orb.name=Archmage's Blood Orb -item.energy_blast.name=Energy Blaster -item.energy_sword.name=Bound Blade -item.lava_crystal.name=Lava Crystal -item.water_sigil.name=Water Sigil -item.lava_sigil.name=Lava Sigil -item.void_sigil.name=Void Sigil -item.blank_slate.name=Blank Slate -item.reinforced_slate.name=Reinforced Slate -item.sacrificial_dagger.name=Sacrificial Knife -item.dagger_of_sacrifice.name=Dagger of Sacrifice -item.air_sigil.name=Air Sigil -item.sigil_of_the_fast_miner.name=Sigil of the Fast Miner -item.sigil_of_elemental_affinity.name=Sigil of Elemental Affinity -item.sigil_of_haste.name=Sigil of Haste -item.sigil_of_holding.name=Sigil of Holding -item.divination_sigil.name=Divination Sigil -item.water_scribe_tool.name=Elemental Inscription Tool: Water -item.fire_scribe_tool.name=Elemental Inscription Tool: Fire -item.earth_scribe_tool.name=Elemental Inscription Tool: Earth -item.air_scribe_tool.name=Elemental Inscription Tool: Air -item.dusk_scribe_tool.name=Elemental Inscription Tool: Dusk -item.activation_crystal_weak.name=Weak Activation Crystal -item.activation_crystal_awakened.name=Awakened Activation Crystal -item.activation_crystal_creative.name=Creative Activation Crystal -item.bound_pickaxe.name=Bound Pickaxe -item.bound_axe.name=Bound Axe -item.bound_shovel.name=Bound Shovel -item.bound_helmet.name=Bound Helmet -item.bound_chestplate.name=Bound Chestplate -item.bound_leggings.name=Bound Leggings -item.bound_boots.name=Bound Boots -item.weak_blood_shard.name=Weak Blood Shard -item.growth_sigil.name=Sigil of the Green Grove -item.blank_spell.name=Unbound Crystal -item.alchemy_flask.name=Potion Flask -item.standard_binding_agent.name=Standard Binding Agent -item.mundane_power_catalyst.name=Mundane Power Catalyst -item.average_power_catalyst.name=Average Power Catalyst -item.greater_power_catalyst.name=Greater Power Catalyst -item.mundane_lengthening_catalyst.name=Mundane Lengthening Catalyst -item.average_lengthening_catalyst.name=Average Lengthening Catalyst -item.greater_lengthening_catalyst.name=Greater Lengthening Catalyst -item.incendium.name=Incendium -item.magicales.name=Magicales -item.sanctus.name=Sanctus -item.aether.name=Aether -item.simple_catalyst.name=Simple Catalyst -item.crepitous.name=Crepitous -item.crystallos.name=Crystallos -item.terrae.name=Terrae -item.aquasalus.name=Aquasalus -item.tennebrae.name=Tenebrae -item.demon_blood_shard.name=Demon Blood Shard -item.sigil_of_wind.name=Sigil of the Whirlwind -item.teleposition_focus.name=Teleposition Focus -item.enhanced_teleposition_focus.name=Enhanced Teleposition Focus -item.reinforced_teleposition_focus.name=Reinforced Teleposition Focus -item.demonic_teleposition_focus.name=Demonic Teleposition Focus -item.imbued_slate.name=Imbued Slate -item.demonic_slate.name=Demonic Slate -item.sigil_of_the_bridge.name=Sigil of the Phantom Bridge -item.armour_inhibitor.name=Armour Inhibitor -item.creative_orb.name=Orb of Testing -item.weak_filling_agent.name=Weak Filling Agent -item.standard_filling_agent.name=Standard Filling Agent -item.enhanced_filling_agent.name=Enhanced Filling Agent -item.weak_binding_agent.name=Weak Binding Agent -item.ritual_diviner.name=Ritual Diviner -item.ritual_dismantler.name=Ritual Dismantler -item.sigil_of_magnetism.name=Sigil of Magnetism -item.key_of_binding.name=Key of Binding -item.energy_bazooka.name=Energy Bazooka -item.blood_light_sigil.name=Sigil of the Blood Lamp -item.complex_spell_crystal.name=Complex Spell Crystal -item.sigil_of_supression.name=Sigil of Supression -item.sigil_of_ender_severance.name=Sigil of Ender Severance -item.bucket_life.name=Bucket of Life -item.base_items.quartz_rod.name=Quartz Rod -item.base_items.empty_core.name=Empty Core -item.base_items.magicales_cable.name=Magicales Cable -item.base_items.wood_brace.name=Wooden Brace -item.base_items.stone_brace.name=Stone Brace -item.base_items.projectile_core.name=Projectile Core -item.base_items.self_core.name=Self Core -item.base_items.melee_core.name=Melee Core -item.base_items.tool_core.name=Tool Core -item.base_items.paradigm_back_plate.name=Paradigm Plate -item.base_items.output_cable.name=Output Spell Cable -item.base_items.input_cable.name=Input Spell Cable -item.base_items.flame_core.name=Fire Core -item.base_items.icy_core.name=Icy Core -item.base_items.gust_core.name=Gusty Core -item.base_items.earthen_core.name=Earthen Core -item.base_items.cracked_runic_plate.name=Cracked Runic Plate -item.base_items.runic_plate.name=Runic Plate -item.base_items.scribed_runic_plate.name=Imbued Runic Plate -item.base_items.default_core.name=Unattuned Core -item.base_items.offensive_core.name=Offensive Core -item.base_items.defensive_core.name=Defensive Core -item.base_items.environmental_core.name=Environmental Core -item.base_items.power_core.name=Power Core -item.base_items.cost_core.name=Reduction Core -item.base_items.potency_core.name=Potency Core -item.base_items.obsidian_brace.name=Obsidian Brace -item.base_items.ethereal_slate.name=Ethereal Slate -item.base_items.life_shard.name=Life Shard -item.base_items.soul_shard.name=Soul Shard -item.base_items.life_brace.name=Living Brace -item.base_items.soul_runic_plate.name=Soul Runic Plate -item.base_items.ender_shard.name=Ender Shard -item.base_alchemy_items.offensa.name=Offensa -item.base_alchemy_items.praesidium.name=Praesidium -item.base_alchemy_items.orbis_terrae.name=Orbis Terrae -item.base_alchemy_items.strengthened_catalyst.name=Strengthened Catalyst -item.base_alchemy_items.concentrated_catalyst.name=Concentrated Catalyst -item.base_alchemy_items.fractured_bone.name=Fractured Bone -item.base_alchemy_items.virtus.name=Virtus -item.base_alchemy_items.reductus.name=Reductus -item.base_alchemy_items.potentia.name=Potentia -item.sanguine_helmet.name=Sanguine Helmet -item.seer_sigil.name=Sigil of Sight -item.fluid_sigil.name=Sigil of Fluidity -item.multi_tool.name=Dynamic Mace -item.combinational_catalyst.name=Combinational Catalyst -item.sanguine_robe.name=Sanguine Robes -item.sanguine_pants.name=Sanguine Leggings -item.sanguine_boots.name=Sanguine Boots -item.alchemical_router.name=Alchemic Router -item.alchemical_segmenter.name=Alchemic Segmenter -item.alchemical_cleanser.name=Alchemic Cleanser -item.demon_crystal.name=Demon Crystal -item.creative_dagger.name=Creative Sacrificial Knife -item.blood_pack.name=Blood Letter's Pack -item.harvest_sigil.name=Harvest Goddess Sigil -item.compression_sigil.name=Sigil of Compression -item.assassin_sigil.name=Sigil of the Assassin -item.transcendent_blood_orb.name=Transcendent Blood Orb -item.mail_catalogue.name=Mail Order Catalogue -item.input_routing_focus.name=Input Routing Focus -item.output_routing_focus.default.name=Default Output Routing Focus -item.output_routing_focus.modItem.name=Output Routing Focus (ModItem) -item.output_routing_focus.ignMeta.name=Output Routing Focus (Ignore Meta) -item.output_routing_focus.matchNBT.name=Output Routing Focus (MatchNBT) -item.output_routing_focus.global.name=Output Routing Focus (Global) -item.dawn_scribe_tool.name=Elemental Inscription Tool: Dawn -item.bound_helmet_earth.name=Earth Omega Helmet -item.bound_chestplate_earth.name=Earth Omega Chestplate -item.bound_leggings_earth.name=Earth Omega Leggings -item.bound_boots_earth.name=Earth Omega Boots -item.bound_helmet_wind.name=Wind Omega Helmet -item.bound_chestplate_wind.name=Wind Omega Chestplate -item.bound_leggings_wind.name=Wind Omega Leggings -item.bound_boots_wind.name=Wind Omega Boots -item.bound_helmet_fire.name=Fire Omega Helmet -item.bound_chestplate_fire.name=Fire Omega Chestplate -item.bound_leggings_fire.name=Fire Omega Leggings -item.bound_boots_fire.name=Fire Omega Boots -item.bound_helmet_water.name=Water Omega Helmet -item.bound_chestplate_water.name=Water Omega Chestplate -item.bound_leggings_water.name=Water Omega Leggings -item.bound_boots_water.name=Water Omega Boots - -item.incense.wood_ash.name=Wood Ash -item.incense.byrrus.name=Byrrus -item.incense.livens.name=Livens -item.incense.viridis.name=Viridis -item.incense.purpura.name=Purpura - -#Creative Tab -itemGroup.tabBloodMagic=Blood Magic - -#Extra Strings -bm.string.consume=Usage -bm.string.drain=Drain -bm.string.tier=Tier -bm.string.crafting.orb.shaped=Shaped Orb Crafting -bm.string.crafting.orb.shapeless=Shapeless Orb Crafting -text.recipe.altar=Blood Altar -text.recipe.altar.tier=Tier: %s -text.recipe.altar.bloodRequired=LP: %s -text.recipe.shapedOrb=Shaped Orb Recipe - -#Entities -entity.AWWayofTime.EarthElemental.name=Earth Elemental -entity.AWWayofTime.FireElemental.name=Fire Elemental -entity.AWWayofTime.HolyElemental.name=Holy Elemental -entity.AWWayofTime.ShadeElemental.name=Shade Elemental -entity.AWWayofTime.WaterElemental.name=Water Elemental -entity.AWWayofTime.AirElemental.name=Air Elemental -entity.AWWayofTime.Shade.name=Shade -entity.AWWayofTime.BoulderFist.name=Boulder Fist -entity.AWWayofTime.IceDemon.name=Ice Demon -entity.AWWayofTime.SmallEarthGolem.name=Small Earth Golem -entity.AWWayofTime.WingedFireDemon.name=Winged Fire Demon -entity.AWWayofTime.BileDemon.name=Bile Demon -entity.AWWayofTime.LowerGuardian.name=Lower Guardian -entity.AWWayofTime.FallenAngel.name=Fallen Angel -entity.AWWayofTime.MinorDemonGruntGuardian.name=Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianWind.name=Wind Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianFire.name=Fire Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianIce.name=Ice Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianEarth.name=Earth Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntWind.name=Wind Demon Grunt -entity.AWWayofTime.MinorDemonGruntFire.name=Fire Demon Grunt -entity.AWWayofTime.MinorDemonGruntIce.name=Ice Demon Grunt -entity.AWWayofTime.MinorDemonGruntEarth.name=Earth Demon Grunt -entity.AWWayofTime.MinorDemonGrunt.name=Demon Grunt - -#Commands -commands.soulnetwork.usage=/soulnetwork -commands.bind.usage=/bind -commands.bind.success=Item successfully bound! -commands.bind.failed.noPlayer=There is no player specified -commands.bind.failed.alreadyBound=Item is already bound; use /unbind to unbind it -commands.bind.failed.notBindable=Item cannot be bound -commands.unbind.usage=/unbind -commands.unbind.success=Item successfully unbound! -commands.unbind.failed.notBindable=Item cannot be unbound -commands.soulnetwork.usage=/soulnetwork [amount] -commands.soulnetwork.add.success=Successfully added %dLP to %s's Soul Network! -commands.soulnetwork.subtract.success=Successfully subtracted %dLP from %s's Soul Network! -commands.soulnetwork.fill.success=Successfully filled %s's Soul Network! -commands.soulnetwork.empty.success=Successfully emptied %s's Soul Network! -commands.soulnetwork.get.success=There is %dLP in %s's Soul Network! -commands.soulnetwork.noPlayer=There is no player specified -commands.soulnetwork.noCommand=There is no command specified -commands.soulnetwork.notACommand=That is not a valid command -commands.soulnetwork.fillMax.success=Successfully filled %s's Soul Network to their orb max! -commands.soulnetwork.create.success=Successfully created %s's Soul Network (Orb tier: %d) - -#Tooltips -tooltip.activationcrystal.weak=Activates low-level rituals -tooltip.activationcrystal.awakened=Activates more powerful rituals -tooltip.activationcrystal.creative=Creative Only - activates any ritual -tooltip.airsigil.desc=I feel lighter already... -tooltip.alchemy.coords=Coords: %d, %d, %d -tooltip.alchemy.damage=Damage: -tooltip.alchemy.dimension=Bound Dimension: %d -tooltip.alchemy.direction=Direction: -tooltip.alchemy.forrecipe=for Recipe -tooltip.alchemy.press=Press -tooltip.alchemy.recipe=&9Recipe: -tooltip.alchemy.ritualid=RitualID: -tooltip.alchemy.shift=shift -tooltip.alchemy.pressShift=-Press &l&9shift &7for Recipe- -tooltip.alchemy.usedinalchemy=Used in Alchemy -tooltip.alchemyflask.caution=CAUTION: Contents are throwable -tooltip.alchemyflask.swigsleft=Swigs Left: -tooltip.armorinhibitor.desc1=Used to suppress a soul's -tooltip.armorinhibitor.desc2=unnatural abilities. -tooltip.attunedcrystal.desc1=A tool to tune alchemy -tooltip.attunedcrystal.desc2=reagent transmission -tooltip.blankspell.desc=Crystal of infinite possibilities. -tooltip.bloodframe.desc=Stirs bees into a frenzy. -tooltip.bloodletterpack.desc=This pack really chaffes... -tooltip.bloodlightsigil.desc=I see a light! -tooltip.boundarmor.devprotect=Devilish Protection -tooltip.boundaxe.desc=Axe me about my puns! -tooltip.boundpickaxe.desc1=The Souls of the Damned -tooltip.boundpickaxe.desc2=do not like stone... -tooltip.boundshovel.desc=No, not that type of spade. -tooltip.caution.desc1=Caution: may cause -tooltip.caution.desc2=a bad day... -tooltip.cheatyitem.desc1=Right-click to fill network, -tooltip.cheatyitem.desc2=shift-right to empty. -tooltip.complexspellcrystal.desc=Crystal of unimaginable power -tooltip.crystalbelljar.contents=Current Contents: -tooltip.crystalbelljar.empty=- Empty -tooltip.telepositionfocus.demonic.desc1=A stronger version of the focus, -tooltip.telepositionfocus.demonic.desc2=using a demonic shard -tooltip.demonplacer.desc=Used to spawn demons. -tooltip.destclearer.desc1=Used to clear the destination -tooltip.destclearer.desc2=list for an alchemy container -tooltip.diablokey.desc=Binds other items to the owner's network -tooltip.divinationsigil.desc1=Peer into the soul to -tooltip.divinationsigil.desc2=get the current essence -tooltip.energybazooka.desc=Boom. -tooltip.energybattery.desc=Stores raw Life Essence -tooltip.energyblast.desc1=Used to fire devastating -tooltip.energyblast.desc2=projectiles. -tooltip.telepositionfocus.enhanced.desc1=A focus further enhanced in an altar -tooltip.fluidsigil.beastmode=Beast Mode -tooltip.fluidsigil.desc=A sigil with a lovely affinity for fluids -tooltip.fluidsigil.draintankmode=Drain Tank Mode -tooltip.fluidsigil.filltankmode=Fill Tank Mode -tooltip.fluidsigil.fluidplacementmode=Fluid Placement Mode -tooltip.fluidsigil.forcesyphonmode=Force-syphon Mode -tooltip.fluidsigil.syphoningmode=Syphoning Mode -tooltip.harvestsigil.desc=You sow what you reap -tooltip.infusedstone.desc1=Infused stone inside of -tooltip.infusedstone.desc2=a blood altar -tooltip.item.iteminslot=Item in slot -tooltip.item.currentitem=Current Item: -tooltip.lavacrystal.desc1=Store life to smelt -tooltip.lavacrystal.desc2=stuff in the furnace. -tooltip.lavasigil.desc1=Contact with liquid is -tooltip.lavasigil.desc2=highly unrecommended. -tooltip.lp.storedlp=Stored LP: -tooltip.mode.creative=Creative Only -tooltip.owner.currentowner=Current Owner: %s -tooltip.owner.demonsowner=Demon's Owner: -tooltip.packratsigil.desc=Hands of Diamonds -tooltip.reagent.selectedreagent=Currently selected reagent: -tooltip.telepositionfocus.reinforced.desc1=A stronger version of the focus, -tooltip.telepositionfocus.reinforced.desc2=using a weak shard -tooltip.ritualdiviner.airstones=Air Stones: -tooltip.ritualdiviner.blankstones=Blank Stones: -tooltip.ritualdiviner.cannotplace=Can not place Dusk runes -tooltip.ritualdiviner.canplace=Can place Dusk runes -tooltip.ritualdiviner.canplacedawn=Can place Dusk and Dawn runes -tooltip.ritualdiviner.desc=Used to explore new types of rituals -tooltip.ritualdiviner.duskstones=Dusk Stones: -tooltip.ritualdiviner.earthstones=Earth Stones: -tooltip.ritualdiviner.firestones=Fire Stones: -tooltip.ritualdiviner.moreinfo=Press shift for extended information -tooltip.ritualdiviner.ritualtunedto=Ritual tuned to face: -tooltip.ritualdiviner.waterstones=Water Stones: -tooltip.ritualdiviner.dawnstones=Dawn Stones: -tooltip.ritualdiviner.totalStones=Total Stones: -tooltip.dismatler.desc=You could turn this upside down? -tooltip.sacrificialdagger.desc1=A slight draining feeling tickles your fingers -tooltip.sacrificialdagger.desc2=Just a prick of the -tooltip.sacrificialdagger.desc3=finger will suffice... -tooltip.sanguinearmor.desc1=A pair of goggles imbued with power -tooltip.sanguinearmor.desc2=Robes imbued with forbidden power -tooltip.sanguinearmor.visdisc=Vis discount: -tooltip._scribe_tool.desc=The writing is on the wall... -tooltip.seersigil.desc=When seeing all is not enough -tooltip.sigil_ofelementalaffinity.desc1=Perfect for a fire-breathing fish -tooltip.sigil_ofelementalaffinity.desc2=who is afraid of heights! -tooltip.sigil_ofenderseverance.desc=Put those endermen in a Dire situation! -tooltip.sigil_ofgrowth.desc1=Who needs a green thumb when -tooltip.sigil_ofgrowth.desc2=you have a green slate? -tooltip.sigil_ofhaste.desc=One dose of caffeine later... -tooltip.sigil_ofholding.desc=Used to hold several Sigils! -tooltip.sigil_ofmagnetism.desc=I have a very magnetic personality! -tooltip.sigil_ofsupression.desc=Better than telekinesis -tooltip.sigil_oftheassassin.desc=Time to stay stealthy... -tooltip.sigil_ofthebridge.desc1=Activate to create a bridge -tooltip.sigil_ofthebridge.desc2=beneath your feet. -tooltip.sigil_ofthefastminer.desc=Keep going and going and going... -tooltip.sigil_ofwind.desc=Best not to wear a skirt. -tooltip.sigil.state.activated=Activated -tooltip.sigil.state.deactivated=Deactivated -tooltip.tanksegmenter.desc1=Used to designate which -tooltip.tanksegmenter.desc2=reagents can go into a container -tooltip.telepositionfocus.weak.desc1=An Enderpearl imbued with blood -tooltip.voidsigil.desc=Better than a Swiffer! -tooltip.watersigil.desc=Infinite water, anyone? -tooltip.routingFocus.limit=Limit: -tooltip.routingFocus.desc=A focus used to route items -tooltip.alchemy.usedinincense=Purifying incense used in a crucible - -#Messages -message.altar.capacity=Capacity: %s LP -message.altar.consumptionrate=Consumption Rate: -message.altar.currentessence=Altar's Current Essence: %s LP -message.altar.currenttier=Altar's Current Tier: %s -message.altar.progress=Altar's Progress: -message.altar.inputtank= Input Tank: %s LP -message.altar.outputtank= Output Tank: %s LP -message.altar.hunger=[BM] Your high regeneration rate has caused you to become hungry... -message.attunedcrystal.clearing=Clearing saved container... -message.attunedcrystal.error.cannotfind=Can no longer find linked container. -message.attunedcrystal.error.noconnections=Linked container has no connections remaining! -message.attunedcrystal.error.toofar=Linked container is either too far or is in a different dimension. -message.attunedcrystal.linked=Container is now linked. Transmitting: -message.attunedcrystal.linking=Linking to selected container. -message.attunedcrystal.setto=Attuned Crystal now set to: -message.demon.shallfollow=I shall follow and protect you! -message.demon.willstay=I will stay here for now, Master. -message.destinationclearer.cleared=Destination list now cleared. -message.divinationsigil.amount=Amount: -message.divinationsigil.currentessence=Current Essence: %d LP -message.divinationsigil.reagent=Reagent: %s, Amount: %d -message.masterstone.crystalvibrates=Your crystal vibrates pathetically. -message.masterstone.energyflows=A rush of energy flows through the ritual! -message.masterstone.nothinghappened=Nothing appears to have happened... -message.masterstone.ritualresistyou=The ritual appears to actively resist you! -message.masterstone.somethingstoppedyou=Something stopped you in your tracks... -message.masterstone.youfeelapull=You feel a pull, but you are too weak to push any further. -message.ritual.currentritual=Current Ritual: -message.ritual.side.east=EAST -message.ritual.side.north=NORTH -message.ritual.side.south=SOUTH -message.ritual.side.west=WEST -message.ritualdemonportal.missingjar=A jar on one of the pillars appears to be missing... -message.tanksegmenter.nowhas=Tank now has -message.tanksegmenter.setto=Tank Segmenter now set to: -message.tanksegmenter.tankssetto=tank(s) set to: -message.routerfocus.limit=Focus' Item Limit set to: - -#Achievements -achievement.alchemicalwizardry:firstPrick=Your First Prick! -achievement.alchemicalwizardry:firstPrick.desc=The first drop of life into the Altar... -achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red... -achievement.alchemicalwizardry:weakOrb.desc=This orb will suffice...for now... - -#G-API Downloading -bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"] -bm.versioning.startingDownload=[{"text":"Starting download of %s Please do not remove your hard disk.", "color":"orange"}] -bm.versioning.doneDownloading=Finished downloading %s Reload your game to update. -bm.versioning.error=An error has occurred while downloading the mod! -bm.versioning.downloadedAlready=You have the latest version already, reload your game to update! -bm.versioning.downloadingAlready=It's downloading! Be patient! -bm.versioning.disabled=This feature is disabled. diff --git a/src/main/resources/assets/bloodmagic/lang/fr_FR.lang b/src/main/resources/assets/bloodmagic/lang/fr_FR.lang deleted file mode 100644 index 22fa2570..00000000 --- a/src/main/resources/assets/bloodmagic/lang/fr_FR.lang +++ /dev/null @@ -1,649 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=Blood Magic -itemGroup.BloodMagic.creativeTabTome=Blood Magic Tômes d'Améliorations - -#Items -item.BloodMagic.activationCrystal.weak.name=Cristal d'Activation Affaibli -item.BloodMagic.activationCrystal.awakened.name=Cristal d'Activation Éveillé -item.BloodMagic.activationCrystal.creative.name=Cristal d'Activation Créatif - -item.BloodMagic.sacrificialDagger.normal.name=Dague Sacrificielle -item.BloodMagic.sacrificialDagger.creative.name=Dague Sacrificielle Créative -item.BloodMagic.pack.selfSacrifice.name=Sac à dos Sanguin -item.BloodMagic.pack.sacrifice.name=Manteau des Bras -item.BloodMagic.daggerOfSacrifice.name=Dague des Sacrifices - -item.BloodMagic.lavaCrystal.name=Cristal de Lave - -item.BloodMagic.bound.sword.name=Lame Sacrificielle -item.BloodMagic.bound.pickaxe.name=Pioche Sacrificielle -item.BloodMagic.bound.axe.name=Hache Sacrificielle -item.BloodMagic.bound.shovel.name=Pelle Sacrificielle - -item.BloodMagic.bucket.lifeEssence.name=Seau de Vie - -item.BloodMagic.scribe.water.name=Craie d’Inscription Elémentaire: Eau -item.BloodMagic.scribe.fire.name=Craie d’Inscription Elémentaire: Feu -item.BloodMagic.scribe.earth.name=Craie d’Inscription Elémentaire: Terre -item.BloodMagic.scribe.air.name=Craie d’Inscription Elémentaire: Air -item.BloodMagic.scribe.dusk.name=Craie d’Inscription Elémentaire: Crépuscule -item.BloodMagic.scribe.dawn.name=Craie d’Inscription Elémentaire: Aube - -item.BloodMagic.focus.weak.name=Focus de Téléposition -item.BloodMagic.focus.enhanced.name=Focus de Téléposition Amélioré -item.BloodMagic.focus.reinforced.name=Focus de Téléposition Renforcé -item.BloodMagic.focus.demonic.name=Focus de Téléposition Diabolique - -item.BloodMagic.slate.blank.name=Tablette Vierge -item.BloodMagic.slate.reinforced.name=Tablette Renforcée -item.BloodMagic.slate.imbued.name=Tablette Imprégnée -item.BloodMagic.slate.demonic.name=Tablette Diabolique -item.BloodMagic.slate.ethereal.name=Tablette Éthérée - -item.BloodMagic.orb.weak.name=Orbe Sanguinaire Affaiblie -item.BloodMagic.orb.apprentice.name=Orbe Sanguinaire de l’Apprenti -item.BloodMagic.orb.magician.name=Orbe Sanguinaire du Magicien -item.BloodMagic.orb.master.name=Orbe Sanguinaire du Maître -item.BloodMagic.orb.archmage.name=Orbe Sanguinaire de l'Enchanteur -item.BloodMagic.orb.transcendent.name=Orb Sanguinaire Transcendante - -item.BloodMagic.reagent.incendium.name=Incendium -item.BloodMagic.reagent.magicales.name=Magicales -item.BloodMagic.reagent.sanctus.name=Sanctus -item.BloodMagic.reagent.aether.name=Aether -item.BloodMagic.reagent.crepitous.name=Crepitous -item.BloodMagic.reagent.crystallos.name=Crystallos -item.BloodMagic.reagent.terrae.name=Terrae -item.BloodMagic.reagent.aquasalus.name=Aquasalus -item.BloodMagic.reagent.tennebrae.name=Tennebrae -item.BloodMagic.reagent.offensa.name=Offensa -item.BloodMagic.reagent.praesidium.name=Praesidium -item.BloodMagic.reagent.orbisterrae.name=Orbis Terrae -item.BloodMagic.reagent.virtus.name=Virtus -item.BloodMagic.reagent.reductus.name=Reductus -item.BloodMagic.reagent.potentia.name=Potentia - -item.BloodMagic.bloodShard.weak.name=Tesson Sanguin Faible -item.BloodMagic.bloodShard.demon.name=Tesson Sanguin Diabolique - -item.BloodMagic.baseComponent.reagentWater.name=Réactif d'Eau -item.BloodMagic.baseComponent.reagentLava.name=Réactif de Lave -item.BloodMagic.baseComponent.reagentAir.name=Réactif d'Air -item.BloodMagic.baseComponent.reagentFastMiner.name=Réactif Minier -item.BloodMagic.baseComponent.reagentVoid.name=Réactif du Vide -item.BloodMagic.baseComponent.reagentGrowth.name=Réactif de Forestation -item.BloodMagic.baseComponent.reagentAffinity.name=Réactif d'Affinitée Élémentaire -item.BloodMagic.baseComponent.reagentSight.name=Réactif de Vue -item.BloodMagic.baseComponent.reagentBinding.name=Réactif de Sacrifice -item.BloodMagic.baseComponent.reagentSuppression.name=Réactif de Suppression -item.BloodMagic.baseComponent.frameParts.name=Parties des cadres -item.BloodMagic.baseComponent.reagentBloodLight.name=Réactif de Lampe Sanguine -item.BloodMagic.baseComponent.reagentMagnetism.name=Réactif de Magnétisme -item.BloodMagic.baseComponent.reagentHaste.name=Réactif de Célérité -item.BloodMagic.baseComponent.reagentBridge.name=Réactif du Pont Fantôme -item.BloodMagic.baseComponent.reagentCompression.name=Réactif de Compression -item.BloodMagic.baseComponent.reagentSeverance.name=Réactif de Sévérance -item.BloodMagic.baseComponent.reagentHolding.name=Réactif de Possession - -item.BloodMagic.baseComponent.reagentTeleposition.name=Réactif de Téléposition -item.BloodMagic.baseComponent.reagentTransposition.name=Réactif de Transposition - -item.BloodMagic.baseComponent.ironSand.name=Sable de Fer -item.BloodMagic.baseComponent.goldSand.name=Sable d'Or -item.BloodMagic.baseComponent.coalSand.name=Sable de Charbon -item.BloodMagic.baseComponent.plantOil.name=Huile de Plante -item.BloodMagic.baseComponent.sulfur.name=Soufre -item.BloodMagic.baseComponent.saltpeter.name=Salpêtre -item.BloodMagic.baseComponent.neurotoxin.name=Neurotoxine -item.BloodMagic.baseComponent.antiseptic.name=Antiseptique - -item.BloodMagic.cuttingFluid.basicCuttingFluid.name=Fluide Coupant de Base -item.BloodMagic.cuttingFluid.explosive.name=Poudre Explosive - -item.BloodMagic.demonCrystal.crystalDefault.name=Cristal d'une Volonté Diabolique -item.BloodMagic.demonCrystal.crystalCorrosive.name=Cristal d'une Volonté Corrosive -item.BloodMagic.demonCrystal.crystalDestructive.name=Cristal d'une Volonté Destructive -item.BloodMagic.demonCrystal.crystalVengeful.name=Cristal d'une Volonté Vengeresse -item.BloodMagic.demonCrystal.crystalSteadfast.name=Cristal d'une Volonté Inébranlable - -item.BloodMagic.monsterSoul.base.name=Volonté Diabolique - -item.BloodMagic.sigil.air.name=Emblème d'Air -item.BloodMagic.sigil.bloodLight.name=Emblème de la Lampe Sanguine -item.BloodMagic.sigil.compression.name=Emblème de Compression -item.BloodMagic.sigil.divination.name=Emblème des Pythies -item.BloodMagic.sigil.water.name=Emblème d'Eau -item.BloodMagic.sigil.lava.name=Emblème de Lave -item.BloodMagic.sigil.void.name=Emblème du Vide -item.BloodMagic.sigil.greenGrove.name=Emblème de la forestation -item.BloodMagic.sigil.elementalAffinity.name=Emblème de l'Affinité Élémentaire -item.BloodMagic.sigil.haste.name=Emblème de Célérité -item.BloodMagic.sigil.suppression.name=Emblème de Délétion -item.BloodMagic.sigil.magnetism.name=Emblème de Magnétisme -item.BloodMagic.sigil.fastMiner.name=Emblème du Mineur Rapide -item.BloodMagic.sigil.seer.name=Emblème du Voyant -item.BloodMagic.sigil.phantomBridge.name=Emblème du Pont du Fantôme -item.BloodMagic.sigil.whirlwind.name=Emblème de la Tempête -item.BloodMagic.sigil.enderSeverance.name=Emblème de Sévérance de l'Ender -item.BloodMagic.sigil.holding.name=Emblème de Possession -item.BloodMagic.sigil.holding.display=&r%s: &o&n%s -item.BloodMagic.sigil.teleposition.name=Emblème de Téléposition -item.BloodMagic.sigil.transposition.name=Emblème de Transposition - -item.BloodMagic.livingArmour.helmet.name=Casque Vivant -item.BloodMagic.livingArmour.chest.name=Plastron Vivant -item.BloodMagic.livingArmour.legs.name=Jambières Vivantes -item.BloodMagic.livingArmour.boots.name=Bottes Vivantes -item.BloodMagic.sentientArmour.helmet.name=Casque Sentient -item.BloodMagic.sentientArmour.chest.name=Plastron Sentient -item.BloodMagic.sentientArmour.legs.name=Jambières Sentientes -item.BloodMagic.sentientArmour.boots.name=Bottes Sentientes - -item.BloodMagic.altarMaker.name=Créateur d'Autels - -item.BloodMagic.ritualDivinernormal.name=Devineur de Rituels -item.BloodMagic.ritualDivinerdusk.name=Devineur de Rituels [Crépuscule] -item.BloodMagic.ritualDivinerdawn.name=Devineur de Rituels [Aube] -item.BloodMagic.ritualReader.name=Bricoleur de Rituels - -item.BloodMagic.arcaneAshes.name=Cendres Ésotériques -item.BloodMagic.upgradeTome.name=Tablette d'Amélioration d'Armure Vivante -item.BloodMagic.upgradeTrainer.name=Bracelet d'Entrainement d'Armure Vivante - -item.BloodMagic.sentientSword.name=Épée Sentiente -item.BloodMagic.soulGem.petty.name=Faible Gemme Tartrique -item.BloodMagic.soulGem.lesser.name=Simple Gemme Tartrique -item.BloodMagic.soulGem.common.name=Gemme Tartrique Commune -item.BloodMagic.soulGem.greater.name=Gemme Tartrique Complexe -item.BloodMagic.soulGem.grand.name=Gemme Tartrique Puissante -item.BloodMagic.soulSnare.base.name=Piège Rudimentaire -item.BloodMagic.sentientBow.name=Arc Sentient -item.BloodMagic.sentientArmourGem.name=Gemme d'Armure Sentiente -item.BloodMagic.sentientAxe.name=Hâche Sentiente -item.BloodMagic.sentientPickaxe.name=Pioche Sentiente -item.BloodMagic.sentientShovel.name=Pelle Sentiente - -item.BloodMagic.nodeRouter.name=Routeur de Jonction -item.BloodMagic.itemFilter.exact.name=Filtre d'Objets Précis -item.BloodMagic.itemFilter.ignoreNBT.name=Filtre d'Objets par NBT -item.BloodMagic.itemFilter.modItems.name=Filtre d'Objets par Mod -item.BloodMagic.itemFilter.oreDict.name=Filtre d'Objets par le Catalogue de Minerai - -item.BloodMagic.experienceTome.name=Tôme de Peritia -item.BloodMagic.sanguineBook.name=Livre Sanguin - -item.BloodMagic.livingPointUpgrade.draftAngelus.name=Draft d'Angelus - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=Essence de Vie - -tile.BloodMagic.stone.ritual.master.name=Pierre Rituelle Maîtresse -tile.BloodMagic.stone.ritual.imperfect.name=Pierre Rituelle Imparfaite - -tile.BloodMagic.altar.name=Autel de Sang -tile.BloodMagic.alchemyArray.name=&r&fÉtalage d'Alchimie - -tile.BloodMagic.rune.blank.name=Rune de Sang -tile.BloodMagic.rune.speed.name=Rune de Vitesse -tile.BloodMagic.rune.efficiency.name=Rune d'Efficacité -tile.BloodMagic.rune.sacrifice.name=Rune de Sacrifice -tile.BloodMagic.rune.selfsacrifice.name=Rune de l'Autosacrifice -tile.BloodMagic.rune.displacement.name=Rune de Dislocation -tile.BloodMagic.rune.capacity.name=Rune de Capacité -tile.BloodMagic.rune.augcapacity.name=Rune de Capacité Supérieure -tile.BloodMagic.rune.orb.name=Rune de l'Orbe -tile.BloodMagic.rune.acceleration.name=Rune d'Accélération -tile.BloodMagic.rune.charging.name=Rune de Chargement - - -tile.BloodMagic.ritualStone.blank.name=Pierre Rituelle -tile.BloodMagic.ritualStone.water.name=Pierre Rituelle d'Eau -tile.BloodMagic.ritualStone.fire.name=Pierre Rituelle du Feu -tile.BloodMagic.ritualStone.earth.name=Pierre Rituelle de la Terre -tile.BloodMagic.ritualStone.air.name=Pierre Rituelle de l'Air -tile.BloodMagic.ritualStone.dusk.name=Pierre Rituelle du Crépuscule -tile.BloodMagic.ritualStone.dawn.name=Pierre Rituelle de l'Aube - -tile.BloodMagic.bloodstonebrick.large.name=Brique Large de Roche-Sang -tile.BloodMagic.bloodstonebrick.brick.name=Brique de Roche-Sang -tile.BloodMagic.crystal.large.name=Groupe de Cristaux -tile.BloodMagic.crystal.brick.name=Bloc de Crystal -tile.BloodMagic.bloodLight.name=Lumière Sanguine -tile.BloodMagic.spectralBlock.name=Bloc Spectral -tile.BloodMagic.phantom.name=Bloc Fantôme -tile.BloodMagic.incenseAltar.name=Autel Encens - -tile.BloodMagic.teleposer.name=Téléposeur -tile.BloodMagic.soulForge.name=Hellfire Forge -tile.BloodMagic.alchemyTable.name=Table d'Alchimie -tile.BloodMagic.demonCrucible.name=Creuset Diabolique -tile.BloodMagic.demonPylon.name=Pylône Diabolique -tile.BloodMagic.demonCrystallizer.name=Crystaliseur Diabolique - -tile.BloodMagic.masterRouting.name=NÅ“ud de Routage Maître -tile.BloodMagic.outputRouting.name=NÅ“ud de Routage de Sortie -tile.BloodMagic.inputRouting.name=NÅ“ud de Routage d'Entré -tile.BloodMagic.itemRouting.name=NÅ“ud de Routage - -tile.BloodMagic.path.wood.name=Chemin en Bois -tile.BloodMagic.path.woodtile.name=Chemin en Bois Carrelé -tile.BloodMagic.path.stone.name=Chemin en Pierre -tile.BloodMagic.path.stonetile.name=Chemin en Pierre Carrelée -tile.BloodMagic.path.wornstone.name=Chemin en Pierre Usé -tile.BloodMagic.path.wornstonetile.name=Chemin en Pierre Usé Carrelée -tile.BloodMagic.path.obsidian.name=Chemin en Obsidienne -tile.BloodMagic.path.obsidiantile.name=Chemin en Obsidienne Carrelée - -tile.BloodMagic.dimensionalPortal.name=Portail Dimensionnel -tile.BloodMagic.bloodTank.name=Réservoir de Sang - -tile.BloodMagic.demonCrystal.default.name=Groupe de Cristaux d'une Volonté Diabolique -tile.BloodMagic.demonCrystal.corrosive.name=Groupe de Cristaux d'une Volonté Corrosive -tile.BloodMagic.demonCrystal.destructive.name=Groupe de Cristaux d'une Volonté Destructive -tile.BloodMagic.demonCrystal.vengeful.name=Groupe de Cristaux d'une Volonté Vengeresse -tile.BloodMagic.demonCrystal.steadfast.name=Groupe de Cristaux d'une Volonté Inébranlable - -# Fluids -fluid.lifeEssence=Essence de Vie - -#Tooltips -tooltip.BloodMagic.extraInfo=&9-Tenir shift pour plus d'info- - -tooltip.BloodMagic.orb.desc=Stock d'essence de vie crue -tooltip.BloodMagic.orb.owner=Added by: %s -tooltip.BloodMagic.currentOwner=Propriétaire actuel: %s -tooltip.BloodMagic.currentTier=Niveau actuel: %d -tooltip.BloodMagic.config.disabled=Désactivée dans cet insant dans le ficher de Config - -tooltip.BloodMagic.activated=Activé -tooltip.BloodMagic.deactivated=Désactivé - -tooltip.BloodMagic.sigil.air.desc=&oJe me sens plus léger déjà... -tooltip.BloodMagic.sigil.bloodLight.desc=&oJe vois une lumière! -tooltip.BloodMagic.sigil.compression.desc=&oMains en Diamants -tooltip.BloodMagic.sigil.divination.desc=&oDévisager l'âme -tooltip.BloodMagic.sigil.divination.otherNetwork=Dévisager l'âme de %s -tooltip.BloodMagic.sigil.divination.currentAltarTier=Niveau Actuel: %d -tooltip.BloodMagic.sigil.divination.currentEssence=Essence Actuel: %d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=Capacité Actuelle: %d LP -tooltip.BloodMagic.sigil.divination.currentTranquility=Tranquillité Actuelle: %d -tooltip.BloodMagic.sigil.divination.currentBonus=Bonus Actuel: +%d%% -tooltip.BloodMagic.sigil.water.desc=&oUne infinité d'eau, personne? -tooltip.BloodMagic.sigil.lava.desc=&oCHAUD! NE LE MANGEZ PAS -tooltip.BloodMagic.sigil.void.desc=&oMieux que Swiffer®! -tooltip.BloodMagic.sigil.greenGrove.desc=&oÉcologique -tooltip.BloodMagic.sigil.magnetism.desc=&oJ'ai une personnalité très attirante -tooltip.BloodMagic.sigil.suppression.desc=&oMieux que la télékinésie... -tooltip.BloodMagic.sigil.haste.desc=&o42 doses de caféine plus tard... -tooltip.BloodMagic.sigil.fastMiner.desc=&oContinue à miner, à miner... -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oDes poissons enflamées qui tombent! -tooltip.BloodMagic.sigil.seer.desc=&oQuand voir tout n'est pas suffisant -tooltip.BloodMagic.sigil.seer.currentAltarProgress=Progrès Actuel: %d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=Progrès Actuel: %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=Vitesse de consomation: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=Niveau Actuel: %d -tooltip.BloodMagic.sigil.seer.currentEssence=Essence Actuelle: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=Capacité Actuelle: %d LP -tooltip.BloodMagic.sigil.seer.currentCharge=Charge Actuelle: %d -tooltip.BloodMagic.sigil.seer.currentTranquility=Tranquillité Actuelle: %d -tooltip.BloodMagic.sigil.seer.currentBonus=Bonus Actuel: +%d%% -tooltip.BloodMagic.sigil.phantomBridge.desc=&oMarcher sur de l'air fin... -tooltip.BloodMagic.sigil.whirlwind.desc=&oMieux de ne pas porter une jupe -tooltip.BloodMagic.sigil.enderSeverance.desc=&oMettre les Endermen dans des situations terribles! -tooltip.BloodMagic.sigil.teleposition.desc=Je suis très proche d'ètre transporté comme ça. -tooltip.BloodMagic.sigil.transposition.desc=Sens le pouvoir de la force, mon jeune apprenti. -tooltip.BloodMagic.sigil.holding.desc=Sigil-ception -tooltip.BloodMagic.sigil.holding.sigilInSlot=Slot %d: %s - -tooltip.BloodMagic.livingArmourPointsUpgrade.desc=Augmente le maxium de points de l'Armure Vivante à %d. - -tooltip.BloodMagic.bound.sword.desc=&oBattre le faible -tooltip.BloodMagic.bound.pickaxe.desc=&oDétruir les pierres sans pitié -tooltip.BloodMagic.bound.axe.desc=&oDéforestation diabolique -tooltip.BloodMagic.bound.shovel.desc=&oEffacer la terre du sol - -tooltip.BloodMagic.sacrificialDagger.desc=Juste une pîqure du doigt va suffir... -tooltip.BloodMagic.sacrificialDagger.creative=Faites un clic-droit sur un autel en appuyant sur le bouton 'sneak' pour le remplir -tooltip.BloodMagic.slate.desc=Pierre infusée dans un Autel de Sang -tooltip.BloodMagic.inscriber.desc=L'écriture est sur le mur... - -tooltip.BloodMagic.pack.selfSacrifice.desc=Ce sac à dos me frictionne vraiment... -tooltip.BloodMagic.pack.sacrifice.desc=Description -tooltip.BloodMagic.pack.stored=Stored: %d LP - -tooltip.BloodMagic.activationCrystal.weak=Actionne les rituels d'un Bas Niveau -tooltip.BloodMagic.activationCrystal.awakened=Actionne des rituels plus puissants -tooltip.BloodMagic.activationCrystal.creative=Creative Seulement - Actionne tout les rituels - -tooltip.BloodMagic.diviner.currentRitual=Rituel Courant: -tooltip.BloodMagic.diviner.blankRune=Runes Vierge: %d -tooltip.BloodMagic.diviner.waterRune=Runes d'Eau: %d -tooltip.BloodMagic.diviner.airRune=Runes d'Air: %d -tooltip.BloodMagic.diviner.fireRune=Runes de Feu: %d -tooltip.BloodMagic.diviner.earthRune=Runes de Terre: %d -tooltip.BloodMagic.diviner.duskRune=Runes de Cépuscule: %d -tooltip.BloodMagic.diviner.dawnRune=Runes d'Aube: %d -tooltip.BloodMagic.diviner.totalRune=Runes Totales: %d -tooltip.BloodMagic.diviner.extraInfo=Appuyer sur shift pour encore plus d'info -tooltip.BloodMagic.diviner.currentDirection=Directon Courante: %s - -tooltip.BloodMagic.ritualReader.currentState=Mode Courant: %s -tooltip.BloodMagic.ritualReader.set_area=Endroit Déterminé -tooltip.BloodMagic.ritualReader.information=Information -tooltip.BloodMagic.ritualReader.set_will_types=Choisir la volonté consommée -tooltip.BloodMagic.ritualReader.desc.set_area=Clic-droit sur une Pierre Rituelle Maîtresse pour cycler l'endroit de la rituelle que vous vouleiz modifier. Ensuite, cliquez les deux coins du nouveaux endroit que vous vouliez. -tooltip.BloodMagic.ritualReader.desc.information=Clic-droit sur une Pierre Rituelle Maîtresse pour receuillir des informations basics sur le rituel. -tooltip.BloodMagic.ritualReader.desc.set_will_types=Donnez les types de volonté diabolique que le rituel va consommer de l'aura par un Clic-Droit sur la PRM avec le même type de crystal dans votre bar chaude. - -tooltip.BloodMagic.arcaneAshes=Cendres sont utilisées pour dessiner un cercle d'alchimie - -tooltip.BloodMagic.telepositionFocus.coords=Coodornées courantes: (%d, %d, %d) -tooltip.BloodMagic.telepositionFocus.dimension=Dimension ID: %d -tooltip.BloodMagic.telepositionFocus.weak=Utilisé pour déplacer les blocs dans le monde -tooltip.BloodMagic.telepositionFocus.enhanced=Utilisé pour déplacer les blocs dans le monde -tooltip.BloodMagic.telepositionFocus.reinforced=Utilisé pour déplacer les blocs dans le monde -tooltip.BloodMagic.telepositionFocus.demonic=Utilisé pour déplacer les blocs dans le monde - -tooltip.BloodMagic.livingArmour.upgrade.speed=Pieds Rapides -tooltip.BloodMagic.livingArmour.upgrade.digging=Puissance des Nains -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Résistance au Poison -tooltip.BloodMagic.livingArmour.upgrade.fireResist=Cadeau d'Ignis -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Paumes Dures -tooltip.BloodMagic.livingArmour.upgrade.knockback=Culturiste -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=Peau Dure -tooltip.BloodMagic.livingArmour.upgrade.health=Sain -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=Coup Féroce -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=Tir Acrobatique -tooltip.BloodMagic.livingArmour.upgrade.stepAssist=Marche Assistée -tooltip.BloodMagic.livingArmour.upgrade.grimReaper=Sprint de la Faucheuse -tooltip.BloodMagic.livingArmour.upgrade.solarPowered=Solar Powered -tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=Runic Shielding -tooltip.BloodMagic.livingArmour.upgrade.revealing=Revealing -tooltip.BloodMagic.livingArmour.upgrade.experienced=Experienced -tooltip.BloodMagic.livingArmour.upgrade.jump=Strong Legs -tooltip.BloodMagic.livingArmour.upgrade.fallProtect=Soft Fall -tooltip.BloodMagic.livingArmour.upgrade.graveDigger=Grave Digger -tooltip.BloodMagic.livingArmour.upgrade.sprintAttack=Charging Strike -tooltip.BloodMagic.livingArmour.upgrade.criticalStrike=True Strike -tooltip.BloodMagic.livingArmour.upgrade.elytra=Elytra -tooltip.BloodMagic.livingArmour.upgrade.slowness=Limp Leg -tooltip.BloodMagic.livingArmour.upgrade.crippledArm=Crippled Arm -tooltip.BloodMagic.livingArmour.upgrade.level=%s (Level %d) -tooltip.BloodMagic.livingArmour.upgrade.points=&6Upgrade points: %s / %s - -tooltip.BloodMagic.will=Will Quality: %1$,.2f -tooltip.BloodMagic.sentientSword.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.sentientAxe.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.sentientPickaxe.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.sentientShovel.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.soulGem.petty=A gem used to contain a little will -tooltip.BloodMagic.soulGem.lesser=A gem used to contain some will -tooltip.BloodMagic.soulGem.common=A gem used to contain more will -tooltip.BloodMagic.soulGem.greater=A gem used to contain a greater amount of will -tooltip.BloodMagic.soulGem.grand=A gem used to contain a large amount of will -tooltip.BloodMagic.soulSnare.desc=Throw at a monster and then kill them to obtain their demonic will - -tooltip.BloodMagic.itemFilter.exact=S'assure que les objets se ressemblent exactement -tooltip.BloodMagic.itemFilter.ignoreNBT=Ignore le NBT du filtre -tooltip.BloodMagic.itemFilter.modItems=Assortis les objets du même mod -tooltip.BloodMagic.itemFilter.oreDict=Used to filter through the Ore Dictionary - -tooltip.BloodMagic.fluid.type=Fluid Contained -tooltip.BloodMagic.fluid.amount=Amount -tooltip.BloodMagic.fluid.capacity=Capacity - -tooltip.BloodMagic.ghost.everything=Everything -tooltip.BloodMagic.ghost.amount=Ghost item amount: %d - -tooltip.BloodMagic.currentType.default=Contient: Volonté Crue -tooltip.BloodMagic.currentType.corrosive=Contient: Volonté Corrosive -tooltip.BloodMagic.currentType.destructive=Contient: Volonté Destructive -tooltip.BloodMagic.currentType.vengeful=Contient: Volonté Vengeresse -tooltip.BloodMagic.currentType.steadfast=Contient: Volonté Inébranlable - -tooltip.BloodMagic.experienceTome=A book used to store experience -tooltip.BloodMagic.experienceTome.exp=Exp: %0.3f -tooltip.BloodMagic.experienceTome.expLevel=Level: %d - -tooltip.BloodMagic.decoration.safe=Safe for decoration -tooltip.BloodMagic.decoration.notSafe=Dangerous for decoration - -tooltip.BloodMagic.cuttingFluidRatio=%d/%d uses remaining - -tooltip.BloodMagic.book.shifting=These symbols seem to be... &oshifting... - -# Ritual -ritual.BloodMagic.blockRange.tooBig=The block range given is too big! Needs to be at most %s blocks. -ritual.BloodMagic.blockRange.tooFar=The block range given is too far! Needs to be within a vertical range of %s blocks and a horizontal range of %s blocks. -ritual.BloodMagic.blockRange.inactive=The ritual stone is currently inactive, and cannot have its range modified. -ritual.BloodMagic.blockRange.noRange=The range was not properly chosen. -ritual.BloodMagic.blockRange.firstBlock=First block for new range stored. -ritual.BloodMagic.blockRange.success=New range successfully set! - -ritual.BloodMagic.testRitual=Test Ritual -ritual.BloodMagic.waterRitual=Ritual of the Full Spring -ritual.BloodMagic.lavaRitual=Serenade of the Nether -ritual.BloodMagic.greenGroveRitual=Ritual of the Green Grove -ritual.BloodMagic.jumpRitual=Ritual of the High Jump -ritual.BloodMagic.wellOfSufferingRitual=Well of Suffering -ritual.BloodMagic.featheredKnifeRitual=Ritual of the Feathered Knife -ritual.BloodMagic.regenerationRitual=Ritual of Regeneration -ritual.BloodMagic.harvestRitual=Reap of the Harvest Moon -ritual.BloodMagic.magneticRitual=Ritual of Magnetism -ritual.BloodMagic.crushingRitual=Ritual of the Crusher -ritual.BloodMagic.fullStomachRitual=Ritual of the Satiated Stomach -ritual.BloodMagic.interdictionRitual=Ritual of Interdiction -ritual.BloodMagic.containmentRitual=Ritual of Containment -ritual.BloodMagic.speedRitual=Ritual of Speed -ritual.BloodMagic.suppressionRitual=Ritual of Suppression -ritual.BloodMagic.expulsionRitual=Aura of Expulsion -ritual.BloodMagic.zephyrRitual=Call of the Zephyr -ritual.BloodMagic.upgradeRemoveRitual=Sound of the Cleansing Soul -ritual.BloodMagic.armourEvolveRitual=Ritual of Living Evolution -ritual.BloodMagic.animalGrowthRitual=Ritual of the Shepherd -ritual.BloodMagic.forsakenSoulRitual=Gathering of the Forsaken Souls -ritual.BloodMagic.crystalHarvestRitual=Crack of the Fractured Crystal - -ritual.BloodMagic.cobblestoneRitual=Le Vulcanos Frigius -ritual.BloodMagic.placerRitual=Laying of the Filler -ritual.BloodMagic.fellingRitual=Crash of the Timberman -ritual.BloodMagic.pumpRitual=Hymn of Siphoning -ritual.BloodMagic.altarBuilderRitual=The Assembly of the High Altar -ritual.BloodMagic.portalRitual=The Gate of the Fold - - -ritual.BloodMagic.waterRitual.info=Generates a source of water from the master ritual stone. -ritual.BloodMagic.lavaRitual.info=Generates a source of lava from the master ritual stone. -ritual.BloodMagic.greenGroveRitual.info=Grows crops within its area. -ritual.BloodMagic.jumpRitual.info=Causes entities to leap up into the air. -ritual.BloodMagic.wellOfSufferingRitual.info=Attacks mobs within its damage zone and puts the LP into a nearby blood altar. -ritual.BloodMagic.featheredKnifeRitual.info=Drains health from players in its area and puts the LP into a nearby blood altar. -ritual.BloodMagic.regenerationRitual.info=Casts regeneration on entities within its range if they are missing health. -ritual.BloodMagic.harvestRitual.info=Harvests plants within its range, dropping the results on the ground. -ritual.BloodMagic.magneticRitual.info=Pulls up ores from the ground and puts them into its placement range. -ritual.BloodMagic.crushingRitual.info=Breaks blocks within its crushing range and places the items into the linked chest. -ritual.BloodMagic.fullStomachRitual.info=Takes food from the linked chest and fills the player's saturation with it. -ritual.BloodMagic.interdictionRitual.info=Pushes all mobs within its area away from the master ritual stone. -ritual.BloodMagic.containmentRitual.info=Pulls all mobs within its area towards the master ritual stone. -ritual.BloodMagic.speedRitual.info=Launches players within its range in the direction of the ritual. -ritual.BloodMagic.suppressionRitual.info=Suppresses fluids within its range - deactivating the ritual returns the fluids back to the world. -ritual.BloodMagic.expulsionRitual.info=Expels players from its range that are neither the owner nor have a bound blood orb in the chest on top of the master ritual stone. -ritual.BloodMagic.zephyrRitual.info=Picks up items within its range and places them into the linked chest. -ritual.BloodMagic.upgradeRemoveRitual.info=Undocumented. -ritual.BloodMagic.armourEvolveRitual.info=Undocumented. -ritual.BloodMagic.animalGrowthRitual.info=Increases the maturity rate of baby animals within its range. -ritual.BloodMagic.forsakenSoulRitual.info=Damages mobs within its damage range and when the mob dies a demon crystal within its crystal range will be grown. -ritual.BloodMagic.crystalHarvestRitual.info=Breaks Demon Will crystal clusters within its range, dropping the results on top of the crystals. - -ritual.BloodMagic.placerRitual.info=Grabs blocks that are inside of the connected inventory and places them into the world. -ritual.BloodMagic.fellingRitual.info=A standard tree-cutting machine, this ritual will cut down all trees and leaves within its area and collect the drops. -ritual.BloodMagic.pumpRitual.info=Looks around the world and grabs fluids from the defined area. Will only remove and put the fluid into the connected tank if the tank has at least a bucket's worth of the same fluid. -ritual.BloodMagic.altarBuilderRitual.info=Builds an altar out of the components inside of the connected inventory. -ritual.BloodMagic.portalRitual.info=Creates a portal network based on the activator and the immediately surrounding blocks. Blocks can be changed after activation without changing the network of portals, and portals with the same "key" will link together. - -ritual.BloodMagic.waterRitual.waterRange.info=(Water) The area that the ritual will place water source blocks. -ritual.BloodMagic.lavaRitual.lavaRange.info=(Lava) The area that the ritual will place lava source blocks. -ritual.BloodMagic.greenGroveRitual.growing.info=(Growth) The area that the ritual will grow plants in. -ritual.BloodMagic.jumpRitual.jumpRange.info=(Jumping) Entities in this range will be launched in the air. -ritual.BloodMagic.wellOfSufferingRitual.altar.info=(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region. -ritual.BloodMagic.wellOfSufferingRitual.damage.info=(Damage) This defines where the ritual will damage a mob. All mobs inside of this range (except for players) will receive damage over time. -ritual.BloodMagic.featheredKnifeRitual.altar.info=(Altar) This range defines the area that the ritual searches for the blood altar. Changing this will either expand or limit the range to a certain region. -ritual.BloodMagic.featheredKnifeRitual.damage.info=(Damage) This defines where the ritual will damage a player. Players inside of this range will receive damage over time up to the specified limit. -ritual.BloodMagic.regenerationRitual.heal.info=(Healing) Mobs within this range will receive a regeneration buff. -ritual.BloodMagic.harvestRitual.harvestRange.info=(Harvesting) Plants within this range will be harvested. -ritual.BloodMagic.magneticRitual.placementRange.info=(Placement) The range that the ritual will place the grabbed ores into. -ritual.BloodMagic.crushingRitual.crushingRange.info=(Crushing) The blocks that the ritual will break. -ritual.BloodMagic.crushingRitual.chest.info=(Chest) The location of the inventory that the ritual will place the broken blocks into. -ritual.BloodMagic.fullStomachRitual.fillRange.info=(Feeding) The range that the ritual will look at to feed players. -ritual.BloodMagic.fullStomachRitual.chest.info=(Chest) The location of the inventory that the ritual will grab food from to feed players in range. -ritual.BloodMagic.interdictionRitual.interdictionRange.info=(Push) The area of the ritual where mobs will be pushed. All mobs are pushed away from the master ritual stone, regardless of where this area is. -ritual.BloodMagic.containmentRitual.containmentRange.info=(Containment) The area of the ritual where mobs will be pulled. All mobs are pulled towards the master ritual stone, regardless of where this area is. -ritual.BloodMagic.speedRitual.sanicRange.info=(Speed) All entities within this area are launched in the direction of the arrow formed by the ritual. -ritual.BloodMagic.suppressionRitual.suppressionRange.info=(Suppress) All liquids within the range are suppressed. -ritual.BloodMagic.expulsionRitual.expulsionRange.info=(Expulsion) -ritual.BloodMagic.zephyrRitual.zephyrRange.info=(Suction) Items within this range will be sucked into the linked chest. -ritual.BloodMagic.zephyrRitual.chest.info=(Chest) The location of the inventory that the ritual will place the picked up items into. -ritual.BloodMagic.animalGrowthRitual.growing.info=(Growth) Animals within this range will grow much faster. -ritual.BloodMagic.forsakenSoulRitual.crystal.info=(Crystal) Demon Crystals in this range receive an increase in growth speed when a mob is killed by the ritual. -ritual.BloodMagic.forsakenSoulRitual.damage.info=(Damage) Mobs within this range will be slowly damaged, and when killed will grow the crystals. -ritual.BloodMagic.crystalHarvestRitual.crystal.info=(Crystal) All Demon Will crystal clusters have a single crystal broken off, spawning the crystal into the world. If there is only one crystal on the cluster, it will not break it. - -ritual.BloodMagic.placerRitual.placerRange.info=(Placement) The range that the ritual will place its blocks in. -ritual.BloodMagic.placerRitual.chest.info=(Chest) The location of the inventory that the ritual will grab blocks from to place in the world. -ritual.BloodMagic.fellingRitual.fellingRange.info=(Cutting) The range that the ritual will search out logs and leaves in order to cut down. -ritual.BloodMagic.fellingRitual.chest.info=(Chest) The location of the inventory that the ritual will place the results into. -ritual.BloodMagic.pumpRitual.pumpRange.info=(Pump) The region that the ritual will look for fluids to grab from the world. - -# Chat -chat.BloodMagic.altarMaker.setTier=Set Tier to: %d -chat.BloodMagic.altarMaker.building=Building a Tier %d Altar -chat.BloodMagic.altarMaker.destroy=Destroyed a Tier %d Altar -chat.BloodMagic.altarMaker.creativeOnly=This is a creative only item. - -chat.BloodMagic.damageSource=%s's soul became too weak - -chat.BloodMagic.ritual.weak=You feel a push, but are too weak to perform this ritual. -chat.BloodMagic.ritual.prevent=The ritual is actively resisting you! -chat.BloodMagic.ritual.activate=A rush of energy flows through the ritual! -chat.BloodMagic.ritual.notValid=You feel that these runes are not configured correctly... - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=You are starting to feel better already! -chat.BloodMagic.livingArmour.upgrade.fireRemove=&6A cool feeling envelopes you as the burning subsides. -chat.BloodMagic.livingArmour.upgrade.grimReaper=&6A shadowy force pulls you from the brink of death! -chat.BloodMagic.livingArmour.newUpgrade=&4Upgrade acquired! - -chat.BloodMagic.routing.remove=Removing contained location -chat.BloodMagic.routing.set=Setting node location -chat.BloodMagic.routing.link.master=Linked node to master! -chat.BloodMagic.routing.link=Linked nodes together - -chat.BloodMagic.altar.comp.glowstone=a block of glowstone -chat.BloodMagic.altar.comp.bloodstone=a large bloodstone brick -chat.BloodMagic.altar.comp.beacon=a beacon -chat.BloodMagic.altar.comp.bloodrune=a blood rune -chat.BloodMagic.altar.comp.crystal=an unimplemented item -chat.BloodMagic.altar.comp.notair=a solid block - -chat.BloodMagic.altar.nextTier=The next tier of blood altar is missing %s at %s. - -# sekrit - -secret.BloodMagic.bread.bloody=&r&cBloody Bread -secret.BloodMagic.bread.bloody.desc=Only for &odire &r&7emergencies. - -# Commands -commands.error.arg.invalid=Invalid arguments -commands.error.arg.missing=Not enough arguments -commands.error.arg.player.missing=You must specify which player you wish to perform this action on. -commands.error.404=Command not found! -commands.error.unknown=Unknown command! -commands.error.perm=You do not have permission to use this command. - -commands.success=Executed successfully - -commands.format.help=%s - %s -commands.format.error=%s - %s - -commands.help.usage=/bloodmagic help -commands.help.help=Displays the help information for the "/bloodmagic" command. - -commands.network.usage=/bloodmagic network [syphon|add|get|fill|cap] player [amount] -commands.network.help=LP network utilities -commands.network.syphon.help=Removes the given amount of LP from the given player's LP network. -commands.network.syphon.success=Successfully syphoned %d LP from %s. -commands.network.add.help=Adds the given amount of LP to the given player's LP network. Follows standard LP gain rules. -commands.network.add.success=Successfully added %d LP to %s's LP network. -commands.network.set.help=Sets the given player's LP to the given amount. -commands.network.set.success=Successfully set %s's LP network to %d LP. -commands.network.get.help=Returns the amount of LP in the given player's LP network. -commands.network.fill.help=Fills the given player's LP network to %d. -commands.network.fill.success=Successfully filled %s's LP network. -commands.network.cap.help=Fills the given player's LP network to the max that their highest Blood Orb can store. -commands.network.cap.success=Successfully capped off %s's LP network. - -commands.bind.usage=/bloodmagic bind [true|false] [player] -commands.bind.help=Attempts to (un)bind the currently held item. -commands.bind.success=Binding successful -commands.bind.remove.success=Unbinding successful - -commands.orb.usage=/bloodmagic orb [set|get] player [tier] -commands.orb.help=Used to set or get the Player's max Blood Orb tier. - -commands.bind.usage=/bind -commands.bind.success=Item successfully bound! -commands.bind.failed.noPlayer=There is no player specified -commands.bind.failed.alreadyBound=Item is already bound; use /unbind to unbind it -commands.bind.failed.notBindable=Item cannot be bound -commands.unbind.usage=/unbind -commands.unbind.success=Item successfully unbound! -commands.unbind.failed.notBindable=Item cannot be unbound -commands.soulnetwork.usage=/soulnetwork [amount] -commands.soulnetwork.add.success=Successfully added %dLP to %s's Soul Network! -commands.soulnetwork.subtract.success=Successfully subtracted %dLP from %s's Soul Network! -commands.soulnetwork.fill.success=Successfully filled %s's Soul Network! -commands.soulnetwork.empty.success=Successfully emptied %s's Soul Network! -commands.soulnetwork.get.success=There is %dLP in %s's Soul Network! -commands.soulnetwork.noPlayer=There is no player specified -commands.soulnetwork.noCommand=There is no command specified -commands.soulnetwork.notACommand=That is not a valid command -commands.soulnetwork.fillMax.success=Successfully filled %s's Soul Network to their orb max! -commands.soulnetwork.create.success=Successfully created %s's Soul Network (Orb tier: %d) - -# Keybinds -BloodMagic.keybind.openSigilHolding=Open Sigil of Holding - -# JustEnoughItems -jei.BloodMagic.recipe.altar=Blood Altar -jei.BloodMagic.recipe.binding=Alchemy Array (Binding) -jei.BloodMagic.recipe.alchemyArrayCrafting=Alchemy Array -jei.BloodMagic.recipe.soulForge=Hellfire Forge -jei.BloodMagic.recipe.alchemyTable=Alchemy Table -jei.BloodMagic.recipe.requiredLP=LP: %d -jei.BloodMagic.recipe.requiredTier=Tier: %d -jei.BloodMagic.recipe.consumptionRate=Consumption: %d LP/t -jei.BloodMagic.recipe.drainRate=Drain: %d LP/t -jei.BloodMagic.recipe.minimumSouls=Minimum: %1$,.2f Will -jei.BloodMagic.recipe.soulsDrained=Drained: %1$,.2f Will -jei.BloodMagic.recipe.lpDrained=Drained: %,d LP -jei.BloodMagic.recipe.ticksRequired=Time: %,d Ticks - -jei.BloodMagic.desc.altarBuilder=A creative-only item for use in debugging and testing.\n\nShift + Right click to change the tier to build. Right click an Altar to initiate the build.\n\nBreak an Altar while holding to dismantle it. -jei.BloodMagic.desc.demonicWill=An imprint of a demonic entity attached to a creature.\n\nCan be obtained by killing a mob with a sentient weapon or by throwing a snare at a mob and killing it while it has white particles. - -# WAILA -waila.BloodMagic.sneak=&oSneak for Information -waila.BloodMagic.array.reagent=Reagent: %s -waila.BloodMagic.array.catalyst=Catalyst: %s -option.BloodMagic.bypassSneak=Bypass Sneak -option.BloodMagic.bloodAltar=Blood Altar -option.BloodMagic.ritualController=Ritual Stones -option.BloodMagic.teleposer=Teleposer -option.BloodMagic.array=Alchemy Array - -# Thaumcraft -tc.research_category.BLOODMAGIC=Sanguine Arcana - -# Thaumcraft Research -bloodmagic.research_name.BLOODMAGIC=Blood Magic -bloodmagic.research_text.BLOODMAGIC=Sanguine Arcana -bloodmagic.research_page.BLOODMAGIC.1=The realm of the Blood Magics has always appeared to be a more solitary and "individual" art with blood mages being notoriously reclusive and a bit insane at times. However, the powers of self-sacrifice and life essence have uses even beyond a normal blood mage's sight, in fact, it is quite apparent that it may have some uses in thaumaturgy after all! diff --git a/src/main/resources/assets/bloodmagic/lang/it_IT.lang b/src/main/resources/assets/bloodmagic/lang/it_IT.lang deleted file mode 100644 index 265b4275..00000000 --- a/src/main/resources/assets/bloodmagic/lang/it_IT.lang +++ /dev/null @@ -1,181 +0,0 @@ -#Block Localization -tile.bloodAltar.name=Altare del Sangue -tile.bloodRune.blank.name=Runa del Sangue -tile.bloodRune.fill.name=Runa di Capacità Aumentata -tile.bloodRune.empty.name=Runa di Dislocazione -tile.bloodRune.test.name=Runa del Globo -tile.speedRune.name=Runa di Velocità -tile.efficiencyRune.name=Runa di Efficienza -tile.runeOfSacrifice.name=Runa del Sacrificio -tile.runeOfSelfSacrifice.name=Runa di Auto-Sacrificio -tile.ritualStone.name=Pietra del Rituale -tile.blockMasterStone.name=Pietra Maestra del Rituale -tile.bloodSocket.name=Cavità Piena -tile.imperfectRitualStone.name=Pietra del Rituale Imperfetta -tile.armourForge.name=Forgia delle Armature dell'Anima -tile.emptySocket.name=Cavità Vuota -tile.bloodStoneBrick.name=Mattone di Pietra del Sangue -tile.largeBloodStoneBrick.name=Gran Mattone di Pietra del Sangue -tile.blockWritingTable.name=Set da Alchimista -tile.blockHomHeart.name=Tavolo della Magia -tile.bloodPedestal.name=Piedistallo Arcano -tile.bloodPlinth.name=Basamento Arcano -tile.bloodTeleposer.name=Teleposer -tile.blockConduit.name=Condotto di Magia -tile.blockSpellParadigm.projectile.name=Generatore di Particelle -tile.blockSpellParadigm.self.name=Auto-Miglioratore -tile.blockSpellParadigm.melee.name=Aggregatore di Mischia -tile.blockSpellEnhancement.power1.name=Potenziatore Instabile di Magia -tile.blockSpellEnhancement.power2.name=Potenziatore Standard di Magia -tile.blockSpellEnhancement.power3.name=Potenziatore Rinforzato di Magia -tile.blockSpellEnhancement.power4.name=Potenziatore Invaso di Magia -tile.blockSpellEnhancement.power5.name=Potenziatore Demoniaco di Magia -tile.blockSpellEnhancement.cost1.name=Smorzatore Instabile di Magia -tile.blockSpellEnhancement.cost2.name=Smorzatore Standard di Magia -tile.blockSpellEnhancement.cost3.name=Smorzatore Rinforzato di Magia -tile.blockSpellEnhancement.cost4.name=Smorzatore Invaso di Magia -tile.blockSpellEnhancement.cost5.name=Smorzatore Demoniaco di Magia -tile.blockSpellEnhancement.potency1.name=Miglioratore Instabile di Magia -tile.blockSpellEnhancement.potency2.name=Miglioratore Standard di Magia -tile.blockSpellEnhancement.potency3.name=Miglioratore Rinforzato di Magia -tile.blockSpellEnhancement.potency4.name=Miglioratore Invaso di Magia -tile.blockSpellEnhancement.potency5.name=Miglioratore Demoniaco di Magia -tile.blockSpellModifier.default.name=Modificatore di Magia -tile.blockSpellModifier.offensive.name=Modificatore di Magia Offensiva -tile.blockSpellModifier.defensive.name=Modificatore di Magia Difensiva -tile.blockSpellModifier.environmental.name=Modificatore di Magia Ambientale -tile.blockSpellEffect.fire.name=Crogiolo del Fuoco -tile.blockSpellEffect.ice.name=Creatore di Ghiaccio -tile.blockSpellEffect.wind.name=Generatore del Vento -tile.blockSpellEffect.earth.name=Formatore della Terra - -#Item Localization -item.weakBloodOrb.name=Globo di Sangue Debole -item.apprenticeBloodOrb.name=Globo di Sangue dell'Apprendista -item.magicianBloodOrb.name=Globo di Sangue del Mago -item.masterBloodOrb.name=Globo di Sangue del Maestro -item.archmageBloodOrb.name=Globo di Sangue dell'Arcimago -item.energyBlast.name=Blaster Energetico -item.energySword.name=Lama Legata -item.lavaCrystal.name=Cristallo Lavico -item.waterSigil.name=Sigillo dell'Acqua -item.lavaSigil.name=Sigillo di Lava -item.voidSigil.name=Sigillo del Vuoto -item.blankSlate.name=Ardesia Bianca -item.reinforcedSlate.name=Ardesia Rinforzata -item.sacrificialDagger.name=Pugnale Sacrificale -item.daggerOfSacrifice.name=Daga Sacrificale -item.airSigil.name=Sigillo dell'Aria -item.sigilOfTheFastMiner.name=Sigillo del Rapido Minatore -item.sigilOfElementalAffinity.name=Sigillo di Affinità Elementale -item.sigilOfHaste.name=Sigillo di Rapidità -item.sigilOfHolding.name=Sigillo della Tenacia Egoista -item.divinationSigil.name=Sigillo di Divinatione -item.waterScribeTool.name=Utensile d'Iscrizione Elementale: Acqua -item.fireScribeTool.name=Utensile d'Iscrizione Elementale: Fuoco -item.earthScribeTool.name=Utensile d'Iscrizione Elementale: Terra -item.airScribeTool.name=Utensile d'Iscrizione Elementale: Aria -item.duskScribeTool.name=Utensile d'Iscrizione Elementale: Crepuscolo -item.activationCrystalWeak.name=Cristallo d'Attivazione Debole -item.activationCrystalAwakened.name=Cristallo d'Attivazione Risvegliato -item.boundPickaxe.name=Piccone Vincolato -item.boundAxe.name=Ascia Vincolata -item.boundShovel.name=Vanga Vincolata -item.boundHelmet.name=Elmo Vincolato -item.boundPlate.name=Piastra Vincolata -item.boundLeggings.name=Gambali Vincolati -item.boundBoots.name=Stivali Vincolati -item.weakBloodShard.name=Scheggia di Sangue Debole -item.growthSigil.name=Sigillo del Verde Bosco -item.blankSpell.name=Cristallo non Vincolato -item.alchemyFlask.name=Boccetta per Pozione -item.standardBindingAgent.name=Agente Vincolante Standard -item.mundanePowerCatalyst.name=Catalizzatore Comune di Potere -item.averagePowerCatalyst.name=Catalizzatore Medio di Potere -item.greaterPowerCatalyst.name=Catalizzatore Maggiore di Potere -item.mundaneLengtheningCatalyst.name=Catalizzatore Procastinante Comune -item.averageLengtheningCatalyst.name=Catalizzatore Procastinante Medio -item.greaterLengtheningCatalyst.name=Catalizzatore Procastinante Maggiore -item.incendium.name=Incendium -item.magicales.name=Magicales -item.sanctus.name=Sanctus -item.aether.name=Etere -item.simpleCatalyst.name=Catalizzatore Semplice -item.crepitous.name=Crepitous -item.crystallos.name=Crystallos -item.terrae.name=Terrae -item.aquasalus.name=Aquasalus -item.tennebrae.name=Tenebrae -item.demonBloodShard.name=Scheggia di Sangue di Demone -item.sigilOfWind.name=Sigillo del Vortice -item.telepositionFocus.name=Focus di Teleposizione -item.enhancedTelepositionFocus.name=Focus Migliorato di Teleposizione -item.reinforcedTelepositionFocus.name=Focus Rinforzato di Teleposizione -item.demonicTelepositionFocus.name=Focus Demoniaco di Teleposizione -item.imbuedSlate.name=Piastra Invasa -item.demonicSlate.name=Piastra Demoniaca -item.sigilOfTheBridge.name=Sigillo del POnte Spettrale -item.armourInhibitor.name=Inibitore di Armatura -item.cheatyItem.name=Globo di Prova -item.weakFillingAgent.name=Agente Riempiente Debole -item.standardFillingAgent.name=Agente Riempiente Standard -item.enhancedFillingAgent.name=Agente Riempiente Potenziato -item.weakBindingAgent.name=Agente Vincolante Debole -item.ritualDiviner.name=Divinatore del Rituale -item.sigilOfMagnetism.name=Sigillo del Magnetismo -item.itemDiabloKey.name=Chiave del Vincolo -item.energyBazooka.name=Cannone Energetico -item.bloodLightSigil.name=Sigillo della Torcia di Sangue -item.itemComplexSpellCrystal.name=Cristallo Magico Complesso -item.itemSigilOfSupression.name=Sigillo di Soppressione -item.itemSigilOfEnderSeverance.name=Sigillo di Disgiunzione Ender -item.bucketLive.name=Secchio di Vita -item.bloodMagicBaseItem.QuartzRod.name=Verga di Quarzo -item.bloodMagicBaseItem.EmptyCore.name=Nucleo Vuoto -item.bloodMagicBaseItem.MagicalesCable.name=Connessione Magicales -item.bloodMagicBaseItem.WoodBrace.name=Pilastro di Legno -item.bloodMagicBaseItem.StoneBrace.name=Pilastro di Pietra -item.bloodMagicBaseItem.ProjectileCore.name=Nucleo Proiettile -item.bloodMagicBaseItem.SelfCore.name=Auto-Nucleo -item.bloodMagicBaseItem.MeleeCore.name=Nucleo di Mischia -item.bloodMagicBaseItem.ParadigmBackPlate.name=Piastra Modello -item.bloodMagicBaseItem.OutputCable.name=Connessione in Uscita di Magia -item.bloodMagicBaseItem.InputCable.name=Connessione in Entrata di Magia -item.bloodMagicBaseItem.FlameCore.name=Nucleo Infuocato -item.bloodMagicBaseItem.IcyCore.name=Nucleo Ghiacciato -item.bloodMagicBaseItem.GustCore.name=Nucleo Ventoso -item.bloodMagicBaseItem.EarthenCore.name=Nucleo Terroso -item.bloodMagicBaseItem.CrackedRunicPlate.name=Piastra Runica Incrinata -item.bloodMagicBaseItem.RunicPlate.name=Piastra Runica -item.bloodMagicBaseItem.ScribedRunicPlate.name=Piastra Runica Invasa -item.bloodMagicBaseItem.DefaultCore.name=Nucleo Disarmonico -item.bloodMagicBaseItem.OffensiveCore.name=Nucleo Offensivo -item.bloodMagicBaseItem.DefensiveCore.name=Nucleo Difensivo -item.bloodMagicBaseItem.EnvironmentalCore.name=Nucleo Ambientale -item.bloodMagicBaseItem.PowerCore.name=Nucleo di Forza -item.bloodMagicBaseItem.CostCore.name=Nucleo di Riduzione -item.bloodMagicBaseItem.PotencyCore.name=Nucleo di Potenza -item.bloodMagicBaseItem.ObsidianBrace.name=Pilastro di Ossidiana -item.bloodMagicAlchemyItem.Offensa.name=Offensa -item.bloodMagicAlchemyItem.Praesidium.name=Praesidium -item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae -item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Catalizzatore Rafforzato -item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Catalizzatore Concentrato -item.bloodMagicAlchemyItem.FracturedBone.name=Osso Fratturato -item.bloodMagicAlchemyItem.Virtus.name=Virtus -item.bloodMagicAlchemyItem.Reductus.name=Reductus -item.bloodMagicAlchemyItem.Potentia.name=Potentia -item.sanguineHelmet.name=Elmo Sanguigno -item.itemSeerSigil.name=Sigillo della Veduta -item.itemFluidSigil.name= - - -#Creative Tab -itemGroup.tabBloodMagic=Magia del Sangue - -#Extra Strings -bm.string.consume=Utilizzo -bm.string.drain=Drenaggio -bm.string.tier=Livello -bm.string.crafting.orb.shaped=Creazione di un Glodo Formato -bm.string.crafting.orb.shapeless=Creazione di un Globo Informe \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/lang/ja_JP.lang b/src/main/resources/assets/bloodmagic/lang/ja_JP.lang deleted file mode 100644 index a09ef5ed..00000000 --- a/src/main/resources/assets/bloodmagic/lang/ja_JP.lang +++ /dev/null @@ -1,846 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=Blood Magic -itemGroup.BloodMagic.creativeTabTome=Blood Magic å¼·åŒ–ã®æ›¸ - -#Items -item.BloodMagic.activationCrystal.weak.name=å¼±ã„起動クリスタル -item.BloodMagic.activationCrystal.awakened.name=覚醒ã—ãŸèµ·å‹•クリスタル -item.BloodMagic.activationCrystal.creative.name=クリエイティブ用ã®èµ·å‹•クリスタル - -item.BloodMagic.sacrificialDagger.normal.name=生贄ã®ãƒ€ã‚¬ãƒ¼ -item.BloodMagic.sacrificialDagger.creative.name=生贄ã®ãƒ€ã‚¬ãƒ¼(クリエイティブ) -item.BloodMagic.pack.selfSacrifice.name=瀉血者ã®ãƒ‘ック -item.BloodMagic.pack.sacrifice.name=武装コート -item.BloodMagic.daggerOfSacrifice.name=サクリファイスダガー - -item.BloodMagic.lavaCrystal.name=溶岩ã®ã‚¯ãƒªã‚¹ã‚¿ãƒ« - -item.BloodMagic.bound.sword.name=çµåˆã—ãŸå‰£ -item.BloodMagic.bound.pickaxe.name=çµåˆã—ãŸãƒ„ルãƒã‚· -item.BloodMagic.bound.axe.name=çµåˆã—ãŸæ–§ -item.BloodMagic.bound.shovel.name=çµåˆã—ãŸã‚·ãƒ£ãƒ™ãƒ« - -item.BloodMagic.bucket.lifeEssence.name=ライフエッセンス入りãƒã‚±ãƒ„ - -item.BloodMagic.scribe.water.name=属性筆記具:水 -item.BloodMagic.scribe.fire.name=å±žæ€§ç­†è¨˜å…·ï¼šç« -item.BloodMagic.scribe.earth.name=属性筆記具:土 -item.BloodMagic.scribe.air.name=属性筆記具:風 -item.BloodMagic.scribe.dusk.name=å±žæ€§ç­†è¨˜å…·ï¼šé»„æ˜ -item.BloodMagic.scribe.dawn.name=å±žæ€§ç­†è¨˜å…·ï¼šæš - -item.BloodMagic.focus.weak.name=テレãƒãƒ¼ãƒˆãƒ•ォーカス -item.BloodMagic.focus.enhanced.name=強化テレãƒãƒ¼ãƒˆãƒ•ォーカス -item.BloodMagic.focus.reinforced.name=増強テレãƒãƒ¼ãƒˆãƒ•ォーカス -item.BloodMagic.focus.demonic.name=悪魔テレãƒãƒ¼ãƒˆãƒ•ォーカス - -item.BloodMagic.slate.blank.name=空ã®çŸ³ç‰ˆ -item.BloodMagic.slate.reinforced.name=強化ã•れãŸçŸ³ç‰ˆ -item.BloodMagic.slate.imbued.name=染ã¿ã“ã‚“ã çŸ³ç‰ˆ -item.BloodMagic.slate.demonic.name=悪魔ã®çŸ³ç‰ˆ -item.BloodMagic.slate.ethereal.name=エーテルã®çŸ³ç‰ˆ - -item.BloodMagic.orb.weak.name=å¼±ã„ブラッドオーブ -item.BloodMagic.orb.apprentice.name=見習ã„ã®ãƒ–ラッドオーブ -item.BloodMagic.orb.magician.name=魔術師ã®ãƒ–ラッドオーブ -item.BloodMagic.orb.master.name=熟練者ã®ãƒ–ラッドオーブ -item.BloodMagic.orb.archmage.name=大魔術師ã®ãƒ–ラッドオーブ -item.BloodMagic.orb.transcendent.name=è¶…è¶Šã®ãƒ–ラッドオーブ - -item.BloodMagic.reagent.incendium.name=インセンディウム -item.BloodMagic.reagent.magicales.name=マギカリス -item.BloodMagic.reagent.sanctus.name=サンクトゥス -item.BloodMagic.reagent.aether.name=エーサー -item.BloodMagic.reagent.crepitous.name=クレピタス -item.BloodMagic.reagent.crystallos.name=クリスタロス -item.BloodMagic.reagent.terrae.name=テラエ -item.BloodMagic.reagent.aquasalus.name=アクアサルス -item.BloodMagic.reagent.tennebrae.name=テãƒãƒ–レ -item.BloodMagic.reagent.offensa.name=オフェンサ -item.BloodMagic.reagent.praesidium.name=プレジディウム -item.BloodMagic.reagent.orbisterrae.name=オービス・テラエ -item.BloodMagic.reagent.virtus.name=ヴィルトゥス -item.BloodMagic.reagent.reductus.name=レドクトゥス -item.BloodMagic.reagent.potentia.name=ãƒãƒ†ãƒ³ã‚·ã‚¢ - -item.BloodMagic.bloodShard.weak.name=å¼±ã„è¡€ã®çµæ™¶ç‰‡ -item.BloodMagic.bloodShard.demon.name=悪魔ã®è¡€ã®çµæ™¶ç‰‡ - -item.BloodMagic.baseComponent.reagentWater.name=æ°´ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentLava.name=溶岩ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentAir.name=風ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentFastMiner.name=鉱夫ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentVoid.name=虚無ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentGrowth.name=緑化ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentAffinity.name=精霊ã®åŠ è­·ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentSight.name=識別ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentBinding.name=çµåˆã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentSuppression.name=除去ã®è©¦è–¬ -item.BloodMagic.baseComponent.frameParts.name=フレームパーツ -item.BloodMagic.baseComponent.reagentBloodLight.name=è¡€ã®ãƒ©ãƒ³ãƒ—ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentMagnetism.name=ç£åŠ›ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentHaste.name=迅速ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentBridge.name=幻影橋ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentCompression.name=圧縮ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentSeverance.name=æ–­çµ¶ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentHolding.name=貯蔵ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentClaw.name=鉤爪ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentBounce.name=弾性ã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentFrost.name=寒気ã®è©¦è–¬ - -item.BloodMagic.baseComponent.reagentTeleposition.name=テレãƒãƒ¼ãƒˆã®è©¦è–¬ -item.BloodMagic.baseComponent.reagentTransposition.name=転ä½ã®è©¦è–¬ - -item.BloodMagic.baseComponent.ironSand.name=鉄ã®ç ‚ -item.BloodMagic.baseComponent.goldSand.name=金ã®ç ‚ -item.BloodMagic.baseComponent.coalSand.name=石炭ã®ç ‚ -item.BloodMagic.baseComponent.plantOil.name=æ¤ç‰©æ²¹ -item.BloodMagic.baseComponent.sulfur.name=硫黄 -item.BloodMagic.baseComponent.saltpeter.name=ç¡çŸ³ -item.BloodMagic.baseComponent.neurotoxin.name=神経毒 -item.BloodMagic.baseComponent.antiseptic.name=防è…剤 - -item.BloodMagic.cuttingFluid.basicCuttingFluid.name=基礎切削液 -item.BloodMagic.cuttingFluid.explosive.name=爆薬 - -item.BloodMagic.baseComponent.mundaneLength.name=ç°¡ç´ ãªå»¶é•·è§¦åª’ -item.BloodMagic.baseComponent.mundanePower.name=ç°¡ç´ ãªå¼·åŒ–触媒 - - -item.BloodMagic.demonCrystal.crystalDefault.name=ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶ -item.BloodMagic.demonCrystal.crystalCorrosive.name=è…é£Ÿæ€§ã‚¦ã‚£ãƒ«çµæ™¶ -item.BloodMagic.demonCrystal.crystalDestructive.name=ç ´å£Šæ€§ã‚¦ã‚£ãƒ«çµæ™¶ -item.BloodMagic.demonCrystal.crystalVengeful.name=å ±å¾©æ€§ã‚¦ã‚£ãƒ«çµæ™¶ -item.BloodMagic.demonCrystal.crystalSteadfast.name=䏿´»æ€§ã‚¦ã‚£ãƒ«çµæ™¶ - -item.BloodMagic.monsterSoul.base.name=デーモニックウィル - -item.BloodMagic.sigil.air.name=風ã®å°ç«  -item.BloodMagic.sigil.bloodLight.name=è¡€ã®ãƒ©ãƒ³ãƒ—ã®å°ç«  -item.BloodMagic.sigil.compression.name=圧縮ã®å°ç«  -item.BloodMagic.sigil.divination.name=神託ã®å°ç«  -item.BloodMagic.sigil.water.name=æ°´ã®å°ç«  -item.BloodMagic.sigil.lava.name=溶岩ã®å°ç«  -item.BloodMagic.sigil.void.name=虚無ã®å°ç«  -item.BloodMagic.sigil.greenGrove.name=緑化ã®å°ç«  -item.BloodMagic.sigil.elementalAffinity.name=精霊ã®åŠ è­·ã®å°ç«  -item.BloodMagic.sigil.haste.name=迅速ã®å°ç«  -item.BloodMagic.sigil.suppression.name=除去ã®å°ç«  -item.BloodMagic.sigil.magnetism.name=ç£åŠ›ã®å°ç«  -item.BloodMagic.sigil.fastMiner.name=鉱夫ã®å°ç«  -item.BloodMagic.sigil.seer.name=識別ã®å°ç«  -item.BloodMagic.sigil.phantomBridge.name=幻影橋ã®å°ç«  -item.BloodMagic.sigil.whirlwind.name=旋風ã®å°ç«  -item.BloodMagic.sigil.enderSeverance.name=エンダー断絶ã®å°ç«  -item.BloodMagic.sigil.holding.name=貯蔵ã®å°ç«  -item.BloodMagic.sigil.holding.display=&r%s: &o&n%s -item.BloodMagic.sigil.teleposition.name=テレãƒãƒ¼ãƒˆã®å°ç«  -item.BloodMagic.sigil.transposition.name=転ä½ã®å°ç«  -item.BloodMagic.sigil.claw.name=鉤爪ã®å°ç«  -item.BloodMagic.sigil.bounce.name=弾性ã®å°ç«  -item.BloodMagic.sigil.frost.name=å†¬ã®æ¯å¹ã®å°ç«  - -item.BloodMagic.livingArmour.helmet.name=生体ã®ãƒ˜ãƒ«ãƒ¡ãƒƒãƒˆ -item.BloodMagic.livingArmour.chest.name=生体ã®ãƒã‚§ã‚¹ãƒˆãƒ—レート -item.BloodMagic.livingArmour.legs.name=生体ã®ãƒ¬ã‚®ãƒ³ã‚¹ -item.BloodMagic.livingArmour.boots.name=生体ã®ãƒ–ーツ -item.BloodMagic.sentientArmour.helmet.name=ç†åŠ›ã®ãƒ˜ãƒ«ãƒ¡ãƒƒãƒˆ -item.BloodMagic.sentientArmour.chest.name=ç†åŠ›ã®ãƒã‚§ã‚¹ãƒˆãƒ—レート -item.BloodMagic.sentientArmour.legs.name=ç†åŠ›ã®ãƒ¬ã‚®ãƒ³ã‚¹ -item.BloodMagic.sentientArmour.boots.name=ç†åŠ›ã®ãƒ–ーツ - -item.BloodMagic.altarMaker.name=祭壇メーカー - -item.BloodMagic.ritualDivinernormal.name=å„€å¼ã®å ã„棒 -item.BloodMagic.ritualDivinerdusk.name=å„€å¼ã®å ã„棒 [黄æ˜] -item.BloodMagic.ritualDivinerdawn.name=å„€å¼ã®å ã„棒 [æš] -item.BloodMagic.ritualReader.name=å„€å¼ã®èª¿æ•´å™¨ - -item.BloodMagic.arcaneAshes.name=秘儀ã®ç° -item.BloodMagic.upgradeTome.name=ç”Ÿä½“ã‚¢ãƒ¼ãƒžãƒ¼å¼·åŒ–ã®æ›¸ -item.BloodMagic.upgradeTrainer.name=生体アーマー養æˆãƒ–レスレット - -item.BloodMagic.sentientSword.name=ç†åŠ›ã®å‰£ -item.BloodMagic.soulGem.petty.name=微細ãªã‚¿ãƒ«ã‚¿ãƒªãƒƒã‚¯ã‚¸ã‚§ãƒ  -item.BloodMagic.soulGem.lesser.name=å°ã•ãªã‚¿ãƒ«ã‚¿ãƒªãƒƒã‚¯ã‚¸ã‚§ãƒ  -item.BloodMagic.soulGem.common.name=普通ã®ã‚¿ãƒ«ã‚¿ãƒªãƒƒã‚¯ã‚¸ã‚§ãƒ  -item.BloodMagic.soulGem.greater.name=大ããªã‚¿ãƒ«ã‚¿ãƒªãƒƒã‚¯ã‚¸ã‚§ãƒ  -item.BloodMagic.soulGem.grand.name=巨大ãªã‚¿ãƒ«ã‚¿ãƒªãƒƒã‚¯ã‚¸ã‚§ãƒ  -item.BloodMagic.soulSnare.base.name=ç°¡ç´ ãªæŠ•ã’ç½  -item.BloodMagic.sentientBow.name=ç†åŠ›ã®å¼“ -item.BloodMagic.sentientArmourGem.name=ç†åŠ›ã®ã‚¢ãƒ¼ãƒžãƒ¼ã‚¸ã‚§ãƒ  -item.BloodMagic.sentientAxe.name=ç†åŠ›ã®æ–§ -item.BloodMagic.sentientPickaxe.name=ç†åŠ›ã®ãƒ„ルãƒã‚· -item.BloodMagic.sentientShovel.name=ç†åŠ›ã®ã‚·ãƒ£ãƒ™ãƒ« - -item.BloodMagic.nodeRouter.name=ノード設定器 -item.BloodMagic.itemFilter.exact.name=精密アイテムフィルタ -item.BloodMagic.itemFilter.ignoreNBT.name=NBTタグフィルタ -item.BloodMagic.itemFilter.modItems.name=MODアイテムフィルタ -item.BloodMagic.itemFilter.oreDict.name=鉱石辞書フィルタ - -item.BloodMagic.experienceTome.name=ãƒšãƒªãƒ†ã‚£ã‚¢ã®æ›¸ -item.BloodMagic.sanguineBook.name=インスペクトリス・スカンダルム - -item.BloodMagic.livingPointUpgrade.draftAngelus.name=アンジェラスã®ä¸€é£²ã¿ - -item.BloodMagic.willGauge.name=デーモンウィルオーラ計測器 -item.BloodMagic.potionFlask.name=フラスコ入りãƒãƒ¼ã‚·ãƒ§ãƒ³ - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=ライフエッセンス - -tile.BloodMagic.stone.ritual.master.name=マスター儀å¼çŸ³ -tile.BloodMagic.stone.ritual.imperfect.name=簡易儀å¼çŸ³ - -tile.BloodMagic.altar.name=è¡€ã®ç¥­å£‡ -tile.BloodMagic.alchemyArray.name=&r&f錬金術魔法陣 - -tile.BloodMagic.rune.blank.name=空ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.speed.name=速度ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.efficiency.name=効率ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.sacrifice.name=生贄ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.selfsacrifice.name=自己犠牲ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.displacement.name=転移ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.capacity.name=容é‡å¢—加ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.augcapacity.name=容é‡å€åŠ ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.orb.name=オーブã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.acceleration.name=加速ã®ãƒ«ãƒ¼ãƒ³ -tile.BloodMagic.rune.charging.name=è“„ç©ã®ãƒ«ãƒ¼ãƒ³ - - -tile.BloodMagic.ritualStone.blank.name=å„€å¼çŸ³ -tile.BloodMagic.ritualStone.water.name=æ°´ã®å„€å¼çŸ³ -tile.BloodMagic.ritualStone.fire.name=ç«ã®å„€å¼çŸ³ -tile.BloodMagic.ritualStone.earth.name=土ã®å„€å¼çŸ³ -tile.BloodMagic.ritualStone.air.name=風ã®å„€å¼çŸ³ -tile.BloodMagic.ritualStone.dusk.name=黄æ˜ã®å„€å¼çŸ³ -tile.BloodMagic.ritualStone.dawn.name=æšã®å„€å¼çŸ³ - -tile.BloodMagic.bloodstonebrick.large.name=大ããªãƒ–ラッドストーンレンガ -tile.BloodMagic.bloodstonebrick.brick.name=ブラッドストーンレンガ -tile.BloodMagic.crystal.large.name=クリスタルクラスター -tile.BloodMagic.crystal.brick.name=クリスタルクラスターレンガ -tile.BloodMagic.bloodLight.name=è¡€ã®ç¯ç« -tile.BloodMagic.spectralBlock.name=亡霊ブロック -tile.BloodMagic.phantom.name=幻影ブロック -tile.BloodMagic.incenseAltar.name=香ã®ç¥­å£‡ - -tile.BloodMagic.teleposer.name=テレãƒãƒ¼ã‚¶ãƒ¼ -tile.BloodMagic.soulForge.name=業ç«ã®ã‹ã¾ã© -tile.BloodMagic.alchemyTable.name=錬金術テーブル -tile.BloodMagic.demonCrucible.name=悪魔ã®ã‚‹ã¤ã¼ -tile.BloodMagic.demonPylon.name=悪魔ã®å¡” -tile.BloodMagic.demonCrystallizer.name=æ‚ªé­”ã®æ™¶æžè£…ç½® - -tile.BloodMagic.masterRouting.name=マスター中継ノード -tile.BloodMagic.outputRouting.name=出力中継ノード -tile.BloodMagic.inputRouting.name=入力中継ノード -tile.BloodMagic.itemRouting.name=中継ノード - -tile.BloodMagic.path.wood.name=木ã®çµŒè·¯ -tile.BloodMagic.path.woodtile.name=ã‚¿ã‚¤ãƒ«çŠ¶ã®æœ¨ã®çµŒè·¯ -tile.BloodMagic.path.stone.name=石レンガã®çµŒè·¯ -tile.BloodMagic.path.stonetile.name=タイル状ã®çŸ³ã®çµŒè·¯ -tile.BloodMagic.path.wornstone.name=摩耗ã—ãŸçŸ³ã®çµŒè·¯ -tile.BloodMagic.path.wornstonetile.name=ã‚¿ã‚¤ãƒ«çŠ¶ã®æ‘©è€—ã—ãŸçŸ³ã®çµŒè·¯ -tile.BloodMagic.path.obsidian.name=黒曜石レンガã®çµŒè·¯ -tile.BloodMagic.path.obsidiantile.name=タイル状ã®é»’曜石ã®çµŒè·¯ - -tile.BloodMagic.dimensionalPortal.name=ワープãƒãƒ¼ã‚¿ãƒ« -tile.BloodMagic.bloodTank.name=血液タンク - -tile.BloodMagic.demonCrystal.default.name=ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶æ ª -tile.BloodMagic.demonCrystal.corrosive.name=è…é£Ÿæ€§ã‚¦ã‚£ãƒ«çµæ™¶æ ª -tile.BloodMagic.demonCrystal.destructive.name=ç ´å£Šæ€§ã‚¦ã‚£ãƒ«çµæ™¶æ ª -tile.BloodMagic.demonCrystal.vengeful.name=å ±å¾©æ€§ã‚¦ã‚£ãƒ«çµæ™¶æ ª -tile.BloodMagic.demonCrystal.steadfast.name=䏿´»æ€§ã‚¦ã‚£ãƒ«çµæ™¶æ ª - -tile.BloodMagic.mimic.nohitbox.name=希薄ã§ä¸é€æ˜ŽãªãƒŸãƒŸãƒƒã‚¯ãƒ–ロック -tile.BloodMagic.mimic.solidopaque.name=ä¸é€æ˜ŽãªãƒŸãƒŸãƒƒã‚¯ãƒ–ロック -tile.BloodMagic.mimic.solidclear.name=逿˜ŽãªãƒŸãƒŸãƒƒã‚¯ãƒ–ロック -tile.BloodMagic.mimic.solidlight.name=発光ã™ã‚‹ãƒŸãƒŸãƒƒã‚¯ãƒ–ロック -tile.BloodMagic.mimic.sentient.name=ç†åŠ›ã®ãƒŸãƒŸãƒƒã‚¯ãƒ–ロック - -tile.BloodMagic.bricks1.brick1_raw.name=é•·ã„原生ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks1.brick1_corrosive.name=é•·ã„è…食性ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks1.brick1_destructive.name=é•·ã„破壊性ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks1.brick1_vengeful.name=é•·ã„報復性ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks1.brick1_steadfast.name=é•·ã„䏿´»æ€§ã®çŸ³ãƒ¬ãƒ³ã‚¬ - -tile.BloodMagic.bricks2.smallbrick_raw.name=å°ã•ãªåŽŸç”Ÿã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks2.smallbrick_corrosive.name=å°ã•ãªè…食性ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks2.smallbrick_destructive.name=å°ã•ãªç ´å£Šæ€§ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks2.smallbrick_vengeful.name=å°ã•ãªå ±å¾©æ€§ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks2.smallbrick_steadfast.name=å°ã•ãªä¸æ´»æ€§ã®çŸ³ãƒ¬ãƒ³ã‚¬ -tile.BloodMagic.bricks2.tile_raw.name=原生ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tile_corrosive.name=è…食性ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tile_destructive.name=破壊性ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tile_vengeful.name=報復性ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tile_steadfast.name=䏿´»æ€§ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tilespecial_raw.name=装飾ã•れãŸåŽŸç”Ÿã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tilespecial_corrosive.name=装飾ã•れãŸè…食性ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tilespecial_destructive.name=装飾ã•れãŸç ´å£Šæ€§ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tilespecial_vengeful.name=装飾ã•れãŸå ±å¾©æ€§ã®çŸ³ã‚¿ã‚¤ãƒ« -tile.BloodMagic.bricks2.tilespecial_steadfast.name=装飾ã•れãŸä¸æ´»æ€§ã®çŸ³ã‚¿ã‚¤ãƒ« - -tile.BloodMagic.inversionpillar.raw.name=原生ã®å転柱 -tile.BloodMagic.inversionpillar.corrosive.name=è…食性ã®å転柱 -tile.BloodMagic.inversionpillar.destructive.name=破壊性ã®å転柱 -tile.BloodMagic.inversionpillar.vengeful.name=報復性ã®å転柱 -tile.BloodMagic.inversionpillar.steadfast.name=䏿´»æ€§ã®å転柱 - -tile.BloodMagic.inversionpillarend.raw_bottom.name=原生ã®å転柱ã®å°åº§ -tile.BloodMagic.inversionpillarend.corrosive_bottom.name=è…食性ã®å転柱ã®å°åº§ -tile.BloodMagic.inversionpillarend.destructive_bottom.name=破壊性ã®å転柱ã®å°åº§ -tile.BloodMagic.inversionpillarend.vengeful_bottom.name=報復性ã®å転柱ã®å°åº§ -tile.BloodMagic.inversionpillarend.steadfast_bottom.name=䏿´»æ€§ã®å転柱ã®å°åº§ -tile.BloodMagic.inversionpillarend.raw_top.name=原生ã®åè»¢æŸ±ã®æŸ±é ­ -tile.BloodMagic.inversionpillarend.corrosive_top.name=è…食性ã®åè»¢æŸ±ã®æŸ±é ­ -tile.BloodMagic.inversionpillarend.destructive_top.name=破壊性ã®åè»¢æŸ±ã®æŸ±é ­ -tile.BloodMagic.inversionpillarend.vengeful_top.name=報復性ã®åè»¢æŸ±ã®æŸ±é ­ -tile.BloodMagic.inversionpillarend.steadfast_top.name=䏿´»æ€§ã®åè»¢æŸ±ã®æŸ±é ­ - -tile.BloodMagic.demonlight.raw.name=原生デーモンアイ -tile.BloodMagic.demonlight.corrosive.name=è…食性デーモンアイ -tile.BloodMagic.demonlight.destructive.name=破壊性デーモンアイ -tile.BloodMagic.demonlight.vengeful.name=報復性デーモンアイ -tile.BloodMagic.demonlight.steadfast.name=䏿´»æ€§ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¢ã‚¤ - -tile.BloodMagic.extras.stone_raw.name=原生ã®çŸ³ -tile.BloodMagic.extras.stone_corrosive.name=è…食性ã®çŸ³ -tile.BloodMagic.extras.stone_destructive.name=破壊性ã®çŸ³ -tile.BloodMagic.extras.stone_vengeful.name=報復性ã®çŸ³ -tile.BloodMagic.extras.stone_steadfast.name=䏿´»æ€§ã®çŸ³ - -tile.BloodMagic.extras.polished_raw.name=磨ã‹ã‚ŒãŸåŽŸç”Ÿã®çŸ³ -tile.BloodMagic.extras.polished_corrosive.name=磨ã‹ã‚ŒãŸè…食性ã®çŸ³ -tile.BloodMagic.extras.polished_destructive.name=磨ã‹ã‚ŒãŸç ´å£Šæ€§ã®çŸ³ -tile.BloodMagic.extras.polished_vengeful.name=磨ã‹ã‚ŒãŸå ±å¾©æ€§ã®çŸ³ -tile.BloodMagic.extras.polished_steadfast.name=磨ã‹ã‚ŒãŸä¸æ´»æ€§ã®çŸ³ - -tile.BloodMagic.extras.metal_raw.name=原生デーモンåˆé‡‘ -tile.BloodMagic.extras.metal_corrosive.name=報復性デーモンåˆé‡‘ -tile.BloodMagic.extras.metal_destructive.name=破壊性デーモンåˆé‡‘ -tile.BloodMagic.extras.metal_vengeful.name=報復性デーモンåˆé‡‘ -tile.BloodMagic.extras.metal_steadfast.name=䏿´»æ€§ãƒ‡ãƒ¼ãƒ¢ãƒ³åˆé‡‘ - -tile.BloodMagic.pillar1.raw.name=原生ã®çŸ³æŸ± -tile.BloodMagic.pillar1.corrosive.name=è…食性ã®çŸ³æŸ± -tile.BloodMagic.pillar1.destructive.name=破壊性ã®çŸ³æŸ± -tile.BloodMagic.pillar1.vengeful.name=報復性ã®çŸ³æŸ± -tile.BloodMagic.pillar1.steadfast.name=䏿´»æ€§ã®çŸ³æŸ± - -tile.BloodMagic.pillar2.raw.name=装飾ã•れãŸåŽŸç”Ÿã®çŸ³æŸ± -tile.BloodMagic.pillar2.corrosive.name=装飾ã•れãŸè…食性ã®çŸ³æŸ± -tile.BloodMagic.pillar2.destructive.name=装飾ã•れãŸç ´å£Šæ€§ã®çŸ³æŸ± -tile.BloodMagic.pillar2.vengeful.name=装飾ã•れãŸå ±å¾©æ€§ã®çŸ³æŸ± -tile.BloodMagic.pillar2.steadfast.name=装飾ã•れãŸä¸æ´»æ€§ã®çŸ³æŸ± - -tile.BloodMagic.pillarCap1.raw.name=原生ã®çŸ³æŸ±ã®æŸ±é ­ -tile.BloodMagic.pillarCap1.corrosive.name=è…食性ã®çŸ³æŸ±ã®æŸ±é ­ -tile.BloodMagic.pillarCap2.destructive.name=破壊性ã®çŸ³æŸ±ã®æŸ±é ­ -tile.BloodMagic.pillarCap2.vengeful.name=報復性ã®çŸ³æŸ±ã®æŸ±é ­ -tile.BloodMagic.pillarCap3.steadfast.name=䏿´»æ€§ã®çŸ³æŸ±ã®æŸ±é ­ - -tile.BloodMagic.wall1.brick_raw.name=原生ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å£ -tile.BloodMagic.wall1.brick_corrosive.name=è…食性ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å£ -tile.BloodMagic.wall1.brick_destructive.name=破壊性ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å£ -tile.BloodMagic.wall1.brick_vengeful.name=報復性ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å£ -tile.BloodMagic.wall1.brick_steadfast.name=䏿´»æ€§ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å£ -tile.BloodMagic.wall1.smallbrick_raw.name=原生ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å°ã•ãªå£ -tile.BloodMagic.wall1.smallbrick_corrosive.name=è…食性ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å°ã•ãªå£ -tile.BloodMagic.wall1.smallbrick_destructive.name=破壊性ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å°ã•ãªå£ -tile.BloodMagic.wall1.smallbrick_vengeful.name=報復性ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å°ã•ãªå£ -tile.BloodMagic.wall1.smallbrick_steadfast.name=䏿´»æ€§ã®çŸ³ãƒ¬ãƒ³ã‚¬ã®å°ã•ãªå£ -tile.BloodMagic.wall1.large_raw.name=原生ã®çŸ³ã®å£ -tile.BloodMagic.wall1.large_corrosive.name=è…食性ã®çŸ³ã®å£ -tile.BloodMagic.wall1.large_destructive.name=破壊性ã®çŸ³ã®å£ -tile.BloodMagic.wall1.large_vengeful.name=報復性ã®çŸ³ã®å£ -tile.BloodMagic.wall1.large_steadfast.name=䏿´»æ€§ã®çŸ³ã®å£ - -tile.BloodMagic.stairs1.raw.name=原生ã®çŸ³ã®éšŽæ®µ -tile.BloodMagic.stairs1.corrosive.name=è…食性ã®çŸ³ã®éšŽæ®µ -tile.BloodMagic.stairs2.destructive.name=破壊性ã®çŸ³ã®éšŽæ®µ -tile.BloodMagic.stairs2.vengeful.name=報復性ã®çŸ³ã®éšŽæ®µ -tile.BloodMagic.stairs3.steadfast.name=䏿´»æ€§ã®çŸ³ã®éšŽæ®µ - -# Fluids -fluid.lifeEssence=ライフエッセンス - -# Tooltips -tooltip.BloodMagic.extraInfo=&9-Siftキーã§è©³ç´°è¡¨ç¤º- - -tooltip.BloodMagic.orb.desc=加工å‰ã®ãƒ©ã‚¤ãƒ•ã‚¨ãƒƒã‚»ãƒ³ã‚¹ã§æº€ã¡ã¦ã„ã‚‹ -tooltip.BloodMagic.orb.owner=以下ã«ã‚ˆã‚‹è¿½åŠ è¦ç´ ï¼š %s -tooltip.BloodMagic.currentOwner=ç¾åœ¨ã®æ‰€æœ‰è€…: %s -tooltip.BloodMagic.currentTier=祭壇ã®ã‚°ãƒ¬ãƒ¼ãƒ‰ï¼š %d -tooltip.BloodMagic.config.disabled=ç¾åœ¨configã«ã‚ˆã‚Šç„¡åŠ¹åŒ–ã•れã¦ã„ã¾ã™ - -tooltip.BloodMagic.activated=アクティブ -tooltip.BloodMagic.deactivated=éžã‚¢ã‚¯ãƒ†ã‚£ãƒ– - -tooltip.BloodMagic.sigil.air.desc=&o体ãŒè»½ã感ã˜ã‚‹... -tooltip.BloodMagic.sigil.bloodLight.desc=&o明ã‹ã‚Šã ï¼ -tooltip.BloodMagic.sigil.compression.desc=&oãƒ€ã‚¤ãƒ¤ãƒ¢ãƒ³ãƒ‰ã®æ‰‹ -tooltip.BloodMagic.sigil.divination.desc=&o魂を覗ã込む -tooltip.BloodMagic.sigil.divination.otherNetwork=%sã®é­‚ã¨ç›¸äº’リンク中 -tooltip.BloodMagic.sigil.divination.currentAltarTier=祭壇ã®ã‚°ãƒ¬ãƒ¼ãƒ‰ï¼š %d -tooltip.BloodMagic.sigil.divination.currentEssence=貯蔵é‡ï¼š %d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=最大容é‡ï¼š %d LP -tooltip.BloodMagic.sigil.divination.currentTranquility=ç¾åœ¨ã®éŽ®é™åŠ¹æžœï¼š %d -tooltip.BloodMagic.sigil.divination.currentInversion=ç¾åœ¨ã®å転度: %d -tooltip.BloodMagic.sigil.divination.currentBonus=çµåˆåº¦ï¼š +%d%% -tooltip.BloodMagic.sigil.water.desc=&oç„¡é™ã®æ°´ã¯ã„ã‹ãŒï¼Ÿ -tooltip.BloodMagic.sigil.lava.desc=&o高温注æ„ï¼é£Ÿã¹ã‚‰ã‚Œã¾ã›ã‚“ -tooltip.BloodMagic.sigil.void.desc=&oクイックルワイパー(R)より良ã„ï¼ -tooltip.BloodMagic.sigil.greenGrove.desc=&o環境ã«ã‚„ã•ã—ã„ -tooltip.BloodMagic.sigil.magnetism.desc=&oç§ã¯å¼•ã付ã‘る性格ã§ã™ -tooltip.BloodMagic.sigil.suppression.desc=&o素晴らã—ã„念動力ã ... -tooltip.BloodMagic.sigil.haste.desc=&oコーヒー42æ¯é£²ã‚“ã ã‚ã¨... -tooltip.BloodMagic.sigil.fastMiner.desc=&o掘ã£ã¦ã€æŽ˜ã£ã¦ã€ã¾ãŸæŽ˜ã£ã¦... -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oファイアフィッシュã«ãªã‚‹ï¼ -tooltip.BloodMagic.sigil.seer.desc=&oã™ã¹ã¦ã‚’見通ã›ã¦ã‚‚ã¾ã ç‰©è¶³ã‚Šãªã„ -tooltip.BloodMagic.sigil.seer.currentAltarProgress=進æ—状æ³ï¼š %d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=進æ—状æ³ï¼š %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=消費率: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=祭壇ã®ã‚°ãƒ¬ãƒ¼ãƒ‰ï¼š %d -tooltip.BloodMagic.sigil.seer.currentEssence=貯蔵é‡ï¼š %d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=最大容é‡ï¼š %d LP -tooltip.BloodMagic.sigil.seer.currentCharge=ç¾åœ¨ã®ãƒãƒ£ãƒ¼ã‚¸ï¼š %d -tooltip.BloodMagic.sigil.seer.currentTranquility=ç¾åœ¨ã®éŽ®é™åŠ¹æžœï¼š %d -tooltip.BloodMagic.sigil.seer.currentBonus=çµåˆåº¦ï¼š +%d%% -tooltip.BloodMagic.sigil.phantomBridge.desc=&o空を歩ã“ã†... -tooltip.BloodMagic.sigil.whirlwind.desc=&oスカートã¯å±¥ã‹ãªã„ã»ã†ãŒã„ã„よã†ã  -tooltip.BloodMagic.sigil.enderSeverance.desc=&oã‚¨ãƒ³ãƒ€ãƒ¼ãƒžãƒ³ã¯æ‚²æƒ¨ãªäº‹ã«ãªã‚‹ï¼ -tooltip.BloodMagic.sigil.teleposition.desc=ã‚ãšã‹ãªè·é›¢ãªã‚‰ç§»å‹•ã§ããã†ã ã€‚ -tooltip.BloodMagic.sigil.transposition.desc=フォースã®åŠ›ã‚’æ„Ÿã˜ã‚‹ã®ã ã€è‹¥ã弟å­ã‚ˆã€‚ -tooltip.BloodMagic.sigil.holding.press=&o%s&r&7を押ã™ã“ã¨ã§å¤‰æ›´ -tooltip.BloodMagic.sigil.holding.desc=多é‡åŒ–å°ç«  -tooltip.BloodMagic.sigil.holding.sigilInSlot=スロット %d: %s - -tooltip.BloodMagic.livingArmourPointsUpgrade.desc=生体アーマーã®å¼·åŒ–ãƒã‚¤ãƒ³ãƒˆã®æœ€å¤§å€¤ã‚’%dã«å¢—加ã•ã›ã‚‹ã€‚ - -tooltip.BloodMagic.bound.sword.desc=&oå¼±è€…ã®æ·˜æ±° -tooltip.BloodMagic.bound.pickaxe.desc=&o石ã¸ã®ç„¡æ…ˆæ‚²ãªç ´å£Š -tooltip.BloodMagic.bound.axe.desc=&o悪魔ã®ä¼æŽ¡æ©Ÿ -tooltip.BloodMagic.bound.shovel.desc=&o土を掃除ã—ã¦ç¶ºéº—ã« - -tooltip.BloodMagic.sacrificialDagger.desc=指を刺ã™ã«ã¯å分ãªåˆ‡ã‚Œå‘³ã®ã‚ˆã†ã ... -tooltip.BloodMagic.sacrificialDagger.creative=スニーク状態ã§è¡€ã®ç¥­å£‡ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã‚’ã™ã‚‹ã“ã¨ã§æº€ã‚¿ãƒ³ã«ãªã‚‹ -tooltip.BloodMagic.slate.desc=è¡€ã®ç¥­å£‡ã§æ³¨å…¥ã•れãŸçŸ³ -tooltip.BloodMagic.inscriber.desc=å£ã«æãã®ã«ä½¿ã†ã‚ˆã†ã ... - -tooltip.BloodMagic.pack.selfSacrifice.desc=ã“ã®ãƒ‘ãƒƒã‚¯ã¯æœ¬å½“ã«ãƒã‚¯ãƒã‚¯ã™ã‚‹... -tooltip.BloodMagic.pack.sacrifice.desc=Description -tooltip.BloodMagic.pack.stored=貯蔵é‡ï¼š %d LP - -tooltip.BloodMagic.activationCrystal.weak=低レベルã®å„€å¼ã‚’èµ·å‹•ã•ã›ã‚‹ -tooltip.BloodMagic.activationCrystal.awakened=より強力ãªå„€å¼ã‚’èµ·å‹•ã•ã›ã‚‹ -tooltip.BloodMagic.activationCrystal.creative=クリエイティブ専用 - å…¨ã¦ã®å„€å¼ã‚’èµ·å‹• - -tooltip.BloodMagic.diviner.currentRitual=é¸æŠžä¸­ã®å„€å¼ï¼š -tooltip.BloodMagic.diviner.blankRune=å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.waterRune=æ°´ã®å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.airRune=風ã®å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.fireRune=ç«ã®å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.earthRune=土ã®å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.duskRune=黄æ˜ã®å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.dawnRune=æšã®å„€å¼çŸ³ï¼š %d個 -tooltip.BloodMagic.diviner.totalRune=å„€å¼çŸ³ã®åˆè¨ˆï¼š %d個 -tooltip.BloodMagic.diviner.extraInfo=&9-Shiftキーã§ãƒ«ãƒ¼ãƒ³ã®è©³ç´°è¡¨ç¤º- -tooltip.BloodMagic.diviner.extraExtraInfo=&9-Shift + Mã‚­ãƒ¼ã§æ©Ÿèƒ½æ‹¡å¼µã®è©³ç´°è¡¨ç¤º- -tooltip.BloodMagic.diviner.currentDirection=ç¾åœ¨ã®æ–¹è§’: %s - -tooltip.BloodMagic.ritualReader.currentState=ç¾åœ¨ã®ãƒ¢ãƒ¼ãƒ‰ï¼š %s -tooltip.BloodMagic.ritualReader.set_area=設定エリア -tooltip.BloodMagic.ritualReader.information=基本情報 -tooltip.BloodMagic.ritualReader.set_will_types=消費ウィルã®è¨­å®š -tooltip.BloodMagic.ritualReader.desc.set_area=起動中ã®ãƒžã‚¹ã‚¿ãƒ¼å„€å¼çŸ³ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã“ã¨ã§ã€å„€å¼ã®åŠ¹æžœç¯„å›²ã‚’å¤‰æ›´ã§ãã¾ã™ã€‚最åˆã«ãƒžã‚¹ã‚¿ãƒ¼å„€å¼çŸ³ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã€æ¬¡ã«æ–°ã—ã設定ã—ãŸã„効果範囲㮠両端2箇所を順番ã«ã‚¯ãƒªãƒƒã‚¯ã—ã¾ã™ã€‚ -tooltip.BloodMagic.ritualReader.desc.information=起動中ã®ãƒžã‚¹ã‚¿ãƒ¼å„€å¼çŸ³ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã“ã¨ã§ã€åŸºæœ¬æƒ…報を読ã¿å–りã¾ã™ã€‚ -tooltip.BloodMagic.ritualReader.desc.set_will_types=ホットãƒãƒ¼ã«ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶ã‚’入れãŸçŠ¶æ…‹ã§ãƒžã‚¹ã‚¿ãƒ¼å„€å¼çŸ³ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ãã®ã‚¦ã‚£ãƒ«ã‚’消費ã™ã‚‹ã‚ˆã†ã«è¨­å®šã•れã¾ã™ã€‚ - -tooltip.BloodMagic.arcaneAshes=錬金術魔法陣をæãã®ã«ç”¨ã„ã‚‹ç° - -tooltip.BloodMagic.telepositionFocus.coords=ç¾åœ¨ã®è¨­å®šåº§æ¨™ï¼š (%d, %d, %d) -tooltip.BloodMagic.telepositionFocus.dimension=ディメンションID: %d -tooltip.BloodMagic.telepositionFocus.weak=ワールド内ã®ãƒ–ロックã®è»¢é€ã«ç”¨ã„ã‚‹ -tooltip.BloodMagic.telepositionFocus.enhanced=ワールド内ã®ãƒ–ロックã®è»¢é€ã«ç”¨ã„ã‚‹ -tooltip.BloodMagic.telepositionFocus.reinforced=ワールド内ã®ãƒ–ロックã®è»¢é€ã«ç”¨ã„ã‚‹ -tooltip.BloodMagic.telepositionFocus.demonic=ワールド内ã®ãƒ–ロックã®è»¢é€ã«ç”¨ã„ã‚‹ - -tooltip.BloodMagic.livingArmour.upgrade.speed=迅速 -tooltip.BloodMagic.livingArmour.upgrade.digging=ドワーフã®åŠ› -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=毒抵抗 -tooltip.BloodMagic.livingArmour.upgrade.fireResist=ã‚¤ã‚°ãƒ‹ã‚¹ã®æ©æµ -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=é ‘ä¸ˆãªæŒ‡ -tooltip.BloodMagic.livingArmour.upgrade.knockback=ボディービルダー -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=強固ãªèº«ä½“ -tooltip.BloodMagic.livingArmour.upgrade.health=生命力 -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=å¼·æ’ƒ -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=トリックショット -tooltip.BloodMagic.livingArmour.upgrade.stepAssist=歩行補助 -tooltip.BloodMagic.livingArmour.upgrade.grimReaper=死神ã®ç–¾èµ° -tooltip.BloodMagic.livingArmour.upgrade.solarPowered=å¤ªé™½ã®æ©æµ -tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=ルーンã®åŠ è­· -tooltip.BloodMagic.livingArmour.upgrade.revealing=洞察 -tooltip.BloodMagic.livingArmour.upgrade.experienced=経験 -tooltip.BloodMagic.livingArmour.upgrade.jump=è·³èº -tooltip.BloodMagic.livingArmour.upgrade.fallProtect=軟ç€é™¸ -tooltip.BloodMagic.livingArmour.upgrade.graveDigger=グレイヴディガー -tooltip.BloodMagic.livingArmour.upgrade.sprintAttack=ãƒãƒ£ãƒ¼ã‚¸ã‚¹ãƒˆãƒ©ã‚¤ã‚¯ -tooltip.BloodMagic.livingArmour.upgrade.criticalStrike=トゥルーストライク -tooltip.BloodMagic.livingArmour.upgrade.elytra=エリトラ -tooltip.BloodMagic.livingArmour.upgrade.nightSight=夜間技能 -tooltip.BloodMagic.livingArmour.upgrade.repair=ä¿®ç† - - -tooltip.BloodMagic.livingArmour.upgrade.slowness=引ããšã‚‹è¶³ -tooltip.BloodMagic.livingArmour.upgrade.crippledArm=ä¸è‡ªç”±ãªè…• -tooltip.BloodMagic.livingArmour.upgrade.slippery=摩擦力低下 -tooltip.BloodMagic.livingArmour.upgrade.battleHunger=é£¢é¤“ã®æˆ¦ã„ -tooltip.BloodMagic.livingArmour.upgrade.quenched=抑制 -tooltip.BloodMagic.livingArmour.upgrade.meleeDecrease=éˆã„刃 -tooltip.BloodMagic.livingArmour.upgrade.digSlowdown=脆ããªã£ãŸãƒ„ルãƒã‚· -tooltip.BloodMagic.livingArmour.upgrade.stormTrooper=çªæ’ƒå…µ -tooltip.BloodMagic.livingArmour.upgrade.level=%s (Lv %d) -tooltip.BloodMagic.livingArmour.upgrade.progress=%s (%d/100) -tooltip.BloodMagic.livingArmour.upgrade.points=&6強化ãƒã‚¤ãƒ³ãƒˆï¼š %s / %s - -tooltip.BloodMagic.livingArmour.extraExtraInfo=&9-Shift + Mã§é€²æ—情報- - -tooltip.BloodMagic.will=ã‚¦ã‚£ãƒ«å«æœ‰é‡ï¼š %1$,.2f -tooltip.BloodMagic.sentientSword.desc=デーモンウィルを使用ã™ã‚‹ã“ã¨ã§æ½œåœ¨èƒ½åŠ›ãŒé–‹æ”¾ã•れã¾ã™ -tooltip.BloodMagic.sentientAxe.desc=デーモンウィルを使用ã™ã‚‹ã“ã¨ã§æ½œåœ¨èƒ½åŠ›ãŒé–‹æ”¾ã•れã¾ã™ -tooltip.BloodMagic.sentientPickaxe.desc=デーモンウィルを使用ã™ã‚‹ã“ã¨ã§æ½œåœ¨èƒ½åŠ›ãŒé–‹æ”¾ã•れã¾ã™ -tooltip.BloodMagic.sentientShovel.desc=デーモンウィルを使用ã™ã‚‹ã“ã¨ã§æ½œåœ¨èƒ½åŠ›ãŒé–‹æ”¾ã•れã¾ã™ -tooltip.BloodMagic.soulGem.petty=ã“ã®å®çŸ³ã¯å¾®é‡ã®ã‚¦ã‚£ãƒ«ã‚’貯蔵ã§ãã¾ã™ -tooltip.BloodMagic.soulGem.lesser=ã“ã®å®çŸ³ã¯å°‘é‡ã®ã‚¦ã‚£ãƒ«ã‚’貯蔵ã§ãã¾ã™ -tooltip.BloodMagic.soulGem.common=ã“ã®å®çŸ³ã¯ãã“ãã“ã®ã‚¦ã‚£ãƒ«ã‚’貯蔵ã§ãã¾ã™ -tooltip.BloodMagic.soulGem.greater=ã“ã®å®çŸ³ã¯å¤§é‡ã®ã‚¦ã‚£ãƒ«ã‚’貯蔵ã§ãã¾ã™ -tooltip.BloodMagic.soulGem.grand=ã“ã®å®çŸ³ã¯èޫ大ãªã‚¦ã‚£ãƒ«ã‚’貯蔵ã§ãã¾ã™ -tooltip.BloodMagic.soulSnare.desc=ãƒ¢ãƒ³ã‚¹ã‚¿ãƒ¼ã«æŠ•ã’ã¤ã‘ã¦ã‹ã‚‰å€’ã™ã“ã¨ã§ãƒ‡ãƒ¼ãƒ¢ãƒ‹ãƒƒã‚¯ã‚¦ã‚£ãƒ«ã‚’入手ã§ãã¾ã™ - -tooltip.BloodMagic.itemFilter.exact=ã‚¢ã‚¤ãƒ†ãƒ ãŒæ­£ç¢ºã«ä¸€è‡´ã™ã‚‹å ´åˆã«ãƒ•ィルタã—ã¾ã™ -tooltip.BloodMagic.itemFilter.ignoreNBT=NBTã‚¿ã‚°ã§ãƒ•ィルタã—ã¾ã™ -tooltip.BloodMagic.itemFilter.modItems=特定MODã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’フィルタã—ã¾ã™ -tooltip.BloodMagic.itemFilter.oreDict=鉱石辞書を用ã„ã¦ãƒ•ィルタã—ã¾ã™ - -tooltip.BloodMagic.fluid.type=液体を格ç´ã™ã‚‹ -tooltip.BloodMagic.fluid.amount=é‡ -tooltip.BloodMagic.fluid.capacity=æœ€å¤§å®¹é‡ - -tooltip.BloodMagic.ghost.everything=全㦠-tooltip.BloodMagic.ghost.amount=幻影アイテムã®å€‹æ•°ï¼š %d個 - -tooltip.BloodMagic.currentType.default=内容物: 原生ウィル -tooltip.BloodMagic.currentType.corrosive=内容物: è…食性ウィル -tooltip.BloodMagic.currentType.destructive=内容物: 破壊性ウィル -tooltip.BloodMagic.currentType.vengeful=内容物: 報復性ウィル -tooltip.BloodMagic.currentType.steadfast=内容物: 䏿´»æ€§ã‚¦ã‚£ãƒ« - -tooltip.BloodMagic.currentBaseType.default=原生 -tooltip.BloodMagic.currentBaseType.corrosive=è…食性 -tooltip.BloodMagic.currentBaseType.destructive=破壊性 -tooltip.BloodMagic.currentBaseType.vengeful=報復性 -tooltip.BloodMagic.currentBaseType.steadfast=䏿´»æ€§ - -tooltip.BloodMagic.experienceTome=経験値を貯蔵ã™ã‚‹ã®ã«ç”¨ã„る本 -tooltip.BloodMagic.experienceTome.exp=Exp: %0.3f -tooltip.BloodMagic.experienceTome.expLevel=レベル: %d - -tooltip.BloodMagic.decoration.safe=安全ãªè£…飾 -tooltip.BloodMagic.decoration.notSafe=å±é™ºãªè£…飾 - -tooltip.BloodMagic.cuttingFluidRatio=%d/%d 回使用å¯èƒ½ - -tooltip.BloodMagic.potion.uses=%d 回使用å¯èƒ½ - -tooltip.BloodMagic.book.shifting=紋様ãŒ... &oShiftã—ã¦... - -tooltip.BloodMagic.willGauge=大気中ã®ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«ã‚’測定ã§ãる奇妙ãªè£…置。 - -# Ritual -ritual.BloodMagic.blockRange.tooBig=指定ã•れãŸãƒ–ロック範囲ãŒåºƒã™ãŽã¾ã™ï¼æœ€å¤§%sブロックã®ç¯„囲内ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -ritual.BloodMagic.blockRange.tooFar=指定ã•れãŸãƒ–ロック範囲ãŒé ã™ãŽã¾ã™ï¼åž‚ç›´æ–¹å‘ã«%sãƒ–ãƒ­ãƒƒã‚¯ã€æ°´å¹³æ–¹å‘ã«%sブロックã®ç¯„囲内ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -ritual.BloodMagic.blockRange.inactive=å„€å¼çŸ³ã¯åœæ­¢ä¸­ã§ã‚りã€ç¯„囲ã®å¤‰æ›´ã¯ã§ãã¾ã›ã‚“。 -ritual.BloodMagic.blockRange.noRange=ブロック範囲ã¯é©åˆ‡ã«è¨­å®šã•れã¾ã›ã‚“ã§ã—ãŸã€‚ -ritual.BloodMagic.blockRange.firstBlock=効果範囲ã®é–‹å§‹ãƒ–ロックを設定ã—ã¾ã—ãŸã€‚ -ritual.BloodMagic.blockRange.success=æ­£å¸¸ã«æ–°ã—ã„効果範囲ãŒè¨­å®šã•れã¾ã—ãŸï¼ -ritual.BloodMagic.willConfig.set=ã“ã®å„€å¼ã«ä»¥ä¸‹ã®ç¨®é¡žã®ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«ã‚’使用: %s -ritual.BloodMagic.willConfig.void=ã“ã®å„€å¼ã¯ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«ã‚’使用ã—ã¾ã›ã‚“ - -ritual.BloodMagic.testRitual=è©¦é¨“ç”¨å„€å¼ -ritual.BloodMagic.waterRitual=æ¹§æ°´ã®å„€å¼ -ritual.BloodMagic.lavaRitual=ãƒã‚¶ãƒ¼ã®å°å¤œæ›² -ritual.BloodMagic.greenGroveRitual=緑化ã®å„€å¼ -ritual.BloodMagic.jumpRitual=è·³èºã®å„€å¼ -ritual.BloodMagic.wellOfSufferingRitual=苦痛ã®äº•戸 -ritual.BloodMagic.featheredKnifeRitual=フェザーナイフã®å„€å¼ -ritual.BloodMagic.regenerationRitual=å†ç”Ÿã®å„€å¼ -ritual.BloodMagic.harvestRitual=åŽç©«æœˆã®å„€å¼ -ritual.BloodMagic.magneticRitual=ç£åŠ›ã®å„€å¼ -ritual.BloodMagic.crushingRitual=粉砕者ã®å„€å¼ -ritual.BloodMagic.fullStomachRitual=飽食ã®å„€å¼ -ritual.BloodMagic.interdictionRitual=排除ã®å„€å¼ -ritual.BloodMagic.containmentRitual=幽閉ã®å„€å¼ -ritual.BloodMagic.speedRitual=風ã®å„€å¼ -ritual.BloodMagic.suppressionRitual=除去ã®å„€å¼ -ritual.BloodMagic.expulsionRitual=追放ã®ã‚ªãƒ¼ãƒ© -ritual.BloodMagic.zephyrRitual=ゼファーã®å‘¼ã³å£° -ritual.BloodMagic.upgradeRemoveRitual=浄霊ã®èª¿ã¹ -ritual.BloodMagic.armourEvolveRitual=生体進化ã®å„€å¼ -ritual.BloodMagic.animalGrowthRitual=牧羊ã®å„€å¼ -ritual.BloodMagic.forsakenSoulRitual=見放ã•れãŸé­‚ã®è’集 -ritual.BloodMagic.crystalHarvestRitual=欠ã‘ãŸçµæ™¶ã®ç²‰ç • -ritual.BloodMagic.meteorRitual=崩壊ã™ã‚‹å¡”ã®å° - -ritual.BloodMagic.cobblestoneRitual=ル・ヴォルカノス・フィギュス -ritual.BloodMagic.placerRitual=設置充填ã®å„€å¼ -ritual.BloodMagic.fellingRitual=木ã“りã®ç²‰ç • -ritual.BloodMagic.pumpRitual=サイフォンã®è®ƒæ­Œ -ritual.BloodMagic.altarBuilderRitual=高ä½ç¥­å£‡æ§‹ç¯‰å„€å¼ -ritual.BloodMagic.portalRitual=組ã¿è¾¼ã¿ã‚²ãƒ¼ãƒˆ -ritual.BloodMagic.downgradeRitual=弱化ã®å„€å¼ - -ritual.BloodMagic.waterRitual.info=マスター儀å¼çŸ³ã‹ã‚‰æ°´æºã‚’生æˆã—ã¾ã™ã€‚ -ritual.BloodMagic.lavaRitual.info=マスター儀å¼çŸ³ã‹ã‚‰æº¶å²©æºã‚’生æˆã—ã¾ã™ã€‚ -ritual.BloodMagic.greenGroveRitual.info=エリア内ã®ä½œç‰©ã‚’育æˆã•ã›ã¾ã™ã€‚ -ritual.BloodMagic.jumpRitual.info=空中ã«ã¯ã­é£›ã¶åŠ¹æžœã‚’ä»˜ä¸Žã—ã¾ã™ã€‚ -ritual.BloodMagic.wellOfSufferingRitual.info=生物ã«ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’与ãˆã‚‹ã‚¨ãƒªã‚¢ã‚’生æˆã—ã€ä»˜è¿‘ã®è¡€ã®ç¥­å£‡ã«LPを供給ã—ã¾ã™ã€‚ -ritual.BloodMagic.featheredKnifeRitual.info=プレイヤーã«ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’与ãˆã‚‹ã‚¨ãƒªã‚¢ã‚’生æˆã—ã€ä»˜è¿‘後ã®ç¥­å£‡ã«LPを供給ã—ã¾ã™ã€‚ -ritual.BloodMagic.regenerationRitual.info=エリア内ã«HPãŒæ¸›å°‘ã—ã¦ã„る生物ãŒã„ãŸå ´åˆã€å†ç”Ÿèƒ½åŠ›ã‚’ä»˜ä¸Žã—ã¾ã™ã€‚ -ritual.BloodMagic.harvestRitual.info=エリア内ã®ä½œç‰©ã‚’刈りå–りã€ç¨®ãªã©ã®åŽç©«ç‰©ãŒã‚ã£ãŸå ´åˆã¯æ¤ãˆç›´ã—ã¾ã™ã€‚ -ritual.BloodMagic.magneticRitual.info=地中ã‹ã‚‰é‰±çŸ³ã‚’掘り起ã“ã—ã€æŒ‡å®šã‚¨ãƒªã‚¢ã«ä¸¦ã¹ã¾ã™ã€‚ -ritual.BloodMagic.crushingRitual.info=指定エリアã®ãƒ–ロックを破壊ã—ã€åŽé›†ç‰©ã‚’リンクã—ã¦ã„ã‚‹ãƒã‚§ã‚¹ãƒˆã«æ ¼ç´ã—ã¾ã™ã€‚ -ritual.BloodMagic.crushingRitual.destructive.info=(破壊性) ブロックを強制的ã«ç ´å£Šã—ã¾ã™ï¼šç ´å£Šã—ãŸå…¨ã¦ã®ãƒ–ロックã¯å¹¸é‹IIIã®åŠ¹æžœãŒé©ç”¨ã•れã¦ã„ã¾ã™ã€‚ -ritual.BloodMagic.crushingRitual.steadfast.info=(䏿´»æ€§) å…¨ã¦ã®ãƒ–ロックã¯ã‚·ãƒ«ã‚¯ã‚¿ãƒƒãƒã«ã‚ˆã£ã¦ç ´å£Šã•れã¾ã™ã€‚幸é‹ã®åŠ¹æžœã¯ç„¡è¦–ã•れã¾ã™ã€‚ -ritual.BloodMagic.crushingRitual.corrosive.info=(è…食性) å…¨ã¦ã®ãƒ–ロックã¯åˆ‡å‰Šæ¶²ã§ç ´å£Šã•れã¾ã™ã€‚シルクタッãƒã®åŠ¹æžœã¯ç„¡è¦–ã•れã¾ã™ã€‚ -ritual.BloodMagic.greenGroveRitual.corrosive.info=(è…食性) 作物ã®å‘¨å›²ã«ã„ã‚‹ç”Ÿç‰©ã¯æ”»æ’ƒã‚’å—ã‘ã€ç”Ÿå‘½åŠ›ãŒä½œç‰©ã«å¸åŽã•れる。 -ritual.BloodMagic.greenGroveRitual.default.info=(原生) オーラ中ã®ã‚¦ã‚£ãƒ«é‡ã«å¿œã˜ã¦å…¨ã¦ã®å„€å¼ã®ä½œå‹•速度ãŒå‘上ã—ã¾ã™ã€‚ -ritual.BloodMagic.greenGroveRitual.steadfast.info=(䏿´»æ€§) 種をæ¤ãˆç›´ã—ã€æ½…水範囲ã«ã‚るブロックを湿らã›ã‚‹ã€‚ - -ritual.BloodMagic.fullStomachRitual.info=リンクã—ã¦ã„ã‚‹ãƒã‚§ã‚¹ãƒˆå†…ã«ã‚ã‚‹é£Ÿæ–™ã‚’ã€æº€è…¹ã§ãªã„プレイヤーã«è‡ªå‹•çš„ã«ä¾›çµ¦ã—ã¾ã™ã€‚ -ritual.BloodMagic.interdictionRitual.info=マスター儀å¼çŸ³ã®ä¸€å®šã‚¨ãƒªã‚¢å†…ã®ç”Ÿç‰©ã‚’排除ã—ã¦ä¾µå…¥ã§ããªã„よã†ã«ã—ã¾ã™ã€‚ -ritual.BloodMagic.containmentRitual.info=エリア内ã®ç”Ÿç‰©ã‚’スター儀å¼çŸ³ã®å‘¨å›²ã«å¼•ã寄ã›ã¾ã™ã€‚ -ritual.BloodMagic.speedRitual.info=矢å°çжã®å„€å¼çŸ³ã®æ–¹å‘ã¸ã€ãƒ—レイヤーを射出ã—ã¾ã™ã€‚ -ritual.BloodMagic.suppressionRitual.info=ã‚らゆるæµä½“元を除去ã—ã¾ã™ - å„€å¼ã®å‹•ä½œã‚’åœæ­¢ã™ã‚‹ã¨æ¶²ä½“ã¯æˆ»ã£ã¦ãる。 -ritual.BloodMagic.expulsionRitual.info=å„€å¼ã®è¨­ç½®è€…ã‹ã€ãƒžã‚¹ã‚¿ãƒ¼å„€å¼çŸ³ã®ä¸Šã®ãƒã‚§ã‚¹ãƒˆã«å¥‘約済ã¿ãƒ–ラッドオーブã®ã‚’入れãŸãƒ—レイヤー以外を所定エリアã‹ã‚‰æŽ’除ã—ã¾ã™ã€‚ -ritual.BloodMagic.zephyrRitual.info=エリア内ã®ãƒ‰ãƒ­ãƒƒãƒ—アイテムをåŽé›†ã—ã€ãƒªãƒ³ã‚¯ã•れãŸãƒã‚§ã‚¹ãƒˆã«åŽç´ã—ã¾ã™ã€‚ -ritual.BloodMagic.upgradeRemoveRitual.info=Undocumented. -ritual.BloodMagic.armourEvolveRitual.info=Undocumented. -ritual.BloodMagic.animalGrowthRitual.info=エリア内ã«ã„ã‚‹å­ä¾›ç”Ÿç‰©ã®æˆé•·é€Ÿåº¦ã‚’æ—©ã‚ã¾ã™ã€‚ -ritual.BloodMagic.forsakenSoulRitual.info=エリア内ã®ç”Ÿç‰©ã«ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’与ãˆã€ç”Ÿç‰©ãŒæ­»ã‚“ã æ™‚ã«ã‚¦ã‚£ãƒ«ã‚’回åŽã—ã¦ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶ã‚’æˆé•·ã•ã›ã¾ã™ã€‚ -ritual.BloodMagic.crystalHarvestRitual.info=範囲内ã®ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶æ ªã‚’破壊ã—ã¦ã‚¦ã‚£ãƒ«çµæ™¶ã«ã—ã¦ãƒ‰ãƒ­ãƒƒãƒ—ã•ã›ã¾ã™ã€‚ -ritual.BloodMagic.placerRitual.info=リンクã—ã¦ã„ã‚‹ãƒã‚§ã‚¹ã®ä¸­ã‹ã‚‰ãƒ–ロックã¨ã—ã¦è¨­ç½®å¯èƒ½ãªã‚‚ã®ã‚’å–り出ã—ã€éš™é–“ãªã設置ã—ã¾ã™ã€‚ -ritual.BloodMagic.fellingRitual.info=ã“ã®å„€å¼ã¯æ¨™æº–çš„ãªæœ¨æä¼æŽ¡è£…ç½®ã¨ã—ã¦å‹•作ã—ã€ã‚¨ãƒªã‚¢å†…ã®ã™ã¹ã¦ã®åŽŸæœ¨åŠã³è‘‰ã‚’伿ޡãŠã‚ˆã³æŽ¡å–ã—ã¾ã™ã€‚ -ritual.BloodMagic.pumpRitual.info=設定エリアã‹ã‚‰æµä½“ã‚’å¸ã„出ã—ã€1ãƒã‚±ãƒ„分以上ã®å®¹é‡ãŒã‚ã‚‹æµä½“タンクã¸ã¨ä¾›çµ¦ã—ã¾ã™ã€‚ -ritual.BloodMagic.altarBuilderRitual.info=マスター儀å¼çŸ³ã¨ãƒªãƒ³ã‚¯ã—ã¦ã„ã‚‹ãƒã‚§ã‚¹ãƒˆã®ä¸­èº«ã‚’使用ã—ã¦è¡€ã®ç¥­å£‡ã‚’構築ã—ã¾ã™ã€‚ -ritual.BloodMagic.portalRitual.info=作æˆã—èµ·å‹•ã•ã›ã‚‹ã¨åŒæ™‚ã«å‘¨å›²ã®ãƒ–ロックæè³ªã‚’固有ã®â€ã‚­ãƒ¼â€ã¨ã™ã‚‹ãƒãƒ¼ã‚¿ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’構築ã—ã¾ã™ã€‚周囲ブロックã®å¤‰æ›´ã¯èµ·å‹•後ã§ã‚‚å¯èƒ½ã§ã‚りã€ãƒãƒ¼ã‚¿ãƒ«ã¯åŒã˜ã‚­ãƒ¼åŒå£«ã‚’リンクã—ã¾ã™ã€‚ -ritual.BloodMagic.meteorRitual.info=範囲内ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’消費ã—ã€ç©ºã‹ã‚‰è³‡æºã«å¯Œã‚“ã éš•石を儀å¼ã«ç›´æ’ƒã•ã›ã‚‹ã‚ˆã†ã«å¬å–šã—ã¾ã™ã€‚ - -ritual.BloodMagic.waterRitual.waterRange.info=(æ°´) 設定ã—ãŸã‚¨ãƒªã‚¢ã«æ°´æºã‚’生æˆã•ã›ã¾ã™ã€‚ -ritual.BloodMagic.lavaRitual.lavaRange.info=(溶岩) 設定ã—ãŸã‚¨ãƒªã‚¢ã«æº¶å²©æºã‚’生æˆã•ã›ã¾ã™ã€‚ -ritual.BloodMagic.lavaRitual.fireFuse.info=(報復性) 範囲内ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ç‚Žã«ã‚ˆã£ã¦è‹¦ã—ã‚られã¾ã™ã€‚ -ritual.BloodMagic.greenGroveRitual.growing.info=(æˆé•·) 設定ã—ãŸã‚¨ãƒªã‚¢å†…ã®æ¤ç‰©ã®æˆé•·ã‚’促進ã•ã›ã¾ã™ã€‚ -ritual.BloodMagic.greenGroveRitual.leech.info=(è…食性) ä½œç‰©ã®æˆé•·ã®ãŸã‚ã«å‘¨è¾ºã®ç”Ÿç‰©ã¯ç”Ÿå‘½åŠ›ã‚’å¸åŽã•れる。 -ritual.BloodMagic.greenGroveRitual.hydrate.info=(䏿´»æ€§) 範囲内ã®è€•ã—ãŸãƒ–ロックを湿らã›ã€ã‚¨ãƒªã‚¢å‘¨è¾ºã«ã‚る種å­ã‚’æ¤ãˆä»˜ã‘る。 -ritual.BloodMagic.jumpRitual.jumpRange.info=(è·³èº) 設定ã—ãŸã‚¨ãƒªã‚¢å†…ã«å±…る生物を空中ã«é£›ã³ä¸ŠãŒã‚‰ã›ã¾ã™ã€‚ -ritual.BloodMagic.wellOfSufferingRitual.altar.info=(祭壇) å„€å¼ãŒè¡€ã®ç¥­å£‡ã‚’検索ã™ã‚‹ã‚¨ãƒªã‚¢ã‚’指定ã—ã¾ã™ã€‚変更ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šæ¤œç´¢ã‚¨ãƒªã‚¢ã‚’拡大ã—ãŸã‚Šç‰¹å®šã®é ˜åŸŸã«åˆ¶é™ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ -ritual.BloodMagic.wellOfSufferingRitual.damage.info=(ダメージ) å„€å¼ã«ã‚ˆã£ã¦ç”Ÿç‰©ãŒç¶™ç¶šãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’å—ã‘るエリアを設定ã—ã¾ã™ã€‚ã“ã®ç¯„囲内ã«å±…ã‚‹ã™ã¹ã¦ã®ç”Ÿç‰©ã¯å¾ã€…ã«ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’å—ã‘ç¶šã‘ã‚‹(プレイヤーを除ã)。 -ritual.BloodMagic.featheredKnifeRitual.altar.info=(祭壇)儀å¼ãŒè¡€ã®ç¥­å£‡ã‚’検索ã™ã‚‹ã‚¨ãƒªã‚¢ã‚’指定ã—ã¾ã™ã€‚変更ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šæ¤œç´¢ã‚¨ãƒªã‚¢ã‚’拡大ã—ãŸã‚Šç‰¹å®šã®é ˜åŸŸã«åˆ¶é™ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ -ritual.BloodMagic.featheredKnifeRitual.damage.info=(ダメージ) å„€å¼ã«ã‚ˆã£ã¦ãƒ—レイヤーãŒç¶™ç¶šãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’å—ã‘るエリアを設定ã—ã¾ã™ã€‚ã“ã®ç¯„囲内ã«å±…ã‚‹ãƒ—ãƒ¬ã‚¤ãƒ¤ãƒ¼ã¯æ­»ã¬ä¸€æ­©æ‰‹å‰ã¾ã§å¾ã€…ã«ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’å—ã‘ç¶šã‘る。 -ritual.BloodMagic.regenerationRitual.heal.info=(回復) 範囲内ã«å±…る生物ã¯å†ç”Ÿèƒ½åŠ›ã®åŠ¹æžœã‚’ä¸Žãˆã¾ã™ã€‚ -ritual.BloodMagic.harvestRitual.harvestRange.info=(åŽç©«) ç¯„å›²å†…ã®æ¤ç‰©ã‚’åŽç©«ã—ã¾ã™ã€‚ -ritual.BloodMagic.magneticRitual.placementRange.info=(é…ç½®) å„€å¼ã¯ã“ã®ã‚¨ãƒªã‚¢ã«æ‰‹ã«å…¥ã‚ŒãŸé‰±çŸ³ã‚’é…ç½®ã—ã¾ã™ã€‚ -ritual.BloodMagic.crushingRitual.crushingRange.info=(粉砕) å„€å¼ã¯ã“ã®ã‚¨ãƒªã‚¢å†…ã®ãƒ–ロックを破壊ã—ã¦å…¥æ‰‹ã—ã¾ã™ã€‚ -ritual.BloodMagic.crushingRitual.chest.info=(ãƒã‚§ã‚¹ãƒˆ) å„€å¼ãŒç ´å£Šã—ãŸãƒ–ロックを格ç´ã™ã‚‹ã‚¤ãƒ³ãƒ™ãƒ³ãƒˆãƒªã®å ´æ‰€ã€‚ -ritual.BloodMagic.fullStomachRitual.fillRange.info=(補給) å„€å¼ãŒãƒ—レイヤーã«é£Ÿæ–™ã‚’供給ã™ã‚‹ç¯„囲。 -ritual.BloodMagic.fullStomachRitual.chest.info=(ãƒã‚§ã‚¹ãƒˆ) å„€å¼ãŒãƒ—レイヤーã«ä¾›çµ¦ã™ã‚‹ãŸã‚ã®é£Ÿæ–™ã‚’å–り出ã™ã‚¤ãƒ³ãƒ™ãƒ³ãƒˆãƒªã®å ´æ‰€ã€‚ -ritual.BloodMagic.interdictionRitual.interdictionRange.info=(排除) å„€å¼ã«ã‚ˆã£ã¦ç”Ÿç‰©ãŒå¼¾ã飛ã°ã•れる範囲。ã™ã¹ã¦ã®ç”Ÿç‰©ã¯ã“ã®è¨­å®šã‚¨ãƒªã‚¢ã«é–¢ä¿‚ãªãマスター儀å¼çŸ³ã‹ã‚‰å¼¾ã飛ã°ã•れる。 -ritual.BloodMagic.containmentRitual.containmentRange.info=(幽閉) å„€å¼ã«ã‚ˆã£ã¦ç”Ÿç‰©ãŒå¼•ã寄ã›ã‚‰ã‚Œã‚‹ç¯„囲。ã™ã¹ã¦ã®ç”Ÿç‰©ã¯ã“ã®è¨­å®šã‚¨ãƒªã‚¢ã«é–¢ä¿‚ãªãマスター儀å¼çŸ³ã®æ–¹ã¸ã¨å¼•ã寄ã›ã‚‰ã‚Œã‚‹ã€‚ -ritual.BloodMagic.speedRitual.sanicRange.info=(加速) 設定ã—ãŸã‚¨ãƒªã‚¢å†…ã®ã™ã¹ã¦ã®ç”Ÿç‰©ãŒçŸ¢å°ã®æ–¹å‘ã¸ã¨å°„出ã•れã¾ã™ã€‚ -ritual.BloodMagic.suppressionRitual.suppressionRange.info=(除去) 範囲内ã®ã™ã¹ã¦ã®æ¶²ä½“ãŒæŠ¼ã—ã®ã‘られã¾ã™ã€‚ -ritual.BloodMagic.expulsionRitual.expulsionRange.info=(追放) -ritual.BloodMagic.zephyrRitual.zephyrRange.info=(å¸å¼•) 設定範囲内ã®ã‚¢ã‚¤ãƒ†ãƒ ãŒåŽé›†ã•れã€ãƒªãƒ³ã‚¯ã•れã¦ã„ã‚‹ãƒã‚§ã‚¹ãƒˆã«åŽç´ã•れã¾ã™ã€‚ -ritual.BloodMagic.zephyrRitual.chest.info=(ãƒã‚§ã‚¹ãƒˆ) å„€å¼ãŒåŽé›†ã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã‚’åŽç´ã™ã‚‹ãŸã‚ã®ãƒã‚§ã‚¹ãƒˆã®å ´æ‰€ã€‚ -ritual.BloodMagic.animalGrowthRitual.growing.info=(æˆé•·) 範囲内ã®å‹•物ãŒã¨ã¦ã‚‚æ—©ãæˆé•·ã—ã¾ã™ã€‚ -ritual.BloodMagic.forsakenSoulRitual.crystal.info=(çµæ™¶) å„€å¼ã«ã‚ˆã£ã¦ç”Ÿç‰©ãŒæ­»äº¡ã—ãŸéš›ã«ã€ã“ã®ç¯„囲内ã®ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶ã®æˆé•·ãŒä¿ƒé€²ã—ã¾ã™ã€‚ -ritual.BloodMagic.forsakenSoulRitual.damage.info=(ダメージ) ã“ã®ç¯„囲内ã®ç”Ÿç‰©ã¯å¾ã€…ã«ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚’å—ã‘ã€æ­»äº¡ã—ãŸéš›ã®ã‚¦ã‚£ãƒ«ãŒã‚¯ãƒªã‚¹ã‚¿ãƒ«ã®æˆé•·ã«åˆ©ç”¨ã•れã¾ã™ã€‚ -ritual.BloodMagic.crystalHarvestRitual.crystal.info=(çµæ™¶) æžå‡ºã—ãŸå…¨ã¦ã®ãƒ‡ãƒ¼ãƒ¢ãƒ³ã‚¦ã‚£ãƒ«çµæ™¶æ ªã‚’破壊ã—ã¦å˜çµæ™¶ã®çµæ™¶ã«ã—ã¾ã™ã€‚çµæ™¶æ ªãŒ1ã¤ã ã‘ã«ãªã£ãŸå ´åˆã¯ç ´å£Šã—ãªã„。 - -ritual.BloodMagic.placerRitual.placerRange.info=(場所) å„€å¼ãŒè¨­å®šç¯„囲ã«ãƒ–ロックを設置ã—ã¾ã™ã€‚ -ritual.BloodMagic.placerRitual.chest.info=(ãƒã‚§ã‚¹ãƒˆ) å„€å¼ãŒãƒ–ロックを設置ã™ã‚‹ãŸã‚ã«ã€ãƒ–ロックをå–り出ã™ã‚¤ãƒ³ãƒ™ãƒ³ãƒˆãƒªã®å ´æ‰€ã€‚ -ritual.BloodMagic.fellingRitual.fellingRange.info=(伿ޡ) å„€å¼ãŒä¼æŽ¡ã™ã‚‹ãŸã‚ã®åŽŸæœ¨ã‚„è‘‰ã‚’æŽ¢ã™ç¯„囲。 -ritual.BloodMagic.fellingRitual.chest.info=(ãƒã‚§ã‚¹ãƒˆ) å„€å¼ãŒè’集物を格ç´ã™ã‚‹ã‚¤ãƒ³ãƒ™ãƒ³ãƒˆãƒªã®å ´æ‰€ã€‚ -ritual.BloodMagic.pumpRitual.pumpRange.info=(ãƒãƒ³ãƒ—) å„€å¼ãŒæŽ¡å–ã™ã‚‹ãŸã‚ã®æ¶²ä½“を探ã™ç¯„囲。 - -ritual.BloodMagic.downgradeRitual.dialogue.bow.1=ã•ã¦äººé–“ã‚ˆã€æ›´ãªã‚‹åŠ›ãŒæ¬²ã—ã„ã‹...? -ritual.BloodMagic.downgradeRitual.dialogue.bow.100=ã‚‚ã¡ã‚ん知ã£ã¦ã„ã‚‹ã ã‚ã†ãŒã€ä½•事ã«ã‚‚対価ãŒå¿…è¦ã§ã‚ã‚‹... 何らã‹ã®ä»£å„Ÿã‚’支払ã†ã“ã¨ãªãã€ç§ã¯ãŠå‰ã«æ›´ãªã‚‹åŠ›ã‚’ä¸Žãˆã‚‹è¨³ã«ã¯ã„ã‹ãªã„ã®ã ... -ritual.BloodMagic.downgradeRitual.dialogue.bow.300=ç§ã®å‰ã«ä¾›ç‰©ã‚’å·®ã—出ã™ã“ã¨ã§ãŠå‰ã¯æ„Ÿè¦šã‚’失ã„ã€é•·è·é›¢ã®æŠ•擲物を命中ã•ã›ã‚‹ã“ã¨ãŒã§ããªããªã‚‹ã ã‚ã†ã€‚弓矢ãŒå‹åˆ©ã®éµãŸã‚Šå¾—ã‚‹ã“ã¨ã¯ã€ã‚‚ã¯ã‚„ãªã„ã®ã ã€‚ -ritual.BloodMagic.downgradeRitual.dialogue.bow.500=ã ãŒãã®è¦‹è¿”りã¨ã—ã¦ã€ç§ã¯ã•らãªã‚‹æˆé•·ã‚’ã‚‚ãŸã‚‰ã™ãŸã‚ã«ãŠå‰ã®éŽ§ã‚’è§£æ”¾ã—よã†... ãŠå‰ãŒã™ã¹ã事ã¯ä¾›ç‰©ã‚’æ§ã’ã€ã“ã®ç¥­å£‡ã«è·ªãã“ã¨ã ... -ritual.BloodMagic.downgradeRitual.dialogue.quenched.1=フフフ... ã”ãã’んよã†ã€‚ より強力ãªåŠ›ã‚’æ¬²ã—ã¦ã„るよã†ã ãªã€‚ -ritual.BloodMagic.downgradeRitual.dialogue.quenched.100=ã„ã£ã±ã„ã«ãªã£ãŸæ¯ã‚’å†ã³æ³¨ãŽç›´ã™ã«ã¯ã€å¿…ãšä¸€åº¦ç©ºã«ã™ã‚‹å¿…è¦ãŒã‚る。ã“れã¯ãŠå‰ã«ã‚‚å分ç†è§£ã§ãã‚‹ã ã‚ã†ã€‚ -ritual.BloodMagic.downgradeRitual.dialogue.quenched.300=次ã®ã‚ˆã†ãªå–引をæŒã¡ã‹ã‘よã†ï¼šé£²ã‚€ã“ã¨ã«ã‚ˆã‚ŠæŠ€èƒ½ã‚’ã²ã¨ã¤å¤±ã„ã€ç§ã¯ãŠå‰ã«èŽ«å¤§ãªæ½œåœ¨èƒ½åŠ›ã‚’ä¸Žãˆã‚ˆã†ã€‚ã—ã‹ã—ãªãŒã‚‰ã€ã“ã®å–引ãŒãŠå‰ã«ã¨ã£ã¦ä¾¡å€¤ã‚ã‚‹ã‚‚ã®ã§ã‚ã‚‹ã‹ã©ã†ã‹ã¯å®Œå…¨ã«åˆ¥ã®å•題ã ... -ritual.BloodMagic.downgradeRitual.dialogue.quenched.500=ã•ã‚è·ªã‘ã€äººé–“よ。ãã—ã¦ç§ãŒæŽˆã‘ãŸæ¯ã‚’飲ã¿å¹²ã™ãŒã„ã„。ãŠãらããれã¯ãŠå‰ã«ã¨ã£ã¦ã®æœ€å¾Œã®ä¸€æ¯ã¨ãªã‚ã†ã€‚ -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.1=ãµã†ã‚€... ãŠå‰ã®æœ¬å½“ã®æœ›ã¿ã¯ä½•ãªã®ã ï¼Ÿ -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.100=ã‚‚ã—æ­»ã‚’è¶…è¶Šã—ãŸäººé–“ãªã‚‰ã°ã€ç§ã¯ãŠå‰ã¨å–引をã™ã‚‹ã“ã¨ã¯ã§ããªã„─ ãã®ä»£ã‚りã«åˆ¥ã®å–引をæç¤ºã™ã‚‹ã“ã¨ã¯ã§ãã‚‹... -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.300=ãŸã ã—ã€ç§ã¯ãŠå‰ã«ä½•ã‹ã—らã®ä»£å„Ÿã‚’è¦æ±‚ã—よã†ï¼šãŠå‰ã®ç‰©ç†çš„ãªæˆ¦é—˜èƒ½åŠ›ã ã€‚ -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.500=ã“れã«å¥‘ç´„ã™ã‚‹ã“ã¨ã§ã€ã‚‚ã¯ã‚„ãŠå‰ã¯ç¢ºå®Ÿã«æ­¦å™¨ã‚’振るãˆãªããªã‚Šã€ä»¥å‰ã«æŒ¯ã‚‹ãˆã¦ã„ãŸãƒ€ãƒ¡ãƒ¼ã‚¸ã®ã»ã‚“ã®åƒ…ã‹ã—ã‹ä¸Žãˆã‚‹ã“ã¨ãŒã§ããªããªã‚‹ã€‚ -ritual.BloodMagic.downgradeRitual.dialogue.dulledBlade.700=ã•ã‚ã€ãŠå‰ã®é¸æŠžæ¬¡ç¬¬ã ï¼šç¥­å£‡ã«è·ªãã‹ã€å·±ã®å‰£ã‚’執り続ã‘ã‚‹ã®ã‹ï¼Ÿ - -# Chat -chat.BloodMagic.altarMaker.setTier=グレードを設定: %d -chat.BloodMagic.altarMaker.building=グレード %dã®ç¥­å£‡ã‚’ä½œæˆ -chat.BloodMagic.altarMaker.destroy=グレード %dã®ç¥­å£‡ã‚’破壊 -chat.BloodMagic.altarMaker.creativeOnly=ã“れã¯ã‚¯ãƒªã‚¨ã‚¤ãƒ†ã‚£ãƒ–モード専用アイテムã§ã™ã€‚ - -chat.BloodMagic.damageSource=%sã®é­‚ã¯éžå¸¸ã«å¼±ããªã£ã¦ã„ã¾ã™ - -chat.BloodMagic.ritual.weak=エãƒãƒ«ã‚®ãƒ¼ã®æµã‚ŒãŒæ„Ÿã˜ã‚‰ã‚Œã‚‹ãŒã€å„€å¼ã®èµ·å‹•ã«ã¯ä½•ã‹ãŒè¶³ã‚Šãªã„よã†ã ã€‚ -chat.BloodMagic.ritual.prevent=å„€å¼ãŒã‚ãªãŸã«æ¿€ã—ãæŠµæŠ—ã—ã¦ã„ã‚‹ï¼ -chat.BloodMagic.ritual.activate=エãƒãƒ«ã‚®ãƒ¼ã®å¥”æµãŒå„€å¼ã«æµã‚Œè¾¼ã‚€ï¼ -chat.BloodMagic.ritual.notValid=ã‚ãªãŸã¯ãƒ«ãƒ¼ãƒ³ã®é…ç½®ãŒæ­£ã—ããªã„よã†ã«æ„Ÿã˜ãŸ... - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=ã‚ãªãŸã¯è‰¯ã„効果を感ã˜ãŸï¼ -chat.BloodMagic.livingArmour.upgrade.fireRemove=&6清涼感ãŒã‚ãªãŸã‚’包ã¿è¾¼ã¿ã€ç‚Žä¸ŠãŒåŽã¾ã£ãŸã€‚ -chat.BloodMagic.livingArmour.upgrade.grimReaper=&6é—‡ã®åŠ›ãŒã‚ãªãŸã‚’æ­»ã®æ·µã‹ã‚‰å¼•ã寄ã›ã‚‹ï¼ -chat.BloodMagic.livingArmour.newUpgrade=&4強化ãƒã‚¤ãƒ³ãƒˆã‚’å–å¾—ã—ã¾ã—ãŸï¼ - -chat.BloodMagic.routing.remove=記録ã•れãŸåº§æ¨™æƒ…報を消去ã—ã¾ã—㟠-chat.BloodMagic.routing.set=ノードã®åº§æ¨™ã‚’設定ã—ã¾ã—㟠-chat.BloodMagic.routing.link.master=マスターã®ãƒŽãƒ¼ãƒ‰ã¨ãƒªãƒ³ã‚¯ã•ã›ã¾ã—ãŸï¼ -chat.BloodMagic.routing.link=ノードをãŠäº’ã„ã«ãƒªãƒ³ã‚¯ã•ã›ã¾ã—㟠- -chat.BloodMagic.altar.comp.glowstone=グロウストーンã®ãƒ–ロック -chat.BloodMagic.altar.comp.bloodstone=大ããªãƒ–ラッドストーンレンガ -chat.BloodMagic.altar.comp.beacon=ビーコン -chat.BloodMagic.altar.comp.bloodrune=è¡€ã®ãƒ«ãƒ¼ãƒ³ -chat.BloodMagic.altar.comp.crystal=未実装ã®ã‚¢ã‚¤ãƒ†ãƒ  -chat.BloodMagic.altar.comp.notair=固体ブロック - -chat.BloodMagic.altar.nextTier=次ã®ã‚°ãƒ¬ãƒ¼ãƒ‰ã®è¡€ã®ç¥­å£‡ã«ã™ã‚‹ã«ã¯%sãŒ%sã®å ´æ‰€ã«ä¸è¶³ã—ã¦ã„ã¾ã™ã€‚ - -chat.BloodMagic.mimic.potionSet=ãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚’設置ã—ã¾ã—ãŸã€‚ -chat.BloodMagic.mimic.potionRemove=ãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚’無効化ã—ã¾ã—ãŸã€‚ -chat.BloodMagic.mimic.potionInterval.up=ãƒãƒ¼ã‚·ãƒ§ãƒ³ç”Ÿæˆã®æ™‚間間隔を以下ã«å¢—加ã—ã¾ã—ãŸ: %d tick -chat.BloodMagic.mimic.potionInterval.down=ãƒãƒ¼ã‚·ãƒ§ãƒ³ç”Ÿæˆã®æ™‚é–“é–“éš”ã‚’ä»¥ä¸‹ã«æ¸›å°‘ã—ã¾ã—ãŸ: %d tick -chat.BloodMagic.mimic.detectRadius.up=ãƒ—ãƒ¬ã‚¤ãƒ¤ãƒ¼ã®æ¤œçŸ¥ç¯„å›²ã‚’ä»¥ä¸‹ã«æ‹¡å¤§ã—ã¾ã—ãŸ: %d ブロック -chat.BloodMagic.mimic.detectRadius.down=ãƒ—ãƒ¬ã‚¤ãƒ¤ãƒ¼ã®æ¤œçŸ¥ç¯„囲を以下ã«ç¸®å°ã—ã¾ã—ãŸ: %d ブロック -chat.BloodMagic.mimic.potionSpawnRadius.up=ãƒãƒ¼ã‚·ãƒ§ãƒ³ç”Ÿæˆã®åŠ¹æžœç¯„å›²ã‚’ä»¥ä¸‹ã«æ‹¡å¤§ã—ã¾ã—ãŸ: %d ブロック -chat.BloodMagic.mimic.potionSpawnRadius.down=ãƒãƒ¼ã‚·ãƒ§ãƒ³ç”Ÿæˆã®åŠ¹æžœç¯„å›²ã‚’ä»¥ä¸‹ã«æ¸›å°‘ã—ã¾ã—ãŸ: %d ブロック - -# entity -entity.BloodMagic.SentientSpecter.name=ç†åŠ›ã®éœŠé­‚ -entity.BloodMagic.Mimic.name=ミミック - -# sekrit - -secret.BloodMagic.bread.bloody=&r&cè¡€ã®ãƒ‘ン -secret.BloodMagic.bread.bloody.desc=&o切迫ã—ãŸ&r&7緊急時専用 - -# Commands -commands.error.arg.invalid=無効ãªå¼•æ•°ã§ã™ -commands.error.arg.missing=引数ãŒè¶³ã‚Šã¾ã›ã‚“ -commands.error.arg.player.missing=ã‚ãªãŸã¯å®Ÿè¡Œã™ã‚‹å¯¾è±¡ãƒ—レイヤーを指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -commands.error.404=コマンドãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ï¼ -commands.error.unknown=未知ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã™ï¼ -commands.error.perm=ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹æ¨©é™ãŒã‚りã¾ã›ã‚“。 - -commands.success=正常ã«å®Ÿè¡Œã•れã¾ã—㟠- -commands.format.help=%s - %s -commands.format.error=%s - %s - -commands.help.usage=/bloodmagic help -commands.help.help="/bloodmagic" コマンドã§ãƒ˜ãƒ«ãƒ—情報ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - -commands.network.usage=/bloodmagic network [syphon|add|get|fill|cap] <プレイヤー> [é‡] -commands.network.help=LP ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ -commands.network.syphon.help=指定ã—ãŸãƒ—レイヤーã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰LPを削減ã—ã¾ã™ -commands.network.syphon.success=%d LPã ã‘ã€%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’削減ã™ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸã€‚ -commands.network.add.help=指定ã•れãŸãƒ—レイヤーã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®LPã‚’ã€LP増加ルールã®ç¯„囲内ã§å¢—加ã•ã›ã¾ã™ã€‚ -commands.network.add.success=%d LPã ã‘ã€%sã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’増加ã•ã›ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸã€‚ -commands.network.set.help=指定ã—ãŸãƒ—レイヤーã®LPを設定ã—ã¾ã™ã€‚ -commands.network.set.success=%sã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’%d LPã«è¨­å®šã™ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸã€‚ -commands.network.get.help=指定ã—ãŸãƒ—レイヤーã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®LPé‡ã‚’è¿”ã—ã¾ã™ã€‚ -commands.network.fill.help=指定ã—ãŸãƒ—レイヤーã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’%d LPã¾ã§æº€ãŸã—ã¾ã™ã€‚ -commands.network.fill.success=%sã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’最大ã¾ã§ä»˜ä¸Žã™ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸã€‚ -commands.network.cap.help=プレイヤーãŒå…¥æ‰‹ã§ãる最高ä½ã®ãƒ–ラッドオーブã§è²¯è”µå¯èƒ½ãªæœ€å¤§å€¤ã®LPを付与ã—ã¾ã™ã€‚ -commands.network.cap.success=%sã®LPãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®é™ç•Œå€¤ã¾ã§LPを付与ã™ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸã€‚ - -commands.bind.usage=/bloodmagic bind [true|false] [プレイヤー] -commands.bind.help=æ‰‹ã«æ‰€æŒã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã‚’çµåˆï¼åˆ†é›¢ã—ã¾ã™ã€‚ -commands.bind.success=çµåˆã«æˆåŠŸã—ã¾ã—㟠-commands.bind.remove.success=åˆ†é›¢ã«æˆåŠŸã—ã¾ã—㟠- -commands.orb.usage=/bloodmagic orb [set|get] <プレイヤー> [グレード] -commands.orb.help=対象プレイヤーã®ãƒ–ラッドオーブã®ã‚°ãƒ¬ãƒ¼ãƒ‰ã®æœ€å¤§å€¤ã‚’設定ã€å–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ã„ã¾ã™ã€‚ - -commands.bind.usage=/bind <プレイヤー> -commands.bind.success=アイテムã®ç™»éŒ²ãŒæˆåŠŸã—ã¾ã—ãŸï¼ -commands.bind.failed.noPlayer=指定ã•れãŸãƒ—レイヤーã¯å­˜åœ¨ã—ã¾ã›ã‚“ -commands.bind.failed.alreadyBound=ã‚¢ã‚¤ãƒ†ãƒ ã¯æ—¢ã«ç™»éŒ²æ¸ˆã¿ã§ã™ï¼› /unbind コマンドã§ç™»éŒ²è§£é™¤ã—ã¦ãã ã•ã„ -commands.bind.failed.notBindable=アイテムã®ç™»éŒ²ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—㟠-commands.unbind.usage=/unbind -commands.unbind.success=アイテムã®ç™»éŒ²è§£é™¤ãŒæˆåŠŸã—ã¾ã—ãŸï¼ -commands.unbind.failed.notBindable=アイテムã®ç™»éŒ²è§£é™¤ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—㟠-commands.soulnetwork.usage=/soulnetwork <プレイヤー> [é‡] -commands.soulnetwork.add.success=%d LPã ã‘ã€%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’増加ã•ã›ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸï¼ -commands.soulnetwork.subtract.success=%d LPã ã‘ã€%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’減少ã•ã›ã‚‹ã“ã¨ã«æˆåŠŸã—ã¾ã—ãŸï¼ -commands.soulnetwork.fill.success=正常ã«%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’満ãŸã—ã¾ã—ãŸï¼ -commands.soulnetwork.empty.success=正常ã«%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’空ã«ã—ã¾ã—ãŸï¼ -commands.soulnetwork.get.success=%dã ã‘%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ã¯LPãŒã‚りã¾ã™ï¼ -commands.soulnetwork.noPlayer=指定ã•れãŸãƒ—レイヤーã¯å­˜åœ¨ã—ã¾ã›ã‚“ -commands.soulnetwork.noCommand=指定ã•れãŸã‚³ãƒžãƒ³ãƒ‰ã¯ã‚りã¾ã›ã‚“ -commands.soulnetwork.notACommand=有効ãªã‚³ãƒžãƒ³ãƒ‰ã§ã¯ã‚りã¾ã›ã‚“ -commands.soulnetwork.fillMax.success=正常ã«%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ã‚ªãƒ¼ãƒ–ã®æœ€å¤§å€¤ã¾ã§LPを供給ã—ã¾ã—ãŸï¼ -commands.soulnetwork.create.success=正常ã«%sã®ã‚½ã‚¦ãƒ«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’構築ã—ã¾ã—ãŸ(オーブã®ã‚°ãƒ¬ãƒ¼ãƒ‰ï¼š %d) - -# GUI -tile.BloodMagic.inputNode.name=入力ノード -tile.BloodMagic.outputNode.name=出力ノード - -# Keybinds -BloodMagic.keybind.open_holding=貯蔵ã®å°ç« ã‚’é–‹ã -BloodMagic.keybind.cycle_holding_pos=å°ç« ã‚’é †ã«å›žã™ (+) -BloodMagic.keybind.cycle_holding_neg=å°ç« ã‚’逆ã«å›žã™ (-) - -# JustEnoughItems -jei.BloodMagic.recipe.altar=è¡€ã®ç¥­å£‡ -jei.BloodMagic.recipe.binding=錬金術魔法陣(çµåˆ) -jei.BloodMagic.recipe.alchemyArrayCrafting=錬金術魔法陣 -jei.BloodMagic.recipe.soulForge=業ç«ã®ã‹ã¾ã© -jei.BloodMagic.recipe.alchemyTable=錬金術テーブル -jei.BloodMagic.recipe.requiredLP=LP: %d -jei.BloodMagic.recipe.requiredTier=グレード: %d -jei.BloodMagic.recipe.consumptionRate=消費率: %d LP/t -jei.BloodMagic.recipe.drainRate=消費率: %d LP/t -jei.BloodMagic.recipe.minimumSouls=最å°ï¼š %1$,.2fウィル -jei.BloodMagic.recipe.soulsDrained=消費: %1$,.2fウィル -jei.BloodMagic.recipe.lpDrained=消費: %,d LP -jei.BloodMagic.recipe.ticksRequired=時間: %,d Ticks - -jei.BloodMagic.desc.altarBuilder=デãƒãƒƒã‚°ã‚„テストã«åˆ©ç”¨ã™ã‚‹ã‚¯ãƒªã‚¨ã‚¤ãƒ†ã‚£ãƒ–モード専用アイテム。\n\nShift+å³ã‚¯ãƒªãƒƒã‚¯ã§ä½œæˆã™ã‚‹ã‚°ãƒ¬ãƒ¼ãƒ‰ã®å¤‰æ›´ã‚’行ã„ã€å³ã‚¯ãƒªãƒƒã‚¯ã§ç¥­å£‡ã‚’構築。\n\nè¡€ã®ç¥­å£‡ã‚’左クリックã§å„€å¼çŸ³ã”ã¨ç ´å£Šã•れã¾ã™ã€‚ -jei.BloodMagic.desc.demonicWill=生物ãŒå†…包ã™ã‚‹æ‚ªé­”ã®å› å­ã€‚\n\nMobã‚’ç†åŠ›ã®å‰£ã«ã‚ˆã£ã¦æ®ºå®³ã™ã‚‹ã€ã¾ãŸã¯ç°¡ç´ ãªæŠ•ã’罠を投ã’ã€ç™½ã„パーティクルãŒç™ºç”Ÿã—ã¦ã„ã‚‹é–“ã«æ®ºå®³ã™ã‚‹ã“ã¨ã§å…¥æ‰‹ãŒã§ãる。 - -# WAILA -waila.BloodMagic.sneak=&oスニークã§è©³ç´°æƒ…å ± -waila.BloodMagic.array.reagent=試薬: %s -waila.BloodMagic.array.catalyst=触媒: %s -option.BloodMagic.bypassSneak=スニークã§å›žé¿ -option.BloodMagic.bloodAltar=è¡€ã®ç¥­å£‡ -option.BloodMagic.ritualController=å„€å¼çŸ³ -option.BloodMagic.teleposer=テレãƒãƒ¼ã‚¶ãƒ¼ -option.BloodMagic.array=錬金術魔法陣 - -# Thaumcraft -tc.research_category.BLOODMAGIC=血紅ã®ç§˜å„€ - -# Thaumcraft Research -bloodmagic.research_name.BLOODMAGIC=Blood Magic -bloodmagic.research_text.BLOODMAGIC=血紅ã®ç§˜å„€ -bloodmagic.research_page.BLOODMAGIC.1=Blood Magic ã®é ˜åŸŸã¯å¸¸ã«å­¤ç‹¬ã§ã‚り〠â€å€‹äººã®â€ 技能ã¯ä¸–é–“ã‹ã‚‰ç–Žã¾ã‚Œã€æ™‚ã«ã¯å¿ƒã‚’ç—…ã‚“ã§ã—ã¾ã†ã“ã¨ã‚‚ã‚ã‚‹ã‹ã‚‚知れãªã„。ã—ã‹ã—ã€è‡ªå·±çŠ ç‰²ã¨ãƒ©ã‚¤ãƒ•エッセンスã®åŠ›ã¯ä¸€èˆ¬ã®è¡€ã®é­”術師を超ãˆãŸé ˜åŸŸã«åˆ°é”ã—ã€ãれã©ã“ã‚ã‹äººçŸ¥ã‚’è¶…ãˆãŸèƒ½åŠ›ã‚’èº«ã«ã¤ã‚‰ã‚Œã‚‹ã ã‚ã†ã“ã¨ã¯å®Œå…¨ã«æ˜Žç™½ã§ã‚ã‚ã†ï¼ - -# Buttons -button.bloodmagic.tooltip.fill=ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«å……å¡« \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/lang/ko_KR.lang b/src/main/resources/assets/bloodmagic/lang/ko_KR.lang deleted file mode 100644 index 7daaacae..00000000 --- a/src/main/resources/assets/bloodmagic/lang/ko_KR.lang +++ /dev/null @@ -1,194 +0,0 @@ -#Block Localization -tile.bloodAltar.name=í”¼ì˜ ì œë‹¨ -tile.bloodRune.blank.name=í”¼ì˜ ë£¬ -tile.bloodRune.fill.name=저장량ì¦ê°€ì˜ 룬 -tile.bloodRune.empty.name=í¡ìˆ˜ì˜ 룬 -tile.bloodRune.orb.name=ë³´ì£¼ì˜ ë£¬ -tile.bloodRune.betterCapacity.name=Rune of Superior Capacity -tile.speedRune.name=ì†ë„ì˜ ë£¬ -tile.efficiencyRune.name=íš¨ìœ¨ì˜ ë£¬ -tile.runeOfSacrifice.name=í¬ìƒì˜ 룬 -tile.runeOfSelfSacrifice.name=ìžê¸°í¬ìƒì˜ 룬 -tile.ritualStone.name=ì˜ì‹ì˜ ëŒ -tile.blockMasterStone.name=ì˜ì‹ì˜ëŒ 제어 -tile.bloodSocket.name=Filled Socket -tile.imperfectRitualStone.name=Imperfect Ritual Stone -tile.armourForge.name=Soul Armour Forge -tile.emptySocket.name=빈 소켓 -tile.bloodStoneBrick.name=Bloodstone Brick -tile.largeBloodStoneBrick.name=í° ì„ í˜ˆì„ìž¬ë²½ëŒ -tile.blockWritingTable.name=Alchemic Chemistry Set -tile.blockHomHeart.name=Spell Table -tile.bloodPedestal.name=Arcane Pedestal -tile.bloodPlinth.name=Arcane Plinth -tile.bloodTeleposer.name=Teleposer -tile.blockConduit.name=Spell Conduit -tile.blockSpellParadigm.projectile.name=Particle Generator -tile.blockSpellParadigm.self.name=Self Augmentator -tile.blockSpellParadigm.melee.name=Melee Aggregator -tile.blockSpellParadigm.tool.name=Tool Forger -tile.blockSpellEnhancement.power1.name=Unstable Spell Empowerer -tile.blockSpellEnhancement.power2.name=Standard Spell Empowerer -tile.blockSpellEnhancement.power3.name=Reinforced Spell Empowerer -tile.blockSpellEnhancement.power4.name=Imbued Spell Empowerer -tile.blockSpellEnhancement.power5.name=Demonic Spell Empowerer -tile.blockSpellEnhancement.cost1.name=Unstable Spell Dampener -tile.blockSpellEnhancement.cost2.name=Standard Spell Dampener -tile.blockSpellEnhancement.cost3.name=Reinforced Spell Dampener -tile.blockSpellEnhancement.cost4.name=Imbued Spell Dampener -tile.blockSpellEnhancement.cost5.name=Demonic Spell Dampener -tile.blockSpellEnhancement.potency1.name=Unstable Spell Augmentor -tile.blockSpellEnhancement.potency2.name=Standard Spell Augmentor -tile.blockSpellEnhancement.potency3.name=Reinforced Spell Augmentor -tile.blockSpellEnhancement.potency4.name=Imbued Spell Augmentor -tile.blockSpellEnhancement.potency5.name=Demonic Spell Augmentor -tile.blockSpellModifier.default.name=Default Spell Modifier -tile.blockSpellModifier.offensive.name=Offensive Spell Modifier -tile.blockSpellModifier.defensive.name=Defensive Spell Modifier -tile.blockSpellModifier.environmental.name=Environmental Spell Modifier -tile.blockSpellEffect.fire.name=Crucible of Fire -tile.blockSpellEffect.ice.name=Ice Maker -tile.blockSpellEffect.wind.name=Wind Generator -tile.blockSpellEffect.earth.name=Earth Former -tile.alchemicCalcinator.name=Alchemic Calcinator -tile.crystalBelljar.name=Crystal Belljar -tile.blockReagentConduit.name=Alchemy Relay - -#Item Localization -item.weakBloodOrb.name=약한 ì„ í˜ˆì˜ ë³´ì£¼ -item.apprenticeBloodOrb.name=견습 ì„ í˜ˆì˜ ë³´ì£¼ -item.magicianBloodOrb.name=ë§ˆë²•ì‚¬ì˜ ì„ í˜ˆë³´ì£¼ -item.masterBloodOrb.name=마스터 ì„ í˜ˆì˜ ë³´ì£¼ -item.archmageBloodOrb.name=ì•„í¬ë©”ì´ì§€ì˜ 선혈보주 -item.energyBlast.name=Energy Blaster -item.energySword.name=Bound Blade -item.lavaCrystal.name=용암수정 -item.waterSigil.name=ë¬¼ì˜ ë¶€ì  -item.lavaSigil.name=ìš©ì•”ì˜ ë¶€ì  -item.voidSigil.name=ê³µí—ˆì˜ ë¶€ì  -item.blankSlate.name=빈 íŒ -item.reinforcedSlate.name=ë³´ê°•ëœ íŒ -item.sacrificialDagger.name=í¬ìƒì˜ ê²€ -item.daggerOfSacrifice.name=í¬ìƒì˜ 단검 -item.airSigil.name=ë°”ëžŒì˜ ë¶€ì  -item.sigilOfTheFastMiner.name=쾌ì†ì˜ê´‘ë¶€ ë¶€ì  -item.sigilOfElementalAffinity.name=ì›ì†Œì¹œí™”ì˜ ë¶€ì  -item.sigilOfHaste.name=Sigil of Haste -item.sigilOfHolding.name=ë³´ê´€ì˜ ë¶€ì  -item.divinationSigil.name=ì ìˆ ì˜ 시질 -item.waterScribeTool.name=Elemental Inscription Tool: Water -item.fireScribeTool.name=Elemental Inscription Tool: Fire -item.earthScribeTool.name=Elemental Inscription Tool: Earth -item.airScribeTool.name=Elemental Inscription Tool: Air -item.duskScribeTool.name=Elemental Inscription Tool: Dusk -item.activationCrystalWeak.name=Weak Activation Crystal -item.activationCrystalAwakened.name=Awakened Activation Crystal -item.boundPickaxe.name=Bound Pickaxe -item.boundAxe.name=Bound Axe -item.boundShovel.name=Bound Shovel -item.boundHelmet.name=Bound Helmet -item.boundPlate.name=Bound Plate -item.boundLeggings.name=Bound Leggings -item.boundBoots.name=Bound Boots -item.weakBloodShard.name=Weak Blood Shard -item.growthSigil.name=ìˆ˜í’€ì˜ ë¶€ì  -item.blankSpell.name=Unbound Crystal -item.alchemyFlask.name=Potion Flask -item.standardBindingAgent.name=Standard Binding Agent -item.mundanePowerCatalyst.name=Mundane Power Catalyst -item.averagePowerCatalyst.name=Average Power Catalyst -item.greaterPowerCatalyst.name=Greater Power Catalyst -item.mundaneLengtheningCatalyst.name=Mundane Lengthening Catalyst -item.averageLengtheningCatalyst.name=Average Lengthening Catalyst -item.greaterLengtheningCatalyst.name=Greater Lengthening Catalyst -item.incendium.name=Incendium -item.magicales.name=Magicales -item.sanctus.name=Sanctus -item.aether.name=Aether -item.simpleCatalyst.name=Simple Catalyst -item.crepitous.name=Crepitous -item.crystallos.name=Crystallos -item.terrae.name=Terrae -item.aquasalus.name=Aquasalus -item.tennebrae.name=Tenebrae -item.demonBloodShard.name=Demon Blood Shard -item.sigilOfWind.name=Sigil of the Whirlwind -item.telepositionFocus.name=Teleposition Focus -item.enhancedTelepositionFocus.name=Enhanced Teleposition Focus -item.reinforcedTelepositionFocus.name=Reinforced Teleposition Focus -item.demonicTelepositionFocus.name=Demonic Teleposition Focus -item.imbuedSlate.name=Imbued Slate -item.demonicSlate.name=Demonic Slate -item.sigilOfTheBridge.name=ì˜ê°ì˜ ë¶€ì  -item.armourInhibitor.name=Armour Inhibitor -item.cheatyItem.name=Orb of Testing -item.weakFillingAgent.name=Weak Filling Agent -item.standardFillingAgent.name=Standard Filling Agent -item.enhancedFillingAgent.name=Enhanced Filling Agent -item.weakBindingAgent.name=Weak Binding Agent -item.ritualDiviner.name=Ritual Diviner -item.sigilOfMagnetism.name=ìžê¸°ë ¥ ë¶€ì  -item.itemDiabloKey.name=Key of Binding -item.energyBazooka.name=Energy Bazooka -item.bloodLightSigil.name=ì„ í˜ˆì˜ ëž¨í”„ ë¶€ì  -item.itemComplexSpellCrystal.name=Complex Spell Crystal -item.itemSigilOfSupression.name=Sigil of Supression -item.itemSigilOfEnderSeverance.name=Sigil of Ender Severance -item.bucketLife.name=Bucket of Life -item.bloodMagicBaseItem.QuartzRod.name=Quartz Rod -item.bloodMagicBaseItem.EmptyCore.name=Empty Core -item.bloodMagicBaseItem.MagicalesCable.name=Magicales Cable -item.bloodMagicBaseItem.WoodBrace.name=Wooden Brace -item.bloodMagicBaseItem.StoneBrace.name=Stone Brace -item.bloodMagicBaseItem.ProjectileCore.name=Projectile Core -item.bloodMagicBaseItem.SelfCore.name=Self Core -item.bloodMagicBaseItem.MeleeCore.name=Melee Core -item.bloodMagicBaseItem.ToolCore.name=Tool Core -item.bloodMagicBaseItem.ParadigmBackPlate.name=Paradigm Plate -item.bloodMagicBaseItem.OutputCable.name=Output Spell Cable -item.bloodMagicBaseItem.InputCable.name=Input Spell Cable -item.bloodMagicBaseItem.FlameCore.name=Fire Core -item.bloodMagicBaseItem.IcyCore.name=Icy Core -item.bloodMagicBaseItem.GustCore.name=Gusty Core -item.bloodMagicBaseItem.EarthenCore.name=Earthen Core -item.bloodMagicBaseItem.CrackedRunicPlate.name=Cracked Runic Plate -item.bloodMagicBaseItem.RunicPlate.name=Runic Plate -item.bloodMagicBaseItem.ScribedRunicPlate.name=Imbued Runic Plate -item.bloodMagicBaseItem.DefaultCore.name=Unattuned Core -item.bloodMagicBaseItem.OffensiveCore.name=Offensive Core -item.bloodMagicBaseItem.DefensiveCore.name=Defensive Core -item.bloodMagicBaseItem.EnvironmentalCore.name=Environmental Core -item.bloodMagicBaseItem.PowerCore.name=Power Core -item.bloodMagicBaseItem.CostCore.name=Reduction Core -item.bloodMagicBaseItem.PotencyCore.name=Potency Core -item.bloodMagicBaseItem.ObsidianBrace.name=Obsidian Brace -item.bloodMagicAlchemyItem.Offensa.name=Offensa -item.bloodMagicAlchemyItem.Praesidium.name=Praesidium -item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae -item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Strengthened Catalyst -item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Concentrated Catalyst -item.bloodMagicAlchemyItem.FracturedBone.name=Fractured Bone -item.bloodMagicAlchemyItem.Virtus.name=Virtus -item.bloodMagicAlchemyItem.Reductus.name=Reductus -item.bloodMagicAlchemyItem.Potentia.name=Potentia -item.sanguineHelmet.name=Sanguine Helmet -item.itemSeerSigil.name=Sigil of Sight -#item.itemFluidSigil.name= -item.multiTool.name=Dynamic Mace -item.itemCombinationalCatalyst.name=Combinational Catalyst -item.sanguineRobe.name=Sanguine Robes -item.sanguinePants.name=Sanguine Leggings -item.sanguineBoots.name=Sanguine Boots -item.itemAttunedCrystal.name=Alchemic Router -item.itemTankSegmenter.name=Alchemic Segmenter -item.destinationClearer.name=Alchemic Cleanser - -#Creative Tab -itemGroup.tabBloodMagic=선혈ì˜ë§ˆìˆ [Blood Magic] - -#Extra Strings -bm.string.consume=사용량 -bm.string.drain=í¡ìˆ˜ëŸ‰ -bm.string.tier=í‹°ì–´ -bm.string.crafting.orb.shaped=ë¸”ëŸ¬ë“œë§¤ì§ ì˜¤ë¸Œ 조합법 -bm.string.crafting.orb.shapeless=ë¸”ëŸ¬ë“œë§¤ì§ ì˜¤ë¸Œ 조합법 diff --git a/src/main/resources/assets/bloodmagic/lang/ru_RU.lang b/src/main/resources/assets/bloodmagic/lang/ru_RU.lang deleted file mode 100644 index 9348eb90..00000000 --- a/src/main/resources/assets/bloodmagic/lang/ru_RU.lang +++ /dev/null @@ -1,404 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=Blood Magic -itemGroup.BloodMagic.creativeTabTome=Blood Magic Upgrade Tomes - -#Items -item.BloodMagic.activationCrystal.weak.name=Слабый криÑтал активации -item.BloodMagic.activationCrystal.awakened.name=Пробуждённый криÑтал активации -item.BloodMagic.activationCrystal.creative.name=ТворчеÑкий криÑтал активации - -item.BloodMagic.sacrificialDagger.normal.name=Жертвенный кинжал -item.BloodMagic.sacrificialDagger.creative.name=ТворчеÑкий жертвенный кинжал -item.BloodMagic.pack.selfSacrifice.name=Blood Letter's Pack -item.BloodMagic.pack.sacrifice.name=Coat of Arms -item.BloodMagic.daggerOfSacrifice.name=Кинжал Ð¶ÐµÑ€Ñ‚Ð²Ð¾Ð¿Ñ€Ð¸Ð½Ð¾ÑˆÐµÐ½Ð¸Ñ - -item.BloodMagic.lavaCrystal.name=Лавовый криÑтал - -item.BloodMagic.bound.sword.name=СвÑзанный клинок -item.BloodMagic.bound.pickaxe.name=СвÑÐ·Ð°Ð½Ð½Ð°Ñ ÐºÐ¸Ñ€ÐºÐ° -item.BloodMagic.bound.axe.name=СвÑзанный топор -item.BloodMagic.bound.shovel.name=СвÑÐ·Ð°Ð½Ð½Ð°Ñ Ð»Ð¾Ð¿Ð°Ñ‚Ð° - -item.BloodMagic.bucket.lifeEssence.name=Ведро жизни - -item.BloodMagic.scribe.water.name=ИнÑтрумент Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ñлемента: Вода -item.BloodMagic.scribe.fire.name=ИнÑтрумент Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ñлемента: Огонь -item.BloodMagic.scribe.earth.name=ИнÑтрумент Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ñлемента: Ð—ÐµÐ¼Ð»Ñ -item.BloodMagic.scribe.air.name=ИнÑтрумент Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ñлемента: Воздух -item.BloodMagic.scribe.dusk.name=ИнÑтрумент Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ñлемента: Сумерки -item.BloodMagic.scribe.dawn.name=ИнÑтрумент Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ñлемента: РаÑÑвет - -item.BloodMagic.focus.weak.name=Ð¤Ð¾ÐºÑƒÑ Ñ‚ÐµÐ»ÐµÐ¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ -item.BloodMagic.focus.enhanced.name=Улучшенный Ñ„Ð¾ÐºÑƒÑ Ñ‚ÐµÐ»ÐµÐ¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ -item.BloodMagic.focus.reinforced.name=УÑиленный Ñ„Ð¾ÐºÑƒÑ Ñ‚ÐµÐ»ÐµÐ¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ -item.BloodMagic.focus.demonic.name=ДемоничеÑкий Ñ„Ð¾ÐºÑƒÑ Ñ‚ÐµÐ»ÐµÐ¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ - -item.BloodMagic.slate.blank.name=ЧиÑÑ‚Ð°Ñ Ð¿Ð»Ð¸Ñ‚ÐºÐ° -item.BloodMagic.slate.reinforced.name=Ð£ÐºÑ€ÐµÐ¿Ð»Ñ‘Ð½Ð½Ð°Ñ Ð¿Ð»Ð¸Ñ‚ÐºÐ° -item.BloodMagic.slate.imbued.name=ÐŸÑ€Ð¾Ð¿Ð¸Ñ‚Ð°Ð½Ð½Ð°Ñ Ð¿Ð»Ð¸Ñ‚ÐºÐ° -item.BloodMagic.slate.demonic.name=ДемоничеÑÐºÐ°Ñ Ð¿Ð»Ð¸Ñ‚ÐºÐ° -item.BloodMagic.slate.ethereal.name=Ð­Ñ„Ð¸Ñ€Ð½Ð°Ñ Ð¿Ð»Ð¸Ñ‚ÐºÐ° - -item.BloodMagic.orb.weak.name=Слабый кровавый шар -item.BloodMagic.orb.apprentice.name=Кровавый шар ученика -item.BloodMagic.orb.magician.name=Кровавый шар мага -item.BloodMagic.orb.master.name=Кровавый шар маÑтера -item.BloodMagic.orb.archmage.name=Кровавый шар архимага -item.BloodMagic.orb.transcendent.name=Ðеобыкновенный кровавый шар - -item.BloodMagic.reagent.incendium.name=Incendium -item.BloodMagic.reagent.magicales.name=Magicales -item.BloodMagic.reagent.sanctus.name=Sanctus -item.BloodMagic.reagent.aether.name=Aether -item.BloodMagic.reagent.crepitous.name=Crepitous -item.BloodMagic.reagent.crystallos.name=Crystallos -item.BloodMagic.reagent.terrae.name=Terrae -item.BloodMagic.reagent.aquasalus.name=Aquasalus -item.BloodMagic.reagent.tennebrae.name=Tennebrae -item.BloodMagic.reagent.offensa.name=Offensa -item.BloodMagic.reagent.praesidium.name=Praesidium -item.BloodMagic.reagent.orbisterrae.name=Orbis Terrae -item.BloodMagic.reagent.virtus.name=Virtus -item.BloodMagic.reagent.reductus.name=Reductus -item.BloodMagic.reagent.potentia.name=Potentia - -item.BloodMagic.bloodShard.weak.name=Слабый кровавый оÑколок -item.BloodMagic.bloodShard.demon.name=ДемоничеÑкий кровавый оÑколок - -item.BloodMagic.baseComponent.reagentWater.name=Реагент воды -item.BloodMagic.baseComponent.reagentLava.name=Реагент лавы -item.BloodMagic.baseComponent.reagentAir.name=Реагент воздуха -item.BloodMagic.baseComponent.reagentFastMiner.name=Реагент добычи -item.BloodMagic.baseComponent.reagentVoid.name=Реагент пуÑтоты -item.BloodMagic.baseComponent.reagentGrowth.name=Реагент роÑта -item.BloodMagic.baseComponent.reagentAffinity.name=Реагент Ñтихийного родÑтва -item.BloodMagic.baseComponent.reagentSight.name=Реагент взглÑда -item.BloodMagic.baseComponent.reagentBinding.name=Реагент ÑвÑзи -item.BloodMagic.baseComponent.reagentSuppression.name=Реагент Ð¿Ð¾Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ -item.BloodMagic.baseComponent.frameParts.name=ЧаÑти каркаÑа -item.BloodMagic.baseComponent.reagentBloodLight.name=Реагент Ñвета -item.BloodMagic.baseComponent.reagentMagnetism.name=Реагент притÑÐ¶ÐµÐ½Ð¸Ñ -item.BloodMagic.baseComponent.reagentHaste.name=Реагент ÑкороÑти -item.BloodMagic.baseComponent.reagentBridge.name=Реагент моÑта -item.BloodMagic.baseComponent.reagentCompression.name=Реагент ÑÐ¶Ð°Ñ‚Ð¸Ñ -item.BloodMagic.baseComponent.reagentSeverance.name=Реагент Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð¸Ñ - -item.BloodMagic.baseComponent.reagentTeleposition.name=Реагент телепозиции -item.BloodMagic.baseComponent.reagentTransposition.name=Реагент транÑпозиции - -item.BloodMagic.monsterSoul.base.name=ДемоничеÑÐºÐ°Ñ ÑÐ½ÐµÑ€Ð³Ð¸Ñ - -item.BloodMagic.sigil.air.name=Сигил воздуха -item.BloodMagic.sigil.bloodLight.name=Сигил кровавого Ñветильника -item.BloodMagic.sigil.compression.name=Сигил ÑÐ¶Ð°Ñ‚Ð¸Ñ -item.BloodMagic.sigil.divination.name=Сигил предÑÐºÐ°Ð·Ð°Ð½Ð¸Ñ -item.BloodMagic.sigil.water.name=Сигил воды -item.BloodMagic.sigil.lava.name=Сигил лавы -item.BloodMagic.sigil.void.name=Сигил пуÑтоты -item.BloodMagic.sigil.greenGrove.name=Сигил зеленой рощи -item.BloodMagic.sigil.elementalAffinity.name=Сигил Ñтихийного родÑтва -item.BloodMagic.sigil.haste.name=Сигил ÑкороÑти -item.BloodMagic.sigil.suppression.name=Сигил Ð¿Ð¾Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ -item.BloodMagic.sigil.magnetism.name=Сигил притÑÐ¶ÐµÐ½Ð¸Ñ -item.BloodMagic.sigil.fastMiner.name=Сигил быÑтрого ÐºÐ¾Ð¿Ð°Ñ‚ÐµÐ»Ñ -item.BloodMagic.sigil.seer.name=Сигил Ð·Ñ€ÐµÐ½Ð¸Ñ -item.BloodMagic.sigil.phantomBridge.name=Сигил призрачного моÑта -item.BloodMagic.sigil.whirlwind.name=Сигил Ð²Ð¸Ñ…Ñ€Ñ -item.BloodMagic.sigil.enderSeverance.name=Сигил разрыва ÐšÑ€Ð°Ñ - -item.BloodMagic.sigil.teleposition.name=Сигил телепозиции -item.BloodMagic.sigil.transposition.name=Сигил транÑпозиции - -item.BloodMagic.livingArmour.helmet.name=Живой шлем -item.BloodMagic.livingArmour.chest.name=Ð–Ð¸Ð²Ð°Ñ ÐºÐ¸Ñ€Ð°Ñа -item.BloodMagic.livingArmour.legs.name=Живые поножи -item.BloodMagic.livingArmour.boots.name=Живые ботинки -item.BloodMagic.sentientArmour.helmet.name=Разумный шлем -item.BloodMagic.sentientArmour.chest.name=Ð Ð°Ð·ÑƒÐ¼Ð½Ð°Ñ ÐºÐ¸Ñ€Ð°Ñа -item.BloodMagic.sentientArmour.legs.name=Разумные поножи -item.BloodMagic.sentientArmour.boots.name=Разумные ботинки - -item.BloodMagic.altarMaker.name=Altar Maker - -item.BloodMagic.ritualDivinernormal.name=ПредÑказатель ритуала -item.BloodMagic.ritualDivinerdusk.name=ПредÑказатель ритуала [Сумерки] -item.BloodMagic.ritualDivinerdawn.name=ПредÑказатель ритуала [РаÑÑвет] - -item.BloodMagic.arcaneAshes.name=Волшебный пепел -item.BloodMagic.upgradeTome.name=Living Armour Upgrade Tome -item.BloodMagic.upgradeTrainer.name=Living Armour Training Bracelet - -item.BloodMagic.sentientSword.name=Разумный меч -item.BloodMagic.soulGem.petty.name=Мелкий адÑкий камень -item.BloodMagic.soulGem.lesser.name=Ðебольшой адÑкий камень -item.BloodMagic.soulGem.common.name=Обычный адÑкий камень -item.BloodMagic.soulGem.greater.name=Большой адÑкий камень -item.BloodMagic.soulGem.grand.name=Великий адÑкий камень -item.BloodMagic.soulSnare.base.name=ПроÑÑ‚Ð°Ñ Ð»Ð¾Ð²ÑƒÑˆÐºÐ° -item.BloodMagic.sentientBow.name=Разумный лук -item.BloodMagic.sentientArmourGem.name=Разумный камень - -item.BloodMagic.nodeRouter.name=Node Router -item.BloodMagic.itemFilter.exact.name=Точный фильтр предметов -item.BloodMagic.itemFilter.ignoreNBT.name=NBT фильтр предметов -item.BloodMagic.itemFilter.modItems.name=Mod фильтр предметов -item.BloodMagic.itemFilter.oreDict.name=OreDict фильтр предметов - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=Ð–Ð¸Ð·Ð½ÐµÐ½Ð½Ð°Ñ ÑÑÑÐµÐ½Ñ†Ð¸Ñ - -tile.BloodMagic.stone.ritual.master.name=Главный ритуальный камень -tile.BloodMagic.stone.ritual.imperfect.name=Ðеполноценный ритуальный камень - -tile.BloodMagic.altar.name=Кровавый алтарь -tile.BloodMagic.alchemyArray.name=&r&fÐлхимичеÑÐºÐ°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð° - -tile.BloodMagic.rune.blank.name=ЧиÑÑ‚Ð°Ñ Ñ€ÑƒÐ½Ð° -tile.BloodMagic.rune.speed.name=Руна ÑкороÑти -tile.BloodMagic.rune.efficiency.name=Руна ÑффективноÑти -tile.BloodMagic.rune.sacrifice.name=Руна Ð¶ÐµÑ€Ñ‚Ð²Ð¾Ð¿Ñ€Ð¸Ð½Ð¾ÑˆÐµÐ½Ð¸Ñ -tile.BloodMagic.rune.selfSacrifice.name=Руна ÑÐ°Ð¼Ð¾Ð¿Ð¾Ð¶ÐµÑ€Ñ‚Ð²Ð¾Ð²Ð°Ð½Ð¸Ñ -tile.BloodMagic.rune.displacement.name=Руна Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ -tile.BloodMagic.rune.capacity.name=Руна ёмкоÑти -tile.BloodMagic.rune.augCapacity.name=Руна дополнительной ёмкоÑти -tile.BloodMagic.rune.orb.name=Руна шара -tile.BloodMagic.rune.acceleration.name=Руна уÑÐºÐ¾Ñ€ÐµÐ½Ð¸Ñ -tile.BloodMagic.rune.charging.name=Руна зарÑда - - -tile.BloodMagic.ritualStone.blank.name=Ритуальный камень -tile.BloodMagic.ritualStone.water.name=Ритуальный камень воды -tile.BloodMagic.ritualStone.fire.name=Ритуальный камень Ð¾Ð³Ð½Ñ -tile.BloodMagic.ritualStone.earth.name=Ритуальный камень земли -tile.BloodMagic.ritualStone.air.name=Ритуальный камень воздуха -tile.BloodMagic.ritualStone.dusk.name=Ритуальный камень Ñумерек -tile.BloodMagic.ritualStone.dawn.name=Ритуальный камень раÑÑвета - -tile.BloodMagic.bloodstonebrick.large.name=Большой кровавый кирпич -tile.BloodMagic.bloodstonebrick.brick.name=Кровавый кирпич -tile.BloodMagic.crystal.large.name=Большой криÑтальный кирпич -tile.BloodMagic.crystal.brick.name=КриÑтальный кирпич -tile.BloodMagic.bloodLight.name=Кровавый Ñвет -tile.BloodMagic.spectralBlock.name=Иллюзорный блок -tile.BloodMagic.phantom.name=Призрачный блок -tile.BloodMagic.incenseAltar.name=Жертвенник Ð´Ð»Ñ ÐºÑƒÑ€ÐµÐ½Ð¸Ð¹ - -tile.BloodMagic.teleposer.name=Телепозер -tile.BloodMagic.soulForge.name=ÐдÑÐºÐ°Ñ ÐºÑƒÐ·Ð½Ð¸Ñ†Ð° -tile.BloodMagic.demonCrucible.name=ДемоничеÑкий тигель - -tile.BloodMagic.masterRouting.name=Master Routing Node -tile.BloodMagic.outputRouting.name=Output Routing Node -tile.BloodMagic.inputRouting.name=Input Routing Node -tile.BloodMagic.itemRouting.name=Routing Node - -tile.BloodMagic.path.wood.name=ДеревÑÐ½Ð½Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.woodTile.name=Ð£Ð·Ð¾Ñ€Ð½Ð°Ñ Ð´ÐµÑ€ÐµÐ²ÑÐ½Ð½Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.stone.name=ÐšÐ°Ð¼ÐµÐ½Ð½Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.stoneTile.name=Ð£Ð·Ð¾Ñ€Ð½Ð°Ñ ÐºÐ°Ð¼ÐµÐ½Ð½Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.wornstone.name=Ð¡Ñ‚Ð°Ñ€Ð°Ñ ÐºÐ°Ð¼ÐµÐ½Ð½Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.wornstoneTile.name=Ð£Ð·Ð¾Ñ€Ð½Ð°Ñ ÑÑ‚Ð°Ñ€Ð°Ñ ÐºÐ°Ð¼ÐµÐ½Ð½Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.obsidian.name=ОбÑÐ¸Ð´Ð¸Ð°Ð½Ð¾Ð²Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° -tile.BloodMagic.path.obsidianTile.name=Ð£Ð·Ð¾Ñ€Ð½Ð°Ñ Ð¾Ð±ÑÐ¸Ð´Ð¸Ð°Ð½Ð¾Ð²Ð°Ñ Ð´Ð¾Ñ€Ð¾Ð¶ÐºÐ° - -tile.BloodMagic.dimensionalPortal.name=ПроÑтранÑтвенный портал -tile.BloodMagic.bloodTank.name=Резервуар крови - -# Tooltips -tooltip.BloodMagic.orb.desc=Хранит жизненную ÑÑÑенцию -tooltip.BloodMagic.orb.owner=Создан: %s -tooltip.BloodMagic.currentOwner=Владелец: %s -tooltip.BloodMagic.currentTier=Уровень: %d -tooltip.BloodMagic.config.disabled=Запрещено наÑтройками - -tooltip.BloodMagic.activated=Ðктивирован -tooltip.BloodMagic.deactivated=Деактивирован - -tooltip.BloodMagic.sigil.air.desc=&oОщущаетÑÑ Ð»ÐµÐ³ÐºÐ¾Ñть... -tooltip.BloodMagic.sigil.bloodLight.desc=&oЯ вижу Ñвет! -tooltip.BloodMagic.sigil.compression.desc=&oКучи алмазов -tooltip.BloodMagic.sigil.divination.desc=&oВзглÑд в душу -tooltip.BloodMagic.sigil.divination.otherNetwork=ЗаглÑнем в душу %s -tooltip.BloodMagic.sigil.divination.currentAltarTier=Уровень: %d -tooltip.BloodMagic.sigil.divination.currentEssence=ЭÑÑенции: %,d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=ÐмкоÑть: %,d LP -tooltip.BloodMagic.sigil.divination.currentTranquility=СпокойÑтвие: %,d -tooltip.BloodMagic.sigil.divination.currentBonus=БонуÑ: +%,d%% -tooltip.BloodMagic.sigil.water.desc=&oÐужна вода? -tooltip.BloodMagic.sigil.lava.desc=&oГОРЯЧЕЕ! ÐЕ ЕСТЬ! -tooltip.BloodMagic.sigil.void.desc=&oЛучше чем Swiffer! -tooltip.BloodMagic.sigil.greenGrove.desc=&oЭкологичеÑки чиÑтый -tooltip.BloodMagic.sigil.magnetism.desc=&oЯ очень притÑÐ³Ð°Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð»Ð¸Ñ‡Ð½Ð¾Ñть! -tooltip.BloodMagic.sigil.suppression.desc=&oЛучше, чем телекинез... -tooltip.BloodMagic.sigil.haste.desc=&oПоÑле 42 чашек кофе... -tooltip.BloodMagic.sigil.fastMiner.desc=&oÐ’Ñе глубже и глубже... -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oÐŸÐ°Ð´Ð°ÑŽÑ‰Ð°Ñ Ð¾Ð³Ð½ÐµÐ½Ð½Ð°Ñ Ñ€Ñ‹Ð±Ð°! -tooltip.BloodMagic.sigil.seer.desc=&oКогда проÑто видеть недоÑтаточно -tooltip.BloodMagic.sigil.seer.currentAltarProgress=ПрогреÑÑ: %,d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=ПрогреÑÑ: %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=РаÑход: %,d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=Уровень: %d -tooltip.BloodMagic.sigil.seer.currentEssence=ЭÑÑенции: %,d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=ÐмкоÑть: %,d LP -tooltip.BloodMagic.sigil.seer.currentCharge=ЗарÑд: %,d -tooltip.BloodMagic.sigil.seer.currentTranquility=СпокойÑтвие: %,d -tooltip.BloodMagic.sigil.seer.currentBonus=БонуÑ: +%,d%% -tooltip.BloodMagic.sigil.phantomBridge.desc=&oПрогулки в воздухе... -tooltip.BloodMagic.sigil.whirlwind.desc=&oЛучше не одевать юбку -tooltip.BloodMagic.sigil.enderSeverance.desc=&oÐеприÑтноÑти Ð´Ð»Ñ Ñтранников КраÑ! - -tooltip.BloodMagic.sigil.teleposition.desc=Я очень близок к возможноÑти перемещениÑ. -tooltip.BloodMagic.sigil.transposition.desc=Ощути Силу, мой юный ученик. - -tooltip.BloodMagic.bound.sword.desc=&oОтбраковка Ñлабаков -tooltip.BloodMagic.bound.pickaxe.desc=&oБезжалоÑтное уничтожение ÐºÐ°Ð¼Ð½Ñ -tooltip.BloodMagic.bound.axe.desc=&oДемоничеÑÐºÐ°Ñ Ð²Ñ‹Ñ€ÑƒÐ±ÐºÐ° -tooltip.BloodMagic.bound.shovel.desc=&oОчиÑтим пол от грÑзи - -tooltip.BloodMagic.sacrificialDagger.desc=Ðебольшой надрез на пальце... -tooltip.BloodMagic.slate.desc=Камень, наполненный в кровавом алтаре -tooltip.BloodMagic.inscriber.desc=ÐадпиÑи на Ñтене... - -tooltip.BloodMagic.pack.selfSacrifice.desc=This pack really chafes... -tooltip.BloodMagic.pack.sacrifice.desc=Description -tooltip.BloodMagic.pack.stored=Ðакоплено: %,d LP - -tooltip.BloodMagic.activationCrystal.weak=Ðктивирует проÑтые ритуалы -tooltip.BloodMagic.activationCrystal.awakened=Ðктивирует Ñложные ритуалы -tooltip.BloodMagic.activationCrystal.creative=Только в креативе - активирует любые ритуалы - -tooltip.BloodMagic.diviner.currentRitual=Выбранный ритуал: -tooltip.BloodMagic.diviner.blankRune=Ритуальных камней: %d -tooltip.BloodMagic.diviner.waterRune=Камней воды: %d -tooltip.BloodMagic.diviner.airRune=Камней воздуха: %d -tooltip.BloodMagic.diviner.fireRune=Камней огнÑ: %d -tooltip.BloodMagic.diviner.earthRune=Камней земли: %d -tooltip.BloodMagic.diviner.duskRune=Камней Ñумерек: %d -tooltip.BloodMagic.diviner.dawnRune=Камней раÑÑвета: %d -tooltip.BloodMagic.diviner.totalRune=Ð’Ñего ритуальных камней: %d -tooltip.BloodMagic.diviner.extraInfo=Shift Ð´Ð»Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ информации -tooltip.BloodMagic.diviner.currentDirection=Ðаправление: %s - -tooltip.BloodMagic.arcaneAshes=Пепел Ð´Ð»Ñ Ð½Ð°Ñ‡ÐµÑ€Ñ‚Ð°Ð½Ð¸Ñ Ð°Ð»Ñ…Ð¸Ð¼Ð¸Ñ‡ÐµÑких знаков - -tooltip.BloodMagic.telepositionFocus.coords=Координаты: (%,d, %,d, %,d) -tooltip.BloodMagic.telepositionFocus.dimension=ID ИзмерениÑ: %d -tooltip.BloodMagic.telepositionFocus.weak=Может перемещать блоки -tooltip.BloodMagic.telepositionFocus.enhanced=Может перемещать блоки -tooltip.BloodMagic.telepositionFocus.reinforced=Может перемещать блоки -tooltip.BloodMagic.telepositionFocus.demonic=Может перемещать блоки - -tooltip.BloodMagic.livingArmour.upgrade.speed=БыÑтрые ноги -tooltip.BloodMagic.livingArmour.upgrade.digging=Сила гномов -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=СтойкоÑть к Ñдам -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Твердые ладони -tooltip.BloodMagic.livingArmour.upgrade.knockback=КультуриÑÑ‚ -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=ТолÑÑ‚Ð°Ñ ÐºÐ¾Ð¶Ð° -tooltip.BloodMagic.livingArmour.upgrade.health=Здровый -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=Свирепый удар -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=Меткий Ñтрелок -tooltip.BloodMagic.livingArmour.upgrade.stepAssist=Ð’Ñ‹Ñокий шаг -tooltip.BloodMagic.livingArmour.upgrade.grimReaper=Избежал Ñмерти -tooltip.BloodMagic.livingArmour.upgrade.solarPowered=Ð¡Ð¾Ð»Ð½ÐµÑ‡Ð½Ð°Ñ ÑÐ½ÐµÑ€Ð³Ð¸Ñ -tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=РуничеÑкий щит -tooltip.BloodMagic.livingArmour.upgrade.revealing=Обнаружение -tooltip.BloodMagic.livingArmour.upgrade.level=%s (Уровень %d) -tooltip.BloodMagic.livingArmour.upgrade.points=&6Очки улучшениÑ: %s / %s - -tooltip.BloodMagic.will=Энергии: %1$,.2f -tooltip.BloodMagic.sentientSword.desc=ИÑпользует демоничеÑкую Ñнергию Ð´Ð»Ñ Ð¼Ð°ÐºÑимальной ÑффективноÑти. -tooltip.BloodMagic.soulGem.petty=Этот камень может хранить очень мало Ñнергии -tooltip.BloodMagic.soulGem.lesser=Этот камень может хранить немного Ñнергии -tooltip.BloodMagic.soulGem.common=Этот камень может хранить Ñреднее количеÑтво Ñнергии -tooltip.BloodMagic.soulGem.greater=Этот камень может хранить много Ñнергии -tooltip.BloodMagic.soulGem.grand=Этот камень может хранить очень много Ñнергии -tooltip.BloodMagic.soulSnare.desc=БроÑьте в ÑущеÑтво и затем убейте, что бы получить демоничеÑкую Ñнергию - -tooltip.BloodMagic.itemFilter.exact=Требует точного ÑоответÑÑ‚Ð²Ð¸Ñ -tooltip.BloodMagic.itemFilter.ignoreNBT=ПозволÑет игнорировать NBT -tooltip.BloodMagic.itemFilter.modItems=ПозволÑет отобрать предметы из одного мода -tooltip.BloodMagic.itemFilter.oreDict=Фильтр иÑпользующий Ore Dictionary - -tooltip.BloodMagic.fluid.type=Содержит -tooltip.BloodMagic.fluid.amount=Кол-во -tooltip.BloodMagic.fluid.capacity=ÐмкоÑть - -# Ritual -ritual.BloodMagic.testRitual=ТеÑтовый ритуал -ritual.BloodMagic.waterRitual=Ритуал вызова родника -ritual.BloodMagic.lavaRitual=ÐдÑÐºÐ°Ñ Ñеренада -ritual.BloodMagic.greenGroveRitual=Ритуал зеленой рощи -ritual.BloodMagic.jumpRitual=Ритуал выÑокого прыжка -ritual.BloodMagic.wellOfSufferingRitual=Колодец Страданий -ritual.BloodMagic.featheredKnifeRitual=Ритуал быÑтрого кинжала -ritual.BloodMagic.regenerationRitual=Ритуал регенерации -ritual.BloodMagic.harvestRitual=Ритуал жнеца -ritual.BloodMagic.magneticRitual=Ритуал магнетизма -ritual.BloodMagic.crushingRitual=Ритуал Ð´Ñ€Ð¾Ð±Ð»ÐµÐ½Ð¸Ñ -ritual.BloodMagic.fullStomachRitual=Ритуал ÑытоÑти -ritual.BloodMagic.interdictionRitual=Ритуал запрета -ritual.BloodMagic.containmentRitual=Ритуал ÑÐ´ÐµÑ€Ð¶Ð¸Ð²Ð°Ð½Ð¸Ñ -ritual.BloodMagic.speedRitual=Ритуал ÑкороÑти -ritual.BloodMagic.suppressionRitual=Ритуал Ð¿Ð¾Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ -ritual.BloodMagic.expulsionRitual=Ðура Ð¸Ð·Ð³Ð½Ð°Ð½Ð¸Ñ -ritual.BloodMagic.zephyrRitual=Зов Зефира -ritual.BloodMagic.upgradeRemoveRitual=Звук Ð¾Ñ‡Ð¸Ñ‰ÐµÐ½Ð¸Ñ Ð´ÑƒÑˆ -ritual.BloodMagic.armourEvolveRitual=Ритуал Ñволюции - -ritual.BloodMagic.cobblestoneRitual=Le Vulcanos Frigius -ritual.BloodMagic.placerRitual=Ðаполнитель -ritual.BloodMagic.fellingRitual=ДровоÑек -ritual.BloodMagic.pumpRitual=Гимн откачки -ritual.BloodMagic.altarBuilderRitual=Строитель Ð°Ð»Ñ‚Ð°Ñ€Ñ -ritual.BloodMagic.portalRitual=Ритуал врат - -# Chat -chat.BloodMagic.altarMaker.setTier=УÑтановить уровень: %d -chat.BloodMagic.altarMaker.building=СтроитÑÑ Ð°Ð»Ñ‚Ð°Ñ€ÑŒ %d ÑƒÑ€Ð¾Ð²Ð½Ñ -chat.BloodMagic.altarMaker.destroy=Разобран алтарь %d ÑƒÑ€Ð¾Ð²Ð½Ñ -chat.BloodMagic.altarMaker.creativeOnly=Предмет только Ð´Ð»Ñ ÐºÑ€ÐµÐ°Ñ‚Ð¸Ð²Ð°. - -chat.BloodMagic.damageSource=душа %s Ñлишком оÑлабла - -chat.BloodMagic.ritual.weak=Ð’Ñ‹ чувÑтвуете толчок, но Ñлишком Ñлабый, чтобы выполнить ритуал. -chat.BloodMagic.ritual.prevent=Ритуал ÑопротивлÑетÑÑ Ð²Ð°ÑˆÐµÐ¼Ñƒ воздейÑтвию! -chat.BloodMagic.ritual.activate=Потоки Ñнергии текут через ритуал! -chat.BloodMagic.ritual.notValid=Ð’Ñ‹ чувÑтвуете, что руны ÑтоÑÑ‚ неправильно... - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=You are starting to feel better already! -chat.BloodMagic.livingArmour.upgrade.grimReaper=&6Темные Ñилы ÑпаÑли Ð²Ð°Ñ Ð·Ð° Ñекунду до Ñмерти! -chat.BloodMagic.livingArmour.newUpgrade=&4Получено улучшение! - -# JustEnoughItems -jei.BloodMagic.recipe.altar=Кровавый алтарь -jei.BloodMagic.recipe.binding=ÐлхимичеÑÐºÐ°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð° (СвÑзывание) -jei.BloodMagic.recipe.alchemyArrayCrafting=ÐлхимичеÑÐºÐ°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð° -jei.BloodMagic.recipe.soulForge=ÐдÑÐºÐ°Ñ ÐºÑƒÐ·Ð½Ð¸Ñ†Ð° -jei.BloodMagic.recipe.requiredLP=LP: %,d -jei.BloodMagic.recipe.requiredTier=Уровень: %d -jei.BloodMagic.recipe.consumptionRate=РаÑход: %,d LP/t -jei.BloodMagic.recipe.drainRate=Потери: %,d LP/t -jei.BloodMagic.recipe.minimumSouls=Минимум: %1$,.2f Ñнергии -jei.BloodMagic.recipe.soulsDrained=Затраты: %1$,.2f Ñнергии - -jei.BloodMagic.desc.altarBuilder=A creative-only item for use in debugging and testing.\n\nShift + Right click to change the tier to build. Right click an Altar to initiate the build.\n\nBreak an Altar while holding to dismantle it. -jei.BloodMagic.desc.demonicWill=An imprint of a demonic entity attached to a creature.\n\nCan be obtained by killing a mob with a sentient weapon or by throwing a snare at a mob and killing it while it has white particles. - -# WAILA -waila.BloodMagic.sneak=&oSneak for Information -waila.BloodMagic.array.reagent=Реагент: %s -waila.BloodMagic.array.catalyst=Катализатор: %s -option.BloodMagic.bypassSneak=Bypass Sneak -option.BloodMagic.bloodAltar=Кровавый алтарь -option.BloodMagic.ritualController=Ритуальные камни -option.BloodMagic.teleposer=Телепозер -option.BloodMagic.array=ÐлхимичеÑÐºÐ°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð° - -# Thaumcraft -tc.research_category.BLOODMAGIC=Sanguine Arcana - -# Thaumcraft Research -bloodmagic.research_name.BLOODMAGIC=Blood Magic -bloodmagic.research_text.BLOODMAGIC=Sanguine Arcana -bloodmagic.research_page.BLOODMAGIC.1=The realm of the Blood Magics has always appeared to be a more solitary and "individual" art with blood mages being notoriously reclusive and a bit insane at times. However, the powers of self-sacrifice and life essence have uses even beyond a normal blood mage's sight, in fact, it is quite apparent that it may have some uses in thaumaturgy after all! \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/lang/zh_CN.lang b/src/main/resources/assets/bloodmagic/lang/zh_CN.lang deleted file mode 100644 index 5de0fea6..00000000 --- a/src/main/resources/assets/bloodmagic/lang/zh_CN.lang +++ /dev/null @@ -1,801 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=血魔法 -itemGroup.BloodMagic.creativeTabTome=血魔法强化手册 - -#Items -item.BloodMagic.activationCrystal.weak.name=[虚弱]激活水晶 -item.BloodMagic.activationCrystal.awakened.name=[觉醒]激活水晶 -item.BloodMagic.activationCrystal.creative.name=[创造]激活水晶 - -item.BloodMagic.sacrificialDagger.normal.name=牺牲匕首 -item.BloodMagic.sacrificialDagger.creative.name=[创造]牺牲匕首 -item.BloodMagic.pack.selfSacrifice.name=血液背包 -item.BloodMagic.pack.sacrifice.name=斗士铠衣 -item.BloodMagic.daggerOfSacrifice.name=献祭刀 - -item.BloodMagic.lavaCrystal.name=熔岩晶体 - -item.BloodMagic.bound.sword.name=æŸç¼šä¹‹å‰‘ -item.BloodMagic.bound.pickaxe.name=æŸç¼šä¹‹é• -item.BloodMagic.bound.axe.name=æŸç¼šä¹‹æ–§ -item.BloodMagic.bound.shovel.name=æŸç¼šä¹‹é”¹ - -item.BloodMagic.bucket.lifeEssence.name=生命æºè´¨æ¡¶ - -item.BloodMagic.scribe.water.name=元素铭文工具: æ°´ -item.BloodMagic.scribe.fire.name=元素铭文工具: ç« -item.BloodMagic.scribe.earth.name=元素铭文工具: 土 -item.BloodMagic.scribe.air.name=元素铭文工具: 风 -item.BloodMagic.scribe.dusk.name=元素铭文工具: è–„æš® -item.BloodMagic.scribe.dawn.name=元素铭文工具: 破晓 - -item.BloodMagic.focus.weak.name=传逿 ¸å¿ƒ -item.BloodMagic.focus.enhanced.name=[加强]传逿 ¸å¿ƒ -item.BloodMagic.focus.reinforced.name=[强化]传逿 ¸å¿ƒ -item.BloodMagic.focus.demonic.name=[æ¶é­”]传逿 ¸å¿ƒ - -item.BloodMagic.slate.blank.name=ç©ºç™½çŸ³æ¿ -item.BloodMagic.slate.reinforced.name=å¼ºåŒ–çŸ³æ¿ -item.BloodMagic.slate.imbued.name=çŒè¾“çŸ³æ¿ -item.BloodMagic.slate.demonic.name=æ¶é­”çŸ³æ¿ -item.BloodMagic.slate.ethereal.name=æ‚¬å¹½çŸ³æ¿ - -item.BloodMagic.orb.weak.name=[虚弱]气血å®ç  -item.BloodMagic.orb.apprentice.name=[学徒]气血å®ç  -item.BloodMagic.orb.magician.name=[法师]气血å®ç  -item.BloodMagic.orb.master.name=[导师]气血å®ç  -item.BloodMagic.orb.archmage.name=[贤者]气血å®ç  -item.BloodMagic.orb.transcendent.name=[å“è¶Š]气血å®ç  - -item.BloodMagic.reagent.incendium.name=烈焰元素 -item.BloodMagic.reagent.magicales.name=魔法元素 -item.BloodMagic.reagent.sanctus.name=神圣元素 -item.BloodMagic.reagent.aether.name=以太元素 -item.BloodMagic.reagent.crepitous.name=爆破元素 -item.BloodMagic.reagent.crystallos.name=冰晶元素 -item.BloodMagic.reagent.terrae.name=大地元素 -item.BloodMagic.reagent.aquasalus.name=液之元素 -item.BloodMagic.reagent.tennebrae.name=暗黑元素 -item.BloodMagic.reagent.offensa.name=攻势元素 -item.BloodMagic.reagent.praesidium.name=守护元素 -item.BloodMagic.reagent.orbisterrae.name=奥土元素 -item.BloodMagic.reagent.virtus.name=力é‡å…ƒç´  -item.BloodMagic.reagent.reductus.name=代价元素 -item.BloodMagic.reagent.potentia.name=效能元素 - -item.BloodMagic.bloodShard.weak.name=[虚弱]气血碎片 -item.BloodMagic.bloodShard.demon.name=[æ¶é­”]气血碎片 - -item.BloodMagic.baseComponent.reagentWater.name=水之试剂 -item.BloodMagic.baseComponent.reagentLava.name=熔岩试剂 -item.BloodMagic.baseComponent.reagentAir.name=风之试剂 -item.BloodMagic.baseComponent.reagentFastMiner.name=采掘试剂 -item.BloodMagic.baseComponent.reagentVoid.name=虚空试剂 -item.BloodMagic.baseComponent.reagentGrowth.name=促生试剂 -item.BloodMagic.baseComponent.reagentAffinity.name=元素试剂 -item.BloodMagic.baseComponent.reagentSight.name=è§è§£è¯•剂 -item.BloodMagic.baseComponent.reagentBinding.name=æŸç¼šè¯•剂 -item.BloodMagic.baseComponent.reagentSuppression.name=抑液试剂 -item.BloodMagic.baseComponent.frameParts.name=框架零件 -item.BloodMagic.baseComponent.reagentBloodLight.name=血光试剂 -item.BloodMagic.baseComponent.reagentMagnetism.name=ç£å¼•试剂 -item.BloodMagic.baseComponent.reagentHaste.name=急速试剂 -item.BloodMagic.baseComponent.reagentBridge.name=影桥试剂 -item.BloodMagic.baseComponent.reagentCompression.name=压挤试剂 -item.BloodMagic.baseComponent.reagentSeverance.name=éš”ç»è¯•剂 -item.BloodMagic.baseComponent.reagentHolding.name=集æŒè¯•剂 - -item.BloodMagic.baseComponent.reagentTeleposition.name=ä¼ é€è¯•剂 -item.BloodMagic.baseComponent.reagentTransposition.name=ç§»ä½è¯•剂 - -item.BloodMagic.baseComponent.ironSand.name=é“矿砂 -item.BloodMagic.baseComponent.goldSand.name=金矿砂 -item.BloodMagic.baseComponent.coalSand.name=煤矿砂 -item.BloodMagic.baseComponent.plantOil.name=æ¤ç‰©æ²¹ -item.BloodMagic.baseComponent.sulfur.name=硫磺 -item.BloodMagic.baseComponent.saltpeter.name=ç¡çŸ³ -item.BloodMagic.baseComponent.neurotoxin.name=ç¥žç»æ¯’ç´  -item.BloodMagic.baseComponent.antiseptic.name=防è…剂 - -item.BloodMagic.cuttingFluid.basicCuttingFluid.name=基础切削油 -item.BloodMagic.cuttingFluid.explosive.name=爆炸ç«è¯ - -item.BloodMagic.baseComponent.mundaneLength.name=简å•的延时催化剂 -item.BloodMagic.baseComponent.mundanePower.name=简å•的功效催化剂 - - -item.BloodMagic.demonCrystal.crystalDefault.name=æ¶é­”æ„志晶体 -item.BloodMagic.demonCrystal.crystalCorrosive.name=è…蚀æ„志晶体 -item.BloodMagic.demonCrystal.crystalDestructive.name=ç ´åæ„å¿—æ™¶ä½“ -item.BloodMagic.demonCrystal.crystalVengeful.name=å¤ä»‡æ„志晶体 -item.BloodMagic.demonCrystal.crystalSteadfast.name=åšå®šæ„志晶体 - -item.BloodMagic.monsterSoul.base.name=æ¶é­”æ„å¿— - -item.BloodMagic.sigil.air.name=风之å°è®° -item.BloodMagic.sigil.bloodLight.name=血光å°è®° -item.BloodMagic.sigil.compression.name=压挤å°è®° -item.BloodMagic.sigil.divination.name=å åœå°è®° -item.BloodMagic.sigil.water.name=水之å°è®° -item.BloodMagic.sigil.lava.name=熔岩å°è®° -item.BloodMagic.sigil.void.name=虚空å°è®° -item.BloodMagic.sigil.greenGrove.name=绿丛å°è®° -item.BloodMagic.sigil.elementalAffinity.name=元素å°è®° -item.BloodMagic.sigil.haste.name=急速å°è®° -item.BloodMagic.sigil.suppression.name=抑液å°è®° -item.BloodMagic.sigil.magnetism.name=ç£å¼•å°è®° -item.BloodMagic.sigil.fastMiner.name=速掘å°è®° -item.BloodMagic.sigil.seer.name=è§è§£å°è®° -item.BloodMagic.sigil.phantomBridge.name=影桥å°è®° -item.BloodMagic.sigil.whirlwind.name=旋风å°è®° -item.BloodMagic.sigil.enderSeverance.name=ç»å½±å°è®° -item.BloodMagic.sigil.holding.name=集æŒå°è®° - -item.BloodMagic.sigil.teleposition.name=ä¼ é€å°è®° -item.BloodMagic.sigil.transposition.name=ç§»ä½å°è®° - -item.BloodMagic.livingArmour.helmet.name=æŸçµå¤´ç›” -item.BloodMagic.livingArmour.chest.name=æŸçµèƒ¸ç”² -item.BloodMagic.livingArmour.legs.name=æŸçµæŠ¤è…¿ -item.BloodMagic.livingArmour.boots.name=æŸçµé´å­ -item.BloodMagic.sentientArmour.helmet.name=感知头盔 -item.BloodMagic.sentientArmour.chest.name=感知胸甲 -item.BloodMagic.sentientArmour.legs.name=感知护腿 -item.BloodMagic.sentientArmour.boots.name=感知é´å­ - -item.BloodMagic.altarMaker.name=ç¥­å›æ­å»ºå·¥å…· - -item.BloodMagic.ritualDivinernormal.name=ä»ªå¼æŽ¨æµ‹ä»— -item.BloodMagic.ritualDivinerdusk.name=ä»ªå¼æŽ¨æµ‹ä»— [è–„æš®] -item.BloodMagic.ritualDivinerdawn.name=ä»ªå¼æŽ¨æµ‹ä»— [破晓] -item.BloodMagic.ritualReader.name=仪å¼è°ƒæ•´é’³ - -item.BloodMagic.arcaneAshes.name=å¥¥æœ¯ç²‰ç° -item.BloodMagic.upgradeTome.name=æŸçµç›”甲强化手册 -item.BloodMagic.upgradeTrainer.name=æŸçµç›”甲训练手镯 - -item.BloodMagic.sentientSword.name=感知之剑 -item.BloodMagic.soulGem.petty.name=[å¾®å°]塔尔塔å®çŸ³ -item.BloodMagic.soulGem.lesser.name=[细å—]塔尔塔å®çŸ³ -item.BloodMagic.soulGem.common.name=[普通]塔尔塔å®çŸ³ -item.BloodMagic.soulGem.greater.name=[较大]塔尔塔å®çŸ³ -item.BloodMagic.soulGem.grand.name=[精制]塔尔塔å®çŸ³ -item.BloodMagic.soulSnare.base.name=原始投网 -item.BloodMagic.sentientBow.name=感知之弓 -item.BloodMagic.sentientArmourGem.name=感知盔甲å®çŸ³ -item.BloodMagic.sentientAxe.name=感知之斧 -item.BloodMagic.sentientPickaxe.name=æ„ŸçŸ¥ä¹‹é• -item.BloodMagic.sentientShovel.name=感知之锹 - -item.BloodMagic.nodeRouter.name=节点连接工具 -item.BloodMagic.itemFilter.exact.name=精确物å“筛选器 -item.BloodMagic.itemFilter.ignoreNBT.name=NBT物å“筛选器 -item.BloodMagic.itemFilter.modItems.name=Mod物å“筛选器 -item.BloodMagic.itemFilter.oreDict.name=矿物物å“筛选器 - -item.BloodMagic.experienceTome.name=ç»éªŒæ‰‹å†Œ -item.BloodMagic.sanguineBook.name=指示之书 - -item.BloodMagic.livingPointUpgrade.draftAngelus.name=祷告之始 - -item.BloodMagic.willGauge.name=æ¶é­”æ„å¿—çµåŸŸæµ‹é‡å™¨ -item.BloodMagic.potionFlask.name=è¯å‰‚ç“¶ - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=生命æºè´¨ - -tile.BloodMagic.stone.ritual.master.name=主仪å¼çŸ³ -tile.BloodMagic.stone.ritual.imperfect.name=ä¸å®Œå–„的仪å¼çŸ³ - -tile.BloodMagic.altar.name=è¡€ä¹‹ç¥­å› -tile.BloodMagic.alchemyArray.name=&r&f炼金矩阵 - -tile.BloodMagic.rune.blank.name=空白符文 -tile.BloodMagic.rune.speed.name=速度符文 -tile.BloodMagic.rune.efficiency.name=效率符文 -tile.BloodMagic.rune.sacrifice.name=献祭符文 -tile.BloodMagic.rune.selfsacrifice.name=牺牲符文 -tile.BloodMagic.rune.displacement.name=转ä½ç¬¦æ–‡ -tile.BloodMagic.rune.capacity.name=增容符文 -tile.BloodMagic.rune.augcapacity.name=超容符文 -tile.BloodMagic.rune.orb.name=å®ç ç¬¦æ–‡ -tile.BloodMagic.rune.acceleration.name=促进符文 -tile.BloodMagic.rune.charging.name=充能符文 - - -tile.BloodMagic.ritualStone.blank.name=仪å¼çŸ³ -tile.BloodMagic.ritualStone.water.name=水之仪å¼çŸ³ -tile.BloodMagic.ritualStone.fire.name=ç«ä¹‹ä»ªå¼çŸ³ -tile.BloodMagic.ritualStone.earth.name=土之仪å¼çŸ³ -tile.BloodMagic.ritualStone.air.name=风之仪å¼çŸ³ -tile.BloodMagic.ritualStone.dusk.name=薄暮仪å¼çŸ³ -tile.BloodMagic.ritualStone.dawn.name=破晓仪å¼çŸ³ - -tile.BloodMagic.bloodstonebrick.large.name=大血石砖 -tile.BloodMagic.bloodstonebrick.brick.name=血石砖 -tile.BloodMagic.crystal.large.name=æ™¶ç°‡å— -tile.BloodMagic.crystal.brick.name=晶簇砖 -tile.BloodMagic.bloodLight.name=è¡€ä¹‹å…‰æº -tile.BloodMagic.spectralBlock.name=å¹½çµæ–¹å— -tile.BloodMagic.phantom.name=å½±æ¡¥æ–¹å— -tile.BloodMagic.incenseAltar.name=ç†é¦™ç¥­å› - -tile.BloodMagic.teleposer.name=ä¼ é€å™¨ -tile.BloodMagic.soulForge.name=狱ç«ç†”炉 -tile.BloodMagic.alchemyTable.name=炼金术桌 -tile.BloodMagic.demonCrucible.name=æ¶é­”å©åŸš -tile.BloodMagic.demonPylon.name=æ¶é­”导能塔 -tile.BloodMagic.demonCrystallizer.name=æ¶é­”ç»“æ™¶å› - -tile.BloodMagic.masterRouting.name=主控路由节点 -tile.BloodMagic.outputRouting.name=输出路由节点 -tile.BloodMagic.inputRouting.name=输入路由节点 -tile.BloodMagic.itemRouting.name=路由节点 - -tile.BloodMagic.path.wood.name=æœ¨åˆ¶è·¯é¢ -tile.BloodMagic.path.woodtile.name=æœ¨ç“¦è·¯é¢ -tile.BloodMagic.path.stone.name=çŸ³ç –è·¯é¢ -tile.BloodMagic.path.stonetile.name=çŸ³ç“¦è·¯é¢ -tile.BloodMagic.path.wornstone.name=ç¢ŽçŸ³ç –è·¯é¢ -tile.BloodMagic.path.wornstonetile.name=ç¢ŽçŸ³è·¯é¢ -tile.BloodMagic.path.obsidian.name=é»‘æ›œçŸ³ç –è·¯é¢ -tile.BloodMagic.path.obsidiantile.name=é»‘æ›œçŸ³ç“¦è·¯é¢ - -tile.BloodMagic.dimensionalPortal.name=空间传é€é—¨ -tile.BloodMagic.bloodTank.name=血液槽 - -tile.BloodMagic.demonCrystal.default.name=æ¶é­”æ„å¿—æ™¶ç°‡ -tile.BloodMagic.demonCrystal.corrosive.name=è…蚀æ„å¿—æ™¶ç°‡ -tile.BloodMagic.demonCrystal.destructive.name=ç ´åæ„å¿—æ™¶ç°‡ -tile.BloodMagic.demonCrystal.vengeful.name=å¤ä»‡æ„å¿—æ™¶ç°‡ -tile.BloodMagic.demonCrystal.steadfast.name=åšå®šæ„å¿—æ™¶ç°‡ - -tile.BloodMagic.mimic.nohitbox.name=悬幽ä¸é€æ˜Žçš„æ‹Ÿæ€æ–¹å— -tile.BloodMagic.mimic.solidopaque.name=ä¸é€æ˜Žçš„æ‹Ÿæ€æ–¹å— -tile.BloodMagic.mimic.solidclear.name=清é€çš„æ‹Ÿæ€æ–¹å— -tile.BloodMagic.mimic.solidlight.name=å‘å…‰çš„æ‹Ÿæ€æ–¹å— -tile.BloodMagic.mimic.sentient.name=æ„ŸçŸ¥æ‹Ÿæ€æ–¹å— - -tile.BloodMagic.bricks1.brick1_raw.name=原生石砖 -tile.BloodMagic.bricks1.brick1_corrosive.name=è…蚀性石砖 -tile.BloodMagic.bricks1.brick1_destructive.name=ç ´åæ€§çŸ³ç – -tile.BloodMagic.bricks1.brick1_vengeful.name=å¤ä»‡æ€§çŸ³ç – -tile.BloodMagic.bricks1.brick1_steadfast.name=åšå®šæ€§çŸ³ç – - -tile.BloodMagic.bricks2.smallbrick_raw.name=å°åŽŸç”ŸçŸ³ç – -tile.BloodMagic.bricks2.smallbrick_corrosive.name=å°è…蚀性石砖 -tile.BloodMagic.bricks2.smallbrick_destructive.name=å°ç ´å性石砖 -tile.BloodMagic.bricks2.smallbrick_vengeful.name=å°å¤ä»‡æ€§çŸ³ç – -tile.BloodMagic.bricks2.smallbrick_steadfast.name=å°åšå®šæ€§çŸ³ç – -tile.BloodMagic.bricks2.tile_raw.name=原生石瓦 -tile.BloodMagic.bricks2.tile_corrosive.name=è…蚀性石瓦 -tile.BloodMagic.bricks2.tile_destructive.name=ç ´åæ€§çŸ³ç“¦ -tile.BloodMagic.bricks2.tile_vengeful.name=å¤ä»‡æ€§çŸ³ç“¦ -tile.BloodMagic.bricks2.tile_steadfast.name=åšå®šæ€§çŸ³ç“¦ -tile.BloodMagic.bricks2.tilespecial_raw.name=Accented 原生石瓦 -tile.BloodMagic.bricks2.tilespecial_corrosive.name=Accented è…蚀性石瓦 -tile.BloodMagic.bricks2.tilespecial_destructive.name=Accented ç ´åæ€§çŸ³ç“¦ -tile.BloodMagic.bricks2.tilespecial_vengeful.name=Accented å¤ä»‡æ€§çŸ³ç“¦ -tile.BloodMagic.bricks2.tilespecial_steadfast.name=Accented åšå®šæ€§çŸ³ç“¦ - -tile.BloodMagic.demonlight.raw.name=原生æ¶é­”之眼 -tile.BloodMagic.demonlight.corrosive.name=è…蚀性æ¶é­”之眼 -tile.BloodMagic.demonlight.destructive.name=ç ´åæ€§æ¶é­”之眼 -tile.BloodMagic.demonlight.vengeful.name=å¤ä»‡æ€§æ¶é­”之眼 -tile.BloodMagic.demonlight.steadfast.name=åšå®šæ€§æ¶é­”之眼 - -tile.BloodMagic.extras.stone_raw.name=原生石头 -tile.BloodMagic.extras.stone_corrosive.name=è…蚀性石头 -tile.BloodMagic.extras.stone_destructive.name=ç ´åæ€§çŸ³å¤´ -tile.BloodMagic.extras.stone_vengeful.name=å¤ä»‡æ€§çŸ³å¤´ -tile.BloodMagic.extras.stone_steadfast.name=åšå®šæ€§çŸ³å¤´ - -tile.BloodMagic.extras.polished_raw.name=磨制原生石头 -tile.BloodMagic.extras.polished_corrosive.name=磨制è…蚀性石头 -tile.BloodMagic.extras.polished_destructive.name=ç£¨åˆ¶ç ´åæ€§çŸ³å¤´ -tile.BloodMagic.extras.polished_vengeful.name=磨制å¤ä»‡æ€§çŸ³å¤´ -tile.BloodMagic.extras.polished_steadfast.name=磨制åšå®šæ€§çŸ³å¤´ - -tile.BloodMagic.extras.metal_raw.name=原生æ¶é­”åˆé‡‘ -tile.BloodMagic.extras.metal_corrosive.name=è…蚀性æ¶é­”åˆé‡‘ -tile.BloodMagic.extras.metal_destructive.name=ç ´åæ€§æ¶é­”åˆé‡‘ -tile.BloodMagic.extras.metal_vengeful.name=å¤ä»‡æ€§æ¶é­”åˆé‡‘ -tile.BloodMagic.extras.metal_steadfast.name=åšå®šæ€§æ¶é­”åˆé‡‘ - -tile.BloodMagic.pillar1.raw.name=原生石柱 -tile.BloodMagic.pillar1.corrosive.name=è…蚀性石柱 -tile.BloodMagic.pillar1.destructive.name=ç ´åæ€§çŸ³æŸ± -tile.BloodMagic.pillar1.vengeful.name=å¤ä»‡æ€§çŸ³æŸ± -tile.BloodMagic.pillar1.steadfast.name=åšå®šæ€§çŸ³æŸ± - -tile.BloodMagic.pillar2.raw.name=Accented 原生石柱 -tile.BloodMagic.pillar2.corrosive.name=Accented è…蚀性石柱 -tile.BloodMagic.pillar2.destructive.name=Accented ç ´åæ€§çŸ³æŸ± -tile.BloodMagic.pillar2.vengeful.name=Accented å¤ä»‡æ€§çŸ³æŸ± -tile.BloodMagic.pillar2.steadfast.name=Accented åšå®šæ€§çŸ³æŸ± - -tile.BloodMagic.pillarCap1.raw.name=原生石柱顶 -tile.BloodMagic.pillarCap1.corrosive.name=è…蚀性石柱顶 -tile.BloodMagic.pillarCap2.destructive.name=ç ´åæ€§çŸ³æŸ±é¡¶ -tile.BloodMagic.pillarCap2.vengeful.name=å¤ä»‡æ€§çŸ³æŸ±é¡¶ -tile.BloodMagic.pillarCap3.steadfast.name=åšå®šæ€§çŸ³æŸ±é¡¶ - -tile.BloodMagic.wall1.brick_raw.name=原生石砖墙 -tile.BloodMagic.wall1.brick_corrosive.name=è…蚀性石砖墙 -tile.BloodMagic.wall1.brick_destructive.name=ç ´åæ€§çŸ³ç –墙 -tile.BloodMagic.wall1.brick_vengeful.name=å¤ä»‡æ€§çŸ³ç –墙 -tile.BloodMagic.wall1.brick_steadfast.name=åšå®šæ€§çŸ³ç –墙 -tile.BloodMagic.wall1.smallbrick_raw.name=原生å°çŸ³ç –墙 -tile.BloodMagic.wall1.smallbrick_corrosive.name=è…蚀性å°çŸ³ç –墙 -tile.BloodMagic.wall1.smallbrick_destructive.name=ç ´åæ€§å°çŸ³ç –墙 -tile.BloodMagic.wall1.smallbrick_vengeful.name=å¤ä»‡æ€§å°çŸ³ç –墙 -tile.BloodMagic.wall1.smallbrick_steadfast.name=åšå®šæ€§å°çŸ³ç –墙 -tile.BloodMagic.wall1.large_raw.name=原生石墙 -tile.BloodMagic.wall1.large_corrosive.name=è…蚀性石墙 -tile.BloodMagic.wall1.large_destructive.name=ç ´åæ€§çŸ³å¢™ -tile.BloodMagic.wall1.large_vengeful.name=å¤ä»‡æ€§çŸ³å¢™ -tile.BloodMagic.wall1.large_steadfast.name=åšå®šæ€§çŸ³å¢™ - -tile.BloodMagic.stairs1.raw.name=原生石楼梯 -tile.BloodMagic.stairs1.corrosive.name=è…蚀性石楼梯 -tile.BloodMagic.stairs2.destructive.name=ç ´åæ€§çŸ³æ¥¼æ¢¯ -tile.BloodMagic.stairs2.vengeful.name=å¤ä»‡æ€§çŸ³æ¥¼æ¢¯ -tile.BloodMagic.stairs3.steadfast.name=åšå®šæ€§çŸ³æ¥¼æ¢¯ - -# Fluids -fluid.lifeEssence=生命æºè´¨ - -# Tooltips -tooltip.BloodMagic.extraInfo=&9-æŒ‰ä½ shift 了解更多信æ¯- - -tooltip.BloodMagic.orb.desc=储存原生的生命æºè´¨ -tooltip.BloodMagic.orb.owner=æ¥æº: %s -tooltip.BloodMagic.currentOwner=当剿‰€æœ‰è€…: %s -tooltip.BloodMagic.currentTier=当å‰å±‚级: %d -tooltip.BloodMagic.config.disabled=于é…置信æ¯ä¸­ç¦ç”¨ - -tooltip.BloodMagic.activated=激活 -tooltip.BloodMagic.deactivated=åœç”¨ - -tooltip.BloodMagic.sigil.air.desc=&o我感到轻æ¾å¤šäº†... -tooltip.BloodMagic.sigil.bloodLight.desc=&o我看è§äº†ä¸€æŸå…‰æ˜Ž! -tooltip.BloodMagic.sigil.compression.desc=&o钻石之手 -tooltip.BloodMagic.sigil.divination.desc=&o窥视çµé­‚ -tooltip.BloodMagic.sigil.divination.otherNetwork=窥视 %s çš„çµé­‚ -tooltip.BloodMagic.sigil.divination.currentAltarTier=当å‰å±‚级: %d -tooltip.BloodMagic.sigil.divination.currentEssence=当剿ºè´¨: %d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=当å‰å®¹é‡: %d LP -tooltip.BloodMagic.sigil.divination.currentTranquility=当å‰é™è°§: %d -tooltip.BloodMagic.sigil.divination.currentBonus=当剿•ˆç›Š: +%d%% -tooltip.BloodMagic.sigil.water.desc=&oæ— é™æ°´æº? -tooltip.BloodMagic.sigil.lava.desc=&o噢好烫! ä¸è¦åƒ -tooltip.BloodMagic.sigil.void.desc=&o胜过速易æ´Â®! -tooltip.BloodMagic.sigil.greenGrove.desc=&oç»¿è‰²çŽ¯ä¿æ— æ±¡æŸ“ -tooltip.BloodMagic.sigil.magnetism.desc=&o我现在éžå¸¸å…·æœ‰å¸å¼•力 -tooltip.BloodMagic.sigil.suppression.desc=&o比念力移动更好... -tooltip.BloodMagic.sigil.haste.desc=&o42剂咖啡因åŽ... -tooltip.BloodMagic.sigil.fastMiner.desc=&o继续挖, 继续挖... -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oè½å…¥ç„°ä¸­çš„鱼儿! -tooltip.BloodMagic.sigil.seer.desc=&o当看到的一切还ä¸è¶³å¤Ÿ -tooltip.BloodMagic.sigil.seer.currentAltarProgress=当å‰è¿›åº¦: %d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=当å‰è¿›åº¦: %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=消耗率: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=当å‰å±‚级: %d -tooltip.BloodMagic.sigil.seer.currentEssence=当剿ºè´¨: %d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=当å‰å®¹é‡: %d LP -tooltip.BloodMagic.sigil.seer.currentCharge=当å‰è€—能: %d -tooltip.BloodMagic.sigil.seer.currentTranquility=当å‰é™è°§: %d -tooltip.BloodMagic.sigil.seer.currentBonus=当剿•ˆç›Š: +%d%% -tooltip.BloodMagic.sigil.phantomBridge.desc=&o御气于é’空之上... -tooltip.BloodMagic.sigil.whirlwind.desc=&o最好ä¸è¦ç©¿è£™å­ -tooltip.BloodMagic.sigil.enderSeverance.desc=&o使末影人é‡ä¸Šä¸€ä¸ªä¸¥å³»å½¢åŠ¿! -tooltip.BloodMagic.sigil.teleposition.desc=éšæ—¶å¯ä»¥è„±ç¦»è¿™é‡Œ. -tooltip.BloodMagic.sigil.transposition.desc=感å—原力的力é‡, 我年轻的学徒. -tooltip.BloodMagic.sigil.holding.press=按下 &o%s&r&7 修改 -tooltip.BloodMagic.sigil.holding.desc=å°è®°æŽŒæŽ§ -tooltip.BloodMagic.sigil.holding.sigilInSlot=å°è®° %d: %s - -tooltip.BloodMagic.livingArmourPointsUpgrade.desc=æå‡æ„ŸçŸ¥ç›”甲的最大点数至 %d. - -tooltip.BloodMagic.bound.sword.desc=&oå± æ€å¹¼å¼±ä¹‹ç”Ÿçµ -tooltip.BloodMagic.bound.pickaxe.desc=&o无情地凿通大地 -tooltip.BloodMagic.bound.axe.desc=&oæ¶é­”èˆ¬çš„æ»¥ç æ»¥ä¼ -tooltip.BloodMagic.bound.shovel.desc=&o洗扫大地除去尘土 - -tooltip.BloodMagic.sacrificialDagger.desc=åªè¦è½»è½»åˆ’过手指... -tooltip.BloodMagic.sacrificialDagger.creative=对ç€ç¥­å›æ½œè¡Œå³å‡»å¡«æ»¡ -tooltip.BloodMagic.slate.desc=在祭å›ä¸­å°†çŸ³å¤´è½¬åŒ– -tooltip.BloodMagic.inscriber.desc=在墙é¢ä¸Šçš„æ–‡å­—... - -tooltip.BloodMagic.pack.selfSacrifice.desc=相当ä¸èˆ’适的背包... - -tooltip.BloodMagic.pack.stored=储存: %d LP - -tooltip.BloodMagic.activationCrystal.weak=æ¿€æ´»ä½Žç­‰ä»ªå¼ -tooltip.BloodMagic.activationCrystal.awakened=æ¿€æ´»æ›´å¼ºå¤§çš„ä»ªå¼ -tooltip.BloodMagic.activationCrystal.creative=åˆ›é€ æ¨¡å¼ - æ¿€æ´»ä»»ä½•ä»ªå¼ - -tooltip.BloodMagic.diviner.currentRitual=当å‰ä»ªå¼: -tooltip.BloodMagic.diviner.blankRune=空白仪å¼çŸ³: %d -tooltip.BloodMagic.diviner.waterRune=水之仪å¼çŸ³: %d -tooltip.BloodMagic.diviner.airRune=风之仪å¼çŸ³: %d -tooltip.BloodMagic.diviner.fireRune=ç«ä¹‹ä»ªå¼çŸ³: %d -tooltip.BloodMagic.diviner.earthRune=土之仪å¼çŸ³: %d -tooltip.BloodMagic.diviner.duskRune=薄暮仪å¼çŸ³: %d -tooltip.BloodMagic.diviner.dawnRune=破晓仪å¼çŸ³: %d -tooltip.BloodMagic.diviner.totalRune=仪å¼çŸ³æ€»æ•°: %d -tooltip.BloodMagic.diviner.extraInfo=&9-按 shift 了解详细信æ¯- -tooltip.BloodMagic.diviner.extraExtraInfo=&9-æŒ‰ä½ shift + M 展开更多信æ¯- -tooltip.BloodMagic.diviner.currentDirection=当剿œå‘: %s - -tooltip.BloodMagic.ritualReader.currentState=当剿¨¡å¼: %s -tooltip.BloodMagic.ritualReader.set_area=定义区域 -tooltip.BloodMagic.ritualReader.information=ä¿¡æ¯ -tooltip.BloodMagic.ritualReader.set_will_types=设置æ„志消耗 -tooltip.BloodMagic.ritualReader.desc.set_area=å³å‡»å·²æ¿€æ´»ä»ªå¼çš„主仪å¼çŸ³, 选至你想更改的区域, éšåŽåˆ†åˆ«å³å‡»æ–°åŒºåŸŸè§’è½çš„两个方å—. -tooltip.BloodMagic.ritualReader.desc.information=å³å‡»å·²æ¿€æ´»ä»ªå¼çš„主仪å¼çŸ³äº†è§£ä»ªå¼çš„基本信æ¯. -tooltip.BloodMagic.ritualReader.desc.set_will_types=设置仪å¼å°†æ¶ˆè€—çš„æ¶é­”æ„志类型, 工具æ ä¸­å­˜æ”¾è¯¥ç±»æ™¶ä½“å³å‡»ä¸»ä»ªå¼çŸ³. - -tooltip.BloodMagic.arcaneAshes=ç”¨äºŽç»˜åˆ¶ç‚¼é‡‘çŸ©é˜µçš„ç²‰ç° - -tooltip.BloodMagic.telepositionFocus.coords=当å‰åæ ‡: (%d, %d, %d) -tooltip.BloodMagic.telepositionFocus.dimension=世界ID: %d -tooltip.BloodMagic.telepositionFocus.weak=用于在世界中转移区域 -tooltip.BloodMagic.telepositionFocus.enhanced=用于在世界中转移区域 -tooltip.BloodMagic.telepositionFocus.reinforced=用于在世界中转移区域 -tooltip.BloodMagic.telepositionFocus.demonic=用于在世界中转移区域 - -tooltip.BloodMagic.livingArmour.upgrade.speed=è¿…æ·åŒè¶³ -tooltip.BloodMagic.livingArmour.upgrade.digging=çŸ®äººåŠ›é‡ -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=抗毒体质 -tooltip.BloodMagic.livingArmour.upgrade.fireResist=ç„°ç«ä¹‹ç¤¼ -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=结实手心 -tooltip.BloodMagic.livingArmour.upgrade.knockback=强劲身躯 -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=åšéŸ§çš®è‚¤ -tooltip.BloodMagic.livingArmour.upgrade.health=å¥å£®ä½“è´¨ -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=猛烈击打 -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=å°„å‡»è¯€çª -tooltip.BloodMagic.livingArmour.upgrade.stepAssist=æ­¥ä¼è¡¥åŠ© -tooltip.BloodMagic.livingArmour.upgrade.grimReaper=死神竞跑 -tooltip.BloodMagic.livingArmour.upgrade.solarPowered=é˜³å…‰èƒ½é‡ -tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=å¤ç¢‘守护 -tooltip.BloodMagic.livingArmour.upgrade.revealing=æ­ç¤º -tooltip.BloodMagic.livingArmour.upgrade.experienced=熟练 -tooltip.BloodMagic.livingArmour.upgrade.jump=壮实åŒè…¿ -tooltip.BloodMagic.livingArmour.upgrade.fallProtect=柔和è½å¶ -tooltip.BloodMagic.livingArmour.upgrade.graveDigger=掘墓者 -tooltip.BloodMagic.livingArmour.upgrade.sprintAttack=冲撞击打 -tooltip.BloodMagic.livingArmour.upgrade.criticalStrike=精准击打 -tooltip.BloodMagic.livingArmour.upgrade.elytra=鞘翅 -tooltip.BloodMagic.livingArmour.upgrade.nightSight=夜行猛技 - - -tooltip.BloodMagic.livingArmour.upgrade.slowness=疲瘸之腿 -tooltip.BloodMagic.livingArmour.upgrade.crippledArm=残废手臂 -tooltip.BloodMagic.livingArmour.upgrade.level=%s (等级 %d) - -tooltip.BloodMagic.livingArmour.upgrade.points=&6强化点数: %s / %s - -tooltip.BloodMagic.livingArmour.extraExtraInfo=&9-æŒ‰ä½ shift + M 查看进展信æ¯- - -tooltip.BloodMagic.will=æ„å¿—è´¨é‡: %1$,.2f -tooltip.BloodMagic.sentientSword.desc=以æ¶é­”æ„志唤起其最大潜能. -tooltip.BloodMagic.soulGem.petty=ç”¨äºŽå­˜å‚¨å¾®é‡æ„志的晶石 -tooltip.BloodMagic.sentientAxe.desc=以æ¶é­”æ„志唤起其最大潜能. -tooltip.BloodMagic.sentientPickaxe.desc=以æ¶é­”æ„志唤起其最大潜能. -tooltip.BloodMagic.sentientShovel.desc=以æ¶é­”æ„志唤起其最大潜能. -tooltip.BloodMagic.soulGem.lesser=ç”¨äºŽå­˜å‚¨å°‘é‡æ„志的晶石 -tooltip.BloodMagic.soulGem.common=用于存储更多æ„志的晶石 -tooltip.BloodMagic.soulGem.greater=ç”¨äºŽå­˜å‚¨å¤§é‡æ„志的晶石 -tooltip.BloodMagic.soulGem.grand=用于存储æžå¤§æ•°é¢æ„志的晶石 -tooltip.BloodMagic.soulSnare.desc=æŠ•æŽ·å‘æ€ªç‰©å¹¶æ¶ˆç­å®ƒä»¬æ¥èŽ·å–附于其身的æ¶é­”æ„å¿— - -tooltip.BloodMagic.itemFilter.exact=将确ä¿ç‰©å“ç²¾ç¡®åŒ¹é… -tooltip.BloodMagic.itemFilter.ignoreNBT=忽视筛选的NBT -tooltip.BloodMagic.itemFilter.modItems=åŒMod的物å“å…¨éƒ¨åŒ¹é… -tooltip.BloodMagic.itemFilter.oreDict=凭借矿物辞典筛选 - -tooltip.BloodMagic.fluid.type=æ‰€å«æ¶²ä½“ -tooltip.BloodMagic.fluid.amount=æ•°é‡ -tooltip.BloodMagic.fluid.capacity=å®¹é‡ - -tooltip.BloodMagic.ghost.everything=ä»»ä½•ç‰©å“ -tooltip.BloodMagic.ghost.amount=å¹½çµç‰©å“æ•°é‡: %d - -tooltip.BloodMagic.currentType.default=è•´å«: 原生æ„å¿— -tooltip.BloodMagic.currentType.corrosive=è•´å«: è…蚀æ„å¿— -tooltip.BloodMagic.currentType.destructive=è•´å«: ç ´åæ„å¿— -tooltip.BloodMagic.currentType.vengeful=è•´å«: å¤ä»‡æ„å¿— -tooltip.BloodMagic.currentType.steadfast=è•´å«: åšå®šæ„å¿— - -tooltip.BloodMagic.currentBaseType.default=原生 -tooltip.BloodMagic.currentBaseType.corrosive=è…蚀 -tooltip.BloodMagic.currentBaseType.destructive=ç ´å -tooltip.BloodMagic.currentBaseType.vengeful=å¤ä»‡ -tooltip.BloodMagic.currentBaseType.steadfast=åšå®š - -tooltip.BloodMagic.experienceTome=用于储存ç»éªŒçš„书 -tooltip.BloodMagic.experienceTome.exp=ç»éªŒå€¼: %0.3f -tooltip.BloodMagic.experienceTome.expLevel=等级: %d - -tooltip.BloodMagic.decoration.safe=安全装潢 -tooltip.BloodMagic.decoration.notSafe=å±é™©è£…æ½¢ - -tooltip.BloodMagic.cuttingFluidRatio=%d/%d 所剩å¯ç”¨ - -tooltip.BloodMagic.potion.uses=%d 使用剩余 - -tooltip.BloodMagic.book.shifting=这些符å·ä¼¼ä¹Ž... &oåœ¨å˜æ¢ç€... - -tooltip.BloodMagic.willGauge=一个奇怪的装置, å¯ä»¥æµ‹é‡æ¶é­”çµåŸŸä¸­çš„æ¶é­”æ„å¿—. - -# Ritual -ritual.BloodMagic.blockRange.tooBig=æä¾›çš„æ–¹å—范围过大! 最多ä¸è¶…过 %s 个方å—. -ritual.BloodMagic.blockRange.tooFar=æä¾›çš„æ–¹å—范围太远! 需è¦åœ¨åž‚ç›´è·ç¦» %s , æ°´å¹³è·ç¦» %s 之内. -ritual.BloodMagic.blockRange.inactive=该仪å¼çŸ³ç›®å‰æ— æ´»åЍ, 没有å¯ä¿®æ”¹çš„范围. -ritual.BloodMagic.blockRange.noRange=èŒƒå›´é€‰æ‹©ä¸æ°å½“. -ritual.BloodMagic.blockRange.firstBlock=记录新范围的第一个方å—. -ritual.BloodMagic.blockRange.success=新范围设置æˆåŠŸ! -ritual.BloodMagic.willConfig.set=该仪å¼å°†ä½¿ç”¨è¿™ç±»æ¶é­”æ„志类型: %s -ritual.BloodMagic.willConfig.void=该仪å¼ä¸å†ä¼šä½¿ç”¨æ¶é­”æ„å¿— - -ritual.BloodMagic.testRitual=æµ‹è¯•ä»ªå¼ -ritual.BloodMagic.waterRitual=æ¶Œæ³‰ä»ªå¼ -ritual.BloodMagic.lavaRitual=下界夜曲 -ritual.BloodMagic.greenGroveRitual=ç»¿ä¸›ä»ªå¼ -ritual.BloodMagic.jumpRitual=é«˜è·³ä»ªå¼ -ritual.BloodMagic.wellOfSufferingRitual=苦难之井 -ritual.BloodMagic.featheredKnifeRitual=ç¾½åˆ€ä»ªå¼ -ritual.BloodMagic.regenerationRitual=é‡ç”Ÿä»ªå¼ -ritual.BloodMagic.harvestRitual=丰收之月 -ritual.BloodMagic.magneticRitual=ç£å¼•ä»ªå¼ -ritual.BloodMagic.crushingRitual=æŒ–æŽ˜ä»ªå¼ -ritual.BloodMagic.fullStomachRitual=盛宴之歌 -ritual.BloodMagic.interdictionRitual=åˆ¶æ­¢ä»ªå¼ -ritual.BloodMagic.containmentRitual=ç‰µåˆ¶ä»ªå¼ -ritual.BloodMagic.speedRitual=é€Ÿç§»ä»ªå¼ -ritual.BloodMagic.suppressionRitual=æŠ‘æ¶²ä»ªå¼ -ritual.BloodMagic.expulsionRitual=驱逿°›åœº -ritual.BloodMagic.zephyrRitual=和风之唤 -ritual.BloodMagic.upgradeRemoveRitual=净çµä¹‹éŸ³ -ritual.BloodMagic.armourEvolveRitual=æŸçµè¿›åŒ– -ritual.BloodMagic.animalGrowthRitual=ç‰§å…»ä»ªå¼ -ritual.BloodMagic.forsakenSoulRitual=孤魂集会 -ritual.BloodMagic.crystalHarvestRitual=碎晶裂纹 -ritual.BloodMagic.meteorRitual=å æ˜Ÿæ ‡ä½ - -ritual.BloodMagic.cobblestoneRitual=æžå¯’ç«å±± -ritual.BloodMagic.placerRitual=é“ºè®¾ä»ªå¼ -ritual.BloodMagic.fellingRitual=伿ž—ä»ªå¼ -ritual.BloodMagic.pumpRitual=虹å¸åœ£æ›² -ritual.BloodMagic.altarBuilderRitual=祭å›é›†ç»“å· -ritual.BloodMagic.portalRitual=折域之门 - - -ritual.BloodMagic.waterRitual.info=通过主仪å¼çŸ³ç”Ÿæˆä¸€ä¸ªæ°´æºæ–¹å—. -ritual.BloodMagic.lavaRitual.info=通过主仪å¼çŸ³ç”Ÿæˆä¸€ä¸ªç†”å²©æºæ–¹å—. -ritual.BloodMagic.greenGroveRitual.info=åœ¨å…¶èŒƒå›´å†…ç§æ¤å†œä½œç‰©. -ritual.BloodMagic.jumpRitual.info=使实体跃å‘高空. -ritual.BloodMagic.wellOfSufferingRitual.info=攻击其伤害范围内的生物, 并将所获LP储入邻近的血之祭å›. -ritual.BloodMagic.featheredKnifeRitual.info=扣除其范围内的玩家生命值, 并将所获LP储入邻近的血之祭å›. -ritual.BloodMagic.regenerationRitual.info=治疗其范围内失去生命值的实体. -ritual.BloodMagic.harvestRitual.info=收割其范围内的æ¤ç‰©, 产物掉è½äºŽåœ°ä¸Š. -ritual.BloodMagic.magneticRitual.info=将地底的矿石传é€è‡³å…¶æ”¾ç½®åŒºåŸŸ. -ritual.BloodMagic.crushingRitual.info=ç ´å其挖掘范围内的方å—, 并将掉è½ç‰©æ”¾ç½®äºŽæ‰€è¿žæŽ¥çš„ç®±å­. -ritual.BloodMagic.crushingRitual.destructive.info=(ç ´åæ€§) å¼ºåŠ›çš„ç ´åæ–¹å—: 所有方å—ç ´åå— æ—¶è¿III å½±å“. -ritual.BloodMagic.crushingRitual.steadfast.info=(åšå®šæ€§) 以 精准采集 获å–è¢«ç ´åæ–¹å—. 适用情况下覆盖时è¿. -ritual.BloodMagic.crushingRitual.corrosive.info=(è…蚀性) æ‰€æœ‰è¢«ç ´åæ–¹å—将以基础切削油的形å¼å¤„ç†. 适用情况下覆盖精准采集. -ritual.BloodMagic.greenGroveRitual.corrosive.info=(è…蚀性) 范围内的实体将被附近的æ¤ç‰©æ”»å‡», å¸é£Ÿä»–们的生命. -ritual.BloodMagic.greenGroveRitual.default.info=(原生) 加快所有的仪å¼è¿ä½œé€Ÿåº¦, å–决于çµåŸŸä¸­å…¨éƒ¨æ„å¿—. -ritual.BloodMagic.greenGroveRitual.steadfast.info=(åšå®šæ€§) 在水åˆèŒƒå›´å†…, ç§å­ä¼šè¢«å†æ¬¡ç§æ¤ä¸”æ–¹å—会被润湿. - -ritual.BloodMagic.fullStomachRitual.info=从连接的箱å­ä¸­èŽ·å–食物, æ¥è¡¥å……玩家的饥饿值. -ritual.BloodMagic.interdictionRitual.info=使其范围内的所有生物推离于主仪å¼çŸ³. -ritual.BloodMagic.containmentRitual.info=使其范围内的所有生物牵引å‘主仪å¼çŸ³. -ritual.BloodMagic.speedRitual.info=å°†å…¶èŒƒå›´å†…çš„çŽ©å®¶ä»¥ä»ªå¼æ–¹å‘抛射出去. -ritual.BloodMagic.suppressionRitual.info=抑制其范围内的液体 - åœç”¨ä»ªå¼æ—¶æ¢å¤. -ritual.BloodMagic.expulsionRitual.info=驱é€å…¶èŒƒå›´å†…, éžæ¿€æ´»è€…或主仪å¼çŸ³ä¸Šæ–¹ç®±å­ä¸­æ— ç»‘定血å®ç çš„玩家, 离开该区域. -ritual.BloodMagic.zephyrRitual.info=拾å–其范围内的掉è½ç‰©, 并放入所连接的箱å­. - - -ritual.BloodMagic.animalGrowthRitual.info=加快其范围内的幼年动物的生长速度. -ritual.BloodMagic.forsakenSoulRitual.info=对其伤害范围内的生物造æˆä¼¤å®³, 当生物死亡时, 其晶体范围内的æ¶é­”晶簇将生长. -ritual.BloodMagic.crystalHarvestRitual.info=ç ´å范围内的æ¶é­”æ„å¿—æ™¶ç°‡, 掉è½ç‰©ä¸¢äºŽæ™¶ç°‡é¡¶éƒ¨. -ritual.BloodMagic.placerRitual.info=å–出所连接的容器中的方å—, 并放置于世界中. -ritual.BloodMagic.fellingRitual.info=ä¸€ä¸ªä¼æœ¨è®¾æ–½, 该仪å¼å°†ç ä¼å…¶èŒƒå›´å†…所有树与å¶å­, 并收集掉è½ç‰©. -ritual.BloodMagic.pumpRitual.info=ä»Žè§„å®šèŒƒå›´èŽ·å–æ¶²ä½“. åªæœ‰å½“所连接的液体容器至少有一桶é‡çš„ç›¸åŒæ¶²ä½“æ—¶, 移入液体. -ritual.BloodMagic.altarBuilderRitual.info=将所连接的容器中的祭å›éƒ¨ä»¶æ­å»ºå‡ºæ¥. -ritual.BloodMagic.portalRitual.info=创建一个传é€é—¨ç½‘络, 以激活者åŠç›´æŽ¥æŽ¥è§¦æ–¹å—为基础, 两者相åŒçš„两个传é€é—¨è¾¾æˆè¿žæŽ¥. æ¿€æ´»åŽæœªä¿®æ”¹ä¼ é€ç½‘络的情况下方å—å¯ä»¥å˜æ›´. -ritual.BloodMagic.meteorRitual.info=消耗其物å“范围内的一个物å“, 从天空中å¬å”¤ä¸€ä¸ªå……满资æºçš„æµæ˜Ÿ, 直接å å‘仪å¼. - -ritual.BloodMagic.waterRitual.waterRange.info=(æ°´æº) ä»ªå¼æ”¾ç½®æ°´æºæ–¹å—的区域. -ritual.BloodMagic.lavaRitual.lavaRange.info=(熔岩) ä»ªå¼æ”¾ç½®ç†”岩方å—的区域. -ritual.BloodMagic.lavaRitual.fireFuse.info=(å¤ä»‡æ€§) 在这个区域内的实体将é­å—缓燃引线效果. -ritual.BloodMagic.greenGroveRitual.growing.info=(生长) 仪å¼åŠ å¿«æ¤ç‰©ç”Ÿé•¿çš„区域. -ritual.BloodMagic.greenGroveRitual.leech.info=(è…蚀性) 区域内实体的生命将æµå¤±äºŽæ»‹å…»é™„近的农作物. -ritual.BloodMagic.greenGroveRitual.hydrate.info=(åšå®šæ€§) 区域内的方å—将被润湿为耕地, 且区域内的ç§å­å°†è¢«å°±è¿‘ç§æ¤. -ritual.BloodMagic.jumpRitual.jumpRange.info=(跳跃) 在这个区域内的实体将跃å‘高空. -ritual.BloodMagic.wellOfSufferingRitual.altar.info=(祭å›) è§„å®šä»ªå¼æ£€æµ‹è¡€ä¹‹ç¥­å›çš„区域. è¯¥é¡¹ä¿®æ”¹ä¸ºæ·»åŠ æˆ–æ’¤é”€ä¸€ä¸ªåæ ‡. -ritual.BloodMagic.wellOfSufferingRitual.damage.info=(伤害) 规定仪å¼ä¼¤å®³ç”Ÿç‰©çš„区域. 该区域内所有生物(除了玩家)å°†æŒç»­å—到伤害. -ritual.BloodMagic.featheredKnifeRitual.altar.info=(祭å›) è§„å®šä»ªå¼æ£€æµ‹è¡€ä¹‹ç¥­å›çš„区域. è¯¥é¡¹ä¿®æ”¹ä¸ºæ·»åŠ æˆ–æ’¤é”€ä¸€ä¸ªåæ ‡. -ritual.BloodMagic.featheredKnifeRitual.damage.info=(伤害) 规定仪å¼ä¼¤å®³çŽ©å®¶çš„åŒºåŸŸ. 该区域内的玩家将æŒç»­å—到伤害直至设定的生命值下é™. -ritual.BloodMagic.regenerationRitual.heal.info=(治愈) 该区域内的生物将获得 生命æ¢å¤buff. -ritual.BloodMagic.harvestRitual.harvestRange.info=(收割) 该区域内的æ¤ç‰©å°†è¢«æ”¶å‰². -ritual.BloodMagic.magneticRitual.placementRange.info=(放置) 仪å¼å°†æŠŠèŽ·å–的矿石放置于该区域内. -ritual.BloodMagic.crushingRitual.crushingRange.info=(挖掘) 该区域的方å—将被破å. -ritual.BloodMagic.crushingRitual.chest.info=(ç®±å­) ç®±å­ä½ç½®, 仪å¼å°†æŠŠç ´åçš„æ–¹å—æ”¾å…¥å…¶ä¸­. -ritual.BloodMagic.fullStomachRitual.fillRange.info=(喂食) 仪å¼å°†ä¼šå–‚食该区域内的玩家. -ritual.BloodMagic.fullStomachRitual.chest.info=(ç®±å­) ç®±å­ä½ç½®, 仪å¼å°†æå–其中的食物æ¥å–‚食区域内的玩家. -ritual.BloodMagic.interdictionRitual.interdictionRange.info=(推离) ä»ªå¼æŽ¨ç¦»ç”Ÿç‰©çš„åŒºåŸŸ. 无论该区域ä½äºŽä½•处, 所有生物将被推离于主仪å¼çŸ³. -ritual.BloodMagic.containmentRitual.containmentRange.info=(牵引) 仪å¼ç‰µå¼•生物的区域. 无论该区域ä½äºŽä½•处, 所有生物将被牵引å‘主仪å¼çŸ³. -ritual.BloodMagic.speedRitual.sanicRange.info=(速度) 所有ä½äºŽè¯¥åŒºåŸŸå†…的实体, 将被抛射å‘ä»ªå¼æ‘†ç›¸æˆçš„箭头方å‘. -ritual.BloodMagic.suppressionRitual.suppressionRange.info=(抑液) è¯¥åŒºåŸŸå†…æ‰€æœ‰æ¶²ä½“å°†è¢«ä»ªå¼æŠ‘åˆ¶. -ritual.BloodMagic.expulsionRitual.expulsionRange.info=(驱é€) -ritual.BloodMagic.zephyrRitual.zephyrRange.info=(拾å–) 该区域内的物å“将被拾å–储入所连接箱å­. -ritual.BloodMagic.zephyrRitual.chest.info=(ç®±å­) ç®±å­ä½ç½®, 仪å¼å°†æŠŠæ‹¾å–çš„ç‰©å“æ”¾å…¥å…¶ä¸­. -ritual.BloodMagic.animalGrowthRitual.growing.info=(æˆé•¿) 该区域内的动物将æˆé•¿å¾—æ›´å¿«. -ritual.BloodMagic.forsakenSoulRitual.crystal.info=(晶体) å½“æœ‰ç”Ÿç‰©å› ä»ªå¼æ­»äº¡æ—¶, 该区域内的晶簇生长速度将加快. -ritual.BloodMagic.forsakenSoulRitual.damage.info=(伤害) 该区域内的生物将缓慢的收到伤害, 当死亡时晶簇将生长. -ritual.BloodMagic.crystalHarvestRitual.crystal.info=(晶体) æ™¶ç°‡å°†è¢«ç ´åæˆä»…ç•™å•æ™¶çš„æ™¶ç°‡, 被破å的晶体将掉è½äºŽä¸–界. - -ritual.BloodMagic.placerRitual.placerRange.info=(放置) 仪å¼å°†æ”¾ç½®æ–¹å—的区域. -ritual.BloodMagic.placerRitual.chest.info=(ç®±å­) ç®±å­ä½ç½®, 仪å¼å°†æå–å…¶ä¸­çš„æ–¹å—æ”¾ç½®äºŽä¸–界中. -ritual.BloodMagic.fellingRitual.fellingRange.info=(ç ä¼) 仪å¼å°†æœå¯»åŽŸæœ¨å’Œæ ‘å¶å¹¶è¿›è¡Œç ä¼çš„区域. -ritual.BloodMagic.fellingRitual.chest.info=(ç®±å­) ç®±å­ä½ç½®, 仪å¼å°†æŠŠæŽ‰è½ç‰©æ”¾å…¥å…¶ä¸­. -ritual.BloodMagic.pumpRitual.pumpRange.info=(引水) 仪å¼äºŽä¸–ç•Œä¸­èŽ·å–æ¶²ä½“的区域. - -# Chat -chat.BloodMagic.altarMaker.setTier=层级设置: %d -chat.BloodMagic.altarMaker.building=铺设一个 %d å±‚ç¥­å› -chat.BloodMagic.altarMaker.destroy=消除一个 %d å±‚ç¥­å› -chat.BloodMagic.altarMaker.creativeOnly=该物å“ä»…é™åˆ›é€ æ¨¡å¼. - -chat.BloodMagic.damageSource=%s çš„çµé­‚开始å˜å¾—虚弱 - -chat.BloodMagic.ritual.weak=你感到有股拉力, ä½†æ²¡æœ‰è¶³å¤Ÿçš„åŠ›é‡æ¥å®Œæˆè¿™ä¸ªä»ªå¼. -chat.BloodMagic.ritual.prevent=仪å¼åœ¨ç§¯æžçš„æŠµæŠ—ä½ ! -chat.BloodMagic.ritual.activate=ä¸€è‚¡èƒ½é‡æµç»è¿™ä¸ªä»ªå¼! -chat.BloodMagic.ritual.notValid=这些仪å¼çŸ³ä¼¼ä¹Žæœ‰äº›æ‘†æ”¾ä¸å¾—当... - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=你感到已ç»å¥½å¤šäº†! -chat.BloodMagic.livingArmour.upgrade.fireRemove=&6ç«ç„°æŠµæŠ—éšä¸€è‚¡æ¸…凉感附ç€äºŽä½ . -chat.BloodMagic.livingArmour.upgrade.grimReaper=&6朦胧中一股能é‡ä½¿ä½ è„±ç¦»æ­»äº¡è¾¹ç¼˜! -chat.BloodMagic.livingArmour.newUpgrade=&4强化完æˆ! - -chat.BloodMagic.routing.remove=移出记录ä½ç½® -chat.BloodMagic.routing.set=设置节点ä½ç½® -chat.BloodMagic.routing.link.master=连接到主节点! -chat.BloodMagic.routing.link=èŠ‚ç‚¹è¿žæŽ¥å®Œæˆ - -chat.BloodMagic.altar.comp.glowstone=一个è¤çŸ³å— -chat.BloodMagic.altar.comp.bloodstone=一个大血石砖 -chat.BloodMagic.altar.comp.beacon=一个信标 -chat.BloodMagic.altar.comp.bloodrune=一个气血符文 -chat.BloodMagic.altar.comp.crystal=ä¸€ä¸ªæ— æ•ˆç‰©å“ -chat.BloodMagic.altar.comp.notair=ä¸€ä¸ªå®žå¿ƒæ–¹å— - -chat.BloodMagic.altar.nextTier=下一层级的血之祭å›ç¼ºå¤± %s 在 %s. - -chat.BloodMagic.mimic.potionSet=è¯å‰‚陷阱已设置. -chat.BloodMagic.mimic.potionRemove=è¯å‰‚陷阱已无效. -chat.BloodMagic.mimic.potionInterval.up=è¯å‰‚时间间隔已增加至: %d 刻. -chat.BloodMagic.mimic.potionInterval.down=è¯å‰‚时间间隔已å‡å°‘至: %d 刻. -chat.BloodMagic.mimic.detectRadius.up=玩家检测åŠå¾„已增加至: %d 格方å—. -chat.BloodMagic.mimic.detectRadius.down=玩家检测åŠå¾„å·²å‡å°‘至: %d 格方å—. -chat.BloodMagic.mimic.potionSpawnRadius.up=è¯å‰‚生æˆåŠå¾„已增加至: % 格方å—. -chat.BloodMagic.mimic.potionSpawnRadius.down=è¯å‰‚生æˆåŠå¾„å·²å‡å°‘至: % 格方å—. - -# entity -entity.BloodMagic.SentientSpecter.name=æ„ŸçŸ¥ä¹‹çµ -entity.BloodMagic.Mimic.name=æ‹Ÿæ€ - -# sekrit - - - - -# Commands -commands.error.arg.invalid=æ— æ•ˆå‚æ•° -commands.error.arg.missing=傿•°ä¸è¶³ -commands.error.arg.player.missing=ä½ å¿…é¡»æŒ‡å®šä¸€ä¸ªçŽ©å®¶æ¥æ‰§è¡Œè¯¥å‘½ä»¤. -commands.error.404=命令未找到! -commands.error.unknown=未知的命令! -commands.error.perm=你没有使用该命令的æƒé™. - -commands.success=æˆåŠŸæ‰§è¡Œ - -commands.format.help=%s - %s -commands.format.error=%s - %s - -commands.help.usage=/bloodmagic help -commands.help.help=使用"/bloodmagic help"命令显示指令列表. - -commands.network.usage=/bloodmagic network [å¸å–(syphon)|添加(add)|查看(get)|å¡«å……(fill)|填满(cap)] <玩家> [æ•°é‡] -commands.network.help=çµé­‚网络实用工具 -commands.network.syphon.help=从指定玩家的çµé­‚网络中移出指定的LP值. -commands.network.syphon.success=æˆåŠŸä»Ž %s å¸å–出 %dLP . -commands.network.add.help=添加指定的LP值到指定玩家的çµé­‚网络中. æœä»Žæ ‡å‡†çš„LP增加规则. -commands.network.add.success=æˆåŠŸæ·»åŠ  %dLP 到 %s çš„çµé­‚网络. -commands.network.set.help=将指定玩家的LP设置为所给数值. -commands.network.set.success=æˆåŠŸå°† %s çµé­‚网络中的LP设置为 %d . -commands.network.get.help=返还指定玩家çµé­‚网络中的LP值. -commands.network.fill.help=将指定玩家的LP填充为 %d. -commands.network.fill.success=æˆåŠŸå¡«å…… %s çš„çµé­‚网络. -commands.network.cap.help=填充指定玩家的çµé­‚ç½‘ç»œè‡³å…¶æ‰€æŒæœ‰çš„æœ€é«˜é˜¶æ°”è¡€å®ç å®¹é‡çš„æœ€å¤§å€¼. -commands.network.cap.success=æˆåŠŸå¡«æ»¡ %s çš„çµé­‚网络. - -commands.bind.usage=/bloodmagic bind [是(true)|å¦(false)] [玩家] -commands.bind.help=用于设置/解除对手æŒç‰©å“的绑定情况. -commands.bind.success=绑定æˆåŠŸ -commands.bind.remove.success=解除绑定æˆåŠŸ - -commands.orb.usage=/bloodmagic orb [设置(set)|查看(get)] <玩家> [等级] -commands.orb.help=用于设置或查看玩家的最高血å®ç ç­‰çº§. - -commands.bind.usage=/bind <玩家> -commands.bind.success=ç‰©å“æˆåŠŸç»‘å®š! -commands.bind.failed.noPlayer=没有指定玩家 -commands.bind.failed.alreadyBound=物å“å·²ç»è¢«ç»‘定; 使用 /unbind æ¥è§£é™¤ç»‘定 -commands.bind.failed.notBindable=ç‰©å“æ— æ³•被绑定 -commands.unbind.usage=/unbind -commands.unbind.success=ç‰©å“æˆåŠŸè§£é™¤ç»‘å®š! -commands.unbind.failed.notBindable=ç‰©å“æ— æ³•解除绑定 -commands.soulnetwork.usage=/soulnetwork <玩家> <添加(add)|å‡åŽ»(subtract)|填满(fill)|清空(empty)|查看(get)> [æ•°é‡] -commands.soulnetwork.add.success=æˆåŠŸæ·»åŠ  %dLP 到 %s çš„çµé­‚网络! -commands.soulnetwork.subtract.success=æˆåŠŸä»Ž %s çš„çµé­‚网络中å‡åŽ» %dLP ! -commands.soulnetwork.fill.success=æˆåŠŸå¡«æ»¡ %s çš„çµé­‚网络! -commands.soulnetwork.empty.success=æˆåŠŸæ¸…ç©º %s çš„çµé­‚网络! -commands.soulnetwork.get.success=%s çš„çµé­‚网络中有 %dLP ! -commands.soulnetwork.noPlayer=没有指定玩家 -commands.soulnetwork.noCommand=è¿™ä¸ç¬¦å‘½ä»¤è§„定 -commands.soulnetwork.notACommand=è¿™ä¸æ˜¯æœ‰æ•ˆçš„命令 -commands.soulnetwork.fillMax.success=æˆåŠŸå°† %s çš„çµé­‚网络填满至其å®ç çš„æœ€å¤§å€¼! -commands.soulnetwork.create.success=创建 %s çš„çµé­‚网络æˆåŠŸ (å®ç ç­‰çº§: %d) - -# GUI -tile.BloodMagic.inputNode.name=输入节点 -tile.BloodMagic.outputNode.name=输出节点 - -# Keybinds -BloodMagic.keybind.open_holding=打开集æŒå°è®° -BloodMagic.keybind.cycle_holding_pos=循环选择å°è®° (+) -BloodMagic.keybind.cycle_holding_neg=循环选择å°è®° (-) - -# JustEnoughItems -jei.BloodMagic.recipe.altar=è¡€ä¹‹ç¥­å› -jei.BloodMagic.recipe.binding=炼金矩阵 (绑定) -jei.BloodMagic.recipe.alchemyArrayCrafting=炼金矩阵 -jei.BloodMagic.recipe.soulForge=狱ç«ç†”炉 -jei.BloodMagic.recipe.alchemyTable=炼金术桌 -jei.BloodMagic.recipe.requiredLP=LP: %d -jei.BloodMagic.recipe.requiredTier=层级: %d -jei.BloodMagic.recipe.consumptionRate=消耗率: %d LP/t -jei.BloodMagic.recipe.drainRate=消耗率: %d LP/t -jei.BloodMagic.recipe.minimumSouls=最å°å€¼: %1$,.2f Will -jei.BloodMagic.recipe.soulsDrained=消耗: %1$,.2f Will -jei.BloodMagic.recipe.lpDrained=消耗: %,d LP -jei.BloodMagic.recipe.ticksRequired=æ—¶é—´: %,d 刻 - -jei.BloodMagic.desc.altarBuilder=该物å“ä»…é™åˆ›é€ æ¨¡å¼ï¼Œç”¨äºŽè°ƒè¯•测试.\n\nShift + å³é”® 改å˜å±‚级. å³é”®ç¥­å›å¼€å§‹æ­å»º.\n\n手æŒç ´åç¥­å›æ—¶å°†å…¨éƒ¨ç§»é™¤. -jei.BloodMagic.desc.demonicWill=附身于生物的æ¶é­”æ„志之体现.\n\nå¯ä»¥é€šè¿‡ç”¨æ„ŸçŸ¥æ­¦å™¨æ€æ­»ç”Ÿç‰©æŽ‰è½, 或是对ç€ç”Ÿç‰©æŠ›æŽ·åŽŸå§‹æŠ•ç½‘, 当它出现白色颗粒时æ€äº†å®ƒ. - -# WAILA -waila.BloodMagic.sneak=&oæ½œè¡ŒæŸ¥çœ‹ä¿¡æ¯ -waila.BloodMagic.array.reagent=试剂: %s -waila.BloodMagic.array.catalyst=石æ¿: %s -option.BloodMagic.bypassSneak=潜行 -option.BloodMagic.bloodAltar=è¡€ä¹‹ç¥­å› -option.BloodMagic.ritualController=仪å¼çŸ³ -option.BloodMagic.teleposer=ä¼ é€å™¨ -option.BloodMagic.array=炼金矩阵 - -# Thaumcraft -tc.research_category.BLOODMAGIC=血红奥术 - -# Thaumcraft Research -bloodmagic.research_name.BLOODMAGIC=血魔法 -bloodmagic.research_text.BLOODMAGIC=血红奥术 -bloodmagic.research_page.BLOODMAGIC.1=è¡€é­”æ³•çš„é¢†åŸŸæ€»æ˜¯ä¼¼ä¹Žæœ‰äº›å­¤ç«‹ä¸”åƒæ˜¯"个人"艺术, åŒä¼—所周知的喜爱éšå±…有时还有点疯癫的血魔法师. 然而, 自我牺牲与生命æºè´¨çš„力é‡ç”šè‡³æ‹¥æœ‰è¶…出一般血魔法师所è§çš„用途, 事实上, è¿™ç§åЛ釿˜¾ç„¶ç»ˆç©¶èƒ½åº”用于神秘学. - -# Buttons -button.bloodmagic.tooltip.fill=填充网络 diff --git a/src/main/resources/assets/bloodmagic/lang/zh_TW.lang b/src/main/resources/assets/bloodmagic/lang/zh_TW.lang deleted file mode 100644 index 39490692..00000000 --- a/src/main/resources/assets/bloodmagic/lang/zh_TW.lang +++ /dev/null @@ -1,404 +0,0 @@ -#Creative Tab -itemGroup.BloodMagic.creativeTab=血魔法 -itemGroup.BloodMagic.creativeTabTome=血魔法強化經文 - -#Items -item.BloodMagic.activationCrystal.weak.name=[虛弱]激活水晶 -item.BloodMagic.activationCrystal.awakened.name=[覺醒]激活水晶 -item.BloodMagic.activationCrystal.creative.name=[創造模å¼]激活水晶 - -item.BloodMagic.sacrificialDagger.normal.name=犧牲匕首 -item.BloodMagic.sacrificialDagger.creative.name=創造模å¼çŠ§ç‰²åŒ•é¦– -item.BloodMagic.pack.selfSacrifice.name=血文背包 -item.BloodMagic.pack.sacrifice.name=紋章血甲 -item.BloodMagic.daggerOfSacrifice.name=ç»ç¥­åˆ€ - -item.BloodMagic.lavaCrystal.name=熔岩晶體 - -item.BloodMagic.bound.sword.name=ç´„æŸä¹‹åŠ -item.BloodMagic.bound.pickaxe.name=ç´„æŸä¹‹éެ -item.BloodMagic.bound.axe.name=ç´„æŸä¹‹æ–§ -item.BloodMagic.bound.shovel.name=ç´„æŸä¹‹é¬ - -item.BloodMagic.bucket.lifeEssence.name=生命之桶 - -item.BloodMagic.scribe.water.name=元素銘文:水 -item.BloodMagic.scribe.fire.name=å…ƒç´ éŠ˜æ–‡ï¼šç« -item.BloodMagic.scribe.earth.name=元素銘文:地 -item.BloodMagic.scribe.air.name=元素銘文:風 -item.BloodMagic.scribe.dusk.name=å…ƒç´ éŠ˜æ–‡ï¼šé»ƒæ˜ -item.BloodMagic.scribe.dawn.name=元素銘文:黎明 - -item.BloodMagic.focus.weak.name=傳逿–¹ä½æ ¸å¿ƒ -item.BloodMagic.focus.enhanced.name=å¼·åŒ–å‚³é€æ–¹ä½æ ¸å¿ƒ -item.BloodMagic.focus.reinforced.name=åŠ›ä¹‹å‚³é€æ–¹ä½æ ¸å¿ƒ -item.BloodMagic.focus.demonic.name=æƒ¡é­”å‚³é€æ–¹ä½æ ¸å¿ƒ - -item.BloodMagic.slate.blank.name=ç©ºç™½çŸ³æ¿ -item.BloodMagic.slate.reinforced.name=åŠ›ä¹‹çŸ³æ¿ -item.BloodMagic.slate.imbued.name=çŒè¼¸çŸ³æ¿ -item.BloodMagic.slate.demonic.name=æƒ¡é­”çŸ³æ¿ -item.BloodMagic.slate.ethereal.name=çŽ„å¹½çŸ³æ¿ - -item.BloodMagic.orb.weak.name=è™›å¼±æ°£è¡€å¯¶ç  -item.BloodMagic.orb.apprentice.name=å­¸å¾’æ°£è¡€å¯¶ç  -item.BloodMagic.orb.magician.name=é­”æ³•ä½¿æ°£è¡€å¯¶ç  -item.BloodMagic.orb.master.name=é­”å°Žå¸«æ°£è¡€å¯¶ç  -item.BloodMagic.orb.archmage.name=å¤§è³¢è€…æ°£è¡€å¯¶ç  -item.BloodMagic.orb.transcendent.name=è¶…è¶Šè€…æ°£è¡€å¯¶ç  - -item.BloodMagic.reagent.incendium.name=ç«ç„°ç²‰æœ« -item.BloodMagic.reagent.magicales.name=魔法粉末 -item.BloodMagic.reagent.sanctus.name=神è–粉末 -item.BloodMagic.reagent.aether.name=以太元素 -item.BloodMagic.reagent.crepitous.name=爆破粉末 -item.BloodMagic.reagent.crystallos.name=冰晶粉末 -item.BloodMagic.reagent.terrae.name=泥土粉末 -item.BloodMagic.reagent.aquasalus.name=液之粉末 -item.BloodMagic.reagent.tennebrae.name=暗黑粉末 -item.BloodMagic.reagent.offensa.name=攻勢粉末 -item.BloodMagic.reagent.praesidium.name=防守粉末 -item.BloodMagic.reagent.orbisterrae.name=環境粉末 -item.BloodMagic.reagent.virtus.name=力é‡ç²‰æœ« -item.BloodMagic.reagent.reductus.name=代價粉末 -item.BloodMagic.reagent.potentia.name=效能粉末 - -item.BloodMagic.bloodShard.weak.name=虛弱氣血碎片 -item.BloodMagic.bloodShard.demon.name=惡魔氣血碎片 - -item.BloodMagic.baseComponent.reagentWater.name=水之試劑 -item.BloodMagic.baseComponent.reagentLava.name=熔岩試劑 -item.BloodMagic.baseComponent.reagentAir.name=空之試劑 -item.BloodMagic.baseComponent.reagentFastMiner.name=礦之試劑 -item.BloodMagic.baseComponent.reagentVoid.name=虛空試劑 -item.BloodMagic.baseComponent.reagentGrowth.name=æˆé•·è©¦åŠ‘ -item.BloodMagic.baseComponent.reagentAffinity.name=元素親和力試劑 -item.BloodMagic.baseComponent.reagentSight.name=視之試劑 -item.BloodMagic.baseComponent.reagentBinding.name=ç´„æŸè©¦åŠ‘ -item.BloodMagic.baseComponent.reagentSuppression.name=抑制試劑 -item.BloodMagic.baseComponent.frameParts.name=框架部件 -item.BloodMagic.baseComponent.reagentBloodLight.name=血光試劑 -item.BloodMagic.baseComponent.reagentMagnetism.name=ç£å¼•試劑 -item.BloodMagic.baseComponent.reagentHaste.name=急速試劑 -item.BloodMagic.baseComponent.reagentBridge.name=影橋試劑 -item.BloodMagic.baseComponent.reagentCompression.name=壓縮試劑 -item.BloodMagic.baseComponent.reagentSeverance.name=驅散試劑 - -item.BloodMagic.baseComponent.reagentTeleposition.name=轉é€è©¦åŠ‘ -item.BloodMagic.baseComponent.reagentTransposition.name=ç§»ä½è©¦åŠ‘ - -item.BloodMagic.monsterSoul.base.name=惡魔慾望 - -item.BloodMagic.sigil.air.name=空氣å°è¨˜ -item.BloodMagic.sigil.bloodLight.name=血光å°è¨˜ -item.BloodMagic.sigil.compression.name=壓縮å°è¨˜ -item.BloodMagic.sigil.divination.name=å åœå°è¨˜ -item.BloodMagic.sigil.water.name=水之å°è¨˜ -item.BloodMagic.sigil.lava.name=熔岩å°è¨˜ -item.BloodMagic.sigil.void.name=虛空å°è¨˜ -item.BloodMagic.sigil.greenGrove.name=ç¶ å¢å°è¨˜ -item.BloodMagic.sigil.elementalAffinity.name=元素å°è¨˜ -item.BloodMagic.sigil.haste.name=急速å°è¨˜ -item.BloodMagic.sigil.suppression.name=抑制å°è¨˜ -item.BloodMagic.sigil.magnetism.name=ç£å¼•å°è¨˜ -item.BloodMagic.sigil.fastMiner.name=速掘å°è¨˜ -item.BloodMagic.sigil.seer.name=æœç´¢å°è¨˜ -item.BloodMagic.sigil.phantomBridge.name=影橋å°è¨˜ -item.BloodMagic.sigil.whirlwind.name=旋風å°è¨˜ -item.BloodMagic.sigil.enderSeverance.name=終末å°è¨˜ - -item.BloodMagic.sigil.teleposition.name=轉é€å°è¨˜ -item.BloodMagic.sigil.transposition.name=ç§»ä½å°è¨˜ - -item.BloodMagic.livingArmour.helmet.name=生命頭盔 -item.BloodMagic.livingArmour.chest.name=生命胸甲 -item.BloodMagic.livingArmour.legs.name=生命護腿 -item.BloodMagic.livingArmour.boots.name=ç”Ÿå‘½é•·é´ -item.BloodMagic.sentientArmour.helmet.name=感知頭盔 -item.BloodMagic.sentientArmour.chest.name=感知胸甲 -item.BloodMagic.sentientArmour.legs.name=感知護腿 -item.BloodMagic.sentientArmour.boots.name=æ„ŸçŸ¥é•·é´ - -item.BloodMagic.altarMaker.name=祭壇產生器 - -item.BloodMagic.ritualDivinernormal.name=å„€å¼å æ– -item.BloodMagic.ritualDivinerdusk.name=å„€å¼å æ–[黃æ˜] -item.BloodMagic.ritualDivinerdawn.name=å„€å¼å æ–[黎明] - -item.BloodMagic.arcaneAshes.name=奧法ç°ç‡¼ -item.BloodMagic.upgradeTome.name=生命護甲å‡ç´šç¶“æ–‡ -item.BloodMagic.upgradeTrainer.name=生命護甲培養環 - -item.BloodMagic.sentientSword.name=æ„ŸçŸ¥åŠ -item.BloodMagic.soulGem.petty.name=貧脊酒石晶 -item.BloodMagic.soulGem.lesser.name=次級酒石晶 -item.BloodMagic.soulGem.common.name=普通酒石晶 -item.BloodMagic.soulGem.greater.name=上等酒石晶 -item.BloodMagic.soulGem.grand.name=稀世酒石晶 -item.BloodMagic.soulSnare.base.name=簡易套索 -item.BloodMagic.sentientBow.name=感知弓 -item.BloodMagic.sentientArmourGem.name=感知護甲寶石 - -item.BloodMagic.nodeRouter.name=節點路由 -item.BloodMagic.itemFilter.exact.name=精確物å“篩é¸å™¨ -item.BloodMagic.itemFilter.ignoreNBT.name=NBT物å“篩é¸å™¨ -item.BloodMagic.itemFilter.modItems.name=模組物å“篩é¸å™¨ -item.BloodMagic.itemFilter.oreDict.name=礦物辭典物å“篩é¸å™¨ - -# Blocks -tile.BloodMagic.fluid.lifeEssence.name=ç”Ÿå‘½ç²¾è¯ - -tile.BloodMagic.stone.ritual.master.name=魔導師儀å¼çŸ³ -tile.BloodMagic.stone.ritual.imperfect.name=次級儀å¼çŸ³ - -tile.BloodMagic.altar.name=血祭壇 -tile.BloodMagic.alchemyArray.name=&r&f煉金矩陣 - -tile.BloodMagic.rune.blank.name=空白符文石 -tile.BloodMagic.rune.speed.name=速度符文石 -tile.BloodMagic.rune.efficiency.name=效益符文石 -tile.BloodMagic.rune.sacrifice.name=犧牲符文石 -tile.BloodMagic.rune.selfSacrifice.name=ç»ç¥­ç¬¦æ–‡çŸ³ -tile.BloodMagic.rune.displacement.name=ç§»ä½ç¬¦æ–‡çŸ³ -tile.BloodMagic.rune.capacity.name=容ç´ç¬¦æ–‡çŸ³ -tile.BloodMagic.rune.augCapacity.name=增容符文石 -tile.BloodMagic.rune.orb.name=ç ä¹‹ç¬¦æ–‡çŸ³ -tile.BloodMagic.rune.acceleration.name=促進符文石 -tile.BloodMagic.rune.charging.name=充能符文石 - - -tile.BloodMagic.ritualStone.blank.name=å„€å¼çŸ³ -tile.BloodMagic.ritualStone.water.name=水之儀å¼çŸ³ -tile.BloodMagic.ritualStone.fire.name=ç«ä¹‹å„€å¼çŸ³ -tile.BloodMagic.ritualStone.earth.name=地之儀å¼çŸ³ -tile.BloodMagic.ritualStone.air.name=風之儀å¼çŸ³ -tile.BloodMagic.ritualStone.dusk.name=黃æ˜å„€å¼çŸ³ -tile.BloodMagic.ritualStone.dawn.name=黎明之儀å¼çŸ³ - -tile.BloodMagic.bloodstonebrick.large.name=大血石磚 -tile.BloodMagic.bloodstonebrick.brick.name=血石磚 -tile.BloodMagic.crystal.large.name=晶簇方塊 -tile.BloodMagic.crystal.brick.name=晶簇磚 -tile.BloodMagic.bloodLight.name=血光 -tile.BloodMagic.spectralBlock.name=波譜方塊 -tile.BloodMagic.phantom.name=幻象方塊 -tile.BloodMagic.incenseAltar.name=香壇 - -tile.BloodMagic.teleposer.name=轉é€å™¨ -tile.BloodMagic.soulForge.name=ç„炎èžçˆ -tile.BloodMagic.demonCrucible.name=惡魔å©å  - -tile.BloodMagic.masterRouting.name=魔導師路由節點 -tile.BloodMagic.outputRouting.name=輸出路由節點 -tile.BloodMagic.inputRouting.name=輸入路由節點 -tile.BloodMagic.itemRouting.name=路由節點 - -tile.BloodMagic.path.wood.name=木æé€šè·¯ -tile.BloodMagic.path.woodTile.name=平滑木通路 -tile.BloodMagic.path.stone.name=石磚通路 -tile.BloodMagic.path.stoneTile.name=平滑石通路 -tile.BloodMagic.path.wornstone.name=裂石磚通路 -tile.BloodMagic.path.wornstoneTile.name=平滑裂石通路 -tile.BloodMagic.path.obsidian.name=黑曜石通路 -tile.BloodMagic.path.obsidianTile.name=平滑黑曜石通路 - -tile.BloodMagic.dimensionalPortal.name=維度傳é€é–€ -tile.BloodMagic.bloodTank.name=血槽 - -# 工具æç¤º -tooltip.BloodMagic.orb.desc=å„²å­˜ç”Ÿå‘½ç²¾è¯ -tooltip.BloodMagic.orb.owner=Added by: %s -tooltip.BloodMagic.currentOwner=Current owner: %s -tooltip.BloodMagic.currentTier=Current tier: %d -tooltip.BloodMagic.config.disabled=Currently disabled in the Config - -tooltip.BloodMagic.activated=啟用 -tooltip.BloodMagic.deactivated=未啟用 - -tooltip.BloodMagic.sigil.air.desc=&oI feel lighter already... -tooltip.BloodMagic.sigil.bloodLight.desc=&oI see a light! -tooltip.BloodMagic.sigil.compression.desc=&oHands of diamonds -tooltip.BloodMagic.sigil.divination.desc=&oPeer into the soul -tooltip.BloodMagic.sigil.divination.otherNetwork=Peering into the soul of %s -tooltip.BloodMagic.sigil.divination.currentAltarTier=Current Tier: %d -tooltip.BloodMagic.sigil.divination.currentEssence=Current Essence: %,d LP -tooltip.BloodMagic.sigil.divination.currentAltarCapacity=Current Capacity: %,d LP -tooltip.BloodMagic.sigil.divination.currentTranquility=Current Tranquility: %,d -tooltip.BloodMagic.sigil.divination.currentBonus=Current Bonus: +%,d%% -tooltip.BloodMagic.sigil.water.desc=&oInfinite water, anyone? -tooltip.BloodMagic.sigil.lava.desc=&oHOT! DO NOT EAT -tooltip.BloodMagic.sigil.void.desc=&oBetter than a Swiffer®! -tooltip.BloodMagic.sigil.greenGrove.desc=&oEnvironmentally friendly -tooltip.BloodMagic.sigil.magnetism.desc=&oI have a very magnetic personality -tooltip.BloodMagic.sigil.suppression.desc=&oBetter than telekinesis... -tooltip.BloodMagic.sigil.haste.desc=&o42 doses of caffeine later... -tooltip.BloodMagic.sigil.fastMiner.desc=&oKeep mining, and mining... -tooltip.BloodMagic.sigil.elementalAffinity.desc=&oFalling fire fishes! -tooltip.BloodMagic.sigil.seer.desc=&oWhen seeing all is not enough -tooltip.BloodMagic.sigil.seer.currentAltarProgress=Current Progress: %,d LP/ %s LP -tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=Current Progress: %s -tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=Consumption Rate: %,d LP -tooltip.BloodMagic.sigil.seer.currentAltarTier=Current Tier: %d -tooltip.BloodMagic.sigil.seer.currentEssence=Current Essence: %,d LP -tooltip.BloodMagic.sigil.seer.currentAltarCapacity=Current Capacity: %,d LP -tooltip.BloodMagic.sigil.seer.currentCharge=Current Charge: %,d -tooltip.BloodMagic.sigil.seer.currentTranquility=Current Tranquility: %,d -tooltip.BloodMagic.sigil.seer.currentBonus=Current Bonus: +%,d%% -tooltip.BloodMagic.sigil.phantomBridge.desc=&oWalking on thin air... -tooltip.BloodMagic.sigil.whirlwind.desc=&oBest not to wear a skirt -tooltip.BloodMagic.sigil.enderSeverance.desc=&oPutting Endermen in Dire situations! - -tooltip.BloodMagic.sigil.teleposition.desc=I am very close to being moved by this. -tooltip.BloodMagic.sigil.transposition.desc=Feel the power of the Force, my young apprentice. - -tooltip.BloodMagic.bound.sword.desc=&oCulling the weak -tooltip.BloodMagic.bound.pickaxe.desc=&oDestroying stone without mercy -tooltip.BloodMagic.bound.axe.desc=&oDemonic deforestation -tooltip.BloodMagic.bound.shovel.desc=&oScrubs floors clean of dirt - -tooltip.BloodMagic.sacrificialDagger.desc=Just a prick of the finger will suffice... -tooltip.BloodMagic.slate.desc=Infused stone inside of a Blood Altar -tooltip.BloodMagic.inscriber.desc=The writing is on the wall... - -tooltip.BloodMagic.pack.selfSacrifice.desc=這背包戴起來好痛… -tooltip.BloodMagic.pack.sacrifice.desc=Description -tooltip.BloodMagic.pack.stored=Stored: %,d LP - -tooltip.BloodMagic.activationCrystal.weak=å±…å‹•ä½ŽéšŽå„€å¼ -tooltip.BloodMagic.activationCrystal.awakened=é©…å‹•æ›´å¼·å¤§çš„å„€å¼ -tooltip.BloodMagic.activationCrystal.creative=Creative Only - Activates any ritual - -tooltip.BloodMagic.diviner.currentRitual=Current Ritual: -tooltip.BloodMagic.diviner.blankRune=Blank Runes: %d -tooltip.BloodMagic.diviner.waterRune=Water Runes: %d -tooltip.BloodMagic.diviner.airRune=Air Runes: %d -tooltip.BloodMagic.diviner.fireRune=Fire Runes: %d -tooltip.BloodMagic.diviner.earthRune=Earth Runes: %d -tooltip.BloodMagic.diviner.duskRune=Dusk Runes: %d -tooltip.BloodMagic.diviner.dawnRune=Dawn Runes: %d -tooltip.BloodMagic.diviner.totalRune=Total Runes: %d -tooltip.BloodMagic.diviner.extraInfo=按shift顯示é¡å¤–資訊 -tooltip.BloodMagic.diviner.currentDirection=Current Direction: %s - -tooltip.BloodMagic.arcaneAshes=ç‘一個圈以用於煉金術 - -tooltip.BloodMagic.telepositionFocus.coords=Current coordinates: (%,d, %,d, %,d) -tooltip.BloodMagic.telepositionFocus.dimension=Dimension ID: %d -tooltip.BloodMagic.telepositionFocus.weak=Used to move blocks in the world -tooltip.BloodMagic.telepositionFocus.enhanced=Used to move blocks in the world -tooltip.BloodMagic.telepositionFocus.reinforced=Used to move blocks in the world -tooltip.BloodMagic.telepositionFocus.demonic=Used to move blocks in the world - -tooltip.BloodMagic.livingArmour.upgrade.speed=Quick Feet -tooltip.BloodMagic.livingArmour.upgrade.digging=Dwarven Might -tooltip.BloodMagic.livingArmour.upgrade.poisonResist=Poison Resistance -tooltip.BloodMagic.livingArmour.upgrade.selfSacrifice=Tough Palms -tooltip.BloodMagic.livingArmour.upgrade.knockback=Body Builder -tooltip.BloodMagic.livingArmour.upgrade.physicalProtect=Tough Skin -tooltip.BloodMagic.livingArmour.upgrade.health=Healthy -tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=Fierce Strike -tooltip.BloodMagic.livingArmour.upgrade.arrowShot=Trick Shot -tooltip.BloodMagic.livingArmour.upgrade.stepAssist=Step Assist -tooltip.BloodMagic.livingArmour.upgrade.grimReaper=Grim Reaper's Sprint -tooltip.BloodMagic.livingArmour.upgrade.solarPowered=Solar Powered -tooltip.BloodMagic.livingArmour.upgrade.thaumRunicShielding=Runic Shielding -tooltip.BloodMagic.livingArmour.upgrade.revealing=Revealing -tooltip.BloodMagic.livingArmour.upgrade.level=%s (Level %d) -tooltip.BloodMagic.livingArmour.upgrade.points=&6Upgrade points: %s / %s - -tooltip.BloodMagic.will=Will Quality: %1$,.2f -tooltip.BloodMagic.sentientSword.desc=Uses demon will to unleash its full potential. -tooltip.BloodMagic.soulGem.petty=A gem used to contain a little will -tooltip.BloodMagic.soulGem.lesser=A gem used to contain some will -tooltip.BloodMagic.soulGem.common=A gem used to contain more will -tooltip.BloodMagic.soulGem.greater=A gem used to contain a greater amount of will -tooltip.BloodMagic.soulGem.grand=A gem used to contain a large amount of will -tooltip.BloodMagic.soulSnare.desc=Throw at a monster and then kill them to obtain their demonic will - -tooltip.BloodMagic.itemFilter.exact=Will make sure the items match precisely -tooltip.BloodMagic.itemFilter.ignoreNBT=Ignores the NBT of the filter -tooltip.BloodMagic.itemFilter.modItems=Matches all items from the same mod -tooltip.BloodMagic.itemFilter.oreDict=Used to filter through the Ore Dictionary - -tooltip.BloodMagic.fluid.type=Fluid Contained -tooltip.BloodMagic.fluid.amount=Amount -tooltip.BloodMagic.fluid.capacity=Capacity - -# å„€å¼ -ritual.BloodMagic.testRitual=Test Ritual -ritual.BloodMagic.waterRitual=Ritual of the Full Spring -ritual.BloodMagic.lavaRitual=Serenade of the Nether -ritual.BloodMagic.greenGroveRitual=Ritual of the Green Grove -ritual.BloodMagic.jumpRitual=Ritual of the High Jump -ritual.BloodMagic.wellOfSufferingRitual=Well of Suffering -ritual.BloodMagic.featheredKnifeRitual=Ritual of the Feathered Knife -ritual.BloodMagic.regenerationRitual=Ritual of Regeneration -ritual.BloodMagic.harvestRitual=Reap of the Harvest Moon -ritual.BloodMagic.magneticRitual=Ritual of Magnetism -ritual.BloodMagic.crushingRitual=Ritual of the Crusher -ritual.BloodMagic.fullStomachRitual=Ritual of the Satiated Stomach -ritual.BloodMagic.interdictionRitual=Ritual of Interdiction -ritual.BloodMagic.containmentRitual=Ritual of Containment -ritual.BloodMagic.speedRitual=Ritual of Speed -ritual.BloodMagic.suppressionRitual=Ritual of Suppression -ritual.BloodMagic.expulsionRitual=Aura of Expulsion -ritual.BloodMagic.zephyrRitual=Call of the Zephyr -ritual.BloodMagic.upgradeRemoveRitual=Sound of the Cleansing Soul -ritual.BloodMagic.armourEvolveRitual=Ritual of Living Evolution - -ritual.BloodMagic.cobblestoneRitual=Le Vulcanos Frigius -ritual.BloodMagic.placerRitual=The Filler -ritual.BloodMagic.fellingRitual=The Timberman -ritual.BloodMagic.pumpRitual=Hymn of Siphoning -ritual.BloodMagic.altarBuilderRitual=The Assembly of the High Altar -ritual.BloodMagic.portalRitual=The Gate of the Fold - -# Chat -chat.BloodMagic.altarMaker.setTier=Set Tier to: %d -chat.BloodMagic.altarMaker.building=Building a Tier %d Altar -chat.BloodMagic.altarMaker.destroy=Destroyed a Tier %d Altar -chat.BloodMagic.altarMaker.creativeOnly=This is a creative only item. - -chat.BloodMagic.damageSource=%sçš„éˆé­‚è®Šå¾—éŽæ–¼è™›å¼± - -chat.BloodMagic.ritual.weak=你感到一股力é‡ï¼Œä½†æ˜¯éŽæ–¼å¾®å¼±ï¼Œä¸è¶³ä»¥é©…å‹•å„€å¼ã€‚ -chat.BloodMagic.ritual.prevent=ä½ å—到儀å¼åŠ‡çƒˆçš„æŠ—æ‹’ï¼ -chat.BloodMagic.ritual.activate=能é‡å¿«é€Ÿçš„在儀å¼ä¸­æµç«„ï¼ -chat.BloodMagic.ritual.notValid=你感覺這些符文的é…置似乎ä¸å¤§æ­£ç¢º… - -chat.BloodMagic.livingArmour.upgrade.poisonRemove=ä½ çš„ç‹€æ…‹å·²å¥½è½‰ï¼ -chat.BloodMagic.livingArmour.upgrade.grimReaper=&6一股陰暗的力é‡å°‡ä½ å¾žæ­»äº¡é‚Šç·£æ‹‰å›žï¼ -chat.BloodMagic.livingArmour.newUpgrade=&4å–å¾—å‡ç´šï¼ - -# JustEnoughItems -jei.BloodMagic.recipe.altar=血祭壇 -jei.BloodMagic.recipe.binding=Alchemy Array (Binding) -jei.BloodMagic.recipe.alchemyArrayCrafting=煉金矩陣 -jei.BloodMagic.recipe.soulForge=ç„炎èžçˆ -jei.BloodMagic.recipe.requiredLP=LP: %,d -jei.BloodMagic.recipe.requiredTier=Tier: %d -jei.BloodMagic.recipe.consumptionRate=Consumption: %,d LP/t -jei.BloodMagic.recipe.drainRate=Drain: %,d LP/t -jei.BloodMagic.recipe.minimumSouls=Minimum: %1$,.2f Will -jei.BloodMagic.recipe.soulsDrained=Drained: %1$,.2f Will - -jei.BloodMagic.desc.altarBuilder=A creative-only item for use in debugging and testing.\n\nShift + Right click to change the tier to build. Right click an Altar to initiate the build.\n\nBreak an Altar while holding to dismantle it. -jei.BloodMagic.desc.demonicWill=惡魔憑ä¾åœ¨ç”Ÿç‰©èº«ä¸Šè€Œç”¢ç”Ÿçš„å°è¨˜ã€‚\n\né€éŽæŒæ„ŸçŸ¥æ­¦å™¨æ®ºæ­»æ•µäººç²å¾—ã€‚æˆ–ä»¥ç°¡æ˜“å¥—ç´¢æ“²å‘æ•µäººï¼Œä½¿å…¶é¡¯ç¾å‡ºç™½å…‰å¾Œæ®ºæ­»ä»¥å–得。 - -# WAILA -waila.BloodMagic.sneak=&o潛行展開詳細資訊 -waila.BloodMagic.array.reagent=Reagent: %s -waila.BloodMagic.array.catalyst=Catalyst: %s -option.BloodMagic.bypassSneak=Bypass Sneak -option.BloodMagic.bloodAltar=血祭壇 -option.BloodMagic.ritualController=å„€å¼çŸ³ -option.BloodMagic.teleposer=轉é€å™¨ -option.BloodMagic.array=煉金矩陣 - -# Thaumcraft -tc.research_category.BLOODMAGIC=血儀術 - -# Thaumcraft Research -bloodmagic.research_name.BLOODMAGIC=血魔法 -bloodmagic.research_text.BLOODMAGIC=血儀術 -bloodmagic.research_page.BLOODMAGIC.1=血魔法的領域一直令人感到孤僻, 而血術師的"ç¨é–€"祕法更是出å的悖離人群,常使人感到瘋狂。 然而自我犧牲與生命精è¯çš„力é‡ç”šè‡³èƒ½æ“有平凡血術師所難以估計的強大力é‡ï¼Œ 顯然秘術使å¯ä»¥æŠŠå®ƒä½œç‚ºæŸäº›ç”¨é€”ï¼ diff --git a/src/main/resources/assets/bloodmagic/loot_tables/bm_loot_table.json b/src/main/resources/assets/bloodmagic/loot_tables/bm_loot_table.json deleted file mode 100644 index ef383f71..00000000 --- a/src/main/resources/assets/bloodmagic/loot_tables/bm_loot_table.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "pools": [ - { - "name": "Testing", - "rolls": 1, - "entries": [ - { - "type": "item", - "name": "minecraft:stone", - "weight": 3, - "functions": [ - { - "function": "set_data", - "data": 0 - }, - { - "function": "set_count", - "count": 1 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/armor/livingArmour_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/livingarmour_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/livingArmour_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/livingarmour_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/livingArmour_layer_2.png b/src/main/resources/assets/bloodmagic/models/armor/livingarmour_layer_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/livingArmour_layer_2.png rename to src/main/resources/assets/bloodmagic/models/armor/livingarmour_layer_2.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sacrificeArmour_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/sacrificearmour_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sacrificeArmour_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/sacrificearmour_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/selfSacrificeArmour_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/selfsacrificearmour_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/selfSacrificeArmour_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/selfsacrificearmour_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_corrosive_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_corrosive_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_corrosive_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_corrosive_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_corrosive_layer_2.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_corrosive_layer_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_corrosive_layer_2.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_corrosive_layer_2.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_destructive_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_destructive_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_destructive_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_destructive_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_destructive_layer_2.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_destructive_layer_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_destructive_layer_2.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_destructive_layer_2.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_layer_2.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_layer_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_layer_2.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_layer_2.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_steadfast_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_steadfast_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_steadfast_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_steadfast_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_steadfast_layer_2.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_steadfast_layer_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_steadfast_layer_2.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_steadfast_layer_2.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_vengeful_layer_1.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_vengeful_layer_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_vengeful_layer_1.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_vengeful_layer_1.png diff --git a/src/main/resources/assets/bloodmagic/models/armor/sentientArmour_vengeful_layer_2.png b/src/main/resources/assets/bloodmagic/models/armor/sentientarmour_vengeful_layer_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/models/armor/sentientArmour_vengeful_layer_2.png rename to src/main/resources/assets/bloodmagic/models/armor/sentientarmour_vengeful_layer_2.png diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockAltar.obj b/src/main/resources/assets/bloodmagic/models/block/BlockAltar.obj deleted file mode 100644 index 802fd9a7..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockAltar.obj +++ /dev/null @@ -1,391 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib BlockAltar.mtl -o Shape1 -v 0.000000 0.500000 1.000000 -v 0.000000 -0.000000 1.000000 -v 1.000000 -0.000000 1.000000 -v 1.000000 0.500000 1.000000 -v 1.000000 0.500000 -0.000000 -v 1.000000 0.000000 -0.000000 -v 0.000000 0.000000 -0.000000 -v 0.000000 0.500000 -0.000000 -v 0.068534 0.771784 -0.108243 -v 0.022324 0.024636 -0.154453 -v -0.154453 0.024636 0.022324 -v -0.108243 0.771784 0.068534 -v 0.067862 0.750000 0.244638 -v 0.021652 0.002853 0.198428 -v 0.198428 0.002853 0.021651 -v 0.244638 0.750000 0.067862 -v 1.108243 0.771784 0.068534 -v 1.154453 0.024636 0.022324 -v 0.977676 0.024636 -0.154453 -v 0.931466 0.771784 -0.108243 -v 0.755362 0.750000 0.067862 -v 0.801572 0.002853 0.021651 -v 0.978348 0.002853 0.198428 -v 0.932138 0.750000 0.244638 -v 0.000000 0.750000 1.000000 -v 0.000000 0.500000 1.000000 -v 1.000000 0.500000 1.000000 -v 1.000000 0.750000 1.000000 -v 1.000000 0.750000 0.812500 -v 1.000000 0.500000 0.812500 -v 0.000000 0.500000 0.812500 -v 0.000000 0.750000 0.812500 -v 0.000000 0.750000 0.187500 -v 0.000000 0.500000 0.187500 -v 1.000000 0.500000 0.187500 -v 1.000000 0.750000 0.187500 -v 1.000000 0.750000 -0.000000 -v 1.000000 0.500000 -0.000000 -v 0.000000 0.500000 -0.000000 -v 0.000000 0.750000 -0.000000 -v 0.000000 0.750000 0.812500 -v 0.000000 0.500000 0.812500 -v 0.187500 0.500000 0.812500 -v 0.187500 0.750000 0.812500 -v 0.187500 0.750000 0.187500 -v 0.187500 0.500000 0.187500 -v 0.000000 0.500000 0.187500 -v 0.000000 0.750000 0.187500 -v 0.931466 0.771784 1.108243 -v 0.977676 0.024636 1.154453 -v 1.154453 0.024636 0.977676 -v 1.108243 0.771784 0.931466 -v 0.932138 0.750000 0.755362 -v 0.978348 0.002853 0.801571 -v 0.801572 0.002852 0.978348 -v 0.755362 0.750000 0.932138 -v -0.108243 0.771784 0.931466 -v -0.154453 0.024636 0.977676 -v 0.022324 0.024636 1.154453 -v 0.068534 0.771784 1.108243 -v 0.244638 0.750000 0.932138 -v 0.198428 0.002852 0.978348 -v 0.021652 0.002853 0.801571 -v 0.067862 0.750000 0.755362 -v 0.812500 0.750000 0.812500 -v 0.812500 0.500000 0.812500 -v 1.000000 0.500000 0.812500 -v 1.000000 0.750000 0.812500 -v 1.000000 0.750000 0.187500 -v 1.000000 0.500000 0.187500 -v 0.812500 0.500000 0.187500 -v 0.812500 0.750000 0.187500 -v 0.375000 0.687500 1.000000 -v 0.375000 0.002615 1.059905 -v 0.625000 0.002615 1.059905 -v 0.625000 0.687500 1.000000 -v 0.625000 0.665716 0.750951 -v 0.625000 -0.019169 0.810856 -v 0.375000 -0.019169 0.810856 -v 0.375000 0.665716 0.750951 -v 0.625000 0.687500 -0.000000 -v 0.625000 0.002615 -0.059905 -v 0.375000 0.002615 -0.059905 -v 0.375000 0.687500 -0.000000 -v 0.375000 0.665716 0.249049 -v 0.375000 -0.019169 0.189144 -v 0.625000 -0.019169 0.189144 -v 0.625000 0.665716 0.249049 -v 1.000000 0.687500 0.625000 -v 1.059905 0.002615 0.625000 -v 1.059905 0.002615 0.375000 -v 1.000000 0.687500 0.375000 -v 0.750951 0.665716 0.375000 -v 0.810856 -0.019169 0.375000 -v 0.810856 -0.019169 0.625000 -v 0.750951 0.665716 0.625000 -v 0.000000 0.687500 0.375000 -v -0.059905 0.002615 0.375000 -v -0.059905 0.002615 0.625000 -v 0.000000 0.687500 0.625000 -v 0.249049 0.665716 0.625000 -v 0.189144 -0.019169 0.625000 -v 0.189144 -0.019169 0.375000 -v 0.249049 0.665716 0.375000 -vt 0.125000 0.875000 -vt 0.125000 0.812500 -vt 0.250000 0.812500 -vt 0.250000 0.875000 -vt 0.375000 0.875000 -vt 0.375000 0.812500 -vt 0.500000 0.812500 -vt 0.500000 0.875000 -vt 0.125000 1.000000 -vt 0.250000 1.000000 -vt 0.375000 1.000000 -vt 0.000000 0.875000 -vt 0.000000 0.812500 -vt 0.156250 0.531250 -vt 0.156250 0.437500 -vt 0.187500 0.437500 -vt 0.187500 0.531250 -vt 0.218750 0.531250 -vt 0.218750 0.437500 -vt 0.250000 0.437500 -vt 0.250000 0.531250 -vt 0.156250 0.562500 -vt 0.187500 0.562500 -vt 0.218750 0.562500 -vt 0.125000 0.531250 -vt 0.125000 0.437500 -vt 0.031250 0.531250 -vt 0.031250 0.437500 -vt 0.062500 0.437500 -vt 0.062500 0.531250 -vt 0.093750 0.531250 -vt 0.093750 0.437500 -vt 0.031250 0.562500 -vt 0.062500 0.562500 -vt 0.093750 0.562500 -vt 0.000000 0.531250 -vt 0.000000 0.437500 -vt 0.023438 0.789062 -vt 0.023438 0.757812 -vt 0.148438 0.757812 -vt 0.148438 0.789062 -vt 0.171875 0.789062 -vt 0.171875 0.757812 -vt 0.296875 0.757812 -vt 0.296875 0.789062 -vt 0.023438 0.812500 -vt 0.148438 0.812500 -vt 0.273438 0.789062 -vt 0.273438 0.812500 -vt 0.000000 0.789062 -vt 0.000000 0.757812 -vt 0.023438 0.734375 -vt 0.023438 0.703125 -vt 0.148438 0.703125 -vt 0.148438 0.734375 -vt 0.171875 0.734375 -vt 0.171875 0.703125 -vt 0.296875 0.703125 -vt 0.296875 0.734375 -vt 0.273438 0.734375 -vt 0.273438 0.757812 -vt 0.000000 0.734375 -vt 0.000000 0.703125 -vt 0.367188 0.734375 -vt 0.367188 0.703125 -vt 0.390625 0.703125 -vt 0.390625 0.734375 -vt 0.468750 0.734375 -vt 0.468750 0.703125 -vt 0.492188 0.703125 -vt 0.492188 0.734375 -vt 0.367188 0.812500 -vt 0.390625 0.812500 -vt 0.414062 0.734375 -vt 0.414062 0.812500 -vt 0.289062 0.734375 -vt 0.289062 0.703125 -vt 0.156250 0.671875 -vt 0.156250 0.578125 -vt 0.187500 0.578125 -vt 0.187500 0.671875 -vt 0.218750 0.671875 -vt 0.218750 0.578125 -vt 0.250000 0.578125 -vt 0.250000 0.671875 -vt 0.156250 0.703125 -vt 0.187500 0.703125 -vt 0.218750 0.703125 -vt 0.125000 0.671875 -vt 0.125000 0.578125 -vt 0.031250 0.671875 -vt 0.031250 0.578125 -vt 0.062500 0.578125 -vt 0.062500 0.671875 -vt 0.093750 0.671875 -vt 0.093750 0.578125 -vt 0.031250 0.703125 -vt 0.062500 0.703125 -vt 0.093750 0.703125 -vt 0.000000 0.671875 -vt 0.000000 0.578125 -vt 0.367188 0.625000 -vt 0.367188 0.593750 -vt 0.390625 0.593750 -vt 0.390625 0.625000 -vt 0.468750 0.625000 -vt 0.468750 0.593750 -vt 0.492188 0.593750 -vt 0.492188 0.625000 -vt 0.414062 0.625000 -vt 0.414062 0.703125 -vt 0.289062 0.625000 -vt 0.289062 0.593750 -vt 0.031250 0.281250 -vt 0.031250 0.195312 -vt 0.062500 0.195312 -vt 0.062500 0.281250 -vt 0.093750 0.281250 -vt 0.093750 0.195312 -vt 0.125000 0.195312 -vt 0.125000 0.281250 -vt 0.031250 0.312500 -vt 0.062500 0.312500 -vt 0.093750 0.312500 -vt 0.000000 0.281250 -vt 0.000000 0.195312 -vt 0.031250 0.140625 -vt 0.031250 0.054688 -vt 0.062500 0.054688 -vt 0.062500 0.140625 -vt 0.093750 0.140625 -vt 0.093750 0.054688 -vt 0.125000 0.054688 -vt 0.125000 0.140625 -vt 0.031250 0.171875 -vt 0.062500 0.171875 -vt 0.093750 0.171875 -vt 0.000000 0.140625 -vt 0.000000 0.054688 -vt 0.156250 0.140625 -vt 0.156250 0.054688 -vt 0.187500 0.054688 -vt 0.187500 0.140625 -vt 0.218750 0.140625 -vt 0.218750 0.054688 -vt 0.250000 0.054688 -vt 0.250000 0.140625 -vt 0.156250 0.171875 -vt 0.187500 0.171875 -vt 0.218750 0.171875 -vt 0.156250 0.281250 -vt 0.156250 0.195312 -vt 0.187500 0.195312 -vt 0.187500 0.281250 -vt 0.218750 0.281250 -vt 0.218750 0.195312 -vt 0.250000 0.195312 -vt 0.250000 0.281250 -vt 0.156250 0.312500 -vt 0.187500 0.312500 -vt 0.218750 0.312500 -vn 0.000000 -0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -vn -0.704400 0.087100 -0.704400 -vn 0.704400 -0.087100 0.704400 -vn 0.061600 0.996200 0.061600 -vn -0.061600 -0.996200 -0.061600 -vn -0.707100 -0.000000 0.707100 -vn 0.707100 0.000000 -0.707100 -vn 0.704400 0.087100 -0.704400 -vn -0.704400 -0.087100 0.704400 -vn -0.061600 0.996200 0.061600 -vn 0.061600 -0.996200 -0.061600 -vn -0.707100 0.000000 -0.707100 -vn 0.707100 -0.000000 0.707100 -vn 0.704400 0.087100 0.704400 -vn -0.704400 -0.087100 -0.704400 -vn -0.061600 0.996200 -0.061600 -vn 0.061600 -0.996200 0.061600 -vn -0.704400 0.087100 0.704400 -vn 0.704400 -0.087100 -0.704400 -vn 0.061600 0.996200 -0.061600 -vn -0.061600 -0.996200 0.061600 -vn 0.000000 0.087100 0.996200 -vn 0.000000 -0.087100 -0.996200 -vn 0.000000 0.996200 -0.087100 -vn 0.000000 -0.996200 0.087100 -vn 0.000000 0.087100 -0.996200 -vn 0.000000 -0.087100 0.996200 -vn 0.000000 0.996200 0.087100 -vn 0.000000 -0.996200 -0.087100 -vn 0.996200 0.087100 0.000000 -vn -0.996200 -0.087100 0.000000 -vn -0.087100 0.996200 0.000000 -vn 0.087100 -0.996200 0.000000 -vn -0.996200 0.087100 0.000000 -vn 0.996200 -0.087100 0.000000 -vn 0.087100 0.996200 0.000000 -vn -0.087100 -0.996200 0.000000 -usemtl Meta -s off -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 8/9/3 1/1/3 4/4/3 5/10/3 -f 2/5/4 7/11/4 6/10/4 3/4/4 -f 5/5/5 4/4/5 3/3/5 6/6/5 -f 8/12/6 7/13/6 2/2/6 1/1/6 -f 9/14/7 10/15/7 11/16/7 12/17/7 -f 13/18/8 14/19/8 15/20/8 16/21/8 -f 16/22/9 9/14/9 12/17/9 13/23/9 -f 10/18/10 15/24/10 14/23/10 11/17/10 -f 13/18/11 12/17/11 11/16/11 14/19/11 -f 16/25/12 15/26/12 10/15/12 9/14/12 -f 17/27/13 18/28/13 19/29/13 20/30/13 -f 21/31/14 22/32/14 23/26/14 24/25/14 -f 24/33/15 17/27/15 20/30/15 21/34/15 -f 18/31/16 23/35/16 22/34/16 19/30/16 -f 21/31/17 20/30/17 19/29/17 22/32/17 -f 24/36/18 23/37/18 18/28/18 17/27/18 -f 25/38/1 26/39/1 27/40/1 28/41/1 -f 29/42/2 30/43/2 31/44/2 32/45/2 -f 32/46/3 25/38/3 28/41/3 29/47/3 -f 26/48/4 31/49/4 30/47/4 27/41/4 -f 29/42/5 28/41/5 27/40/5 30/43/5 -f 32/50/6 31/51/6 26/39/6 25/38/6 -f 33/52/1 34/53/1 35/54/1 36/55/1 -f 37/56/2 38/57/2 39/58/2 40/59/2 -f 40/39/3 33/52/3 36/55/3 37/40/3 -f 34/60/4 39/61/4 38/40/4 35/55/4 -f 37/56/5 36/55/5 35/54/5 38/57/5 -f 40/62/6 39/63/6 34/53/6 33/52/6 -f 41/64/1 42/65/1 43/66/1 44/67/1 -f 45/68/2 46/69/2 47/70/2 48/71/2 -f 48/72/3 41/64/3 44/67/3 45/73/3 -f 42/74/4 47/75/4 46/73/4 43/67/4 -f 45/68/5 44/67/5 43/66/5 46/69/5 -f 48/76/6 47/77/6 42/65/6 41/64/6 -f 49/78/19 50/79/19 51/80/19 52/81/19 -f 53/82/20 54/83/20 55/84/20 56/85/20 -f 56/86/21 49/78/21 52/81/21 53/87/21 -f 50/82/22 55/88/22 54/87/22 51/81/22 -f 53/82/12 52/81/12 51/80/12 54/83/12 -f 56/89/11 55/90/11 50/79/11 49/78/11 -f 57/91/23 58/92/23 59/93/23 60/94/23 -f 61/95/24 62/96/24 63/90/24 64/89/24 -f 64/97/25 57/91/25 60/94/25 61/98/25 -f 58/95/26 63/99/26 62/98/26 59/94/26 -f 61/95/18 60/94/18 59/93/18 62/96/18 -f 64/100/17 63/101/17 58/92/17 57/91/17 -f 65/102/1 66/103/1 67/104/1 68/105/1 -f 69/106/2 70/107/2 71/108/2 72/109/2 -f 72/65/3 65/102/3 68/105/3 69/66/3 -f 66/110/4 71/111/4 70/66/4 67/105/4 -f 69/106/5 68/105/5 67/104/5 70/107/5 -f 72/112/6 71/113/6 66/103/6 65/102/6 -f 73/114/27 74/115/27 75/116/27 76/117/27 -f 77/118/28 78/119/28 79/120/28 80/121/28 -f 80/122/29 73/114/29 76/117/29 77/123/29 -f 74/118/30 79/124/30 78/123/30 75/117/30 -f 77/118/5 76/117/5 75/116/5 78/119/5 -f 80/125/6 79/126/6 74/115/6 73/114/6 -f 81/127/31 82/128/31 83/129/31 84/130/31 -f 85/131/32 86/132/32 87/133/32 88/134/32 -f 88/135/33 81/127/33 84/130/33 85/136/33 -f 82/131/34 87/137/34 86/136/34 83/130/34 -f 85/131/6 84/130/6 83/129/6 86/132/6 -f 88/138/5 87/139/5 82/128/5 81/127/5 -f 89/140/35 90/141/35 91/142/35 92/143/35 -f 93/144/36 94/145/36 95/146/36 96/147/36 -f 96/148/37 89/140/37 92/143/37 93/149/37 -f 90/144/38 95/150/38 94/149/38 91/143/38 -f 93/144/2 92/143/2 91/142/2 94/145/2 -f 96/134/1 95/133/1 90/141/1 89/140/1 -f 97/151/39 98/152/39 99/153/39 100/154/39 -f 101/155/40 102/156/40 103/157/40 104/158/40 -f 104/159/41 97/151/41 100/154/41 101/160/41 -f 98/155/42 103/161/42 102/160/42 99/154/42 -f 101/155/1 100/154/1 99/153/1 102/156/1 -f 104/121/2 103/120/2 98/152/2 97/151/2 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockBloodTank.json b/src/main/resources/assets/bloodmagic/models/block/BlockBloodTank.json deleted file mode 100644 index 679b2ac7..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockBloodTank.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "__comment": "Copyright © InsomniaKitten 2016", - "textures": { - "texture": "bloodmagic:blocks/BloodTank" - }, - "elements": [ - { - "from": [ 3, 0, 3 ], - "to": [ 13, 1, 13 ], - "faces": { - "down": { "uv": [ 5, 0, 10, 5 ], "texture": "#texture", "cullface": "down" }, - "up": { "uv": [ 5, 0, 10, 5 ], "texture": "#texture" }, - "north": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" }, - "south": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" }, - "west": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" }, - "east": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 1, 3 ], - "to": [ 4, 14, 4 ], - "faces": { - "up": { "uv": [ 4.5, 11.5, 5, 12 ], "texture": "#texture" }, - "north": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 1, 4 ], - "to": [ 4, 14, 5 ], - "faces": { - "up": { "uv": [ 4.5, 11, 5, 11.5 ], "texture": "#texture" }, - "south": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 1, 5 ], - "to": [ 4, 2, 11 ], - "faces": { - "up": { "uv": [ 0.5, 1.5, 1, 4.5 ], "texture": "#texture" }, - "west": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 1, 11 ], - "to": [ 4, 14, 12 ], - "faces": { - "up": { "uv": [ 4.5, 7.5, 5, 8 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 1, 12 ], - "to": [ 4, 14, 13 ], - "faces": { - "up": { "uv": [ 4.5, 7, 5, 7.5 ], "texture": "#texture" }, - "south": { "uv": [ 0, 0, 0.5, 7 ], "texture": "#texture" }, - "west": { "uv": [ 0, 0, 0.5, 7 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 10, 5 ], - "to": [ 4, 12, 11 ], - "faces": { - "down": { "uv": [ 4.5, 8, 5, 11 ], "texture": "#texture" }, - "up": { "uv": [ 4.5, 8, 5, 11.5 ], "texture": "#texture" }, - "west": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, - "east": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } - } - }, - { - "from": [ 3, 13, 5 ], - "to": [ 4, 14, 11 ], - "faces": { - "down": { "uv": [ 1, 11.5, 4, 12 ], "texture": "#texture" }, - "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, - "west": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" }, - "east": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" } - } - }, - { - "from": [ 4, 1, 3 ], - "to": [ 5, 14, 4 ], - "faces": { - "up": { "uv": [ 4, 11.5, 4.5, 12 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "south": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 4, 1, 12 ], - "to": [ 5, 14, 13 ], - "faces": { - "up": { "uv": [ 4, 7, 4.5, 7.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "south": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 4, 11, 4 ], - "to": [ 12, 12, 12 ], - "faces": { - "down": { "uv": [ 5.5, 0.5, 9.5, 4.5 ], "texture": "#texture" }, - "up": { "uv": [ 5.5, 0.5, 9.5, 4.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 7.5, 4.5, 8 ], "texture": "#texture" }, - "south": { "uv": [ 0.5, 11, 4.5, 11.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 7.5, 1, 11.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 7.5, 4.5, 11.5 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 1, 3 ], - "to": [ 11, 2, 4 ], - "faces": { - "up": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, - "north": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, - "south": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 1, 12 ], - "to": [ 11, 2, 13 ], - "faces": { - "up": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, - "north": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, - "south": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 10, 3 ], - "to": [ 11, 12, 4 ], - "faces": { - "down": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, - "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, - "north": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, - "south": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 10, 12 ], - "to": [ 11, 12, 13 ], - "faces": { - "down": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, - "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, - "north": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, - "south": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 12, 5 ], - "to": [ 11, 13, 11 ], - "faces": { - "up": { "uv": [ 1, 8, 4, 11 ], "texture": "#texture" }, - "north": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" }, - "south": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" }, - "west": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" }, - "east": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 13, 3 ], - "to": [ 11, 14, 4 ], - "faces": { - "down": { "uv": [ 1, 11.5, 4, 12 ], "texture": "#texture" }, - "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, - "north": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 13, 6 ], - "to": [ 6, 14, 10 ], - "faces": { - "up": { "uv": [ 3.5, 8.5, 4, 10.5 ], "texture": "#texture" }, - "north": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" }, - "south": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, - "west": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" } - } - }, - { - "from": [ 5, 13, 12 ], - "to": [ 11, 14, 13 ], - "faces": { - "down": { "uv": [ 1, 11.5, 4, 12 ], "texture": "#texture" }, - "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, - "north": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" } - } - }, - { - "from": [ 6, 13, 5 ], - "to": [ 10, 14, 6 ], - "faces": { - "up": { "uv": [ 1.5, 10.5, 3.5, 11 ], "texture": "#texture" }, - "north": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" }, - "west": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, - "east": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" } - } - }, - { - "from": [ 6, 13, 6 ], - "to": [ 10, 14, 10 ], - "faces": { - "up": { "uv": [ 1.5, 8.499999, 3.5, 10.5 ], "texture": "#texture" } - } - }, - { - "from": [ 6, 13, 10 ], - "to": [ 10, 14, 11 ], - "faces": { - "up": { "uv": [ 1.5, 8, 3.5, 8.5 ], "texture": "#texture" }, - "south": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" }, - "west": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, - "east": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" } - } - }, - { - "from": [ 10, 13, 6 ], - "to": [ 11, 14, 10 ], - "faces": { - "up": { "uv": [ 1, 8.5, 1.5, 10.5 ], "texture": "#texture" }, - "north": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, - "south": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" }, - "east": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" } - } - }, - { - "from": [ 11, 1, 3 ], - "to": [ 12, 14, 4 ], - "faces": { - "up": { "uv": [ 0.5, 11.5, 1, 12 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "south": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 11, 1, 12 ], - "to": [ 12, 14, 13 ], - "faces": { - "up": { "uv": [ 0.5, 7, 1, 7.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "south": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 1, 3 ], - "to": [ 13, 14, 4 ], - "faces": { - "up": { "uv": [ 0, 11.5, 0.5, 12 ], "texture": "#texture" }, - "north": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 1, 4 ], - "to": [ 13, 14, 5 ], - "faces": { - "up": { "uv": [ 0, 11, 0.5, 11.5 ], "texture": "#texture" }, - "south": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 1, 5 ], - "to": [ 13, 2, 11 ], - "faces": { - "up": { "uv": [ 0.5, 1.5, 1, 4.5 ], "texture": "#texture" }, - "west": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 1, 11 ], - "to": [ 13, 14, 12 ], - "faces": { - "up": { "uv": [ 0, 7.5, 0.5, 8 ], "texture": "#texture" }, - "north": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "west": { "uv": [ 0.5, 0, 1, 6.5 ], "texture": "#texture" }, - "east": { "uv": [ 4, 0, 4.5, 6.5 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 1, 12 ], - "to": [ 13, 14, 13 ], - "faces": { - "up": { "uv": [ 0, 7, 0.5, 7.5 ], "texture": "#texture" }, - "south": { "uv": [ 0, 0, 0.5, 7 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0, 0.5, 7 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 10, 5 ], - "to": [ 13, 12, 11 ], - "faces": { - "down": { "uv": [ 0, 8, 0.5, 11 ], "texture": "#texture" }, - "up": { "uv": [ 0, 8, 0.5, 11 ], "texture": "#texture" }, - "west": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, - "east": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } - } - }, - { - "from": [ 12, 13, 5 ], - "to": [ 13, 14, 11 ], - "faces": { - "down": { "uv": [ 1, 11.5, 4, 12 ], "texture": "#texture" }, - "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, - "west": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" }, - "east": { "uv": [ 1, 0, 4, 0.5 ], "texture": "#texture" } - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [ 75, 45, 0 ], - "translation": [ 0, 2.5, 0 ], - "scale": [ 0.375, 0.375, 0.375 ] - }, - "thirdperson_lefthand": { - "rotation": [ 75, 45, 0 ], - "translation": [ 0, 2.5, 0 ], - "scale": [ 0.375, 0.375, 0.375 ] - }, - "firstperson_righthand": { - "rotation": [ 0, 45, 0 ], - "scale": [ 0.4, 0.4, 0.4 ] - }, - "firstperson_lefthand": { - "rotation": [ 0, 45, 0 ], - "scale": [ 0.4, 0.4, 0.4 ] - }, - "gui": { - "rotation": [ 30, 225, 0 ], - "scale": [ 0.625, 0.625, 0.625 ] - }, - "head": { - "translation": [ 0, 12, 0 ], - "scale": [ 0.5, 0.5, 0.5 ] - }, - "ground": { - "translation": [ 0, 3, 0 ], - "scale": [ 0.25, 0.25, 0.25 ] - }, - "fixed": { - "scale": [ 0.5, 0.5, 0.5 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrucible.obj b/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrucible.obj deleted file mode 100644 index 9a9dac0b..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrucible.obj +++ /dev/null @@ -1,937 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib BlockDemonCrucible.mtl -o BlockDemonCrucible -v 0.125000 0.125000 0.875000 -v 0.125000 -0.000000 0.875000 -v 0.375000 -0.000000 0.875000 -v 0.375000 0.125000 0.875000 -v 0.375000 0.125000 0.625000 -v 0.375000 -0.000000 0.625000 -v 0.125000 -0.000000 0.625000 -v 0.125000 0.125000 0.625000 -v 0.193151 0.473851 0.803768 -v 0.151353 0.103509 0.845306 -v 0.337685 0.082741 0.847635 -v 0.379483 0.453082 0.806098 -v 0.379483 0.432183 0.619766 -v 0.337685 0.061842 0.661303 -v 0.151353 0.082610 0.658974 -v 0.193151 0.452952 0.617437 -v 0.625000 0.125000 0.375000 -v 0.625000 0.000000 0.375000 -v 0.875000 0.000000 0.375000 -v 0.875000 0.125000 0.375000 -v 0.875000 0.125000 0.125000 -v 0.875000 0.000000 0.125000 -v 0.625000 0.000000 0.125000 -v 0.625000 0.125000 0.125000 -v 0.620517 0.432206 0.380235 -v 0.662315 0.061873 0.338698 -v 0.848645 0.082641 0.341027 -v 0.806847 0.452974 0.382564 -v 0.806847 0.473873 0.196235 -v 0.848645 0.103540 0.154698 -v 0.662315 0.082772 0.152368 -v 0.620517 0.453105 0.193905 -v 0.125000 0.125000 0.375000 -v 0.125000 0.000000 0.375000 -v 0.375000 0.000000 0.375000 -v 0.375000 0.125000 0.375000 -v 0.375000 0.125000 0.125000 -v 0.375000 0.000000 0.125000 -v 0.125000 0.000000 0.125000 -v 0.125000 0.125000 0.125000 -v 0.193151 0.452963 0.382563 -v 0.151353 0.082626 0.341026 -v 0.337685 0.061857 0.338696 -v 0.379483 0.432194 0.380234 -v 0.379483 0.453093 0.193904 -v 0.337685 0.082756 0.152367 -v 0.151353 0.103525 0.154696 -v 0.193151 0.473862 0.196233 -v 0.625000 0.125000 0.875000 -v 0.625000 -0.000000 0.875000 -v 0.875000 -0.000000 0.875000 -v 0.875000 0.125000 0.875000 -v 0.875000 0.125000 0.625000 -v 0.875000 -0.000000 0.625000 -v 0.625000 -0.000000 0.625000 -v 0.625000 0.125000 0.625000 -v 0.620517 0.453093 0.806096 -v 0.662315 0.082756 0.847633 -v 0.848645 0.103525 0.845304 -v 0.806847 0.473862 0.803767 -v 0.806847 0.452963 0.617435 -v 0.848645 0.082626 0.658972 -v 0.662315 0.061857 0.661302 -v 0.620517 0.432194 0.619765 -v 0.125000 0.500000 0.875000 -v 0.125000 0.437500 0.875000 -v 0.875000 0.437500 0.875000 -v 0.875000 0.500000 0.875000 -v 0.875000 0.500000 0.125000 -v 0.875000 0.437500 0.125000 -v 0.125000 0.437500 0.125000 -v 0.125000 0.500000 0.125000 -v 0.187500 0.562500 0.812500 -v 0.187500 0.500000 0.812500 -v 0.812500 0.500000 0.812500 -v 0.812500 0.562500 0.812500 -v 0.812500 0.562500 0.187500 -v 0.812500 0.500000 0.187500 -v 0.187500 0.500000 0.187500 -v 0.187500 0.562500 0.187500 -v 0.125000 0.625000 0.875000 -v 0.125000 0.562500 0.875000 -v 0.875000 0.562500 0.875000 -v 0.875000 0.625000 0.875000 -v 0.875000 0.625000 0.125000 -v 0.875000 0.562500 0.125000 -v 0.125000 0.562500 0.125000 -v 0.125000 0.625000 0.125000 -v 0.218750 0.875000 0.781250 -v 0.218750 0.625000 0.781250 -v 0.781250 0.625000 0.781250 -v 0.781250 0.875000 0.781250 -v 0.781250 0.875000 0.218750 -v 0.781250 0.625000 0.218750 -v 0.218750 0.625000 0.218750 -v 0.218750 0.875000 0.218750 -v 0.218750 1.093750 0.843750 -v 0.218750 0.718750 0.843750 -v 0.781250 0.718750 0.843750 -v 0.781250 1.093750 0.843750 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.343750 1.281250 0.968750 -v 0.343750 0.843750 0.968750 -v 0.656250 0.843750 0.968750 -v 0.656250 1.281250 0.968750 -v 0.656250 1.281250 0.843750 -v 0.656250 0.843750 0.843750 -v 0.343750 0.843750 0.843750 -v 0.343750 1.281250 0.843750 -v 0.406250 1.531250 0.968750 -v 0.406250 1.281250 0.968750 -v 0.593750 1.281250 0.968750 -v 0.593750 1.531250 0.968750 -v 0.593750 1.531250 0.906250 -v 0.593750 1.281250 0.906250 -v 0.406250 1.281250 0.906250 -v 0.406250 1.531250 0.906250 -v 0.156250 1.093750 0.781250 -v 0.156250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.156250 0.718750 0.218750 -v 0.156250 1.093750 0.218750 -v 0.031250 1.281250 0.656250 -v 0.031250 0.843750 0.656250 -v 0.156250 0.843750 0.656250 -v 0.156250 1.281250 0.656250 -v 0.156250 1.281250 0.343750 -v 0.156250 0.843750 0.343750 -v 0.031250 0.843750 0.343750 -v 0.031250 1.281250 0.343750 -v 0.031250 1.531250 0.593750 -v 0.031250 1.281250 0.593750 -v 0.093750 1.281250 0.593750 -v 0.093750 1.531250 0.593750 -v 0.093750 1.531250 0.406250 -v 0.093750 1.281250 0.406250 -v 0.031250 1.281250 0.406250 -v 0.031250 1.531250 0.406250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.781250 1.093750 0.156250 -v 0.781250 0.718750 0.156250 -v 0.218750 0.718750 0.156250 -v 0.218750 1.093750 0.156250 -v 0.343750 1.281250 0.156250 -v 0.343750 0.843750 0.156250 -v 0.656250 0.843750 0.156250 -v 0.656250 1.281250 0.156250 -v 0.656250 1.281250 0.031250 -v 0.656250 0.843750 0.031250 -v 0.343750 0.843750 0.031250 -v 0.343750 1.281250 0.031250 -v 0.406250 1.531250 0.093750 -v 0.406250 1.281250 0.093750 -v 0.593750 1.281250 0.093750 -v 0.593750 1.531250 0.093750 -v 0.593750 1.531250 0.031250 -v 0.593750 1.281250 0.031250 -v 0.406250 1.281250 0.031250 -v 0.406250 1.531250 0.031250 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.843750 0.718750 0.781250 -v 0.843750 1.093750 0.781250 -v 0.843750 1.093750 0.218750 -v 0.843750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.843750 1.281250 0.656250 -v 0.843750 0.843750 0.656250 -v 0.968750 0.843750 0.656250 -v 0.968750 1.281250 0.656250 -v 0.968750 1.281250 0.343750 -v 0.968750 0.843750 0.343750 -v 0.843750 0.843750 0.343750 -v 0.843750 1.281250 0.343750 -v 0.906250 1.531250 0.593750 -v 0.906250 1.281250 0.593750 -v 0.968750 1.281250 0.593750 -v 0.968750 1.531250 0.593750 -v 0.968750 1.531250 0.406250 -v 0.968750 1.281250 0.406250 -v 0.906250 1.281250 0.406250 -v 0.906250 1.531250 0.406250 -v 0.193151 0.473851 0.803768 -v 0.151353 0.103509 0.845306 -v 0.337685 0.082741 0.847635 -v 0.379483 0.453082 0.806098 -v 0.379483 0.432183 0.619766 -v 0.337685 0.061842 0.661303 -v 0.151353 0.082610 0.658974 -v 0.193151 0.452952 0.617437 -v 0.620517 0.432206 0.380235 -v 0.662315 0.061873 0.338698 -v 0.848645 0.082641 0.341027 -v 0.806847 0.452974 0.382564 -v 0.806847 0.473873 0.196235 -v 0.848645 0.103540 0.154698 -v 0.662315 0.082772 0.152368 -v 0.620517 0.453105 0.193905 -v 0.193151 0.452963 0.382563 -v 0.151353 0.082626 0.341026 -v 0.337685 0.061857 0.338696 -v 0.379483 0.432194 0.380234 -v 0.379483 0.453093 0.193904 -v 0.337685 0.082756 0.152367 -v 0.151353 0.103525 0.154696 -v 0.193151 0.473862 0.196233 -v 0.620517 0.453093 0.806096 -v 0.662315 0.082756 0.847633 -v 0.848645 0.103525 0.845304 -v 0.806847 0.473862 0.803767 -v 0.806847 0.452963 0.617435 -v 0.848645 0.082626 0.658972 -v 0.662315 0.061857 0.661302 -v 0.620517 0.432194 0.619765 -v 0.218750 1.093750 0.843750 -v 0.218750 0.718750 0.843750 -v 0.781250 0.718750 0.843750 -v 0.781250 1.093750 0.843750 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.343750 1.281250 0.968750 -v 0.343750 0.843750 0.968750 -v 0.656250 0.843750 0.968750 -v 0.656250 1.281250 0.968750 -v 0.656250 1.281250 0.843750 -v 0.656250 0.843750 0.843750 -v 0.343750 0.843750 0.843750 -v 0.343750 1.281250 0.843750 -v 0.406250 1.531250 0.968750 -v 0.406250 1.281250 0.968750 -v 0.593750 1.281250 0.968750 -v 0.593750 1.531250 0.968750 -v 0.593750 1.531250 0.906250 -v 0.593750 1.281250 0.906250 -v 0.406250 1.281250 0.906250 -v 0.406250 1.531250 0.906250 -v 0.156250 1.093750 0.781250 -v 0.156250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.156250 0.718750 0.218750 -v 0.156250 1.093750 0.218750 -v 0.031250 1.281250 0.656250 -v 0.031250 0.843750 0.656250 -v 0.156250 0.843750 0.656250 -v 0.156250 1.281250 0.656250 -v 0.156250 1.281250 0.343750 -v 0.156250 0.843750 0.343750 -v 0.031250 0.843750 0.343750 -v 0.031250 1.281250 0.343750 -v 0.031250 1.531250 0.593750 -v 0.031250 1.281250 0.593750 -v 0.093750 1.281250 0.593750 -v 0.093750 1.531250 0.593750 -v 0.093750 1.531250 0.406250 -v 0.093750 1.281250 0.406250 -v 0.031250 1.281250 0.406250 -v 0.031250 1.531250 0.406250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.781250 1.093750 0.156250 -v 0.781250 0.718750 0.156250 -v 0.218750 0.718750 0.156250 -v 0.218750 1.093750 0.156250 -v 0.343750 1.281250 0.156250 -v 0.343750 0.843750 0.156250 -v 0.656250 0.843750 0.156250 -v 0.656250 1.281250 0.156250 -v 0.656250 1.281250 0.031250 -v 0.656250 0.843750 0.031250 -v 0.343750 0.843750 0.031250 -v 0.343750 1.281250 0.031250 -v 0.406250 1.531250 0.093750 -v 0.406250 1.281250 0.093750 -v 0.593750 1.281250 0.093750 -v 0.593750 1.531250 0.093750 -v 0.593750 1.531250 0.031250 -v 0.593750 1.281250 0.031250 -v 0.406250 1.281250 0.031250 -v 0.406250 1.531250 0.031250 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.843750 0.718750 0.781250 -v 0.843750 1.093750 0.781250 -v 0.843750 1.093750 0.218750 -v 0.843750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.843750 1.281250 0.656250 -v 0.843750 0.843750 0.656250 -v 0.968750 0.843750 0.656250 -v 0.968750 1.281250 0.656250 -v 0.968750 1.281250 0.343750 -v 0.968750 0.843750 0.343750 -v 0.843750 0.843750 0.343750 -v 0.843750 1.281250 0.343750 -v 0.906250 1.531250 0.593750 -v 0.906250 1.281250 0.593750 -v 0.968750 1.281250 0.593750 -v 0.968750 1.531250 0.593750 -v 0.968750 1.531250 0.406250 -v 0.968750 1.281250 0.406250 -v 0.906250 1.281250 0.406250 -v 0.906250 1.531250 0.406250 -v 0.343750 1.281250 0.968750 -v 0.343750 0.843750 0.968750 -v 0.656250 0.843750 0.968750 -v 0.656250 1.281250 0.968750 -v 0.656250 1.281250 0.843750 -v 0.656250 0.843750 0.843750 -v 0.343750 0.843750 0.843750 -v 0.343750 1.281250 0.843750 -v 0.406250 1.531250 0.968750 -v 0.406250 1.281250 0.968750 -v 0.593750 1.281250 0.968750 -v 0.593750 1.531250 0.968750 -v 0.593750 1.531250 0.906250 -v 0.593750 1.281250 0.906250 -v 0.406250 1.281250 0.906250 -v 0.406250 1.531250 0.906250 -v 0.406250 1.531250 0.968750 -v 0.406250 1.281250 0.968750 -v 0.593750 1.281250 0.968750 -v 0.593750 1.531250 0.968750 -v 0.593750 1.531250 0.906250 -v 0.593750 1.281250 0.906250 -v 0.406250 1.281250 0.906250 -v 0.406250 1.531250 0.906250 -v 0.031250 1.281250 0.656250 -v 0.031250 0.843750 0.656250 -v 0.156250 0.843750 0.656250 -v 0.156250 1.281250 0.656250 -v 0.156250 1.281250 0.343750 -v 0.156250 0.843750 0.343750 -v 0.031250 0.843750 0.343750 -v 0.031250 1.281250 0.343750 -v 0.031250 1.531250 0.593750 -v 0.031250 1.281250 0.593750 -v 0.093750 1.281250 0.593750 -v 0.093750 1.531250 0.593750 -v 0.093750 1.531250 0.406250 -v 0.093750 1.281250 0.406250 -v 0.031250 1.281250 0.406250 -v 0.031250 1.531250 0.406250 -v 0.031250 1.531250 0.593750 -v 0.031250 1.281250 0.593750 -v 0.093750 1.281250 0.593750 -v 0.093750 1.531250 0.593750 -v 0.093750 1.531250 0.406250 -v 0.093750 1.281250 0.406250 -v 0.031250 1.281250 0.406250 -v 0.031250 1.531250 0.406250 -v 0.343750 1.281250 0.156250 -v 0.343750 0.843750 0.156250 -v 0.656250 0.843750 0.156250 -v 0.656250 1.281250 0.156250 -v 0.656250 1.281250 0.031250 -v 0.656250 0.843750 0.031250 -v 0.343750 0.843750 0.031250 -v 0.343750 1.281250 0.031250 -v 0.406250 1.531250 0.093750 -v 0.406250 1.281250 0.093750 -v 0.593750 1.281250 0.093750 -v 0.593750 1.531250 0.093750 -v 0.593750 1.531250 0.031250 -v 0.593750 1.281250 0.031250 -v 0.406250 1.281250 0.031250 -v 0.406250 1.531250 0.031250 -v 0.406250 1.531250 0.093750 -v 0.406250 1.281250 0.093750 -v 0.593750 1.281250 0.093750 -v 0.593750 1.531250 0.093750 -v 0.593750 1.531250 0.031250 -v 0.593750 1.281250 0.031250 -v 0.406250 1.281250 0.031250 -v 0.406250 1.531250 0.031250 -v 0.843750 1.281250 0.656250 -v 0.843750 0.843750 0.656250 -v 0.968750 0.843750 0.656250 -v 0.968750 1.281250 0.656250 -v 0.968750 1.281250 0.343750 -v 0.968750 0.843750 0.343750 -v 0.843750 0.843750 0.343750 -v 0.843750 1.281250 0.343750 -v 0.906250 1.531250 0.593750 -v 0.906250 1.281250 0.593750 -v 0.968750 1.281250 0.593750 -v 0.968750 1.531250 0.593750 -v 0.968750 1.531250 0.406250 -v 0.968750 1.281250 0.406250 -v 0.906250 1.281250 0.406250 -v 0.906250 1.531250 0.406250 -v 0.906250 1.531250 0.593750 -v 0.906250 1.281250 0.593750 -v 0.968750 1.281250 0.593750 -v 0.968750 1.531250 0.593750 -v 0.968750 1.531250 0.406250 -v 0.968750 1.281250 0.406250 -v 0.906250 1.281250 0.406250 -v 0.906250 1.531250 0.406250 -vt 0.062500 0.937500 -vt 0.062500 0.906250 -vt 0.125000 0.906250 -vt 0.125000 0.937500 -vt 0.187500 0.937500 -vt 0.187500 0.906250 -vt 0.250000 0.906250 -vt 0.250000 0.937500 -vt 0.062500 1.000000 -vt 0.125000 1.000000 -vt 0.187500 1.000000 -vt 0.000000 0.937500 -vt 0.000000 0.906250 -vt 0.046875 0.843750 -vt 0.046875 0.750000 -vt 0.093750 0.750000 -vt 0.093750 0.843750 -vt 0.140625 0.843750 -vt 0.140625 0.750000 -vt 0.187500 0.750000 -vt 0.187500 0.843750 -vt 0.046875 0.890625 -vt 0.093750 0.890625 -vt 0.140625 0.890625 -vt 0.000000 0.843750 -vt 0.000000 0.750000 -vt 0.437500 0.015625 -vt 0.437500 0.000000 -vt 0.625000 0.000000 -vt 0.625000 0.015625 -vt 0.812500 0.015625 -vt 0.812500 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.015625 -vt 0.437500 0.203125 -vt 0.625000 0.203125 -vt 0.812500 0.203125 -vt 0.250000 0.015625 -vt 0.250000 0.000000 -vt 0.531250 0.234375 -vt 0.531250 0.218750 -vt 0.687500 0.218750 -vt 0.687500 0.234375 -vt 0.843750 0.234375 -vt 0.843750 0.218750 -vt 1.000000 0.218750 -vt 1.000000 0.234375 -vt 0.531250 0.390625 -vt 0.687500 0.390625 -vt 0.843750 0.390625 -vt 0.375000 0.234375 -vt 0.375000 0.218750 -vt 0.578125 0.468750 -vt 0.578125 0.406250 -vt 0.718750 0.406250 -vt 0.718750 0.468750 -vt 0.859375 0.468750 -vt 0.859375 0.406250 -vt 1.000000 0.406250 -vt 1.000000 0.468750 -vt 0.578125 0.609375 -vt 0.718750 0.609375 -vt 0.859375 0.609375 -vt 0.437500 0.468750 -vt 0.437500 0.406250 -vt 0.703125 0.984375 -vt 0.703125 0.890625 -vt 0.843750 0.890625 -vt 0.843750 0.984375 -vt 0.859375 0.984375 -vt 0.859375 0.890625 -vt 1.000000 0.890625 -vt 1.000000 0.984375 -vt 0.703125 1.000000 -vt 0.843750 1.000000 -vt 0.984375 0.984375 -vt 0.984375 1.000000 -vt 0.687500 0.984375 -vt 0.687500 0.890625 -vt 0.578125 0.843750 -vt 0.578125 0.734375 -vt 0.656250 0.734375 -vt 0.656250 0.843750 -vt 0.687500 0.843750 -vt 0.687500 0.734375 -vt 0.765625 0.734375 -vt 0.765625 0.843750 -vt 0.578125 0.875000 -vt 0.656250 0.875000 -vt 0.734375 0.843750 -vt 0.734375 0.875000 -vt 0.546875 0.843750 -vt 0.546875 0.734375 -vt 0.890625 0.703125 -vt 0.890625 0.640625 -vt 0.937500 0.640625 -vt 0.937500 0.703125 -vt 0.953125 0.703125 -vt 0.953125 0.640625 -vt 1.000000 0.640625 -vt 1.000000 0.703125 -vt 0.890625 0.718750 -vt 0.937500 0.718750 -vt 0.984375 0.703125 -vt 0.984375 0.718750 -vt 0.875000 0.703125 -vt 0.875000 0.640625 -vt 0.140625 0.593750 -vt 0.140625 0.500000 -vt 0.156250 0.500000 -vt 0.156250 0.593750 -vt 0.296875 0.593750 -vt 0.296875 0.500000 -vt 0.312500 0.500000 -vt 0.312500 0.593750 -vt 0.140625 0.734375 -vt 0.156250 0.734375 -vt 0.171875 0.593750 -vt 0.171875 0.734375 -vt 0.000000 0.593750 -vt 0.000000 0.500000 -vt 0.421875 0.671875 -vt 0.421875 0.562500 -vt 0.453125 0.562500 -vt 0.453125 0.671875 -vt 0.531250 0.671875 -vt 0.531250 0.562500 -vt 0.562500 0.562500 -vt 0.562500 0.671875 -vt 0.421875 0.750000 -vt 0.453125 0.750000 -vt 0.484375 0.671875 -vt 0.484375 0.750000 -vt 0.343750 0.671875 -vt 0.343750 0.562500 -vt 0.343750 0.484375 -vt 0.343750 0.421875 -vt 0.359375 0.421875 -vt 0.359375 0.484375 -vt 0.406250 0.484375 -vt 0.406250 0.421875 -vt 0.421875 0.421875 -vt 0.421875 0.484375 -vt 0.343750 0.531250 -vt 0.359375 0.531250 -vt 0.375000 0.484375 -vt 0.375000 0.531250 -vt 0.296875 0.484375 -vt 0.296875 0.421875 -vt 0.375000 0.984375 -vt 0.375000 0.890625 -vt 0.515625 0.890625 -vt 0.515625 0.984375 -vt 0.531250 0.984375 -vt 0.531250 0.890625 -vt 0.671875 0.890625 -vt 0.671875 0.984375 -vt 0.375000 1.000000 -vt 0.515625 1.000000 -vt 0.656250 0.984375 -vt 0.656250 1.000000 -vt 0.359375 0.984375 -vt 0.359375 0.890625 -vt 0.812500 0.843750 -vt 0.812500 0.734375 -vt 0.890625 0.734375 -vt 0.890625 0.843750 -vt 0.921875 0.843750 -vt 0.921875 0.734375 -vt 1.000000 0.734375 -vt 1.000000 0.843750 -vt 0.812500 0.875000 -vt 0.890625 0.875000 -vt 0.968750 0.843750 -vt 0.968750 0.875000 -vt 0.781250 0.843750 -vt 0.781250 0.734375 -vn 0.000000 0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -vn -0.000000 0.111500 0.993800 -vn -0.000000 -0.111500 -0.993800 -vn 0.111500 0.987600 -0.110800 -vn -0.111500 -0.987600 0.110800 -vn 0.993800 -0.110800 0.012400 -vn -0.993800 0.110800 -0.012400 -vn 0.000000 -0.111500 0.993800 -vn 0.000000 0.111500 -0.993800 -vn -0.111500 0.987600 0.110800 -vn 0.111500 -0.987600 -0.110800 -vn 0.993800 0.110800 0.012400 -vn -0.993800 -0.110800 -0.012400 -vn 0.111500 0.987600 0.110800 -vn -0.111500 -0.987600 -0.110800 -vn 0.993800 -0.110800 -0.012400 -vn -0.993800 0.110800 0.012400 -vn -0.111500 0.987600 -0.110800 -vn 0.111500 -0.987600 0.110800 -vn 0.993800 0.110800 -0.012400 -vn -0.993800 -0.110800 0.012400 -usemtl None -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 8/9/3 1/1/3 4/4/3 5/10/3 -f 2/5/4 7/11/4 6/10/4 3/4/4 -f 5/5/5 4/4/5 3/3/5 6/6/5 -f 8/12/6 7/13/6 2/2/6 1/1/6 -f 9/14/7 10/15/7 11/16/7 12/17/7 -f 13/18/8 14/19/8 15/20/8 16/21/8 -f 16/22/9 9/14/9 12/17/9 13/23/9 -f 10/18/10 15/24/10 14/23/10 11/17/10 -f 13/18/11 12/17/11 11/16/11 14/19/11 -f 16/25/12 15/26/12 10/15/12 9/14/12 -f 17/1/1 18/2/1 19/3/1 20/4/1 -f 21/5/2 22/6/2 23/7/2 24/8/2 -f 24/9/3 17/1/3 20/4/3 21/10/3 -f 18/5/4 23/11/4 22/10/4 19/4/4 -f 21/5/5 20/4/5 19/3/5 22/6/5 -f 24/12/6 23/13/6 18/2/6 17/1/6 -f 25/14/13 26/15/13 27/16/13 28/17/13 -f 29/18/14 30/19/14 31/20/14 32/21/14 -f 32/22/15 25/14/15 28/17/15 29/23/15 -f 26/18/16 31/24/16 30/23/16 27/17/16 -f 29/18/17 28/17/17 27/16/17 30/19/17 -f 32/25/18 31/26/18 26/15/18 25/14/18 -f 33/1/1 34/2/1 35/3/1 36/4/1 -f 37/5/2 38/6/2 39/7/2 40/8/2 -f 40/9/3 33/1/3 36/4/3 37/10/3 -f 34/5/4 39/11/4 38/10/4 35/4/4 -f 37/5/5 36/4/5 35/3/5 38/6/5 -f 40/12/6 39/13/6 34/2/6 33/1/6 -f 41/14/13 42/15/13 43/16/13 44/17/13 -f 45/18/14 46/19/14 47/20/14 48/21/14 -f 48/22/19 41/14/19 44/17/19 45/23/19 -f 42/18/20 47/24/20 46/23/20 43/17/20 -f 45/18/21 44/17/21 43/16/21 46/19/21 -f 48/25/22 47/26/22 42/15/22 41/14/22 -f 49/1/1 50/2/1 51/3/1 52/4/1 -f 53/5/2 54/6/2 55/7/2 56/8/2 -f 56/9/3 49/1/3 52/4/3 53/10/3 -f 50/5/4 55/11/4 54/10/4 51/4/4 -f 53/5/5 52/4/5 51/3/5 54/6/5 -f 56/12/6 55/13/6 50/2/6 49/1/6 -f 57/14/7 58/15/7 59/16/7 60/17/7 -f 61/18/8 62/19/8 63/20/8 64/21/8 -f 64/22/23 57/14/23 60/17/23 61/23/23 -f 58/18/24 63/24/24 62/23/24 59/17/24 -f 61/18/25 60/17/25 59/16/25 62/19/25 -f 64/25/26 63/26/26 58/15/26 57/14/26 -f 65/27/1 66/28/1 67/29/1 68/30/1 -f 69/31/2 70/32/2 71/33/2 72/34/2 -f 72/35/3 65/27/3 68/30/3 69/36/3 -f 66/31/4 71/37/4 70/36/4 67/30/4 -f 69/31/5 68/30/5 67/29/5 70/32/5 -f 72/38/6 71/39/6 66/28/6 65/27/6 -f 73/40/1 74/41/1 75/42/1 76/43/1 -f 77/44/2 78/45/2 79/46/2 80/47/2 -f 80/48/3 73/40/3 76/43/3 77/49/3 -f 74/44/4 79/50/4 78/49/4 75/43/4 -f 77/44/5 76/43/5 75/42/5 78/45/5 -f 80/51/6 79/52/6 74/41/6 73/40/6 -f 81/27/1 82/28/1 83/29/1 84/30/1 -f 85/31/2 86/32/2 87/33/2 88/34/2 -f 88/35/3 81/27/3 84/30/3 85/36/3 -f 82/31/4 87/37/4 86/36/4 83/30/4 -f 85/31/5 84/30/5 83/29/5 86/32/5 -f 88/38/6 87/39/6 82/28/6 81/27/6 -f 89/53/1 90/54/1 91/55/1 92/56/1 -f 93/57/2 94/58/2 95/59/2 96/60/2 -f 96/61/3 89/53/3 92/56/3 93/62/3 -f 90/57/4 95/63/4 94/62/4 91/56/4 -f 93/57/5 92/56/5 91/55/5 94/58/5 -f 96/64/6 95/65/6 90/54/6 89/53/6 -f 97/66/1 98/67/1 99/68/1 100/69/1 -f 101/70/2 102/71/2 103/72/2 104/73/2 -f 104/74/3 97/66/3 100/69/3 101/75/3 -f 98/76/4 103/77/4 102/75/4 99/69/4 -f 101/70/5 100/69/5 99/68/5 102/71/5 -f 104/78/6 103/79/6 98/67/6 97/66/6 -f 105/80/1 106/81/1 107/82/1 108/83/1 -f 109/84/2 110/85/2 111/86/2 112/87/2 -f 112/88/3 105/80/3 108/83/3 109/89/3 -f 106/90/4 111/91/4 110/89/4 107/83/4 -f 109/84/5 108/83/5 107/82/5 110/85/5 -f 112/92/6 111/93/6 106/81/6 105/80/6 -f 113/94/1 114/95/1 115/96/1 116/97/1 -f 117/98/2 118/99/2 119/100/2 120/101/2 -f 120/102/3 113/94/3 116/97/3 117/103/3 -f 114/104/4 119/105/4 118/103/4 115/97/4 -f 117/98/5 116/97/5 115/96/5 118/99/5 -f 120/106/6 119/107/6 114/95/6 113/94/6 -f 121/108/1 122/109/1 123/110/1 124/111/1 -f 125/112/2 126/113/2 127/114/2 128/115/2 -f 128/116/3 121/108/3 124/111/3 125/117/3 -f 122/118/4 127/119/4 126/117/4 123/111/4 -f 125/112/5 124/111/5 123/110/5 126/113/5 -f 128/120/6 127/121/6 122/109/6 121/108/6 -f 129/122/1 130/123/1 131/124/1 132/125/1 -f 133/126/2 134/127/2 135/128/2 136/129/2 -f 136/130/3 129/122/3 132/125/3 133/131/3 -f 130/132/4 135/133/4 134/131/4 131/125/4 -f 133/126/5 132/125/5 131/124/5 134/127/5 -f 136/134/6 135/135/6 130/123/6 129/122/6 -f 137/136/1 138/137/1 139/138/1 140/139/1 -f 141/140/2 142/141/2 143/142/2 144/143/2 -f 144/144/3 137/136/3 140/139/3 141/145/3 -f 138/146/4 143/147/4 142/145/4 139/139/4 -f 141/140/5 140/139/5 139/138/5 142/141/5 -f 144/148/6 143/149/6 138/137/6 137/136/6 -f 145/150/1 146/151/1 147/152/1 148/153/1 -f 149/154/2 150/155/2 151/156/2 152/157/2 -f 152/158/3 145/150/3 148/153/3 149/159/3 -f 146/160/4 151/161/4 150/159/4 147/153/4 -f 149/154/5 148/153/5 147/152/5 150/155/5 -f 152/162/6 151/163/6 146/151/6 145/150/6 -f 153/164/1 154/165/1 155/166/1 156/167/1 -f 157/168/2 158/169/2 159/170/2 160/171/2 -f 160/172/3 153/164/3 156/167/3 157/173/3 -f 154/174/4 159/175/4 158/173/4 155/167/4 -f 157/168/5 156/167/5 155/166/5 158/169/5 -f 160/176/6 159/177/6 154/165/6 153/164/6 -f 161/94/1 162/95/1 163/96/1 164/97/1 -f 165/98/2 166/99/2 167/100/2 168/101/2 -f 168/102/3 161/94/3 164/97/3 165/103/3 -f 162/104/4 167/105/4 166/103/4 163/97/4 -f 165/98/5 164/97/5 163/96/5 166/99/5 -f 168/106/6 167/107/6 162/95/6 161/94/6 -f 169/108/1 170/109/1 171/110/1 172/111/1 -f 173/112/2 174/113/2 175/114/2 176/115/2 -f 176/116/3 169/108/3 172/111/3 173/117/3 -f 170/118/4 175/119/4 174/117/4 171/111/4 -f 173/112/5 172/111/5 171/110/5 174/113/5 -f 176/120/6 175/121/6 170/109/6 169/108/6 -f 177/122/1 178/123/1 179/124/1 180/125/1 -f 181/126/2 182/127/2 183/128/2 184/129/2 -f 184/130/3 177/122/3 180/125/3 181/131/3 -f 178/132/4 183/133/4 182/131/4 179/125/4 -f 181/126/5 180/125/5 179/124/5 182/127/5 -f 184/134/6 183/135/6 178/123/6 177/122/6 -f 185/136/1 186/137/1 187/138/1 188/139/1 -f 189/140/2 190/141/2 191/142/2 192/143/2 -f 192/144/3 185/136/3 188/139/3 189/145/3 -f 186/146/4 191/147/4 190/145/4 187/139/4 -f 189/140/5 188/139/5 187/138/5 190/141/5 -f 192/148/6 191/149/6 186/137/6 185/136/6 -f 193/14/7 194/15/7 195/16/7 196/17/7 -f 197/18/8 198/19/8 199/20/8 200/21/8 -f 200/22/9 193/14/9 196/17/9 197/23/9 -f 194/18/10 199/24/10 198/23/10 195/17/10 -f 197/18/11 196/17/11 195/16/11 198/19/11 -f 200/25/12 199/26/12 194/15/12 193/14/12 -f 201/14/13 202/15/13 203/16/13 204/17/13 -f 205/18/14 206/19/14 207/20/14 208/21/14 -f 208/22/15 201/14/15 204/17/15 205/23/15 -f 202/18/16 207/24/16 206/23/16 203/17/16 -f 205/18/17 204/17/17 203/16/17 206/19/17 -f 208/25/18 207/26/18 202/15/18 201/14/18 -f 209/14/13 210/15/13 211/16/13 212/17/13 -f 213/18/14 214/19/14 215/20/14 216/21/14 -f 216/22/19 209/14/19 212/17/19 213/23/19 -f 210/18/20 215/24/20 214/23/20 211/17/20 -f 213/18/21 212/17/21 211/16/21 214/19/21 -f 216/25/22 215/26/22 210/15/22 209/14/22 -f 217/14/7 218/15/7 219/16/7 220/17/7 -f 221/18/8 222/19/8 223/20/8 224/21/8 -f 224/22/23 217/14/23 220/17/23 221/23/23 -f 218/18/24 223/24/24 222/23/24 219/17/24 -f 221/18/25 220/17/25 219/16/25 222/19/25 -f 224/25/26 223/26/26 218/15/26 217/14/26 -f 225/66/1 226/67/1 227/68/1 228/69/1 -f 229/70/2 230/71/2 231/72/2 232/73/2 -f 232/74/3 225/66/3 228/69/3 229/75/3 -f 226/76/4 231/77/4 230/75/4 227/69/4 -f 229/70/5 228/69/5 227/68/5 230/71/5 -f 232/78/6 231/79/6 226/67/6 225/66/6 -f 233/80/1 234/81/1 235/82/1 236/83/1 -f 237/84/2 238/85/2 239/86/2 240/87/2 -f 240/88/3 233/80/3 236/83/3 237/89/3 -f 234/90/4 239/91/4 238/89/4 235/83/4 -f 237/84/5 236/83/5 235/82/5 238/85/5 -f 240/92/6 239/93/6 234/81/6 233/80/6 -f 241/94/1 242/95/1 243/96/1 244/97/1 -f 245/98/2 246/99/2 247/100/2 248/101/2 -f 248/102/3 241/94/3 244/97/3 245/103/3 -f 242/104/4 247/105/4 246/103/4 243/97/4 -f 245/98/5 244/97/5 243/96/5 246/99/5 -f 248/106/6 247/107/6 242/95/6 241/94/6 -f 249/108/1 250/109/1 251/110/1 252/111/1 -f 253/112/2 254/113/2 255/114/2 256/115/2 -f 256/116/3 249/108/3 252/111/3 253/117/3 -f 250/118/4 255/119/4 254/117/4 251/111/4 -f 253/112/5 252/111/5 251/110/5 254/113/5 -f 256/120/6 255/121/6 250/109/6 249/108/6 -f 257/122/1 258/123/1 259/124/1 260/125/1 -f 261/126/2 262/127/2 263/128/2 264/129/2 -f 264/130/3 257/122/3 260/125/3 261/131/3 -f 258/132/4 263/133/4 262/131/4 259/125/4 -f 261/126/5 260/125/5 259/124/5 262/127/5 -f 264/134/6 263/135/6 258/123/6 257/122/6 -f 265/136/1 266/137/1 267/138/1 268/139/1 -f 269/140/2 270/141/2 271/142/2 272/143/2 -f 272/144/3 265/136/3 268/139/3 269/145/3 -f 266/146/4 271/147/4 270/145/4 267/139/4 -f 269/140/5 268/139/5 267/138/5 270/141/5 -f 272/148/6 271/149/6 266/137/6 265/136/6 -f 273/150/1 274/151/1 275/152/1 276/153/1 -f 277/154/2 278/155/2 279/156/2 280/157/2 -f 280/158/3 273/150/3 276/153/3 277/159/3 -f 274/160/4 279/161/4 278/159/4 275/153/4 -f 277/154/5 276/153/5 275/152/5 278/155/5 -f 280/162/6 279/163/6 274/151/6 273/150/6 -f 281/164/1 282/165/1 283/166/1 284/167/1 -f 285/168/2 286/169/2 287/170/2 288/171/2 -f 288/172/3 281/164/3 284/167/3 285/173/3 -f 282/174/4 287/175/4 286/173/4 283/167/4 -f 285/168/5 284/167/5 283/166/5 286/169/5 -f 288/176/6 287/177/6 282/165/6 281/164/6 -f 289/94/1 290/95/1 291/96/1 292/97/1 -f 293/98/2 294/99/2 295/100/2 296/101/2 -f 296/102/3 289/94/3 292/97/3 293/103/3 -f 290/104/4 295/105/4 294/103/4 291/97/4 -f 293/98/5 292/97/5 291/96/5 294/99/5 -f 296/106/6 295/107/6 290/95/6 289/94/6 -f 297/108/1 298/109/1 299/110/1 300/111/1 -f 301/112/2 302/113/2 303/114/2 304/115/2 -f 304/116/3 297/108/3 300/111/3 301/117/3 -f 298/118/4 303/119/4 302/117/4 299/111/4 -f 301/112/5 300/111/5 299/110/5 302/113/5 -f 304/120/6 303/121/6 298/109/6 297/108/6 -f 305/122/1 306/123/1 307/124/1 308/125/1 -f 309/126/2 310/127/2 311/128/2 312/129/2 -f 312/130/3 305/122/3 308/125/3 309/131/3 -f 306/132/4 311/133/4 310/131/4 307/125/4 -f 309/126/5 308/125/5 307/124/5 310/127/5 -f 312/134/6 311/135/6 306/123/6 305/122/6 -f 313/136/1 314/137/1 315/138/1 316/139/1 -f 317/140/2 318/141/2 319/142/2 320/143/2 -f 320/144/3 313/136/3 316/139/3 317/145/3 -f 314/146/4 319/147/4 318/145/4 315/139/4 -f 317/140/5 316/139/5 315/138/5 318/141/5 -f 320/148/6 319/149/6 314/137/6 313/136/6 -f 321/80/1 322/81/1 323/82/1 324/83/1 -f 325/84/2 326/85/2 327/86/2 328/87/2 -f 328/88/3 321/80/3 324/83/3 325/89/3 -f 322/90/4 327/91/4 326/89/4 323/83/4 -f 325/84/5 324/83/5 323/82/5 326/85/5 -f 328/92/6 327/93/6 322/81/6 321/80/6 -f 329/94/1 330/95/1 331/96/1 332/97/1 -f 333/98/2 334/99/2 335/100/2 336/101/2 -f 336/102/3 329/94/3 332/97/3 333/103/3 -f 330/104/4 335/105/4 334/103/4 331/97/4 -f 333/98/5 332/97/5 331/96/5 334/99/5 -f 336/106/6 335/107/6 330/95/6 329/94/6 -f 337/94/1 338/95/1 339/96/1 340/97/1 -f 341/98/2 342/99/2 343/100/2 344/101/2 -f 344/102/3 337/94/3 340/97/3 341/103/3 -f 338/104/4 343/105/4 342/103/4 339/97/4 -f 341/98/5 340/97/5 339/96/5 342/99/5 -f 344/106/6 343/107/6 338/95/6 337/94/6 -f 345/122/1 346/123/1 347/124/1 348/125/1 -f 349/126/2 350/127/2 351/128/2 352/129/2 -f 352/130/3 345/122/3 348/125/3 349/131/3 -f 346/132/4 351/133/4 350/131/4 347/125/4 -f 349/126/5 348/125/5 347/124/5 350/127/5 -f 352/134/6 351/135/6 346/123/6 345/122/6 -f 353/136/1 354/137/1 355/138/1 356/139/1 -f 357/140/2 358/141/2 359/142/2 360/143/2 -f 360/144/3 353/136/3 356/139/3 357/145/3 -f 354/146/4 359/147/4 358/145/4 355/139/4 -f 357/140/5 356/139/5 355/138/5 358/141/5 -f 360/148/6 359/149/6 354/137/6 353/136/6 -f 361/136/1 362/137/1 363/138/1 364/139/1 -f 365/140/2 366/141/2 367/142/2 368/143/2 -f 368/144/3 361/136/3 364/139/3 365/145/3 -f 362/146/4 367/147/4 366/145/4 363/139/4 -f 365/140/5 364/139/5 363/138/5 366/141/5 -f 368/148/6 367/149/6 362/137/6 361/136/6 -f 369/164/1 370/165/1 371/166/1 372/167/1 -f 373/168/2 374/169/2 375/170/2 376/171/2 -f 376/172/3 369/164/3 372/167/3 373/173/3 -f 370/174/4 375/175/4 374/173/4 371/167/4 -f 373/168/5 372/167/5 371/166/5 374/169/5 -f 376/176/6 375/177/6 370/165/6 369/164/6 -f 377/94/1 378/95/1 379/96/1 380/97/1 -f 381/98/2 382/99/2 383/100/2 384/101/2 -f 384/102/3 377/94/3 380/97/3 381/103/3 -f 378/104/4 383/105/4 382/103/4 379/97/4 -f 381/98/5 380/97/5 379/96/5 382/99/5 -f 384/106/6 383/107/6 378/95/6 377/94/6 -f 385/94/1 386/95/1 387/96/1 388/97/1 -f 389/98/2 390/99/2 391/100/2 392/101/2 -f 392/102/3 385/94/3 388/97/3 389/103/3 -f 386/104/4 391/105/4 390/103/4 387/97/4 -f 389/98/5 388/97/5 387/96/5 390/99/5 -f 392/106/6 391/107/6 386/95/6 385/94/6 -f 393/122/1 394/123/1 395/124/1 396/125/1 -f 397/126/2 398/127/2 399/128/2 400/129/2 -f 400/130/3 393/122/3 396/125/3 397/131/3 -f 394/132/4 399/133/4 398/131/4 395/125/4 -f 397/126/5 396/125/5 395/124/5 398/127/5 -f 400/134/6 399/135/6 394/123/6 393/122/6 -f 401/136/1 402/137/1 403/138/1 404/139/1 -f 405/140/2 406/141/2 407/142/2 408/143/2 -f 408/144/3 401/136/3 404/139/3 405/145/3 -f 402/146/4 407/147/4 406/145/4 403/139/4 -f 405/140/5 404/139/5 403/138/5 406/141/5 -f 408/148/6 407/149/6 402/137/6 401/136/6 -f 409/136/1 410/137/1 411/138/1 412/139/1 -f 413/140/2 414/141/2 415/142/2 416/143/2 -f 416/144/3 409/136/3 412/139/3 413/145/3 -f 410/146/4 415/147/4 414/145/4 411/139/4 -f 413/140/5 412/139/5 411/138/5 414/141/5 -f 416/148/6 415/149/6 410/137/6 409/136/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrystallizer.obj b/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrystallizer.obj deleted file mode 100644 index f103e27b..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrystallizer.obj +++ /dev/null @@ -1,1359 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib BlockDemonCrystallizer.mtl -o BlockDemonCrystallizer.001 -v 0.125000 0.062500 0.875000 -v 0.125000 -0.000000 0.875000 -v 0.875000 -0.000000 0.875000 -v 0.875000 0.062500 0.875000 -v 0.875000 0.062500 0.125000 -v 0.875000 0.000000 0.125000 -v 0.125000 0.000000 0.125000 -v 0.125000 0.062500 0.125000 -v 0.187500 0.125000 0.812500 -v 0.187500 0.062500 0.812500 -v 0.812500 0.062500 0.812500 -v 0.812500 0.125000 0.812500 -v 0.812500 0.125000 0.187500 -v 0.812500 0.062500 0.187500 -v 0.187500 0.062500 0.187500 -v 0.187500 0.125000 0.187500 -v 0.125000 0.187500 0.875000 -v 0.125000 0.125000 0.875000 -v 0.875000 0.125000 0.875000 -v 0.875000 0.187500 0.875000 -v 0.875000 0.187500 0.125000 -v 0.875000 0.125000 0.125000 -v 0.125000 0.125000 0.125000 -v 0.125000 0.187500 0.125000 -v 0.631420 0.815976 0.370107 -v 0.556035 0.136742 0.445037 -v 0.742405 0.116307 0.447292 -v 0.817789 0.795541 0.372362 -v 0.817789 0.774981 0.185992 -v 0.742405 0.095747 0.260922 -v 0.556035 0.116183 0.258668 -v 0.631420 0.795417 0.183738 -v 0.580484 0.643738 0.420547 -v 0.573631 0.581989 0.427359 -v 0.822124 0.554742 0.430365 -v 0.828977 0.616490 0.423553 -v 0.828977 0.589078 0.175061 -v 0.822124 0.527329 0.181873 -v 0.573631 0.554577 0.178867 -v 0.580484 0.616325 0.172055 -v 0.631420 0.795416 0.816259 -v 0.556035 0.116189 0.741328 -v 0.742405 0.095754 0.739074 -v 0.817789 0.774980 0.814004 -v 0.817789 0.795540 0.627637 -v 0.742405 0.116313 0.552707 -v 0.556035 0.136748 0.554961 -v 0.631420 0.815975 0.629891 -v 0.548960 0.332286 0.796607 -v 0.542106 0.270538 0.789795 -v 0.790599 0.243291 0.786789 -v 0.797452 0.305039 0.793601 -v 0.797452 0.332451 0.545111 -v 0.790599 0.270704 0.538299 -v 0.542106 0.297951 0.541305 -v 0.548960 0.359699 0.548117 -v 0.182214 0.774979 0.814004 -v 0.257599 0.095760 0.739075 -v 0.443966 0.116195 0.741329 -v 0.368581 0.795415 0.816258 -v 0.368581 0.815974 0.629891 -v 0.443966 0.136755 0.554962 -v 0.257599 0.116319 0.552707 -v 0.182214 0.795539 0.627637 -v 0.192272 0.397664 0.803819 -v 0.199125 0.335916 0.797007 -v 0.447615 0.363163 0.800013 -v 0.440762 0.424911 0.806825 -v 0.440762 0.452323 0.558335 -v 0.447615 0.390576 0.551523 -v 0.199125 0.363329 0.548517 -v 0.192272 0.425076 0.555329 -v 0.182214 0.795540 0.372362 -v 0.257599 0.116313 0.447291 -v 0.443966 0.136748 0.445037 -v 0.368581 0.815975 0.370107 -v 0.368581 0.795416 0.183738 -v 0.443966 0.116189 0.258667 -v 0.257599 0.095753 0.260922 -v 0.182214 0.774980 0.185992 -v 0.178886 0.517012 0.431383 -v 0.185739 0.455264 0.438195 -v 0.434229 0.482511 0.435189 -v 0.427376 0.544259 0.428378 -v 0.427376 0.516846 0.179885 -v 0.434229 0.455098 0.186697 -v 0.185739 0.427851 0.189703 -v 0.178886 0.489599 0.182891 -v 0.125000 1.000000 0.875000 -v 0.125000 0.875000 0.875000 -v 0.875000 0.875000 0.875000 -v 0.875000 1.000000 0.875000 -v 0.875000 1.000000 0.125000 -v 0.875000 0.875000 0.125000 -v 0.125000 0.875000 0.125000 -v 0.125000 1.000000 0.125000 -v 0.125000 1.000000 0.125000 -v 0.125000 0.875000 0.125000 -v 0.875000 0.875000 0.125000 -v 0.875000 1.000000 0.125000 -v 0.875000 1.000000 0.000000 -v 0.875000 0.875000 0.000000 -v 0.125000 0.875000 0.000000 -v 0.125000 1.000000 0.000000 -v 0.125000 1.000000 1.000000 -v 0.125000 0.875000 1.000000 -v 0.875000 0.875000 1.000000 -v 0.875000 1.000000 1.000000 -v 0.875000 1.000000 0.875000 -v 0.875000 0.875000 0.875000 -v 0.125000 0.875000 0.875000 -v 0.125000 1.000000 0.875000 -v 0.875000 1.000000 0.875000 -v 0.875000 0.875000 0.875000 -v 1.000000 0.875000 0.875000 -v 1.000000 1.000000 0.875000 -v 1.000000 1.000000 0.125000 -v 1.000000 0.875000 0.125000 -v 0.875000 0.875000 0.125000 -v 0.875000 1.000000 0.125000 -v 0.000000 1.000000 0.875000 -v 0.000000 0.875000 0.875000 -v 0.125000 0.875000 0.875000 -v 0.125000 1.000000 0.875000 -v 0.125000 1.000000 0.125000 -v 0.125000 0.875000 0.125000 -v 0.000000 0.875000 0.125000 -v 0.000000 1.000000 0.125000 -v 0.343750 1.062500 0.656250 -v 0.343750 1.000000 0.656250 -v 0.656250 1.000000 0.656250 -v 0.656250 1.062500 0.656250 -v 0.656250 1.062500 0.343750 -v 0.656250 1.000000 0.343750 -v 0.343750 1.000000 0.343750 -v 0.343750 1.062500 0.343750 -v 0.343667 1.062449 0.656250 -v 0.255279 0.974061 0.656250 -v 0.299473 0.929867 0.656250 -v 0.387862 1.018255 0.656250 -v 0.387862 1.018255 0.343750 -v 0.299473 0.929867 0.343750 -v 0.255279 0.974061 0.343750 -v 0.343667 1.062449 0.343750 -v 0.343750 1.062449 0.656332 -v 0.343750 0.974061 0.744721 -v 0.656250 0.974061 0.744721 -v 0.656250 1.062449 0.656332 -v 0.656250 1.018255 0.612138 -v 0.656250 0.929866 0.700527 -v 0.343750 0.929866 0.700527 -v 0.343750 1.018255 0.612138 -v 0.343750 1.018255 0.388125 -v 0.343750 0.929867 0.299737 -v 0.656250 0.929867 0.299737 -v 0.656250 1.018255 0.388125 -v 0.656250 1.062449 0.343931 -v 0.656250 0.974061 0.255542 -v 0.343750 0.974061 0.255542 -v 0.343750 1.062449 0.343931 -v 0.612138 1.018255 0.656250 -v 0.700527 0.929867 0.656250 -v 0.744721 0.974061 0.656250 -v 0.656333 1.062449 0.656250 -v 0.656333 1.062449 0.343750 -v 0.744721 0.974061 0.343750 -v 0.700527 0.929867 0.343750 -v 0.612138 1.018255 0.343750 -v 0.875000 1.187500 0.125000 -v 0.875000 0.937500 0.125000 -v 1.000000 0.937500 0.125000 -v 1.000000 1.187500 0.125000 -v 1.000000 1.187500 0.000000 -v 1.000000 0.937500 0.000000 -v 0.875000 0.937500 0.000000 -v 0.875000 1.187500 0.000000 -v 0.937500 1.250000 0.062500 -v 0.937500 1.187500 0.062500 -v 1.000000 1.187500 0.062500 -v 1.000000 1.250000 0.062500 -v 1.000000 1.250000 0.000000 -v 1.000000 1.187500 0.000000 -v 0.937500 1.187500 0.000000 -v 0.937500 1.250000 0.000000 -v 0.937500 1.375000 0.062500 -v 0.937500 1.312500 0.062500 -v 1.000000 1.312500 0.062500 -v 1.000000 1.375000 0.062500 -v 1.000000 1.375000 0.000000 -v 1.000000 1.312500 0.000000 -v 0.937500 1.312500 0.000000 -v 0.937500 1.375000 0.000000 -v 0.000000 1.187500 1.000000 -v 0.000000 0.937500 1.000000 -v 0.125000 0.937500 1.000000 -v 0.125000 1.187500 1.000000 -v 0.125000 1.187500 0.875000 -v 0.125000 0.937500 0.875000 -v 0.000000 0.937500 0.875000 -v 0.000000 1.187500 0.875000 -v 0.000000 1.250000 1.000000 -v 0.000000 1.187500 1.000000 -v 0.062500 1.187500 1.000000 -v 0.062500 1.250000 1.000000 -v 0.062500 1.250000 0.937500 -v 0.062500 1.187500 0.937500 -v 0.000000 1.187500 0.937500 -v 0.000000 1.250000 0.937500 -v 0.000000 1.375000 1.000000 -v 0.000000 1.312500 1.000000 -v 0.062500 1.312500 1.000000 -v 0.062500 1.375000 1.000000 -v 0.062500 1.375000 0.937500 -v 0.062500 1.312500 0.937500 -v 0.000000 1.312500 0.937500 -v 0.000000 1.375000 0.937500 -v 0.875000 1.187500 1.000000 -v 0.875000 0.937500 1.000000 -v 1.000000 0.937500 1.000000 -v 1.000000 1.187500 1.000000 -v 1.000000 1.187500 0.875000 -v 1.000000 0.937500 0.875000 -v 0.875000 0.937500 0.875000 -v 0.875000 1.187500 0.875000 -v 0.937500 1.250000 1.000000 -v 0.937500 1.187500 1.000000 -v 1.000000 1.187500 1.000000 -v 1.000000 1.250000 1.000000 -v 1.000000 1.250000 0.937500 -v 1.000000 1.187500 0.937500 -v 0.937500 1.187500 0.937500 -v 0.937500 1.250000 0.937500 -v 0.937500 1.375000 1.000000 -v 0.937500 1.312500 1.000000 -v 1.000000 1.312500 1.000000 -v 1.000000 1.375000 1.000000 -v 1.000000 1.375000 0.937500 -v 1.000000 1.312500 0.937500 -v 0.937500 1.312500 0.937500 -v 0.937500 1.375000 0.937500 -v 0.000000 1.187500 0.125000 -v 0.000000 0.937500 0.125000 -v 0.125000 0.937500 0.125000 -v 0.125000 1.187500 0.125000 -v 0.125000 1.187500 0.000000 -v 0.125000 0.937500 0.000000 -v 0.000000 0.937500 0.000000 -v 0.000000 1.187500 0.000000 -v 0.000000 1.250000 0.062500 -v 0.000000 1.187500 0.062500 -v 0.062500 1.187500 0.062500 -v 0.062500 1.250000 0.062500 -v 0.062500 1.250000 0.000000 -v 0.062500 1.187500 0.000000 -v 0.000000 1.187500 0.000000 -v 0.000000 1.250000 0.000000 -v 0.000000 1.375000 0.062500 -v 0.000000 1.312500 0.062500 -v 0.062500 1.312500 0.062500 -v 0.062500 1.375000 0.062500 -v 0.062500 1.375000 0.000000 -v 0.062500 1.312500 0.000000 -v 0.000000 1.312500 0.000000 -v 0.000000 1.375000 0.000000 -v 0.187500 0.875000 0.812500 -v 0.187500 0.750000 0.812500 -v 0.812500 0.750000 0.812500 -v 0.812500 0.875000 0.812500 -v 0.812500 0.875000 0.187500 -v 0.812500 0.750000 0.187500 -v 0.187500 0.750000 0.187500 -v 0.187500 0.875000 0.187500 -v 0.062500 0.875000 0.812500 -v 0.062500 0.750000 0.812500 -v 0.187500 0.750000 0.812500 -v 0.187500 0.875000 0.812500 -v 0.187500 0.875000 0.187500 -v 0.187500 0.750000 0.187500 -v 0.062500 0.750000 0.187500 -v 0.062500 0.875000 0.187500 -v 0.187500 0.875000 0.187500 -v 0.187500 0.750000 0.187500 -v 0.812500 0.750000 0.187500 -v 0.812500 0.875000 0.187500 -v 0.812500 0.875000 0.062500 -v 0.812500 0.750000 0.062500 -v 0.187500 0.750000 0.062500 -v 0.187500 0.875000 0.062500 -v 0.187500 0.875000 0.937500 -v 0.187500 0.750000 0.937500 -v 0.812500 0.750000 0.937500 -v 0.812500 0.875000 0.937500 -v 0.812500 0.875000 0.812500 -v 0.812500 0.750000 0.812500 -v 0.187500 0.750000 0.812500 -v 0.187500 0.875000 0.812500 -v 0.812500 0.875000 0.812500 -v 0.812500 0.750000 0.812500 -v 0.937500 0.750000 0.812500 -v 0.937500 0.875000 0.812500 -v 0.937500 0.875000 0.187500 -v 0.937500 0.750000 0.187500 -v 0.812500 0.750000 0.187500 -v 0.812500 0.875000 0.187500 -v 0.187500 0.125000 0.812500 -v 0.187500 0.062500 0.812500 -v 0.812500 0.062500 0.812500 -v 0.812500 0.125000 0.812500 -v 0.812500 0.125000 0.187500 -v 0.812500 0.062500 0.187500 -v 0.187500 0.062500 0.187500 -v 0.187500 0.125000 0.187500 -v 0.125000 0.187500 0.875000 -v 0.125000 0.125000 0.875000 -v 0.875000 0.125000 0.875000 -v 0.875000 0.187500 0.875000 -v 0.875000 0.187500 0.125000 -v 0.875000 0.125000 0.125000 -v 0.125000 0.125000 0.125000 -v 0.125000 0.187500 0.125000 -v 0.125000 0.187500 0.875000 -v 0.125000 0.125000 0.875000 -v 0.875000 0.125000 0.875000 -v 0.875000 0.187500 0.875000 -v 0.875000 0.187500 0.125000 -v 0.875000 0.125000 0.125000 -v 0.125000 0.125000 0.125000 -v 0.125000 0.187500 0.125000 -v 0.580484 0.643738 0.420547 -v 0.573631 0.581989 0.427359 -v 0.822124 0.554742 0.430365 -v 0.828977 0.616490 0.423553 -v 0.828977 0.589078 0.175061 -v 0.822124 0.527329 0.181873 -v 0.573631 0.554577 0.178867 -v 0.580484 0.616325 0.172055 -v 0.548960 0.332286 0.796607 -v 0.542106 0.270538 0.789795 -v 0.790599 0.243291 0.786789 -v 0.797452 0.305039 0.793601 -v 0.797452 0.332451 0.545111 -v 0.790599 0.270704 0.538299 -v 0.542106 0.297951 0.541305 -v 0.548960 0.359699 0.548117 -v 0.192272 0.397664 0.803819 -v 0.199125 0.335916 0.797007 -v 0.447615 0.363163 0.800013 -v 0.440762 0.424911 0.806825 -v 0.440762 0.452323 0.558335 -v 0.447615 0.390576 0.551523 -v 0.199125 0.363329 0.548517 -v 0.192272 0.425076 0.555329 -v 0.178886 0.517012 0.431383 -v 0.185739 0.455264 0.438195 -v 0.434229 0.482511 0.435189 -v 0.427376 0.544259 0.428378 -v 0.427376 0.516846 0.179885 -v 0.434229 0.455098 0.186697 -v 0.185739 0.427851 0.189703 -v 0.178886 0.489599 0.182891 -v 0.125000 1.000000 0.125000 -v 0.125000 0.875000 0.125000 -v 0.875000 0.875000 0.125000 -v 0.875000 1.000000 0.125000 -v 0.875000 1.000000 0.000000 -v 0.875000 0.875000 0.000000 -v 0.125000 0.875000 0.000000 -v 0.125000 1.000000 0.000000 -v 0.125000 1.000000 1.000000 -v 0.125000 0.875000 1.000000 -v 0.875000 0.875000 1.000000 -v 0.875000 1.000000 1.000000 -v 0.875000 1.000000 0.875000 -v 0.875000 0.875000 0.875000 -v 0.125000 0.875000 0.875000 -v 0.125000 1.000000 0.875000 -v 0.875000 1.000000 0.875000 -v 0.875000 0.875000 0.875000 -v 1.000000 0.875000 0.875000 -v 1.000000 1.000000 0.875000 -v 1.000000 1.000000 0.125000 -v 1.000000 0.875000 0.125000 -v 0.875000 0.875000 0.125000 -v 0.875000 1.000000 0.125000 -v 0.000000 1.000000 0.875000 -v 0.000000 0.875000 0.875000 -v 0.125000 0.875000 0.875000 -v 0.125000 1.000000 0.875000 -v 0.125000 1.000000 0.125000 -v 0.125000 0.875000 0.125000 -v 0.000000 0.875000 0.125000 -v 0.000000 1.000000 0.125000 -v 0.343750 1.062500 0.656250 -v 0.343750 1.000000 0.656250 -v 0.656250 1.000000 0.656250 -v 0.656250 1.062500 0.656250 -v 0.656250 1.062500 0.343750 -v 0.656250 1.000000 0.343750 -v 0.343750 1.000000 0.343750 -v 0.343750 1.062500 0.343750 -v 0.343667 1.062449 0.656250 -v 0.255279 0.974061 0.656250 -v 0.299473 0.929867 0.656250 -v 0.387862 1.018255 0.656250 -v 0.387862 1.018255 0.343750 -v 0.299473 0.929867 0.343750 -v 0.255279 0.974061 0.343750 -v 0.343667 1.062449 0.343750 -v 0.343750 1.062449 0.656332 -v 0.343750 0.974061 0.744721 -v 0.656250 0.974061 0.744721 -v 0.656250 1.062449 0.656332 -v 0.656250 1.018255 0.612138 -v 0.656250 0.929866 0.700527 -v 0.343750 0.929866 0.700527 -v 0.343750 1.018255 0.612138 -v 0.343750 1.018255 0.388125 -v 0.343750 0.929867 0.299737 -v 0.656250 0.929867 0.299737 -v 0.656250 1.018255 0.388125 -v 0.656250 1.062449 0.343931 -v 0.656250 0.974061 0.255542 -v 0.343750 0.974061 0.255542 -v 0.343750 1.062449 0.343931 -v 0.612138 1.018255 0.656250 -v 0.700527 0.929867 0.656250 -v 0.744721 0.974061 0.656250 -v 0.656333 1.062449 0.656250 -v 0.656333 1.062449 0.343750 -v 0.744721 0.974061 0.343750 -v 0.700527 0.929867 0.343750 -v 0.612138 1.018255 0.343750 -v 0.343667 1.062449 0.656250 -v 0.255279 0.974061 0.656250 -v 0.299473 0.929867 0.656250 -v 0.387862 1.018255 0.656250 -v 0.387862 1.018255 0.343750 -v 0.299473 0.929867 0.343750 -v 0.255279 0.974061 0.343750 -v 0.343667 1.062449 0.343750 -v 0.343750 1.062449 0.656332 -v 0.343750 0.974061 0.744721 -v 0.656250 0.974061 0.744721 -v 0.656250 1.062449 0.656332 -v 0.656250 1.018255 0.612138 -v 0.656250 0.929866 0.700527 -v 0.343750 0.929866 0.700527 -v 0.343750 1.018255 0.612138 -v 0.343750 1.018255 0.388125 -v 0.343750 0.929867 0.299737 -v 0.656250 0.929867 0.299737 -v 0.656250 1.018255 0.388125 -v 0.656250 1.062449 0.343931 -v 0.656250 0.974061 0.255542 -v 0.343750 0.974061 0.255542 -v 0.343750 1.062449 0.343931 -v 0.612138 1.018255 0.656250 -v 0.700527 0.929867 0.656250 -v 0.744721 0.974061 0.656250 -v 0.656333 1.062449 0.656250 -v 0.656333 1.062449 0.343750 -v 0.744721 0.974061 0.343750 -v 0.700527 0.929867 0.343750 -v 0.612138 1.018255 0.343750 -v 0.937500 1.250000 0.062500 -v 0.937500 1.187500 0.062500 -v 1.000000 1.187500 0.062500 -v 1.000000 1.250000 0.062500 -v 1.000000 1.250000 0.000000 -v 1.000000 1.187500 0.000000 -v 0.937500 1.187500 0.000000 -v 0.937500 1.250000 0.000000 -v 0.937500 1.375000 0.062500 -v 0.937500 1.312500 0.062500 -v 1.000000 1.312500 0.062500 -v 1.000000 1.375000 0.062500 -v 1.000000 1.375000 0.000000 -v 1.000000 1.312500 0.000000 -v 0.937500 1.312500 0.000000 -v 0.937500 1.375000 0.000000 -v 0.937500 1.375000 0.062500 -v 0.937500 1.312500 0.062500 -v 1.000000 1.312500 0.062500 -v 1.000000 1.375000 0.062500 -v 1.000000 1.375000 0.000000 -v 1.000000 1.312500 0.000000 -v 0.937500 1.312500 0.000000 -v 0.937500 1.375000 0.000000 -v 0.000000 1.250000 1.000000 -v 0.000000 1.187500 1.000000 -v 0.062500 1.187500 1.000000 -v 0.062500 1.250000 1.000000 -v 0.062500 1.250000 0.937500 -v 0.062500 1.187500 0.937500 -v 0.000000 1.187500 0.937500 -v 0.000000 1.250000 0.937500 -v 0.000000 1.375000 1.000000 -v 0.000000 1.312500 1.000000 -v 0.062500 1.312500 1.000000 -v 0.062500 1.375000 1.000000 -v 0.062500 1.375000 0.937500 -v 0.062500 1.312500 0.937500 -v 0.000000 1.312500 0.937500 -v 0.000000 1.375000 0.937500 -v 0.000000 1.375000 1.000000 -v 0.000000 1.312500 1.000000 -v 0.062500 1.312500 1.000000 -v 0.062500 1.375000 1.000000 -v 0.062500 1.375000 0.937500 -v 0.062500 1.312500 0.937500 -v 0.000000 1.312500 0.937500 -v 0.000000 1.375000 0.937500 -v 0.937500 1.250000 1.000000 -v 0.937500 1.187500 1.000000 -v 1.000000 1.187500 1.000000 -v 1.000000 1.250000 1.000000 -v 1.000000 1.250000 0.937500 -v 1.000000 1.187500 0.937500 -v 0.937500 1.187500 0.937500 -v 0.937500 1.250000 0.937500 -v 0.937500 1.375000 1.000000 -v 0.937500 1.312500 1.000000 -v 1.000000 1.312500 1.000000 -v 1.000000 1.375000 1.000000 -v 1.000000 1.375000 0.937500 -v 1.000000 1.312500 0.937500 -v 0.937500 1.312500 0.937500 -v 0.937500 1.375000 0.937500 -v 0.937500 1.375000 1.000000 -v 0.937500 1.312500 1.000000 -v 1.000000 1.312500 1.000000 -v 1.000000 1.375000 1.000000 -v 1.000000 1.375000 0.937500 -v 1.000000 1.312500 0.937500 -v 0.937500 1.312500 0.937500 -v 0.937500 1.375000 0.937500 -v 0.000000 1.250000 0.062500 -v 0.000000 1.187500 0.062500 -v 0.062500 1.187500 0.062500 -v 0.062500 1.250000 0.062500 -v 0.062500 1.250000 0.000000 -v 0.062500 1.187500 0.000000 -v 0.000000 1.187500 0.000000 -v 0.000000 1.250000 0.000000 -v 0.000000 1.375000 0.062500 -v 0.000000 1.312500 0.062500 -v 0.062500 1.312500 0.062500 -v 0.062500 1.375000 0.062500 -v 0.062500 1.375000 0.000000 -v 0.062500 1.312500 0.000000 -v 0.000000 1.312500 0.000000 -v 0.000000 1.375000 0.000000 -v 0.000000 1.375000 0.062500 -v 0.000000 1.312500 0.062500 -v 0.062500 1.312500 0.062500 -v 0.062500 1.375000 0.062500 -v 0.062500 1.375000 0.000000 -v 0.062500 1.312500 0.000000 -v 0.000000 1.312500 0.000000 -v 0.000000 1.375000 0.000000 -v 0.062500 0.875000 0.812500 -v 0.062500 0.750000 0.812500 -v 0.187500 0.750000 0.812500 -v 0.187500 0.875000 0.812500 -v 0.187500 0.875000 0.187500 -v 0.187500 0.750000 0.187500 -v 0.062500 0.750000 0.187500 -v 0.062500 0.875000 0.187500 -v 0.187500 0.875000 0.187500 -v 0.187500 0.750000 0.187500 -v 0.812500 0.750000 0.187500 -v 0.812500 0.875000 0.187500 -v 0.812500 0.875000 0.062500 -v 0.812500 0.750000 0.062500 -v 0.187500 0.750000 0.062500 -v 0.187500 0.875000 0.062500 -v 0.187500 0.875000 0.937500 -v 0.187500 0.750000 0.937500 -v 0.812500 0.750000 0.937500 -v 0.812500 0.875000 0.937500 -v 0.812500 0.875000 0.812500 -v 0.812500 0.750000 0.812500 -v 0.187500 0.750000 0.812500 -v 0.187500 0.875000 0.812500 -v 0.812500 0.875000 0.812500 -v 0.812500 0.750000 0.812500 -v 0.937500 0.750000 0.812500 -v 0.937500 0.875000 0.812500 -v 0.937500 0.875000 0.187500 -v 0.937500 0.750000 0.187500 -v 0.812500 0.750000 0.187500 -v 0.812500 0.875000 0.187500 -vt 0.437500 0.015625 -vt 0.437500 0.000000 -vt 0.625000 0.000000 -vt 0.625000 0.015625 -vt 0.812500 0.015625 -vt 0.812500 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.015625 -vt 0.437500 0.203125 -vt 0.625000 0.203125 -vt 0.812500 0.203125 -vt 0.250000 0.015625 -vt 0.250000 0.000000 -vt 0.531250 0.234375 -vt 0.531250 0.218750 -vt 0.687500 0.218750 -vt 0.687500 0.234375 -vt 0.843750 0.234375 -vt 0.843750 0.218750 -vt 1.000000 0.218750 -vt 1.000000 0.234375 -vt 0.531250 0.390625 -vt 0.687500 0.390625 -vt 0.843750 0.390625 -vt 0.375000 0.234375 -vt 0.375000 0.218750 -vt 0.046875 0.171875 -vt 0.046875 0.000000 -vt 0.093750 0.000000 -vt 0.093750 0.171875 -vt 0.140625 0.171875 -vt 0.140625 0.000000 -vt 0.187500 0.000000 -vt 0.187500 0.171875 -vt 0.046875 0.218750 -vt 0.093750 0.218750 -vt 0.140625 0.218750 -vt 0.000000 0.171875 -vt 0.000000 0.000000 -vt 0.609375 0.281250 -vt 0.609375 0.265625 -vt 0.671875 0.265625 -vt 0.671875 0.281250 -vt 0.734375 0.281250 -vt 0.734375 0.265625 -vt 0.796875 0.265625 -vt 0.796875 0.281250 -vt 0.609375 0.343750 -vt 0.671875 0.343750 -vt 0.734375 0.343750 -vt 0.546875 0.281250 -vt 0.546875 0.265625 -vt 0.609375 0.234375 -vt 0.609375 0.218750 -vt 0.671875 0.218750 -vt 0.671875 0.234375 -vt 0.734375 0.234375 -vt 0.734375 0.218750 -vt 0.796875 0.218750 -vt 0.796875 0.234375 -vt 0.609375 0.296875 -vt 0.671875 0.296875 -vt 0.734375 0.296875 -vt 0.546875 0.234375 -vt 0.546875 0.218750 -vt 0.609375 0.250000 -vt 0.671875 0.250000 -vt 0.734375 0.250000 -vt 0.796875 0.250000 -vt 0.609375 0.312500 -vt 0.671875 0.312500 -vt 0.734375 0.312500 -vt 0.546875 0.250000 -vt 0.609375 0.328125 -vt 0.671875 0.328125 -vt 0.734375 0.328125 -vt 0.187500 0.812500 -vt 0.187500 0.781250 -vt 0.375000 0.781250 -vt 0.375000 0.812500 -vt 0.562500 0.812500 -vt 0.562500 0.781250 -vt 0.750000 0.781250 -vt 0.750000 0.812500 -vt 0.187500 1.000000 -vt 0.375000 1.000000 -vt 0.562500 1.000000 -vt 0.000000 0.812500 -vt 0.000000 0.781250 -vt 0.593750 0.640625 -vt 0.593750 0.609375 -vt 0.781250 0.609375 -vt 0.781250 0.640625 -vt 0.812500 0.640625 -vt 0.812500 0.609375 -vt 1.000000 0.609375 -vt 1.000000 0.640625 -vt 0.593750 0.671875 -vt 0.781250 0.671875 -vt 0.968750 0.640625 -vt 0.968750 0.671875 -vt 0.562500 0.640625 -vt 0.562500 0.609375 -vt 0.593750 0.718750 -vt 0.593750 0.687500 -vt 0.781250 0.687500 -vt 0.781250 0.718750 -vt 0.812500 0.718750 -vt 0.812500 0.687500 -vt 1.000000 0.687500 -vt 1.000000 0.718750 -vt 0.593750 0.750000 -vt 0.781250 0.750000 -vt 0.968750 0.718750 -vt 0.968750 0.750000 -vt 0.562500 0.718750 -vt 0.562500 0.687500 -vt 0.187500 0.578125 -vt 0.187500 0.546875 -vt 0.218750 0.546875 -vt 0.218750 0.578125 -vt 0.406250 0.578125 -vt 0.406250 0.546875 -vt 0.437500 0.546875 -vt 0.437500 0.578125 -vt 0.187500 0.765625 -vt 0.218750 0.765625 -vt 0.250000 0.578125 -vt 0.250000 0.765625 -vt 0.000000 0.578125 -vt 0.000000 0.546875 -vt 0.078125 0.453125 -vt 0.078125 0.437500 -vt 0.156250 0.437500 -vt 0.156250 0.453125 -vt 0.234375 0.453125 -vt 0.234375 0.437500 -vt 0.312500 0.437500 -vt 0.312500 0.453125 -vt 0.078125 0.531250 -vt 0.156250 0.531250 -vt 0.234375 0.531250 -vt 0.000000 0.453125 -vt 0.000000 0.437500 -vt 0.312500 0.062500 -vt 0.312500 0.031250 -vt 0.328125 0.031250 -vt 0.328125 0.062500 -vt 0.406250 0.062500 -vt 0.406250 0.031250 -vt 0.421875 0.031250 -vt 0.421875 0.062500 -vt 0.312500 0.140625 -vt 0.328125 0.140625 -vt 0.343750 0.062500 -vt 0.343750 0.140625 -vt 0.234375 0.062500 -vt 0.234375 0.031250 -vt 0.250000 0.187500 -vt 0.250000 0.156250 -vt 0.328125 0.156250 -vt 0.328125 0.187500 -vt 0.343750 0.187500 -vt 0.343750 0.156250 -vt 0.421875 0.156250 -vt 0.421875 0.187500 -vt 0.250000 0.203125 -vt 0.328125 0.203125 -vt 0.406250 0.187500 -vt 0.406250 0.203125 -vt 0.234375 0.187500 -vt 0.234375 0.156250 -vt 0.906250 0.093750 -vt 0.906250 0.031250 -vt 0.937500 0.031250 -vt 0.937500 0.093750 -vt 0.968750 0.093750 -vt 0.968750 0.031250 -vt 1.000000 0.031250 -vt 1.000000 0.093750 -vt 0.906250 0.125000 -vt 0.937500 0.125000 -vt 0.968750 0.125000 -vt 0.875000 0.093750 -vt 0.875000 0.031250 -vt 0.953125 0.156250 -vt 0.953125 0.140625 -vt 0.968750 0.140625 -vt 0.968750 0.156250 -vt 0.984375 0.156250 -vt 0.984375 0.140625 -vt 1.000000 0.140625 -vt 1.000000 0.156250 -vt 0.953125 0.171875 -vt 0.968750 0.171875 -vt 0.984375 0.171875 -vt 0.937500 0.156250 -vt 0.937500 0.140625 -vt 0.656250 0.281250 -vt 0.656250 0.265625 -vt 0.687500 0.281250 -vt 0.687500 0.265625 -vt 0.703125 0.265625 -vt 0.703125 0.281250 -vt 0.656250 0.296875 -vt 0.687500 0.296875 -vt 0.640625 0.281250 -vt 0.640625 0.265625 -vt 0.593750 0.281250 -vt 0.593750 0.265625 -vt 0.625000 0.281250 -vt 0.625000 0.265625 -vt 0.593750 0.296875 -vt 0.625000 0.296875 -vt 0.578125 0.281250 -vt 0.578125 0.265625 -vt 0.750000 0.265625 -vt 0.750000 0.281250 -vt 0.765625 0.281250 -vt 0.765625 0.265625 -vt 0.781250 0.265625 -vt 0.781250 0.281250 -vt 0.750000 0.296875 -vt 0.765625 0.296875 -vt 0.718750 0.281250 -vt 0.718750 0.265625 -vt 0.640625 0.296875 -vt 0.531250 0.437500 -vt 0.531250 0.406250 -vt 0.687500 0.406250 -vt 0.687500 0.437500 -vt 0.843750 0.437500 -vt 0.843750 0.406250 -vt 1.000000 0.406250 -vt 1.000000 0.437500 -vt 0.531250 0.593750 -vt 0.687500 0.593750 -vt 0.843750 0.593750 -vt 0.375000 0.437500 -vt 0.375000 0.406250 -vt 0.156250 0.265625 -vt 0.156250 0.234375 -vt 0.187500 0.234375 -vt 0.187500 0.265625 -vt 0.343750 0.265625 -vt 0.343750 0.234375 -vt 0.375000 0.265625 -vt 0.156250 0.421875 -vt 0.187500 0.421875 -vt 0.218750 0.265625 -vt 0.218750 0.421875 -vt 0.000000 0.265625 -vt 0.000000 0.234375 -vt 0.625000 0.890625 -vt 0.625000 0.859375 -vt 0.781250 0.859375 -vt 0.781250 0.890625 -vt 0.812500 0.890625 -vt 0.812500 0.859375 -vt 0.968750 0.859375 -vt 0.968750 0.890625 -vt 0.625000 0.921875 -vt 0.781250 0.921875 -vt 0.937500 0.890625 -vt 0.937500 0.921875 -vt 0.593750 0.890625 -vt 0.593750 0.859375 -vt 0.625000 0.968750 -vt 0.625000 0.937500 -vt 0.781250 0.937500 -vt 0.781250 0.968750 -vt 0.812500 0.968750 -vt 0.812500 0.937500 -vt 0.968750 0.937500 -vt 0.968750 0.968750 -vt 0.625000 1.000000 -vt 0.781250 1.000000 -vt 0.937500 0.968750 -vt 0.937500 1.000000 -vt 0.593750 0.968750 -vt 0.593750 0.937500 -vn 0.000000 0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -vn -0.000000 0.109700 0.994000 -vn -0.000000 -0.109600 -0.994000 -vn 0.109700 0.988000 -0.109000 -vn -0.109700 -0.988000 0.109000 -vn 0.994000 -0.109000 0.012000 -vn -0.994000 0.109000 -0.012000 -vn 0.000000 -0.109700 -0.994000 -vn 0.000000 -0.109700 0.994000 -vn 0.000000 0.109700 -0.994000 -vn 0.109700 0.988000 0.109000 -vn -0.109600 -0.988000 -0.109000 -vn 0.994000 -0.109000 -0.012000 -vn -0.994000 0.109000 0.012000 -vn -0.109700 0.988000 0.109000 -vn 0.109700 -0.988000 -0.109000 -vn 0.994000 0.109000 0.012000 -vn -0.994000 -0.109000 -0.012000 -vn -0.109700 0.988000 -0.109000 -vn 0.109700 -0.988000 0.109000 -vn 0.994000 0.109000 -0.012000 -vn -0.994000 -0.109000 0.012000 -vn -0.000000 0.109600 0.994000 -vn 0.707100 0.707100 0.000000 -vn -0.707100 -0.707100 0.000000 -vn 0.707100 -0.707100 0.000000 -vn -0.707100 0.707100 0.000000 -vn 0.000000 0.707100 0.707100 -vn 0.000000 -0.707100 -0.707100 -vn 0.000000 0.707100 -0.707100 -vn 0.000000 -0.707100 0.707100 -usemtl None -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 8/9/3 1/1/3 4/4/3 5/10/3 -f 2/5/4 7/11/4 6/10/4 3/4/4 -f 5/5/5 4/4/5 3/3/5 6/6/5 -f 8/12/6 7/13/6 2/2/6 1/1/6 -f 9/14/1 10/15/1 11/16/1 12/17/1 -f 13/18/2 14/19/2 15/20/2 16/21/2 -f 16/22/3 9/14/3 12/17/3 13/23/3 -f 10/18/4 15/24/4 14/23/4 11/17/4 -f 13/18/5 12/17/5 11/16/5 14/19/5 -f 16/25/6 15/26/6 10/15/6 9/14/6 -f 17/1/1 18/2/1 19/3/1 20/4/1 -f 21/5/2 22/6/2 23/7/2 24/8/2 -f 24/9/3 17/1/3 20/4/3 21/10/3 -f 18/5/4 23/11/4 22/10/4 19/4/4 -f 21/5/5 20/4/5 19/3/5 22/6/5 -f 24/12/6 23/13/6 18/2/6 17/1/6 -f 25/27/7 26/28/7 27/29/7 28/30/7 -f 29/31/8 30/32/8 31/33/8 32/34/8 -f 32/35/9 25/27/9 28/30/9 29/36/9 -f 26/31/10 31/37/10 30/36/10 27/30/10 -f 29/31/11 28/30/11 27/29/11 30/32/11 -f 32/38/12 31/39/12 26/28/12 25/27/12 -f 33/40/7 34/41/7 35/42/7 36/43/7 -f 37/44/13 38/45/13 39/46/13 40/47/13 -f 40/48/9 33/40/9 36/43/9 37/49/9 -f 34/44/10 39/50/10 38/49/10 35/43/10 -f 37/44/11 36/43/11 35/42/11 38/45/11 -f 40/51/12 39/52/12 34/41/12 33/40/12 -f 41/27/14 42/28/14 43/29/14 44/30/14 -f 45/31/15 46/32/15 47/33/15 48/34/15 -f 48/35/16 41/27/16 44/30/16 45/36/16 -f 42/31/17 47/37/17 46/36/17 43/30/17 -f 45/31/18 44/30/18 43/29/18 46/32/18 -f 48/38/19 47/39/19 42/28/19 41/27/19 -f 49/53/14 50/54/14 51/55/14 52/56/14 -f 53/57/15 54/58/15 55/59/15 56/60/15 -f 56/61/16 49/53/16 52/56/16 53/62/16 -f 50/57/17 55/63/17 54/62/17 51/56/17 -f 53/57/18 52/56/18 51/55/18 54/58/18 -f 56/64/19 55/65/19 50/54/19 49/53/19 -f 57/27/14 58/28/14 59/29/14 60/30/14 -f 61/31/15 62/32/15 63/33/15 64/34/15 -f 64/35/20 57/27/20 60/30/20 61/36/20 -f 58/31/21 63/37/21 62/36/21 59/30/21 -f 61/31/22 60/30/22 59/29/22 62/32/22 -f 64/38/23 63/39/23 58/28/23 57/27/23 -f 65/66/14 66/53/14 67/56/14 68/67/14 -f 69/68/15 70/57/15 71/60/15 72/69/15 -f 72/70/20 65/66/20 68/67/20 69/71/20 -f 66/68/21 71/72/21 70/71/21 67/67/21 -f 69/68/22 68/67/22 67/56/22 70/57/22 -f 72/73/23 71/64/23 66/53/23 65/66/23 -f 73/27/7 74/28/7 75/29/7 76/30/7 -f 77/31/13 78/32/13 79/33/13 80/34/13 -f 80/35/24 73/27/24 76/30/24 77/36/24 -f 74/31/25 79/37/25 78/36/25 75/30/25 -f 77/31/26 76/30/26 75/29/26 78/32/26 -f 80/38/27 79/39/27 74/28/27 73/27/27 -f 81/41/28 82/66/28 83/67/28 84/42/28 -f 85/45/13 86/68/13 87/69/13 88/46/13 -f 88/74/24 81/41/24 84/42/24 85/75/24 -f 82/45/25 87/76/25 86/75/25 83/42/25 -f 85/45/26 84/42/26 83/67/26 86/68/26 -f 88/52/27 87/73/27 82/66/27 81/41/27 -f 89/77/1 90/78/1 91/79/1 92/80/1 -f 93/81/2 94/82/2 95/83/2 96/84/2 -f 96/85/3 89/77/3 92/80/3 93/86/3 -f 90/81/4 95/87/4 94/86/4 91/80/4 -f 93/81/5 92/80/5 91/79/5 94/82/5 -f 96/88/6 95/89/6 90/78/6 89/77/6 -f 97/90/1 98/91/1 99/92/1 100/93/1 -f 101/94/2 102/95/2 103/96/2 104/97/2 -f 104/98/3 97/90/3 100/93/3 101/99/3 -f 98/100/4 103/101/4 102/99/4 99/93/4 -f 101/94/5 100/93/5 99/92/5 102/95/5 -f 104/102/6 103/103/6 98/91/6 97/90/6 -f 105/104/1 106/105/1 107/106/1 108/107/1 -f 109/108/2 110/109/2 111/110/2 112/111/2 -f 112/112/3 105/104/3 108/107/3 109/113/3 -f 106/114/4 111/115/4 110/113/4 107/107/4 -f 109/108/5 108/107/5 107/106/5 110/109/5 -f 112/116/6 111/117/6 106/105/6 105/104/6 -f 113/118/1 114/119/1 115/120/1 116/121/1 -f 117/122/2 118/123/2 119/124/2 120/125/2 -f 120/126/3 113/118/3 116/121/3 117/127/3 -f 114/128/4 119/129/4 118/127/4 115/121/4 -f 117/122/5 116/121/5 115/120/5 118/123/5 -f 120/130/6 119/131/6 114/119/6 113/118/6 -f 121/118/1 122/119/1 123/120/1 124/121/1 -f 125/122/2 126/123/2 127/124/2 128/125/2 -f 128/126/3 121/118/3 124/121/3 125/127/3 -f 122/128/4 127/129/4 126/127/4 123/121/4 -f 125/122/5 124/121/5 123/120/5 126/123/5 -f 128/130/6 127/131/6 122/119/6 121/118/6 -f 129/132/1 130/133/1 131/134/1 132/135/1 -f 133/136/2 134/137/2 135/138/2 136/139/2 -f 136/140/3 129/132/3 132/135/3 133/141/3 -f 130/136/4 135/142/4 134/141/4 131/135/4 -f 133/136/5 132/135/5 131/134/5 134/137/5 -f 136/143/6 135/144/6 130/133/6 129/132/6 -f 137/145/1 138/146/1 139/147/1 140/148/1 -f 141/149/2 142/150/2 143/151/2 144/152/2 -f 144/153/29 137/145/29 140/148/29 141/154/29 -f 138/155/30 143/156/30 142/154/30 139/148/30 -f 141/149/31 140/148/31 139/147/31 142/150/31 -f 144/157/32 143/158/32 138/146/32 137/145/32 -f 145/159/33 146/160/33 147/161/33 148/162/33 -f 149/163/34 150/164/34 151/165/34 152/166/34 -f 152/167/35 145/159/35 148/162/35 149/168/35 -f 146/169/36 151/170/36 150/168/36 147/162/36 -f 149/163/5 148/162/5 147/161/5 150/164/5 -f 152/171/6 151/172/6 146/160/6 145/159/6 -f 153/159/36 154/160/36 155/161/36 156/162/36 -f 157/163/35 158/164/35 159/165/35 160/166/35 -f 160/167/33 153/159/33 156/162/33 157/168/33 -f 154/169/34 159/170/34 158/168/34 155/162/34 -f 157/163/5 156/162/5 155/161/5 158/164/5 -f 160/171/6 159/172/6 154/160/6 153/159/6 -f 161/145/1 162/146/1 163/147/1 164/148/1 -f 165/149/2 166/150/2 167/151/2 168/152/2 -f 168/153/32 161/145/32 164/148/32 165/154/32 -f 162/155/31 167/156/31 166/154/31 163/148/31 -f 165/149/29 164/148/29 163/147/29 166/150/29 -f 168/157/30 167/158/30 162/146/30 161/145/30 -f 169/173/1 170/174/1 171/175/1 172/176/1 -f 173/177/2 174/178/2 175/179/2 176/180/2 -f 176/181/3 169/173/3 172/176/3 173/182/3 -f 170/177/4 175/183/4 174/182/4 171/176/4 -f 173/177/5 172/176/5 171/175/5 174/178/5 -f 176/184/6 175/185/6 170/174/6 169/173/6 -f 177/186/1 178/187/1 179/188/1 180/189/1 -f 181/190/2 182/191/2 183/192/2 184/193/2 -f 184/194/3 177/186/3 180/189/3 181/195/3 -f 178/190/4 183/196/4 182/195/4 179/189/4 -f 181/190/5 180/189/5 179/188/5 182/191/5 -f 184/197/6 183/198/6 178/187/6 177/186/6 -f 185/199/1 186/200/1 187/42/1 188/43/1 -f 189/201/2 190/202/2 191/203/2 192/204/2 -f 192/205/3 185/199/3 188/43/3 189/62/3 -f 186/201/4 191/206/4 190/62/4 187/43/4 -f 189/201/5 188/43/5 187/42/5 190/202/5 -f 192/207/6 191/208/6 186/200/6 185/199/6 -f 193/173/1 194/174/1 195/175/1 196/176/1 -f 197/177/2 198/178/2 199/179/2 200/180/2 -f 200/181/3 193/173/3 196/176/3 197/182/3 -f 194/177/4 199/183/4 198/182/4 195/176/4 -f 197/177/5 196/176/5 195/175/5 198/178/5 -f 200/184/6 199/185/6 194/174/6 193/173/6 -f 201/186/1 202/187/1 203/188/1 204/189/1 -f 205/190/2 206/191/2 207/192/2 208/193/2 -f 208/194/3 201/186/3 204/189/3 205/195/3 -f 202/190/4 207/196/4 206/195/4 203/189/4 -f 205/190/5 204/189/5 203/188/5 206/191/5 -f 208/197/6 207/198/6 202/187/6 201/186/6 -f 209/209/1 210/210/1 211/41/1 212/40/1 -f 213/211/2 214/212/2 215/208/2 216/207/2 -f 216/213/3 209/209/3 212/40/3 213/61/3 -f 210/211/4 215/214/4 214/61/4 211/40/4 -f 213/211/5 212/40/5 211/41/5 214/212/5 -f 216/215/6 215/216/6 210/210/6 209/209/6 -f 217/173/1 218/174/1 219/175/1 220/176/1 -f 221/177/2 222/178/2 223/179/2 224/180/2 -f 224/181/3 217/173/3 220/176/3 221/182/3 -f 218/177/4 223/183/4 222/182/4 219/176/4 -f 221/177/5 220/176/5 219/175/5 222/178/5 -f 224/184/6 223/185/6 218/174/6 217/173/6 -f 225/186/1 226/187/1 227/188/1 228/189/1 -f 229/190/2 230/191/2 231/192/2 232/193/2 -f 232/194/3 225/186/3 228/189/3 229/195/3 -f 226/190/4 231/196/4 230/195/4 227/189/4 -f 229/190/5 228/189/5 227/188/5 230/191/5 -f 232/197/6 231/198/6 226/187/6 225/186/6 -f 233/44/1 234/45/1 235/217/1 236/218/1 -f 237/219/2 238/220/2 239/221/2 240/222/2 -f 240/63/3 233/44/3 236/218/3 237/223/3 -f 234/219/4 239/224/4 238/223/4 235/218/4 -f 237/219/5 236/218/5 235/217/5 238/220/5 -f 240/225/6 239/226/6 234/45/6 233/44/6 -f 241/173/1 242/174/1 243/175/1 244/176/1 -f 245/177/2 246/178/2 247/179/2 248/180/2 -f 248/181/3 241/173/3 244/176/3 245/182/3 -f 242/177/4 247/183/4 246/182/4 243/176/4 -f 245/177/5 244/176/5 243/175/5 246/178/5 -f 248/184/6 247/185/6 242/174/6 241/173/6 -f 249/186/1 250/187/1 251/188/1 252/189/1 -f 253/190/2 254/191/2 255/192/2 256/193/2 -f 256/194/3 249/186/3 252/189/3 253/195/3 -f 250/190/4 255/196/4 254/195/4 251/189/4 -f 253/190/5 252/189/5 251/188/5 254/191/5 -f 256/197/6 255/198/6 250/187/6 249/186/6 -f 257/207/1 258/208/1 259/200/1 260/199/1 -f 261/43/2 262/42/2 263/202/2 264/201/2 -f 264/227/3 257/207/3 260/199/3 261/205/3 -f 258/43/4 263/62/4 262/205/4 259/199/4 -f 261/43/5 260/199/5 259/200/5 262/42/5 -f 264/211/6 263/212/6 258/208/6 257/207/6 -f 265/228/1 266/229/1 267/230/1 268/231/1 -f 269/232/2 270/233/2 271/234/2 272/235/2 -f 272/236/3 265/228/3 268/231/3 269/237/3 -f 266/232/4 271/238/4 270/237/4 267/231/4 -f 269/232/5 268/231/5 267/230/5 270/233/5 -f 272/239/6 271/240/6 266/229/6 265/228/6 -f 273/241/1 274/242/1 275/243/1 276/244/1 -f 277/245/2 278/246/2 279/25/2 280/247/2 -f 280/248/3 273/241/3 276/244/3 277/249/3 -f 274/250/4 279/251/4 278/249/4 275/244/4 -f 277/245/5 276/244/5 275/243/5 278/246/5 -f 280/252/6 279/253/6 274/242/6 273/241/6 -f 281/254/1 282/255/1 283/256/1 284/257/1 -f 285/258/2 286/259/2 287/260/2 288/261/2 -f 288/262/3 281/254/3 284/257/3 285/263/3 -f 282/264/4 287/265/4 286/263/4 283/257/4 -f 285/258/5 284/257/5 283/256/5 286/259/5 -f 288/266/6 287/267/6 282/255/6 281/254/6 -f 289/268/1 290/269/1 291/270/1 292/271/1 -f 293/272/2 294/273/2 295/274/2 296/275/2 -f 296/276/3 289/268/3 292/271/3 293/277/3 -f 290/278/4 295/279/4 294/277/4 291/271/4 -f 293/272/5 292/271/5 291/270/5 294/273/5 -f 296/280/6 295/281/6 290/269/6 289/268/6 -f 297/241/1 298/242/1 299/243/1 300/244/1 -f 301/245/2 302/246/2 303/25/2 304/247/2 -f 304/248/3 297/241/3 300/244/3 301/249/3 -f 298/250/4 303/251/4 302/249/4 299/244/4 -f 301/245/5 300/244/5 299/243/5 302/246/5 -f 304/252/6 303/253/6 298/242/6 297/241/6 -f 305/14/1 306/15/1 307/16/1 308/17/1 -f 309/18/2 310/19/2 311/20/2 312/21/2 -f 312/22/3 305/14/3 308/17/3 309/23/3 -f 306/18/4 311/24/4 310/23/4 307/17/4 -f 309/18/5 308/17/5 307/16/5 310/19/5 -f 312/25/6 311/26/6 306/15/6 305/14/6 -f 313/1/1 314/2/1 315/3/1 316/4/1 -f 317/5/2 318/6/2 319/7/2 320/8/2 -f 320/9/3 313/1/3 316/4/3 317/10/3 -f 314/5/4 319/11/4 318/10/4 315/4/4 -f 317/5/5 316/4/5 315/3/5 318/6/5 -f 320/12/6 319/13/6 314/2/6 313/1/6 -f 321/1/1 322/2/1 323/3/1 324/4/1 -f 325/5/2 326/6/2 327/7/2 328/8/2 -f 328/9/3 321/1/3 324/4/3 325/10/3 -f 322/5/4 327/11/4 326/10/4 323/4/4 -f 325/5/5 324/4/5 323/3/5 326/6/5 -f 328/12/6 327/13/6 322/2/6 321/1/6 -f 329/40/7 330/41/7 331/42/7 332/43/7 -f 333/44/13 334/45/13 335/46/13 336/47/13 -f 336/48/9 329/40/9 332/43/9 333/49/9 -f 330/44/10 335/50/10 334/49/10 331/43/10 -f 333/44/11 332/43/11 331/42/11 334/45/11 -f 336/51/12 335/52/12 330/41/12 329/40/12 -f 337/53/14 338/54/14 339/55/14 340/56/14 -f 341/57/15 342/58/15 343/59/15 344/60/15 -f 344/61/16 337/53/16 340/56/16 341/62/16 -f 338/57/17 343/63/17 342/62/17 339/56/17 -f 341/57/18 340/56/18 339/55/18 342/58/18 -f 344/64/19 343/65/19 338/54/19 337/53/19 -f 345/66/14 346/53/14 347/56/14 348/67/14 -f 349/68/15 350/57/15 351/60/15 352/69/15 -f 352/70/20 345/66/20 348/67/20 349/71/20 -f 346/68/21 351/72/21 350/71/21 347/67/21 -f 349/68/22 348/67/22 347/56/22 350/57/22 -f 352/73/23 351/64/23 346/53/23 345/66/23 -f 353/41/28 354/66/28 355/67/28 356/42/28 -f 357/45/13 358/68/13 359/69/13 360/46/13 -f 360/74/24 353/41/24 356/42/24 357/75/24 -f 354/45/25 359/76/25 358/75/25 355/42/25 -f 357/45/26 356/42/26 355/67/26 358/68/26 -f 360/52/27 359/73/27 354/66/27 353/41/27 -f 361/90/1 362/91/1 363/92/1 364/93/1 -f 365/94/2 366/95/2 367/96/2 368/97/2 -f 368/98/3 361/90/3 364/93/3 365/99/3 -f 362/100/4 367/101/4 366/99/4 363/93/4 -f 365/94/5 364/93/5 363/92/5 366/95/5 -f 368/102/6 367/103/6 362/91/6 361/90/6 -f 369/104/1 370/105/1 371/106/1 372/107/1 -f 373/108/2 374/109/2 375/110/2 376/111/2 -f 376/112/3 369/104/3 372/107/3 373/113/3 -f 370/114/4 375/115/4 374/113/4 371/107/4 -f 373/108/5 372/107/5 371/106/5 374/109/5 -f 376/116/6 375/117/6 370/105/6 369/104/6 -f 377/118/1 378/119/1 379/120/1 380/121/1 -f 381/122/2 382/123/2 383/124/2 384/125/2 -f 384/126/3 377/118/3 380/121/3 381/127/3 -f 378/128/4 383/129/4 382/127/4 379/121/4 -f 381/122/5 380/121/5 379/120/5 382/123/5 -f 384/130/6 383/131/6 378/119/6 377/118/6 -f 385/118/1 386/119/1 387/120/1 388/121/1 -f 389/122/2 390/123/2 391/124/2 392/125/2 -f 392/126/3 385/118/3 388/121/3 389/127/3 -f 386/128/4 391/129/4 390/127/4 387/121/4 -f 389/122/5 388/121/5 387/120/5 390/123/5 -f 392/130/6 391/131/6 386/119/6 385/118/6 -f 393/132/1 394/133/1 395/134/1 396/135/1 -f 397/136/2 398/137/2 399/138/2 400/139/2 -f 400/140/3 393/132/3 396/135/3 397/141/3 -f 394/136/4 399/142/4 398/141/4 395/135/4 -f 397/136/5 396/135/5 395/134/5 398/137/5 -f 400/143/6 399/144/6 394/133/6 393/132/6 -f 401/145/1 402/146/1 403/147/1 404/148/1 -f 405/149/2 406/150/2 407/151/2 408/152/2 -f 408/153/29 401/145/29 404/148/29 405/154/29 -f 402/155/30 407/156/30 406/154/30 403/148/30 -f 405/149/31 404/148/31 403/147/31 406/150/31 -f 408/157/32 407/158/32 402/146/32 401/145/32 -f 409/159/33 410/160/33 411/161/33 412/162/33 -f 413/163/34 414/164/34 415/165/34 416/166/34 -f 416/167/35 409/159/35 412/162/35 413/168/35 -f 410/169/36 415/170/36 414/168/36 411/162/36 -f 413/163/5 412/162/5 411/161/5 414/164/5 -f 416/171/6 415/172/6 410/160/6 409/159/6 -f 417/159/36 418/160/36 419/161/36 420/162/36 -f 421/163/35 422/164/35 423/165/35 424/166/35 -f 424/167/33 417/159/33 420/162/33 421/168/33 -f 418/169/34 423/170/34 422/168/34 419/162/34 -f 421/163/5 420/162/5 419/161/5 422/164/5 -f 424/171/6 423/172/6 418/160/6 417/159/6 -f 425/145/1 426/146/1 427/147/1 428/148/1 -f 429/149/2 430/150/2 431/151/2 432/152/2 -f 432/153/32 425/145/32 428/148/32 429/154/32 -f 426/155/31 431/156/31 430/154/31 427/148/31 -f 429/149/29 428/148/29 427/147/29 430/150/29 -f 432/157/30 431/158/30 426/146/30 425/145/30 -f 433/145/1 434/146/1 435/147/1 436/148/1 -f 437/149/2 438/150/2 439/151/2 440/152/2 -f 440/153/29 433/145/29 436/148/29 437/154/29 -f 434/155/30 439/156/30 438/154/30 435/148/30 -f 437/149/31 436/148/31 435/147/31 438/150/31 -f 440/157/32 439/158/32 434/146/32 433/145/32 -f 441/159/33 442/160/33 443/161/33 444/162/33 -f 445/163/34 446/164/34 447/165/34 448/166/34 -f 448/167/35 441/159/35 444/162/35 445/168/35 -f 442/169/36 447/170/36 446/168/36 443/162/36 -f 445/163/5 444/162/5 443/161/5 446/164/5 -f 448/171/6 447/172/6 442/160/6 441/159/6 -f 449/159/36 450/160/36 451/161/36 452/162/36 -f 453/163/35 454/164/35 455/165/35 456/166/35 -f 456/167/33 449/159/33 452/162/33 453/168/33 -f 450/169/34 455/170/34 454/168/34 451/162/34 -f 453/163/5 452/162/5 451/161/5 454/164/5 -f 456/171/6 455/172/6 450/160/6 449/159/6 -f 457/145/1 458/146/1 459/147/1 460/148/1 -f 461/149/2 462/150/2 463/151/2 464/152/2 -f 464/153/32 457/145/32 460/148/32 461/154/32 -f 458/155/31 463/156/31 462/154/31 459/148/31 -f 461/149/29 460/148/29 459/147/29 462/150/29 -f 464/157/30 463/158/30 458/146/30 457/145/30 -f 465/186/1 466/187/1 467/188/1 468/189/1 -f 469/190/2 470/191/2 471/192/2 472/193/2 -f 472/194/3 465/186/3 468/189/3 469/195/3 -f 466/190/4 471/196/4 470/195/4 467/189/4 -f 469/190/5 468/189/5 467/188/5 470/191/5 -f 472/197/6 471/198/6 466/187/6 465/186/6 -f 473/199/1 474/200/1 475/42/1 476/43/1 -f 477/201/2 478/202/2 479/203/2 480/204/2 -f 480/205/3 473/199/3 476/43/3 477/62/3 -f 474/201/4 479/206/4 478/62/4 475/43/4 -f 477/201/5 476/43/5 475/42/5 478/202/5 -f 480/207/6 479/208/6 474/200/6 473/199/6 -f 481/199/1 482/200/1 483/42/1 484/43/1 -f 485/201/2 486/202/2 487/203/2 488/204/2 -f 488/205/3 481/199/3 484/43/3 485/62/3 -f 482/201/4 487/206/4 486/62/4 483/43/4 -f 485/201/5 484/43/5 483/42/5 486/202/5 -f 488/207/6 487/208/6 482/200/6 481/199/6 -f 489/186/1 490/187/1 491/188/1 492/189/1 -f 493/190/2 494/191/2 495/192/2 496/193/2 -f 496/194/3 489/186/3 492/189/3 493/195/3 -f 490/190/4 495/196/4 494/195/4 491/189/4 -f 493/190/5 492/189/5 491/188/5 494/191/5 -f 496/197/6 495/198/6 490/187/6 489/186/6 -f 497/209/1 498/210/1 499/41/1 500/40/1 -f 501/211/2 502/212/2 503/208/2 504/207/2 -f 504/213/3 497/209/3 500/40/3 501/61/3 -f 498/211/4 503/214/4 502/61/4 499/40/4 -f 501/211/5 500/40/5 499/41/5 502/212/5 -f 504/215/6 503/216/6 498/210/6 497/209/6 -f 505/209/1 506/210/1 507/41/1 508/40/1 -f 509/211/2 510/212/2 511/208/2 512/207/2 -f 512/213/3 505/209/3 508/40/3 509/61/3 -f 506/211/4 511/214/4 510/61/4 507/40/4 -f 509/211/5 508/40/5 507/41/5 510/212/5 -f 512/215/6 511/216/6 506/210/6 505/209/6 -f 513/186/1 514/187/1 515/188/1 516/189/1 -f 517/190/2 518/191/2 519/192/2 520/193/2 -f 520/194/3 513/186/3 516/189/3 517/195/3 -f 514/190/4 519/196/4 518/195/4 515/189/4 -f 517/190/5 516/189/5 515/188/5 518/191/5 -f 520/197/6 519/198/6 514/187/6 513/186/6 -f 521/44/1 522/45/1 523/217/1 524/218/1 -f 525/219/2 526/220/2 527/221/2 528/222/2 -f 528/63/3 521/44/3 524/218/3 525/223/3 -f 522/219/4 527/224/4 526/223/4 523/218/4 -f 525/219/5 524/218/5 523/217/5 526/220/5 -f 528/225/6 527/226/6 522/45/6 521/44/6 -f 529/44/1 530/45/1 531/217/1 532/218/1 -f 533/219/2 534/220/2 535/221/2 536/222/2 -f 536/63/3 529/44/3 532/218/3 533/223/3 -f 530/219/4 535/224/4 534/223/4 531/218/4 -f 533/219/5 532/218/5 531/217/5 534/220/5 -f 536/225/6 535/226/6 530/45/6 529/44/6 -f 537/186/1 538/187/1 539/188/1 540/189/1 -f 541/190/2 542/191/2 543/192/2 544/193/2 -f 544/194/3 537/186/3 540/189/3 541/195/3 -f 538/190/4 543/196/4 542/195/4 539/189/4 -f 541/190/5 540/189/5 539/188/5 542/191/5 -f 544/197/6 543/198/6 538/187/6 537/186/6 -f 545/207/1 546/208/1 547/200/1 548/199/1 -f 549/43/2 550/42/2 551/202/2 552/201/2 -f 552/227/3 545/207/3 548/199/3 549/205/3 -f 546/43/4 551/62/4 550/205/4 547/199/4 -f 549/43/5 548/199/5 547/200/5 550/42/5 -f 552/211/6 551/212/6 546/208/6 545/207/6 -f 553/207/1 554/208/1 555/200/1 556/199/1 -f 557/43/2 558/42/2 559/202/2 560/201/2 -f 560/227/3 553/207/3 556/199/3 557/205/3 -f 554/43/4 559/62/4 558/205/4 555/199/4 -f 557/43/5 556/199/5 555/200/5 558/42/5 -f 560/211/6 559/212/6 554/208/6 553/207/6 -f 561/241/1 562/242/1 563/243/1 564/244/1 -f 565/245/2 566/246/2 567/25/2 568/247/2 -f 568/248/3 561/241/3 564/244/3 565/249/3 -f 562/250/4 567/251/4 566/249/4 563/244/4 -f 565/245/5 564/244/5 563/243/5 566/246/5 -f 568/252/6 567/253/6 562/242/6 561/241/6 -f 569/254/1 570/255/1 571/256/1 572/257/1 -f 573/258/2 574/259/2 575/260/2 576/261/2 -f 576/262/3 569/254/3 572/257/3 573/263/3 -f 570/264/4 575/265/4 574/263/4 571/257/4 -f 573/258/5 572/257/5 571/256/5 574/259/5 -f 576/266/6 575/267/6 570/255/6 569/254/6 -f 577/268/1 578/269/1 579/270/1 580/271/1 -f 581/272/2 582/273/2 583/274/2 584/275/2 -f 584/276/3 577/268/3 580/271/3 581/277/3 -f 578/278/4 583/279/4 582/277/4 579/271/4 -f 581/272/5 580/271/5 579/270/5 582/273/5 -f 584/280/6 583/281/6 578/269/6 577/268/6 -f 585/241/1 586/242/1 587/243/1 588/244/1 -f 589/245/2 590/246/2 591/25/2 592/247/2 -f 592/248/3 585/241/3 588/244/3 589/249/3 -f 586/250/4 591/251/4 590/249/4 587/244/4 -f 589/245/5 588/244/5 587/243/5 590/246/5 -f 592/252/6 591/253/6 586/242/6 585/241/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDemonPylon.obj b/src/main/resources/assets/bloodmagic/models/block/BlockDemonPylon.obj deleted file mode 100644 index 27d28760..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockDemonPylon.obj +++ /dev/null @@ -1,1171 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib BlockDemonPylon.mtl -o BlockDemonPylon -v 0.125000 0.125000 0.875000 -v 0.125000 -0.000000 0.875000 -v 0.375000 -0.000000 0.875000 -v 0.375000 0.125000 0.875000 -v 0.375000 0.125000 0.625000 -v 0.375000 -0.000000 0.625000 -v 0.125000 -0.000000 0.625000 -v 0.125000 0.125000 0.625000 -v 0.193151 0.473851 0.803768 -v 0.151353 0.103509 0.845306 -v 0.337685 0.082741 0.847635 -v 0.379483 0.453082 0.806098 -v 0.379483 0.432183 0.619766 -v 0.337685 0.061842 0.661303 -v 0.151353 0.082610 0.658974 -v 0.193151 0.452952 0.617437 -v 0.625000 0.125000 0.375000 -v 0.625000 0.000000 0.375000 -v 0.875000 0.000000 0.375000 -v 0.875000 0.125000 0.375000 -v 0.875000 0.125000 0.125000 -v 0.875000 0.000000 0.125000 -v 0.625000 0.000000 0.125000 -v 0.625000 0.125000 0.125000 -v 0.620517 0.432206 0.380235 -v 0.662315 0.061873 0.338698 -v 0.848645 0.082641 0.341027 -v 0.806847 0.452974 0.382564 -v 0.806847 0.473873 0.196235 -v 0.848645 0.103540 0.154698 -v 0.662315 0.082772 0.152368 -v 0.620517 0.453105 0.193905 -v 0.125000 0.125000 0.375000 -v 0.125000 0.000000 0.375000 -v 0.375000 0.000000 0.375000 -v 0.375000 0.125000 0.375000 -v 0.375000 0.125000 0.125000 -v 0.375000 0.000000 0.125000 -v 0.125000 0.000000 0.125000 -v 0.125000 0.125000 0.125000 -v 0.193151 0.452963 0.382563 -v 0.151353 0.082626 0.341026 -v 0.337685 0.061857 0.338696 -v 0.379483 0.432194 0.380234 -v 0.379483 0.453093 0.193904 -v 0.337685 0.082756 0.152367 -v 0.151353 0.103525 0.154696 -v 0.193151 0.473862 0.196233 -v 0.625000 0.125000 0.875000 -v 0.625000 -0.000000 0.875000 -v 0.875000 -0.000000 0.875000 -v 0.875000 0.125000 0.875000 -v 0.875000 0.125000 0.625000 -v 0.875000 -0.000000 0.625000 -v 0.625000 -0.000000 0.625000 -v 0.625000 0.125000 0.625000 -v 0.620517 0.453093 0.806096 -v 0.662315 0.082756 0.847633 -v 0.848645 0.103525 0.845304 -v 0.806847 0.473862 0.803767 -v 0.806847 0.452963 0.617435 -v 0.848645 0.082626 0.658972 -v 0.662315 0.061857 0.661302 -v 0.620517 0.432194 0.619765 -v 0.125000 0.500000 0.875000 -v 0.125000 0.437500 0.875000 -v 0.875000 0.437500 0.875000 -v 0.875000 0.500000 0.875000 -v 0.875000 0.500000 0.125000 -v 0.875000 0.437500 0.125000 -v 0.125000 0.437500 0.125000 -v 0.125000 0.500000 0.125000 -v 0.187500 0.562500 0.812500 -v 0.187500 0.500000 0.812500 -v 0.812500 0.500000 0.812500 -v 0.812500 0.562500 0.812500 -v 0.812500 0.562500 0.187500 -v 0.812500 0.500000 0.187500 -v 0.187500 0.500000 0.187500 -v 0.187500 0.562500 0.187500 -v 0.125000 0.625000 0.875000 -v 0.125000 0.562500 0.875000 -v 0.875000 0.562500 0.875000 -v 0.875000 0.625000 0.875000 -v 0.875000 0.625000 0.125000 -v 0.875000 0.562500 0.125000 -v 0.125000 0.562500 0.125000 -v 0.125000 0.625000 0.125000 -v 0.218750 1.062500 0.781250 -v 0.218750 0.625000 0.781250 -v 0.781250 0.625000 0.781250 -v 0.781250 1.062500 0.781250 -v 0.781250 1.062500 0.218750 -v 0.781250 0.625000 0.218750 -v 0.218750 0.625000 0.218750 -v 0.218750 1.062500 0.218750 -v 0.218750 1.093750 0.843750 -v 0.218750 0.718750 0.843750 -v 0.781250 0.718750 0.843750 -v 0.781250 1.093750 0.843750 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.406250 0.968750 0.937500 -v 0.406250 0.843750 0.937500 -v 0.593750 0.843750 0.937500 -v 0.593750 0.968750 0.937500 -v 0.593750 0.968750 0.812500 -v 0.593750 0.843750 0.812500 -v 0.406250 0.843750 0.812500 -v 0.406250 0.968750 0.812500 -v 0.406250 1.156250 1.000000 -v 0.406250 0.906250 1.000000 -v 0.593750 0.906250 1.000000 -v 0.593750 1.156250 1.000000 -v 0.593750 1.156250 0.937500 -v 0.593750 0.906250 0.937500 -v 0.406250 0.906250 0.937500 -v 0.406250 1.156250 0.937500 -v 0.156250 1.093750 0.781250 -v 0.156250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.156250 0.718750 0.218750 -v 0.156250 1.093750 0.218750 -v 0.062500 0.968750 0.593750 -v 0.062500 0.843750 0.593750 -v 0.187500 0.843750 0.593750 -v 0.187500 0.968750 0.593750 -v 0.187500 0.968750 0.406250 -v 0.187500 0.843750 0.406250 -v 0.062500 0.843750 0.406250 -v 0.062500 0.968750 0.406250 -v 0.000000 1.156250 0.593750 -v 0.000000 0.906250 0.593750 -v 0.062500 0.906250 0.593750 -v 0.062500 1.156250 0.593750 -v 0.062500 1.156250 0.406250 -v 0.062500 0.906250 0.406250 -v 0.000000 0.906250 0.406250 -v 0.000000 1.156250 0.406250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.781250 1.093750 0.156250 -v 0.781250 0.718750 0.156250 -v 0.218750 0.718750 0.156250 -v 0.218750 1.093750 0.156250 -v 0.406250 0.968750 0.187500 -v 0.406250 0.843750 0.187500 -v 0.593750 0.843750 0.187500 -v 0.593750 0.968750 0.187500 -v 0.593750 0.968750 0.062500 -v 0.593750 0.843750 0.062500 -v 0.406250 0.843750 0.062500 -v 0.406250 0.968750 0.062500 -v 0.406250 1.156250 0.062500 -v 0.406250 0.906250 0.062500 -v 0.593750 0.906250 0.062500 -v 0.593750 1.156250 0.062500 -v 0.593750 1.156250 0.000000 -v 0.593750 0.906250 0.000000 -v 0.406250 0.906250 0.000000 -v 0.406250 1.156250 0.000000 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.843750 0.718750 0.781250 -v 0.843750 1.093750 0.781250 -v 0.843750 1.093750 0.218750 -v 0.843750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.812500 0.968750 0.593750 -v 0.812500 0.843750 0.593750 -v 0.937500 0.843750 0.593750 -v 0.937500 0.968750 0.593750 -v 0.937500 0.968750 0.406250 -v 0.937500 0.843750 0.406250 -v 0.812500 0.843750 0.406250 -v 0.812500 0.968750 0.406250 -v 0.937500 1.156250 0.593750 -v 0.937500 0.906250 0.593750 -v 1.000000 0.906250 0.593750 -v 1.000000 1.156250 0.593750 -v 1.000000 1.156250 0.406250 -v 1.000000 0.906250 0.406250 -v 0.937500 0.906250 0.406250 -v 0.937500 1.156250 0.406250 -v 0.281250 1.250000 0.718750 -v 0.281250 1.062500 0.718750 -v 0.718750 1.062500 0.718750 -v 0.718750 1.250000 0.718750 -v 0.718750 1.250000 0.281250 -v 0.718750 1.062500 0.281250 -v 0.281250 1.062500 0.281250 -v 0.281250 1.250000 0.281250 -v 0.406250 1.375000 0.593750 -v 0.406250 1.250000 0.593750 -v 0.593750 1.250000 0.593750 -v 0.593750 1.375000 0.593750 -v 0.593750 1.375000 0.406250 -v 0.593750 1.250000 0.406250 -v 0.406250 1.250000 0.406250 -v 0.406250 1.375000 0.406250 -v 0.468750 1.500000 0.531250 -v 0.468750 1.375000 0.531250 -v 0.531250 1.375000 0.531250 -v 0.531250 1.500000 0.531250 -v 0.531250 1.500000 0.468750 -v 0.531250 1.375000 0.468750 -v 0.468750 1.375000 0.468750 -v 0.468750 1.500000 0.468750 -v 0.437500 1.750000 0.562500 -v 0.437500 1.500000 0.562500 -v 0.562500 1.500000 0.562500 -v 0.562500 1.750000 0.562500 -v 0.562500 1.750000 0.437500 -v 0.562500 1.500000 0.437500 -v 0.437500 1.500000 0.437500 -v 0.437500 1.750000 0.437500 -v 0.193151 0.473851 0.803768 -v 0.151353 0.103509 0.845306 -v 0.337685 0.082741 0.847635 -v 0.379483 0.453082 0.806098 -v 0.379483 0.432183 0.619766 -v 0.337685 0.061842 0.661303 -v 0.151353 0.082610 0.658974 -v 0.193151 0.452952 0.617437 -v 0.620517 0.432206 0.380235 -v 0.662315 0.061873 0.338698 -v 0.848645 0.082641 0.341027 -v 0.806847 0.452974 0.382564 -v 0.806847 0.473873 0.196235 -v 0.848645 0.103540 0.154698 -v 0.662315 0.082772 0.152368 -v 0.620517 0.453105 0.193905 -v 0.193151 0.452963 0.382563 -v 0.151353 0.082626 0.341026 -v 0.337685 0.061857 0.338696 -v 0.379483 0.432194 0.380234 -v 0.379483 0.453093 0.193904 -v 0.337685 0.082756 0.152367 -v 0.151353 0.103525 0.154696 -v 0.193151 0.473862 0.196233 -v 0.620517 0.453093 0.806096 -v 0.662315 0.082756 0.847633 -v 0.848645 0.103525 0.845304 -v 0.806847 0.473862 0.803767 -v 0.806847 0.452963 0.617435 -v 0.848645 0.082626 0.658972 -v 0.662315 0.061857 0.661302 -v 0.620517 0.432194 0.619765 -v 0.218750 1.093750 0.843750 -v 0.218750 0.718750 0.843750 -v 0.781250 0.718750 0.843750 -v 0.781250 1.093750 0.843750 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.406250 0.968750 0.937500 -v 0.406250 0.843750 0.937500 -v 0.593750 0.843750 0.937500 -v 0.593750 0.968750 0.937500 -v 0.593750 0.968750 0.812500 -v 0.593750 0.843750 0.812500 -v 0.406250 0.843750 0.812500 -v 0.406250 0.968750 0.812500 -v 0.406250 1.156250 1.000000 -v 0.406250 0.906250 1.000000 -v 0.593750 0.906250 1.000000 -v 0.593750 1.156250 1.000000 -v 0.593750 1.156250 0.937500 -v 0.593750 0.906250 0.937500 -v 0.406250 0.906250 0.937500 -v 0.406250 1.156250 0.937500 -v 0.156250 1.093750 0.781250 -v 0.156250 0.718750 0.781250 -v 0.218750 0.718750 0.781250 -v 0.218750 1.093750 0.781250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.156250 0.718750 0.218750 -v 0.156250 1.093750 0.218750 -v 0.062500 0.968750 0.593750 -v 0.062500 0.843750 0.593750 -v 0.187500 0.843750 0.593750 -v 0.187500 0.968750 0.593750 -v 0.187500 0.968750 0.406250 -v 0.187500 0.843750 0.406250 -v 0.062500 0.843750 0.406250 -v 0.062500 0.968750 0.406250 -v 0.000000 1.156250 0.593750 -v 0.000000 0.906250 0.593750 -v 0.062500 0.906250 0.593750 -v 0.062500 1.156250 0.593750 -v 0.062500 1.156250 0.406250 -v 0.062500 0.906250 0.406250 -v 0.000000 0.906250 0.406250 -v 0.000000 1.156250 0.406250 -v 0.218750 1.093750 0.218750 -v 0.218750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.781250 1.093750 0.156250 -v 0.781250 0.718750 0.156250 -v 0.218750 0.718750 0.156250 -v 0.218750 1.093750 0.156250 -v 0.406250 0.968750 0.187500 -v 0.406250 0.843750 0.187500 -v 0.593750 0.843750 0.187500 -v 0.593750 0.968750 0.187500 -v 0.593750 0.968750 0.062500 -v 0.593750 0.843750 0.062500 -v 0.406250 0.843750 0.062500 -v 0.406250 0.968750 0.062500 -v 0.406250 1.156250 0.062500 -v 0.406250 0.906250 0.062500 -v 0.593750 0.906250 0.062500 -v 0.593750 1.156250 0.062500 -v 0.593750 1.156250 0.000000 -v 0.593750 0.906250 0.000000 -v 0.406250 0.906250 0.000000 -v 0.406250 1.156250 0.000000 -v 0.781250 1.093750 0.781250 -v 0.781250 0.718750 0.781250 -v 0.843750 0.718750 0.781250 -v 0.843750 1.093750 0.781250 -v 0.843750 1.093750 0.218750 -v 0.843750 0.718750 0.218750 -v 0.781250 0.718750 0.218750 -v 0.781250 1.093750 0.218750 -v 0.812500 0.968750 0.593750 -v 0.812500 0.843750 0.593750 -v 0.937500 0.843750 0.593750 -v 0.937500 0.968750 0.593750 -v 0.937500 0.968750 0.406250 -v 0.937500 0.843750 0.406250 -v 0.812500 0.843750 0.406250 -v 0.812500 0.968750 0.406250 -v 0.937500 1.156250 0.593750 -v 0.937500 0.906250 0.593750 -v 1.000000 0.906250 0.593750 -v 1.000000 1.156250 0.593750 -v 1.000000 1.156250 0.406250 -v 1.000000 0.906250 0.406250 -v 0.937500 0.906250 0.406250 -v 0.937500 1.156250 0.406250 -v 0.281250 1.250000 0.718750 -v 0.281250 1.062500 0.718750 -v 0.718750 1.062500 0.718750 -v 0.718750 1.250000 0.718750 -v 0.718750 1.250000 0.281250 -v 0.718750 1.062500 0.281250 -v 0.281250 1.062500 0.281250 -v 0.281250 1.250000 0.281250 -v 0.406250 1.375000 0.593750 -v 0.406250 1.250000 0.593750 -v 0.593750 1.250000 0.593750 -v 0.593750 1.375000 0.593750 -v 0.593750 1.375000 0.406250 -v 0.593750 1.250000 0.406250 -v 0.406250 1.250000 0.406250 -v 0.406250 1.375000 0.406250 -v 0.468750 1.500000 0.531250 -v 0.468750 1.375000 0.531250 -v 0.531250 1.375000 0.531250 -v 0.531250 1.500000 0.531250 -v 0.531250 1.500000 0.468750 -v 0.531250 1.375000 0.468750 -v 0.468750 1.375000 0.468750 -v 0.468750 1.500000 0.468750 -v 0.437500 1.750000 0.562500 -v 0.437500 1.500000 0.562500 -v 0.562500 1.500000 0.562500 -v 0.562500 1.750000 0.562500 -v 0.562500 1.750000 0.437500 -v 0.562500 1.500000 0.437500 -v 0.437500 1.500000 0.437500 -v 0.437500 1.750000 0.437500 -v 0.406250 0.968750 0.937500 -v 0.406250 0.843750 0.937500 -v 0.593750 0.843750 0.937500 -v 0.593750 0.968750 0.937500 -v 0.593750 0.968750 0.812500 -v 0.593750 0.843750 0.812500 -v 0.406250 0.843750 0.812500 -v 0.406250 0.968750 0.812500 -v 0.406250 1.156250 1.000000 -v 0.406250 0.906250 1.000000 -v 0.593750 0.906250 1.000000 -v 0.593750 1.156250 1.000000 -v 0.593750 1.156250 0.937500 -v 0.593750 0.906250 0.937500 -v 0.406250 0.906250 0.937500 -v 0.406250 1.156250 0.937500 -v 0.406250 1.156250 1.000000 -v 0.406250 0.906250 1.000000 -v 0.593750 0.906250 1.000000 -v 0.593750 1.156250 1.000000 -v 0.593750 1.156250 0.937500 -v 0.593750 0.906250 0.937500 -v 0.406250 0.906250 0.937500 -v 0.406250 1.156250 0.937500 -v 0.062500 0.968750 0.593750 -v 0.062500 0.843750 0.593750 -v 0.187500 0.843750 0.593750 -v 0.187500 0.968750 0.593750 -v 0.187500 0.968750 0.406250 -v 0.187500 0.843750 0.406250 -v 0.062500 0.843750 0.406250 -v 0.062500 0.968750 0.406250 -v 0.000000 1.156250 0.593750 -v 0.000000 0.906250 0.593750 -v 0.062500 0.906250 0.593750 -v 0.062500 1.156250 0.593750 -v 0.062500 1.156250 0.406250 -v 0.062500 0.906250 0.406250 -v 0.000000 0.906250 0.406250 -v 0.000000 1.156250 0.406250 -v 0.000000 1.156250 0.593750 -v 0.000000 0.906250 0.593750 -v 0.062500 0.906250 0.593750 -v 0.062500 1.156250 0.593750 -v 0.062500 1.156250 0.406250 -v 0.062500 0.906250 0.406250 -v 0.000000 0.906250 0.406250 -v 0.000000 1.156250 0.406250 -v 0.406250 0.968750 0.187500 -v 0.406250 0.843750 0.187500 -v 0.593750 0.843750 0.187500 -v 0.593750 0.968750 0.187500 -v 0.593750 0.968750 0.062500 -v 0.593750 0.843750 0.062500 -v 0.406250 0.843750 0.062500 -v 0.406250 0.968750 0.062500 -v 0.406250 1.156250 0.062500 -v 0.406250 0.906250 0.062500 -v 0.593750 0.906250 0.062500 -v 0.593750 1.156250 0.062500 -v 0.593750 1.156250 0.000000 -v 0.593750 0.906250 0.000000 -v 0.406250 0.906250 0.000000 -v 0.406250 1.156250 0.000000 -v 0.406250 1.156250 0.062500 -v 0.406250 0.906250 0.062500 -v 0.593750 0.906250 0.062500 -v 0.593750 1.156250 0.062500 -v 0.593750 1.156250 0.000000 -v 0.593750 0.906250 0.000000 -v 0.406250 0.906250 0.000000 -v 0.406250 1.156250 0.000000 -v 0.812500 0.968750 0.593750 -v 0.812500 0.843750 0.593750 -v 0.937500 0.843750 0.593750 -v 0.937500 0.968750 0.593750 -v 0.937500 0.968750 0.406250 -v 0.937500 0.843750 0.406250 -v 0.812500 0.843750 0.406250 -v 0.812500 0.968750 0.406250 -v 0.937500 1.156250 0.593750 -v 0.937500 0.906250 0.593750 -v 1.000000 0.906250 0.593750 -v 1.000000 1.156250 0.593750 -v 1.000000 1.156250 0.406250 -v 1.000000 0.906250 0.406250 -v 0.937500 0.906250 0.406250 -v 0.937500 1.156250 0.406250 -v 0.937500 1.156250 0.593750 -v 0.937500 0.906250 0.593750 -v 1.000000 0.906250 0.593750 -v 1.000000 1.156250 0.593750 -v 1.000000 1.156250 0.406250 -v 1.000000 0.906250 0.406250 -v 0.937500 0.906250 0.406250 -v 0.937500 1.156250 0.406250 -v 0.406250 1.375000 0.593750 -v 0.406250 1.250000 0.593750 -v 0.593750 1.250000 0.593750 -v 0.593750 1.375000 0.593750 -v 0.593750 1.375000 0.406250 -v 0.593750 1.250000 0.406250 -v 0.406250 1.250000 0.406250 -v 0.406250 1.375000 0.406250 -v 0.468750 1.500000 0.531250 -v 0.468750 1.375000 0.531250 -v 0.531250 1.375000 0.531250 -v 0.531250 1.500000 0.531250 -v 0.531250 1.500000 0.468750 -v 0.531250 1.375000 0.468750 -v 0.468750 1.375000 0.468750 -v 0.468750 1.500000 0.468750 -v 0.437500 1.750000 0.562500 -v 0.437500 1.500000 0.562500 -v 0.562500 1.500000 0.562500 -v 0.562500 1.750000 0.562500 -v 0.562500 1.750000 0.437500 -v 0.562500 1.500000 0.437500 -v 0.437500 1.500000 0.437500 -v 0.437500 1.750000 0.437500 -v 0.468750 1.500000 0.531250 -v 0.468750 1.375000 0.531250 -v 0.531250 1.375000 0.531250 -v 0.531250 1.500000 0.531250 -v 0.531250 1.500000 0.468750 -v 0.531250 1.375000 0.468750 -v 0.468750 1.375000 0.468750 -v 0.468750 1.500000 0.468750 -v 0.437500 1.750000 0.562500 -v 0.437500 1.500000 0.562500 -v 0.562500 1.500000 0.562500 -v 0.562500 1.750000 0.562500 -v 0.562500 1.750000 0.437500 -v 0.562500 1.500000 0.437500 -v 0.437500 1.500000 0.437500 -v 0.437500 1.750000 0.437500 -v 0.437500 1.750000 0.562500 -v 0.437500 1.500000 0.562500 -v 0.562500 1.500000 0.562500 -v 0.562500 1.750000 0.562500 -v 0.562500 1.750000 0.437500 -v 0.562500 1.500000 0.437500 -v 0.437500 1.500000 0.437500 -v 0.437500 1.750000 0.437500 -vt 0.062500 0.937500 -vt 0.062500 0.906250 -vt 0.125000 0.906250 -vt 0.125000 0.937500 -vt 0.187500 0.937500 -vt 0.187500 0.906250 -vt 0.250000 0.906250 -vt 0.250000 0.937500 -vt 0.062500 1.000000 -vt 0.125000 1.000000 -vt 0.187500 1.000000 -vt 0.000000 0.937500 -vt 0.000000 0.906250 -vt 0.046875 0.843750 -vt 0.046875 0.750000 -vt 0.093750 0.750000 -vt 0.093750 0.843750 -vt 0.140625 0.843750 -vt 0.140625 0.750000 -vt 0.187500 0.750000 -vt 0.187500 0.843750 -vt 0.046875 0.890625 -vt 0.093750 0.890625 -vt 0.140625 0.890625 -vt 0.000000 0.843750 -vt 0.000000 0.750000 -vt 0.437500 0.015625 -vt 0.437500 0.000000 -vt 0.625000 0.000000 -vt 0.625000 0.015625 -vt 0.812500 0.015625 -vt 0.812500 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.015625 -vt 0.437500 0.203125 -vt 0.625000 0.203125 -vt 0.812500 0.203125 -vt 0.250000 0.015625 -vt 0.250000 0.000000 -vt 0.531250 0.234375 -vt 0.531250 0.218750 -vt 0.687500 0.218750 -vt 0.687500 0.234375 -vt 0.843750 0.234375 -vt 0.843750 0.218750 -vt 1.000000 0.218750 -vt 1.000000 0.234375 -vt 0.531250 0.390625 -vt 0.687500 0.390625 -vt 0.843750 0.390625 -vt 0.375000 0.234375 -vt 0.375000 0.218750 -vt 0.578125 0.531250 -vt 0.578125 0.421875 -vt 0.718750 0.421875 -vt 0.718750 0.531250 -vt 0.859375 0.531250 -vt 0.859375 0.421875 -vt 1.000000 0.421875 -vt 1.000000 0.531250 -vt 0.578125 0.671875 -vt 0.718750 0.671875 -vt 0.859375 0.671875 -vt 0.437500 0.531250 -vt 0.437500 0.421875 -vt 0.703125 0.984375 -vt 0.703125 0.890625 -vt 0.843750 0.890625 -vt 0.843750 0.984375 -vt 0.859375 0.984375 -vt 0.859375 0.890625 -vt 1.000000 0.890625 -vt 1.000000 0.984375 -vt 0.703125 1.000000 -vt 0.843750 1.000000 -vt 0.984375 0.984375 -vt 0.984375 1.000000 -vt 0.687500 0.984375 -vt 0.687500 0.890625 -vt 0.734375 0.843750 -vt 0.734375 0.812500 -vt 0.781250 0.812500 -vt 0.781250 0.843750 -vt 0.812500 0.843750 -vt 0.812500 0.812500 -vt 0.859375 0.812500 -vt 0.859375 0.843750 -vt 0.734375 0.875000 -vt 0.781250 0.875000 -vt 0.828125 0.843750 -vt 0.828125 0.875000 -vt 0.703125 0.843750 -vt 0.703125 0.812500 -vt 0.890625 0.859375 -vt 0.890625 0.796875 -vt 0.937500 0.796875 -vt 0.937500 0.859375 -vt 0.953125 0.859375 -vt 0.953125 0.796875 -vt 1.000000 0.796875 -vt 1.000000 0.859375 -vt 0.890625 0.875000 -vt 0.937500 0.875000 -vt 0.984375 0.859375 -vt 0.984375 0.875000 -vt 0.875000 0.859375 -vt 0.875000 0.796875 -vt 0.140625 0.593750 -vt 0.140625 0.500000 -vt 0.156250 0.500000 -vt 0.156250 0.593750 -vt 0.296875 0.593750 -vt 0.296875 0.500000 -vt 0.312500 0.500000 -vt 0.312500 0.593750 -vt 0.140625 0.734375 -vt 0.156250 0.734375 -vt 0.171875 0.593750 -vt 0.171875 0.734375 -vt 0.000000 0.593750 -vt 0.000000 0.500000 -vt 0.421875 0.828125 -vt 0.421875 0.796875 -vt 0.453125 0.796875 -vt 0.453125 0.828125 -vt 0.500000 0.828125 -vt 0.500000 0.796875 -vt 0.531250 0.796875 -vt 0.531250 0.828125 -vt 0.421875 0.875000 -vt 0.453125 0.875000 -vt 0.484375 0.828125 -vt 0.484375 0.875000 -vt 0.375000 0.828125 -vt 0.375000 0.796875 -vt 0.593750 0.828125 -vt 0.593750 0.765625 -vt 0.609375 0.765625 -vt 0.609375 0.828125 -vt 0.656250 0.828125 -vt 0.656250 0.765625 -vt 0.671875 0.765625 -vt 0.671875 0.828125 -vt 0.593750 0.875000 -vt 0.609375 0.875000 -vt 0.625000 0.828125 -vt 0.625000 0.875000 -vt 0.546875 0.828125 -vt 0.546875 0.765625 -vt 0.375000 0.984375 -vt 0.375000 0.890625 -vt 0.515625 0.890625 -vt 0.515625 0.984375 -vt 0.531250 0.984375 -vt 0.531250 0.890625 -vt 0.671875 0.890625 -vt 0.671875 0.984375 -vt 0.375000 1.000000 -vt 0.515625 1.000000 -vt 0.656250 0.984375 -vt 0.656250 1.000000 -vt 0.359375 0.984375 -vt 0.359375 0.890625 -vt 0.109375 0.375000 -vt 0.109375 0.328125 -vt 0.218750 0.328125 -vt 0.218750 0.375000 -vt 0.328125 0.375000 -vt 0.328125 0.328125 -vt 0.437500 0.328125 -vt 0.437500 0.375000 -vt 0.109375 0.484375 -vt 0.218750 0.484375 -vt 0.328125 0.484375 -vt 0.000000 0.375000 -vt 0.000000 0.328125 -vt 0.046875 0.203125 -vt 0.046875 0.171875 -vt 0.093750 0.171875 -vt 0.093750 0.203125 -vt 0.140625 0.203125 -vt 0.140625 0.171875 -vt 0.187500 0.171875 -vt 0.187500 0.203125 -vt 0.046875 0.250000 -vt 0.093750 0.250000 -vt 0.140625 0.250000 -vt 0.000000 0.203125 -vt 0.000000 0.171875 -vt 0.015625 0.140625 -vt 0.015625 0.109375 -vt 0.031250 0.109375 -vt 0.031250 0.140625 -vt 0.046875 0.140625 -vt 0.046875 0.109375 -vt 0.062500 0.109375 -vt 0.062500 0.140625 -vt 0.015625 0.156250 -vt 0.031250 0.156250 -vt 0.046875 0.156250 -vt 0.000000 0.140625 -vt 0.000000 0.109375 -vt 0.031250 0.062500 -vt 0.031250 0.000000 -vt 0.062500 0.000000 -vt 0.062500 0.062500 -vt 0.093750 0.062500 -vt 0.093750 0.000000 -vt 0.125000 0.000000 -vt 0.125000 0.062500 -vt 0.031250 0.093750 -vt 0.062500 0.093750 -vt 0.093750 0.093750 -vt 0.000000 0.062500 -vt 0.000000 0.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -vn -0.000000 0.111500 0.993800 -vn -0.000000 -0.111500 -0.993800 -vn 0.111500 0.987600 -0.110800 -vn -0.111500 -0.987600 0.110800 -vn 0.993800 -0.110800 0.012400 -vn -0.993800 0.110800 -0.012400 -vn 0.000000 -0.111500 0.993800 -vn 0.000000 0.111500 -0.993800 -vn -0.111500 0.987600 0.110800 -vn 0.111500 -0.987600 -0.110800 -vn 0.993800 0.110800 0.012400 -vn -0.993800 -0.110800 -0.012400 -vn 0.111500 0.987600 0.110800 -vn -0.111500 -0.987600 -0.110800 -vn 0.993800 -0.110800 -0.012400 -vn -0.993800 0.110800 0.012400 -vn -0.111500 0.987600 -0.110800 -vn 0.111500 -0.987600 0.110800 -vn 0.993800 0.110800 -0.012400 -vn -0.993800 -0.110800 0.012400 -usemtl None -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 8/9/3 1/1/3 4/4/3 5/10/3 -f 2/5/4 7/11/4 6/10/4 3/4/4 -f 5/5/5 4/4/5 3/3/5 6/6/5 -f 8/12/6 7/13/6 2/2/6 1/1/6 -f 9/14/7 10/15/7 11/16/7 12/17/7 -f 13/18/8 14/19/8 15/20/8 16/21/8 -f 16/22/9 9/14/9 12/17/9 13/23/9 -f 10/18/10 15/24/10 14/23/10 11/17/10 -f 13/18/11 12/17/11 11/16/11 14/19/11 -f 16/25/12 15/26/12 10/15/12 9/14/12 -f 17/1/1 18/2/1 19/3/1 20/4/1 -f 21/5/2 22/6/2 23/7/2 24/8/2 -f 24/9/3 17/1/3 20/4/3 21/10/3 -f 18/5/4 23/11/4 22/10/4 19/4/4 -f 21/5/5 20/4/5 19/3/5 22/6/5 -f 24/12/6 23/13/6 18/2/6 17/1/6 -f 25/14/13 26/15/13 27/16/13 28/17/13 -f 29/18/14 30/19/14 31/20/14 32/21/14 -f 32/22/15 25/14/15 28/17/15 29/23/15 -f 26/18/16 31/24/16 30/23/16 27/17/16 -f 29/18/17 28/17/17 27/16/17 30/19/17 -f 32/25/18 31/26/18 26/15/18 25/14/18 -f 33/1/1 34/2/1 35/3/1 36/4/1 -f 37/5/2 38/6/2 39/7/2 40/8/2 -f 40/9/3 33/1/3 36/4/3 37/10/3 -f 34/5/4 39/11/4 38/10/4 35/4/4 -f 37/5/5 36/4/5 35/3/5 38/6/5 -f 40/12/6 39/13/6 34/2/6 33/1/6 -f 41/14/13 42/15/13 43/16/13 44/17/13 -f 45/18/14 46/19/14 47/20/14 48/21/14 -f 48/22/19 41/14/19 44/17/19 45/23/19 -f 42/18/20 47/24/20 46/23/20 43/17/20 -f 45/18/21 44/17/21 43/16/21 46/19/21 -f 48/25/22 47/26/22 42/15/22 41/14/22 -f 49/1/1 50/2/1 51/3/1 52/4/1 -f 53/5/2 54/6/2 55/7/2 56/8/2 -f 56/9/3 49/1/3 52/4/3 53/10/3 -f 50/5/4 55/11/4 54/10/4 51/4/4 -f 53/5/5 52/4/5 51/3/5 54/6/5 -f 56/12/6 55/13/6 50/2/6 49/1/6 -f 57/14/7 58/15/7 59/16/7 60/17/7 -f 61/18/8 62/19/8 63/20/8 64/21/8 -f 64/22/23 57/14/23 60/17/23 61/23/23 -f 58/18/24 63/24/24 62/23/24 59/17/24 -f 61/18/25 60/17/25 59/16/25 62/19/25 -f 64/25/26 63/26/26 58/15/26 57/14/26 -f 65/27/1 66/28/1 67/29/1 68/30/1 -f 69/31/2 70/32/2 71/33/2 72/34/2 -f 72/35/3 65/27/3 68/30/3 69/36/3 -f 66/31/4 71/37/4 70/36/4 67/30/4 -f 69/31/5 68/30/5 67/29/5 70/32/5 -f 72/38/6 71/39/6 66/28/6 65/27/6 -f 73/40/1 74/41/1 75/42/1 76/43/1 -f 77/44/2 78/45/2 79/46/2 80/47/2 -f 80/48/3 73/40/3 76/43/3 77/49/3 -f 74/44/4 79/50/4 78/49/4 75/43/4 -f 77/44/5 76/43/5 75/42/5 78/45/5 -f 80/51/6 79/52/6 74/41/6 73/40/6 -f 81/27/1 82/28/1 83/29/1 84/30/1 -f 85/31/2 86/32/2 87/33/2 88/34/2 -f 88/35/3 81/27/3 84/30/3 85/36/3 -f 82/31/4 87/37/4 86/36/4 83/30/4 -f 85/31/5 84/30/5 83/29/5 86/32/5 -f 88/38/6 87/39/6 82/28/6 81/27/6 -f 89/53/1 90/54/1 91/55/1 92/56/1 -f 93/57/2 94/58/2 95/59/2 96/60/2 -f 96/61/3 89/53/3 92/56/3 93/62/3 -f 90/57/4 95/63/4 94/62/4 91/56/4 -f 93/57/5 92/56/5 91/55/5 94/58/5 -f 96/64/6 95/65/6 90/54/6 89/53/6 -f 97/66/1 98/67/1 99/68/1 100/69/1 -f 101/70/2 102/71/2 103/72/2 104/73/2 -f 104/74/3 97/66/3 100/69/3 101/75/3 -f 98/76/4 103/77/4 102/75/4 99/69/4 -f 101/70/5 100/69/5 99/68/5 102/71/5 -f 104/78/6 103/79/6 98/67/6 97/66/6 -f 105/80/1 106/81/1 107/82/1 108/83/1 -f 109/84/2 110/85/2 111/86/2 112/87/2 -f 112/88/3 105/80/3 108/83/3 109/89/3 -f 106/90/4 111/91/4 110/89/4 107/83/4 -f 109/84/5 108/83/5 107/82/5 110/85/5 -f 112/92/6 111/93/6 106/81/6 105/80/6 -f 113/94/1 114/95/1 115/96/1 116/97/1 -f 117/98/2 118/99/2 119/100/2 120/101/2 -f 120/102/3 113/94/3 116/97/3 117/103/3 -f 114/104/4 119/105/4 118/103/4 115/97/4 -f 117/98/5 116/97/5 115/96/5 118/99/5 -f 120/106/6 119/107/6 114/95/6 113/94/6 -f 121/108/1 122/109/1 123/110/1 124/111/1 -f 125/112/2 126/113/2 127/114/2 128/115/2 -f 128/116/3 121/108/3 124/111/3 125/117/3 -f 122/118/4 127/119/4 126/117/4 123/111/4 -f 125/112/5 124/111/5 123/110/5 126/113/5 -f 128/120/6 127/121/6 122/109/6 121/108/6 -f 129/122/1 130/123/1 131/124/1 132/125/1 -f 133/126/2 134/127/2 135/128/2 136/129/2 -f 136/130/3 129/122/3 132/125/3 133/131/3 -f 130/132/4 135/133/4 134/131/4 131/125/4 -f 133/126/5 132/125/5 131/124/5 134/127/5 -f 136/134/6 135/135/6 130/123/6 129/122/6 -f 137/136/1 138/137/1 139/138/1 140/139/1 -f 141/140/2 142/141/2 143/142/2 144/143/2 -f 144/144/3 137/136/3 140/139/3 141/145/3 -f 138/146/4 143/147/4 142/145/4 139/139/4 -f 141/140/5 140/139/5 139/138/5 142/141/5 -f 144/148/6 143/149/6 138/137/6 137/136/6 -f 145/150/1 146/151/1 147/152/1 148/153/1 -f 149/154/2 150/155/2 151/156/2 152/157/2 -f 152/158/3 145/150/3 148/153/3 149/159/3 -f 146/160/4 151/161/4 150/159/4 147/153/4 -f 149/154/5 148/153/5 147/152/5 150/155/5 -f 152/162/6 151/163/6 146/151/6 145/150/6 -f 153/80/1 154/81/1 155/82/1 156/83/1 -f 157/84/2 158/85/2 159/86/2 160/87/2 -f 160/88/3 153/80/3 156/83/3 157/89/3 -f 154/90/4 159/91/4 158/89/4 155/83/4 -f 157/84/5 156/83/5 155/82/5 158/85/5 -f 160/92/6 159/93/6 154/81/6 153/80/6 -f 161/94/1 162/95/1 163/96/1 164/97/1 -f 165/98/2 166/99/2 167/100/2 168/101/2 -f 168/102/3 161/94/3 164/97/3 165/103/3 -f 162/104/4 167/105/4 166/103/4 163/97/4 -f 165/98/5 164/97/5 163/96/5 166/99/5 -f 168/106/6 167/107/6 162/95/6 161/94/6 -f 169/108/1 170/109/1 171/110/1 172/111/1 -f 173/112/2 174/113/2 175/114/2 176/115/2 -f 176/116/3 169/108/3 172/111/3 173/117/3 -f 170/118/4 175/119/4 174/117/4 171/111/4 -f 173/112/5 172/111/5 171/110/5 174/113/5 -f 176/120/6 175/121/6 170/109/6 169/108/6 -f 177/122/1 178/123/1 179/124/1 180/125/1 -f 181/126/2 182/127/2 183/128/2 184/129/2 -f 184/130/3 177/122/3 180/125/3 181/131/3 -f 178/132/4 183/133/4 182/131/4 179/125/4 -f 181/126/5 180/125/5 179/124/5 182/127/5 -f 184/134/6 183/135/6 178/123/6 177/122/6 -f 185/136/1 186/137/1 187/138/1 188/139/1 -f 189/140/2 190/141/2 191/142/2 192/143/2 -f 192/144/3 185/136/3 188/139/3 189/145/3 -f 186/146/4 191/147/4 190/145/4 187/139/4 -f 189/140/5 188/139/5 187/138/5 190/141/5 -f 192/148/6 191/149/6 186/137/6 185/136/6 -f 193/164/1 194/165/1 195/166/1 196/167/1 -f 197/168/2 198/169/2 199/170/2 200/171/2 -f 200/172/3 193/164/3 196/167/3 197/173/3 -f 194/168/4 199/174/4 198/173/4 195/167/4 -f 197/168/5 196/167/5 195/166/5 198/169/5 -f 200/175/6 199/176/6 194/165/6 193/164/6 -f 201/177/1 202/178/1 203/179/1 204/180/1 -f 205/181/2 206/182/2 207/183/2 208/184/2 -f 208/185/3 201/177/3 204/180/3 205/186/3 -f 202/181/4 207/187/4 206/186/4 203/180/4 -f 205/181/5 204/180/5 203/179/5 206/182/5 -f 208/188/6 207/189/6 202/178/6 201/177/6 -f 209/190/1 210/191/1 211/192/1 212/193/1 -f 213/194/2 214/195/2 215/196/2 216/197/2 -f 216/198/3 209/190/3 212/193/3 213/199/3 -f 210/194/4 215/200/4 214/199/4 211/193/4 -f 213/194/5 212/193/5 211/192/5 214/195/5 -f 216/201/6 215/202/6 210/191/6 209/190/6 -f 217/203/1 218/204/1 219/205/1 220/206/1 -f 221/207/2 222/208/2 223/209/2 224/210/2 -f 224/211/3 217/203/3 220/206/3 221/212/3 -f 218/207/4 223/213/4 222/212/4 219/206/4 -f 221/207/5 220/206/5 219/205/5 222/208/5 -f 224/214/6 223/215/6 218/204/6 217/203/6 -f 225/14/7 226/15/7 227/16/7 228/17/7 -f 229/18/8 230/19/8 231/20/8 232/21/8 -f 232/22/9 225/14/9 228/17/9 229/23/9 -f 226/18/10 231/24/10 230/23/10 227/17/10 -f 229/18/11 228/17/11 227/16/11 230/19/11 -f 232/25/12 231/26/12 226/15/12 225/14/12 -f 233/14/13 234/15/13 235/16/13 236/17/13 -f 237/18/14 238/19/14 239/20/14 240/21/14 -f 240/22/15 233/14/15 236/17/15 237/23/15 -f 234/18/16 239/24/16 238/23/16 235/17/16 -f 237/18/17 236/17/17 235/16/17 238/19/17 -f 240/25/18 239/26/18 234/15/18 233/14/18 -f 241/14/13 242/15/13 243/16/13 244/17/13 -f 245/18/14 246/19/14 247/20/14 248/21/14 -f 248/22/19 241/14/19 244/17/19 245/23/19 -f 242/18/20 247/24/20 246/23/20 243/17/20 -f 245/18/21 244/17/21 243/16/21 246/19/21 -f 248/25/22 247/26/22 242/15/22 241/14/22 -f 249/14/7 250/15/7 251/16/7 252/17/7 -f 253/18/8 254/19/8 255/20/8 256/21/8 -f 256/22/23 249/14/23 252/17/23 253/23/23 -f 250/18/24 255/24/24 254/23/24 251/17/24 -f 253/18/25 252/17/25 251/16/25 254/19/25 -f 256/25/26 255/26/26 250/15/26 249/14/26 -f 257/66/1 258/67/1 259/68/1 260/69/1 -f 261/70/2 262/71/2 263/72/2 264/73/2 -f 264/74/3 257/66/3 260/69/3 261/75/3 -f 258/76/4 263/77/4 262/75/4 259/69/4 -f 261/70/5 260/69/5 259/68/5 262/71/5 -f 264/78/6 263/79/6 258/67/6 257/66/6 -f 265/80/1 266/81/1 267/82/1 268/83/1 -f 269/84/2 270/85/2 271/86/2 272/87/2 -f 272/88/3 265/80/3 268/83/3 269/89/3 -f 266/90/4 271/91/4 270/89/4 267/83/4 -f 269/84/5 268/83/5 267/82/5 270/85/5 -f 272/92/6 271/93/6 266/81/6 265/80/6 -f 273/94/1 274/95/1 275/96/1 276/97/1 -f 277/98/2 278/99/2 279/100/2 280/101/2 -f 280/102/3 273/94/3 276/97/3 277/103/3 -f 274/104/4 279/105/4 278/103/4 275/97/4 -f 277/98/5 276/97/5 275/96/5 278/99/5 -f 280/106/6 279/107/6 274/95/6 273/94/6 -f 281/108/1 282/109/1 283/110/1 284/111/1 -f 285/112/2 286/113/2 287/114/2 288/115/2 -f 288/116/3 281/108/3 284/111/3 285/117/3 -f 282/118/4 287/119/4 286/117/4 283/111/4 -f 285/112/5 284/111/5 283/110/5 286/113/5 -f 288/120/6 287/121/6 282/109/6 281/108/6 -f 289/122/1 290/123/1 291/124/1 292/125/1 -f 293/126/2 294/127/2 295/128/2 296/129/2 -f 296/130/3 289/122/3 292/125/3 293/131/3 -f 290/132/4 295/133/4 294/131/4 291/125/4 -f 293/126/5 292/125/5 291/124/5 294/127/5 -f 296/134/6 295/135/6 290/123/6 289/122/6 -f 297/136/1 298/137/1 299/138/1 300/139/1 -f 301/140/2 302/141/2 303/142/2 304/143/2 -f 304/144/3 297/136/3 300/139/3 301/145/3 -f 298/146/4 303/147/4 302/145/4 299/139/4 -f 301/140/5 300/139/5 299/138/5 302/141/5 -f 304/148/6 303/149/6 298/137/6 297/136/6 -f 305/150/1 306/151/1 307/152/1 308/153/1 -f 309/154/2 310/155/2 311/156/2 312/157/2 -f 312/158/3 305/150/3 308/153/3 309/159/3 -f 306/160/4 311/161/4 310/159/4 307/153/4 -f 309/154/5 308/153/5 307/152/5 310/155/5 -f 312/162/6 311/163/6 306/151/6 305/150/6 -f 313/80/1 314/81/1 315/82/1 316/83/1 -f 317/84/2 318/85/2 319/86/2 320/87/2 -f 320/88/3 313/80/3 316/83/3 317/89/3 -f 314/90/4 319/91/4 318/89/4 315/83/4 -f 317/84/5 316/83/5 315/82/5 318/85/5 -f 320/92/6 319/93/6 314/81/6 313/80/6 -f 321/94/1 322/95/1 323/96/1 324/97/1 -f 325/98/2 326/99/2 327/100/2 328/101/2 -f 328/102/3 321/94/3 324/97/3 325/103/3 -f 322/104/4 327/105/4 326/103/4 323/97/4 -f 325/98/5 324/97/5 323/96/5 326/99/5 -f 328/106/6 327/107/6 322/95/6 321/94/6 -f 329/108/1 330/109/1 331/110/1 332/111/1 -f 333/112/2 334/113/2 335/114/2 336/115/2 -f 336/116/3 329/108/3 332/111/3 333/117/3 -f 330/118/4 335/119/4 334/117/4 331/111/4 -f 333/112/5 332/111/5 331/110/5 334/113/5 -f 336/120/6 335/121/6 330/109/6 329/108/6 -f 337/122/1 338/123/1 339/124/1 340/125/1 -f 341/126/2 342/127/2 343/128/2 344/129/2 -f 344/130/3 337/122/3 340/125/3 341/131/3 -f 338/132/4 343/133/4 342/131/4 339/125/4 -f 341/126/5 340/125/5 339/124/5 342/127/5 -f 344/134/6 343/135/6 338/123/6 337/122/6 -f 345/136/1 346/137/1 347/138/1 348/139/1 -f 349/140/2 350/141/2 351/142/2 352/143/2 -f 352/144/3 345/136/3 348/139/3 349/145/3 -f 346/146/4 351/147/4 350/145/4 347/139/4 -f 349/140/5 348/139/5 347/138/5 350/141/5 -f 352/148/6 351/149/6 346/137/6 345/136/6 -f 353/164/1 354/165/1 355/166/1 356/167/1 -f 357/168/2 358/169/2 359/170/2 360/171/2 -f 360/172/3 353/164/3 356/167/3 357/173/3 -f 354/168/4 359/174/4 358/173/4 355/167/4 -f 357/168/5 356/167/5 355/166/5 358/169/5 -f 360/175/6 359/176/6 354/165/6 353/164/6 -f 361/177/1 362/178/1 363/179/1 364/180/1 -f 365/181/2 366/182/2 367/183/2 368/184/2 -f 368/185/3 361/177/3 364/180/3 365/186/3 -f 362/181/4 367/187/4 366/186/4 363/180/4 -f 365/181/5 364/180/5 363/179/5 366/182/5 -f 368/188/6 367/189/6 362/178/6 361/177/6 -f 369/190/1 370/191/1 371/192/1 372/193/1 -f 373/194/2 374/195/2 375/196/2 376/197/2 -f 376/198/3 369/190/3 372/193/3 373/199/3 -f 370/194/4 375/200/4 374/199/4 371/193/4 -f 373/194/5 372/193/5 371/192/5 374/195/5 -f 376/201/6 375/202/6 370/191/6 369/190/6 -f 377/203/1 378/204/1 379/205/1 380/206/1 -f 381/207/2 382/208/2 383/209/2 384/210/2 -f 384/211/3 377/203/3 380/206/3 381/212/3 -f 378/207/4 383/213/4 382/212/4 379/206/4 -f 381/207/5 380/206/5 379/205/5 382/208/5 -f 384/214/6 383/215/6 378/204/6 377/203/6 -f 385/80/1 386/81/1 387/82/1 388/83/1 -f 389/84/2 390/85/2 391/86/2 392/87/2 -f 392/88/3 385/80/3 388/83/3 389/89/3 -f 386/90/4 391/91/4 390/89/4 387/83/4 -f 389/84/5 388/83/5 387/82/5 390/85/5 -f 392/92/6 391/93/6 386/81/6 385/80/6 -f 393/94/1 394/95/1 395/96/1 396/97/1 -f 397/98/2 398/99/2 399/100/2 400/101/2 -f 400/102/3 393/94/3 396/97/3 397/103/3 -f 394/104/4 399/105/4 398/103/4 395/97/4 -f 397/98/5 396/97/5 395/96/5 398/99/5 -f 400/106/6 399/107/6 394/95/6 393/94/6 -f 401/94/1 402/95/1 403/96/1 404/97/1 -f 405/98/2 406/99/2 407/100/2 408/101/2 -f 408/102/3 401/94/3 404/97/3 405/103/3 -f 402/104/4 407/105/4 406/103/4 403/97/4 -f 405/98/5 404/97/5 403/96/5 406/99/5 -f 408/106/6 407/107/6 402/95/6 401/94/6 -f 409/122/1 410/123/1 411/124/1 412/125/1 -f 413/126/2 414/127/2 415/128/2 416/129/2 -f 416/130/3 409/122/3 412/125/3 413/131/3 -f 410/132/4 415/133/4 414/131/4 411/125/4 -f 413/126/5 412/125/5 411/124/5 414/127/5 -f 416/134/6 415/135/6 410/123/6 409/122/6 -f 417/136/1 418/137/1 419/138/1 420/139/1 -f 421/140/2 422/141/2 423/142/2 424/143/2 -f 424/144/3 417/136/3 420/139/3 421/145/3 -f 418/146/4 423/147/4 422/145/4 419/139/4 -f 421/140/5 420/139/5 419/138/5 422/141/5 -f 424/148/6 423/149/6 418/137/6 417/136/6 -f 425/136/1 426/137/1 427/138/1 428/139/1 -f 429/140/2 430/141/2 431/142/2 432/143/2 -f 432/144/3 425/136/3 428/139/3 429/145/3 -f 426/146/4 431/147/4 430/145/4 427/139/4 -f 429/140/5 428/139/5 427/138/5 430/141/5 -f 432/148/6 431/149/6 426/137/6 425/136/6 -f 433/80/1 434/81/1 435/82/1 436/83/1 -f 437/84/2 438/85/2 439/86/2 440/87/2 -f 440/88/3 433/80/3 436/83/3 437/89/3 -f 434/90/4 439/91/4 438/89/4 435/83/4 -f 437/84/5 436/83/5 435/82/5 438/85/5 -f 440/92/6 439/93/6 434/81/6 433/80/6 -f 441/94/1 442/95/1 443/96/1 444/97/1 -f 445/98/2 446/99/2 447/100/2 448/101/2 -f 448/102/3 441/94/3 444/97/3 445/103/3 -f 442/104/4 447/105/4 446/103/4 443/97/4 -f 445/98/5 444/97/5 443/96/5 446/99/5 -f 448/106/6 447/107/6 442/95/6 441/94/6 -f 449/94/1 450/95/1 451/96/1 452/97/1 -f 453/98/2 454/99/2 455/100/2 456/101/2 -f 456/102/3 449/94/3 452/97/3 453/103/3 -f 450/104/4 455/105/4 454/103/4 451/97/4 -f 453/98/5 452/97/5 451/96/5 454/99/5 -f 456/106/6 455/107/6 450/95/6 449/94/6 -f 457/122/1 458/123/1 459/124/1 460/125/1 -f 461/126/2 462/127/2 463/128/2 464/129/2 -f 464/130/3 457/122/3 460/125/3 461/131/3 -f 458/132/4 463/133/4 462/131/4 459/125/4 -f 461/126/5 460/125/5 459/124/5 462/127/5 -f 464/134/6 463/135/6 458/123/6 457/122/6 -f 465/136/1 466/137/1 467/138/1 468/139/1 -f 469/140/2 470/141/2 471/142/2 472/143/2 -f 472/144/3 465/136/3 468/139/3 469/145/3 -f 466/146/4 471/147/4 470/145/4 467/139/4 -f 469/140/5 468/139/5 467/138/5 470/141/5 -f 472/148/6 471/149/6 466/137/6 465/136/6 -f 473/136/1 474/137/1 475/138/1 476/139/1 -f 477/140/2 478/141/2 479/142/2 480/143/2 -f 480/144/3 473/136/3 476/139/3 477/145/3 -f 474/146/4 479/147/4 478/145/4 475/139/4 -f 477/140/5 476/139/5 475/138/5 478/141/5 -f 480/148/6 479/149/6 474/137/6 473/136/6 -f 481/177/1 482/178/1 483/179/1 484/180/1 -f 485/181/2 486/182/2 487/183/2 488/184/2 -f 488/185/3 481/177/3 484/180/3 485/186/3 -f 482/181/4 487/187/4 486/186/4 483/180/4 -f 485/181/5 484/180/5 483/179/5 486/182/5 -f 488/188/6 487/189/6 482/178/6 481/177/6 -f 489/190/1 490/191/1 491/192/1 492/193/1 -f 493/194/2 494/195/2 495/196/2 496/197/2 -f 496/198/3 489/190/3 492/193/3 493/199/3 -f 490/194/4 495/200/4 494/199/4 491/193/4 -f 493/194/5 492/193/5 491/192/5 494/195/5 -f 496/201/6 495/202/6 490/191/6 489/190/6 -f 497/203/1 498/204/1 499/205/1 500/206/1 -f 501/207/2 502/208/2 503/209/2 504/210/2 -f 504/211/3 497/203/3 500/206/3 501/212/3 -f 498/207/4 503/213/4 502/212/4 499/206/4 -f 501/207/5 500/206/5 499/205/5 502/208/5 -f 504/214/6 503/215/6 498/204/6 497/203/6 -f 505/190/1 506/191/1 507/192/1 508/193/1 -f 509/194/2 510/195/2 511/196/2 512/197/2 -f 512/198/3 505/190/3 508/193/3 509/199/3 -f 506/194/4 511/200/4 510/199/4 507/193/4 -f 509/194/5 508/193/5 507/192/5 510/195/5 -f 512/201/6 511/202/6 506/191/6 505/190/6 -f 513/203/1 514/204/1 515/205/1 516/206/1 -f 517/207/2 518/208/2 519/209/2 520/210/2 -f 520/211/3 513/203/3 516/206/3 517/212/3 -f 514/207/4 519/213/4 518/212/4 515/206/4 -f 517/207/5 516/206/5 515/205/5 518/208/5 -f 520/214/6 519/215/6 514/204/6 513/203/6 -f 521/203/1 522/204/1 523/205/1 524/206/1 -f 525/207/2 526/208/2 527/209/2 528/210/2 -f 528/211/3 521/203/3 524/206/3 525/212/3 -f 522/207/4 527/213/4 526/212/4 523/206/4 -f 525/207/5 524/206/5 523/205/5 526/208/5 -f 528/214/6 527/215/6 522/204/6 521/203/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockHellfireForge.obj b/src/main/resources/assets/bloodmagic/models/block/BlockHellfireForge.obj deleted file mode 100644 index 1a818a41..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockHellfireForge.obj +++ /dev/null @@ -1,899 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib BlockHellfireForge.mtl -o BlockHellfireForge_(5) -v 0.062500 0.125000 0.937500 -v 0.062500 -0.000000 0.937500 -v 0.312500 -0.000000 0.937500 -v 0.312500 0.125000 0.937500 -v 0.312500 0.125000 0.687500 -v 0.312500 -0.000000 0.687500 -v 0.062500 -0.000000 0.687500 -v 0.062500 0.125000 0.687500 -v 0.134319 0.498760 0.861969 -v 0.093200 0.128268 0.902840 -v 0.279569 0.107833 0.905094 -v 0.320688 0.478324 0.864223 -v 0.320688 0.457765 0.677854 -v 0.279569 0.087273 0.718725 -v 0.093200 0.107709 0.716470 -v 0.134319 0.478200 0.675599 -v 0.687500 0.125000 0.312500 -v 0.687500 0.000000 0.312500 -v 0.937500 0.000000 0.312500 -v 0.937500 0.125000 0.312500 -v 0.937500 0.125000 0.062500 -v 0.937500 0.000000 0.062500 -v 0.687500 0.000000 0.062500 -v 0.687500 0.125000 0.062500 -v 0.679311 0.457787 0.322148 -v 0.720430 0.087304 0.281277 -v 0.906798 0.107739 0.283532 -v 0.865679 0.478222 0.324402 -v 0.865679 0.498782 0.138035 -v 0.906798 0.128299 0.097164 -v 0.720430 0.107863 0.094910 -v 0.679311 0.478347 0.135780 -v 0.062500 0.125000 0.312500 -v 0.062500 0.000000 0.312500 -v 0.312500 0.000000 0.312500 -v 0.312500 0.125000 0.312500 -v 0.312500 0.125000 0.062500 -v 0.312500 0.000000 0.062500 -v 0.062500 0.000000 0.062500 -v 0.062500 0.125000 0.062500 -v 0.134319 0.478211 0.324401 -v 0.093200 0.107724 0.283530 -v 0.279569 0.087289 0.281275 -v 0.320688 0.457776 0.322147 -v 0.320688 0.478335 0.135779 -v 0.279569 0.107848 0.094908 -v 0.093200 0.128283 0.097162 -v 0.134319 0.498771 0.138033 -v 0.687500 0.125000 0.937500 -v 0.687500 -0.000000 0.937500 -v 0.937500 -0.000000 0.937500 -v 0.937500 0.125000 0.937500 -v 0.937500 0.125000 0.687500 -v 0.937500 -0.000000 0.687500 -v 0.687500 -0.000000 0.687500 -v 0.687500 0.125000 0.687500 -v 0.679311 0.478335 0.864222 -v 0.720430 0.107848 0.905092 -v 0.906798 0.128284 0.902838 -v 0.865679 0.498771 0.861968 -v 0.865679 0.478212 0.675598 -v 0.906798 0.107724 0.716469 -v 0.720430 0.087289 0.718723 -v 0.679311 0.457776 0.677853 -v 0.125000 0.687500 0.875000 -v 0.125000 0.312500 0.875000 -v 0.875000 0.312500 0.875000 -v 0.875000 0.687500 0.875000 -v 0.875000 0.687500 0.125000 -v 0.875000 0.312500 0.125000 -v 0.125000 0.312500 0.125000 -v 0.125000 0.687500 0.125000 -v 0.406250 0.750000 0.593750 -v 0.406250 0.687500 0.593750 -v 0.593750 0.687500 0.593750 -v 0.593750 0.750000 0.593750 -v 0.593750 0.750000 0.406250 -v 0.593750 0.687500 0.406250 -v 0.406250 0.687500 0.406250 -v 0.406250 0.750000 0.406250 -v 0.406167 0.749949 0.593750 -v 0.317779 0.661561 0.593750 -v 0.361973 0.617367 0.593750 -v 0.450362 0.705755 0.593750 -v 0.450362 0.705755 0.406250 -v 0.361973 0.617367 0.406250 -v 0.317779 0.661561 0.406250 -v 0.406167 0.749949 0.406250 -v 0.549638 0.705755 0.593750 -v 0.638027 0.617367 0.593750 -v 0.682221 0.661561 0.593750 -v 0.593833 0.749949 0.593750 -v 0.593833 0.749949 0.406250 -v 0.682221 0.661561 0.406250 -v 0.638027 0.617367 0.406250 -v 0.549638 0.705755 0.406250 -v 0.406250 0.749949 0.593832 -v 0.406250 0.661561 0.682221 -v 0.593750 0.661561 0.682221 -v 0.593750 0.749949 0.593832 -v 0.593750 0.705755 0.549638 -v 0.593750 0.617367 0.638027 -v 0.406250 0.617367 0.638027 -v 0.406250 0.705755 0.549638 -v 0.406250 0.705755 0.450625 -v 0.406250 0.617367 0.362236 -v 0.593750 0.617367 0.362236 -v 0.593750 0.705755 0.450625 -v 0.593750 0.749949 0.406431 -v 0.593750 0.661561 0.318042 -v 0.406250 0.661561 0.318042 -v 0.406250 0.749949 0.406431 -v 0.750000 0.750000 0.250000 -v 0.750000 0.687500 0.250000 -v 0.875000 0.687500 0.250000 -v 0.875000 0.750000 0.250000 -v 0.875000 0.750000 0.125000 -v 0.875000 0.687500 0.125000 -v 0.750000 0.687500 0.125000 -v 0.750000 0.750000 0.125000 -v 0.750000 0.750000 0.875000 -v 0.750000 0.687500 0.875000 -v 0.875000 0.687500 0.875000 -v 0.875000 0.750000 0.875000 -v 0.875000 0.750000 0.750000 -v 0.875000 0.687500 0.750000 -v 0.750000 0.687500 0.750000 -v 0.750000 0.750000 0.750000 -v 0.125000 0.750000 0.250000 -v 0.125000 0.687500 0.250000 -v 0.250000 0.687500 0.250000 -v 0.250000 0.750000 0.250000 -v 0.250000 0.750000 0.125000 -v 0.250000 0.687500 0.125000 -v 0.125000 0.687500 0.125000 -v 0.125000 0.750000 0.125000 -v 0.125000 0.750000 0.875000 -v 0.125000 0.687500 0.875000 -v 0.250000 0.687500 0.875000 -v 0.250000 0.750000 0.875000 -v 0.250000 0.750000 0.750000 -v 0.250000 0.687500 0.750000 -v 0.125000 0.687500 0.750000 -v 0.125000 0.750000 0.750000 -v 0.125000 0.750000 0.125000 -v 0.125000 0.375000 0.125000 -v 0.875000 0.375000 0.125000 -v 0.875000 0.750000 0.125000 -v 0.875000 0.750000 0.062500 -v 0.875000 0.375000 0.062500 -v 0.125000 0.375000 0.062500 -v 0.125000 0.750000 0.062500 -v 0.125000 0.750000 0.937500 -v 0.125000 0.375000 0.937500 -v 0.875000 0.375000 0.937500 -v 0.875000 0.750000 0.937500 -v 0.875000 0.750000 0.875000 -v 0.875000 0.375000 0.875000 -v 0.125000 0.375000 0.875000 -v 0.125000 0.750000 0.875000 -v 0.062500 0.750000 0.875000 -v 0.062500 0.375000 0.875000 -v 0.125000 0.375000 0.875000 -v 0.125000 0.750000 0.875000 -v 0.125000 0.750000 0.125000 -v 0.125000 0.375000 0.125000 -v 0.062500 0.375000 0.125000 -v 0.062500 0.750000 0.125000 -v 0.875000 0.750000 0.875000 -v 0.875000 0.375000 0.875000 -v 0.937500 0.375000 0.875000 -v 0.937500 0.750000 0.875000 -v 0.937500 0.750000 0.125000 -v 0.937500 0.375000 0.125000 -v 0.875000 0.375000 0.125000 -v 0.875000 0.750000 0.125000 -v 0.875000 0.875000 1.000000 -v 0.875000 0.687500 1.000000 -v 1.000000 0.687500 1.000000 -v 1.000000 0.875000 1.000000 -v 1.000000 0.875000 0.875000 -v 1.000000 0.687500 0.875000 -v 0.875000 0.687500 0.875000 -v 0.875000 0.875000 0.875000 -v 0.937500 0.968750 1.000000 -v 0.937500 0.906250 1.000000 -v 1.000000 0.906250 1.000000 -v 1.000000 0.968750 1.000000 -v 1.000000 0.968750 0.937500 -v 1.000000 0.906250 0.937500 -v 0.937500 0.906250 0.937500 -v 0.937500 0.968750 0.937500 -v 0.875000 0.875000 0.125000 -v 0.875000 0.687500 0.125000 -v 1.000000 0.687500 0.125000 -v 1.000000 0.875000 0.125000 -v 1.000000 0.875000 0.000000 -v 1.000000 0.687500 0.000000 -v 0.875000 0.687500 0.000000 -v 0.875000 0.875000 0.000000 -v 0.937500 0.968750 0.062500 -v 0.937500 0.906250 0.062500 -v 1.000000 0.906250 0.062500 -v 1.000000 0.968750 0.062500 -v 1.000000 0.968750 0.000000 -v 1.000000 0.906250 0.000000 -v 0.937500 0.906250 0.000000 -v 0.937500 0.968750 0.000000 -v 0.000000 0.875000 1.000000 -v 0.000000 0.687500 1.000000 -v 0.125000 0.687500 1.000000 -v 0.125000 0.875000 1.000000 -v 0.125000 0.875000 0.875000 -v 0.125000 0.687500 0.875000 -v 0.000000 0.687500 0.875000 -v 0.000000 0.875000 0.875000 -v 0.000000 0.968750 1.000000 -v 0.000000 0.906250 1.000000 -v 0.062500 0.906250 1.000000 -v 0.062500 0.968750 1.000000 -v 0.062500 0.968750 0.937500 -v 0.062500 0.906250 0.937500 -v 0.000000 0.906250 0.937500 -v 0.000000 0.968750 0.937500 -v 0.000000 0.875000 0.125000 -v 0.000000 0.687500 0.125000 -v 0.125000 0.687500 0.125000 -v 0.125000 0.875000 0.125000 -v 0.125000 0.875000 0.000000 -v 0.125000 0.687500 0.000000 -v 0.000000 0.687500 0.000000 -v 0.000000 0.875000 0.000000 -v 0.000000 0.968750 0.062500 -v 0.000000 0.906250 0.062500 -v 0.062500 0.906250 0.062500 -v 0.062500 0.968750 0.062500 -v 0.062500 0.968750 0.000000 -v 0.062500 0.906250 0.000000 -v 0.000000 0.906250 0.000000 -v 0.000000 0.968750 0.000000 -v 0.134319 0.498760 0.861969 -v 0.093200 0.128268 0.902840 -v 0.279569 0.107833 0.905094 -v 0.320688 0.478324 0.864223 -v 0.320688 0.457765 0.677854 -v 0.279569 0.087273 0.718725 -v 0.093200 0.107709 0.716470 -v 0.134319 0.478200 0.675599 -v 0.679311 0.457787 0.322148 -v 0.720430 0.087304 0.281277 -v 0.906798 0.107739 0.283532 -v 0.865679 0.478222 0.324402 -v 0.865679 0.498782 0.138035 -v 0.906798 0.128299 0.097164 -v 0.720430 0.107863 0.094910 -v 0.679311 0.478347 0.135780 -v 0.134319 0.478211 0.324401 -v 0.093200 0.107724 0.283530 -v 0.279569 0.087289 0.281275 -v 0.320688 0.457776 0.322147 -v 0.320688 0.478335 0.135779 -v 0.279569 0.107848 0.094908 -v 0.093200 0.128283 0.097162 -v 0.134319 0.498771 0.138033 -v 0.679311 0.478335 0.864222 -v 0.720430 0.107848 0.905092 -v 0.906798 0.128284 0.902838 -v 0.865679 0.498771 0.861968 -v 0.865679 0.478212 0.675598 -v 0.906798 0.107724 0.716469 -v 0.720430 0.087289 0.718723 -v 0.679311 0.457776 0.677853 -v 0.406250 0.750000 0.593750 -v 0.406250 0.687500 0.593750 -v 0.593750 0.687500 0.593750 -v 0.593750 0.750000 0.593750 -v 0.593750 0.750000 0.406250 -v 0.593750 0.687500 0.406250 -v 0.406250 0.687500 0.406250 -v 0.406250 0.750000 0.406250 -v 0.406167 0.749949 0.593750 -v 0.317779 0.661561 0.593750 -v 0.361973 0.617367 0.593750 -v 0.450362 0.705755 0.593750 -v 0.450362 0.705755 0.406250 -v 0.361973 0.617367 0.406250 -v 0.317779 0.661561 0.406250 -v 0.406167 0.749949 0.406250 -v 0.549638 0.705755 0.593750 -v 0.638027 0.617367 0.593750 -v 0.682221 0.661561 0.593750 -v 0.593833 0.749949 0.593750 -v 0.593833 0.749949 0.406250 -v 0.682221 0.661561 0.406250 -v 0.638027 0.617367 0.406250 -v 0.549638 0.705755 0.406250 -v 0.406250 0.749949 0.593832 -v 0.406250 0.661561 0.682221 -v 0.593750 0.661561 0.682221 -v 0.593750 0.749949 0.593832 -v 0.593750 0.705755 0.549638 -v 0.593750 0.617367 0.638027 -v 0.406250 0.617367 0.638027 -v 0.406250 0.705755 0.549638 -v 0.406250 0.705755 0.450625 -v 0.406250 0.617367 0.362236 -v 0.593750 0.617367 0.362236 -v 0.593750 0.705755 0.450625 -v 0.593750 0.749949 0.406431 -v 0.593750 0.661561 0.318042 -v 0.406250 0.661561 0.318042 -v 0.406250 0.749949 0.406431 -v 0.750000 0.750000 0.250000 -v 0.750000 0.687500 0.250000 -v 0.875000 0.687500 0.250000 -v 0.875000 0.750000 0.250000 -v 0.875000 0.750000 0.125000 -v 0.875000 0.687500 0.125000 -v 0.750000 0.687500 0.125000 -v 0.750000 0.750000 0.125000 -v 0.750000 0.750000 0.875000 -v 0.750000 0.687500 0.875000 -v 0.875000 0.687500 0.875000 -v 0.875000 0.750000 0.875000 -v 0.875000 0.750000 0.750000 -v 0.875000 0.687500 0.750000 -v 0.750000 0.687500 0.750000 -v 0.750000 0.750000 0.750000 -v 0.125000 0.750000 0.250000 -v 0.125000 0.687500 0.250000 -v 0.250000 0.687500 0.250000 -v 0.250000 0.750000 0.250000 -v 0.250000 0.750000 0.125000 -v 0.250000 0.687500 0.125000 -v 0.125000 0.687500 0.125000 -v 0.125000 0.750000 0.125000 -v 0.125000 0.750000 0.875000 -v 0.125000 0.687500 0.875000 -v 0.250000 0.687500 0.875000 -v 0.250000 0.750000 0.875000 -v 0.250000 0.750000 0.750000 -v 0.250000 0.687500 0.750000 -v 0.125000 0.687500 0.750000 -v 0.125000 0.750000 0.750000 -v 0.406167 0.749949 0.593750 -v 0.317779 0.661561 0.593750 -v 0.361973 0.617367 0.593750 -v 0.450362 0.705755 0.593750 -v 0.450362 0.705755 0.406250 -v 0.361973 0.617367 0.406250 -v 0.317779 0.661561 0.406250 -v 0.406167 0.749949 0.406250 -v 0.549638 0.705755 0.593750 -v 0.638027 0.617367 0.593750 -v 0.682221 0.661561 0.593750 -v 0.593833 0.749949 0.593750 -v 0.593833 0.749949 0.406250 -v 0.682221 0.661561 0.406250 -v 0.638027 0.617367 0.406250 -v 0.549638 0.705755 0.406250 -v 0.406250 0.749949 0.593832 -v 0.406250 0.661561 0.682221 -v 0.593750 0.661561 0.682221 -v 0.593750 0.749949 0.593832 -v 0.593750 0.705755 0.549638 -v 0.593750 0.617367 0.638027 -v 0.406250 0.617367 0.638027 -v 0.406250 0.705755 0.549638 -v 0.406250 0.705755 0.450625 -v 0.406250 0.617367 0.362236 -v 0.593750 0.617367 0.362236 -v 0.593750 0.705755 0.450625 -v 0.593750 0.749949 0.406431 -v 0.593750 0.661561 0.318042 -v 0.406250 0.661561 0.318042 -v 0.406250 0.749949 0.406431 -v 0.937500 0.968750 1.000000 -v 0.937500 0.906250 1.000000 -v 1.000000 0.906250 1.000000 -v 1.000000 0.968750 1.000000 -v 1.000000 0.968750 0.937500 -v 1.000000 0.906250 0.937500 -v 0.937500 0.906250 0.937500 -v 0.937500 0.968750 0.937500 -v 0.937500 0.968750 0.062500 -v 0.937500 0.906250 0.062500 -v 1.000000 0.906250 0.062500 -v 1.000000 0.968750 0.062500 -v 1.000000 0.968750 0.000000 -v 1.000000 0.906250 0.000000 -v 0.937500 0.906250 0.000000 -v 0.937500 0.968750 0.000000 -v 0.000000 0.968750 1.000000 -v 0.000000 0.906250 1.000000 -v 0.062500 0.906250 1.000000 -v 0.062500 0.968750 1.000000 -v 0.062500 0.968750 0.937500 -v 0.062500 0.906250 0.937500 -v 0.000000 0.906250 0.937500 -v 0.000000 0.968750 0.937500 -v 0.000000 0.968750 0.062500 -v 0.000000 0.906250 0.062500 -v 0.062500 0.906250 0.062500 -v 0.062500 0.968750 0.062500 -v 0.062500 0.968750 0.000000 -v 0.062500 0.906250 0.000000 -v 0.000000 0.906250 0.000000 -v 0.000000 0.968750 0.000000 -vt 0.062500 0.937500 -vt 0.062500 0.906250 -vt 0.125000 0.906250 -vt 0.125000 0.937500 -vt 0.187500 0.937500 -vt 0.187500 0.906250 -vt 0.250000 0.906250 -vt 0.250000 0.937500 -vt 0.062500 1.000000 -vt 0.125000 1.000000 -vt 0.187500 1.000000 -vt 0.000000 0.937500 -vt 0.000000 0.906250 -vt 0.046875 0.843750 -vt 0.046875 0.750000 -vt 0.093750 0.750000 -vt 0.093750 0.843750 -vt 0.140625 0.843750 -vt 0.140625 0.750000 -vt 0.187500 0.750000 -vt 0.187500 0.843750 -vt 0.046875 0.890625 -vt 0.093750 0.890625 -vt 0.140625 0.890625 -vt 0.000000 0.843750 -vt 0.000000 0.750000 -vt 0.437500 0.093750 -vt 0.437500 0.000000 -vt 0.625000 0.000000 -vt 0.625000 0.093750 -vt 0.812500 0.093750 -vt 0.812500 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.093750 -vt 0.437500 0.281250 -vt 0.625000 0.281250 -vt 0.812500 0.281250 -vt 0.250000 0.093750 -vt 0.250000 0.000000 -vt 0.046875 0.593750 -vt 0.046875 0.578125 -vt 0.093750 0.578125 -vt 0.093750 0.593750 -vt 0.140625 0.593750 -vt 0.140625 0.578125 -vt 0.187500 0.578125 -vt 0.187500 0.593750 -vt 0.046875 0.640625 -vt 0.093750 0.640625 -vt 0.140625 0.640625 -vt 0.000000 0.593750 -vt 0.000000 0.578125 -vt 0.250000 0.812500 -vt 0.250000 0.781250 -vt 0.265625 0.781250 -vt 0.265625 0.812500 -vt 0.312500 0.812500 -vt 0.312500 0.781250 -vt 0.328125 0.781250 -vt 0.328125 0.812500 -vt 0.250000 0.859375 -vt 0.265625 0.859375 -vt 0.281250 0.812500 -vt 0.281250 0.859375 -vt 0.203125 0.812500 -vt 0.203125 0.781250 -vt 0.218750 0.750000 -vt 0.218750 0.718750 -vt 0.265625 0.718750 -vt 0.265625 0.750000 -vt 0.281250 0.750000 -vt 0.281250 0.718750 -vt 0.328125 0.718750 -vt 0.328125 0.750000 -vt 0.218750 0.765625 -vt 0.265625 0.765625 -vt 0.312500 0.750000 -vt 0.312500 0.765625 -vt 0.203125 0.750000 -vt 0.203125 0.718750 -vt 0.031250 0.531250 -vt 0.031250 0.515625 -vt 0.062500 0.515625 -vt 0.062500 0.531250 -vt 0.093750 0.531250 -vt 0.093750 0.515625 -vt 0.125000 0.515625 -vt 0.125000 0.531250 -vt 0.031250 0.562500 -vt 0.062500 0.562500 -vt 0.093750 0.562500 -vt 0.000000 0.531250 -vt 0.000000 0.515625 -vt 0.281250 0.984375 -vt 0.281250 0.890625 -vt 0.468750 0.890625 -vt 0.468750 0.984375 -vt 0.484375 0.984375 -vt 0.484375 0.890625 -vt 0.671875 0.890625 -vt 0.671875 0.984375 -vt 0.281250 1.000000 -vt 0.468750 1.000000 -vt 0.656250 0.984375 -vt 0.656250 1.000000 -vt 0.265625 0.984375 -vt 0.265625 0.890625 -vt 0.781250 0.812500 -vt 0.781250 0.718750 -vt 0.796875 0.718750 -vt 0.796875 0.812500 -vt 0.984375 0.812500 -vt 0.984375 0.718750 -vt 1.000000 0.718750 -vt 1.000000 0.812500 -vt 0.781250 1.000000 -vt 0.796875 1.000000 -vt 0.812500 0.812500 -vt 0.812500 1.000000 -vt 0.593750 0.812500 -vt 0.593750 0.718750 -vt 0.031250 0.703125 -vt 0.031250 0.656250 -vt 0.062500 0.656250 -vt 0.062500 0.703125 -vt 0.093750 0.703125 -vt 0.093750 0.656250 -vt 0.125000 0.656250 -vt 0.125000 0.703125 -vt 0.031250 0.734375 -vt 0.062500 0.734375 -vt 0.093750 0.734375 -vt 0.000000 0.703125 -vt 0.000000 0.656250 -vt 0.031250 0.687500 -vt 0.046875 0.687500 -vt 0.046875 0.703125 -vt 0.062500 0.687500 -vt 0.078125 0.687500 -vt 0.078125 0.703125 -vt 0.031250 0.718750 -vt 0.046875 0.718750 -vt 0.062500 0.718750 -vt 0.015625 0.703125 -vt 0.015625 0.687500 -vn 0.000000 0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -vn 0.000000 0.109600 0.994000 -vn 0.000000 -0.109700 -0.994000 -vn 0.109700 0.988000 -0.109000 -vn -0.109700 -0.988000 0.109000 -vn 0.994000 -0.109000 0.012000 -vn -0.994000 0.109000 -0.012000 -vn -0.000000 -0.109700 0.994000 -vn 0.000000 0.109700 -0.994000 -vn -0.109600 0.988000 0.109000 -vn 0.109700 -0.988000 -0.109000 -vn 0.994000 0.109000 0.012000 -vn -0.994000 -0.109000 -0.012000 -vn 0.109700 0.988000 0.109000 -vn -0.109600 -0.988000 -0.109000 -vn 0.994000 -0.109000 -0.012000 -vn -0.994000 0.109000 0.012000 -vn -0.109700 0.988000 -0.109000 -vn 0.109700 -0.988000 0.109000 -vn 0.994000 0.109000 -0.012000 -vn -0.994000 -0.109000 0.012000 -vn 0.707100 0.707100 0.000000 -vn -0.707100 -0.707100 0.000000 -vn 0.707100 -0.707100 0.000000 -vn -0.707100 0.707100 0.000000 -vn 0.000000 0.707100 0.707100 -vn 0.000000 -0.707100 -0.707100 -vn 0.000000 0.707100 -0.707100 -vn 0.000000 -0.707100 0.707100 -usemtl None -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 8/9/3 1/1/3 4/4/3 5/10/3 -f 2/5/4 7/11/4 6/10/4 3/4/4 -f 5/5/5 4/4/5 3/3/5 6/6/5 -f 8/12/6 7/13/6 2/2/6 1/1/6 -f 9/14/7 10/15/7 11/16/7 12/17/7 -f 13/18/8 14/19/8 15/20/8 16/21/8 -f 16/22/9 9/14/9 12/17/9 13/23/9 -f 10/18/10 15/24/10 14/23/10 11/17/10 -f 13/18/11 12/17/11 11/16/11 14/19/11 -f 16/25/12 15/26/12 10/15/12 9/14/12 -f 17/1/1 18/2/1 19/3/1 20/4/1 -f 21/5/2 22/6/2 23/7/2 24/8/2 -f 24/9/3 17/1/3 20/4/3 21/10/3 -f 18/5/4 23/11/4 22/10/4 19/4/4 -f 21/5/5 20/4/5 19/3/5 22/6/5 -f 24/12/6 23/13/6 18/2/6 17/1/6 -f 25/14/13 26/15/13 27/16/13 28/17/13 -f 29/18/14 30/19/14 31/20/14 32/21/14 -f 32/22/15 25/14/15 28/17/15 29/23/15 -f 26/18/16 31/24/16 30/23/16 27/17/16 -f 29/18/17 28/17/17 27/16/17 30/19/17 -f 32/25/18 31/26/18 26/15/18 25/14/18 -f 33/1/1 34/2/1 35/3/1 36/4/1 -f 37/5/2 38/6/2 39/7/2 40/8/2 -f 40/9/3 33/1/3 36/4/3 37/10/3 -f 34/5/4 39/11/4 38/10/4 35/4/4 -f 37/5/5 36/4/5 35/3/5 38/6/5 -f 40/12/6 39/13/6 34/2/6 33/1/6 -f 41/14/13 42/15/13 43/16/13 44/17/13 -f 45/18/14 46/19/14 47/20/14 48/21/14 -f 48/22/19 41/14/19 44/17/19 45/23/19 -f 42/18/20 47/24/20 46/23/20 43/17/20 -f 45/18/21 44/17/21 43/16/21 46/19/21 -f 48/25/22 47/26/22 42/15/22 41/14/22 -f 49/1/1 50/2/1 51/3/1 52/4/1 -f 53/5/2 54/6/2 55/7/2 56/8/2 -f 56/9/3 49/1/3 52/4/3 53/10/3 -f 50/5/4 55/11/4 54/10/4 51/4/4 -f 53/5/5 52/4/5 51/3/5 54/6/5 -f 56/12/6 55/13/6 50/2/6 49/1/6 -f 57/14/7 58/15/7 59/16/7 60/17/7 -f 61/18/8 62/19/8 63/20/8 64/21/8 -f 64/22/23 57/14/23 60/17/23 61/23/23 -f 58/18/24 63/24/24 62/23/24 59/17/24 -f 61/18/25 60/17/25 59/16/25 62/19/25 -f 64/25/26 63/26/26 58/15/26 57/14/26 -f 65/27/1 66/28/1 67/29/1 68/30/1 -f 69/31/2 70/32/2 71/33/2 72/34/2 -f 72/35/3 65/27/3 68/30/3 69/36/3 -f 66/31/4 71/37/4 70/36/4 67/30/4 -f 69/31/5 68/30/5 67/29/5 70/32/5 -f 72/38/6 71/39/6 66/28/6 65/27/6 -f 73/40/1 74/41/1 75/42/1 76/43/1 -f 77/44/2 78/45/2 79/46/2 80/47/2 -f 80/48/3 73/40/3 76/43/3 77/49/3 -f 74/44/4 79/50/4 78/49/4 75/43/4 -f 77/44/5 76/43/5 75/42/5 78/45/5 -f 80/51/6 79/52/6 74/41/6 73/40/6 -f 81/53/1 82/54/1 83/55/1 84/56/1 -f 85/57/2 86/58/2 87/59/2 88/60/2 -f 88/61/27 81/53/27 84/56/27 85/62/27 -f 82/63/28 87/64/28 86/62/28 83/56/28 -f 85/57/29 84/56/29 83/55/29 86/58/29 -f 88/65/30 87/66/30 82/54/30 81/53/30 -f 89/53/1 90/54/1 91/55/1 92/56/1 -f 93/57/2 94/58/2 95/59/2 96/60/2 -f 96/61/30 89/53/30 92/56/30 93/62/30 -f 90/63/29 95/64/29 94/62/29 91/56/29 -f 93/57/27 92/56/27 91/55/27 94/58/27 -f 96/65/28 95/66/28 90/54/28 89/53/28 -f 97/67/31 98/68/31 99/69/31 100/70/31 -f 101/71/32 102/72/32 103/73/32 104/74/32 -f 104/75/33 97/67/33 100/70/33 101/76/33 -f 98/77/34 103/78/34 102/76/34 99/70/34 -f 101/71/5 100/70/5 99/69/5 102/72/5 -f 104/79/6 103/80/6 98/68/6 97/67/6 -f 105/67/34 106/68/34 107/69/34 108/70/34 -f 109/71/33 110/72/33 111/73/33 112/74/33 -f 112/75/31 105/67/31 108/70/31 109/76/31 -f 106/77/32 111/78/32 110/76/32 107/70/32 -f 109/71/5 108/70/5 107/69/5 110/72/5 -f 112/79/6 111/80/6 106/68/6 105/67/6 -f 113/81/1 114/82/1 115/83/1 116/84/1 -f 117/85/2 118/86/2 119/87/2 120/88/2 -f 120/89/3 113/81/3 116/84/3 117/90/3 -f 114/85/4 119/91/4 118/90/4 115/84/4 -f 117/85/5 116/84/5 115/83/5 118/86/5 -f 120/92/6 119/93/6 114/82/6 113/81/6 -f 121/81/1 122/82/1 123/83/1 124/84/1 -f 125/85/2 126/86/2 127/87/2 128/88/2 -f 128/89/3 121/81/3 124/84/3 125/90/3 -f 122/85/4 127/91/4 126/90/4 123/84/4 -f 125/85/5 124/84/5 123/83/5 126/86/5 -f 128/92/6 127/93/6 122/82/6 121/81/6 -f 129/81/1 130/82/1 131/83/1 132/84/1 -f 133/85/2 134/86/2 135/87/2 136/88/2 -f 136/89/3 129/81/3 132/84/3 133/90/3 -f 130/85/4 135/91/4 134/90/4 131/84/4 -f 133/85/5 132/84/5 131/83/5 134/86/5 -f 136/92/6 135/93/6 130/82/6 129/81/6 -f 137/81/1 138/82/1 139/83/1 140/84/1 -f 141/85/2 142/86/2 143/87/2 144/88/2 -f 144/89/3 137/81/3 140/84/3 141/90/3 -f 138/85/4 143/91/4 142/90/4 139/84/4 -f 141/85/5 140/84/5 139/83/5 142/86/5 -f 144/92/6 143/93/6 138/82/6 137/81/6 -f 145/94/1 146/95/1 147/96/1 148/97/1 -f 149/98/2 150/99/2 151/100/2 152/101/2 -f 152/102/3 145/94/3 148/97/3 149/103/3 -f 146/104/4 151/105/4 150/103/4 147/97/4 -f 149/98/5 148/97/5 147/96/5 150/99/5 -f 152/106/6 151/107/6 146/95/6 145/94/6 -f 153/94/1 154/95/1 155/96/1 156/97/1 -f 157/98/2 158/99/2 159/100/2 160/101/2 -f 160/102/3 153/94/3 156/97/3 157/103/3 -f 154/104/4 159/105/4 158/103/4 155/97/4 -f 157/98/5 156/97/5 155/96/5 158/99/5 -f 160/106/6 159/107/6 154/95/6 153/94/6 -f 161/108/1 162/109/1 163/110/1 164/111/1 -f 165/112/2 166/113/2 167/114/2 168/115/2 -f 168/116/3 161/108/3 164/111/3 165/117/3 -f 162/118/4 167/119/4 166/117/4 163/111/4 -f 165/112/5 164/111/5 163/110/5 166/113/5 -f 168/120/6 167/121/6 162/109/6 161/108/6 -f 169/108/1 170/109/1 171/110/1 172/111/1 -f 173/112/2 174/113/2 175/114/2 176/115/2 -f 176/116/3 169/108/3 172/111/3 173/117/3 -f 170/118/4 175/119/4 174/117/4 171/111/4 -f 173/112/5 172/111/5 171/110/5 174/113/5 -f 176/120/6 175/121/6 170/109/6 169/108/6 -f 177/122/1 178/123/1 179/124/1 180/125/1 -f 181/126/2 182/127/2 183/128/2 184/129/2 -f 184/130/3 177/122/3 180/125/3 181/131/3 -f 178/126/4 183/132/4 182/131/4 179/125/4 -f 181/126/5 180/125/5 179/124/5 182/127/5 -f 184/133/6 183/134/6 178/123/6 177/122/6 -f 185/122/1 186/135/1 187/136/1 188/137/1 -f 189/125/2 190/138/2 191/139/2 192/140/2 -f 192/141/3 185/122/3 188/137/3 189/142/3 -f 186/125/4 191/143/4 190/142/4 187/137/4 -f 189/125/5 188/137/5 187/136/5 190/138/5 -f 192/144/6 191/145/6 186/135/6 185/122/6 -f 193/122/1 194/123/1 195/124/1 196/125/1 -f 197/126/2 198/127/2 199/128/2 200/129/2 -f 200/130/3 193/122/3 196/125/3 197/131/3 -f 194/126/4 199/132/4 198/131/4 195/125/4 -f 197/126/5 196/125/5 195/124/5 198/127/5 -f 200/133/6 199/134/6 194/123/6 193/122/6 -f 201/122/1 202/135/1 203/136/1 204/137/1 -f 205/125/2 206/138/2 207/139/2 208/140/2 -f 208/141/3 201/122/3 204/137/3 205/142/3 -f 202/125/4 207/143/4 206/142/4 203/137/4 -f 205/125/5 204/137/5 203/136/5 206/138/5 -f 208/144/6 207/145/6 202/135/6 201/122/6 -f 209/122/1 210/123/1 211/124/1 212/125/1 -f 213/126/2 214/127/2 215/128/2 216/129/2 -f 216/130/3 209/122/3 212/125/3 213/131/3 -f 210/126/4 215/132/4 214/131/4 211/125/4 -f 213/126/5 212/125/5 211/124/5 214/127/5 -f 216/133/6 215/134/6 210/123/6 209/122/6 -f 217/122/1 218/135/1 219/136/1 220/137/1 -f 221/125/2 222/138/2 223/139/2 224/140/2 -f 224/141/3 217/122/3 220/137/3 221/142/3 -f 218/125/4 223/143/4 222/142/4 219/137/4 -f 221/125/5 220/137/5 219/136/5 222/138/5 -f 224/144/6 223/145/6 218/135/6 217/122/6 -f 225/122/1 226/123/1 227/124/1 228/125/1 -f 229/126/2 230/127/2 231/128/2 232/129/2 -f 232/130/3 225/122/3 228/125/3 229/131/3 -f 226/126/4 231/132/4 230/131/4 227/125/4 -f 229/126/5 228/125/5 227/124/5 230/127/5 -f 232/133/6 231/134/6 226/123/6 225/122/6 -f 233/122/1 234/135/1 235/136/1 236/137/1 -f 237/125/2 238/138/2 239/139/2 240/140/2 -f 240/141/3 233/122/3 236/137/3 237/142/3 -f 234/125/4 239/143/4 238/142/4 235/137/4 -f 237/125/5 236/137/5 235/136/5 238/138/5 -f 240/144/6 239/145/6 234/135/6 233/122/6 -f 241/14/7 242/15/7 243/16/7 244/17/7 -f 245/18/8 246/19/8 247/20/8 248/21/8 -f 248/22/9 241/14/9 244/17/9 245/23/9 -f 242/18/10 247/24/10 246/23/10 243/17/10 -f 245/18/11 244/17/11 243/16/11 246/19/11 -f 248/25/12 247/26/12 242/15/12 241/14/12 -f 249/14/13 250/15/13 251/16/13 252/17/13 -f 253/18/14 254/19/14 255/20/14 256/21/14 -f 256/22/15 249/14/15 252/17/15 253/23/15 -f 250/18/16 255/24/16 254/23/16 251/17/16 -f 253/18/17 252/17/17 251/16/17 254/19/17 -f 256/25/18 255/26/18 250/15/18 249/14/18 -f 257/14/13 258/15/13 259/16/13 260/17/13 -f 261/18/14 262/19/14 263/20/14 264/21/14 -f 264/22/19 257/14/19 260/17/19 261/23/19 -f 258/18/20 263/24/20 262/23/20 259/17/20 -f 261/18/21 260/17/21 259/16/21 262/19/21 -f 264/25/22 263/26/22 258/15/22 257/14/22 -f 265/14/7 266/15/7 267/16/7 268/17/7 -f 269/18/8 270/19/8 271/20/8 272/21/8 -f 272/22/23 265/14/23 268/17/23 269/23/23 -f 266/18/24 271/24/24 270/23/24 267/17/24 -f 269/18/25 268/17/25 267/16/25 270/19/25 -f 272/25/26 271/26/26 266/15/26 265/14/26 -f 273/40/1 274/41/1 275/42/1 276/43/1 -f 277/44/2 278/45/2 279/46/2 280/47/2 -f 280/48/3 273/40/3 276/43/3 277/49/3 -f 274/44/4 279/50/4 278/49/4 275/43/4 -f 277/44/5 276/43/5 275/42/5 278/45/5 -f 280/51/6 279/52/6 274/41/6 273/40/6 -f 281/53/1 282/54/1 283/55/1 284/56/1 -f 285/57/2 286/58/2 287/59/2 288/60/2 -f 288/61/27 281/53/27 284/56/27 285/62/27 -f 282/63/28 287/64/28 286/62/28 283/56/28 -f 285/57/29 284/56/29 283/55/29 286/58/29 -f 288/65/30 287/66/30 282/54/30 281/53/30 -f 289/53/1 290/54/1 291/55/1 292/56/1 -f 293/57/2 294/58/2 295/59/2 296/60/2 -f 296/61/30 289/53/30 292/56/30 293/62/30 -f 290/63/29 295/64/29 294/62/29 291/56/29 -f 293/57/27 292/56/27 291/55/27 294/58/27 -f 296/65/28 295/66/28 290/54/28 289/53/28 -f 297/67/31 298/68/31 299/69/31 300/70/31 -f 301/71/32 302/72/32 303/73/32 304/74/32 -f 304/75/33 297/67/33 300/70/33 301/76/33 -f 298/77/34 303/78/34 302/76/34 299/70/34 -f 301/71/5 300/70/5 299/69/5 302/72/5 -f 304/79/6 303/80/6 298/68/6 297/67/6 -f 305/67/34 306/68/34 307/69/34 308/70/34 -f 309/71/33 310/72/33 311/73/33 312/74/33 -f 312/75/31 305/67/31 308/70/31 309/76/31 -f 306/77/32 311/78/32 310/76/32 307/70/32 -f 309/71/5 308/70/5 307/69/5 310/72/5 -f 312/79/6 311/80/6 306/68/6 305/67/6 -f 313/81/1 314/82/1 315/83/1 316/84/1 -f 317/85/2 318/86/2 319/87/2 320/88/2 -f 320/89/3 313/81/3 316/84/3 317/90/3 -f 314/85/4 319/91/4 318/90/4 315/84/4 -f 317/85/5 316/84/5 315/83/5 318/86/5 -f 320/92/6 319/93/6 314/82/6 313/81/6 -f 321/81/1 322/82/1 323/83/1 324/84/1 -f 325/85/2 326/86/2 327/87/2 328/88/2 -f 328/89/3 321/81/3 324/84/3 325/90/3 -f 322/85/4 327/91/4 326/90/4 323/84/4 -f 325/85/5 324/84/5 323/83/5 326/86/5 -f 328/92/6 327/93/6 322/82/6 321/81/6 -f 329/81/1 330/82/1 331/83/1 332/84/1 -f 333/85/2 334/86/2 335/87/2 336/88/2 -f 336/89/3 329/81/3 332/84/3 333/90/3 -f 330/85/4 335/91/4 334/90/4 331/84/4 -f 333/85/5 332/84/5 331/83/5 334/86/5 -f 336/92/6 335/93/6 330/82/6 329/81/6 -f 337/81/1 338/82/1 339/83/1 340/84/1 -f 341/85/2 342/86/2 343/87/2 344/88/2 -f 344/89/3 337/81/3 340/84/3 341/90/3 -f 338/85/4 343/91/4 342/90/4 339/84/4 -f 341/85/5 340/84/5 339/83/5 342/86/5 -f 344/92/6 343/93/6 338/82/6 337/81/6 -f 345/53/1 346/54/1 347/55/1 348/56/1 -f 349/57/2 350/58/2 351/59/2 352/60/2 -f 352/61/27 345/53/27 348/56/27 349/62/27 -f 346/63/28 351/64/28 350/62/28 347/56/28 -f 349/57/29 348/56/29 347/55/29 350/58/29 -f 352/65/30 351/66/30 346/54/30 345/53/30 -f 353/53/1 354/54/1 355/55/1 356/56/1 -f 357/57/2 358/58/2 359/59/2 360/60/2 -f 360/61/30 353/53/30 356/56/30 357/62/30 -f 354/63/29 359/64/29 358/62/29 355/56/29 -f 357/57/27 356/56/27 355/55/27 358/58/27 -f 360/65/28 359/66/28 354/54/28 353/53/28 -f 361/67/31 362/68/31 363/69/31 364/70/31 -f 365/71/32 366/72/32 367/73/32 368/74/32 -f 368/75/33 361/67/33 364/70/33 365/76/33 -f 362/77/34 367/78/34 366/76/34 363/70/34 -f 365/71/5 364/70/5 363/69/5 366/72/5 -f 368/79/6 367/80/6 362/68/6 361/67/6 -f 369/67/34 370/68/34 371/69/34 372/70/34 -f 373/71/33 374/72/33 375/73/33 376/74/33 -f 376/75/31 369/67/31 372/70/31 373/76/31 -f 370/77/32 375/78/32 374/76/32 371/70/32 -f 373/71/5 372/70/5 371/69/5 374/72/5 -f 376/79/6 375/80/6 370/68/6 369/67/6 -f 377/122/1 378/135/1 379/136/1 380/137/1 -f 381/125/2 382/138/2 383/139/2 384/140/2 -f 384/141/3 377/122/3 380/137/3 381/142/3 -f 378/125/4 383/143/4 382/142/4 379/137/4 -f 381/125/5 380/137/5 379/136/5 382/138/5 -f 384/144/6 383/145/6 378/135/6 377/122/6 -f 385/122/1 386/135/1 387/136/1 388/137/1 -f 389/125/2 390/138/2 391/139/2 392/140/2 -f 392/141/3 385/122/3 388/137/3 389/142/3 -f 386/125/4 391/143/4 390/142/4 387/137/4 -f 389/125/5 388/137/5 387/136/5 390/138/5 -f 392/144/6 391/145/6 386/135/6 385/122/6 -f 393/122/1 394/135/1 395/136/1 396/137/1 -f 397/125/2 398/138/2 399/139/2 400/140/2 -f 400/141/3 393/122/3 396/137/3 397/142/3 -f 394/125/4 399/143/4 398/142/4 395/137/4 -f 397/125/5 396/137/5 395/136/5 398/138/5 -f 400/144/6 399/145/6 394/135/6 393/122/6 -f 401/122/1 402/135/1 403/136/1 404/137/1 -f 405/125/2 406/138/2 407/139/2 408/140/2 -f 408/141/3 401/122/3 404/137/3 405/142/3 -f 402/125/4 407/143/4 406/142/4 403/137/4 -f 405/125/5 404/137/5 403/136/5 406/138/5 -f 408/144/6 407/145/6 402/135/6 401/122/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.json b/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.json deleted file mode 100644 index 5525b347..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "bloodmagic:blocks/IncenseAltar" - } -} - diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.obj b/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.obj deleted file mode 100644 index d78471a9..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.obj +++ /dev/null @@ -1,650 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib BlockIncenseAltar.mtl -o BlockIncenseAltar_(1) -v 0.659375 0.159375 0.871875 -v 0.659375 -0.000000 0.871875 -v 0.871875 -0.000000 0.871875 -v 0.871875 0.159375 0.871875 -v 0.871875 0.159375 0.659375 -v 0.871875 -0.000000 0.659375 -v 0.659375 -0.000000 0.659375 -v 0.659375 0.159375 0.659375 -v 0.659375 0.159375 0.340625 -v 0.659375 0.000000 0.340625 -v 0.871875 0.000000 0.340625 -v 0.871875 0.159375 0.340625 -v 0.871875 0.159375 0.128125 -v 0.871875 0.000000 0.128125 -v 0.659375 0.000000 0.128125 -v 0.659375 0.159375 0.128125 -v 0.128125 0.159375 0.871875 -v 0.128125 -0.000000 0.871875 -v 0.340625 -0.000000 0.871875 -v 0.340625 0.159375 0.871875 -v 0.340625 0.159375 0.659375 -v 0.340625 -0.000000 0.659375 -v 0.128125 -0.000000 0.659375 -v 0.128125 0.159375 0.659375 -v 0.128125 0.159375 0.340625 -v 0.128125 0.000000 0.340625 -v 0.340625 0.000000 0.340625 -v 0.340625 0.159375 0.340625 -v 0.340625 0.159375 0.128125 -v 0.340625 0.000000 0.128125 -v 0.128125 0.000000 0.128125 -v 0.128125 0.159375 0.128125 -v 0.128125 0.212500 0.871875 -v 0.128125 0.159375 0.871875 -v 0.871875 0.159375 0.871875 -v 0.871875 0.212500 0.871875 -v 0.871875 0.212500 0.128125 -v 0.871875 0.159375 0.128125 -v 0.128125 0.159375 0.128125 -v 0.128125 0.212500 0.128125 -v 0.314062 0.984629 0.371221 -v 0.314062 0.195516 0.260344 -v 0.685938 0.195516 0.260344 -v 0.685938 0.984629 0.371221 -v 0.685938 0.992021 0.318614 -v 0.685938 0.202908 0.207737 -v 0.314062 0.202908 0.207737 -v 0.314062 0.992021 0.318614 -v 0.628779 0.984629 0.685938 -v 0.739656 0.195516 0.685938 -v 0.792263 0.202908 0.685938 -v 0.681387 0.992021 0.685938 -v 0.681387 0.992021 0.314063 -v 0.792263 0.202908 0.314063 -v 0.739656 0.195516 0.314063 -v 0.628779 0.984629 0.314063 -v 0.318612 0.992017 0.685938 -v 0.207735 0.202893 0.685938 -v 0.260343 0.195502 0.685938 -v 0.371220 0.984625 0.685938 -v 0.371220 0.984626 0.314063 -v 0.260343 0.195502 0.314063 -v 0.207735 0.202893 0.314063 -v 0.318612 0.992017 0.314063 -v 0.314062 0.992017 0.681388 -v 0.314062 0.202893 0.792265 -v 0.685938 0.202893 0.792265 -v 0.685938 0.992017 0.681388 -v 0.685938 0.984625 0.628780 -v 0.685938 0.195502 0.739657 -v 0.314062 0.195502 0.739657 -v 0.314062 0.984625 0.628780 -v 0.576198 0.952884 0.733023 -v 0.687075 0.171447 0.842819 -v 0.844898 0.193406 0.839734 -v 0.734021 0.974844 0.729938 -v 0.734021 0.952669 0.572113 -v 0.844898 0.171232 0.681909 -v 0.687075 0.149272 0.684995 -v 0.576198 0.930709 0.575199 -v 0.576198 0.930713 0.424802 -v 0.687075 0.149287 0.315005 -v 0.844898 0.171246 0.318091 -v 0.734021 0.952673 0.427888 -v 0.734021 0.974849 0.270065 -v 0.844898 0.193422 0.160268 -v 0.687075 0.171463 0.157182 -v 0.576198 0.952889 0.266979 -v 0.265976 0.952668 0.427887 -v 0.155100 0.171231 0.318088 -v 0.312924 0.149272 0.315003 -v 0.423802 0.930709 0.424801 -v 0.423802 0.952884 0.266979 -v 0.312924 0.171448 0.157181 -v 0.155100 0.193407 0.160266 -v 0.265976 0.974844 0.270064 -v 0.265976 0.974840 0.729939 -v 0.155100 0.193391 0.839737 -v 0.312924 0.171432 0.842822 -v 0.423802 0.952880 0.733024 -v 0.423802 0.930704 0.575199 -v 0.312924 0.149257 0.684997 -v 0.155100 0.171216 0.681912 -v 0.265976 0.952664 0.572113 -v 0.181250 1.009375 0.818750 -v 0.181250 0.956250 0.818750 -v 0.340625 0.956250 0.818750 -v 0.340625 1.009375 0.818750 -v 0.340625 1.009375 0.181250 -v 0.340625 0.956250 0.181250 -v 0.181250 0.956250 0.181250 -v 0.181250 1.009375 0.181250 -v 0.659375 1.009375 0.818750 -v 0.659375 0.956250 0.818750 -v 0.659375 0.956250 0.659375 -v 0.659375 1.009375 0.659375 -v 0.340625 1.009375 0.659375 -v 0.340625 0.956250 0.659375 -v 0.340625 0.956250 0.818750 -v 0.340625 1.009375 0.818750 -v 0.659375 1.009375 0.818750 -v 0.659375 0.956250 0.818750 -v 0.818750 0.956250 0.818750 -v 0.818750 1.009375 0.818750 -v 0.818750 1.009375 0.181250 -v 0.818750 0.956250 0.181250 -v 0.659375 0.956250 0.181250 -v 0.659375 1.009375 0.181250 -v 0.659375 1.009375 0.340625 -v 0.659375 0.956250 0.340625 -v 0.659375 0.956250 0.181250 -v 0.659375 1.009375 0.181250 -v 0.340625 1.009375 0.181250 -v 0.340625 0.956250 0.181250 -v 0.340625 0.956250 0.340625 -v 0.340625 1.009375 0.340625 -v 0.739062 1.062500 0.845313 -v 0.739062 1.009375 0.845313 -v 0.845312 1.009375 0.845313 -v 0.845312 1.062500 0.845313 -v 0.845312 1.062500 0.739063 -v 0.845312 1.009375 0.739063 -v 0.739062 1.009375 0.739063 -v 0.739062 1.062500 0.739063 -v 0.792188 1.115625 0.845313 -v 0.792188 1.062500 0.845313 -v 0.845312 1.062500 0.845313 -v 0.845312 1.115625 0.845313 -v 0.845312 1.115625 0.792188 -v 0.845312 1.062500 0.792188 -v 0.792188 1.062500 0.792188 -v 0.792188 1.115625 0.792188 -v 0.154687 1.062500 0.845313 -v 0.154687 1.009375 0.845313 -v 0.260938 1.009375 0.845313 -v 0.260938 1.062500 0.845313 -v 0.260938 1.062500 0.739063 -v 0.260938 1.009375 0.739063 -v 0.154687 1.009375 0.739063 -v 0.154687 1.062500 0.739063 -v 0.154687 1.115625 0.845313 -v 0.154687 1.062500 0.845313 -v 0.207812 1.062500 0.845313 -v 0.207812 1.115625 0.845313 -v 0.207812 1.115625 0.792188 -v 0.207812 1.062500 0.792188 -v 0.154687 1.062500 0.792188 -v 0.154687 1.115625 0.792188 -v 0.739062 1.062500 0.260938 -v 0.739062 1.009375 0.260938 -v 0.845312 1.009375 0.260938 -v 0.845312 1.062500 0.260938 -v 0.845312 1.062500 0.154688 -v 0.845312 1.009375 0.154688 -v 0.739062 1.009375 0.154688 -v 0.739062 1.062500 0.154688 -v 0.792188 1.115625 0.207813 -v 0.792188 1.062500 0.207813 -v 0.845312 1.062500 0.207813 -v 0.845312 1.115625 0.207813 -v 0.845312 1.115625 0.154688 -v 0.845312 1.062500 0.154688 -v 0.792188 1.062500 0.154688 -v 0.792188 1.115625 0.154688 -v 0.154687 1.062500 0.260938 -v 0.154687 1.009375 0.260938 -v 0.260938 1.009375 0.260938 -v 0.260938 1.062500 0.260938 -v 0.260938 1.062500 0.154688 -v 0.260938 1.009375 0.154688 -v 0.154687 1.009375 0.154688 -v 0.154687 1.062500 0.154688 -v 0.154687 1.115625 0.207813 -v 0.154687 1.062500 0.207813 -v 0.207812 1.062500 0.207813 -v 0.207812 1.115625 0.207813 -v 0.207812 1.115625 0.154688 -v 0.207812 1.062500 0.154688 -v 0.154687 1.062500 0.154688 -v 0.154687 1.115625 0.154688 -v 0.367188 0.956250 0.632813 -v 0.367188 0.903125 0.632813 -v 0.632812 0.903125 0.632813 -v 0.632812 0.956250 0.632813 -v 0.632812 0.956250 0.367188 -v 0.632812 0.903125 0.367188 -v 0.367188 0.903125 0.367188 -v 0.367188 0.956250 0.367188 -v 0.314062 0.984629 0.371221 -v 0.314062 0.195516 0.260344 -v 0.685938 0.195516 0.260344 -v 0.685938 0.984629 0.371221 -v 0.685938 0.992021 0.318614 -v 0.685938 0.202908 0.207737 -v 0.314062 0.202908 0.207737 -v 0.314062 0.992021 0.318614 -v 0.628779 0.984629 0.685938 -v 0.739656 0.195516 0.685938 -v 0.792263 0.202908 0.685938 -v 0.681387 0.992021 0.685938 -v 0.681387 0.992021 0.314063 -v 0.792263 0.202908 0.314063 -v 0.739656 0.195516 0.314063 -v 0.628779 0.984629 0.314063 -v 0.318612 0.992017 0.685938 -v 0.207735 0.202893 0.685938 -v 0.260343 0.195502 0.685938 -v 0.371220 0.984625 0.685938 -v 0.371220 0.984626 0.314063 -v 0.260343 0.195502 0.314063 -v 0.207735 0.202893 0.314063 -v 0.318612 0.992017 0.314063 -v 0.314062 0.992017 0.681388 -v 0.314062 0.202893 0.792265 -v 0.685938 0.202893 0.792265 -v 0.685938 0.992017 0.681388 -v 0.685938 0.984625 0.628780 -v 0.685938 0.195502 0.739657 -v 0.314062 0.195502 0.739657 -v 0.314062 0.984625 0.628780 -v 0.792188 1.115625 0.845313 -v 0.792188 1.062500 0.845313 -v 0.845312 1.062500 0.845313 -v 0.845312 1.115625 0.845313 -v 0.845312 1.115625 0.792188 -v 0.845312 1.062500 0.792188 -v 0.792188 1.062500 0.792188 -v 0.792188 1.115625 0.792188 -v 0.154687 1.115625 0.845313 -v 0.154687 1.062500 0.845313 -v 0.207812 1.062500 0.845313 -v 0.207812 1.115625 0.845313 -v 0.207812 1.115625 0.792188 -v 0.207812 1.062500 0.792188 -v 0.154687 1.062500 0.792188 -v 0.154687 1.115625 0.792188 -v 0.792188 1.115625 0.207813 -v 0.792188 1.062500 0.207813 -v 0.845312 1.062500 0.207813 -v 0.845312 1.115625 0.207813 -v 0.845312 1.115625 0.154688 -v 0.845312 1.062500 0.154688 -v 0.792188 1.062500 0.154688 -v 0.792188 1.115625 0.154688 -v 0.154687 1.115625 0.207813 -v 0.154687 1.062500 0.207813 -v 0.207812 1.062500 0.207813 -v 0.207812 1.115625 0.207813 -v 0.207812 1.115625 0.154688 -v 0.207812 1.062500 0.154688 -v 0.154687 1.062500 0.154688 -v 0.154687 1.115625 0.154688 -vt 0.062500 0.937500 -vt 0.062500 0.890625 -vt 0.125000 0.890625 -vt 0.125000 0.937500 -vt 0.187500 0.937500 -vt 0.187500 0.890625 -vt 0.250000 0.890625 -vt 0.250000 0.937500 -vt 0.062500 1.000000 -vt 0.125000 1.000000 -vt 0.187500 1.000000 -vt 0.000000 0.937500 -vt 0.000000 0.890625 -vt 0.265625 0.781250 -vt 0.265625 0.765625 -vt 0.484375 0.765625 -vt 0.484375 0.781250 -vt 0.703125 0.781250 -vt 0.703125 0.765625 -vt 0.921875 0.765625 -vt 0.921875 0.781250 -vt 0.265625 1.000000 -vt 0.484375 1.000000 -vt 0.703125 1.000000 -vt 0.046875 0.781250 -vt 0.046875 0.765625 -vt 0.015625 0.734375 -vt 0.015625 0.500000 -vt 0.125000 0.500000 -vt 0.125000 0.734375 -vt 0.140625 0.734375 -vt 0.140625 0.500000 -vt 0.250000 0.500000 -vt 0.250000 0.734375 -vt 0.015625 0.750000 -vt 0.125000 0.750000 -vt 0.234375 0.734375 -vt 0.234375 0.750000 -vt 0.000000 0.734375 -vt 0.000000 0.500000 -vt 0.375000 0.640625 -vt 0.375000 0.406250 -vt 0.390625 0.406250 -vt 0.390625 0.640625 -vt 0.500000 0.640625 -vt 0.500000 0.406250 -vt 0.515625 0.406250 -vt 0.515625 0.640625 -vt 0.375000 0.750000 -vt 0.390625 0.750000 -vt 0.406250 0.640625 -vt 0.406250 0.750000 -vt 0.265625 0.640625 -vt 0.265625 0.406250 -vt 0.046875 0.437500 -vt 0.046875 0.203125 -vt 0.093750 0.203125 -vt 0.093750 0.437500 -vt 0.140625 0.437500 -vt 0.140625 0.203125 -vt 0.187500 0.203125 -vt 0.187500 0.437500 -vt 0.046875 0.484375 -vt 0.093750 0.484375 -vt 0.140625 0.484375 -vt 0.000000 0.437500 -vt 0.000000 0.203125 -vt 0.203125 0.015625 -vt 0.203125 0.000000 -vt 0.250000 0.000000 -vt 0.250000 0.015625 -vt 0.437500 0.015625 -vt 0.437500 0.000000 -vt 0.484375 0.000000 -vt 0.484375 0.015625 -vt 0.203125 0.203125 -vt 0.250000 0.203125 -vt 0.296875 0.015625 -vt 0.296875 0.203125 -vt 0.015625 0.015625 -vt 0.015625 0.000000 -vt 0.593750 0.015625 -vt 0.593750 0.000000 -vt 0.640625 0.000000 -vt 0.640625 0.015625 -vt 0.734375 0.015625 -vt 0.734375 0.000000 -vt 0.781250 0.000000 -vt 0.781250 0.015625 -vt 0.593750 0.109375 -vt 0.640625 0.109375 -vt 0.687500 0.015625 -vt 0.687500 0.109375 -vt 0.500000 0.015625 -vt 0.500000 0.000000 -vt 0.234375 0.234375 -vt 0.234375 0.218750 -vt 0.265625 0.218750 -vt 0.265625 0.234375 -vt 0.296875 0.234375 -vt 0.296875 0.218750 -vt 0.328125 0.218750 -vt 0.328125 0.234375 -vt 0.234375 0.265625 -vt 0.265625 0.265625 -vt 0.296875 0.265625 -vt 0.203125 0.234375 -vt 0.203125 0.218750 -vt 0.218750 0.250000 -vt 0.218750 0.234375 -vt 0.234375 0.250000 -vt 0.250000 0.250000 -vt 0.250000 0.234375 -vt 0.265625 0.250000 -vt 0.218750 0.265625 -vt 0.250000 0.265625 -vt 0.203125 0.250000 -vt 0.281250 0.312500 -vt 0.281250 0.296875 -vt 0.359375 0.296875 -vt 0.359375 0.312500 -vt 0.437500 0.312500 -vt 0.437500 0.296875 -vt 0.515625 0.296875 -vt 0.515625 0.312500 -vt 0.281250 0.390625 -vt 0.359375 0.390625 -vt 0.437500 0.390625 -vt 0.203125 0.312500 -vt 0.203125 0.296875 -vn 0.000000 0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -vn 0.000000 -0.139100 0.990300 -vn 0.000000 0.139100 -0.990300 -vn 0.000000 0.990300 0.139200 -vn 0.000000 -0.990300 -0.139100 -vn -0.139200 0.990300 0.000000 -vn 0.139100 -0.990300 -0.000000 -vn 0.990300 0.139100 0.000000 -vn -0.990300 -0.139100 -0.000000 -vn 0.139100 0.990300 0.000000 -vn -0.139100 -0.990300 -0.000000 -vn 0.990300 -0.139100 -0.000000 -vn -0.990300 0.139100 0.000000 -vn 0.000000 0.139100 0.990300 -vn 0.000000 -0.139100 -0.990300 -vn 0.000000 0.990300 -0.139200 -vn 0.000000 -0.990300 0.139100 -vn -0.139100 0.980600 -0.137800 -vn 0.139100 -0.980600 0.137800 -vn 0.990300 0.137800 -0.019400 -vn -0.990300 -0.137800 0.019400 -vn -0.139100 0.980600 0.137800 -vn 0.139100 -0.980600 -0.137800 -vn 0.990300 0.137800 0.019400 -vn -0.990300 -0.137800 -0.019400 -vn 0.139100 0.980600 0.137800 -vn -0.139100 -0.980600 -0.137800 -vn 0.990300 -0.137800 -0.019400 -vn -0.990300 0.137800 0.019400 -vn 0.139100 0.980600 -0.137800 -vn -0.139100 -0.980600 0.137800 -vn 0.990300 -0.137800 0.019400 -vn -0.990300 0.137800 -0.019400 -usemtl None -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 8/9/3 1/1/3 4/4/3 5/10/3 -f 2/5/4 7/11/4 6/10/4 3/4/4 -f 5/5/5 4/4/5 3/3/5 6/6/5 -f 8/12/6 7/13/6 2/2/6 1/1/6 -f 9/1/1 10/2/1 11/3/1 12/4/1 -f 13/5/2 14/6/2 15/7/2 16/8/2 -f 16/9/3 9/1/3 12/4/3 13/10/3 -f 10/5/4 15/11/4 14/10/4 11/4/4 -f 13/5/5 12/4/5 11/3/5 14/6/5 -f 16/12/6 15/13/6 10/2/6 9/1/6 -f 17/1/1 18/2/1 19/3/1 20/4/1 -f 21/5/2 22/6/2 23/7/2 24/8/2 -f 24/9/3 17/1/3 20/4/3 21/10/3 -f 18/5/4 23/11/4 22/10/4 19/4/4 -f 21/5/5 20/4/5 19/3/5 22/6/5 -f 24/12/6 23/13/6 18/2/6 17/1/6 -f 25/1/1 26/2/1 27/3/1 28/4/1 -f 29/5/2 30/6/2 31/7/2 32/8/2 -f 32/9/3 25/1/3 28/4/3 29/10/3 -f 26/5/4 31/11/4 30/10/4 27/4/4 -f 29/5/5 28/4/5 27/3/5 30/6/5 -f 32/12/6 31/13/6 26/2/6 25/1/6 -f 33/14/1 34/15/1 35/16/1 36/17/1 -f 37/18/2 38/19/2 39/20/2 40/21/2 -f 40/22/3 33/14/3 36/17/3 37/23/3 -f 34/18/4 39/24/4 38/23/4 35/17/4 -f 37/18/5 36/17/5 35/16/5 38/19/5 -f 40/25/6 39/26/6 34/15/6 33/14/6 -f 41/27/7 42/28/7 43/29/7 44/30/7 -f 45/31/8 46/32/8 47/33/8 48/34/8 -f 48/35/9 41/27/9 44/30/9 45/36/9 -f 42/37/10 47/38/10 46/36/10 43/30/10 -f 45/31/5 44/30/5 43/29/5 46/32/5 -f 48/39/6 47/40/6 42/28/6 41/27/6 -f 49/41/1 50/42/1 51/43/1 52/44/1 -f 53/45/2 54/46/2 55/47/2 56/48/2 -f 56/49/11 49/41/11 52/44/11 53/50/11 -f 50/51/12 55/52/12 54/50/12 51/44/12 -f 53/45/13 52/44/13 51/43/13 54/46/13 -f 56/53/14 55/54/14 50/42/14 49/41/14 -f 57/41/1 58/42/1 59/43/1 60/44/1 -f 61/45/2 62/46/2 63/47/2 64/48/2 -f 64/49/15 57/41/15 60/44/15 61/50/15 -f 58/51/16 63/52/16 62/50/16 59/44/16 -f 61/45/17 60/44/17 59/43/17 62/46/17 -f 64/53/18 63/54/18 58/42/18 57/41/18 -f 65/27/19 66/28/19 67/29/19 68/30/19 -f 69/31/20 70/32/20 71/33/20 72/34/20 -f 72/35/21 65/27/21 68/30/21 69/36/21 -f 66/37/22 71/38/22 70/36/22 67/30/22 -f 69/31/5 68/30/5 67/29/5 70/32/5 -f 72/39/6 71/40/6 66/28/6 65/27/6 -f 73/55/19 74/56/19 75/57/19 76/58/19 -f 77/59/20 78/60/20 79/61/20 80/62/20 -f 80/63/23 73/55/23 76/58/23 77/64/23 -f 74/59/24 79/65/24 78/64/24 75/58/24 -f 77/59/25 76/58/25 75/57/25 78/60/25 -f 80/66/26 79/67/26 74/56/26 73/55/26 -f 81/55/7 82/56/7 83/57/7 84/58/7 -f 85/59/8 86/60/8 87/61/8 88/62/8 -f 88/63/27 81/55/27 84/58/27 85/64/27 -f 82/59/28 87/65/28 86/64/28 83/58/28 -f 85/59/29 84/58/29 83/57/29 86/60/29 -f 88/66/30 87/67/30 82/56/30 81/55/30 -f 89/55/7 90/56/7 91/57/7 92/58/7 -f 93/59/8 94/60/8 95/61/8 96/62/8 -f 96/63/31 89/55/31 92/58/31 93/64/31 -f 90/59/32 95/65/32 94/64/32 91/58/32 -f 93/59/33 92/58/33 91/57/33 94/60/33 -f 96/66/34 95/67/34 90/56/34 89/55/34 -f 97/55/19 98/56/19 99/57/19 100/58/19 -f 101/59/20 102/60/20 103/61/20 104/62/20 -f 104/63/35 97/55/35 100/58/35 101/64/35 -f 98/59/36 103/65/36 102/64/36 99/58/36 -f 101/59/37 100/58/37 99/57/37 102/60/37 -f 104/66/38 103/67/38 98/56/38 97/55/38 -f 105/68/1 106/69/1 107/70/1 108/71/1 -f 109/72/2 110/73/2 111/74/2 112/75/2 -f 112/76/3 105/68/3 108/71/3 109/77/3 -f 106/78/4 111/79/4 110/77/4 107/71/4 -f 109/72/5 108/71/5 107/70/5 110/73/5 -f 112/80/6 111/81/6 106/69/6 105/68/6 -f 113/82/5 114/83/5 115/84/5 116/85/5 -f 117/86/6 118/87/6 119/88/6 120/89/6 -f 120/90/3 113/82/3 116/85/3 117/91/3 -f 114/92/4 119/93/4 118/91/4 115/85/4 -f 117/86/2 116/85/2 115/84/2 118/87/2 -f 120/94/1 119/95/1 114/83/1 113/82/1 -f 121/68/1 122/69/1 123/70/1 124/71/1 -f 125/72/2 126/73/2 127/74/2 128/75/2 -f 128/76/3 121/68/3 124/71/3 125/77/3 -f 122/78/4 127/79/4 126/77/4 123/71/4 -f 125/72/5 124/71/5 123/70/5 126/73/5 -f 128/80/6 127/81/6 122/69/6 121/68/6 -f 129/82/5 130/83/5 131/84/5 132/85/5 -f 133/86/6 134/87/6 135/88/6 136/89/6 -f 136/90/3 129/82/3 132/85/3 133/91/3 -f 130/92/4 135/93/4 134/91/4 131/85/4 -f 133/86/2 132/85/2 131/84/2 134/87/2 -f 136/94/1 135/95/1 130/83/1 129/82/1 -f 137/96/1 138/97/1 139/98/1 140/99/1 -f 141/100/2 142/101/2 143/102/2 144/103/2 -f 144/104/3 137/96/3 140/99/3 141/105/3 -f 138/100/4 143/106/4 142/105/4 139/99/4 -f 141/100/5 140/99/5 139/98/5 142/101/5 -f 144/107/6 143/108/6 138/97/6 137/96/6 -f 145/109/1 146/110/1 147/96/1 148/111/1 -f 149/112/2 150/113/2 151/99/2 152/114/2 -f 152/115/3 145/109/3 148/111/3 149/104/3 -f 146/112/4 151/116/4 150/104/4 147/111/4 -f 149/112/5 148/111/5 147/96/5 150/113/5 -f 152/117/6 151/107/6 146/110/6 145/109/6 -f 153/96/1 154/97/1 155/98/1 156/99/1 -f 157/100/2 158/101/2 159/102/2 160/103/2 -f 160/104/3 153/96/3 156/99/3 157/105/3 -f 154/100/4 159/106/4 158/105/4 155/99/4 -f 157/100/5 156/99/5 155/98/5 158/101/5 -f 160/107/6 159/108/6 154/97/6 153/96/6 -f 161/109/1 162/110/1 163/96/1 164/111/1 -f 165/112/2 166/113/2 167/99/2 168/114/2 -f 168/115/3 161/109/3 164/111/3 165/104/3 -f 162/112/4 167/116/4 166/104/4 163/111/4 -f 165/112/5 164/111/5 163/96/5 166/113/5 -f 168/117/6 167/107/6 162/110/6 161/109/6 -f 169/96/1 170/97/1 171/98/1 172/99/1 -f 173/100/2 174/101/2 175/102/2 176/103/2 -f 176/104/3 169/96/3 172/99/3 173/105/3 -f 170/100/4 175/106/4 174/105/4 171/99/4 -f 173/100/5 172/99/5 171/98/5 174/101/5 -f 176/107/6 175/108/6 170/97/6 169/96/6 -f 177/109/1 178/110/1 179/96/1 180/111/1 -f 181/112/2 182/113/2 183/99/2 184/114/2 -f 184/115/3 177/109/3 180/111/3 181/104/3 -f 178/112/4 183/116/4 182/104/4 179/111/4 -f 181/112/5 180/111/5 179/96/5 182/113/5 -f 184/117/6 183/107/6 178/110/6 177/109/6 -f 185/96/1 186/97/1 187/98/1 188/99/1 -f 189/100/2 190/101/2 191/102/2 192/103/2 -f 192/104/3 185/96/3 188/99/3 189/105/3 -f 186/100/4 191/106/4 190/105/4 187/99/4 -f 189/100/5 188/99/5 187/98/5 190/101/5 -f 192/107/6 191/108/6 186/97/6 185/96/6 -f 193/109/1 194/110/1 195/96/1 196/111/1 -f 197/112/2 198/113/2 199/99/2 200/114/2 -f 200/115/3 193/109/3 196/111/3 197/104/3 -f 194/112/4 199/116/4 198/104/4 195/111/4 -f 197/112/5 196/111/5 195/96/5 198/113/5 -f 200/117/6 199/107/6 194/110/6 193/109/6 -f 201/118/1 202/119/1 203/120/1 204/121/1 -f 205/122/2 206/123/2 207/124/2 208/125/2 -f 208/126/3 201/118/3 204/121/3 205/127/3 -f 202/122/4 207/128/4 206/127/4 203/121/4 -f 205/122/5 204/121/5 203/120/5 206/123/5 -f 208/129/6 207/130/6 202/119/6 201/118/6 -f 209/27/7 210/28/7 211/29/7 212/30/7 -f 213/31/8 214/32/8 215/33/8 216/34/8 -f 216/35/9 209/27/9 212/30/9 213/36/9 -f 210/37/10 215/38/10 214/36/10 211/30/10 -f 213/31/5 212/30/5 211/29/5 214/32/5 -f 216/39/6 215/40/6 210/28/6 209/27/6 -f 217/41/1 218/42/1 219/43/1 220/44/1 -f 221/45/2 222/46/2 223/47/2 224/48/2 -f 224/49/11 217/41/11 220/44/11 221/50/11 -f 218/51/12 223/52/12 222/50/12 219/44/12 -f 221/45/13 220/44/13 219/43/13 222/46/13 -f 224/53/14 223/54/14 218/42/14 217/41/14 -f 225/41/1 226/42/1 227/43/1 228/44/1 -f 229/45/2 230/46/2 231/47/2 232/48/2 -f 232/49/15 225/41/15 228/44/15 229/50/15 -f 226/51/16 231/52/16 230/50/16 227/44/16 -f 229/45/17 228/44/17 227/43/17 230/46/17 -f 232/53/18 231/54/18 226/42/18 225/41/18 -f 233/27/19 234/28/19 235/29/19 236/30/19 -f 237/31/20 238/32/20 239/33/20 240/34/20 -f 240/35/21 233/27/21 236/30/21 237/36/21 -f 234/37/22 239/38/22 238/36/22 235/30/22 -f 237/31/5 236/30/5 235/29/5 238/32/5 -f 240/39/6 239/40/6 234/28/6 233/27/6 -f 241/109/1 242/110/1 243/96/1 244/111/1 -f 245/112/2 246/113/2 247/99/2 248/114/2 -f 248/115/3 241/109/3 244/111/3 245/104/3 -f 242/112/4 247/116/4 246/104/4 243/111/4 -f 245/112/5 244/111/5 243/96/5 246/113/5 -f 248/117/6 247/107/6 242/110/6 241/109/6 -f 249/109/1 250/110/1 251/96/1 252/111/1 -f 253/112/2 254/113/2 255/99/2 256/114/2 -f 256/115/3 249/109/3 252/111/3 253/104/3 -f 250/112/4 255/116/4 254/104/4 251/111/4 -f 253/112/5 252/111/5 251/96/5 254/113/5 -f 256/117/6 255/107/6 250/110/6 249/109/6 -f 257/109/1 258/110/1 259/96/1 260/111/1 -f 261/112/2 262/113/2 263/99/2 264/114/2 -f 264/115/3 257/109/3 260/111/3 261/104/3 -f 258/112/4 263/116/4 262/104/4 259/111/4 -f 261/112/5 260/111/5 259/96/5 262/113/5 -f 264/117/6 263/107/6 258/110/6 257/109/6 -f 265/109/1 266/110/1 267/96/1 268/111/1 -f 269/112/2 270/113/2 271/99/2 272/114/2 -f 272/115/3 265/109/3 268/111/3 269/104/3 -f 266/112/4 271/116/4 270/104/4 267/111/4 -f 269/112/5 268/111/5 267/96/5 270/113/5 -f 272/117/6 271/107/6 266/110/6 265/109/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/ModelAlchemyTable.obj b/src/main/resources/assets/bloodmagic/models/block/ModelAlchemyTable.obj deleted file mode 100644 index 79c5c56a..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/ModelAlchemyTable.obj +++ /dev/null @@ -1,1257 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib ModelAlchemyTable.mtl -o Decanter1 -v -0.125000 0.837500 0.718750 -v -0.306111 0.837500 0.767279 -v -0.306111 1.025000 0.767279 -v -0.125000 1.025000 0.718750 -v -0.257582 0.837500 0.948390 -v -0.076471 0.837500 0.899861 -v -0.076471 1.025000 0.899861 -v -0.257582 1.025000 0.948390 -vt 0.023438 0.000000 -vt 0.046875 0.000000 -vt 0.046875 0.023438 -vt 0.023438 0.023438 -vt 0.070313 0.000000 -vt 0.093750 0.000000 -vt 0.093750 0.023438 -vt 0.070313 0.023438 -vt 0.046875 0.046875 -vt 0.023438 0.046875 -vt 0.070313 0.046875 -vt 0.000000 0.000000 -vt 0.000000 0.023438 -vn -0.258800 0.000000 -0.965900 -vn 0.258800 -0.000000 0.965900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.965900 0.000000 -0.258800 -vn -0.965900 -0.000000 0.258800 -usemtl None -#s off -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 5/5/2 6/6/2 7/7/2 8/8/2 -f 4/4/3 3/3/3 8/9/3 7/10/3 -f 6/3/4 5/8/4 2/11/4 1/9/4 -f 6/12/5 1/1/5 4/4/5 7/13/5 -f 2/2/6 5/5/6 8/8/6 3/3/6 -o CarpetLow1 -v 1.054228 0.423099 0.250000 -v 0.992678 0.412246 0.250000 -v 0.970972 0.535347 0.250000 -v 1.032522 0.546200 0.250000 -v 0.992678 0.412246 0.750000 -v 1.054228 0.423099 0.750000 -v 1.032522 0.546200 0.750000 -v 0.970972 0.535347 0.750000 -vt 0.843750 0.757813 -vt 0.851563 0.757813 -vt 0.851563 0.773438 -vt 0.843750 0.773438 -vt 0.914063 0.757813 -vt 0.921875 0.757813 -vt 0.921875 0.773438 -vt 0.914063 0.773438 -vt 0.851563 0.835938 -vt 0.843750 0.835938 -vt 0.859375 0.773438 -vt 0.859375 0.835938 -vt 0.781250 0.757813 -vt 0.781250 0.773438 -vn -0.000000 0.000000 -1.000000 -vn 0.000000 -0.000000 1.000000 -vn -0.173600 0.984800 0.000000 -vn 0.173600 -0.984800 -0.000000 -vn 0.984800 0.173600 0.000000 -vn -0.984800 -0.173600 -0.000000 -usemtl None -#s off -f 9/14/7 10/15/7 11/16/7 12/17/7 -f 13/18/8 14/19/8 15/20/8 16/21/8 -f 12/17/9 11/16/9 16/22/9 15/23/9 -f 14/16/10 13/24/10 10/25/10 9/22/10 -f 14/26/11 9/14/11 12/17/11 15/27/11 -f 10/15/12 13/18/12 16/21/12 11/16/12 -o CarpetLowest2 -v -1.057387 0.301657 0.250000 -v -1.113075 0.330031 0.250000 -v -1.056326 0.441407 0.250000 -v -1.000638 0.413033 0.250000 -v -1.113075 0.330031 0.750000 -v -1.057387 0.301657 0.750000 -v -1.000638 0.413033 0.750000 -v -1.056326 0.441407 0.750000 -vt 0.843750 0.664063 -vt 0.851563 0.664063 -vt 0.851563 0.679688 -vt 0.843750 0.679688 -vt 0.914063 0.664063 -vt 0.921875 0.664063 -vt 0.921875 0.679688 -vt 0.914063 0.679688 -vt 0.851563 0.742188 -vt 0.843750 0.742188 -vt 0.859375 0.679688 -vt 0.859375 0.742188 -vt 0.781250 0.664063 -vt 0.781250 0.679688 -vn 0.000000 0.000000 -1.000000 -vn -0.000000 0.000000 1.000000 -vn 0.454000 0.891000 0.000000 -vn -0.454000 -0.891000 -0.000000 -vn 0.891000 -0.454000 -0.000000 -vn -0.891000 0.454000 0.000000 -usemtl None -#s off -f 17/28/13 18/29/13 19/30/13 20/31/13 -f 21/32/14 22/33/14 23/34/14 24/35/14 -f 20/31/15 19/30/15 24/36/15 23/37/15 -f 22/30/16 21/38/16 18/39/16 17/36/16 -f 22/40/17 17/28/17 20/31/17 23/41/17 -f 18/29/18 21/32/18 24/35/18 19/30/18 -o Decanter2 -v -0.185370 1.025000 0.734926 -v -0.366481 1.025000 0.783455 -v -0.366481 1.087500 0.783455 -v -0.185370 1.087500 0.734926 -v -0.317953 1.025000 0.964566 -v -0.136842 1.025000 0.916037 -v -0.136842 1.087500 0.916037 -v -0.317953 1.087500 0.964566 -vt 0.023438 0.062500 -vt 0.046875 0.062500 -vt 0.046875 0.070313 -vt 0.023438 0.070313 -vt 0.070313 0.062500 -vt 0.093750 0.062500 -vt 0.093750 0.070313 -vt 0.070313 0.070313 -vt 0.046875 0.093750 -vt 0.023438 0.093750 -vt 0.070313 0.093750 -vt 0.000000 0.062500 -vt 0.000000 0.070313 -vn -0.258800 0.000000 -0.965900 -vn 0.258800 0.000000 0.965900 -vn 0.000000 1.000000 0.000000 -vn -0.000000 -1.000000 -0.000000 -vn 0.965900 0.000000 -0.258800 -vn -0.965900 0.000000 0.258800 -usemtl None -#s off -f 25/42/19 26/43/19 27/44/19 28/45/19 -f 29/46/20 30/47/20 31/48/20 32/49/20 -f 28/45/21 27/44/21 32/50/21 31/51/21 -f 30/44/22 29/49/22 26/52/22 25/50/22 -f 30/53/23 25/42/23 28/45/23 31/54/23 -f 26/43/24 29/46/24 32/49/24 27/44/24 -o Pipe1 -v -0.373208 1.087147 0.866346 -v -0.548929 1.122100 0.811057 -v -0.536736 1.183399 0.811057 -v -0.361015 1.148446 0.866346 -v -0.567004 1.125696 0.870778 -v -0.391284 1.090743 0.926067 -v -0.379091 1.152042 0.926067 -v -0.554811 1.186995 0.870778 -vt 0.007813 0.132813 -vt 0.031250 0.132813 -vt 0.031250 0.140625 -vt 0.007813 0.140625 -vt 0.039063 0.132813 -vt 0.062500 0.132813 -vt 0.062500 0.140625 -vt 0.039063 0.140625 -vt 0.031250 0.148438 -vt 0.007813 0.148438 -vt 0.054688 0.140625 -vt 0.054688 0.148438 -vt 0.000000 0.132813 -vt 0.000000 0.140625 -vn 0.289200 -0.057500 -0.955500 -vn -0.289200 0.057500 0.955500 -vn 0.195100 0.980800 -0.000000 -vn -0.195100 -0.980800 0.000000 -vn 0.937200 -0.186400 0.294900 -vn -0.937200 0.186400 -0.294900 -usemtl None -#s off -f 33/55/25 34/56/25 35/57/25 36/58/25 -f 37/59/26 38/60/26 39/61/26 40/62/26 -f 36/58/27 35/57/27 40/63/27 39/64/27 -f 38/57/28 37/65/28 34/66/28 33/63/28 -f 38/67/29 33/55/29 36/58/29 39/68/29 -f 34/56/30 37/59/30 40/62/30 35/57/30 -o Base -v 1.000000 0.002500 0.000000 -v -1.000000 0.002500 0.000000 -v -1.000000 0.127500 0.000000 -v 1.000000 0.127500 0.000000 -v -1.000000 0.002500 1.000000 -v 1.000000 0.002500 1.000000 -v 1.000000 0.127500 1.000000 -v -1.000000 0.127500 1.000000 -vt 0.125000 0.859375 -vt 0.375000 0.859375 -vt 0.375000 0.875000 -vt 0.125000 0.875000 -vt 0.500000 0.859375 -vt 0.750000 0.859375 -vt 0.750000 0.875000 -vt 0.500000 0.875000 -vt 0.375000 1.000000 -vt 0.125000 1.000000 -vt 0.625000 0.875000 -vt 0.625000 1.000000 -vt 0.000000 0.859375 -vt 0.000000 0.875000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -usemtl None -#s off -f 41/69/31 42/70/31 43/71/31 44/72/31 -f 45/73/32 46/74/32 47/75/32 48/76/32 -f 44/72/33 43/71/33 48/77/33 47/78/33 -f 46/71/34 45/79/34 42/80/34 41/77/34 -f 46/81/35 41/69/35 44/72/35 47/82/35 -f 42/70/36 45/73/36 48/76/36 43/71/36 -o Pipe2 -v -0.538497 1.119845 0.809794 -v -0.705303 1.166575 0.738041 -v -0.688443 1.226758 0.738041 -v -0.521637 1.180028 0.809794 -v -0.728334 1.173027 0.795784 -v -0.561528 1.126297 0.867537 -v -0.544668 1.186480 0.867537 -v -0.711474 1.233210 0.795784 -vt 0.007813 0.156250 -vt 0.031250 0.156250 -vt 0.031250 0.164063 -vt 0.007813 0.164063 -vt 0.039063 0.156250 -vt 0.062500 0.156250 -vt 0.062500 0.164063 -vt 0.039063 0.164063 -vt 0.031250 0.171875 -vt 0.007813 0.171875 -vt 0.054688 0.164063 -vt 0.054688 0.171875 -vt 0.000000 0.156250 -vt 0.000000 0.164063 -vn 0.368500 -0.103200 -0.923900 -vn -0.368500 0.103200 0.923900 -vn 0.269800 0.962900 0.000000 -vn -0.269800 -0.962900 0.000000 -vn 0.889600 -0.249200 0.382700 -vn -0.889600 0.249200 -0.382700 -usemtl None -#s off -f 49/83/37 50/84/37 51/85/37 52/86/37 -f 53/87/38 54/88/38 55/89/38 56/90/38 -f 52/86/39 51/85/39 56/91/39 55/92/39 -f 54/85/40 53/93/40 50/94/40 49/91/40 -f 54/95/41 49/83/41 52/86/41 55/96/41 -f 50/84/42 53/87/42 56/90/42 51/85/42 -o JarContent1 -v 0.897244 0.868750 0.414703 -v 0.775448 0.868750 0.442822 -v 0.775448 1.056250 0.442822 -v 0.897244 1.056250 0.414703 -v 0.803567 0.868750 0.564619 -v 0.925363 0.868750 0.536500 -v 0.925363 1.056250 0.536500 -v 0.803567 1.056250 0.564619 -vt 0.117188 0.406250 -vt 0.132813 0.406250 -vt 0.132813 0.429688 -vt 0.117188 0.429688 -vt 0.148438 0.406250 -vt 0.164063 0.406250 -vt 0.164063 0.429688 -vt 0.148438 0.429688 -vt 0.132813 0.445313 -vt 0.117188 0.445313 -vt 0.148438 0.445313 -vt 0.101563 0.406250 -vt 0.101563 0.429688 -vn -0.225000 0.000000 -0.974400 -vn 0.225000 -0.000000 0.974400 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.974400 -0.000000 -0.225000 -vn -0.974400 0.000000 0.225000 -usemtl None -#s off -f 57/97/43 58/98/43 59/99/43 60/100/43 -f 61/101/44 62/102/44 63/103/44 64/104/44 -f 60/100/45 59/99/45 64/105/45 63/106/45 -f 62/99/46 61/104/46 58/107/46 57/105/46 -f 62/108/47 57/97/47 60/100/47 63/109/47 -f 58/98/48 61/101/48 64/104/48 59/99/48 -o BeamCasing -v 0.875000 0.275000 0.437500 -v -0.875000 0.275000 0.437500 -v -0.875000 0.400000 0.437500 -v 0.875000 0.400000 0.437500 -v -0.875000 0.275000 0.562500 -v 0.875000 0.275000 0.562500 -v 0.875000 0.400000 0.562500 -v -0.875000 0.400000 0.562500 -vt 0.015625 0.500000 -vt 0.234375 0.500000 -vt 0.234375 0.515625 -vt 0.015625 0.515625 -vt 0.250000 0.500000 -vt 0.468750 0.500000 -vt 0.468750 0.515625 -vt 0.250000 0.515625 -vt 0.234375 0.531250 -vt 0.015625 0.531250 -vt 0.453125 0.515625 -vt 0.453125 0.531250 -vt 0.000000 0.500000 -vt 0.000000 0.515625 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -usemtl None -#s off -f 65/110/49 66/111/49 67/112/49 68/113/49 -f 69/114/50 70/115/50 71/116/50 72/117/50 -f 68/113/51 67/112/51 72/118/51 71/119/51 -f 70/112/52 69/120/52 66/121/52 65/118/52 -f 70/122/53 65/110/53 68/113/53 71/123/53 -f 66/111/54 69/114/54 72/117/54 67/112/54 -o CrucibleLeg2 -v -0.682350 0.837500 0.913320 -v -0.740093 0.837500 0.889403 -v -0.740093 0.962500 0.889403 -v -0.682350 0.962500 0.913320 -v -0.764011 0.837500 0.947145 -v -0.706268 0.837500 0.971063 -v -0.706268 0.962500 0.971063 -v -0.764011 0.962500 0.947145 -vt 0.007813 0.828125 -vt 0.015625 0.828125 -vt 0.015625 0.843750 -vt 0.007813 0.843750 -vt 0.023438 0.828125 -vt 0.031250 0.828125 -vt 0.031250 0.843750 -vt 0.023438 0.843750 -vt 0.015625 0.851563 -vt 0.007813 0.851563 -vt 0.023438 0.851563 -vt 0.000000 0.828125 -vt 0.000000 0.843750 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 0.000000 0.923900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 73/124/55 74/125/55 75/126/55 76/127/55 -f 77/128/56 78/129/56 79/130/56 80/131/56 -f 76/127/57 75/126/57 80/132/57 79/133/57 -f 78/126/58 77/131/58 74/134/58 73/132/58 -f 78/135/59 73/124/59 76/127/59 79/136/59 -f 74/125/60 77/128/60 80/131/60 75/126/60 -o Jar2 -v 0.897748 0.837500 0.809359 -v 0.765165 0.837500 0.676777 -v 0.765165 1.150000 0.676777 -v 0.897748 1.150000 0.809359 -v 0.632583 0.837500 0.809359 -v 0.765165 0.837500 0.941942 -v 0.765165 1.150000 0.941942 -v 0.632583 1.150000 0.809359 -vt 0.023438 0.312500 -vt 0.046875 0.312500 -vt 0.046875 0.351563 -vt 0.023438 0.351563 -vt 0.070313 0.312500 -vt 0.093750 0.312500 -vt 0.093750 0.351563 -vt 0.070313 0.351563 -vt 0.046875 0.375000 -vt 0.023438 0.375000 -vt 0.070313 0.375000 -vt 0.000000 0.312500 -vt 0.000000 0.351563 -vn 0.707100 0.000000 -0.707100 -vn -0.707100 -0.000000 0.707100 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.707100 0.000000 0.707100 -vn -0.707100 0.000000 -0.707100 -usemtl None -#s off -f 81/137/61 82/138/61 83/139/61 84/140/61 -f 85/141/62 86/142/62 87/143/62 88/144/62 -f 84/140/63 83/139/63 88/145/63 87/146/63 -f 86/139/64 85/144/64 82/147/64 81/145/64 -f 86/148/65 81/137/65 84/140/65 87/149/65 -f 82/138/66 85/141/66 88/144/66 83/139/66 -o Jar3 -v 0.546330 0.837500 0.810056 -v 0.365219 0.837500 0.761527 -v 0.365219 1.212500 0.761527 -v 0.546330 1.212500 0.810056 -v 0.316691 0.837500 0.942639 -v 0.497802 0.837500 0.991167 -v 0.497802 1.212500 0.991167 -v 0.316691 1.212500 0.942639 -vt 0.023438 0.179688 -vt 0.046875 0.179688 -vt 0.046875 0.226563 -vt 0.023438 0.226563 -vt 0.070313 0.179688 -vt 0.093750 0.179688 -vt 0.093750 0.226563 -vt 0.070313 0.226563 -vt 0.046875 0.250000 -vt 0.023438 0.250000 -vt 0.070313 0.250000 -vt 0.000000 0.179688 -vt 0.000000 0.226563 -vn 0.258800 0.000000 -0.965900 -vn -0.258800 -0.000000 0.965900 -vn -0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.965900 0.000000 0.258800 -vn -0.965900 0.000000 -0.258800 -usemtl None -#s off -f 89/150/67 90/151/67 91/152/67 92/153/67 -f 93/154/68 94/155/68 95/156/68 96/157/68 -f 92/153/69 91/152/69 96/158/69 95/159/69 -f 94/152/70 93/157/70 90/160/70 89/158/70 -f 94/161/71 89/150/71 92/153/71 95/162/71 -f 90/151/72 93/154/72 96/157/72 91/152/72 -o BeamCore -v 0.843750 0.306250 0.468750 -v -0.843750 0.306250 0.468750 -v -0.843750 0.368750 0.468750 -v 0.843750 0.368750 0.468750 -v -0.843750 0.306250 0.531250 -v 0.843750 0.306250 0.531250 -v 0.843750 0.368750 0.531250 -v -0.843750 0.368750 0.531250 -vt 0.007813 0.476563 -vt 0.218750 0.476563 -vt 0.218750 0.484375 -vt 0.007813 0.484375 -vt 0.226563 0.476563 -vt 0.437500 0.476563 -vt 0.437500 0.484375 -vt 0.226563 0.484375 -vt 0.218750 0.492188 -vt 0.007813 0.492188 -vt 0.429688 0.484375 -vt 0.429688 0.492188 -vt 0.000000 0.476563 -vt 0.000000 0.484375 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -usemtl None -#s off -f 97/163/73 98/164/73 99/165/73 100/166/73 -f 101/167/74 102/168/74 103/169/74 104/170/74 -f 100/166/75 99/165/75 104/171/75 103/172/75 -f 102/165/76 101/173/76 98/174/76 97/171/76 -f 102/175/77 97/163/77 100/166/77 103/176/77 -f 98/164/78 101/167/78 104/170/78 99/165/78 -o CrucibleSide1 -v -0.682350 0.962500 0.913320 -v -0.971063 0.962500 0.793732 -v -0.971063 1.025000 0.793732 -v -0.682350 1.025000 0.913320 -v -0.994980 0.962500 0.851474 -v -0.706268 0.962500 0.971063 -v -0.706268 1.025000 0.971063 -v -0.994980 1.025000 0.851474 -vt 0.007813 0.765625 -vt 0.046875 0.765625 -vt 0.046875 0.773438 -vt 0.007813 0.773438 -vt 0.054688 0.765625 -vt 0.093750 0.765625 -vt 0.093750 0.773438 -vt 0.054688 0.773438 -vt 0.046875 0.781250 -vt 0.007813 0.781250 -vt 0.085938 0.773438 -vt 0.085938 0.781250 -vt 0.000000 0.765625 -vt 0.000000 0.773438 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 0.000000 0.923900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 105/177/79 106/178/79 107/179/79 108/180/79 -f 109/181/80 110/182/80 111/183/80 112/184/80 -f 108/180/81 107/179/81 112/185/81 111/186/81 -f 110/179/82 109/187/82 106/188/82 105/185/82 -f 110/189/83 105/177/83 108/180/83 111/190/83 -f 106/178/84 109/181/84 112/184/84 107/179/84 -o JarContent3 -v 0.508057 0.868750 0.832153 -v 0.387316 0.868750 0.799801 -v 0.387316 1.181250 0.799801 -v 0.508057 1.181250 0.832153 -v 0.354964 0.868750 0.920541 -v 0.475705 0.868750 0.952894 -v 0.475705 1.181250 0.952894 -v 0.354964 1.181250 0.920541 -vt 0.117188 0.179688 -vt 0.132813 0.179688 -vt 0.132813 0.218750 -vt 0.117188 0.218750 -vt 0.148438 0.179688 -vt 0.164063 0.179688 -vt 0.164063 0.218750 -vt 0.148438 0.218750 -vt 0.132813 0.234375 -vt 0.117188 0.234375 -vt 0.148438 0.234375 -vt 0.101563 0.179688 -vt 0.101563 0.218750 -vn 0.258800 0.000000 -0.965900 -vn -0.258800 -0.000000 0.965900 -vn -0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.965900 0.000000 0.258800 -vn -0.965900 0.000000 -0.258800 -usemtl None -#s off -f 113/191/85 114/192/85 115/193/85 116/194/85 -f 117/195/86 118/196/86 119/197/86 120/198/86 -f 116/194/87 115/193/87 120/199/87 119/200/87 -f 118/193/88 117/198/88 114/201/88 113/199/88 -f 118/202/89 113/191/89 116/194/89 119/203/89 -f 114/192/90 117/195/90 120/198/90 115/193/90 -o CrucibleLeg4 -v -0.817649 0.837500 0.586680 -v -0.875392 0.837500 0.562762 -v -0.875392 0.962500 0.562762 -v -0.817649 0.962500 0.586680 -v -0.899310 0.837500 0.620504 -v -0.841567 0.837500 0.644422 -v -0.841567 0.962500 0.644422 -v -0.899310 0.962500 0.620504 -vt 0.007813 0.828125 -vt 0.015625 0.828125 -vt 0.015625 0.843750 -vt 0.007813 0.843750 -vt 0.023438 0.828125 -vt 0.031250 0.828125 -vt 0.031250 0.843750 -vt 0.023438 0.843750 -vt 0.015625 0.851563 -vt 0.007813 0.851563 -vt 0.023438 0.851563 -vt 0.000000 0.828125 -vt 0.000000 0.843750 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 0.000000 0.923900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 121/204/91 122/205/91 123/206/91 124/207/91 -f 125/208/92 126/209/92 127/210/92 128/211/92 -f 124/207/93 123/206/93 128/212/93 127/213/93 -f 126/206/94 125/211/94 122/214/94 121/212/94 -f 126/215/95 121/204/95 124/207/95 127/216/95 -f 122/205/96 125/208/96 128/211/96 123/206/96 -o Carpet2 -v -0.968750 0.524375 0.250000 -v -1.031250 0.524375 0.250000 -v -1.031250 0.836875 0.250000 -v -0.968750 0.836875 0.250000 -v -1.031250 0.524375 0.750000 -v -0.968750 0.524375 0.750000 -v -0.968750 0.836875 0.750000 -v -1.031250 0.836875 0.750000 -vt 0.695313 0.750000 -vt 0.703125 0.750000 -vt 0.703125 0.789063 -vt 0.695313 0.789063 -vt 0.765625 0.750000 -vt 0.773438 0.750000 -vt 0.773438 0.789063 -vt 0.765625 0.789063 -vt 0.703125 0.851563 -vt 0.695313 0.851563 -vt 0.710938 0.789063 -vt 0.710938 0.851563 -vt 0.632813 0.750000 -vt 0.632813 0.789063 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn -1.000000 -0.000000 0.000000 -usemtl None -#s off -f 129/217/97 130/218/97 131/219/97 132/220/97 -f 133/221/98 134/222/98 135/223/98 136/224/98 -f 132/220/99 131/219/99 136/225/99 135/226/99 -f 134/219/100 133/227/100 130/228/100 129/225/100 -f 134/229/101 129/217/101 132/220/101 135/230/101 -f 130/218/102 133/221/102 136/224/102 131/219/102 -o CrucibleLeg1 -v -0.913320 0.837500 0.817650 -v -0.971063 0.837500 0.793732 -v -0.971063 0.962500 0.793732 -v -0.913320 0.962500 0.817650 -v -0.994980 0.837500 0.851474 -v -0.937238 0.837500 0.875392 -v -0.937238 0.962500 0.875392 -v -0.994980 0.962500 0.851474 -vt 0.007813 0.828125 -vt 0.015625 0.828125 -vt 0.015625 0.843750 -vt 0.007813 0.843750 -vt 0.023438 0.828125 -vt 0.031250 0.828125 -vt 0.031250 0.843750 -vt 0.023438 0.843750 -vt 0.015625 0.851563 -vt 0.007813 0.851563 -vt 0.023438 0.851563 -vt 0.000000 0.828125 -vt 0.000000 0.843750 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 0.000000 0.923900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 137/231/103 138/232/103 139/233/103 140/234/103 -f 141/235/104 142/236/104 143/237/104 144/238/104 -f 140/234/105 139/233/105 144/239/105 143/240/105 -f 142/233/106 141/238/106 138/241/106 137/239/106 -f 142/242/107 137/231/107 140/234/107 143/243/107 -f 138/232/108 141/235/108 144/238/108 139/233/108 -o Top -v 1.000000 0.587500 0.000000 -v -1.000000 0.587500 0.000000 -v -1.000000 0.837500 0.000000 -v 1.000000 0.837500 0.000000 -v -1.000000 0.587500 1.000000 -v 1.000000 0.587500 1.000000 -v 1.000000 0.837500 1.000000 -v -1.000000 0.837500 1.000000 -vt 0.125000 0.695313 -vt 0.375000 0.695313 -vt 0.375000 0.726563 -vt 0.125000 0.726563 -vt 0.500000 0.695313 -vt 0.750000 0.695313 -vt 0.750000 0.726563 -vt 0.500000 0.726563 -vt 0.375000 0.851563 -vt 0.125000 0.851563 -vt 0.625000 0.726563 -vt 0.625000 0.851563 -vt 0.000000 0.695313 -vt 0.000000 0.726563 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 -0.000000 0.000000 -vn -1.000000 -0.000000 0.000000 -usemtl None -#s off -f 145/244/109 146/245/109 147/246/109 148/247/109 -f 149/248/110 150/249/110 151/250/110 152/251/110 -f 148/247/111 147/246/111 152/252/111 151/253/111 -f 150/246/112 149/254/112 146/255/112 145/252/112 -f 150/256/113 145/244/113 148/247/113 151/257/113 -f 146/245/114 149/248/114 152/251/114 147/246/114 -o Pillar2 -v -0.309500 -0.007739 0.312500 -v -0.674888 0.076617 0.312500 -v -0.534294 0.685599 0.312500 -v -0.168905 0.601242 0.312500 -v -0.674888 0.076617 0.687500 -v -0.309500 -0.007739 0.687500 -v -0.168905 0.601242 0.687500 -v -0.534294 0.685599 0.687500 -vt 0.046875 0.562500 -vt 0.093750 0.562500 -vt 0.093750 0.640625 -vt 0.046875 0.640625 -vt 0.140625 0.562500 -vt 0.187500 0.562500 -vt 0.187500 0.640625 -vt 0.140625 0.640625 -vt 0.093750 0.687500 -vt 0.046875 0.687500 -vt 0.140625 0.687500 -vt 0.000000 0.562500 -vt 0.000000 0.640625 -vn -0.000000 0.000000 -1.000000 -vn -0.000000 -0.000000 1.000000 -vn 0.225000 0.974400 0.000000 -vn -0.224900 -0.974400 -0.000000 -vn 0.974400 -0.225000 -0.000000 -vn -0.974400 0.225000 0.000000 -usemtl None -#s off -f 153/258/115 154/259/115 155/260/115 156/261/115 -f 157/262/116 158/263/116 159/264/116 160/265/116 -f 156/261/117 155/260/117 160/266/117 159/267/117 -f 158/260/118 157/265/118 154/268/118 153/266/118 -f 158/269/119 153/258/119 156/261/119 159/270/119 -f 154/259/120 157/262/120 160/265/120 155/260/120 -o Jar1 -v 0.920663 0.837500 0.377225 -v 0.737969 0.837500 0.419403 -v 0.737969 1.087500 0.419403 -v 0.920663 1.087500 0.377225 -v 0.780147 0.837500 0.602097 -v 0.962842 0.837500 0.559919 -v 0.962842 1.087500 0.559919 -v 0.780147 1.087500 0.602097 -vt 0.023438 0.406250 -vt 0.046875 0.406250 -vt 0.046875 0.437500 -vt 0.023438 0.437500 -vt 0.070313 0.406250 -vt 0.093750 0.406250 -vt 0.093750 0.437500 -vt 0.070313 0.437500 -vt 0.046875 0.460938 -vt 0.023438 0.460938 -vt 0.070313 0.460938 -vt 0.000000 0.406250 -vt 0.000000 0.437500 -vn -0.224900 0.000000 -0.974400 -vn 0.224900 -0.000000 0.974400 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.974400 0.000000 -0.225000 -vn -0.974400 0.000000 0.224900 -usemtl None -#s off -f 161/271/121 162/272/121 163/273/121 164/274/121 -f 165/275/122 166/276/122 167/277/122 168/278/122 -f 164/274/123 163/273/123 168/279/123 167/280/123 -f 166/273/124 165/278/124 162/281/124 161/279/124 -f 166/282/125 161/271/125 164/274/125 167/283/125 -f 162/272/126 165/275/126 168/278/126 163/273/126 -o Carpet1 -v 1.031250 0.524375 0.250000 -v 0.968750 0.524375 0.250000 -v 0.968750 0.836875 0.250000 -v 1.031250 0.836875 0.250000 -v 0.968750 0.524375 0.750000 -v 1.031250 0.524375 0.750000 -v 1.031250 0.836875 0.750000 -v 0.968750 0.836875 0.750000 -vt 0.695313 0.750000 -vt 0.703125 0.750000 -vt 0.703125 0.789063 -vt 0.695313 0.789063 -vt 0.765625 0.750000 -vt 0.773438 0.750000 -vt 0.773438 0.789063 -vt 0.765625 0.789063 -vt 0.703125 0.851563 -vt 0.695313 0.851563 -vt 0.710938 0.789063 -vt 0.710938 0.851563 -vt 0.632813 0.750000 -vt 0.632813 0.789063 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 -0.000000 0.000000 -vn -1.000000 0.000000 0.000000 -usemtl None -#s off -f 169/284/127 170/285/127 171/286/127 172/287/127 -f 173/288/128 174/289/128 175/290/128 176/291/128 -f 172/287/129 171/286/129 176/292/129 175/293/129 -f 174/286/130 173/294/130 170/295/130 169/292/130 -f 174/296/131 169/284/131 172/287/131 175/297/131 -f 170/285/132 173/288/132 176/291/132 171/286/132 -o CrucibleJarContent -v -0.709170 0.962500 0.733088 -v -0.824655 0.962500 0.685252 -v -0.824655 1.275000 0.685252 -v -0.709170 1.275000 0.733088 -v -0.872490 0.962500 0.800737 -v -0.757005 0.962500 0.848573 -v -0.757005 1.275000 0.848573 -v -0.872490 1.275000 0.800737 -vt 0.304688 0.179688 -vt 0.320313 0.179688 -vt 0.320313 0.218750 -vt 0.304688 0.218750 -vt 0.335938 0.179688 -vt 0.351563 0.179688 -vt 0.351563 0.218750 -vt 0.335938 0.218750 -vt 0.320313 0.234375 -vt 0.304688 0.234375 -vt 0.335938 0.234375 -vt 0.289063 0.179688 -vt 0.289063 0.218750 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 -0.000000 0.923900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 177/298/133 178/299/133 179/300/133 180/301/133 -f 181/302/134 182/303/134 183/304/134 184/305/134 -f 180/301/135 179/300/135 184/306/135 183/307/135 -f 182/300/136 181/305/136 178/308/136 177/306/136 -f 182/309/137 177/298/137 180/301/137 183/310/137 -f 178/299/138 181/302/138 184/305/138 179/300/138 -o CarpetLow2 -v -0.992678 0.412246 0.250000 -v -1.054228 0.423099 0.250000 -v -1.032522 0.546200 0.250000 -v -0.970972 0.535347 0.250000 -v -1.054228 0.423099 0.750000 -v -0.992678 0.412246 0.750000 -v -0.970972 0.535347 0.750000 -v -1.032522 0.546200 0.750000 -vt 0.843750 0.757813 -vt 0.851563 0.757813 -vt 0.851563 0.773438 -vt 0.843750 0.773438 -vt 0.914063 0.757813 -vt 0.921875 0.757813 -vt 0.921875 0.773438 -vt 0.914063 0.773438 -vt 0.851563 0.835938 -vt 0.843750 0.835938 -vt 0.859375 0.773438 -vt 0.859375 0.835938 -vt 0.781250 0.757813 -vt 0.781250 0.773438 -vn 0.000000 0.000000 -1.000000 -vn -0.000000 -0.000000 1.000000 -vn 0.173600 0.984800 0.000000 -vn -0.173600 -0.984800 -0.000000 -vn 0.984800 -0.173600 -0.000000 -vn -0.984800 0.173600 0.000000 -usemtl None -#s off -f 185/311/139 186/312/139 187/313/139 188/314/139 -f 189/315/140 190/316/140 191/317/140 192/318/140 -f 188/314/141 187/313/141 192/319/141 191/320/141 -f 190/313/142 189/321/142 186/322/142 185/319/142 -f 190/323/143 185/311/143 188/314/143 191/324/143 -f 186/312/144 189/315/144 192/318/144 187/313/144 -o CrucibleJar -v -0.668340 0.925000 0.716175 -v -0.841567 0.925000 0.644422 -v -0.841567 1.300000 0.644422 -v -0.668340 1.300000 0.716175 -v -0.913320 0.925000 0.817650 -v -0.740093 0.925000 0.889403 -v -0.740093 1.300000 0.889403 -v -0.913320 1.300000 0.817650 -vt 0.203125 0.179688 -vt 0.226563 0.179688 -vt 0.226563 0.226563 -vt 0.203125 0.226563 -vt 0.250000 0.179688 -vt 0.273438 0.179688 -vt 0.273438 0.226563 -vt 0.250000 0.226563 -vt 0.226563 0.250000 -vt 0.203125 0.250000 -vt 0.250000 0.250000 -vt 0.179688 0.179688 -vt 0.179688 0.226563 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 -0.000000 0.923900 -vn 0.000000 1.000000 -0.000000 -vn -0.000000 -1.000000 0.000000 -vn 0.923900 -0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 193/325/145 194/326/145 195/327/145 196/328/145 -f 197/329/146 198/330/146 199/331/146 200/332/146 -f 196/328/147 195/327/147 200/333/147 199/334/147 -f 198/327/148 197/332/148 194/335/148 193/333/148 -f 198/336/149 193/325/149 196/328/149 199/337/149 -f 194/326/150 197/329/150 200/332/150 195/327/150 -o DecanterContent -v -0.147097 0.868750 0.757023 -v -0.267838 0.868750 0.789376 -v -0.267838 0.993750 0.789376 -v -0.147097 0.993750 0.757023 -v -0.235485 0.868750 0.910116 -v -0.114745 0.868750 0.877764 -v -0.114745 0.993750 0.877764 -v -0.235485 0.993750 0.910116 -vt 0.117188 0.015625 -vt 0.132813 0.015625 -vt 0.132813 0.031250 -vt 0.117188 0.031250 -vt 0.148438 0.015625 -vt 0.164063 0.015625 -vt 0.164063 0.031250 -vt 0.148438 0.031250 -vt 0.132813 0.046875 -vt 0.117188 0.046875 -vt 0.148438 0.046875 -vt 0.101563 0.015625 -vt 0.101563 0.031250 -vn -0.258800 0.000000 -0.965900 -vn 0.258800 0.000000 0.965900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.965900 0.000000 -0.258800 -vn -0.965900 0.000000 0.258800 -usemtl None -#s off -f 201/338/151 202/339/151 203/340/151 204/341/151 -f 205/342/152 206/343/152 207/344/152 208/345/152 -f 204/341/153 203/340/153 208/346/153 207/347/153 -f 206/340/154 205/345/154 202/348/154 201/346/154 -f 206/349/155 201/338/155 204/341/155 207/350/155 -f 202/339/156 205/342/156 208/345/156 203/340/156 -o Pillar1 -v 0.674888 0.076617 0.312500 -v 0.309499 -0.007739 0.312500 -v 0.168905 0.601242 0.312500 -v 0.534294 0.685598 0.312500 -v 0.309499 -0.007739 0.687500 -v 0.674888 0.076617 0.687500 -v 0.534294 0.685598 0.687500 -v 0.168905 0.601242 0.687500 -vt 0.046875 0.562500 -vt 0.093750 0.562500 -vt 0.093750 0.640625 -vt 0.046875 0.640625 -vt 0.140625 0.562500 -vt 0.187500 0.562500 -vt 0.187500 0.640625 -vt 0.140625 0.640625 -vt 0.093750 0.687500 -vt 0.046875 0.687500 -vt 0.140625 0.687500 -vt 0.000000 0.562500 -vt 0.000000 0.640625 -vn -0.000000 0.000000 -1.000000 -vn -0.000000 -0.000000 1.000000 -vn -0.224900 0.974400 0.000000 -vn 0.224900 -0.974400 -0.000000 -vn 0.974400 0.225000 0.000000 -vn -0.974400 -0.225000 -0.000000 -usemtl None -#s off -f 209/351/157 210/352/157 211/353/157 212/354/157 -f 213/355/158 214/356/158 215/357/158 216/358/158 -f 212/354/159 211/353/159 216/359/159 215/360/159 -f 214/353/160 213/358/160 210/361/160 209/359/160 -f 214/362/161 209/351/161 212/354/161 215/363/161 -f 210/352/162 213/355/162 216/358/162 211/353/162 -o CrucibleSide4 -v -0.841567 0.962500 0.644422 -v -0.899310 0.962500 0.620504 -v -0.899310 1.025000 0.620504 -v -0.841567 1.025000 0.644422 -v -0.971063 0.962500 0.793732 -v -0.913320 0.962500 0.817650 -v -0.913320 1.025000 0.817650 -v -0.971063 1.025000 0.793732 -vt 0.078125 0.796875 -vt 0.085938 0.796875 -vt 0.085938 0.804688 -vt 0.078125 0.804688 -vt 0.109375 0.796875 -vt 0.117188 0.796875 -vt 0.117188 0.804688 -vt 0.109375 0.804688 -vt 0.085938 0.828125 -vt 0.078125 0.828125 -vt 0.093750 0.804688 -vt 0.093750 0.828125 -vt 0.054688 0.796875 -vt 0.054688 0.804688 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 -0.000000 0.923900 -vn 0.000000 1.000000 -0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 217/364/163 218/365/163 219/366/163 220/367/163 -f 221/368/164 222/369/164 223/370/164 224/371/164 -f 220/367/165 219/366/165 224/372/165 223/373/165 -f 222/366/166 221/374/166 218/375/166 217/372/166 -f 222/376/167 217/364/167 220/367/167 223/377/167 -f 218/365/168 221/368/168 224/371/168 219/366/168 -o JarContent2 -v 0.853553 0.868750 0.809359 -v 0.765165 0.868750 0.720971 -v 0.765165 1.118750 0.720971 -v 0.853553 1.118750 0.809359 -v 0.676777 0.868750 0.809359 -v 0.765165 0.868750 0.897748 -v 0.765165 1.118750 0.897748 -v 0.676777 1.118750 0.809359 -vt 0.117188 0.312500 -vt 0.132813 0.312500 -vt 0.132813 0.343750 -vt 0.117188 0.343750 -vt 0.148438 0.312500 -vt 0.164063 0.312500 -vt 0.164063 0.343750 -vt 0.148438 0.343750 -vt 0.132813 0.359375 -vt 0.117188 0.359375 -vt 0.148438 0.359375 -vt 0.101563 0.312500 -vt 0.101563 0.343750 -vn 0.707100 0.000000 -0.707100 -vn -0.707100 0.000000 0.707100 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.707100 0.000000 0.707100 -vn -0.707100 0.000000 -0.707100 -usemtl None -#s off -f 225/378/169 226/379/169 227/380/169 228/381/169 -f 229/382/170 230/383/170 231/384/170 232/385/170 -f 228/381/171 227/380/171 232/386/171 231/387/171 -f 230/380/172 229/385/172 226/388/172 225/386/172 -f 230/389/173 225/378/173 228/381/173 231/390/173 -f 226/379/174 229/382/174 232/385/174 227/380/174 -o CarpetLowest1 -v 1.113075 0.330031 0.250000 -v 1.057387 0.301657 0.250000 -v 1.000638 0.413033 0.250000 -v 1.056326 0.441407 0.250000 -v 1.057387 0.301657 0.750000 -v 1.113075 0.330031 0.750000 -v 1.056326 0.441407 0.750000 -v 1.000638 0.413033 0.750000 -vt 0.843750 0.664063 -vt 0.851563 0.664063 -vt 0.851563 0.679688 -vt 0.843750 0.679688 -vt 0.914063 0.664063 -vt 0.921875 0.664063 -vt 0.921875 0.679688 -vt 0.914063 0.679688 -vt 0.851563 0.742188 -vt 0.843750 0.742188 -vt 0.859375 0.679688 -vt 0.859375 0.742188 -vt 0.781250 0.664063 -vt 0.781250 0.679688 -vn -0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn -0.454000 0.891000 0.000000 -vn 0.454000 -0.891000 -0.000000 -vn 0.891000 0.454000 0.000000 -vn -0.891000 -0.454000 -0.000000 -usemtl None -#s off -f 233/391/175 234/392/175 235/393/175 236/394/175 -f 237/395/176 238/396/176 239/397/176 240/398/176 -f 236/394/177 235/393/177 240/399/177 239/400/177 -f 238/393/178 237/401/178 234/402/178 233/399/178 -f 238/403/179 233/391/179 236/394/179 239/404/179 -f 234/392/180 237/395/180 240/398/180 235/393/180 -o Decanter3 -v -0.220741 1.087500 0.813602 -v -0.401852 1.087500 0.862131 -v -0.401852 1.150000 0.862131 -v -0.220741 1.150000 0.813602 -v -0.385676 1.087500 0.922501 -v -0.204564 1.087500 0.873973 -v -0.204564 1.150000 0.873973 -v -0.385676 1.150000 0.922501 -vt 0.007813 0.109375 -vt 0.031250 0.109375 -vt 0.031250 0.117188 -vt 0.007813 0.117188 -vt 0.039063 0.109375 -vt 0.062500 0.109375 -vt 0.062500 0.117188 -vt 0.039063 0.117188 -vt 0.031250 0.125000 -vt 0.007813 0.125000 -vt 0.054688 0.117188 -vt 0.054688 0.125000 -vt 0.000000 0.109375 -vt 0.000000 0.117188 -vn -0.258800 0.000000 -0.965900 -vn 0.258800 0.000000 0.965900 -vn 0.000000 1.000000 0.000000 -vn -0.000000 -1.000000 -0.000000 -vn 0.965900 0.000000 -0.258800 -vn -0.965900 0.000000 0.258800 -usemtl None -#s off -f 241/405/181 242/406/181 243/407/181 244/408/181 -f 245/409/182 246/410/182 247/411/182 248/412/182 -f 244/408/183 243/407/183 248/413/183 247/414/183 -f 246/407/184 245/415/184 242/416/184 241/413/184 -f 246/417/185 241/405/185 244/408/185 247/418/185 -f 242/406/186 245/409/186 248/412/186 243/407/186 -o CrucibleSide3 -v -0.610597 0.962500 0.740093 -v -0.668340 0.962500 0.716175 -v -0.668340 1.025000 0.716175 -v -0.610597 1.025000 0.740093 -v -0.740093 0.962500 0.889403 -v -0.682350 0.962500 0.913320 -v -0.682350 1.025000 0.913320 -v -0.740093 1.025000 0.889403 -vt 0.078125 0.796875 -vt 0.085938 0.796875 -vt 0.085938 0.804688 -vt 0.078125 0.804688 -vt 0.109375 0.796875 -vt 0.117188 0.796875 -vt 0.117188 0.804688 -vt 0.109375 0.804688 -vt 0.085938 0.828125 -vt 0.078125 0.828125 -vt 0.093750 0.804688 -vt 0.093750 0.828125 -vt 0.054688 0.796875 -vt 0.054688 0.804688 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 -0.000000 0.923900 -vn -0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 249/419/187 250/420/187 251/421/187 252/422/187 -f 253/423/188 254/424/188 255/425/188 256/426/188 -f 252/422/189 251/421/189 256/427/189 255/428/189 -f 254/421/190 253/429/190 250/430/190 249/427/190 -f 254/431/191 249/419/191 252/422/191 255/432/191 -f 250/420/192 253/423/192 256/426/192 251/421/192 -o Recipe -v 0.746155 0.846250 0.501083 -v 0.490214 0.846250 0.775162 -v 0.216135 0.846250 0.519221 -v 0.472076 0.846250 0.245142 -vt 0.046875 0.953125 -vt 0.093750 0.953125 -vt 0.093750 1.000000 -vt 0.046875 1.000000 -vn 0.000000 1.000000 -0.000000 -usemtl None -#s off -f 260/433/193 259/434/193 258/435/193 257/436/193 -o CrucibleSide2 -v -0.586680 0.962500 0.682350 -v -0.875392 0.962500 0.562762 -v -0.875392 1.025000 0.562762 -v -0.586680 1.025000 0.682350 -v -0.899310 0.962500 0.620504 -v -0.610597 0.962500 0.740093 -v -0.610597 1.025000 0.740093 -v -0.899310 1.025000 0.620504 -vt 0.007813 0.765625 -vt 0.046875 0.765625 -vt 0.046875 0.773438 -vt 0.007813 0.773438 -vt 0.054688 0.765625 -vt 0.093750 0.765625 -vt 0.093750 0.773438 -vt 0.054688 0.773438 -vt 0.046875 0.781250 -vt 0.007813 0.781250 -vt 0.085938 0.773438 -vt 0.085938 0.781250 -vt 0.000000 0.765625 -vt 0.000000 0.773438 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 0.000000 0.923900 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 261/437/194 262/438/194 263/439/194 264/440/194 -f 265/441/195 266/442/195 267/443/195 268/444/195 -f 264/440/196 263/439/196 268/445/196 267/446/196 -f 266/439/197 265/447/197 262/448/197 261/445/197 -f 266/449/198 261/437/198 264/440/198 267/450/198 -f 262/438/199 265/441/199 268/444/199 263/439/199 -o CrucibleLeg3 -v -0.586680 0.837500 0.682350 -v -0.644422 0.837500 0.658433 -v -0.644422 0.962500 0.658433 -v -0.586680 0.962500 0.682350 -v -0.668340 0.837500 0.716175 -v -0.610597 0.837500 0.740093 -v -0.610597 0.962500 0.740093 -v -0.668340 0.962500 0.716175 -vt 0.007813 0.828125 -vt 0.015625 0.828125 -vt 0.015625 0.843750 -vt 0.007813 0.843750 -vt 0.023438 0.828125 -vt 0.031250 0.828125 -vt 0.031250 0.843750 -vt 0.023438 0.843750 -vt 0.015625 0.851563 -vt 0.007813 0.851563 -vt 0.023438 0.851563 -vt 0.000000 0.828125 -vt 0.000000 0.843750 -vn 0.382700 0.000000 -0.923900 -vn -0.382700 -0.000000 0.923900 -vn -0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.923900 -0.000000 0.382700 -vn -0.923900 0.000000 -0.382700 -usemtl None -#s off -f 269/451/200 270/452/200 271/453/200 272/454/200 -f 273/455/201 274/456/201 275/457/201 276/458/201 -f 272/454/202 271/453/202 276/459/202 275/460/202 -f 274/453/203 273/458/203 270/461/203 269/459/203 -f 274/462/204 269/451/204 272/454/204 275/463/204 -f 270/452/205 273/455/205 276/458/205 271/453/205 diff --git a/src/main/resources/assets/bloodmagic/models/block/alchemytable.json b/src/main/resources/assets/bloodmagic/models/block/alchemytable.json new file mode 100644 index 00000000..60db6215 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/alchemytable.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/modelalchemytable.obj", + "textures": { + "default": "bloodmagic:models/alchemytable", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/alchemytable_invis.json b/src/main/resources/assets/bloodmagic/models/block/alchemytable_invis.json new file mode 100644 index 00000000..24550069 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/alchemytable_invis.json @@ -0,0 +1,5 @@ +{ + "textures": { + "particle": "bloodmagic:models/alchemytable" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockAlchemyArray.json b/src/main/resources/assets/bloodmagic/models/block/blockalchemyarray.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockAlchemyArray.json rename to src/main/resources/assets/bloodmagic/models/block/blockalchemyarray.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockAltar.mtl b/src/main/resources/assets/bloodmagic/models/block/blockaltar.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockAltar.mtl rename to src/main/resources/assets/bloodmagic/models/block/blockaltar.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/blockaltar.obj b/src/main/resources/assets/bloodmagic/models/block/blockaltar.obj new file mode 100644 index 00000000..0d33a216 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockaltar.obj @@ -0,0 +1,390 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib blockaltar.mtl +o Shape1 +v 0.000000 0.500000 1.000000 +v 0.000000 -0.000000 1.000000 +v 1.000000 -0.000000 1.000000 +v 1.000000 0.500000 1.000000 +v 1.000000 0.500000 -0.000000 +v 1.000000 0.000000 -0.000000 +v 0.000000 0.000000 -0.000000 +v 0.000000 0.500000 -0.000000 +v 0.068534 0.771784 -0.108243 +v 0.022324 0.024636 -0.154453 +v -0.154453 0.024636 0.022324 +v -0.108243 0.771784 0.068534 +v 0.067862 0.750000 0.244638 +v 0.021652 0.002853 0.198428 +v 0.198428 0.002853 0.021651 +v 0.244638 0.750000 0.067862 +v 1.108243 0.771784 0.068534 +v 1.154453 0.024636 0.022324 +v 0.977676 0.024636 -0.154453 +v 0.931466 0.771784 -0.108243 +v 0.755362 0.750000 0.067862 +v 0.801572 0.002853 0.021651 +v 0.978348 0.002853 0.198428 +v 0.932138 0.750000 0.244638 +v 0.000000 0.750000 1.000000 +v 0.000000 0.500000 1.000000 +v 1.000000 0.500000 1.000000 +v 1.000000 0.750000 1.000000 +v 1.000000 0.750000 0.812500 +v 1.000000 0.500000 0.812500 +v 0.000000 0.500000 0.812500 +v 0.000000 0.750000 0.812500 +v 0.000000 0.750000 0.187500 +v 0.000000 0.500000 0.187500 +v 1.000000 0.500000 0.187500 +v 1.000000 0.750000 0.187500 +v 1.000000 0.750000 -0.000000 +v 1.000000 0.500000 -0.000000 +v 0.000000 0.500000 -0.000000 +v 0.000000 0.750000 -0.000000 +v 0.000000 0.750000 0.812500 +v 0.000000 0.500000 0.812500 +v 0.187500 0.500000 0.812500 +v 0.187500 0.750000 0.812500 +v 0.187500 0.750000 0.187500 +v 0.187500 0.500000 0.187500 +v 0.000000 0.500000 0.187500 +v 0.000000 0.750000 0.187500 +v 0.931466 0.771784 1.108243 +v 0.977676 0.024636 1.154453 +v 1.154453 0.024636 0.977676 +v 1.108243 0.771784 0.931466 +v 0.932138 0.750000 0.755362 +v 0.978348 0.002853 0.801571 +v 0.801572 0.002852 0.978348 +v 0.755362 0.750000 0.932138 +v -0.108243 0.771784 0.931466 +v -0.154453 0.024636 0.977676 +v 0.022324 0.024636 1.154453 +v 0.068534 0.771784 1.108243 +v 0.244638 0.750000 0.932138 +v 0.198428 0.002852 0.978348 +v 0.021652 0.002853 0.801571 +v 0.067862 0.750000 0.755362 +v 0.812500 0.750000 0.812500 +v 0.812500 0.500000 0.812500 +v 1.000000 0.500000 0.812500 +v 1.000000 0.750000 0.812500 +v 1.000000 0.750000 0.187500 +v 1.000000 0.500000 0.187500 +v 0.812500 0.500000 0.187500 +v 0.812500 0.750000 0.187500 +v 0.375000 0.687500 1.000000 +v 0.375000 0.002615 1.059905 +v 0.625000 0.002615 1.059905 +v 0.625000 0.687500 1.000000 +v 0.625000 0.665716 0.750951 +v 0.625000 -0.019169 0.810856 +v 0.375000 -0.019169 0.810856 +v 0.375000 0.665716 0.750951 +v 0.625000 0.687500 -0.000000 +v 0.625000 0.002615 -0.059905 +v 0.375000 0.002615 -0.059905 +v 0.375000 0.687500 -0.000000 +v 0.375000 0.665716 0.249049 +v 0.375000 -0.019169 0.189144 +v 0.625000 -0.019169 0.189144 +v 0.625000 0.665716 0.249049 +v 1.000000 0.687500 0.625000 +v 1.059905 0.002615 0.625000 +v 1.059905 0.002615 0.375000 +v 1.000000 0.687500 0.375000 +v 0.750951 0.665716 0.375000 +v 0.810856 -0.019169 0.375000 +v 0.810856 -0.019169 0.625000 +v 0.750951 0.665716 0.625000 +v 0.000000 0.687500 0.375000 +v -0.059905 0.002615 0.375000 +v -0.059905 0.002615 0.625000 +v 0.000000 0.687500 0.625000 +v 0.249049 0.665716 0.625000 +v 0.189144 -0.019169 0.625000 +v 0.189144 -0.019169 0.375000 +v 0.249049 0.665716 0.375000 +vt 0.125000 0.875000 +vt 0.125000 0.812500 +vt 0.250000 0.812500 +vt 0.250000 0.875000 +vt 0.375000 0.875000 +vt 0.375000 0.812500 +vt 0.500000 0.812500 +vt 0.500000 0.875000 +vt 0.125000 1.000000 +vt 0.250000 1.000000 +vt 0.375000 1.000000 +vt 0.000000 0.875000 +vt 0.000000 0.812500 +vt 0.156250 0.531250 +vt 0.156250 0.437500 +vt 0.187500 0.437500 +vt 0.187500 0.531250 +vt 0.218750 0.531250 +vt 0.218750 0.437500 +vt 0.250000 0.437500 +vt 0.250000 0.531250 +vt 0.156250 0.562500 +vt 0.187500 0.562500 +vt 0.218750 0.562500 +vt 0.125000 0.531250 +vt 0.125000 0.437500 +vt 0.031250 0.531250 +vt 0.031250 0.437500 +vt 0.062500 0.437500 +vt 0.062500 0.531250 +vt 0.093750 0.531250 +vt 0.093750 0.437500 +vt 0.031250 0.562500 +vt 0.062500 0.562500 +vt 0.093750 0.562500 +vt 0.000000 0.531250 +vt 0.000000 0.437500 +vt 0.023438 0.789062 +vt 0.023438 0.757812 +vt 0.148438 0.757812 +vt 0.148438 0.789062 +vt 0.171875 0.789062 +vt 0.171875 0.757812 +vt 0.296875 0.757812 +vt 0.296875 0.789062 +vt 0.023438 0.812500 +vt 0.148438 0.812500 +vt 0.273438 0.789062 +vt 0.273438 0.812500 +vt 0.000000 0.789062 +vt 0.000000 0.757812 +vt 0.023438 0.734375 +vt 0.023438 0.703125 +vt 0.148438 0.703125 +vt 0.148438 0.734375 +vt 0.171875 0.734375 +vt 0.171875 0.703125 +vt 0.296875 0.703125 +vt 0.296875 0.734375 +vt 0.273438 0.734375 +vt 0.273438 0.757812 +vt 0.000000 0.734375 +vt 0.000000 0.703125 +vt 0.367188 0.734375 +vt 0.367188 0.703125 +vt 0.390625 0.703125 +vt 0.390625 0.734375 +vt 0.468750 0.734375 +vt 0.468750 0.703125 +vt 0.492188 0.703125 +vt 0.492188 0.734375 +vt 0.367188 0.812500 +vt 0.390625 0.812500 +vt 0.414062 0.734375 +vt 0.414062 0.812500 +vt 0.289062 0.734375 +vt 0.289062 0.703125 +vt 0.156250 0.671875 +vt 0.156250 0.578125 +vt 0.187500 0.578125 +vt 0.187500 0.671875 +vt 0.218750 0.671875 +vt 0.218750 0.578125 +vt 0.250000 0.578125 +vt 0.250000 0.671875 +vt 0.156250 0.703125 +vt 0.187500 0.703125 +vt 0.218750 0.703125 +vt 0.125000 0.671875 +vt 0.125000 0.578125 +vt 0.031250 0.671875 +vt 0.031250 0.578125 +vt 0.062500 0.578125 +vt 0.062500 0.671875 +vt 0.093750 0.671875 +vt 0.093750 0.578125 +vt 0.031250 0.703125 +vt 0.062500 0.703125 +vt 0.093750 0.703125 +vt 0.000000 0.671875 +vt 0.000000 0.578125 +vt 0.367188 0.625000 +vt 0.367188 0.593750 +vt 0.390625 0.593750 +vt 0.390625 0.625000 +vt 0.468750 0.625000 +vt 0.468750 0.593750 +vt 0.492188 0.593750 +vt 0.492188 0.625000 +vt 0.414062 0.625000 +vt 0.414062 0.703125 +vt 0.289062 0.625000 +vt 0.289062 0.593750 +vt 0.031250 0.281250 +vt 0.031250 0.195312 +vt 0.062500 0.195312 +vt 0.062500 0.281250 +vt 0.093750 0.281250 +vt 0.093750 0.195312 +vt 0.125000 0.195312 +vt 0.125000 0.281250 +vt 0.031250 0.312500 +vt 0.062500 0.312500 +vt 0.093750 0.312500 +vt 0.000000 0.281250 +vt 0.000000 0.195312 +vt 0.031250 0.140625 +vt 0.031250 0.054688 +vt 0.062500 0.054688 +vt 0.062500 0.140625 +vt 0.093750 0.140625 +vt 0.093750 0.054688 +vt 0.125000 0.054688 +vt 0.125000 0.140625 +vt 0.031250 0.171875 +vt 0.062500 0.171875 +vt 0.093750 0.171875 +vt 0.000000 0.140625 +vt 0.000000 0.054688 +vt 0.156250 0.140625 +vt 0.156250 0.054688 +vt 0.187500 0.054688 +vt 0.187500 0.140625 +vt 0.218750 0.140625 +vt 0.218750 0.054688 +vt 0.250000 0.054688 +vt 0.250000 0.140625 +vt 0.156250 0.171875 +vt 0.187500 0.171875 +vt 0.218750 0.171875 +vt 0.156250 0.281250 +vt 0.156250 0.195312 +vt 0.187500 0.195312 +vt 0.187500 0.281250 +vt 0.218750 0.281250 +vt 0.218750 0.195312 +vt 0.250000 0.195312 +vt 0.250000 0.281250 +vt 0.156250 0.312500 +vt 0.187500 0.312500 +vt 0.218750 0.312500 +vn 0.000000 -0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -0.704400 0.087100 -0.704400 +vn 0.704400 -0.087100 0.704400 +vn 0.061600 0.996200 0.061600 +vn -0.061600 -0.996200 -0.061600 +vn -0.707100 -0.000000 0.707100 +vn 0.707100 0.000000 -0.707100 +vn 0.704400 0.087100 -0.704400 +vn -0.704400 -0.087100 0.704400 +vn -0.061600 0.996200 0.061600 +vn 0.061600 -0.996200 -0.061600 +vn -0.707100 0.000000 -0.707100 +vn 0.707100 -0.000000 0.707100 +vn 0.704400 0.087100 0.704400 +vn -0.704400 -0.087100 -0.704400 +vn -0.061600 0.996200 -0.061600 +vn 0.061600 -0.996200 0.061600 +vn -0.704400 0.087100 0.704400 +vn 0.704400 -0.087100 -0.704400 +vn 0.061600 0.996200 -0.061600 +vn -0.061600 -0.996200 0.061600 +vn 0.000000 0.087100 0.996200 +vn 0.000000 -0.087100 -0.996200 +vn 0.000000 0.996200 -0.087100 +vn 0.000000 -0.996200 0.087100 +vn 0.000000 0.087100 -0.996200 +vn 0.000000 -0.087100 0.996200 +vn 0.000000 0.996200 0.087100 +vn 0.000000 -0.996200 -0.087100 +vn 0.996200 0.087100 0.000000 +vn -0.996200 -0.087100 0.000000 +vn -0.087100 0.996200 0.000000 +vn 0.087100 -0.996200 0.000000 +vn -0.996200 0.087100 0.000000 +vn 0.996200 -0.087100 0.000000 +vn 0.087100 0.996200 0.000000 +vn -0.087100 -0.996200 0.000000 +usemtl Meta +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 8/9/3 1/1/3 4/4/3 5/10/3 +f 2/5/4 7/11/4 6/10/4 3/4/4 +f 5/5/5 4/4/5 3/3/5 6/6/5 +f 8/12/6 7/13/6 2/2/6 1/1/6 +f 9/14/7 10/15/7 11/16/7 12/17/7 +f 13/18/8 14/19/8 15/20/8 16/21/8 +f 16/22/9 9/14/9 12/17/9 13/23/9 +f 10/18/10 15/24/10 14/23/10 11/17/10 +f 13/18/11 12/17/11 11/16/11 14/19/11 +f 16/25/12 15/26/12 10/15/12 9/14/12 +f 17/27/13 18/28/13 19/29/13 20/30/13 +f 21/31/14 22/32/14 23/26/14 24/25/14 +f 24/33/15 17/27/15 20/30/15 21/34/15 +f 18/31/16 23/35/16 22/34/16 19/30/16 +f 21/31/17 20/30/17 19/29/17 22/32/17 +f 24/36/18 23/37/18 18/28/18 17/27/18 +f 25/38/1 26/39/1 27/40/1 28/41/1 +f 29/42/2 30/43/2 31/44/2 32/45/2 +f 32/46/3 25/38/3 28/41/3 29/47/3 +f 26/48/4 31/49/4 30/47/4 27/41/4 +f 29/42/5 28/41/5 27/40/5 30/43/5 +f 32/50/6 31/51/6 26/39/6 25/38/6 +f 33/52/1 34/53/1 35/54/1 36/55/1 +f 37/56/2 38/57/2 39/58/2 40/59/2 +f 40/39/3 33/52/3 36/55/3 37/40/3 +f 34/60/4 39/61/4 38/40/4 35/55/4 +f 37/56/5 36/55/5 35/54/5 38/57/5 +f 40/62/6 39/63/6 34/53/6 33/52/6 +f 41/64/1 42/65/1 43/66/1 44/67/1 +f 45/68/2 46/69/2 47/70/2 48/71/2 +f 48/72/3 41/64/3 44/67/3 45/73/3 +f 42/74/4 47/75/4 46/73/4 43/67/4 +f 45/68/5 44/67/5 43/66/5 46/69/5 +f 48/76/6 47/77/6 42/65/6 41/64/6 +f 49/78/19 50/79/19 51/80/19 52/81/19 +f 53/82/20 54/83/20 55/84/20 56/85/20 +f 56/86/21 49/78/21 52/81/21 53/87/21 +f 50/82/22 55/88/22 54/87/22 51/81/22 +f 53/82/12 52/81/12 51/80/12 54/83/12 +f 56/89/11 55/90/11 50/79/11 49/78/11 +f 57/91/23 58/92/23 59/93/23 60/94/23 +f 61/95/24 62/96/24 63/90/24 64/89/24 +f 64/97/25 57/91/25 60/94/25 61/98/25 +f 58/95/26 63/99/26 62/98/26 59/94/26 +f 61/95/18 60/94/18 59/93/18 62/96/18 +f 64/100/17 63/101/17 58/92/17 57/91/17 +f 65/102/1 66/103/1 67/104/1 68/105/1 +f 69/106/2 70/107/2 71/108/2 72/109/2 +f 72/65/3 65/102/3 68/105/3 69/66/3 +f 66/110/4 71/111/4 70/66/4 67/105/4 +f 69/106/5 68/105/5 67/104/5 70/107/5 +f 72/112/6 71/113/6 66/103/6 65/102/6 +f 73/114/27 74/115/27 75/116/27 76/117/27 +f 77/118/28 78/119/28 79/120/28 80/121/28 +f 80/122/29 73/114/29 76/117/29 77/123/29 +f 74/118/30 79/124/30 78/123/30 75/117/30 +f 77/118/5 76/117/5 75/116/5 78/119/5 +f 80/125/6 79/126/6 74/115/6 73/114/6 +f 81/127/31 82/128/31 83/129/31 84/130/31 +f 85/131/32 86/132/32 87/133/32 88/134/32 +f 88/135/33 81/127/33 84/130/33 85/136/33 +f 82/131/34 87/137/34 86/136/34 83/130/34 +f 85/131/6 84/130/6 83/129/6 86/132/6 +f 88/138/5 87/139/5 82/128/5 81/127/5 +f 89/140/35 90/141/35 91/142/35 92/143/35 +f 93/144/36 94/145/36 95/146/36 96/147/36 +f 96/148/37 89/140/37 92/143/37 93/149/37 +f 90/144/38 95/150/38 94/149/38 91/143/38 +f 93/144/2 92/143/2 91/142/2 94/145/2 +f 96/134/1 95/133/1 90/141/1 89/140/1 +f 97/151/39 98/152/39 99/153/39 100/154/39 +f 101/155/40 102/156/40 103/157/40 104/158/40 +f 104/159/41 97/151/41 100/154/41 101/160/41 +f 98/155/42 103/161/42 102/160/42 99/154/42 +f 101/155/1 100/154/1 99/153/1 102/156/1 +f 104/121/2 103/120/2 98/152/2 97/151/2 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockBlank.json b/src/main/resources/assets/bloodmagic/models/block/blockblank.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockBlank.json rename to src/main/resources/assets/bloodmagic/models/block/blockblank.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockBloodLight.json b/src/main/resources/assets/bloodmagic/models/block/blockbloodlight.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockBloodLight.json rename to src/main/resources/assets/bloodmagic/models/block/blockbloodlight.json diff --git a/src/main/resources/assets/bloodmagic/models/block/blockbloodtank.json b/src/main/resources/assets/bloodmagic/models/block/blockbloodtank.json new file mode 100644 index 00000000..8ec58735 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockbloodtank.json @@ -0,0 +1,433 @@ +{ + "__comment": "Copyright © InsomniaKitten 2017", + "textures": { + "particle": "bloodmagic:blocks/BlankRune", + "texture": "bloodmagic:blocks/BloodTank" + }, + "elements": [ + { + "__comment": "Voxels-80FF00", + "from": [ 3, 0, 3 ], + "to": [ 13, 1, 13 ], + "faces": { + "down": { "uv": [ 5, 0, 10, 5 ], "texture": "#texture", "cullface": "down" }, + "up": { "uv": [ 5, 0, 10, 5 ], "texture": "#texture" }, + "north": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" }, + "south": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" }, + "west": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" }, + "east": { "uv": [ 0, 6.5, 5, 7 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF00FF", + "from": [ 3, 1, 3 ], + "to": [ 4, 14, 4 ], + "faces": { + "up": { "uv": [ 4.5, 11.5, 5, 12 ], "texture": "#texture" }, + "north": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 3, 1, 4 ], + "to": [ 4, 12, 5 ], + "faces": { + "up": { "uv": [ 4.5, 11, 5, 11.5 ], "texture": "#texture" }, + "south": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-71FFFF", + "from": [ 3, 1, 5 ], + "to": [ 4, 2, 11 ], + "faces": { + "up": { "uv": [ 0.5, 1.5, 1, 4.5 ], "texture": "#texture" }, + "west": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 3, 1, 11 ], + "to": [ 4, 12, 12 ], + "faces": { + "up": { "uv": [ 4.5, 7.5, 5, 8 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF00FF", + "from": [ 3, 1, 12 ], + "to": [ 4, 14, 13 ], + "faces": { + "up": { "uv": [ 4.5, 7, 5, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FFFF00", + "from": [ 3, 10, 5 ], + "to": [ 4, 12, 11 ], + "faces": { + "up": { "uv": [ 4.5, 8, 5, 11.5 ], "texture": "#texture" }, + "west": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, + "east": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF8000", + "from": [ 3, 13, 4 ], + "to": [ 4, 14, 12 ], + "faces": { + "down": { "uv": [ 0, 7.5, 0.5, 11.5 ], "texture": "#texture" }, + "up": { "uv": [ 4.5, 7.5, 5, 11.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" }, + "east": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 4, 1, 3 ], + "to": [ 5, 12, 4 ], + "faces": { + "up": { "uv": [ 4, 11.5, 4.5, 12 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 4, 1, 12 ], + "to": [ 5, 12, 13 ], + "faces": { + "up": { "uv": [ 4, 7, 4.5, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-3AC6FF", + "from": [ 4, 11, 4 ], + "to": [ 12, 12, 12 ], + "faces": { + "down": { "uv": [ 5.5, 0.5, 9.5, 4.5 ], "texture": "#texture" }, + "up": { "uv": [ 5.5, 0.5, 9.5, 4.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 7.5, 4.5, 8 ], "texture": "#texture" }, + "south": { "uv": [ 0.5, 11, 4.5, 11.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 7.5, 1, 11.5 ], "texture": "#texture" }, + "east": { "uv": [ 4, 7.5, 4.5, 11.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-71FFFF", + "from": [ 5, 1, 3 ], + "to": [ 11, 2, 4 ], + "faces": { + "up": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, + "north": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-71FFFF", + "from": [ 5, 1, 12 ], + "to": [ 11, 2, 13 ], + "faces": { + "up": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, + "north": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FFFF00", + "from": [ 5, 10, 3 ], + "to": [ 11, 12, 4 ], + "faces": { + "down": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, + "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, + "south": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FFFF00", + "from": [ 5, 10, 12 ], + "to": [ 11, 12, 13 ], + "faces": { + "down": { "uv": [ 1, 1.5, 4, 2 ], "texture": "#texture" }, + "up": { "uv": [ 1, 7, 4, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, + "south": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF9571", + "from": [ 5, 12, 5 ], + "to": [ 11, 13, 11 ], + "faces": { + "up": { "uv": [ 1, 8, 4, 11 ], "texture": "#texture" }, + "north": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" }, + "south": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" }, + "west": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" }, + "east": { "uv": [ 5, 5.5, 8, 6 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF8000", + "from": [ 4, 13, 3 ], + "to": [ 12, 14, 4 ], + "faces": { + "down": { "uv": [ 0.5, 11.5, 4.5, 12 ], "texture": "#texture" }, + "up": { "uv": [ 0.5, 7, 4.5, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" }, + "south": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-EBAAFF", + "from": [ 5, 13, 6 ], + "to": [ 6, 14, 10 ], + "faces": { + "up": { "uv": [ 3.5, 8.5, 4, 10.5 ], "texture": "#texture" }, + "north": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" }, + "south": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, + "west": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF8000", + "from": [ 4, 13, 12 ], + "to": [ 12, 14, 13 ], + "faces": { + "down": { "uv": [ 0.5, 11.5, 4.5, 12 ], "texture": "#texture" }, + "up": { "uv": [ 0.5, 7, 4.5, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" }, + "south": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-EBAAFF", + "from": [ 6, 13, 5 ], + "to": [ 10, 14, 6 ], + "faces": { + "up": { "uv": [ 1.5, 10.5, 3.5, 11 ], "texture": "#texture" }, + "north": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" }, + "west": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, + "east": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-5595FF", + "from": [ 6, 13, 6 ], + "to": [ 10, 14, 10 ], + "faces": { + "up": { "uv": [ 1.5, 8.499999, 3.5, 10.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-EBAAFF", + "from": [ 6, 13, 10 ], + "to": [ 10, 14, 11 ], + "faces": { + "up": { "uv": [ 1.5, 8, 3.5, 8.5 ], "texture": "#texture" }, + "south": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" }, + "west": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, + "east": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-EBAAFF", + "from": [ 10, 13, 6 ], + "to": [ 11, 14, 10 ], + "faces": { + "up": { "uv": [ 1, 8.5, 1.5, 10.5 ], "texture": "#texture" }, + "north": { "uv": [ 5, 5, 5.5, 5.5 ], "texture": "#texture" }, + "south": { "uv": [ 7.5, 5, 8, 5.5 ], "texture": "#texture" }, + "east": { "uv": [ 5.5, 5, 7.5, 5.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 11, 1, 3 ], + "to": [ 12, 12, 4 ], + "faces": { + "up": { "uv": [ 0.5, 11.5, 1, 12 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 1, 1, 6.499999 ], "texture": "#texture" }, + "south": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 11, 1, 12 ], + "to": [ 12, 12, 13 ], + "faces": { + "up": { "uv": [ 0.5, 7, 1, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF00FF", + "from": [ 12, 1, 3 ], + "to": [ 13, 14, 4 ], + "faces": { + "up": { "uv": [ 0, 11.5, 0.5, 12 ], "texture": "#texture" }, + "north": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 12, 1, 4 ], + "to": [ 13, 12, 5 ], + "faces": { + "up": { "uv": [ 0, 11, 0.5, 11.5 ], "texture": "#texture" }, + "south": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-71FFFF", + "from": [ 12, 1, 5 ], + "to": [ 13, 2, 11 ], + "faces": { + "up": { "uv": [ 0.5, 1.5, 1, 4.5 ], "texture": "#texture" }, + "west": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 1, 6, 4, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF0000", + "from": [ 12, 1, 11 ], + "to": [ 13, 12, 12 ], + "faces": { + "up": { "uv": [ 0, 7.5, 0.5, 8 ], "texture": "#texture" }, + "north": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 1, 1, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 4, 1, 4.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF00FF", + "from": [ 12, 1, 12 ], + "to": [ 13, 14, 13 ], + "faces": { + "up": { "uv": [ 0, 7, 0.5, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 0.5, 6.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FFFF00", + "from": [ 12, 10, 5 ], + "to": [ 13, 12, 11 ], + "faces": { + "down": { "uv": [ 0, 8, 0.5, 11 ], "texture": "#texture" }, + "up": { "uv": [ 0, 8, 0.5, 11 ], "texture": "#texture" }, + "west": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" }, + "east": { "uv": [ 1, 1, 4, 2 ], "texture": "#texture" } + } + }, + { + "__comment": "Voxels-FF8000", + "from": [ 12, 13, 4 ], + "to": [ 13, 14, 12 ], + "faces": { + "down": { "uv": [ 4.5, 7.5, 5, 11.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 7.5, 0.5, 11.5 ], "texture": "#texture" }, + "west": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" }, + "east": { "uv": [ 0.5, 0, 4.5, 0.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Cube33", + "from": [ 5, 2, 3 ], + "to": [ 11, 10, 4 ], + "faces": { + "north": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" }, + "south": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" } + } + }, + { + "__comment": "Cube33", + "from": [ 3, 2, 5 ], + "to": [ 4, 10, 11 ], + "faces": { + "west": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" }, + "east": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" } + } + }, + { + "__comment": "Cube33", + "from": [ 12, 2, 5 ], + "to": [ 13, 10, 11 ], + "faces": { + "west": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" }, + "east": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" } + } + }, + { + "__comment": "Cube33", + "from": [ 5, 2, 12 ], + "to": [ 11, 10, 13 ], + "faces": { + "north": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" }, + "south": { "uv": [ 1, 2, 4, 6 ], "texture": "#texture" } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "thirdperson_lefthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 45, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 45, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "gui": { + "rotation": [ 30, 225, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "head": { + "translation": [ 0, 12, 0 ], + "scale": [ 0.5, 0.5, 0.5 ] + }, + "ground": { + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "scale": [ 0.5, 0.5, 0.5 ] + } + } +} diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrucible.mtl b/src/main/resources/assets/bloodmagic/models/block/blockdemoncrucible.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockDemonCrucible.mtl rename to src/main/resources/assets/bloodmagic/models/block/blockdemoncrucible.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/blockdemoncrucible.obj b/src/main/resources/assets/bloodmagic/models/block/blockdemoncrucible.obj new file mode 100644 index 00000000..423f18c5 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockdemoncrucible.obj @@ -0,0 +1,937 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib blockdemoncrucible.mtl +o BlockDemonCrucible +v 0.125000 0.125000 0.875000 +v 0.125000 -0.000000 0.875000 +v 0.375000 -0.000000 0.875000 +v 0.375000 0.125000 0.875000 +v 0.375000 0.125000 0.625000 +v 0.375000 -0.000000 0.625000 +v 0.125000 -0.000000 0.625000 +v 0.125000 0.125000 0.625000 +v 0.193151 0.473851 0.803768 +v 0.151353 0.103509 0.845306 +v 0.337685 0.082741 0.847635 +v 0.379483 0.453082 0.806098 +v 0.379483 0.432183 0.619766 +v 0.337685 0.061842 0.661303 +v 0.151353 0.082610 0.658974 +v 0.193151 0.452952 0.617437 +v 0.625000 0.125000 0.375000 +v 0.625000 0.000000 0.375000 +v 0.875000 0.000000 0.375000 +v 0.875000 0.125000 0.375000 +v 0.875000 0.125000 0.125000 +v 0.875000 0.000000 0.125000 +v 0.625000 0.000000 0.125000 +v 0.625000 0.125000 0.125000 +v 0.620517 0.432206 0.380235 +v 0.662315 0.061873 0.338698 +v 0.848645 0.082641 0.341027 +v 0.806847 0.452974 0.382564 +v 0.806847 0.473873 0.196235 +v 0.848645 0.103540 0.154698 +v 0.662315 0.082772 0.152368 +v 0.620517 0.453105 0.193905 +v 0.125000 0.125000 0.375000 +v 0.125000 0.000000 0.375000 +v 0.375000 0.000000 0.375000 +v 0.375000 0.125000 0.375000 +v 0.375000 0.125000 0.125000 +v 0.375000 0.000000 0.125000 +v 0.125000 0.000000 0.125000 +v 0.125000 0.125000 0.125000 +v 0.193151 0.452963 0.382563 +v 0.151353 0.082626 0.341026 +v 0.337685 0.061857 0.338696 +v 0.379483 0.432194 0.380234 +v 0.379483 0.453093 0.193904 +v 0.337685 0.082756 0.152367 +v 0.151353 0.103525 0.154696 +v 0.193151 0.473862 0.196233 +v 0.625000 0.125000 0.875000 +v 0.625000 -0.000000 0.875000 +v 0.875000 -0.000000 0.875000 +v 0.875000 0.125000 0.875000 +v 0.875000 0.125000 0.625000 +v 0.875000 -0.000000 0.625000 +v 0.625000 -0.000000 0.625000 +v 0.625000 0.125000 0.625000 +v 0.620517 0.453093 0.806096 +v 0.662315 0.082756 0.847633 +v 0.848645 0.103525 0.845304 +v 0.806847 0.473862 0.803767 +v 0.806847 0.452963 0.617435 +v 0.848645 0.082626 0.658972 +v 0.662315 0.061857 0.661302 +v 0.620517 0.432194 0.619765 +v 0.125000 0.500000 0.875000 +v 0.125000 0.437500 0.875000 +v 0.875000 0.437500 0.875000 +v 0.875000 0.500000 0.875000 +v 0.875000 0.500000 0.125000 +v 0.875000 0.437500 0.125000 +v 0.125000 0.437500 0.125000 +v 0.125000 0.500000 0.125000 +v 0.187500 0.562500 0.812500 +v 0.187500 0.500000 0.812500 +v 0.812500 0.500000 0.812500 +v 0.812500 0.562500 0.812500 +v 0.812500 0.562500 0.187500 +v 0.812500 0.500000 0.187500 +v 0.187500 0.500000 0.187500 +v 0.187500 0.562500 0.187500 +v 0.125000 0.625000 0.875000 +v 0.125000 0.562500 0.875000 +v 0.875000 0.562500 0.875000 +v 0.875000 0.625000 0.875000 +v 0.875000 0.625000 0.125000 +v 0.875000 0.562500 0.125000 +v 0.125000 0.562500 0.125000 +v 0.125000 0.625000 0.125000 +v 0.218750 0.875000 0.781250 +v 0.218750 0.625000 0.781250 +v 0.781250 0.625000 0.781250 +v 0.781250 0.875000 0.781250 +v 0.781250 0.875000 0.218750 +v 0.781250 0.625000 0.218750 +v 0.218750 0.625000 0.218750 +v 0.218750 0.875000 0.218750 +v 0.218750 1.093750 0.843750 +v 0.218750 0.718750 0.843750 +v 0.781250 0.718750 0.843750 +v 0.781250 1.093750 0.843750 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.343750 1.281250 0.968750 +v 0.343750 0.843750 0.968750 +v 0.656250 0.843750 0.968750 +v 0.656250 1.281250 0.968750 +v 0.656250 1.281250 0.843750 +v 0.656250 0.843750 0.843750 +v 0.343750 0.843750 0.843750 +v 0.343750 1.281250 0.843750 +v 0.406250 1.531250 0.968750 +v 0.406250 1.281250 0.968750 +v 0.593750 1.281250 0.968750 +v 0.593750 1.531250 0.968750 +v 0.593750 1.531250 0.906250 +v 0.593750 1.281250 0.906250 +v 0.406250 1.281250 0.906250 +v 0.406250 1.531250 0.906250 +v 0.156250 1.093750 0.781250 +v 0.156250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.156250 0.718750 0.218750 +v 0.156250 1.093750 0.218750 +v 0.031250 1.281250 0.656250 +v 0.031250 0.843750 0.656250 +v 0.156250 0.843750 0.656250 +v 0.156250 1.281250 0.656250 +v 0.156250 1.281250 0.343750 +v 0.156250 0.843750 0.343750 +v 0.031250 0.843750 0.343750 +v 0.031250 1.281250 0.343750 +v 0.031250 1.531250 0.593750 +v 0.031250 1.281250 0.593750 +v 0.093750 1.281250 0.593750 +v 0.093750 1.531250 0.593750 +v 0.093750 1.531250 0.406250 +v 0.093750 1.281250 0.406250 +v 0.031250 1.281250 0.406250 +v 0.031250 1.531250 0.406250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.781250 1.093750 0.156250 +v 0.781250 0.718750 0.156250 +v 0.218750 0.718750 0.156250 +v 0.218750 1.093750 0.156250 +v 0.343750 1.281250 0.156250 +v 0.343750 0.843750 0.156250 +v 0.656250 0.843750 0.156250 +v 0.656250 1.281250 0.156250 +v 0.656250 1.281250 0.031250 +v 0.656250 0.843750 0.031250 +v 0.343750 0.843750 0.031250 +v 0.343750 1.281250 0.031250 +v 0.406250 1.531250 0.093750 +v 0.406250 1.281250 0.093750 +v 0.593750 1.281250 0.093750 +v 0.593750 1.531250 0.093750 +v 0.593750 1.531250 0.031250 +v 0.593750 1.281250 0.031250 +v 0.406250 1.281250 0.031250 +v 0.406250 1.531250 0.031250 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.843750 0.718750 0.781250 +v 0.843750 1.093750 0.781250 +v 0.843750 1.093750 0.218750 +v 0.843750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.843750 1.281250 0.656250 +v 0.843750 0.843750 0.656250 +v 0.968750 0.843750 0.656250 +v 0.968750 1.281250 0.656250 +v 0.968750 1.281250 0.343750 +v 0.968750 0.843750 0.343750 +v 0.843750 0.843750 0.343750 +v 0.843750 1.281250 0.343750 +v 0.906250 1.531250 0.593750 +v 0.906250 1.281250 0.593750 +v 0.968750 1.281250 0.593750 +v 0.968750 1.531250 0.593750 +v 0.968750 1.531250 0.406250 +v 0.968750 1.281250 0.406250 +v 0.906250 1.281250 0.406250 +v 0.906250 1.531250 0.406250 +v 0.193151 0.473851 0.803768 +v 0.151353 0.103509 0.845306 +v 0.337685 0.082741 0.847635 +v 0.379483 0.453082 0.806098 +v 0.379483 0.432183 0.619766 +v 0.337685 0.061842 0.661303 +v 0.151353 0.082610 0.658974 +v 0.193151 0.452952 0.617437 +v 0.620517 0.432206 0.380235 +v 0.662315 0.061873 0.338698 +v 0.848645 0.082641 0.341027 +v 0.806847 0.452974 0.382564 +v 0.806847 0.473873 0.196235 +v 0.848645 0.103540 0.154698 +v 0.662315 0.082772 0.152368 +v 0.620517 0.453105 0.193905 +v 0.193151 0.452963 0.382563 +v 0.151353 0.082626 0.341026 +v 0.337685 0.061857 0.338696 +v 0.379483 0.432194 0.380234 +v 0.379483 0.453093 0.193904 +v 0.337685 0.082756 0.152367 +v 0.151353 0.103525 0.154696 +v 0.193151 0.473862 0.196233 +v 0.620517 0.453093 0.806096 +v 0.662315 0.082756 0.847633 +v 0.848645 0.103525 0.845304 +v 0.806847 0.473862 0.803767 +v 0.806847 0.452963 0.617435 +v 0.848645 0.082626 0.658972 +v 0.662315 0.061857 0.661302 +v 0.620517 0.432194 0.619765 +v 0.218750 1.093750 0.843750 +v 0.218750 0.718750 0.843750 +v 0.781250 0.718750 0.843750 +v 0.781250 1.093750 0.843750 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.343750 1.281250 0.968750 +v 0.343750 0.843750 0.968750 +v 0.656250 0.843750 0.968750 +v 0.656250 1.281250 0.968750 +v 0.656250 1.281250 0.843750 +v 0.656250 0.843750 0.843750 +v 0.343750 0.843750 0.843750 +v 0.343750 1.281250 0.843750 +v 0.406250 1.531250 0.968750 +v 0.406250 1.281250 0.968750 +v 0.593750 1.281250 0.968750 +v 0.593750 1.531250 0.968750 +v 0.593750 1.531250 0.906250 +v 0.593750 1.281250 0.906250 +v 0.406250 1.281250 0.906250 +v 0.406250 1.531250 0.906250 +v 0.156250 1.093750 0.781250 +v 0.156250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.156250 0.718750 0.218750 +v 0.156250 1.093750 0.218750 +v 0.031250 1.281250 0.656250 +v 0.031250 0.843750 0.656250 +v 0.156250 0.843750 0.656250 +v 0.156250 1.281250 0.656250 +v 0.156250 1.281250 0.343750 +v 0.156250 0.843750 0.343750 +v 0.031250 0.843750 0.343750 +v 0.031250 1.281250 0.343750 +v 0.031250 1.531250 0.593750 +v 0.031250 1.281250 0.593750 +v 0.093750 1.281250 0.593750 +v 0.093750 1.531250 0.593750 +v 0.093750 1.531250 0.406250 +v 0.093750 1.281250 0.406250 +v 0.031250 1.281250 0.406250 +v 0.031250 1.531250 0.406250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.781250 1.093750 0.156250 +v 0.781250 0.718750 0.156250 +v 0.218750 0.718750 0.156250 +v 0.218750 1.093750 0.156250 +v 0.343750 1.281250 0.156250 +v 0.343750 0.843750 0.156250 +v 0.656250 0.843750 0.156250 +v 0.656250 1.281250 0.156250 +v 0.656250 1.281250 0.031250 +v 0.656250 0.843750 0.031250 +v 0.343750 0.843750 0.031250 +v 0.343750 1.281250 0.031250 +v 0.406250 1.531250 0.093750 +v 0.406250 1.281250 0.093750 +v 0.593750 1.281250 0.093750 +v 0.593750 1.531250 0.093750 +v 0.593750 1.531250 0.031250 +v 0.593750 1.281250 0.031250 +v 0.406250 1.281250 0.031250 +v 0.406250 1.531250 0.031250 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.843750 0.718750 0.781250 +v 0.843750 1.093750 0.781250 +v 0.843750 1.093750 0.218750 +v 0.843750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.843750 1.281250 0.656250 +v 0.843750 0.843750 0.656250 +v 0.968750 0.843750 0.656250 +v 0.968750 1.281250 0.656250 +v 0.968750 1.281250 0.343750 +v 0.968750 0.843750 0.343750 +v 0.843750 0.843750 0.343750 +v 0.843750 1.281250 0.343750 +v 0.906250 1.531250 0.593750 +v 0.906250 1.281250 0.593750 +v 0.968750 1.281250 0.593750 +v 0.968750 1.531250 0.593750 +v 0.968750 1.531250 0.406250 +v 0.968750 1.281250 0.406250 +v 0.906250 1.281250 0.406250 +v 0.906250 1.531250 0.406250 +v 0.343750 1.281250 0.968750 +v 0.343750 0.843750 0.968750 +v 0.656250 0.843750 0.968750 +v 0.656250 1.281250 0.968750 +v 0.656250 1.281250 0.843750 +v 0.656250 0.843750 0.843750 +v 0.343750 0.843750 0.843750 +v 0.343750 1.281250 0.843750 +v 0.406250 1.531250 0.968750 +v 0.406250 1.281250 0.968750 +v 0.593750 1.281250 0.968750 +v 0.593750 1.531250 0.968750 +v 0.593750 1.531250 0.906250 +v 0.593750 1.281250 0.906250 +v 0.406250 1.281250 0.906250 +v 0.406250 1.531250 0.906250 +v 0.406250 1.531250 0.968750 +v 0.406250 1.281250 0.968750 +v 0.593750 1.281250 0.968750 +v 0.593750 1.531250 0.968750 +v 0.593750 1.531250 0.906250 +v 0.593750 1.281250 0.906250 +v 0.406250 1.281250 0.906250 +v 0.406250 1.531250 0.906250 +v 0.031250 1.281250 0.656250 +v 0.031250 0.843750 0.656250 +v 0.156250 0.843750 0.656250 +v 0.156250 1.281250 0.656250 +v 0.156250 1.281250 0.343750 +v 0.156250 0.843750 0.343750 +v 0.031250 0.843750 0.343750 +v 0.031250 1.281250 0.343750 +v 0.031250 1.531250 0.593750 +v 0.031250 1.281250 0.593750 +v 0.093750 1.281250 0.593750 +v 0.093750 1.531250 0.593750 +v 0.093750 1.531250 0.406250 +v 0.093750 1.281250 0.406250 +v 0.031250 1.281250 0.406250 +v 0.031250 1.531250 0.406250 +v 0.031250 1.531250 0.593750 +v 0.031250 1.281250 0.593750 +v 0.093750 1.281250 0.593750 +v 0.093750 1.531250 0.593750 +v 0.093750 1.531250 0.406250 +v 0.093750 1.281250 0.406250 +v 0.031250 1.281250 0.406250 +v 0.031250 1.531250 0.406250 +v 0.343750 1.281250 0.156250 +v 0.343750 0.843750 0.156250 +v 0.656250 0.843750 0.156250 +v 0.656250 1.281250 0.156250 +v 0.656250 1.281250 0.031250 +v 0.656250 0.843750 0.031250 +v 0.343750 0.843750 0.031250 +v 0.343750 1.281250 0.031250 +v 0.406250 1.531250 0.093750 +v 0.406250 1.281250 0.093750 +v 0.593750 1.281250 0.093750 +v 0.593750 1.531250 0.093750 +v 0.593750 1.531250 0.031250 +v 0.593750 1.281250 0.031250 +v 0.406250 1.281250 0.031250 +v 0.406250 1.531250 0.031250 +v 0.406250 1.531250 0.093750 +v 0.406250 1.281250 0.093750 +v 0.593750 1.281250 0.093750 +v 0.593750 1.531250 0.093750 +v 0.593750 1.531250 0.031250 +v 0.593750 1.281250 0.031250 +v 0.406250 1.281250 0.031250 +v 0.406250 1.531250 0.031250 +v 0.843750 1.281250 0.656250 +v 0.843750 0.843750 0.656250 +v 0.968750 0.843750 0.656250 +v 0.968750 1.281250 0.656250 +v 0.968750 1.281250 0.343750 +v 0.968750 0.843750 0.343750 +v 0.843750 0.843750 0.343750 +v 0.843750 1.281250 0.343750 +v 0.906250 1.531250 0.593750 +v 0.906250 1.281250 0.593750 +v 0.968750 1.281250 0.593750 +v 0.968750 1.531250 0.593750 +v 0.968750 1.531250 0.406250 +v 0.968750 1.281250 0.406250 +v 0.906250 1.281250 0.406250 +v 0.906250 1.531250 0.406250 +v 0.906250 1.531250 0.593750 +v 0.906250 1.281250 0.593750 +v 0.968750 1.281250 0.593750 +v 0.968750 1.531250 0.593750 +v 0.968750 1.531250 0.406250 +v 0.968750 1.281250 0.406250 +v 0.906250 1.281250 0.406250 +v 0.906250 1.531250 0.406250 +vt 0.062500 0.937500 +vt 0.062500 0.906250 +vt 0.125000 0.906250 +vt 0.125000 0.937500 +vt 0.187500 0.937500 +vt 0.187500 0.906250 +vt 0.250000 0.906250 +vt 0.250000 0.937500 +vt 0.062500 1.000000 +vt 0.125000 1.000000 +vt 0.187500 1.000000 +vt 0.000000 0.937500 +vt 0.000000 0.906250 +vt 0.046875 0.843750 +vt 0.046875 0.750000 +vt 0.093750 0.750000 +vt 0.093750 0.843750 +vt 0.140625 0.843750 +vt 0.140625 0.750000 +vt 0.187500 0.750000 +vt 0.187500 0.843750 +vt 0.046875 0.890625 +vt 0.093750 0.890625 +vt 0.140625 0.890625 +vt 0.000000 0.843750 +vt 0.000000 0.750000 +vt 0.437500 0.015625 +vt 0.437500 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.015625 +vt 0.812500 0.015625 +vt 0.812500 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.015625 +vt 0.437500 0.203125 +vt 0.625000 0.203125 +vt 0.812500 0.203125 +vt 0.250000 0.015625 +vt 0.250000 0.000000 +vt 0.531250 0.234375 +vt 0.531250 0.218750 +vt 0.687500 0.218750 +vt 0.687500 0.234375 +vt 0.843750 0.234375 +vt 0.843750 0.218750 +vt 1.000000 0.218750 +vt 1.000000 0.234375 +vt 0.531250 0.390625 +vt 0.687500 0.390625 +vt 0.843750 0.390625 +vt 0.375000 0.234375 +vt 0.375000 0.218750 +vt 0.578125 0.468750 +vt 0.578125 0.406250 +vt 0.718750 0.406250 +vt 0.718750 0.468750 +vt 0.859375 0.468750 +vt 0.859375 0.406250 +vt 1.000000 0.406250 +vt 1.000000 0.468750 +vt 0.578125 0.609375 +vt 0.718750 0.609375 +vt 0.859375 0.609375 +vt 0.437500 0.468750 +vt 0.437500 0.406250 +vt 0.703125 0.984375 +vt 0.703125 0.890625 +vt 0.843750 0.890625 +vt 0.843750 0.984375 +vt 0.859375 0.984375 +vt 0.859375 0.890625 +vt 1.000000 0.890625 +vt 1.000000 0.984375 +vt 0.703125 1.000000 +vt 0.843750 1.000000 +vt 0.984375 0.984375 +vt 0.984375 1.000000 +vt 0.687500 0.984375 +vt 0.687500 0.890625 +vt 0.578125 0.843750 +vt 0.578125 0.734375 +vt 0.656250 0.734375 +vt 0.656250 0.843750 +vt 0.687500 0.843750 +vt 0.687500 0.734375 +vt 0.765625 0.734375 +vt 0.765625 0.843750 +vt 0.578125 0.875000 +vt 0.656250 0.875000 +vt 0.734375 0.843750 +vt 0.734375 0.875000 +vt 0.546875 0.843750 +vt 0.546875 0.734375 +vt 0.890625 0.703125 +vt 0.890625 0.640625 +vt 0.937500 0.640625 +vt 0.937500 0.703125 +vt 0.953125 0.703125 +vt 0.953125 0.640625 +vt 1.000000 0.640625 +vt 1.000000 0.703125 +vt 0.890625 0.718750 +vt 0.937500 0.718750 +vt 0.984375 0.703125 +vt 0.984375 0.718750 +vt 0.875000 0.703125 +vt 0.875000 0.640625 +vt 0.140625 0.593750 +vt 0.140625 0.500000 +vt 0.156250 0.500000 +vt 0.156250 0.593750 +vt 0.296875 0.593750 +vt 0.296875 0.500000 +vt 0.312500 0.500000 +vt 0.312500 0.593750 +vt 0.140625 0.734375 +vt 0.156250 0.734375 +vt 0.171875 0.593750 +vt 0.171875 0.734375 +vt 0.000000 0.593750 +vt 0.000000 0.500000 +vt 0.421875 0.671875 +vt 0.421875 0.562500 +vt 0.453125 0.562500 +vt 0.453125 0.671875 +vt 0.531250 0.671875 +vt 0.531250 0.562500 +vt 0.562500 0.562500 +vt 0.562500 0.671875 +vt 0.421875 0.750000 +vt 0.453125 0.750000 +vt 0.484375 0.671875 +vt 0.484375 0.750000 +vt 0.343750 0.671875 +vt 0.343750 0.562500 +vt 0.343750 0.484375 +vt 0.343750 0.421875 +vt 0.359375 0.421875 +vt 0.359375 0.484375 +vt 0.406250 0.484375 +vt 0.406250 0.421875 +vt 0.421875 0.421875 +vt 0.421875 0.484375 +vt 0.343750 0.531250 +vt 0.359375 0.531250 +vt 0.375000 0.484375 +vt 0.375000 0.531250 +vt 0.296875 0.484375 +vt 0.296875 0.421875 +vt 0.375000 0.984375 +vt 0.375000 0.890625 +vt 0.515625 0.890625 +vt 0.515625 0.984375 +vt 0.531250 0.984375 +vt 0.531250 0.890625 +vt 0.671875 0.890625 +vt 0.671875 0.984375 +vt 0.375000 1.000000 +vt 0.515625 1.000000 +vt 0.656250 0.984375 +vt 0.656250 1.000000 +vt 0.359375 0.984375 +vt 0.359375 0.890625 +vt 0.812500 0.843750 +vt 0.812500 0.734375 +vt 0.890625 0.734375 +vt 0.890625 0.843750 +vt 0.921875 0.843750 +vt 0.921875 0.734375 +vt 1.000000 0.734375 +vt 1.000000 0.843750 +vt 0.812500 0.875000 +vt 0.890625 0.875000 +vt 0.968750 0.843750 +vt 0.968750 0.875000 +vt 0.781250 0.843750 +vt 0.781250 0.734375 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -0.000000 0.111500 0.993800 +vn -0.000000 -0.111500 -0.993800 +vn 0.111500 0.987600 -0.110800 +vn -0.111500 -0.987600 0.110800 +vn 0.993800 -0.110800 0.012400 +vn -0.993800 0.110800 -0.012400 +vn 0.000000 -0.111500 0.993800 +vn 0.000000 0.111500 -0.993800 +vn -0.111500 0.987600 0.110800 +vn 0.111500 -0.987600 -0.110800 +vn 0.993800 0.110800 0.012400 +vn -0.993800 -0.110800 -0.012400 +vn 0.111500 0.987600 0.110800 +vn -0.111500 -0.987600 -0.110800 +vn 0.993800 -0.110800 -0.012400 +vn -0.993800 0.110800 0.012400 +vn -0.111500 0.987600 -0.110800 +vn 0.111500 -0.987600 0.110800 +vn 0.993800 0.110800 -0.012400 +vn -0.993800 -0.110800 0.012400 +usemtl None +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 8/9/3 1/1/3 4/4/3 5/10/3 +f 2/5/4 7/11/4 6/10/4 3/4/4 +f 5/5/5 4/4/5 3/3/5 6/6/5 +f 8/12/6 7/13/6 2/2/6 1/1/6 +f 9/14/7 10/15/7 11/16/7 12/17/7 +f 13/18/8 14/19/8 15/20/8 16/21/8 +f 16/22/9 9/14/9 12/17/9 13/23/9 +f 10/18/10 15/24/10 14/23/10 11/17/10 +f 13/18/11 12/17/11 11/16/11 14/19/11 +f 16/25/12 15/26/12 10/15/12 9/14/12 +f 17/1/1 18/2/1 19/3/1 20/4/1 +f 21/5/2 22/6/2 23/7/2 24/8/2 +f 24/9/3 17/1/3 20/4/3 21/10/3 +f 18/5/4 23/11/4 22/10/4 19/4/4 +f 21/5/5 20/4/5 19/3/5 22/6/5 +f 24/12/6 23/13/6 18/2/6 17/1/6 +f 25/14/13 26/15/13 27/16/13 28/17/13 +f 29/18/14 30/19/14 31/20/14 32/21/14 +f 32/22/15 25/14/15 28/17/15 29/23/15 +f 26/18/16 31/24/16 30/23/16 27/17/16 +f 29/18/17 28/17/17 27/16/17 30/19/17 +f 32/25/18 31/26/18 26/15/18 25/14/18 +f 33/1/1 34/2/1 35/3/1 36/4/1 +f 37/5/2 38/6/2 39/7/2 40/8/2 +f 40/9/3 33/1/3 36/4/3 37/10/3 +f 34/5/4 39/11/4 38/10/4 35/4/4 +f 37/5/5 36/4/5 35/3/5 38/6/5 +f 40/12/6 39/13/6 34/2/6 33/1/6 +f 41/14/13 42/15/13 43/16/13 44/17/13 +f 45/18/14 46/19/14 47/20/14 48/21/14 +f 48/22/19 41/14/19 44/17/19 45/23/19 +f 42/18/20 47/24/20 46/23/20 43/17/20 +f 45/18/21 44/17/21 43/16/21 46/19/21 +f 48/25/22 47/26/22 42/15/22 41/14/22 +f 49/1/1 50/2/1 51/3/1 52/4/1 +f 53/5/2 54/6/2 55/7/2 56/8/2 +f 56/9/3 49/1/3 52/4/3 53/10/3 +f 50/5/4 55/11/4 54/10/4 51/4/4 +f 53/5/5 52/4/5 51/3/5 54/6/5 +f 56/12/6 55/13/6 50/2/6 49/1/6 +f 57/14/7 58/15/7 59/16/7 60/17/7 +f 61/18/8 62/19/8 63/20/8 64/21/8 +f 64/22/23 57/14/23 60/17/23 61/23/23 +f 58/18/24 63/24/24 62/23/24 59/17/24 +f 61/18/25 60/17/25 59/16/25 62/19/25 +f 64/25/26 63/26/26 58/15/26 57/14/26 +f 65/27/1 66/28/1 67/29/1 68/30/1 +f 69/31/2 70/32/2 71/33/2 72/34/2 +f 72/35/3 65/27/3 68/30/3 69/36/3 +f 66/31/4 71/37/4 70/36/4 67/30/4 +f 69/31/5 68/30/5 67/29/5 70/32/5 +f 72/38/6 71/39/6 66/28/6 65/27/6 +f 73/40/1 74/41/1 75/42/1 76/43/1 +f 77/44/2 78/45/2 79/46/2 80/47/2 +f 80/48/3 73/40/3 76/43/3 77/49/3 +f 74/44/4 79/50/4 78/49/4 75/43/4 +f 77/44/5 76/43/5 75/42/5 78/45/5 +f 80/51/6 79/52/6 74/41/6 73/40/6 +f 81/27/1 82/28/1 83/29/1 84/30/1 +f 85/31/2 86/32/2 87/33/2 88/34/2 +f 88/35/3 81/27/3 84/30/3 85/36/3 +f 82/31/4 87/37/4 86/36/4 83/30/4 +f 85/31/5 84/30/5 83/29/5 86/32/5 +f 88/38/6 87/39/6 82/28/6 81/27/6 +f 89/53/1 90/54/1 91/55/1 92/56/1 +f 93/57/2 94/58/2 95/59/2 96/60/2 +f 96/61/3 89/53/3 92/56/3 93/62/3 +f 90/57/4 95/63/4 94/62/4 91/56/4 +f 93/57/5 92/56/5 91/55/5 94/58/5 +f 96/64/6 95/65/6 90/54/6 89/53/6 +f 97/66/1 98/67/1 99/68/1 100/69/1 +f 101/70/2 102/71/2 103/72/2 104/73/2 +f 104/74/3 97/66/3 100/69/3 101/75/3 +f 98/76/4 103/77/4 102/75/4 99/69/4 +f 101/70/5 100/69/5 99/68/5 102/71/5 +f 104/78/6 103/79/6 98/67/6 97/66/6 +f 105/80/1 106/81/1 107/82/1 108/83/1 +f 109/84/2 110/85/2 111/86/2 112/87/2 +f 112/88/3 105/80/3 108/83/3 109/89/3 +f 106/90/4 111/91/4 110/89/4 107/83/4 +f 109/84/5 108/83/5 107/82/5 110/85/5 +f 112/92/6 111/93/6 106/81/6 105/80/6 +f 113/94/1 114/95/1 115/96/1 116/97/1 +f 117/98/2 118/99/2 119/100/2 120/101/2 +f 120/102/3 113/94/3 116/97/3 117/103/3 +f 114/104/4 119/105/4 118/103/4 115/97/4 +f 117/98/5 116/97/5 115/96/5 118/99/5 +f 120/106/6 119/107/6 114/95/6 113/94/6 +f 121/108/1 122/109/1 123/110/1 124/111/1 +f 125/112/2 126/113/2 127/114/2 128/115/2 +f 128/116/3 121/108/3 124/111/3 125/117/3 +f 122/118/4 127/119/4 126/117/4 123/111/4 +f 125/112/5 124/111/5 123/110/5 126/113/5 +f 128/120/6 127/121/6 122/109/6 121/108/6 +f 129/122/1 130/123/1 131/124/1 132/125/1 +f 133/126/2 134/127/2 135/128/2 136/129/2 +f 136/130/3 129/122/3 132/125/3 133/131/3 +f 130/132/4 135/133/4 134/131/4 131/125/4 +f 133/126/5 132/125/5 131/124/5 134/127/5 +f 136/134/6 135/135/6 130/123/6 129/122/6 +f 137/136/1 138/137/1 139/138/1 140/139/1 +f 141/140/2 142/141/2 143/142/2 144/143/2 +f 144/144/3 137/136/3 140/139/3 141/145/3 +f 138/146/4 143/147/4 142/145/4 139/139/4 +f 141/140/5 140/139/5 139/138/5 142/141/5 +f 144/148/6 143/149/6 138/137/6 137/136/6 +f 145/150/1 146/151/1 147/152/1 148/153/1 +f 149/154/2 150/155/2 151/156/2 152/157/2 +f 152/158/3 145/150/3 148/153/3 149/159/3 +f 146/160/4 151/161/4 150/159/4 147/153/4 +f 149/154/5 148/153/5 147/152/5 150/155/5 +f 152/162/6 151/163/6 146/151/6 145/150/6 +f 153/164/1 154/165/1 155/166/1 156/167/1 +f 157/168/2 158/169/2 159/170/2 160/171/2 +f 160/172/3 153/164/3 156/167/3 157/173/3 +f 154/174/4 159/175/4 158/173/4 155/167/4 +f 157/168/5 156/167/5 155/166/5 158/169/5 +f 160/176/6 159/177/6 154/165/6 153/164/6 +f 161/94/1 162/95/1 163/96/1 164/97/1 +f 165/98/2 166/99/2 167/100/2 168/101/2 +f 168/102/3 161/94/3 164/97/3 165/103/3 +f 162/104/4 167/105/4 166/103/4 163/97/4 +f 165/98/5 164/97/5 163/96/5 166/99/5 +f 168/106/6 167/107/6 162/95/6 161/94/6 +f 169/108/1 170/109/1 171/110/1 172/111/1 +f 173/112/2 174/113/2 175/114/2 176/115/2 +f 176/116/3 169/108/3 172/111/3 173/117/3 +f 170/118/4 175/119/4 174/117/4 171/111/4 +f 173/112/5 172/111/5 171/110/5 174/113/5 +f 176/120/6 175/121/6 170/109/6 169/108/6 +f 177/122/1 178/123/1 179/124/1 180/125/1 +f 181/126/2 182/127/2 183/128/2 184/129/2 +f 184/130/3 177/122/3 180/125/3 181/131/3 +f 178/132/4 183/133/4 182/131/4 179/125/4 +f 181/126/5 180/125/5 179/124/5 182/127/5 +f 184/134/6 183/135/6 178/123/6 177/122/6 +f 185/136/1 186/137/1 187/138/1 188/139/1 +f 189/140/2 190/141/2 191/142/2 192/143/2 +f 192/144/3 185/136/3 188/139/3 189/145/3 +f 186/146/4 191/147/4 190/145/4 187/139/4 +f 189/140/5 188/139/5 187/138/5 190/141/5 +f 192/148/6 191/149/6 186/137/6 185/136/6 +f 193/14/7 194/15/7 195/16/7 196/17/7 +f 197/18/8 198/19/8 199/20/8 200/21/8 +f 200/22/9 193/14/9 196/17/9 197/23/9 +f 194/18/10 199/24/10 198/23/10 195/17/10 +f 197/18/11 196/17/11 195/16/11 198/19/11 +f 200/25/12 199/26/12 194/15/12 193/14/12 +f 201/14/13 202/15/13 203/16/13 204/17/13 +f 205/18/14 206/19/14 207/20/14 208/21/14 +f 208/22/15 201/14/15 204/17/15 205/23/15 +f 202/18/16 207/24/16 206/23/16 203/17/16 +f 205/18/17 204/17/17 203/16/17 206/19/17 +f 208/25/18 207/26/18 202/15/18 201/14/18 +f 209/14/13 210/15/13 211/16/13 212/17/13 +f 213/18/14 214/19/14 215/20/14 216/21/14 +f 216/22/19 209/14/19 212/17/19 213/23/19 +f 210/18/20 215/24/20 214/23/20 211/17/20 +f 213/18/21 212/17/21 211/16/21 214/19/21 +f 216/25/22 215/26/22 210/15/22 209/14/22 +f 217/14/7 218/15/7 219/16/7 220/17/7 +f 221/18/8 222/19/8 223/20/8 224/21/8 +f 224/22/23 217/14/23 220/17/23 221/23/23 +f 218/18/24 223/24/24 222/23/24 219/17/24 +f 221/18/25 220/17/25 219/16/25 222/19/25 +f 224/25/26 223/26/26 218/15/26 217/14/26 +f 225/66/1 226/67/1 227/68/1 228/69/1 +f 229/70/2 230/71/2 231/72/2 232/73/2 +f 232/74/3 225/66/3 228/69/3 229/75/3 +f 226/76/4 231/77/4 230/75/4 227/69/4 +f 229/70/5 228/69/5 227/68/5 230/71/5 +f 232/78/6 231/79/6 226/67/6 225/66/6 +f 233/80/1 234/81/1 235/82/1 236/83/1 +f 237/84/2 238/85/2 239/86/2 240/87/2 +f 240/88/3 233/80/3 236/83/3 237/89/3 +f 234/90/4 239/91/4 238/89/4 235/83/4 +f 237/84/5 236/83/5 235/82/5 238/85/5 +f 240/92/6 239/93/6 234/81/6 233/80/6 +f 241/94/1 242/95/1 243/96/1 244/97/1 +f 245/98/2 246/99/2 247/100/2 248/101/2 +f 248/102/3 241/94/3 244/97/3 245/103/3 +f 242/104/4 247/105/4 246/103/4 243/97/4 +f 245/98/5 244/97/5 243/96/5 246/99/5 +f 248/106/6 247/107/6 242/95/6 241/94/6 +f 249/108/1 250/109/1 251/110/1 252/111/1 +f 253/112/2 254/113/2 255/114/2 256/115/2 +f 256/116/3 249/108/3 252/111/3 253/117/3 +f 250/118/4 255/119/4 254/117/4 251/111/4 +f 253/112/5 252/111/5 251/110/5 254/113/5 +f 256/120/6 255/121/6 250/109/6 249/108/6 +f 257/122/1 258/123/1 259/124/1 260/125/1 +f 261/126/2 262/127/2 263/128/2 264/129/2 +f 264/130/3 257/122/3 260/125/3 261/131/3 +f 258/132/4 263/133/4 262/131/4 259/125/4 +f 261/126/5 260/125/5 259/124/5 262/127/5 +f 264/134/6 263/135/6 258/123/6 257/122/6 +f 265/136/1 266/137/1 267/138/1 268/139/1 +f 269/140/2 270/141/2 271/142/2 272/143/2 +f 272/144/3 265/136/3 268/139/3 269/145/3 +f 266/146/4 271/147/4 270/145/4 267/139/4 +f 269/140/5 268/139/5 267/138/5 270/141/5 +f 272/148/6 271/149/6 266/137/6 265/136/6 +f 273/150/1 274/151/1 275/152/1 276/153/1 +f 277/154/2 278/155/2 279/156/2 280/157/2 +f 280/158/3 273/150/3 276/153/3 277/159/3 +f 274/160/4 279/161/4 278/159/4 275/153/4 +f 277/154/5 276/153/5 275/152/5 278/155/5 +f 280/162/6 279/163/6 274/151/6 273/150/6 +f 281/164/1 282/165/1 283/166/1 284/167/1 +f 285/168/2 286/169/2 287/170/2 288/171/2 +f 288/172/3 281/164/3 284/167/3 285/173/3 +f 282/174/4 287/175/4 286/173/4 283/167/4 +f 285/168/5 284/167/5 283/166/5 286/169/5 +f 288/176/6 287/177/6 282/165/6 281/164/6 +f 289/94/1 290/95/1 291/96/1 292/97/1 +f 293/98/2 294/99/2 295/100/2 296/101/2 +f 296/102/3 289/94/3 292/97/3 293/103/3 +f 290/104/4 295/105/4 294/103/4 291/97/4 +f 293/98/5 292/97/5 291/96/5 294/99/5 +f 296/106/6 295/107/6 290/95/6 289/94/6 +f 297/108/1 298/109/1 299/110/1 300/111/1 +f 301/112/2 302/113/2 303/114/2 304/115/2 +f 304/116/3 297/108/3 300/111/3 301/117/3 +f 298/118/4 303/119/4 302/117/4 299/111/4 +f 301/112/5 300/111/5 299/110/5 302/113/5 +f 304/120/6 303/121/6 298/109/6 297/108/6 +f 305/122/1 306/123/1 307/124/1 308/125/1 +f 309/126/2 310/127/2 311/128/2 312/129/2 +f 312/130/3 305/122/3 308/125/3 309/131/3 +f 306/132/4 311/133/4 310/131/4 307/125/4 +f 309/126/5 308/125/5 307/124/5 310/127/5 +f 312/134/6 311/135/6 306/123/6 305/122/6 +f 313/136/1 314/137/1 315/138/1 316/139/1 +f 317/140/2 318/141/2 319/142/2 320/143/2 +f 320/144/3 313/136/3 316/139/3 317/145/3 +f 314/146/4 319/147/4 318/145/4 315/139/4 +f 317/140/5 316/139/5 315/138/5 318/141/5 +f 320/148/6 319/149/6 314/137/6 313/136/6 +f 321/80/1 322/81/1 323/82/1 324/83/1 +f 325/84/2 326/85/2 327/86/2 328/87/2 +f 328/88/3 321/80/3 324/83/3 325/89/3 +f 322/90/4 327/91/4 326/89/4 323/83/4 +f 325/84/5 324/83/5 323/82/5 326/85/5 +f 328/92/6 327/93/6 322/81/6 321/80/6 +f 329/94/1 330/95/1 331/96/1 332/97/1 +f 333/98/2 334/99/2 335/100/2 336/101/2 +f 336/102/3 329/94/3 332/97/3 333/103/3 +f 330/104/4 335/105/4 334/103/4 331/97/4 +f 333/98/5 332/97/5 331/96/5 334/99/5 +f 336/106/6 335/107/6 330/95/6 329/94/6 +f 337/94/1 338/95/1 339/96/1 340/97/1 +f 341/98/2 342/99/2 343/100/2 344/101/2 +f 344/102/3 337/94/3 340/97/3 341/103/3 +f 338/104/4 343/105/4 342/103/4 339/97/4 +f 341/98/5 340/97/5 339/96/5 342/99/5 +f 344/106/6 343/107/6 338/95/6 337/94/6 +f 345/122/1 346/123/1 347/124/1 348/125/1 +f 349/126/2 350/127/2 351/128/2 352/129/2 +f 352/130/3 345/122/3 348/125/3 349/131/3 +f 346/132/4 351/133/4 350/131/4 347/125/4 +f 349/126/5 348/125/5 347/124/5 350/127/5 +f 352/134/6 351/135/6 346/123/6 345/122/6 +f 353/136/1 354/137/1 355/138/1 356/139/1 +f 357/140/2 358/141/2 359/142/2 360/143/2 +f 360/144/3 353/136/3 356/139/3 357/145/3 +f 354/146/4 359/147/4 358/145/4 355/139/4 +f 357/140/5 356/139/5 355/138/5 358/141/5 +f 360/148/6 359/149/6 354/137/6 353/136/6 +f 361/136/1 362/137/1 363/138/1 364/139/1 +f 365/140/2 366/141/2 367/142/2 368/143/2 +f 368/144/3 361/136/3 364/139/3 365/145/3 +f 362/146/4 367/147/4 366/145/4 363/139/4 +f 365/140/5 364/139/5 363/138/5 366/141/5 +f 368/148/6 367/149/6 362/137/6 361/136/6 +f 369/164/1 370/165/1 371/166/1 372/167/1 +f 373/168/2 374/169/2 375/170/2 376/171/2 +f 376/172/3 369/164/3 372/167/3 373/173/3 +f 370/174/4 375/175/4 374/173/4 371/167/4 +f 373/168/5 372/167/5 371/166/5 374/169/5 +f 376/176/6 375/177/6 370/165/6 369/164/6 +f 377/94/1 378/95/1 379/96/1 380/97/1 +f 381/98/2 382/99/2 383/100/2 384/101/2 +f 384/102/3 377/94/3 380/97/3 381/103/3 +f 378/104/4 383/105/4 382/103/4 379/97/4 +f 381/98/5 380/97/5 379/96/5 382/99/5 +f 384/106/6 383/107/6 378/95/6 377/94/6 +f 385/94/1 386/95/1 387/96/1 388/97/1 +f 389/98/2 390/99/2 391/100/2 392/101/2 +f 392/102/3 385/94/3 388/97/3 389/103/3 +f 386/104/4 391/105/4 390/103/4 387/97/4 +f 389/98/5 388/97/5 387/96/5 390/99/5 +f 392/106/6 391/107/6 386/95/6 385/94/6 +f 393/122/1 394/123/1 395/124/1 396/125/1 +f 397/126/2 398/127/2 399/128/2 400/129/2 +f 400/130/3 393/122/3 396/125/3 397/131/3 +f 394/132/4 399/133/4 398/131/4 395/125/4 +f 397/126/5 396/125/5 395/124/5 398/127/5 +f 400/134/6 399/135/6 394/123/6 393/122/6 +f 401/136/1 402/137/1 403/138/1 404/139/1 +f 405/140/2 406/141/2 407/142/2 408/143/2 +f 408/144/3 401/136/3 404/139/3 405/145/3 +f 402/146/4 407/147/4 406/145/4 403/139/4 +f 405/140/5 404/139/5 403/138/5 406/141/5 +f 408/148/6 407/149/6 402/137/6 401/136/6 +f 409/136/1 410/137/1 411/138/1 412/139/1 +f 413/140/2 414/141/2 415/142/2 416/143/2 +f 416/144/3 409/136/3 412/139/3 413/145/3 +f 410/146/4 415/147/4 414/145/4 411/139/4 +f 413/140/5 412/139/5 411/138/5 414/141/5 +f 416/148/6 415/149/6 410/137/6 409/136/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDemonCrystallizer.mtl b/src/main/resources/assets/bloodmagic/models/block/blockdemoncrystallizer.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockDemonCrystallizer.mtl rename to src/main/resources/assets/bloodmagic/models/block/blockdemoncrystallizer.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/blockdemoncrystallizer.obj b/src/main/resources/assets/bloodmagic/models/block/blockdemoncrystallizer.obj new file mode 100644 index 00000000..7558622b --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockdemoncrystallizer.obj @@ -0,0 +1,1359 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib blockdemoncrystallizer.mtl +o BlockDemonCrystallizer.001 +v 0.125000 0.062500 0.875000 +v 0.125000 -0.000000 0.875000 +v 0.875000 -0.000000 0.875000 +v 0.875000 0.062500 0.875000 +v 0.875000 0.062500 0.125000 +v 0.875000 0.000000 0.125000 +v 0.125000 0.000000 0.125000 +v 0.125000 0.062500 0.125000 +v 0.187500 0.125000 0.812500 +v 0.187500 0.062500 0.812500 +v 0.812500 0.062500 0.812500 +v 0.812500 0.125000 0.812500 +v 0.812500 0.125000 0.187500 +v 0.812500 0.062500 0.187500 +v 0.187500 0.062500 0.187500 +v 0.187500 0.125000 0.187500 +v 0.125000 0.187500 0.875000 +v 0.125000 0.125000 0.875000 +v 0.875000 0.125000 0.875000 +v 0.875000 0.187500 0.875000 +v 0.875000 0.187500 0.125000 +v 0.875000 0.125000 0.125000 +v 0.125000 0.125000 0.125000 +v 0.125000 0.187500 0.125000 +v 0.631420 0.815976 0.370107 +v 0.556035 0.136742 0.445037 +v 0.742405 0.116307 0.447292 +v 0.817789 0.795541 0.372362 +v 0.817789 0.774981 0.185992 +v 0.742405 0.095747 0.260922 +v 0.556035 0.116183 0.258668 +v 0.631420 0.795417 0.183738 +v 0.580484 0.643738 0.420547 +v 0.573631 0.581989 0.427359 +v 0.822124 0.554742 0.430365 +v 0.828977 0.616490 0.423553 +v 0.828977 0.589078 0.175061 +v 0.822124 0.527329 0.181873 +v 0.573631 0.554577 0.178867 +v 0.580484 0.616325 0.172055 +v 0.631420 0.795416 0.816259 +v 0.556035 0.116189 0.741328 +v 0.742405 0.095754 0.739074 +v 0.817789 0.774980 0.814004 +v 0.817789 0.795540 0.627637 +v 0.742405 0.116313 0.552707 +v 0.556035 0.136748 0.554961 +v 0.631420 0.815975 0.629891 +v 0.548960 0.332286 0.796607 +v 0.542106 0.270538 0.789795 +v 0.790599 0.243291 0.786789 +v 0.797452 0.305039 0.793601 +v 0.797452 0.332451 0.545111 +v 0.790599 0.270704 0.538299 +v 0.542106 0.297951 0.541305 +v 0.548960 0.359699 0.548117 +v 0.182214 0.774979 0.814004 +v 0.257599 0.095760 0.739075 +v 0.443966 0.116195 0.741329 +v 0.368581 0.795415 0.816258 +v 0.368581 0.815974 0.629891 +v 0.443966 0.136755 0.554962 +v 0.257599 0.116319 0.552707 +v 0.182214 0.795539 0.627637 +v 0.192272 0.397664 0.803819 +v 0.199125 0.335916 0.797007 +v 0.447615 0.363163 0.800013 +v 0.440762 0.424911 0.806825 +v 0.440762 0.452323 0.558335 +v 0.447615 0.390576 0.551523 +v 0.199125 0.363329 0.548517 +v 0.192272 0.425076 0.555329 +v 0.182214 0.795540 0.372362 +v 0.257599 0.116313 0.447291 +v 0.443966 0.136748 0.445037 +v 0.368581 0.815975 0.370107 +v 0.368581 0.795416 0.183738 +v 0.443966 0.116189 0.258667 +v 0.257599 0.095753 0.260922 +v 0.182214 0.774980 0.185992 +v 0.178886 0.517012 0.431383 +v 0.185739 0.455264 0.438195 +v 0.434229 0.482511 0.435189 +v 0.427376 0.544259 0.428378 +v 0.427376 0.516846 0.179885 +v 0.434229 0.455098 0.186697 +v 0.185739 0.427851 0.189703 +v 0.178886 0.489599 0.182891 +v 0.125000 1.000000 0.875000 +v 0.125000 0.875000 0.875000 +v 0.875000 0.875000 0.875000 +v 0.875000 1.000000 0.875000 +v 0.875000 1.000000 0.125000 +v 0.875000 0.875000 0.125000 +v 0.125000 0.875000 0.125000 +v 0.125000 1.000000 0.125000 +v 0.125000 1.000000 0.125000 +v 0.125000 0.875000 0.125000 +v 0.875000 0.875000 0.125000 +v 0.875000 1.000000 0.125000 +v 0.875000 1.000000 0.000000 +v 0.875000 0.875000 0.000000 +v 0.125000 0.875000 0.000000 +v 0.125000 1.000000 0.000000 +v 0.125000 1.000000 1.000000 +v 0.125000 0.875000 1.000000 +v 0.875000 0.875000 1.000000 +v 0.875000 1.000000 1.000000 +v 0.875000 1.000000 0.875000 +v 0.875000 0.875000 0.875000 +v 0.125000 0.875000 0.875000 +v 0.125000 1.000000 0.875000 +v 0.875000 1.000000 0.875000 +v 0.875000 0.875000 0.875000 +v 1.000000 0.875000 0.875000 +v 1.000000 1.000000 0.875000 +v 1.000000 1.000000 0.125000 +v 1.000000 0.875000 0.125000 +v 0.875000 0.875000 0.125000 +v 0.875000 1.000000 0.125000 +v 0.000000 1.000000 0.875000 +v 0.000000 0.875000 0.875000 +v 0.125000 0.875000 0.875000 +v 0.125000 1.000000 0.875000 +v 0.125000 1.000000 0.125000 +v 0.125000 0.875000 0.125000 +v 0.000000 0.875000 0.125000 +v 0.000000 1.000000 0.125000 +v 0.343750 1.062500 0.656250 +v 0.343750 1.000000 0.656250 +v 0.656250 1.000000 0.656250 +v 0.656250 1.062500 0.656250 +v 0.656250 1.062500 0.343750 +v 0.656250 1.000000 0.343750 +v 0.343750 1.000000 0.343750 +v 0.343750 1.062500 0.343750 +v 0.343667 1.062449 0.656250 +v 0.255279 0.974061 0.656250 +v 0.299473 0.929867 0.656250 +v 0.387862 1.018255 0.656250 +v 0.387862 1.018255 0.343750 +v 0.299473 0.929867 0.343750 +v 0.255279 0.974061 0.343750 +v 0.343667 1.062449 0.343750 +v 0.343750 1.062449 0.656332 +v 0.343750 0.974061 0.744721 +v 0.656250 0.974061 0.744721 +v 0.656250 1.062449 0.656332 +v 0.656250 1.018255 0.612138 +v 0.656250 0.929866 0.700527 +v 0.343750 0.929866 0.700527 +v 0.343750 1.018255 0.612138 +v 0.343750 1.018255 0.388125 +v 0.343750 0.929867 0.299737 +v 0.656250 0.929867 0.299737 +v 0.656250 1.018255 0.388125 +v 0.656250 1.062449 0.343931 +v 0.656250 0.974061 0.255542 +v 0.343750 0.974061 0.255542 +v 0.343750 1.062449 0.343931 +v 0.612138 1.018255 0.656250 +v 0.700527 0.929867 0.656250 +v 0.744721 0.974061 0.656250 +v 0.656333 1.062449 0.656250 +v 0.656333 1.062449 0.343750 +v 0.744721 0.974061 0.343750 +v 0.700527 0.929867 0.343750 +v 0.612138 1.018255 0.343750 +v 0.875000 1.187500 0.125000 +v 0.875000 0.937500 0.125000 +v 1.000000 0.937500 0.125000 +v 1.000000 1.187500 0.125000 +v 1.000000 1.187500 0.000000 +v 1.000000 0.937500 0.000000 +v 0.875000 0.937500 0.000000 +v 0.875000 1.187500 0.000000 +v 0.937500 1.250000 0.062500 +v 0.937500 1.187500 0.062500 +v 1.000000 1.187500 0.062500 +v 1.000000 1.250000 0.062500 +v 1.000000 1.250000 0.000000 +v 1.000000 1.187500 0.000000 +v 0.937500 1.187500 0.000000 +v 0.937500 1.250000 0.000000 +v 0.937500 1.375000 0.062500 +v 0.937500 1.312500 0.062500 +v 1.000000 1.312500 0.062500 +v 1.000000 1.375000 0.062500 +v 1.000000 1.375000 0.000000 +v 1.000000 1.312500 0.000000 +v 0.937500 1.312500 0.000000 +v 0.937500 1.375000 0.000000 +v 0.000000 1.187500 1.000000 +v 0.000000 0.937500 1.000000 +v 0.125000 0.937500 1.000000 +v 0.125000 1.187500 1.000000 +v 0.125000 1.187500 0.875000 +v 0.125000 0.937500 0.875000 +v 0.000000 0.937500 0.875000 +v 0.000000 1.187500 0.875000 +v 0.000000 1.250000 1.000000 +v 0.000000 1.187500 1.000000 +v 0.062500 1.187500 1.000000 +v 0.062500 1.250000 1.000000 +v 0.062500 1.250000 0.937500 +v 0.062500 1.187500 0.937500 +v 0.000000 1.187500 0.937500 +v 0.000000 1.250000 0.937500 +v 0.000000 1.375000 1.000000 +v 0.000000 1.312500 1.000000 +v 0.062500 1.312500 1.000000 +v 0.062500 1.375000 1.000000 +v 0.062500 1.375000 0.937500 +v 0.062500 1.312500 0.937500 +v 0.000000 1.312500 0.937500 +v 0.000000 1.375000 0.937500 +v 0.875000 1.187500 1.000000 +v 0.875000 0.937500 1.000000 +v 1.000000 0.937500 1.000000 +v 1.000000 1.187500 1.000000 +v 1.000000 1.187500 0.875000 +v 1.000000 0.937500 0.875000 +v 0.875000 0.937500 0.875000 +v 0.875000 1.187500 0.875000 +v 0.937500 1.250000 1.000000 +v 0.937500 1.187500 1.000000 +v 1.000000 1.187500 1.000000 +v 1.000000 1.250000 1.000000 +v 1.000000 1.250000 0.937500 +v 1.000000 1.187500 0.937500 +v 0.937500 1.187500 0.937500 +v 0.937500 1.250000 0.937500 +v 0.937500 1.375000 1.000000 +v 0.937500 1.312500 1.000000 +v 1.000000 1.312500 1.000000 +v 1.000000 1.375000 1.000000 +v 1.000000 1.375000 0.937500 +v 1.000000 1.312500 0.937500 +v 0.937500 1.312500 0.937500 +v 0.937500 1.375000 0.937500 +v 0.000000 1.187500 0.125000 +v 0.000000 0.937500 0.125000 +v 0.125000 0.937500 0.125000 +v 0.125000 1.187500 0.125000 +v 0.125000 1.187500 0.000000 +v 0.125000 0.937500 0.000000 +v 0.000000 0.937500 0.000000 +v 0.000000 1.187500 0.000000 +v 0.000000 1.250000 0.062500 +v 0.000000 1.187500 0.062500 +v 0.062500 1.187500 0.062500 +v 0.062500 1.250000 0.062500 +v 0.062500 1.250000 0.000000 +v 0.062500 1.187500 0.000000 +v 0.000000 1.187500 0.000000 +v 0.000000 1.250000 0.000000 +v 0.000000 1.375000 0.062500 +v 0.000000 1.312500 0.062500 +v 0.062500 1.312500 0.062500 +v 0.062500 1.375000 0.062500 +v 0.062500 1.375000 0.000000 +v 0.062500 1.312500 0.000000 +v 0.000000 1.312500 0.000000 +v 0.000000 1.375000 0.000000 +v 0.187500 0.875000 0.812500 +v 0.187500 0.750000 0.812500 +v 0.812500 0.750000 0.812500 +v 0.812500 0.875000 0.812500 +v 0.812500 0.875000 0.187500 +v 0.812500 0.750000 0.187500 +v 0.187500 0.750000 0.187500 +v 0.187500 0.875000 0.187500 +v 0.062500 0.875000 0.812500 +v 0.062500 0.750000 0.812500 +v 0.187500 0.750000 0.812500 +v 0.187500 0.875000 0.812500 +v 0.187500 0.875000 0.187500 +v 0.187500 0.750000 0.187500 +v 0.062500 0.750000 0.187500 +v 0.062500 0.875000 0.187500 +v 0.187500 0.875000 0.187500 +v 0.187500 0.750000 0.187500 +v 0.812500 0.750000 0.187500 +v 0.812500 0.875000 0.187500 +v 0.812500 0.875000 0.062500 +v 0.812500 0.750000 0.062500 +v 0.187500 0.750000 0.062500 +v 0.187500 0.875000 0.062500 +v 0.187500 0.875000 0.937500 +v 0.187500 0.750000 0.937500 +v 0.812500 0.750000 0.937500 +v 0.812500 0.875000 0.937500 +v 0.812500 0.875000 0.812500 +v 0.812500 0.750000 0.812500 +v 0.187500 0.750000 0.812500 +v 0.187500 0.875000 0.812500 +v 0.812500 0.875000 0.812500 +v 0.812500 0.750000 0.812500 +v 0.937500 0.750000 0.812500 +v 0.937500 0.875000 0.812500 +v 0.937500 0.875000 0.187500 +v 0.937500 0.750000 0.187500 +v 0.812500 0.750000 0.187500 +v 0.812500 0.875000 0.187500 +v 0.187500 0.125000 0.812500 +v 0.187500 0.062500 0.812500 +v 0.812500 0.062500 0.812500 +v 0.812500 0.125000 0.812500 +v 0.812500 0.125000 0.187500 +v 0.812500 0.062500 0.187500 +v 0.187500 0.062500 0.187500 +v 0.187500 0.125000 0.187500 +v 0.125000 0.187500 0.875000 +v 0.125000 0.125000 0.875000 +v 0.875000 0.125000 0.875000 +v 0.875000 0.187500 0.875000 +v 0.875000 0.187500 0.125000 +v 0.875000 0.125000 0.125000 +v 0.125000 0.125000 0.125000 +v 0.125000 0.187500 0.125000 +v 0.125000 0.187500 0.875000 +v 0.125000 0.125000 0.875000 +v 0.875000 0.125000 0.875000 +v 0.875000 0.187500 0.875000 +v 0.875000 0.187500 0.125000 +v 0.875000 0.125000 0.125000 +v 0.125000 0.125000 0.125000 +v 0.125000 0.187500 0.125000 +v 0.580484 0.643738 0.420547 +v 0.573631 0.581989 0.427359 +v 0.822124 0.554742 0.430365 +v 0.828977 0.616490 0.423553 +v 0.828977 0.589078 0.175061 +v 0.822124 0.527329 0.181873 +v 0.573631 0.554577 0.178867 +v 0.580484 0.616325 0.172055 +v 0.548960 0.332286 0.796607 +v 0.542106 0.270538 0.789795 +v 0.790599 0.243291 0.786789 +v 0.797452 0.305039 0.793601 +v 0.797452 0.332451 0.545111 +v 0.790599 0.270704 0.538299 +v 0.542106 0.297951 0.541305 +v 0.548960 0.359699 0.548117 +v 0.192272 0.397664 0.803819 +v 0.199125 0.335916 0.797007 +v 0.447615 0.363163 0.800013 +v 0.440762 0.424911 0.806825 +v 0.440762 0.452323 0.558335 +v 0.447615 0.390576 0.551523 +v 0.199125 0.363329 0.548517 +v 0.192272 0.425076 0.555329 +v 0.178886 0.517012 0.431383 +v 0.185739 0.455264 0.438195 +v 0.434229 0.482511 0.435189 +v 0.427376 0.544259 0.428378 +v 0.427376 0.516846 0.179885 +v 0.434229 0.455098 0.186697 +v 0.185739 0.427851 0.189703 +v 0.178886 0.489599 0.182891 +v 0.125000 1.000000 0.125000 +v 0.125000 0.875000 0.125000 +v 0.875000 0.875000 0.125000 +v 0.875000 1.000000 0.125000 +v 0.875000 1.000000 0.000000 +v 0.875000 0.875000 0.000000 +v 0.125000 0.875000 0.000000 +v 0.125000 1.000000 0.000000 +v 0.125000 1.000000 1.000000 +v 0.125000 0.875000 1.000000 +v 0.875000 0.875000 1.000000 +v 0.875000 1.000000 1.000000 +v 0.875000 1.000000 0.875000 +v 0.875000 0.875000 0.875000 +v 0.125000 0.875000 0.875000 +v 0.125000 1.000000 0.875000 +v 0.875000 1.000000 0.875000 +v 0.875000 0.875000 0.875000 +v 1.000000 0.875000 0.875000 +v 1.000000 1.000000 0.875000 +v 1.000000 1.000000 0.125000 +v 1.000000 0.875000 0.125000 +v 0.875000 0.875000 0.125000 +v 0.875000 1.000000 0.125000 +v 0.000000 1.000000 0.875000 +v 0.000000 0.875000 0.875000 +v 0.125000 0.875000 0.875000 +v 0.125000 1.000000 0.875000 +v 0.125000 1.000000 0.125000 +v 0.125000 0.875000 0.125000 +v 0.000000 0.875000 0.125000 +v 0.000000 1.000000 0.125000 +v 0.343750 1.062500 0.656250 +v 0.343750 1.000000 0.656250 +v 0.656250 1.000000 0.656250 +v 0.656250 1.062500 0.656250 +v 0.656250 1.062500 0.343750 +v 0.656250 1.000000 0.343750 +v 0.343750 1.000000 0.343750 +v 0.343750 1.062500 0.343750 +v 0.343667 1.062449 0.656250 +v 0.255279 0.974061 0.656250 +v 0.299473 0.929867 0.656250 +v 0.387862 1.018255 0.656250 +v 0.387862 1.018255 0.343750 +v 0.299473 0.929867 0.343750 +v 0.255279 0.974061 0.343750 +v 0.343667 1.062449 0.343750 +v 0.343750 1.062449 0.656332 +v 0.343750 0.974061 0.744721 +v 0.656250 0.974061 0.744721 +v 0.656250 1.062449 0.656332 +v 0.656250 1.018255 0.612138 +v 0.656250 0.929866 0.700527 +v 0.343750 0.929866 0.700527 +v 0.343750 1.018255 0.612138 +v 0.343750 1.018255 0.388125 +v 0.343750 0.929867 0.299737 +v 0.656250 0.929867 0.299737 +v 0.656250 1.018255 0.388125 +v 0.656250 1.062449 0.343931 +v 0.656250 0.974061 0.255542 +v 0.343750 0.974061 0.255542 +v 0.343750 1.062449 0.343931 +v 0.612138 1.018255 0.656250 +v 0.700527 0.929867 0.656250 +v 0.744721 0.974061 0.656250 +v 0.656333 1.062449 0.656250 +v 0.656333 1.062449 0.343750 +v 0.744721 0.974061 0.343750 +v 0.700527 0.929867 0.343750 +v 0.612138 1.018255 0.343750 +v 0.343667 1.062449 0.656250 +v 0.255279 0.974061 0.656250 +v 0.299473 0.929867 0.656250 +v 0.387862 1.018255 0.656250 +v 0.387862 1.018255 0.343750 +v 0.299473 0.929867 0.343750 +v 0.255279 0.974061 0.343750 +v 0.343667 1.062449 0.343750 +v 0.343750 1.062449 0.656332 +v 0.343750 0.974061 0.744721 +v 0.656250 0.974061 0.744721 +v 0.656250 1.062449 0.656332 +v 0.656250 1.018255 0.612138 +v 0.656250 0.929866 0.700527 +v 0.343750 0.929866 0.700527 +v 0.343750 1.018255 0.612138 +v 0.343750 1.018255 0.388125 +v 0.343750 0.929867 0.299737 +v 0.656250 0.929867 0.299737 +v 0.656250 1.018255 0.388125 +v 0.656250 1.062449 0.343931 +v 0.656250 0.974061 0.255542 +v 0.343750 0.974061 0.255542 +v 0.343750 1.062449 0.343931 +v 0.612138 1.018255 0.656250 +v 0.700527 0.929867 0.656250 +v 0.744721 0.974061 0.656250 +v 0.656333 1.062449 0.656250 +v 0.656333 1.062449 0.343750 +v 0.744721 0.974061 0.343750 +v 0.700527 0.929867 0.343750 +v 0.612138 1.018255 0.343750 +v 0.937500 1.250000 0.062500 +v 0.937500 1.187500 0.062500 +v 1.000000 1.187500 0.062500 +v 1.000000 1.250000 0.062500 +v 1.000000 1.250000 0.000000 +v 1.000000 1.187500 0.000000 +v 0.937500 1.187500 0.000000 +v 0.937500 1.250000 0.000000 +v 0.937500 1.375000 0.062500 +v 0.937500 1.312500 0.062500 +v 1.000000 1.312500 0.062500 +v 1.000000 1.375000 0.062500 +v 1.000000 1.375000 0.000000 +v 1.000000 1.312500 0.000000 +v 0.937500 1.312500 0.000000 +v 0.937500 1.375000 0.000000 +v 0.937500 1.375000 0.062500 +v 0.937500 1.312500 0.062500 +v 1.000000 1.312500 0.062500 +v 1.000000 1.375000 0.062500 +v 1.000000 1.375000 0.000000 +v 1.000000 1.312500 0.000000 +v 0.937500 1.312500 0.000000 +v 0.937500 1.375000 0.000000 +v 0.000000 1.250000 1.000000 +v 0.000000 1.187500 1.000000 +v 0.062500 1.187500 1.000000 +v 0.062500 1.250000 1.000000 +v 0.062500 1.250000 0.937500 +v 0.062500 1.187500 0.937500 +v 0.000000 1.187500 0.937500 +v 0.000000 1.250000 0.937500 +v 0.000000 1.375000 1.000000 +v 0.000000 1.312500 1.000000 +v 0.062500 1.312500 1.000000 +v 0.062500 1.375000 1.000000 +v 0.062500 1.375000 0.937500 +v 0.062500 1.312500 0.937500 +v 0.000000 1.312500 0.937500 +v 0.000000 1.375000 0.937500 +v 0.000000 1.375000 1.000000 +v 0.000000 1.312500 1.000000 +v 0.062500 1.312500 1.000000 +v 0.062500 1.375000 1.000000 +v 0.062500 1.375000 0.937500 +v 0.062500 1.312500 0.937500 +v 0.000000 1.312500 0.937500 +v 0.000000 1.375000 0.937500 +v 0.937500 1.250000 1.000000 +v 0.937500 1.187500 1.000000 +v 1.000000 1.187500 1.000000 +v 1.000000 1.250000 1.000000 +v 1.000000 1.250000 0.937500 +v 1.000000 1.187500 0.937500 +v 0.937500 1.187500 0.937500 +v 0.937500 1.250000 0.937500 +v 0.937500 1.375000 1.000000 +v 0.937500 1.312500 1.000000 +v 1.000000 1.312500 1.000000 +v 1.000000 1.375000 1.000000 +v 1.000000 1.375000 0.937500 +v 1.000000 1.312500 0.937500 +v 0.937500 1.312500 0.937500 +v 0.937500 1.375000 0.937500 +v 0.937500 1.375000 1.000000 +v 0.937500 1.312500 1.000000 +v 1.000000 1.312500 1.000000 +v 1.000000 1.375000 1.000000 +v 1.000000 1.375000 0.937500 +v 1.000000 1.312500 0.937500 +v 0.937500 1.312500 0.937500 +v 0.937500 1.375000 0.937500 +v 0.000000 1.250000 0.062500 +v 0.000000 1.187500 0.062500 +v 0.062500 1.187500 0.062500 +v 0.062500 1.250000 0.062500 +v 0.062500 1.250000 0.000000 +v 0.062500 1.187500 0.000000 +v 0.000000 1.187500 0.000000 +v 0.000000 1.250000 0.000000 +v 0.000000 1.375000 0.062500 +v 0.000000 1.312500 0.062500 +v 0.062500 1.312500 0.062500 +v 0.062500 1.375000 0.062500 +v 0.062500 1.375000 0.000000 +v 0.062500 1.312500 0.000000 +v 0.000000 1.312500 0.000000 +v 0.000000 1.375000 0.000000 +v 0.000000 1.375000 0.062500 +v 0.000000 1.312500 0.062500 +v 0.062500 1.312500 0.062500 +v 0.062500 1.375000 0.062500 +v 0.062500 1.375000 0.000000 +v 0.062500 1.312500 0.000000 +v 0.000000 1.312500 0.000000 +v 0.000000 1.375000 0.000000 +v 0.062500 0.875000 0.812500 +v 0.062500 0.750000 0.812500 +v 0.187500 0.750000 0.812500 +v 0.187500 0.875000 0.812500 +v 0.187500 0.875000 0.187500 +v 0.187500 0.750000 0.187500 +v 0.062500 0.750000 0.187500 +v 0.062500 0.875000 0.187500 +v 0.187500 0.875000 0.187500 +v 0.187500 0.750000 0.187500 +v 0.812500 0.750000 0.187500 +v 0.812500 0.875000 0.187500 +v 0.812500 0.875000 0.062500 +v 0.812500 0.750000 0.062500 +v 0.187500 0.750000 0.062500 +v 0.187500 0.875000 0.062500 +v 0.187500 0.875000 0.937500 +v 0.187500 0.750000 0.937500 +v 0.812500 0.750000 0.937500 +v 0.812500 0.875000 0.937500 +v 0.812500 0.875000 0.812500 +v 0.812500 0.750000 0.812500 +v 0.187500 0.750000 0.812500 +v 0.187500 0.875000 0.812500 +v 0.812500 0.875000 0.812500 +v 0.812500 0.750000 0.812500 +v 0.937500 0.750000 0.812500 +v 0.937500 0.875000 0.812500 +v 0.937500 0.875000 0.187500 +v 0.937500 0.750000 0.187500 +v 0.812500 0.750000 0.187500 +v 0.812500 0.875000 0.187500 +vt 0.437500 0.015625 +vt 0.437500 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.015625 +vt 0.812500 0.015625 +vt 0.812500 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.015625 +vt 0.437500 0.203125 +vt 0.625000 0.203125 +vt 0.812500 0.203125 +vt 0.250000 0.015625 +vt 0.250000 0.000000 +vt 0.531250 0.234375 +vt 0.531250 0.218750 +vt 0.687500 0.218750 +vt 0.687500 0.234375 +vt 0.843750 0.234375 +vt 0.843750 0.218750 +vt 1.000000 0.218750 +vt 1.000000 0.234375 +vt 0.531250 0.390625 +vt 0.687500 0.390625 +vt 0.843750 0.390625 +vt 0.375000 0.234375 +vt 0.375000 0.218750 +vt 0.046875 0.171875 +vt 0.046875 0.000000 +vt 0.093750 0.000000 +vt 0.093750 0.171875 +vt 0.140625 0.171875 +vt 0.140625 0.000000 +vt 0.187500 0.000000 +vt 0.187500 0.171875 +vt 0.046875 0.218750 +vt 0.093750 0.218750 +vt 0.140625 0.218750 +vt 0.000000 0.171875 +vt 0.000000 0.000000 +vt 0.609375 0.281250 +vt 0.609375 0.265625 +vt 0.671875 0.265625 +vt 0.671875 0.281250 +vt 0.734375 0.281250 +vt 0.734375 0.265625 +vt 0.796875 0.265625 +vt 0.796875 0.281250 +vt 0.609375 0.343750 +vt 0.671875 0.343750 +vt 0.734375 0.343750 +vt 0.546875 0.281250 +vt 0.546875 0.265625 +vt 0.609375 0.234375 +vt 0.609375 0.218750 +vt 0.671875 0.218750 +vt 0.671875 0.234375 +vt 0.734375 0.234375 +vt 0.734375 0.218750 +vt 0.796875 0.218750 +vt 0.796875 0.234375 +vt 0.609375 0.296875 +vt 0.671875 0.296875 +vt 0.734375 0.296875 +vt 0.546875 0.234375 +vt 0.546875 0.218750 +vt 0.609375 0.250000 +vt 0.671875 0.250000 +vt 0.734375 0.250000 +vt 0.796875 0.250000 +vt 0.609375 0.312500 +vt 0.671875 0.312500 +vt 0.734375 0.312500 +vt 0.546875 0.250000 +vt 0.609375 0.328125 +vt 0.671875 0.328125 +vt 0.734375 0.328125 +vt 0.187500 0.812500 +vt 0.187500 0.781250 +vt 0.375000 0.781250 +vt 0.375000 0.812500 +vt 0.562500 0.812500 +vt 0.562500 0.781250 +vt 0.750000 0.781250 +vt 0.750000 0.812500 +vt 0.187500 1.000000 +vt 0.375000 1.000000 +vt 0.562500 1.000000 +vt 0.000000 0.812500 +vt 0.000000 0.781250 +vt 0.593750 0.640625 +vt 0.593750 0.609375 +vt 0.781250 0.609375 +vt 0.781250 0.640625 +vt 0.812500 0.640625 +vt 0.812500 0.609375 +vt 1.000000 0.609375 +vt 1.000000 0.640625 +vt 0.593750 0.671875 +vt 0.781250 0.671875 +vt 0.968750 0.640625 +vt 0.968750 0.671875 +vt 0.562500 0.640625 +vt 0.562500 0.609375 +vt 0.593750 0.718750 +vt 0.593750 0.687500 +vt 0.781250 0.687500 +vt 0.781250 0.718750 +vt 0.812500 0.718750 +vt 0.812500 0.687500 +vt 1.000000 0.687500 +vt 1.000000 0.718750 +vt 0.593750 0.750000 +vt 0.781250 0.750000 +vt 0.968750 0.718750 +vt 0.968750 0.750000 +vt 0.562500 0.718750 +vt 0.562500 0.687500 +vt 0.187500 0.578125 +vt 0.187500 0.546875 +vt 0.218750 0.546875 +vt 0.218750 0.578125 +vt 0.406250 0.578125 +vt 0.406250 0.546875 +vt 0.437500 0.546875 +vt 0.437500 0.578125 +vt 0.187500 0.765625 +vt 0.218750 0.765625 +vt 0.250000 0.578125 +vt 0.250000 0.765625 +vt 0.000000 0.578125 +vt 0.000000 0.546875 +vt 0.078125 0.453125 +vt 0.078125 0.437500 +vt 0.156250 0.437500 +vt 0.156250 0.453125 +vt 0.234375 0.453125 +vt 0.234375 0.437500 +vt 0.312500 0.437500 +vt 0.312500 0.453125 +vt 0.078125 0.531250 +vt 0.156250 0.531250 +vt 0.234375 0.531250 +vt 0.000000 0.453125 +vt 0.000000 0.437500 +vt 0.312500 0.062500 +vt 0.312500 0.031250 +vt 0.328125 0.031250 +vt 0.328125 0.062500 +vt 0.406250 0.062500 +vt 0.406250 0.031250 +vt 0.421875 0.031250 +vt 0.421875 0.062500 +vt 0.312500 0.140625 +vt 0.328125 0.140625 +vt 0.343750 0.062500 +vt 0.343750 0.140625 +vt 0.234375 0.062500 +vt 0.234375 0.031250 +vt 0.250000 0.187500 +vt 0.250000 0.156250 +vt 0.328125 0.156250 +vt 0.328125 0.187500 +vt 0.343750 0.187500 +vt 0.343750 0.156250 +vt 0.421875 0.156250 +vt 0.421875 0.187500 +vt 0.250000 0.203125 +vt 0.328125 0.203125 +vt 0.406250 0.187500 +vt 0.406250 0.203125 +vt 0.234375 0.187500 +vt 0.234375 0.156250 +vt 0.906250 0.093750 +vt 0.906250 0.031250 +vt 0.937500 0.031250 +vt 0.937500 0.093750 +vt 0.968750 0.093750 +vt 0.968750 0.031250 +vt 1.000000 0.031250 +vt 1.000000 0.093750 +vt 0.906250 0.125000 +vt 0.937500 0.125000 +vt 0.968750 0.125000 +vt 0.875000 0.093750 +vt 0.875000 0.031250 +vt 0.953125 0.156250 +vt 0.953125 0.140625 +vt 0.968750 0.140625 +vt 0.968750 0.156250 +vt 0.984375 0.156250 +vt 0.984375 0.140625 +vt 1.000000 0.140625 +vt 1.000000 0.156250 +vt 0.953125 0.171875 +vt 0.968750 0.171875 +vt 0.984375 0.171875 +vt 0.937500 0.156250 +vt 0.937500 0.140625 +vt 0.656250 0.281250 +vt 0.656250 0.265625 +vt 0.687500 0.281250 +vt 0.687500 0.265625 +vt 0.703125 0.265625 +vt 0.703125 0.281250 +vt 0.656250 0.296875 +vt 0.687500 0.296875 +vt 0.640625 0.281250 +vt 0.640625 0.265625 +vt 0.593750 0.281250 +vt 0.593750 0.265625 +vt 0.625000 0.281250 +vt 0.625000 0.265625 +vt 0.593750 0.296875 +vt 0.625000 0.296875 +vt 0.578125 0.281250 +vt 0.578125 0.265625 +vt 0.750000 0.265625 +vt 0.750000 0.281250 +vt 0.765625 0.281250 +vt 0.765625 0.265625 +vt 0.781250 0.265625 +vt 0.781250 0.281250 +vt 0.750000 0.296875 +vt 0.765625 0.296875 +vt 0.718750 0.281250 +vt 0.718750 0.265625 +vt 0.640625 0.296875 +vt 0.531250 0.437500 +vt 0.531250 0.406250 +vt 0.687500 0.406250 +vt 0.687500 0.437500 +vt 0.843750 0.437500 +vt 0.843750 0.406250 +vt 1.000000 0.406250 +vt 1.000000 0.437500 +vt 0.531250 0.593750 +vt 0.687500 0.593750 +vt 0.843750 0.593750 +vt 0.375000 0.437500 +vt 0.375000 0.406250 +vt 0.156250 0.265625 +vt 0.156250 0.234375 +vt 0.187500 0.234375 +vt 0.187500 0.265625 +vt 0.343750 0.265625 +vt 0.343750 0.234375 +vt 0.375000 0.265625 +vt 0.156250 0.421875 +vt 0.187500 0.421875 +vt 0.218750 0.265625 +vt 0.218750 0.421875 +vt 0.000000 0.265625 +vt 0.000000 0.234375 +vt 0.625000 0.890625 +vt 0.625000 0.859375 +vt 0.781250 0.859375 +vt 0.781250 0.890625 +vt 0.812500 0.890625 +vt 0.812500 0.859375 +vt 0.968750 0.859375 +vt 0.968750 0.890625 +vt 0.625000 0.921875 +vt 0.781250 0.921875 +vt 0.937500 0.890625 +vt 0.937500 0.921875 +vt 0.593750 0.890625 +vt 0.593750 0.859375 +vt 0.625000 0.968750 +vt 0.625000 0.937500 +vt 0.781250 0.937500 +vt 0.781250 0.968750 +vt 0.812500 0.968750 +vt 0.812500 0.937500 +vt 0.968750 0.937500 +vt 0.968750 0.968750 +vt 0.625000 1.000000 +vt 0.781250 1.000000 +vt 0.937500 0.968750 +vt 0.937500 1.000000 +vt 0.593750 0.968750 +vt 0.593750 0.937500 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -0.000000 0.109700 0.994000 +vn -0.000000 -0.109600 -0.994000 +vn 0.109700 0.988000 -0.109000 +vn -0.109700 -0.988000 0.109000 +vn 0.994000 -0.109000 0.012000 +vn -0.994000 0.109000 -0.012000 +vn 0.000000 -0.109700 -0.994000 +vn 0.000000 -0.109700 0.994000 +vn 0.000000 0.109700 -0.994000 +vn 0.109700 0.988000 0.109000 +vn -0.109600 -0.988000 -0.109000 +vn 0.994000 -0.109000 -0.012000 +vn -0.994000 0.109000 0.012000 +vn -0.109700 0.988000 0.109000 +vn 0.109700 -0.988000 -0.109000 +vn 0.994000 0.109000 0.012000 +vn -0.994000 -0.109000 -0.012000 +vn -0.109700 0.988000 -0.109000 +vn 0.109700 -0.988000 0.109000 +vn 0.994000 0.109000 -0.012000 +vn -0.994000 -0.109000 0.012000 +vn -0.000000 0.109600 0.994000 +vn 0.707100 0.707100 0.000000 +vn -0.707100 -0.707100 0.000000 +vn 0.707100 -0.707100 0.000000 +vn -0.707100 0.707100 0.000000 +vn 0.000000 0.707100 0.707100 +vn 0.000000 -0.707100 -0.707100 +vn 0.000000 0.707100 -0.707100 +vn 0.000000 -0.707100 0.707100 +usemtl None +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 8/9/3 1/1/3 4/4/3 5/10/3 +f 2/5/4 7/11/4 6/10/4 3/4/4 +f 5/5/5 4/4/5 3/3/5 6/6/5 +f 8/12/6 7/13/6 2/2/6 1/1/6 +f 9/14/1 10/15/1 11/16/1 12/17/1 +f 13/18/2 14/19/2 15/20/2 16/21/2 +f 16/22/3 9/14/3 12/17/3 13/23/3 +f 10/18/4 15/24/4 14/23/4 11/17/4 +f 13/18/5 12/17/5 11/16/5 14/19/5 +f 16/25/6 15/26/6 10/15/6 9/14/6 +f 17/1/1 18/2/1 19/3/1 20/4/1 +f 21/5/2 22/6/2 23/7/2 24/8/2 +f 24/9/3 17/1/3 20/4/3 21/10/3 +f 18/5/4 23/11/4 22/10/4 19/4/4 +f 21/5/5 20/4/5 19/3/5 22/6/5 +f 24/12/6 23/13/6 18/2/6 17/1/6 +f 25/27/7 26/28/7 27/29/7 28/30/7 +f 29/31/8 30/32/8 31/33/8 32/34/8 +f 32/35/9 25/27/9 28/30/9 29/36/9 +f 26/31/10 31/37/10 30/36/10 27/30/10 +f 29/31/11 28/30/11 27/29/11 30/32/11 +f 32/38/12 31/39/12 26/28/12 25/27/12 +f 33/40/7 34/41/7 35/42/7 36/43/7 +f 37/44/13 38/45/13 39/46/13 40/47/13 +f 40/48/9 33/40/9 36/43/9 37/49/9 +f 34/44/10 39/50/10 38/49/10 35/43/10 +f 37/44/11 36/43/11 35/42/11 38/45/11 +f 40/51/12 39/52/12 34/41/12 33/40/12 +f 41/27/14 42/28/14 43/29/14 44/30/14 +f 45/31/15 46/32/15 47/33/15 48/34/15 +f 48/35/16 41/27/16 44/30/16 45/36/16 +f 42/31/17 47/37/17 46/36/17 43/30/17 +f 45/31/18 44/30/18 43/29/18 46/32/18 +f 48/38/19 47/39/19 42/28/19 41/27/19 +f 49/53/14 50/54/14 51/55/14 52/56/14 +f 53/57/15 54/58/15 55/59/15 56/60/15 +f 56/61/16 49/53/16 52/56/16 53/62/16 +f 50/57/17 55/63/17 54/62/17 51/56/17 +f 53/57/18 52/56/18 51/55/18 54/58/18 +f 56/64/19 55/65/19 50/54/19 49/53/19 +f 57/27/14 58/28/14 59/29/14 60/30/14 +f 61/31/15 62/32/15 63/33/15 64/34/15 +f 64/35/20 57/27/20 60/30/20 61/36/20 +f 58/31/21 63/37/21 62/36/21 59/30/21 +f 61/31/22 60/30/22 59/29/22 62/32/22 +f 64/38/23 63/39/23 58/28/23 57/27/23 +f 65/66/14 66/53/14 67/56/14 68/67/14 +f 69/68/15 70/57/15 71/60/15 72/69/15 +f 72/70/20 65/66/20 68/67/20 69/71/20 +f 66/68/21 71/72/21 70/71/21 67/67/21 +f 69/68/22 68/67/22 67/56/22 70/57/22 +f 72/73/23 71/64/23 66/53/23 65/66/23 +f 73/27/7 74/28/7 75/29/7 76/30/7 +f 77/31/13 78/32/13 79/33/13 80/34/13 +f 80/35/24 73/27/24 76/30/24 77/36/24 +f 74/31/25 79/37/25 78/36/25 75/30/25 +f 77/31/26 76/30/26 75/29/26 78/32/26 +f 80/38/27 79/39/27 74/28/27 73/27/27 +f 81/41/28 82/66/28 83/67/28 84/42/28 +f 85/45/13 86/68/13 87/69/13 88/46/13 +f 88/74/24 81/41/24 84/42/24 85/75/24 +f 82/45/25 87/76/25 86/75/25 83/42/25 +f 85/45/26 84/42/26 83/67/26 86/68/26 +f 88/52/27 87/73/27 82/66/27 81/41/27 +f 89/77/1 90/78/1 91/79/1 92/80/1 +f 93/81/2 94/82/2 95/83/2 96/84/2 +f 96/85/3 89/77/3 92/80/3 93/86/3 +f 90/81/4 95/87/4 94/86/4 91/80/4 +f 93/81/5 92/80/5 91/79/5 94/82/5 +f 96/88/6 95/89/6 90/78/6 89/77/6 +f 97/90/1 98/91/1 99/92/1 100/93/1 +f 101/94/2 102/95/2 103/96/2 104/97/2 +f 104/98/3 97/90/3 100/93/3 101/99/3 +f 98/100/4 103/101/4 102/99/4 99/93/4 +f 101/94/5 100/93/5 99/92/5 102/95/5 +f 104/102/6 103/103/6 98/91/6 97/90/6 +f 105/104/1 106/105/1 107/106/1 108/107/1 +f 109/108/2 110/109/2 111/110/2 112/111/2 +f 112/112/3 105/104/3 108/107/3 109/113/3 +f 106/114/4 111/115/4 110/113/4 107/107/4 +f 109/108/5 108/107/5 107/106/5 110/109/5 +f 112/116/6 111/117/6 106/105/6 105/104/6 +f 113/118/1 114/119/1 115/120/1 116/121/1 +f 117/122/2 118/123/2 119/124/2 120/125/2 +f 120/126/3 113/118/3 116/121/3 117/127/3 +f 114/128/4 119/129/4 118/127/4 115/121/4 +f 117/122/5 116/121/5 115/120/5 118/123/5 +f 120/130/6 119/131/6 114/119/6 113/118/6 +f 121/118/1 122/119/1 123/120/1 124/121/1 +f 125/122/2 126/123/2 127/124/2 128/125/2 +f 128/126/3 121/118/3 124/121/3 125/127/3 +f 122/128/4 127/129/4 126/127/4 123/121/4 +f 125/122/5 124/121/5 123/120/5 126/123/5 +f 128/130/6 127/131/6 122/119/6 121/118/6 +f 129/132/1 130/133/1 131/134/1 132/135/1 +f 133/136/2 134/137/2 135/138/2 136/139/2 +f 136/140/3 129/132/3 132/135/3 133/141/3 +f 130/136/4 135/142/4 134/141/4 131/135/4 +f 133/136/5 132/135/5 131/134/5 134/137/5 +f 136/143/6 135/144/6 130/133/6 129/132/6 +f 137/145/1 138/146/1 139/147/1 140/148/1 +f 141/149/2 142/150/2 143/151/2 144/152/2 +f 144/153/29 137/145/29 140/148/29 141/154/29 +f 138/155/30 143/156/30 142/154/30 139/148/30 +f 141/149/31 140/148/31 139/147/31 142/150/31 +f 144/157/32 143/158/32 138/146/32 137/145/32 +f 145/159/33 146/160/33 147/161/33 148/162/33 +f 149/163/34 150/164/34 151/165/34 152/166/34 +f 152/167/35 145/159/35 148/162/35 149/168/35 +f 146/169/36 151/170/36 150/168/36 147/162/36 +f 149/163/5 148/162/5 147/161/5 150/164/5 +f 152/171/6 151/172/6 146/160/6 145/159/6 +f 153/159/36 154/160/36 155/161/36 156/162/36 +f 157/163/35 158/164/35 159/165/35 160/166/35 +f 160/167/33 153/159/33 156/162/33 157/168/33 +f 154/169/34 159/170/34 158/168/34 155/162/34 +f 157/163/5 156/162/5 155/161/5 158/164/5 +f 160/171/6 159/172/6 154/160/6 153/159/6 +f 161/145/1 162/146/1 163/147/1 164/148/1 +f 165/149/2 166/150/2 167/151/2 168/152/2 +f 168/153/32 161/145/32 164/148/32 165/154/32 +f 162/155/31 167/156/31 166/154/31 163/148/31 +f 165/149/29 164/148/29 163/147/29 166/150/29 +f 168/157/30 167/158/30 162/146/30 161/145/30 +f 169/173/1 170/174/1 171/175/1 172/176/1 +f 173/177/2 174/178/2 175/179/2 176/180/2 +f 176/181/3 169/173/3 172/176/3 173/182/3 +f 170/177/4 175/183/4 174/182/4 171/176/4 +f 173/177/5 172/176/5 171/175/5 174/178/5 +f 176/184/6 175/185/6 170/174/6 169/173/6 +f 177/186/1 178/187/1 179/188/1 180/189/1 +f 181/190/2 182/191/2 183/192/2 184/193/2 +f 184/194/3 177/186/3 180/189/3 181/195/3 +f 178/190/4 183/196/4 182/195/4 179/189/4 +f 181/190/5 180/189/5 179/188/5 182/191/5 +f 184/197/6 183/198/6 178/187/6 177/186/6 +f 185/199/1 186/200/1 187/42/1 188/43/1 +f 189/201/2 190/202/2 191/203/2 192/204/2 +f 192/205/3 185/199/3 188/43/3 189/62/3 +f 186/201/4 191/206/4 190/62/4 187/43/4 +f 189/201/5 188/43/5 187/42/5 190/202/5 +f 192/207/6 191/208/6 186/200/6 185/199/6 +f 193/173/1 194/174/1 195/175/1 196/176/1 +f 197/177/2 198/178/2 199/179/2 200/180/2 +f 200/181/3 193/173/3 196/176/3 197/182/3 +f 194/177/4 199/183/4 198/182/4 195/176/4 +f 197/177/5 196/176/5 195/175/5 198/178/5 +f 200/184/6 199/185/6 194/174/6 193/173/6 +f 201/186/1 202/187/1 203/188/1 204/189/1 +f 205/190/2 206/191/2 207/192/2 208/193/2 +f 208/194/3 201/186/3 204/189/3 205/195/3 +f 202/190/4 207/196/4 206/195/4 203/189/4 +f 205/190/5 204/189/5 203/188/5 206/191/5 +f 208/197/6 207/198/6 202/187/6 201/186/6 +f 209/209/1 210/210/1 211/41/1 212/40/1 +f 213/211/2 214/212/2 215/208/2 216/207/2 +f 216/213/3 209/209/3 212/40/3 213/61/3 +f 210/211/4 215/214/4 214/61/4 211/40/4 +f 213/211/5 212/40/5 211/41/5 214/212/5 +f 216/215/6 215/216/6 210/210/6 209/209/6 +f 217/173/1 218/174/1 219/175/1 220/176/1 +f 221/177/2 222/178/2 223/179/2 224/180/2 +f 224/181/3 217/173/3 220/176/3 221/182/3 +f 218/177/4 223/183/4 222/182/4 219/176/4 +f 221/177/5 220/176/5 219/175/5 222/178/5 +f 224/184/6 223/185/6 218/174/6 217/173/6 +f 225/186/1 226/187/1 227/188/1 228/189/1 +f 229/190/2 230/191/2 231/192/2 232/193/2 +f 232/194/3 225/186/3 228/189/3 229/195/3 +f 226/190/4 231/196/4 230/195/4 227/189/4 +f 229/190/5 228/189/5 227/188/5 230/191/5 +f 232/197/6 231/198/6 226/187/6 225/186/6 +f 233/44/1 234/45/1 235/217/1 236/218/1 +f 237/219/2 238/220/2 239/221/2 240/222/2 +f 240/63/3 233/44/3 236/218/3 237/223/3 +f 234/219/4 239/224/4 238/223/4 235/218/4 +f 237/219/5 236/218/5 235/217/5 238/220/5 +f 240/225/6 239/226/6 234/45/6 233/44/6 +f 241/173/1 242/174/1 243/175/1 244/176/1 +f 245/177/2 246/178/2 247/179/2 248/180/2 +f 248/181/3 241/173/3 244/176/3 245/182/3 +f 242/177/4 247/183/4 246/182/4 243/176/4 +f 245/177/5 244/176/5 243/175/5 246/178/5 +f 248/184/6 247/185/6 242/174/6 241/173/6 +f 249/186/1 250/187/1 251/188/1 252/189/1 +f 253/190/2 254/191/2 255/192/2 256/193/2 +f 256/194/3 249/186/3 252/189/3 253/195/3 +f 250/190/4 255/196/4 254/195/4 251/189/4 +f 253/190/5 252/189/5 251/188/5 254/191/5 +f 256/197/6 255/198/6 250/187/6 249/186/6 +f 257/207/1 258/208/1 259/200/1 260/199/1 +f 261/43/2 262/42/2 263/202/2 264/201/2 +f 264/227/3 257/207/3 260/199/3 261/205/3 +f 258/43/4 263/62/4 262/205/4 259/199/4 +f 261/43/5 260/199/5 259/200/5 262/42/5 +f 264/211/6 263/212/6 258/208/6 257/207/6 +f 265/228/1 266/229/1 267/230/1 268/231/1 +f 269/232/2 270/233/2 271/234/2 272/235/2 +f 272/236/3 265/228/3 268/231/3 269/237/3 +f 266/232/4 271/238/4 270/237/4 267/231/4 +f 269/232/5 268/231/5 267/230/5 270/233/5 +f 272/239/6 271/240/6 266/229/6 265/228/6 +f 273/241/1 274/242/1 275/243/1 276/244/1 +f 277/245/2 278/246/2 279/25/2 280/247/2 +f 280/248/3 273/241/3 276/244/3 277/249/3 +f 274/250/4 279/251/4 278/249/4 275/244/4 +f 277/245/5 276/244/5 275/243/5 278/246/5 +f 280/252/6 279/253/6 274/242/6 273/241/6 +f 281/254/1 282/255/1 283/256/1 284/257/1 +f 285/258/2 286/259/2 287/260/2 288/261/2 +f 288/262/3 281/254/3 284/257/3 285/263/3 +f 282/264/4 287/265/4 286/263/4 283/257/4 +f 285/258/5 284/257/5 283/256/5 286/259/5 +f 288/266/6 287/267/6 282/255/6 281/254/6 +f 289/268/1 290/269/1 291/270/1 292/271/1 +f 293/272/2 294/273/2 295/274/2 296/275/2 +f 296/276/3 289/268/3 292/271/3 293/277/3 +f 290/278/4 295/279/4 294/277/4 291/271/4 +f 293/272/5 292/271/5 291/270/5 294/273/5 +f 296/280/6 295/281/6 290/269/6 289/268/6 +f 297/241/1 298/242/1 299/243/1 300/244/1 +f 301/245/2 302/246/2 303/25/2 304/247/2 +f 304/248/3 297/241/3 300/244/3 301/249/3 +f 298/250/4 303/251/4 302/249/4 299/244/4 +f 301/245/5 300/244/5 299/243/5 302/246/5 +f 304/252/6 303/253/6 298/242/6 297/241/6 +f 305/14/1 306/15/1 307/16/1 308/17/1 +f 309/18/2 310/19/2 311/20/2 312/21/2 +f 312/22/3 305/14/3 308/17/3 309/23/3 +f 306/18/4 311/24/4 310/23/4 307/17/4 +f 309/18/5 308/17/5 307/16/5 310/19/5 +f 312/25/6 311/26/6 306/15/6 305/14/6 +f 313/1/1 314/2/1 315/3/1 316/4/1 +f 317/5/2 318/6/2 319/7/2 320/8/2 +f 320/9/3 313/1/3 316/4/3 317/10/3 +f 314/5/4 319/11/4 318/10/4 315/4/4 +f 317/5/5 316/4/5 315/3/5 318/6/5 +f 320/12/6 319/13/6 314/2/6 313/1/6 +f 321/1/1 322/2/1 323/3/1 324/4/1 +f 325/5/2 326/6/2 327/7/2 328/8/2 +f 328/9/3 321/1/3 324/4/3 325/10/3 +f 322/5/4 327/11/4 326/10/4 323/4/4 +f 325/5/5 324/4/5 323/3/5 326/6/5 +f 328/12/6 327/13/6 322/2/6 321/1/6 +f 329/40/7 330/41/7 331/42/7 332/43/7 +f 333/44/13 334/45/13 335/46/13 336/47/13 +f 336/48/9 329/40/9 332/43/9 333/49/9 +f 330/44/10 335/50/10 334/49/10 331/43/10 +f 333/44/11 332/43/11 331/42/11 334/45/11 +f 336/51/12 335/52/12 330/41/12 329/40/12 +f 337/53/14 338/54/14 339/55/14 340/56/14 +f 341/57/15 342/58/15 343/59/15 344/60/15 +f 344/61/16 337/53/16 340/56/16 341/62/16 +f 338/57/17 343/63/17 342/62/17 339/56/17 +f 341/57/18 340/56/18 339/55/18 342/58/18 +f 344/64/19 343/65/19 338/54/19 337/53/19 +f 345/66/14 346/53/14 347/56/14 348/67/14 +f 349/68/15 350/57/15 351/60/15 352/69/15 +f 352/70/20 345/66/20 348/67/20 349/71/20 +f 346/68/21 351/72/21 350/71/21 347/67/21 +f 349/68/22 348/67/22 347/56/22 350/57/22 +f 352/73/23 351/64/23 346/53/23 345/66/23 +f 353/41/28 354/66/28 355/67/28 356/42/28 +f 357/45/13 358/68/13 359/69/13 360/46/13 +f 360/74/24 353/41/24 356/42/24 357/75/24 +f 354/45/25 359/76/25 358/75/25 355/42/25 +f 357/45/26 356/42/26 355/67/26 358/68/26 +f 360/52/27 359/73/27 354/66/27 353/41/27 +f 361/90/1 362/91/1 363/92/1 364/93/1 +f 365/94/2 366/95/2 367/96/2 368/97/2 +f 368/98/3 361/90/3 364/93/3 365/99/3 +f 362/100/4 367/101/4 366/99/4 363/93/4 +f 365/94/5 364/93/5 363/92/5 366/95/5 +f 368/102/6 367/103/6 362/91/6 361/90/6 +f 369/104/1 370/105/1 371/106/1 372/107/1 +f 373/108/2 374/109/2 375/110/2 376/111/2 +f 376/112/3 369/104/3 372/107/3 373/113/3 +f 370/114/4 375/115/4 374/113/4 371/107/4 +f 373/108/5 372/107/5 371/106/5 374/109/5 +f 376/116/6 375/117/6 370/105/6 369/104/6 +f 377/118/1 378/119/1 379/120/1 380/121/1 +f 381/122/2 382/123/2 383/124/2 384/125/2 +f 384/126/3 377/118/3 380/121/3 381/127/3 +f 378/128/4 383/129/4 382/127/4 379/121/4 +f 381/122/5 380/121/5 379/120/5 382/123/5 +f 384/130/6 383/131/6 378/119/6 377/118/6 +f 385/118/1 386/119/1 387/120/1 388/121/1 +f 389/122/2 390/123/2 391/124/2 392/125/2 +f 392/126/3 385/118/3 388/121/3 389/127/3 +f 386/128/4 391/129/4 390/127/4 387/121/4 +f 389/122/5 388/121/5 387/120/5 390/123/5 +f 392/130/6 391/131/6 386/119/6 385/118/6 +f 393/132/1 394/133/1 395/134/1 396/135/1 +f 397/136/2 398/137/2 399/138/2 400/139/2 +f 400/140/3 393/132/3 396/135/3 397/141/3 +f 394/136/4 399/142/4 398/141/4 395/135/4 +f 397/136/5 396/135/5 395/134/5 398/137/5 +f 400/143/6 399/144/6 394/133/6 393/132/6 +f 401/145/1 402/146/1 403/147/1 404/148/1 +f 405/149/2 406/150/2 407/151/2 408/152/2 +f 408/153/29 401/145/29 404/148/29 405/154/29 +f 402/155/30 407/156/30 406/154/30 403/148/30 +f 405/149/31 404/148/31 403/147/31 406/150/31 +f 408/157/32 407/158/32 402/146/32 401/145/32 +f 409/159/33 410/160/33 411/161/33 412/162/33 +f 413/163/34 414/164/34 415/165/34 416/166/34 +f 416/167/35 409/159/35 412/162/35 413/168/35 +f 410/169/36 415/170/36 414/168/36 411/162/36 +f 413/163/5 412/162/5 411/161/5 414/164/5 +f 416/171/6 415/172/6 410/160/6 409/159/6 +f 417/159/36 418/160/36 419/161/36 420/162/36 +f 421/163/35 422/164/35 423/165/35 424/166/35 +f 424/167/33 417/159/33 420/162/33 421/168/33 +f 418/169/34 423/170/34 422/168/34 419/162/34 +f 421/163/5 420/162/5 419/161/5 422/164/5 +f 424/171/6 423/172/6 418/160/6 417/159/6 +f 425/145/1 426/146/1 427/147/1 428/148/1 +f 429/149/2 430/150/2 431/151/2 432/152/2 +f 432/153/32 425/145/32 428/148/32 429/154/32 +f 426/155/31 431/156/31 430/154/31 427/148/31 +f 429/149/29 428/148/29 427/147/29 430/150/29 +f 432/157/30 431/158/30 426/146/30 425/145/30 +f 433/145/1 434/146/1 435/147/1 436/148/1 +f 437/149/2 438/150/2 439/151/2 440/152/2 +f 440/153/29 433/145/29 436/148/29 437/154/29 +f 434/155/30 439/156/30 438/154/30 435/148/30 +f 437/149/31 436/148/31 435/147/31 438/150/31 +f 440/157/32 439/158/32 434/146/32 433/145/32 +f 441/159/33 442/160/33 443/161/33 444/162/33 +f 445/163/34 446/164/34 447/165/34 448/166/34 +f 448/167/35 441/159/35 444/162/35 445/168/35 +f 442/169/36 447/170/36 446/168/36 443/162/36 +f 445/163/5 444/162/5 443/161/5 446/164/5 +f 448/171/6 447/172/6 442/160/6 441/159/6 +f 449/159/36 450/160/36 451/161/36 452/162/36 +f 453/163/35 454/164/35 455/165/35 456/166/35 +f 456/167/33 449/159/33 452/162/33 453/168/33 +f 450/169/34 455/170/34 454/168/34 451/162/34 +f 453/163/5 452/162/5 451/161/5 454/164/5 +f 456/171/6 455/172/6 450/160/6 449/159/6 +f 457/145/1 458/146/1 459/147/1 460/148/1 +f 461/149/2 462/150/2 463/151/2 464/152/2 +f 464/153/32 457/145/32 460/148/32 461/154/32 +f 458/155/31 463/156/31 462/154/31 459/148/31 +f 461/149/29 460/148/29 459/147/29 462/150/29 +f 464/157/30 463/158/30 458/146/30 457/145/30 +f 465/186/1 466/187/1 467/188/1 468/189/1 +f 469/190/2 470/191/2 471/192/2 472/193/2 +f 472/194/3 465/186/3 468/189/3 469/195/3 +f 466/190/4 471/196/4 470/195/4 467/189/4 +f 469/190/5 468/189/5 467/188/5 470/191/5 +f 472/197/6 471/198/6 466/187/6 465/186/6 +f 473/199/1 474/200/1 475/42/1 476/43/1 +f 477/201/2 478/202/2 479/203/2 480/204/2 +f 480/205/3 473/199/3 476/43/3 477/62/3 +f 474/201/4 479/206/4 478/62/4 475/43/4 +f 477/201/5 476/43/5 475/42/5 478/202/5 +f 480/207/6 479/208/6 474/200/6 473/199/6 +f 481/199/1 482/200/1 483/42/1 484/43/1 +f 485/201/2 486/202/2 487/203/2 488/204/2 +f 488/205/3 481/199/3 484/43/3 485/62/3 +f 482/201/4 487/206/4 486/62/4 483/43/4 +f 485/201/5 484/43/5 483/42/5 486/202/5 +f 488/207/6 487/208/6 482/200/6 481/199/6 +f 489/186/1 490/187/1 491/188/1 492/189/1 +f 493/190/2 494/191/2 495/192/2 496/193/2 +f 496/194/3 489/186/3 492/189/3 493/195/3 +f 490/190/4 495/196/4 494/195/4 491/189/4 +f 493/190/5 492/189/5 491/188/5 494/191/5 +f 496/197/6 495/198/6 490/187/6 489/186/6 +f 497/209/1 498/210/1 499/41/1 500/40/1 +f 501/211/2 502/212/2 503/208/2 504/207/2 +f 504/213/3 497/209/3 500/40/3 501/61/3 +f 498/211/4 503/214/4 502/61/4 499/40/4 +f 501/211/5 500/40/5 499/41/5 502/212/5 +f 504/215/6 503/216/6 498/210/6 497/209/6 +f 505/209/1 506/210/1 507/41/1 508/40/1 +f 509/211/2 510/212/2 511/208/2 512/207/2 +f 512/213/3 505/209/3 508/40/3 509/61/3 +f 506/211/4 511/214/4 510/61/4 507/40/4 +f 509/211/5 508/40/5 507/41/5 510/212/5 +f 512/215/6 511/216/6 506/210/6 505/209/6 +f 513/186/1 514/187/1 515/188/1 516/189/1 +f 517/190/2 518/191/2 519/192/2 520/193/2 +f 520/194/3 513/186/3 516/189/3 517/195/3 +f 514/190/4 519/196/4 518/195/4 515/189/4 +f 517/190/5 516/189/5 515/188/5 518/191/5 +f 520/197/6 519/198/6 514/187/6 513/186/6 +f 521/44/1 522/45/1 523/217/1 524/218/1 +f 525/219/2 526/220/2 527/221/2 528/222/2 +f 528/63/3 521/44/3 524/218/3 525/223/3 +f 522/219/4 527/224/4 526/223/4 523/218/4 +f 525/219/5 524/218/5 523/217/5 526/220/5 +f 528/225/6 527/226/6 522/45/6 521/44/6 +f 529/44/1 530/45/1 531/217/1 532/218/1 +f 533/219/2 534/220/2 535/221/2 536/222/2 +f 536/63/3 529/44/3 532/218/3 533/223/3 +f 530/219/4 535/224/4 534/223/4 531/218/4 +f 533/219/5 532/218/5 531/217/5 534/220/5 +f 536/225/6 535/226/6 530/45/6 529/44/6 +f 537/186/1 538/187/1 539/188/1 540/189/1 +f 541/190/2 542/191/2 543/192/2 544/193/2 +f 544/194/3 537/186/3 540/189/3 541/195/3 +f 538/190/4 543/196/4 542/195/4 539/189/4 +f 541/190/5 540/189/5 539/188/5 542/191/5 +f 544/197/6 543/198/6 538/187/6 537/186/6 +f 545/207/1 546/208/1 547/200/1 548/199/1 +f 549/43/2 550/42/2 551/202/2 552/201/2 +f 552/227/3 545/207/3 548/199/3 549/205/3 +f 546/43/4 551/62/4 550/205/4 547/199/4 +f 549/43/5 548/199/5 547/200/5 550/42/5 +f 552/211/6 551/212/6 546/208/6 545/207/6 +f 553/207/1 554/208/1 555/200/1 556/199/1 +f 557/43/2 558/42/2 559/202/2 560/201/2 +f 560/227/3 553/207/3 556/199/3 557/205/3 +f 554/43/4 559/62/4 558/205/4 555/199/4 +f 557/43/5 556/199/5 555/200/5 558/42/5 +f 560/211/6 559/212/6 554/208/6 553/207/6 +f 561/241/1 562/242/1 563/243/1 564/244/1 +f 565/245/2 566/246/2 567/25/2 568/247/2 +f 568/248/3 561/241/3 564/244/3 565/249/3 +f 562/250/4 567/251/4 566/249/4 563/244/4 +f 565/245/5 564/244/5 563/243/5 566/246/5 +f 568/252/6 567/253/6 562/242/6 561/241/6 +f 569/254/1 570/255/1 571/256/1 572/257/1 +f 573/258/2 574/259/2 575/260/2 576/261/2 +f 576/262/3 569/254/3 572/257/3 573/263/3 +f 570/264/4 575/265/4 574/263/4 571/257/4 +f 573/258/5 572/257/5 571/256/5 574/259/5 +f 576/266/6 575/267/6 570/255/6 569/254/6 +f 577/268/1 578/269/1 579/270/1 580/271/1 +f 581/272/2 582/273/2 583/274/2 584/275/2 +f 584/276/3 577/268/3 580/271/3 581/277/3 +f 578/278/4 583/279/4 582/277/4 579/271/4 +f 581/272/5 580/271/5 579/270/5 582/273/5 +f 584/280/6 583/281/6 578/269/6 577/268/6 +f 585/241/1 586/242/1 587/243/1 588/244/1 +f 589/245/2 590/246/2 591/25/2 592/247/2 +f 592/248/3 585/241/3 588/244/3 589/249/3 +f 586/250/4 591/251/4 590/249/4 587/244/4 +f 589/245/5 588/244/5 587/243/5 590/246/5 +f 592/252/6 591/253/6 586/242/6 585/241/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDemonPylon.mtl b/src/main/resources/assets/bloodmagic/models/block/blockdemonpylon.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockDemonPylon.mtl rename to src/main/resources/assets/bloodmagic/models/block/blockdemonpylon.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/blockdemonpylon.obj b/src/main/resources/assets/bloodmagic/models/block/blockdemonpylon.obj new file mode 100644 index 00000000..1e4d31b0 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockdemonpylon.obj @@ -0,0 +1,1171 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib blockdemonpylon.mtl +o BlockDemonPylon +v 0.125000 0.125000 0.875000 +v 0.125000 -0.000000 0.875000 +v 0.375000 -0.000000 0.875000 +v 0.375000 0.125000 0.875000 +v 0.375000 0.125000 0.625000 +v 0.375000 -0.000000 0.625000 +v 0.125000 -0.000000 0.625000 +v 0.125000 0.125000 0.625000 +v 0.193151 0.473851 0.803768 +v 0.151353 0.103509 0.845306 +v 0.337685 0.082741 0.847635 +v 0.379483 0.453082 0.806098 +v 0.379483 0.432183 0.619766 +v 0.337685 0.061842 0.661303 +v 0.151353 0.082610 0.658974 +v 0.193151 0.452952 0.617437 +v 0.625000 0.125000 0.375000 +v 0.625000 0.000000 0.375000 +v 0.875000 0.000000 0.375000 +v 0.875000 0.125000 0.375000 +v 0.875000 0.125000 0.125000 +v 0.875000 0.000000 0.125000 +v 0.625000 0.000000 0.125000 +v 0.625000 0.125000 0.125000 +v 0.620517 0.432206 0.380235 +v 0.662315 0.061873 0.338698 +v 0.848645 0.082641 0.341027 +v 0.806847 0.452974 0.382564 +v 0.806847 0.473873 0.196235 +v 0.848645 0.103540 0.154698 +v 0.662315 0.082772 0.152368 +v 0.620517 0.453105 0.193905 +v 0.125000 0.125000 0.375000 +v 0.125000 0.000000 0.375000 +v 0.375000 0.000000 0.375000 +v 0.375000 0.125000 0.375000 +v 0.375000 0.125000 0.125000 +v 0.375000 0.000000 0.125000 +v 0.125000 0.000000 0.125000 +v 0.125000 0.125000 0.125000 +v 0.193151 0.452963 0.382563 +v 0.151353 0.082626 0.341026 +v 0.337685 0.061857 0.338696 +v 0.379483 0.432194 0.380234 +v 0.379483 0.453093 0.193904 +v 0.337685 0.082756 0.152367 +v 0.151353 0.103525 0.154696 +v 0.193151 0.473862 0.196233 +v 0.625000 0.125000 0.875000 +v 0.625000 -0.000000 0.875000 +v 0.875000 -0.000000 0.875000 +v 0.875000 0.125000 0.875000 +v 0.875000 0.125000 0.625000 +v 0.875000 -0.000000 0.625000 +v 0.625000 -0.000000 0.625000 +v 0.625000 0.125000 0.625000 +v 0.620517 0.453093 0.806096 +v 0.662315 0.082756 0.847633 +v 0.848645 0.103525 0.845304 +v 0.806847 0.473862 0.803767 +v 0.806847 0.452963 0.617435 +v 0.848645 0.082626 0.658972 +v 0.662315 0.061857 0.661302 +v 0.620517 0.432194 0.619765 +v 0.125000 0.500000 0.875000 +v 0.125000 0.437500 0.875000 +v 0.875000 0.437500 0.875000 +v 0.875000 0.500000 0.875000 +v 0.875000 0.500000 0.125000 +v 0.875000 0.437500 0.125000 +v 0.125000 0.437500 0.125000 +v 0.125000 0.500000 0.125000 +v 0.187500 0.562500 0.812500 +v 0.187500 0.500000 0.812500 +v 0.812500 0.500000 0.812500 +v 0.812500 0.562500 0.812500 +v 0.812500 0.562500 0.187500 +v 0.812500 0.500000 0.187500 +v 0.187500 0.500000 0.187500 +v 0.187500 0.562500 0.187500 +v 0.125000 0.625000 0.875000 +v 0.125000 0.562500 0.875000 +v 0.875000 0.562500 0.875000 +v 0.875000 0.625000 0.875000 +v 0.875000 0.625000 0.125000 +v 0.875000 0.562500 0.125000 +v 0.125000 0.562500 0.125000 +v 0.125000 0.625000 0.125000 +v 0.218750 1.062500 0.781250 +v 0.218750 0.625000 0.781250 +v 0.781250 0.625000 0.781250 +v 0.781250 1.062500 0.781250 +v 0.781250 1.062500 0.218750 +v 0.781250 0.625000 0.218750 +v 0.218750 0.625000 0.218750 +v 0.218750 1.062500 0.218750 +v 0.218750 1.093750 0.843750 +v 0.218750 0.718750 0.843750 +v 0.781250 0.718750 0.843750 +v 0.781250 1.093750 0.843750 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.406250 0.968750 0.937500 +v 0.406250 0.843750 0.937500 +v 0.593750 0.843750 0.937500 +v 0.593750 0.968750 0.937500 +v 0.593750 0.968750 0.812500 +v 0.593750 0.843750 0.812500 +v 0.406250 0.843750 0.812500 +v 0.406250 0.968750 0.812500 +v 0.406250 1.156250 1.000000 +v 0.406250 0.906250 1.000000 +v 0.593750 0.906250 1.000000 +v 0.593750 1.156250 1.000000 +v 0.593750 1.156250 0.937500 +v 0.593750 0.906250 0.937500 +v 0.406250 0.906250 0.937500 +v 0.406250 1.156250 0.937500 +v 0.156250 1.093750 0.781250 +v 0.156250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.156250 0.718750 0.218750 +v 0.156250 1.093750 0.218750 +v 0.062500 0.968750 0.593750 +v 0.062500 0.843750 0.593750 +v 0.187500 0.843750 0.593750 +v 0.187500 0.968750 0.593750 +v 0.187500 0.968750 0.406250 +v 0.187500 0.843750 0.406250 +v 0.062500 0.843750 0.406250 +v 0.062500 0.968750 0.406250 +v 0.000000 1.156250 0.593750 +v 0.000000 0.906250 0.593750 +v 0.062500 0.906250 0.593750 +v 0.062500 1.156250 0.593750 +v 0.062500 1.156250 0.406250 +v 0.062500 0.906250 0.406250 +v 0.000000 0.906250 0.406250 +v 0.000000 1.156250 0.406250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.781250 1.093750 0.156250 +v 0.781250 0.718750 0.156250 +v 0.218750 0.718750 0.156250 +v 0.218750 1.093750 0.156250 +v 0.406250 0.968750 0.187500 +v 0.406250 0.843750 0.187500 +v 0.593750 0.843750 0.187500 +v 0.593750 0.968750 0.187500 +v 0.593750 0.968750 0.062500 +v 0.593750 0.843750 0.062500 +v 0.406250 0.843750 0.062500 +v 0.406250 0.968750 0.062500 +v 0.406250 1.156250 0.062500 +v 0.406250 0.906250 0.062500 +v 0.593750 0.906250 0.062500 +v 0.593750 1.156250 0.062500 +v 0.593750 1.156250 0.000000 +v 0.593750 0.906250 0.000000 +v 0.406250 0.906250 0.000000 +v 0.406250 1.156250 0.000000 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.843750 0.718750 0.781250 +v 0.843750 1.093750 0.781250 +v 0.843750 1.093750 0.218750 +v 0.843750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.812500 0.968750 0.593750 +v 0.812500 0.843750 0.593750 +v 0.937500 0.843750 0.593750 +v 0.937500 0.968750 0.593750 +v 0.937500 0.968750 0.406250 +v 0.937500 0.843750 0.406250 +v 0.812500 0.843750 0.406250 +v 0.812500 0.968750 0.406250 +v 0.937500 1.156250 0.593750 +v 0.937500 0.906250 0.593750 +v 1.000000 0.906250 0.593750 +v 1.000000 1.156250 0.593750 +v 1.000000 1.156250 0.406250 +v 1.000000 0.906250 0.406250 +v 0.937500 0.906250 0.406250 +v 0.937500 1.156250 0.406250 +v 0.281250 1.250000 0.718750 +v 0.281250 1.062500 0.718750 +v 0.718750 1.062500 0.718750 +v 0.718750 1.250000 0.718750 +v 0.718750 1.250000 0.281250 +v 0.718750 1.062500 0.281250 +v 0.281250 1.062500 0.281250 +v 0.281250 1.250000 0.281250 +v 0.406250 1.375000 0.593750 +v 0.406250 1.250000 0.593750 +v 0.593750 1.250000 0.593750 +v 0.593750 1.375000 0.593750 +v 0.593750 1.375000 0.406250 +v 0.593750 1.250000 0.406250 +v 0.406250 1.250000 0.406250 +v 0.406250 1.375000 0.406250 +v 0.468750 1.500000 0.531250 +v 0.468750 1.375000 0.531250 +v 0.531250 1.375000 0.531250 +v 0.531250 1.500000 0.531250 +v 0.531250 1.500000 0.468750 +v 0.531250 1.375000 0.468750 +v 0.468750 1.375000 0.468750 +v 0.468750 1.500000 0.468750 +v 0.437500 1.750000 0.562500 +v 0.437500 1.500000 0.562500 +v 0.562500 1.500000 0.562500 +v 0.562500 1.750000 0.562500 +v 0.562500 1.750000 0.437500 +v 0.562500 1.500000 0.437500 +v 0.437500 1.500000 0.437500 +v 0.437500 1.750000 0.437500 +v 0.193151 0.473851 0.803768 +v 0.151353 0.103509 0.845306 +v 0.337685 0.082741 0.847635 +v 0.379483 0.453082 0.806098 +v 0.379483 0.432183 0.619766 +v 0.337685 0.061842 0.661303 +v 0.151353 0.082610 0.658974 +v 0.193151 0.452952 0.617437 +v 0.620517 0.432206 0.380235 +v 0.662315 0.061873 0.338698 +v 0.848645 0.082641 0.341027 +v 0.806847 0.452974 0.382564 +v 0.806847 0.473873 0.196235 +v 0.848645 0.103540 0.154698 +v 0.662315 0.082772 0.152368 +v 0.620517 0.453105 0.193905 +v 0.193151 0.452963 0.382563 +v 0.151353 0.082626 0.341026 +v 0.337685 0.061857 0.338696 +v 0.379483 0.432194 0.380234 +v 0.379483 0.453093 0.193904 +v 0.337685 0.082756 0.152367 +v 0.151353 0.103525 0.154696 +v 0.193151 0.473862 0.196233 +v 0.620517 0.453093 0.806096 +v 0.662315 0.082756 0.847633 +v 0.848645 0.103525 0.845304 +v 0.806847 0.473862 0.803767 +v 0.806847 0.452963 0.617435 +v 0.848645 0.082626 0.658972 +v 0.662315 0.061857 0.661302 +v 0.620517 0.432194 0.619765 +v 0.218750 1.093750 0.843750 +v 0.218750 0.718750 0.843750 +v 0.781250 0.718750 0.843750 +v 0.781250 1.093750 0.843750 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.406250 0.968750 0.937500 +v 0.406250 0.843750 0.937500 +v 0.593750 0.843750 0.937500 +v 0.593750 0.968750 0.937500 +v 0.593750 0.968750 0.812500 +v 0.593750 0.843750 0.812500 +v 0.406250 0.843750 0.812500 +v 0.406250 0.968750 0.812500 +v 0.406250 1.156250 1.000000 +v 0.406250 0.906250 1.000000 +v 0.593750 0.906250 1.000000 +v 0.593750 1.156250 1.000000 +v 0.593750 1.156250 0.937500 +v 0.593750 0.906250 0.937500 +v 0.406250 0.906250 0.937500 +v 0.406250 1.156250 0.937500 +v 0.156250 1.093750 0.781250 +v 0.156250 0.718750 0.781250 +v 0.218750 0.718750 0.781250 +v 0.218750 1.093750 0.781250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.156250 0.718750 0.218750 +v 0.156250 1.093750 0.218750 +v 0.062500 0.968750 0.593750 +v 0.062500 0.843750 0.593750 +v 0.187500 0.843750 0.593750 +v 0.187500 0.968750 0.593750 +v 0.187500 0.968750 0.406250 +v 0.187500 0.843750 0.406250 +v 0.062500 0.843750 0.406250 +v 0.062500 0.968750 0.406250 +v 0.000000 1.156250 0.593750 +v 0.000000 0.906250 0.593750 +v 0.062500 0.906250 0.593750 +v 0.062500 1.156250 0.593750 +v 0.062500 1.156250 0.406250 +v 0.062500 0.906250 0.406250 +v 0.000000 0.906250 0.406250 +v 0.000000 1.156250 0.406250 +v 0.218750 1.093750 0.218750 +v 0.218750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.781250 1.093750 0.156250 +v 0.781250 0.718750 0.156250 +v 0.218750 0.718750 0.156250 +v 0.218750 1.093750 0.156250 +v 0.406250 0.968750 0.187500 +v 0.406250 0.843750 0.187500 +v 0.593750 0.843750 0.187500 +v 0.593750 0.968750 0.187500 +v 0.593750 0.968750 0.062500 +v 0.593750 0.843750 0.062500 +v 0.406250 0.843750 0.062500 +v 0.406250 0.968750 0.062500 +v 0.406250 1.156250 0.062500 +v 0.406250 0.906250 0.062500 +v 0.593750 0.906250 0.062500 +v 0.593750 1.156250 0.062500 +v 0.593750 1.156250 0.000000 +v 0.593750 0.906250 0.000000 +v 0.406250 0.906250 0.000000 +v 0.406250 1.156250 0.000000 +v 0.781250 1.093750 0.781250 +v 0.781250 0.718750 0.781250 +v 0.843750 0.718750 0.781250 +v 0.843750 1.093750 0.781250 +v 0.843750 1.093750 0.218750 +v 0.843750 0.718750 0.218750 +v 0.781250 0.718750 0.218750 +v 0.781250 1.093750 0.218750 +v 0.812500 0.968750 0.593750 +v 0.812500 0.843750 0.593750 +v 0.937500 0.843750 0.593750 +v 0.937500 0.968750 0.593750 +v 0.937500 0.968750 0.406250 +v 0.937500 0.843750 0.406250 +v 0.812500 0.843750 0.406250 +v 0.812500 0.968750 0.406250 +v 0.937500 1.156250 0.593750 +v 0.937500 0.906250 0.593750 +v 1.000000 0.906250 0.593750 +v 1.000000 1.156250 0.593750 +v 1.000000 1.156250 0.406250 +v 1.000000 0.906250 0.406250 +v 0.937500 0.906250 0.406250 +v 0.937500 1.156250 0.406250 +v 0.281250 1.250000 0.718750 +v 0.281250 1.062500 0.718750 +v 0.718750 1.062500 0.718750 +v 0.718750 1.250000 0.718750 +v 0.718750 1.250000 0.281250 +v 0.718750 1.062500 0.281250 +v 0.281250 1.062500 0.281250 +v 0.281250 1.250000 0.281250 +v 0.406250 1.375000 0.593750 +v 0.406250 1.250000 0.593750 +v 0.593750 1.250000 0.593750 +v 0.593750 1.375000 0.593750 +v 0.593750 1.375000 0.406250 +v 0.593750 1.250000 0.406250 +v 0.406250 1.250000 0.406250 +v 0.406250 1.375000 0.406250 +v 0.468750 1.500000 0.531250 +v 0.468750 1.375000 0.531250 +v 0.531250 1.375000 0.531250 +v 0.531250 1.500000 0.531250 +v 0.531250 1.500000 0.468750 +v 0.531250 1.375000 0.468750 +v 0.468750 1.375000 0.468750 +v 0.468750 1.500000 0.468750 +v 0.437500 1.750000 0.562500 +v 0.437500 1.500000 0.562500 +v 0.562500 1.500000 0.562500 +v 0.562500 1.750000 0.562500 +v 0.562500 1.750000 0.437500 +v 0.562500 1.500000 0.437500 +v 0.437500 1.500000 0.437500 +v 0.437500 1.750000 0.437500 +v 0.406250 0.968750 0.937500 +v 0.406250 0.843750 0.937500 +v 0.593750 0.843750 0.937500 +v 0.593750 0.968750 0.937500 +v 0.593750 0.968750 0.812500 +v 0.593750 0.843750 0.812500 +v 0.406250 0.843750 0.812500 +v 0.406250 0.968750 0.812500 +v 0.406250 1.156250 1.000000 +v 0.406250 0.906250 1.000000 +v 0.593750 0.906250 1.000000 +v 0.593750 1.156250 1.000000 +v 0.593750 1.156250 0.937500 +v 0.593750 0.906250 0.937500 +v 0.406250 0.906250 0.937500 +v 0.406250 1.156250 0.937500 +v 0.406250 1.156250 1.000000 +v 0.406250 0.906250 1.000000 +v 0.593750 0.906250 1.000000 +v 0.593750 1.156250 1.000000 +v 0.593750 1.156250 0.937500 +v 0.593750 0.906250 0.937500 +v 0.406250 0.906250 0.937500 +v 0.406250 1.156250 0.937500 +v 0.062500 0.968750 0.593750 +v 0.062500 0.843750 0.593750 +v 0.187500 0.843750 0.593750 +v 0.187500 0.968750 0.593750 +v 0.187500 0.968750 0.406250 +v 0.187500 0.843750 0.406250 +v 0.062500 0.843750 0.406250 +v 0.062500 0.968750 0.406250 +v 0.000000 1.156250 0.593750 +v 0.000000 0.906250 0.593750 +v 0.062500 0.906250 0.593750 +v 0.062500 1.156250 0.593750 +v 0.062500 1.156250 0.406250 +v 0.062500 0.906250 0.406250 +v 0.000000 0.906250 0.406250 +v 0.000000 1.156250 0.406250 +v 0.000000 1.156250 0.593750 +v 0.000000 0.906250 0.593750 +v 0.062500 0.906250 0.593750 +v 0.062500 1.156250 0.593750 +v 0.062500 1.156250 0.406250 +v 0.062500 0.906250 0.406250 +v 0.000000 0.906250 0.406250 +v 0.000000 1.156250 0.406250 +v 0.406250 0.968750 0.187500 +v 0.406250 0.843750 0.187500 +v 0.593750 0.843750 0.187500 +v 0.593750 0.968750 0.187500 +v 0.593750 0.968750 0.062500 +v 0.593750 0.843750 0.062500 +v 0.406250 0.843750 0.062500 +v 0.406250 0.968750 0.062500 +v 0.406250 1.156250 0.062500 +v 0.406250 0.906250 0.062500 +v 0.593750 0.906250 0.062500 +v 0.593750 1.156250 0.062500 +v 0.593750 1.156250 0.000000 +v 0.593750 0.906250 0.000000 +v 0.406250 0.906250 0.000000 +v 0.406250 1.156250 0.000000 +v 0.406250 1.156250 0.062500 +v 0.406250 0.906250 0.062500 +v 0.593750 0.906250 0.062500 +v 0.593750 1.156250 0.062500 +v 0.593750 1.156250 0.000000 +v 0.593750 0.906250 0.000000 +v 0.406250 0.906250 0.000000 +v 0.406250 1.156250 0.000000 +v 0.812500 0.968750 0.593750 +v 0.812500 0.843750 0.593750 +v 0.937500 0.843750 0.593750 +v 0.937500 0.968750 0.593750 +v 0.937500 0.968750 0.406250 +v 0.937500 0.843750 0.406250 +v 0.812500 0.843750 0.406250 +v 0.812500 0.968750 0.406250 +v 0.937500 1.156250 0.593750 +v 0.937500 0.906250 0.593750 +v 1.000000 0.906250 0.593750 +v 1.000000 1.156250 0.593750 +v 1.000000 1.156250 0.406250 +v 1.000000 0.906250 0.406250 +v 0.937500 0.906250 0.406250 +v 0.937500 1.156250 0.406250 +v 0.937500 1.156250 0.593750 +v 0.937500 0.906250 0.593750 +v 1.000000 0.906250 0.593750 +v 1.000000 1.156250 0.593750 +v 1.000000 1.156250 0.406250 +v 1.000000 0.906250 0.406250 +v 0.937500 0.906250 0.406250 +v 0.937500 1.156250 0.406250 +v 0.406250 1.375000 0.593750 +v 0.406250 1.250000 0.593750 +v 0.593750 1.250000 0.593750 +v 0.593750 1.375000 0.593750 +v 0.593750 1.375000 0.406250 +v 0.593750 1.250000 0.406250 +v 0.406250 1.250000 0.406250 +v 0.406250 1.375000 0.406250 +v 0.468750 1.500000 0.531250 +v 0.468750 1.375000 0.531250 +v 0.531250 1.375000 0.531250 +v 0.531250 1.500000 0.531250 +v 0.531250 1.500000 0.468750 +v 0.531250 1.375000 0.468750 +v 0.468750 1.375000 0.468750 +v 0.468750 1.500000 0.468750 +v 0.437500 1.750000 0.562500 +v 0.437500 1.500000 0.562500 +v 0.562500 1.500000 0.562500 +v 0.562500 1.750000 0.562500 +v 0.562500 1.750000 0.437500 +v 0.562500 1.500000 0.437500 +v 0.437500 1.500000 0.437500 +v 0.437500 1.750000 0.437500 +v 0.468750 1.500000 0.531250 +v 0.468750 1.375000 0.531250 +v 0.531250 1.375000 0.531250 +v 0.531250 1.500000 0.531250 +v 0.531250 1.500000 0.468750 +v 0.531250 1.375000 0.468750 +v 0.468750 1.375000 0.468750 +v 0.468750 1.500000 0.468750 +v 0.437500 1.750000 0.562500 +v 0.437500 1.500000 0.562500 +v 0.562500 1.500000 0.562500 +v 0.562500 1.750000 0.562500 +v 0.562500 1.750000 0.437500 +v 0.562500 1.500000 0.437500 +v 0.437500 1.500000 0.437500 +v 0.437500 1.750000 0.437500 +v 0.437500 1.750000 0.562500 +v 0.437500 1.500000 0.562500 +v 0.562500 1.500000 0.562500 +v 0.562500 1.750000 0.562500 +v 0.562500 1.750000 0.437500 +v 0.562500 1.500000 0.437500 +v 0.437500 1.500000 0.437500 +v 0.437500 1.750000 0.437500 +vt 0.062500 0.937500 +vt 0.062500 0.906250 +vt 0.125000 0.906250 +vt 0.125000 0.937500 +vt 0.187500 0.937500 +vt 0.187500 0.906250 +vt 0.250000 0.906250 +vt 0.250000 0.937500 +vt 0.062500 1.000000 +vt 0.125000 1.000000 +vt 0.187500 1.000000 +vt 0.000000 0.937500 +vt 0.000000 0.906250 +vt 0.046875 0.843750 +vt 0.046875 0.750000 +vt 0.093750 0.750000 +vt 0.093750 0.843750 +vt 0.140625 0.843750 +vt 0.140625 0.750000 +vt 0.187500 0.750000 +vt 0.187500 0.843750 +vt 0.046875 0.890625 +vt 0.093750 0.890625 +vt 0.140625 0.890625 +vt 0.000000 0.843750 +vt 0.000000 0.750000 +vt 0.437500 0.015625 +vt 0.437500 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.015625 +vt 0.812500 0.015625 +vt 0.812500 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.015625 +vt 0.437500 0.203125 +vt 0.625000 0.203125 +vt 0.812500 0.203125 +vt 0.250000 0.015625 +vt 0.250000 0.000000 +vt 0.531250 0.234375 +vt 0.531250 0.218750 +vt 0.687500 0.218750 +vt 0.687500 0.234375 +vt 0.843750 0.234375 +vt 0.843750 0.218750 +vt 1.000000 0.218750 +vt 1.000000 0.234375 +vt 0.531250 0.390625 +vt 0.687500 0.390625 +vt 0.843750 0.390625 +vt 0.375000 0.234375 +vt 0.375000 0.218750 +vt 0.578125 0.531250 +vt 0.578125 0.421875 +vt 0.718750 0.421875 +vt 0.718750 0.531250 +vt 0.859375 0.531250 +vt 0.859375 0.421875 +vt 1.000000 0.421875 +vt 1.000000 0.531250 +vt 0.578125 0.671875 +vt 0.718750 0.671875 +vt 0.859375 0.671875 +vt 0.437500 0.531250 +vt 0.437500 0.421875 +vt 0.703125 0.984375 +vt 0.703125 0.890625 +vt 0.843750 0.890625 +vt 0.843750 0.984375 +vt 0.859375 0.984375 +vt 0.859375 0.890625 +vt 1.000000 0.890625 +vt 1.000000 0.984375 +vt 0.703125 1.000000 +vt 0.843750 1.000000 +vt 0.984375 0.984375 +vt 0.984375 1.000000 +vt 0.687500 0.984375 +vt 0.687500 0.890625 +vt 0.734375 0.843750 +vt 0.734375 0.812500 +vt 0.781250 0.812500 +vt 0.781250 0.843750 +vt 0.812500 0.843750 +vt 0.812500 0.812500 +vt 0.859375 0.812500 +vt 0.859375 0.843750 +vt 0.734375 0.875000 +vt 0.781250 0.875000 +vt 0.828125 0.843750 +vt 0.828125 0.875000 +vt 0.703125 0.843750 +vt 0.703125 0.812500 +vt 0.890625 0.859375 +vt 0.890625 0.796875 +vt 0.937500 0.796875 +vt 0.937500 0.859375 +vt 0.953125 0.859375 +vt 0.953125 0.796875 +vt 1.000000 0.796875 +vt 1.000000 0.859375 +vt 0.890625 0.875000 +vt 0.937500 0.875000 +vt 0.984375 0.859375 +vt 0.984375 0.875000 +vt 0.875000 0.859375 +vt 0.875000 0.796875 +vt 0.140625 0.593750 +vt 0.140625 0.500000 +vt 0.156250 0.500000 +vt 0.156250 0.593750 +vt 0.296875 0.593750 +vt 0.296875 0.500000 +vt 0.312500 0.500000 +vt 0.312500 0.593750 +vt 0.140625 0.734375 +vt 0.156250 0.734375 +vt 0.171875 0.593750 +vt 0.171875 0.734375 +vt 0.000000 0.593750 +vt 0.000000 0.500000 +vt 0.421875 0.828125 +vt 0.421875 0.796875 +vt 0.453125 0.796875 +vt 0.453125 0.828125 +vt 0.500000 0.828125 +vt 0.500000 0.796875 +vt 0.531250 0.796875 +vt 0.531250 0.828125 +vt 0.421875 0.875000 +vt 0.453125 0.875000 +vt 0.484375 0.828125 +vt 0.484375 0.875000 +vt 0.375000 0.828125 +vt 0.375000 0.796875 +vt 0.593750 0.828125 +vt 0.593750 0.765625 +vt 0.609375 0.765625 +vt 0.609375 0.828125 +vt 0.656250 0.828125 +vt 0.656250 0.765625 +vt 0.671875 0.765625 +vt 0.671875 0.828125 +vt 0.593750 0.875000 +vt 0.609375 0.875000 +vt 0.625000 0.828125 +vt 0.625000 0.875000 +vt 0.546875 0.828125 +vt 0.546875 0.765625 +vt 0.375000 0.984375 +vt 0.375000 0.890625 +vt 0.515625 0.890625 +vt 0.515625 0.984375 +vt 0.531250 0.984375 +vt 0.531250 0.890625 +vt 0.671875 0.890625 +vt 0.671875 0.984375 +vt 0.375000 1.000000 +vt 0.515625 1.000000 +vt 0.656250 0.984375 +vt 0.656250 1.000000 +vt 0.359375 0.984375 +vt 0.359375 0.890625 +vt 0.109375 0.375000 +vt 0.109375 0.328125 +vt 0.218750 0.328125 +vt 0.218750 0.375000 +vt 0.328125 0.375000 +vt 0.328125 0.328125 +vt 0.437500 0.328125 +vt 0.437500 0.375000 +vt 0.109375 0.484375 +vt 0.218750 0.484375 +vt 0.328125 0.484375 +vt 0.000000 0.375000 +vt 0.000000 0.328125 +vt 0.046875 0.203125 +vt 0.046875 0.171875 +vt 0.093750 0.171875 +vt 0.093750 0.203125 +vt 0.140625 0.203125 +vt 0.140625 0.171875 +vt 0.187500 0.171875 +vt 0.187500 0.203125 +vt 0.046875 0.250000 +vt 0.093750 0.250000 +vt 0.140625 0.250000 +vt 0.000000 0.203125 +vt 0.000000 0.171875 +vt 0.015625 0.140625 +vt 0.015625 0.109375 +vt 0.031250 0.109375 +vt 0.031250 0.140625 +vt 0.046875 0.140625 +vt 0.046875 0.109375 +vt 0.062500 0.109375 +vt 0.062500 0.140625 +vt 0.015625 0.156250 +vt 0.031250 0.156250 +vt 0.046875 0.156250 +vt 0.000000 0.140625 +vt 0.000000 0.109375 +vt 0.031250 0.062500 +vt 0.031250 0.000000 +vt 0.062500 0.000000 +vt 0.062500 0.062500 +vt 0.093750 0.062500 +vt 0.093750 0.000000 +vt 0.125000 0.000000 +vt 0.125000 0.062500 +vt 0.031250 0.093750 +vt 0.062500 0.093750 +vt 0.093750 0.093750 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -0.000000 0.111500 0.993800 +vn -0.000000 -0.111500 -0.993800 +vn 0.111500 0.987600 -0.110800 +vn -0.111500 -0.987600 0.110800 +vn 0.993800 -0.110800 0.012400 +vn -0.993800 0.110800 -0.012400 +vn 0.000000 -0.111500 0.993800 +vn 0.000000 0.111500 -0.993800 +vn -0.111500 0.987600 0.110800 +vn 0.111500 -0.987600 -0.110800 +vn 0.993800 0.110800 0.012400 +vn -0.993800 -0.110800 -0.012400 +vn 0.111500 0.987600 0.110800 +vn -0.111500 -0.987600 -0.110800 +vn 0.993800 -0.110800 -0.012400 +vn -0.993800 0.110800 0.012400 +vn -0.111500 0.987600 -0.110800 +vn 0.111500 -0.987600 0.110800 +vn 0.993800 0.110800 -0.012400 +vn -0.993800 -0.110800 0.012400 +usemtl None +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 8/9/3 1/1/3 4/4/3 5/10/3 +f 2/5/4 7/11/4 6/10/4 3/4/4 +f 5/5/5 4/4/5 3/3/5 6/6/5 +f 8/12/6 7/13/6 2/2/6 1/1/6 +f 9/14/7 10/15/7 11/16/7 12/17/7 +f 13/18/8 14/19/8 15/20/8 16/21/8 +f 16/22/9 9/14/9 12/17/9 13/23/9 +f 10/18/10 15/24/10 14/23/10 11/17/10 +f 13/18/11 12/17/11 11/16/11 14/19/11 +f 16/25/12 15/26/12 10/15/12 9/14/12 +f 17/1/1 18/2/1 19/3/1 20/4/1 +f 21/5/2 22/6/2 23/7/2 24/8/2 +f 24/9/3 17/1/3 20/4/3 21/10/3 +f 18/5/4 23/11/4 22/10/4 19/4/4 +f 21/5/5 20/4/5 19/3/5 22/6/5 +f 24/12/6 23/13/6 18/2/6 17/1/6 +f 25/14/13 26/15/13 27/16/13 28/17/13 +f 29/18/14 30/19/14 31/20/14 32/21/14 +f 32/22/15 25/14/15 28/17/15 29/23/15 +f 26/18/16 31/24/16 30/23/16 27/17/16 +f 29/18/17 28/17/17 27/16/17 30/19/17 +f 32/25/18 31/26/18 26/15/18 25/14/18 +f 33/1/1 34/2/1 35/3/1 36/4/1 +f 37/5/2 38/6/2 39/7/2 40/8/2 +f 40/9/3 33/1/3 36/4/3 37/10/3 +f 34/5/4 39/11/4 38/10/4 35/4/4 +f 37/5/5 36/4/5 35/3/5 38/6/5 +f 40/12/6 39/13/6 34/2/6 33/1/6 +f 41/14/13 42/15/13 43/16/13 44/17/13 +f 45/18/14 46/19/14 47/20/14 48/21/14 +f 48/22/19 41/14/19 44/17/19 45/23/19 +f 42/18/20 47/24/20 46/23/20 43/17/20 +f 45/18/21 44/17/21 43/16/21 46/19/21 +f 48/25/22 47/26/22 42/15/22 41/14/22 +f 49/1/1 50/2/1 51/3/1 52/4/1 +f 53/5/2 54/6/2 55/7/2 56/8/2 +f 56/9/3 49/1/3 52/4/3 53/10/3 +f 50/5/4 55/11/4 54/10/4 51/4/4 +f 53/5/5 52/4/5 51/3/5 54/6/5 +f 56/12/6 55/13/6 50/2/6 49/1/6 +f 57/14/7 58/15/7 59/16/7 60/17/7 +f 61/18/8 62/19/8 63/20/8 64/21/8 +f 64/22/23 57/14/23 60/17/23 61/23/23 +f 58/18/24 63/24/24 62/23/24 59/17/24 +f 61/18/25 60/17/25 59/16/25 62/19/25 +f 64/25/26 63/26/26 58/15/26 57/14/26 +f 65/27/1 66/28/1 67/29/1 68/30/1 +f 69/31/2 70/32/2 71/33/2 72/34/2 +f 72/35/3 65/27/3 68/30/3 69/36/3 +f 66/31/4 71/37/4 70/36/4 67/30/4 +f 69/31/5 68/30/5 67/29/5 70/32/5 +f 72/38/6 71/39/6 66/28/6 65/27/6 +f 73/40/1 74/41/1 75/42/1 76/43/1 +f 77/44/2 78/45/2 79/46/2 80/47/2 +f 80/48/3 73/40/3 76/43/3 77/49/3 +f 74/44/4 79/50/4 78/49/4 75/43/4 +f 77/44/5 76/43/5 75/42/5 78/45/5 +f 80/51/6 79/52/6 74/41/6 73/40/6 +f 81/27/1 82/28/1 83/29/1 84/30/1 +f 85/31/2 86/32/2 87/33/2 88/34/2 +f 88/35/3 81/27/3 84/30/3 85/36/3 +f 82/31/4 87/37/4 86/36/4 83/30/4 +f 85/31/5 84/30/5 83/29/5 86/32/5 +f 88/38/6 87/39/6 82/28/6 81/27/6 +f 89/53/1 90/54/1 91/55/1 92/56/1 +f 93/57/2 94/58/2 95/59/2 96/60/2 +f 96/61/3 89/53/3 92/56/3 93/62/3 +f 90/57/4 95/63/4 94/62/4 91/56/4 +f 93/57/5 92/56/5 91/55/5 94/58/5 +f 96/64/6 95/65/6 90/54/6 89/53/6 +f 97/66/1 98/67/1 99/68/1 100/69/1 +f 101/70/2 102/71/2 103/72/2 104/73/2 +f 104/74/3 97/66/3 100/69/3 101/75/3 +f 98/76/4 103/77/4 102/75/4 99/69/4 +f 101/70/5 100/69/5 99/68/5 102/71/5 +f 104/78/6 103/79/6 98/67/6 97/66/6 +f 105/80/1 106/81/1 107/82/1 108/83/1 +f 109/84/2 110/85/2 111/86/2 112/87/2 +f 112/88/3 105/80/3 108/83/3 109/89/3 +f 106/90/4 111/91/4 110/89/4 107/83/4 +f 109/84/5 108/83/5 107/82/5 110/85/5 +f 112/92/6 111/93/6 106/81/6 105/80/6 +f 113/94/1 114/95/1 115/96/1 116/97/1 +f 117/98/2 118/99/2 119/100/2 120/101/2 +f 120/102/3 113/94/3 116/97/3 117/103/3 +f 114/104/4 119/105/4 118/103/4 115/97/4 +f 117/98/5 116/97/5 115/96/5 118/99/5 +f 120/106/6 119/107/6 114/95/6 113/94/6 +f 121/108/1 122/109/1 123/110/1 124/111/1 +f 125/112/2 126/113/2 127/114/2 128/115/2 +f 128/116/3 121/108/3 124/111/3 125/117/3 +f 122/118/4 127/119/4 126/117/4 123/111/4 +f 125/112/5 124/111/5 123/110/5 126/113/5 +f 128/120/6 127/121/6 122/109/6 121/108/6 +f 129/122/1 130/123/1 131/124/1 132/125/1 +f 133/126/2 134/127/2 135/128/2 136/129/2 +f 136/130/3 129/122/3 132/125/3 133/131/3 +f 130/132/4 135/133/4 134/131/4 131/125/4 +f 133/126/5 132/125/5 131/124/5 134/127/5 +f 136/134/6 135/135/6 130/123/6 129/122/6 +f 137/136/1 138/137/1 139/138/1 140/139/1 +f 141/140/2 142/141/2 143/142/2 144/143/2 +f 144/144/3 137/136/3 140/139/3 141/145/3 +f 138/146/4 143/147/4 142/145/4 139/139/4 +f 141/140/5 140/139/5 139/138/5 142/141/5 +f 144/148/6 143/149/6 138/137/6 137/136/6 +f 145/150/1 146/151/1 147/152/1 148/153/1 +f 149/154/2 150/155/2 151/156/2 152/157/2 +f 152/158/3 145/150/3 148/153/3 149/159/3 +f 146/160/4 151/161/4 150/159/4 147/153/4 +f 149/154/5 148/153/5 147/152/5 150/155/5 +f 152/162/6 151/163/6 146/151/6 145/150/6 +f 153/80/1 154/81/1 155/82/1 156/83/1 +f 157/84/2 158/85/2 159/86/2 160/87/2 +f 160/88/3 153/80/3 156/83/3 157/89/3 +f 154/90/4 159/91/4 158/89/4 155/83/4 +f 157/84/5 156/83/5 155/82/5 158/85/5 +f 160/92/6 159/93/6 154/81/6 153/80/6 +f 161/94/1 162/95/1 163/96/1 164/97/1 +f 165/98/2 166/99/2 167/100/2 168/101/2 +f 168/102/3 161/94/3 164/97/3 165/103/3 +f 162/104/4 167/105/4 166/103/4 163/97/4 +f 165/98/5 164/97/5 163/96/5 166/99/5 +f 168/106/6 167/107/6 162/95/6 161/94/6 +f 169/108/1 170/109/1 171/110/1 172/111/1 +f 173/112/2 174/113/2 175/114/2 176/115/2 +f 176/116/3 169/108/3 172/111/3 173/117/3 +f 170/118/4 175/119/4 174/117/4 171/111/4 +f 173/112/5 172/111/5 171/110/5 174/113/5 +f 176/120/6 175/121/6 170/109/6 169/108/6 +f 177/122/1 178/123/1 179/124/1 180/125/1 +f 181/126/2 182/127/2 183/128/2 184/129/2 +f 184/130/3 177/122/3 180/125/3 181/131/3 +f 178/132/4 183/133/4 182/131/4 179/125/4 +f 181/126/5 180/125/5 179/124/5 182/127/5 +f 184/134/6 183/135/6 178/123/6 177/122/6 +f 185/136/1 186/137/1 187/138/1 188/139/1 +f 189/140/2 190/141/2 191/142/2 192/143/2 +f 192/144/3 185/136/3 188/139/3 189/145/3 +f 186/146/4 191/147/4 190/145/4 187/139/4 +f 189/140/5 188/139/5 187/138/5 190/141/5 +f 192/148/6 191/149/6 186/137/6 185/136/6 +f 193/164/1 194/165/1 195/166/1 196/167/1 +f 197/168/2 198/169/2 199/170/2 200/171/2 +f 200/172/3 193/164/3 196/167/3 197/173/3 +f 194/168/4 199/174/4 198/173/4 195/167/4 +f 197/168/5 196/167/5 195/166/5 198/169/5 +f 200/175/6 199/176/6 194/165/6 193/164/6 +f 201/177/1 202/178/1 203/179/1 204/180/1 +f 205/181/2 206/182/2 207/183/2 208/184/2 +f 208/185/3 201/177/3 204/180/3 205/186/3 +f 202/181/4 207/187/4 206/186/4 203/180/4 +f 205/181/5 204/180/5 203/179/5 206/182/5 +f 208/188/6 207/189/6 202/178/6 201/177/6 +f 209/190/1 210/191/1 211/192/1 212/193/1 +f 213/194/2 214/195/2 215/196/2 216/197/2 +f 216/198/3 209/190/3 212/193/3 213/199/3 +f 210/194/4 215/200/4 214/199/4 211/193/4 +f 213/194/5 212/193/5 211/192/5 214/195/5 +f 216/201/6 215/202/6 210/191/6 209/190/6 +f 217/203/1 218/204/1 219/205/1 220/206/1 +f 221/207/2 222/208/2 223/209/2 224/210/2 +f 224/211/3 217/203/3 220/206/3 221/212/3 +f 218/207/4 223/213/4 222/212/4 219/206/4 +f 221/207/5 220/206/5 219/205/5 222/208/5 +f 224/214/6 223/215/6 218/204/6 217/203/6 +f 225/14/7 226/15/7 227/16/7 228/17/7 +f 229/18/8 230/19/8 231/20/8 232/21/8 +f 232/22/9 225/14/9 228/17/9 229/23/9 +f 226/18/10 231/24/10 230/23/10 227/17/10 +f 229/18/11 228/17/11 227/16/11 230/19/11 +f 232/25/12 231/26/12 226/15/12 225/14/12 +f 233/14/13 234/15/13 235/16/13 236/17/13 +f 237/18/14 238/19/14 239/20/14 240/21/14 +f 240/22/15 233/14/15 236/17/15 237/23/15 +f 234/18/16 239/24/16 238/23/16 235/17/16 +f 237/18/17 236/17/17 235/16/17 238/19/17 +f 240/25/18 239/26/18 234/15/18 233/14/18 +f 241/14/13 242/15/13 243/16/13 244/17/13 +f 245/18/14 246/19/14 247/20/14 248/21/14 +f 248/22/19 241/14/19 244/17/19 245/23/19 +f 242/18/20 247/24/20 246/23/20 243/17/20 +f 245/18/21 244/17/21 243/16/21 246/19/21 +f 248/25/22 247/26/22 242/15/22 241/14/22 +f 249/14/7 250/15/7 251/16/7 252/17/7 +f 253/18/8 254/19/8 255/20/8 256/21/8 +f 256/22/23 249/14/23 252/17/23 253/23/23 +f 250/18/24 255/24/24 254/23/24 251/17/24 +f 253/18/25 252/17/25 251/16/25 254/19/25 +f 256/25/26 255/26/26 250/15/26 249/14/26 +f 257/66/1 258/67/1 259/68/1 260/69/1 +f 261/70/2 262/71/2 263/72/2 264/73/2 +f 264/74/3 257/66/3 260/69/3 261/75/3 +f 258/76/4 263/77/4 262/75/4 259/69/4 +f 261/70/5 260/69/5 259/68/5 262/71/5 +f 264/78/6 263/79/6 258/67/6 257/66/6 +f 265/80/1 266/81/1 267/82/1 268/83/1 +f 269/84/2 270/85/2 271/86/2 272/87/2 +f 272/88/3 265/80/3 268/83/3 269/89/3 +f 266/90/4 271/91/4 270/89/4 267/83/4 +f 269/84/5 268/83/5 267/82/5 270/85/5 +f 272/92/6 271/93/6 266/81/6 265/80/6 +f 273/94/1 274/95/1 275/96/1 276/97/1 +f 277/98/2 278/99/2 279/100/2 280/101/2 +f 280/102/3 273/94/3 276/97/3 277/103/3 +f 274/104/4 279/105/4 278/103/4 275/97/4 +f 277/98/5 276/97/5 275/96/5 278/99/5 +f 280/106/6 279/107/6 274/95/6 273/94/6 +f 281/108/1 282/109/1 283/110/1 284/111/1 +f 285/112/2 286/113/2 287/114/2 288/115/2 +f 288/116/3 281/108/3 284/111/3 285/117/3 +f 282/118/4 287/119/4 286/117/4 283/111/4 +f 285/112/5 284/111/5 283/110/5 286/113/5 +f 288/120/6 287/121/6 282/109/6 281/108/6 +f 289/122/1 290/123/1 291/124/1 292/125/1 +f 293/126/2 294/127/2 295/128/2 296/129/2 +f 296/130/3 289/122/3 292/125/3 293/131/3 +f 290/132/4 295/133/4 294/131/4 291/125/4 +f 293/126/5 292/125/5 291/124/5 294/127/5 +f 296/134/6 295/135/6 290/123/6 289/122/6 +f 297/136/1 298/137/1 299/138/1 300/139/1 +f 301/140/2 302/141/2 303/142/2 304/143/2 +f 304/144/3 297/136/3 300/139/3 301/145/3 +f 298/146/4 303/147/4 302/145/4 299/139/4 +f 301/140/5 300/139/5 299/138/5 302/141/5 +f 304/148/6 303/149/6 298/137/6 297/136/6 +f 305/150/1 306/151/1 307/152/1 308/153/1 +f 309/154/2 310/155/2 311/156/2 312/157/2 +f 312/158/3 305/150/3 308/153/3 309/159/3 +f 306/160/4 311/161/4 310/159/4 307/153/4 +f 309/154/5 308/153/5 307/152/5 310/155/5 +f 312/162/6 311/163/6 306/151/6 305/150/6 +f 313/80/1 314/81/1 315/82/1 316/83/1 +f 317/84/2 318/85/2 319/86/2 320/87/2 +f 320/88/3 313/80/3 316/83/3 317/89/3 +f 314/90/4 319/91/4 318/89/4 315/83/4 +f 317/84/5 316/83/5 315/82/5 318/85/5 +f 320/92/6 319/93/6 314/81/6 313/80/6 +f 321/94/1 322/95/1 323/96/1 324/97/1 +f 325/98/2 326/99/2 327/100/2 328/101/2 +f 328/102/3 321/94/3 324/97/3 325/103/3 +f 322/104/4 327/105/4 326/103/4 323/97/4 +f 325/98/5 324/97/5 323/96/5 326/99/5 +f 328/106/6 327/107/6 322/95/6 321/94/6 +f 329/108/1 330/109/1 331/110/1 332/111/1 +f 333/112/2 334/113/2 335/114/2 336/115/2 +f 336/116/3 329/108/3 332/111/3 333/117/3 +f 330/118/4 335/119/4 334/117/4 331/111/4 +f 333/112/5 332/111/5 331/110/5 334/113/5 +f 336/120/6 335/121/6 330/109/6 329/108/6 +f 337/122/1 338/123/1 339/124/1 340/125/1 +f 341/126/2 342/127/2 343/128/2 344/129/2 +f 344/130/3 337/122/3 340/125/3 341/131/3 +f 338/132/4 343/133/4 342/131/4 339/125/4 +f 341/126/5 340/125/5 339/124/5 342/127/5 +f 344/134/6 343/135/6 338/123/6 337/122/6 +f 345/136/1 346/137/1 347/138/1 348/139/1 +f 349/140/2 350/141/2 351/142/2 352/143/2 +f 352/144/3 345/136/3 348/139/3 349/145/3 +f 346/146/4 351/147/4 350/145/4 347/139/4 +f 349/140/5 348/139/5 347/138/5 350/141/5 +f 352/148/6 351/149/6 346/137/6 345/136/6 +f 353/164/1 354/165/1 355/166/1 356/167/1 +f 357/168/2 358/169/2 359/170/2 360/171/2 +f 360/172/3 353/164/3 356/167/3 357/173/3 +f 354/168/4 359/174/4 358/173/4 355/167/4 +f 357/168/5 356/167/5 355/166/5 358/169/5 +f 360/175/6 359/176/6 354/165/6 353/164/6 +f 361/177/1 362/178/1 363/179/1 364/180/1 +f 365/181/2 366/182/2 367/183/2 368/184/2 +f 368/185/3 361/177/3 364/180/3 365/186/3 +f 362/181/4 367/187/4 366/186/4 363/180/4 +f 365/181/5 364/180/5 363/179/5 366/182/5 +f 368/188/6 367/189/6 362/178/6 361/177/6 +f 369/190/1 370/191/1 371/192/1 372/193/1 +f 373/194/2 374/195/2 375/196/2 376/197/2 +f 376/198/3 369/190/3 372/193/3 373/199/3 +f 370/194/4 375/200/4 374/199/4 371/193/4 +f 373/194/5 372/193/5 371/192/5 374/195/5 +f 376/201/6 375/202/6 370/191/6 369/190/6 +f 377/203/1 378/204/1 379/205/1 380/206/1 +f 381/207/2 382/208/2 383/209/2 384/210/2 +f 384/211/3 377/203/3 380/206/3 381/212/3 +f 378/207/4 383/213/4 382/212/4 379/206/4 +f 381/207/5 380/206/5 379/205/5 382/208/5 +f 384/214/6 383/215/6 378/204/6 377/203/6 +f 385/80/1 386/81/1 387/82/1 388/83/1 +f 389/84/2 390/85/2 391/86/2 392/87/2 +f 392/88/3 385/80/3 388/83/3 389/89/3 +f 386/90/4 391/91/4 390/89/4 387/83/4 +f 389/84/5 388/83/5 387/82/5 390/85/5 +f 392/92/6 391/93/6 386/81/6 385/80/6 +f 393/94/1 394/95/1 395/96/1 396/97/1 +f 397/98/2 398/99/2 399/100/2 400/101/2 +f 400/102/3 393/94/3 396/97/3 397/103/3 +f 394/104/4 399/105/4 398/103/4 395/97/4 +f 397/98/5 396/97/5 395/96/5 398/99/5 +f 400/106/6 399/107/6 394/95/6 393/94/6 +f 401/94/1 402/95/1 403/96/1 404/97/1 +f 405/98/2 406/99/2 407/100/2 408/101/2 +f 408/102/3 401/94/3 404/97/3 405/103/3 +f 402/104/4 407/105/4 406/103/4 403/97/4 +f 405/98/5 404/97/5 403/96/5 406/99/5 +f 408/106/6 407/107/6 402/95/6 401/94/6 +f 409/122/1 410/123/1 411/124/1 412/125/1 +f 413/126/2 414/127/2 415/128/2 416/129/2 +f 416/130/3 409/122/3 412/125/3 413/131/3 +f 410/132/4 415/133/4 414/131/4 411/125/4 +f 413/126/5 412/125/5 411/124/5 414/127/5 +f 416/134/6 415/135/6 410/123/6 409/122/6 +f 417/136/1 418/137/1 419/138/1 420/139/1 +f 421/140/2 422/141/2 423/142/2 424/143/2 +f 424/144/3 417/136/3 420/139/3 421/145/3 +f 418/146/4 423/147/4 422/145/4 419/139/4 +f 421/140/5 420/139/5 419/138/5 422/141/5 +f 424/148/6 423/149/6 418/137/6 417/136/6 +f 425/136/1 426/137/1 427/138/1 428/139/1 +f 429/140/2 430/141/2 431/142/2 432/143/2 +f 432/144/3 425/136/3 428/139/3 429/145/3 +f 426/146/4 431/147/4 430/145/4 427/139/4 +f 429/140/5 428/139/5 427/138/5 430/141/5 +f 432/148/6 431/149/6 426/137/6 425/136/6 +f 433/80/1 434/81/1 435/82/1 436/83/1 +f 437/84/2 438/85/2 439/86/2 440/87/2 +f 440/88/3 433/80/3 436/83/3 437/89/3 +f 434/90/4 439/91/4 438/89/4 435/83/4 +f 437/84/5 436/83/5 435/82/5 438/85/5 +f 440/92/6 439/93/6 434/81/6 433/80/6 +f 441/94/1 442/95/1 443/96/1 444/97/1 +f 445/98/2 446/99/2 447/100/2 448/101/2 +f 448/102/3 441/94/3 444/97/3 445/103/3 +f 442/104/4 447/105/4 446/103/4 443/97/4 +f 445/98/5 444/97/5 443/96/5 446/99/5 +f 448/106/6 447/107/6 442/95/6 441/94/6 +f 449/94/1 450/95/1 451/96/1 452/97/1 +f 453/98/2 454/99/2 455/100/2 456/101/2 +f 456/102/3 449/94/3 452/97/3 453/103/3 +f 450/104/4 455/105/4 454/103/4 451/97/4 +f 453/98/5 452/97/5 451/96/5 454/99/5 +f 456/106/6 455/107/6 450/95/6 449/94/6 +f 457/122/1 458/123/1 459/124/1 460/125/1 +f 461/126/2 462/127/2 463/128/2 464/129/2 +f 464/130/3 457/122/3 460/125/3 461/131/3 +f 458/132/4 463/133/4 462/131/4 459/125/4 +f 461/126/5 460/125/5 459/124/5 462/127/5 +f 464/134/6 463/135/6 458/123/6 457/122/6 +f 465/136/1 466/137/1 467/138/1 468/139/1 +f 469/140/2 470/141/2 471/142/2 472/143/2 +f 472/144/3 465/136/3 468/139/3 469/145/3 +f 466/146/4 471/147/4 470/145/4 467/139/4 +f 469/140/5 468/139/5 467/138/5 470/141/5 +f 472/148/6 471/149/6 466/137/6 465/136/6 +f 473/136/1 474/137/1 475/138/1 476/139/1 +f 477/140/2 478/141/2 479/142/2 480/143/2 +f 480/144/3 473/136/3 476/139/3 477/145/3 +f 474/146/4 479/147/4 478/145/4 475/139/4 +f 477/140/5 476/139/5 475/138/5 478/141/5 +f 480/148/6 479/149/6 474/137/6 473/136/6 +f 481/177/1 482/178/1 483/179/1 484/180/1 +f 485/181/2 486/182/2 487/183/2 488/184/2 +f 488/185/3 481/177/3 484/180/3 485/186/3 +f 482/181/4 487/187/4 486/186/4 483/180/4 +f 485/181/5 484/180/5 483/179/5 486/182/5 +f 488/188/6 487/189/6 482/178/6 481/177/6 +f 489/190/1 490/191/1 491/192/1 492/193/1 +f 493/194/2 494/195/2 495/196/2 496/197/2 +f 496/198/3 489/190/3 492/193/3 493/199/3 +f 490/194/4 495/200/4 494/199/4 491/193/4 +f 493/194/5 492/193/5 491/192/5 494/195/5 +f 496/201/6 495/202/6 490/191/6 489/190/6 +f 497/203/1 498/204/1 499/205/1 500/206/1 +f 501/207/2 502/208/2 503/209/2 504/210/2 +f 504/211/3 497/203/3 500/206/3 501/212/3 +f 498/207/4 503/213/4 502/212/4 499/206/4 +f 501/207/5 500/206/5 499/205/5 502/208/5 +f 504/214/6 503/215/6 498/204/6 497/203/6 +f 505/190/1 506/191/1 507/192/1 508/193/1 +f 509/194/2 510/195/2 511/196/2 512/197/2 +f 512/198/3 505/190/3 508/193/3 509/199/3 +f 506/194/4 511/200/4 510/199/4 507/193/4 +f 509/194/5 508/193/5 507/192/5 510/195/5 +f 512/201/6 511/202/6 506/191/6 505/190/6 +f 513/203/1 514/204/1 515/205/1 516/206/1 +f 517/207/2 518/208/2 519/209/2 520/210/2 +f 520/211/3 513/203/3 516/206/3 517/212/3 +f 514/207/4 519/213/4 518/212/4 515/206/4 +f 517/207/5 516/206/5 515/205/5 518/208/5 +f 520/214/6 519/215/6 514/204/6 513/203/6 +f 521/203/1 522/204/1 523/205/1 524/206/1 +f 525/207/2 526/208/2 527/209/2 528/210/2 +f 528/211/3 521/203/3 524/206/3 525/212/3 +f 522/207/4 527/213/4 526/212/4 523/206/4 +f 525/207/5 524/206/5 523/205/5 526/208/5 +f 528/214/6 527/215/6 522/204/6 521/203/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDimensionalPortal.json b/src/main/resources/assets/bloodmagic/models/block/blockdimensionalportal.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockDimensionalPortal.json rename to src/main/resources/assets/bloodmagic/models/block/blockdimensionalportal.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDimensionalPortalEW.json b/src/main/resources/assets/bloodmagic/models/block/blockdimensionalportalew.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockDimensionalPortalEW.json rename to src/main/resources/assets/bloodmagic/models/block/blockdimensionalportalew.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockDimensionalPortalNS.json b/src/main/resources/assets/bloodmagic/models/block/blockdimensionalportalns.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockDimensionalPortalNS.json rename to src/main/resources/assets/bloodmagic/models/block/blockdimensionalportalns.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockHellfireForge.mtl b/src/main/resources/assets/bloodmagic/models/block/blockhellfireforge.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockHellfireForge.mtl rename to src/main/resources/assets/bloodmagic/models/block/blockhellfireforge.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/blockhellfireforge.obj b/src/main/resources/assets/bloodmagic/models/block/blockhellfireforge.obj new file mode 100644 index 00000000..595aa694 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockhellfireforge.obj @@ -0,0 +1,899 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib blockhellfireforge.mtl +o BlockHellfireForge_(5) +v 0.062500 0.125000 0.937500 +v 0.062500 -0.000000 0.937500 +v 0.312500 -0.000000 0.937500 +v 0.312500 0.125000 0.937500 +v 0.312500 0.125000 0.687500 +v 0.312500 -0.000000 0.687500 +v 0.062500 -0.000000 0.687500 +v 0.062500 0.125000 0.687500 +v 0.134319 0.498760 0.861969 +v 0.093200 0.128268 0.902840 +v 0.279569 0.107833 0.905094 +v 0.320688 0.478324 0.864223 +v 0.320688 0.457765 0.677854 +v 0.279569 0.087273 0.718725 +v 0.093200 0.107709 0.716470 +v 0.134319 0.478200 0.675599 +v 0.687500 0.125000 0.312500 +v 0.687500 0.000000 0.312500 +v 0.937500 0.000000 0.312500 +v 0.937500 0.125000 0.312500 +v 0.937500 0.125000 0.062500 +v 0.937500 0.000000 0.062500 +v 0.687500 0.000000 0.062500 +v 0.687500 0.125000 0.062500 +v 0.679311 0.457787 0.322148 +v 0.720430 0.087304 0.281277 +v 0.906798 0.107739 0.283532 +v 0.865679 0.478222 0.324402 +v 0.865679 0.498782 0.138035 +v 0.906798 0.128299 0.097164 +v 0.720430 0.107863 0.094910 +v 0.679311 0.478347 0.135780 +v 0.062500 0.125000 0.312500 +v 0.062500 0.000000 0.312500 +v 0.312500 0.000000 0.312500 +v 0.312500 0.125000 0.312500 +v 0.312500 0.125000 0.062500 +v 0.312500 0.000000 0.062500 +v 0.062500 0.000000 0.062500 +v 0.062500 0.125000 0.062500 +v 0.134319 0.478211 0.324401 +v 0.093200 0.107724 0.283530 +v 0.279569 0.087289 0.281275 +v 0.320688 0.457776 0.322147 +v 0.320688 0.478335 0.135779 +v 0.279569 0.107848 0.094908 +v 0.093200 0.128283 0.097162 +v 0.134319 0.498771 0.138033 +v 0.687500 0.125000 0.937500 +v 0.687500 -0.000000 0.937500 +v 0.937500 -0.000000 0.937500 +v 0.937500 0.125000 0.937500 +v 0.937500 0.125000 0.687500 +v 0.937500 -0.000000 0.687500 +v 0.687500 -0.000000 0.687500 +v 0.687500 0.125000 0.687500 +v 0.679311 0.478335 0.864222 +v 0.720430 0.107848 0.905092 +v 0.906798 0.128284 0.902838 +v 0.865679 0.498771 0.861968 +v 0.865679 0.478212 0.675598 +v 0.906798 0.107724 0.716469 +v 0.720430 0.087289 0.718723 +v 0.679311 0.457776 0.677853 +v 0.125000 0.687500 0.875000 +v 0.125000 0.312500 0.875000 +v 0.875000 0.312500 0.875000 +v 0.875000 0.687500 0.875000 +v 0.875000 0.687500 0.125000 +v 0.875000 0.312500 0.125000 +v 0.125000 0.312500 0.125000 +v 0.125000 0.687500 0.125000 +v 0.406250 0.750000 0.593750 +v 0.406250 0.687500 0.593750 +v 0.593750 0.687500 0.593750 +v 0.593750 0.750000 0.593750 +v 0.593750 0.750000 0.406250 +v 0.593750 0.687500 0.406250 +v 0.406250 0.687500 0.406250 +v 0.406250 0.750000 0.406250 +v 0.406167 0.749949 0.593750 +v 0.317779 0.661561 0.593750 +v 0.361973 0.617367 0.593750 +v 0.450362 0.705755 0.593750 +v 0.450362 0.705755 0.406250 +v 0.361973 0.617367 0.406250 +v 0.317779 0.661561 0.406250 +v 0.406167 0.749949 0.406250 +v 0.549638 0.705755 0.593750 +v 0.638027 0.617367 0.593750 +v 0.682221 0.661561 0.593750 +v 0.593833 0.749949 0.593750 +v 0.593833 0.749949 0.406250 +v 0.682221 0.661561 0.406250 +v 0.638027 0.617367 0.406250 +v 0.549638 0.705755 0.406250 +v 0.406250 0.749949 0.593832 +v 0.406250 0.661561 0.682221 +v 0.593750 0.661561 0.682221 +v 0.593750 0.749949 0.593832 +v 0.593750 0.705755 0.549638 +v 0.593750 0.617367 0.638027 +v 0.406250 0.617367 0.638027 +v 0.406250 0.705755 0.549638 +v 0.406250 0.705755 0.450625 +v 0.406250 0.617367 0.362236 +v 0.593750 0.617367 0.362236 +v 0.593750 0.705755 0.450625 +v 0.593750 0.749949 0.406431 +v 0.593750 0.661561 0.318042 +v 0.406250 0.661561 0.318042 +v 0.406250 0.749949 0.406431 +v 0.750000 0.750000 0.250000 +v 0.750000 0.687500 0.250000 +v 0.875000 0.687500 0.250000 +v 0.875000 0.750000 0.250000 +v 0.875000 0.750000 0.125000 +v 0.875000 0.687500 0.125000 +v 0.750000 0.687500 0.125000 +v 0.750000 0.750000 0.125000 +v 0.750000 0.750000 0.875000 +v 0.750000 0.687500 0.875000 +v 0.875000 0.687500 0.875000 +v 0.875000 0.750000 0.875000 +v 0.875000 0.750000 0.750000 +v 0.875000 0.687500 0.750000 +v 0.750000 0.687500 0.750000 +v 0.750000 0.750000 0.750000 +v 0.125000 0.750000 0.250000 +v 0.125000 0.687500 0.250000 +v 0.250000 0.687500 0.250000 +v 0.250000 0.750000 0.250000 +v 0.250000 0.750000 0.125000 +v 0.250000 0.687500 0.125000 +v 0.125000 0.687500 0.125000 +v 0.125000 0.750000 0.125000 +v 0.125000 0.750000 0.875000 +v 0.125000 0.687500 0.875000 +v 0.250000 0.687500 0.875000 +v 0.250000 0.750000 0.875000 +v 0.250000 0.750000 0.750000 +v 0.250000 0.687500 0.750000 +v 0.125000 0.687500 0.750000 +v 0.125000 0.750000 0.750000 +v 0.125000 0.750000 0.125000 +v 0.125000 0.375000 0.125000 +v 0.875000 0.375000 0.125000 +v 0.875000 0.750000 0.125000 +v 0.875000 0.750000 0.062500 +v 0.875000 0.375000 0.062500 +v 0.125000 0.375000 0.062500 +v 0.125000 0.750000 0.062500 +v 0.125000 0.750000 0.937500 +v 0.125000 0.375000 0.937500 +v 0.875000 0.375000 0.937500 +v 0.875000 0.750000 0.937500 +v 0.875000 0.750000 0.875000 +v 0.875000 0.375000 0.875000 +v 0.125000 0.375000 0.875000 +v 0.125000 0.750000 0.875000 +v 0.062500 0.750000 0.875000 +v 0.062500 0.375000 0.875000 +v 0.125000 0.375000 0.875000 +v 0.125000 0.750000 0.875000 +v 0.125000 0.750000 0.125000 +v 0.125000 0.375000 0.125000 +v 0.062500 0.375000 0.125000 +v 0.062500 0.750000 0.125000 +v 0.875000 0.750000 0.875000 +v 0.875000 0.375000 0.875000 +v 0.937500 0.375000 0.875000 +v 0.937500 0.750000 0.875000 +v 0.937500 0.750000 0.125000 +v 0.937500 0.375000 0.125000 +v 0.875000 0.375000 0.125000 +v 0.875000 0.750000 0.125000 +v 0.875000 0.875000 1.000000 +v 0.875000 0.687500 1.000000 +v 1.000000 0.687500 1.000000 +v 1.000000 0.875000 1.000000 +v 1.000000 0.875000 0.875000 +v 1.000000 0.687500 0.875000 +v 0.875000 0.687500 0.875000 +v 0.875000 0.875000 0.875000 +v 0.937500 0.968750 1.000000 +v 0.937500 0.906250 1.000000 +v 1.000000 0.906250 1.000000 +v 1.000000 0.968750 1.000000 +v 1.000000 0.968750 0.937500 +v 1.000000 0.906250 0.937500 +v 0.937500 0.906250 0.937500 +v 0.937500 0.968750 0.937500 +v 0.875000 0.875000 0.125000 +v 0.875000 0.687500 0.125000 +v 1.000000 0.687500 0.125000 +v 1.000000 0.875000 0.125000 +v 1.000000 0.875000 0.000000 +v 1.000000 0.687500 0.000000 +v 0.875000 0.687500 0.000000 +v 0.875000 0.875000 0.000000 +v 0.937500 0.968750 0.062500 +v 0.937500 0.906250 0.062500 +v 1.000000 0.906250 0.062500 +v 1.000000 0.968750 0.062500 +v 1.000000 0.968750 0.000000 +v 1.000000 0.906250 0.000000 +v 0.937500 0.906250 0.000000 +v 0.937500 0.968750 0.000000 +v 0.000000 0.875000 1.000000 +v 0.000000 0.687500 1.000000 +v 0.125000 0.687500 1.000000 +v 0.125000 0.875000 1.000000 +v 0.125000 0.875000 0.875000 +v 0.125000 0.687500 0.875000 +v 0.000000 0.687500 0.875000 +v 0.000000 0.875000 0.875000 +v 0.000000 0.968750 1.000000 +v 0.000000 0.906250 1.000000 +v 0.062500 0.906250 1.000000 +v 0.062500 0.968750 1.000000 +v 0.062500 0.968750 0.937500 +v 0.062500 0.906250 0.937500 +v 0.000000 0.906250 0.937500 +v 0.000000 0.968750 0.937500 +v 0.000000 0.875000 0.125000 +v 0.000000 0.687500 0.125000 +v 0.125000 0.687500 0.125000 +v 0.125000 0.875000 0.125000 +v 0.125000 0.875000 0.000000 +v 0.125000 0.687500 0.000000 +v 0.000000 0.687500 0.000000 +v 0.000000 0.875000 0.000000 +v 0.000000 0.968750 0.062500 +v 0.000000 0.906250 0.062500 +v 0.062500 0.906250 0.062500 +v 0.062500 0.968750 0.062500 +v 0.062500 0.968750 0.000000 +v 0.062500 0.906250 0.000000 +v 0.000000 0.906250 0.000000 +v 0.000000 0.968750 0.000000 +v 0.134319 0.498760 0.861969 +v 0.093200 0.128268 0.902840 +v 0.279569 0.107833 0.905094 +v 0.320688 0.478324 0.864223 +v 0.320688 0.457765 0.677854 +v 0.279569 0.087273 0.718725 +v 0.093200 0.107709 0.716470 +v 0.134319 0.478200 0.675599 +v 0.679311 0.457787 0.322148 +v 0.720430 0.087304 0.281277 +v 0.906798 0.107739 0.283532 +v 0.865679 0.478222 0.324402 +v 0.865679 0.498782 0.138035 +v 0.906798 0.128299 0.097164 +v 0.720430 0.107863 0.094910 +v 0.679311 0.478347 0.135780 +v 0.134319 0.478211 0.324401 +v 0.093200 0.107724 0.283530 +v 0.279569 0.087289 0.281275 +v 0.320688 0.457776 0.322147 +v 0.320688 0.478335 0.135779 +v 0.279569 0.107848 0.094908 +v 0.093200 0.128283 0.097162 +v 0.134319 0.498771 0.138033 +v 0.679311 0.478335 0.864222 +v 0.720430 0.107848 0.905092 +v 0.906798 0.128284 0.902838 +v 0.865679 0.498771 0.861968 +v 0.865679 0.478212 0.675598 +v 0.906798 0.107724 0.716469 +v 0.720430 0.087289 0.718723 +v 0.679311 0.457776 0.677853 +v 0.406250 0.750000 0.593750 +v 0.406250 0.687500 0.593750 +v 0.593750 0.687500 0.593750 +v 0.593750 0.750000 0.593750 +v 0.593750 0.750000 0.406250 +v 0.593750 0.687500 0.406250 +v 0.406250 0.687500 0.406250 +v 0.406250 0.750000 0.406250 +v 0.406167 0.749949 0.593750 +v 0.317779 0.661561 0.593750 +v 0.361973 0.617367 0.593750 +v 0.450362 0.705755 0.593750 +v 0.450362 0.705755 0.406250 +v 0.361973 0.617367 0.406250 +v 0.317779 0.661561 0.406250 +v 0.406167 0.749949 0.406250 +v 0.549638 0.705755 0.593750 +v 0.638027 0.617367 0.593750 +v 0.682221 0.661561 0.593750 +v 0.593833 0.749949 0.593750 +v 0.593833 0.749949 0.406250 +v 0.682221 0.661561 0.406250 +v 0.638027 0.617367 0.406250 +v 0.549638 0.705755 0.406250 +v 0.406250 0.749949 0.593832 +v 0.406250 0.661561 0.682221 +v 0.593750 0.661561 0.682221 +v 0.593750 0.749949 0.593832 +v 0.593750 0.705755 0.549638 +v 0.593750 0.617367 0.638027 +v 0.406250 0.617367 0.638027 +v 0.406250 0.705755 0.549638 +v 0.406250 0.705755 0.450625 +v 0.406250 0.617367 0.362236 +v 0.593750 0.617367 0.362236 +v 0.593750 0.705755 0.450625 +v 0.593750 0.749949 0.406431 +v 0.593750 0.661561 0.318042 +v 0.406250 0.661561 0.318042 +v 0.406250 0.749949 0.406431 +v 0.750000 0.750000 0.250000 +v 0.750000 0.687500 0.250000 +v 0.875000 0.687500 0.250000 +v 0.875000 0.750000 0.250000 +v 0.875000 0.750000 0.125000 +v 0.875000 0.687500 0.125000 +v 0.750000 0.687500 0.125000 +v 0.750000 0.750000 0.125000 +v 0.750000 0.750000 0.875000 +v 0.750000 0.687500 0.875000 +v 0.875000 0.687500 0.875000 +v 0.875000 0.750000 0.875000 +v 0.875000 0.750000 0.750000 +v 0.875000 0.687500 0.750000 +v 0.750000 0.687500 0.750000 +v 0.750000 0.750000 0.750000 +v 0.125000 0.750000 0.250000 +v 0.125000 0.687500 0.250000 +v 0.250000 0.687500 0.250000 +v 0.250000 0.750000 0.250000 +v 0.250000 0.750000 0.125000 +v 0.250000 0.687500 0.125000 +v 0.125000 0.687500 0.125000 +v 0.125000 0.750000 0.125000 +v 0.125000 0.750000 0.875000 +v 0.125000 0.687500 0.875000 +v 0.250000 0.687500 0.875000 +v 0.250000 0.750000 0.875000 +v 0.250000 0.750000 0.750000 +v 0.250000 0.687500 0.750000 +v 0.125000 0.687500 0.750000 +v 0.125000 0.750000 0.750000 +v 0.406167 0.749949 0.593750 +v 0.317779 0.661561 0.593750 +v 0.361973 0.617367 0.593750 +v 0.450362 0.705755 0.593750 +v 0.450362 0.705755 0.406250 +v 0.361973 0.617367 0.406250 +v 0.317779 0.661561 0.406250 +v 0.406167 0.749949 0.406250 +v 0.549638 0.705755 0.593750 +v 0.638027 0.617367 0.593750 +v 0.682221 0.661561 0.593750 +v 0.593833 0.749949 0.593750 +v 0.593833 0.749949 0.406250 +v 0.682221 0.661561 0.406250 +v 0.638027 0.617367 0.406250 +v 0.549638 0.705755 0.406250 +v 0.406250 0.749949 0.593832 +v 0.406250 0.661561 0.682221 +v 0.593750 0.661561 0.682221 +v 0.593750 0.749949 0.593832 +v 0.593750 0.705755 0.549638 +v 0.593750 0.617367 0.638027 +v 0.406250 0.617367 0.638027 +v 0.406250 0.705755 0.549638 +v 0.406250 0.705755 0.450625 +v 0.406250 0.617367 0.362236 +v 0.593750 0.617367 0.362236 +v 0.593750 0.705755 0.450625 +v 0.593750 0.749949 0.406431 +v 0.593750 0.661561 0.318042 +v 0.406250 0.661561 0.318042 +v 0.406250 0.749949 0.406431 +v 0.937500 0.968750 1.000000 +v 0.937500 0.906250 1.000000 +v 1.000000 0.906250 1.000000 +v 1.000000 0.968750 1.000000 +v 1.000000 0.968750 0.937500 +v 1.000000 0.906250 0.937500 +v 0.937500 0.906250 0.937500 +v 0.937500 0.968750 0.937500 +v 0.937500 0.968750 0.062500 +v 0.937500 0.906250 0.062500 +v 1.000000 0.906250 0.062500 +v 1.000000 0.968750 0.062500 +v 1.000000 0.968750 0.000000 +v 1.000000 0.906250 0.000000 +v 0.937500 0.906250 0.000000 +v 0.937500 0.968750 0.000000 +v 0.000000 0.968750 1.000000 +v 0.000000 0.906250 1.000000 +v 0.062500 0.906250 1.000000 +v 0.062500 0.968750 1.000000 +v 0.062500 0.968750 0.937500 +v 0.062500 0.906250 0.937500 +v 0.000000 0.906250 0.937500 +v 0.000000 0.968750 0.937500 +v 0.000000 0.968750 0.062500 +v 0.000000 0.906250 0.062500 +v 0.062500 0.906250 0.062500 +v 0.062500 0.968750 0.062500 +v 0.062500 0.968750 0.000000 +v 0.062500 0.906250 0.000000 +v 0.000000 0.906250 0.000000 +v 0.000000 0.968750 0.000000 +vt 0.062500 0.937500 +vt 0.062500 0.906250 +vt 0.125000 0.906250 +vt 0.125000 0.937500 +vt 0.187500 0.937500 +vt 0.187500 0.906250 +vt 0.250000 0.906250 +vt 0.250000 0.937500 +vt 0.062500 1.000000 +vt 0.125000 1.000000 +vt 0.187500 1.000000 +vt 0.000000 0.937500 +vt 0.000000 0.906250 +vt 0.046875 0.843750 +vt 0.046875 0.750000 +vt 0.093750 0.750000 +vt 0.093750 0.843750 +vt 0.140625 0.843750 +vt 0.140625 0.750000 +vt 0.187500 0.750000 +vt 0.187500 0.843750 +vt 0.046875 0.890625 +vt 0.093750 0.890625 +vt 0.140625 0.890625 +vt 0.000000 0.843750 +vt 0.000000 0.750000 +vt 0.437500 0.093750 +vt 0.437500 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.093750 +vt 0.812500 0.093750 +vt 0.812500 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.093750 +vt 0.437500 0.281250 +vt 0.625000 0.281250 +vt 0.812500 0.281250 +vt 0.250000 0.093750 +vt 0.250000 0.000000 +vt 0.046875 0.593750 +vt 0.046875 0.578125 +vt 0.093750 0.578125 +vt 0.093750 0.593750 +vt 0.140625 0.593750 +vt 0.140625 0.578125 +vt 0.187500 0.578125 +vt 0.187500 0.593750 +vt 0.046875 0.640625 +vt 0.093750 0.640625 +vt 0.140625 0.640625 +vt 0.000000 0.593750 +vt 0.000000 0.578125 +vt 0.250000 0.812500 +vt 0.250000 0.781250 +vt 0.265625 0.781250 +vt 0.265625 0.812500 +vt 0.312500 0.812500 +vt 0.312500 0.781250 +vt 0.328125 0.781250 +vt 0.328125 0.812500 +vt 0.250000 0.859375 +vt 0.265625 0.859375 +vt 0.281250 0.812500 +vt 0.281250 0.859375 +vt 0.203125 0.812500 +vt 0.203125 0.781250 +vt 0.218750 0.750000 +vt 0.218750 0.718750 +vt 0.265625 0.718750 +vt 0.265625 0.750000 +vt 0.281250 0.750000 +vt 0.281250 0.718750 +vt 0.328125 0.718750 +vt 0.328125 0.750000 +vt 0.218750 0.765625 +vt 0.265625 0.765625 +vt 0.312500 0.750000 +vt 0.312500 0.765625 +vt 0.203125 0.750000 +vt 0.203125 0.718750 +vt 0.031250 0.531250 +vt 0.031250 0.515625 +vt 0.062500 0.515625 +vt 0.062500 0.531250 +vt 0.093750 0.531250 +vt 0.093750 0.515625 +vt 0.125000 0.515625 +vt 0.125000 0.531250 +vt 0.031250 0.562500 +vt 0.062500 0.562500 +vt 0.093750 0.562500 +vt 0.000000 0.531250 +vt 0.000000 0.515625 +vt 0.281250 0.984375 +vt 0.281250 0.890625 +vt 0.468750 0.890625 +vt 0.468750 0.984375 +vt 0.484375 0.984375 +vt 0.484375 0.890625 +vt 0.671875 0.890625 +vt 0.671875 0.984375 +vt 0.281250 1.000000 +vt 0.468750 1.000000 +vt 0.656250 0.984375 +vt 0.656250 1.000000 +vt 0.265625 0.984375 +vt 0.265625 0.890625 +vt 0.781250 0.812500 +vt 0.781250 0.718750 +vt 0.796875 0.718750 +vt 0.796875 0.812500 +vt 0.984375 0.812500 +vt 0.984375 0.718750 +vt 1.000000 0.718750 +vt 1.000000 0.812500 +vt 0.781250 1.000000 +vt 0.796875 1.000000 +vt 0.812500 0.812500 +vt 0.812500 1.000000 +vt 0.593750 0.812500 +vt 0.593750 0.718750 +vt 0.031250 0.703125 +vt 0.031250 0.656250 +vt 0.062500 0.656250 +vt 0.062500 0.703125 +vt 0.093750 0.703125 +vt 0.093750 0.656250 +vt 0.125000 0.656250 +vt 0.125000 0.703125 +vt 0.031250 0.734375 +vt 0.062500 0.734375 +vt 0.093750 0.734375 +vt 0.000000 0.703125 +vt 0.000000 0.656250 +vt 0.031250 0.687500 +vt 0.046875 0.687500 +vt 0.046875 0.703125 +vt 0.062500 0.687500 +vt 0.078125 0.687500 +vt 0.078125 0.703125 +vt 0.031250 0.718750 +vt 0.046875 0.718750 +vt 0.062500 0.718750 +vt 0.015625 0.703125 +vt 0.015625 0.687500 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.109600 0.994000 +vn 0.000000 -0.109700 -0.994000 +vn 0.109700 0.988000 -0.109000 +vn -0.109700 -0.988000 0.109000 +vn 0.994000 -0.109000 0.012000 +vn -0.994000 0.109000 -0.012000 +vn -0.000000 -0.109700 0.994000 +vn 0.000000 0.109700 -0.994000 +vn -0.109600 0.988000 0.109000 +vn 0.109700 -0.988000 -0.109000 +vn 0.994000 0.109000 0.012000 +vn -0.994000 -0.109000 -0.012000 +vn 0.109700 0.988000 0.109000 +vn -0.109600 -0.988000 -0.109000 +vn 0.994000 -0.109000 -0.012000 +vn -0.994000 0.109000 0.012000 +vn -0.109700 0.988000 -0.109000 +vn 0.109700 -0.988000 0.109000 +vn 0.994000 0.109000 -0.012000 +vn -0.994000 -0.109000 0.012000 +vn 0.707100 0.707100 0.000000 +vn -0.707100 -0.707100 0.000000 +vn 0.707100 -0.707100 0.000000 +vn -0.707100 0.707100 0.000000 +vn 0.000000 0.707100 0.707100 +vn 0.000000 -0.707100 -0.707100 +vn 0.000000 0.707100 -0.707100 +vn 0.000000 -0.707100 0.707100 +usemtl None +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 8/9/3 1/1/3 4/4/3 5/10/3 +f 2/5/4 7/11/4 6/10/4 3/4/4 +f 5/5/5 4/4/5 3/3/5 6/6/5 +f 8/12/6 7/13/6 2/2/6 1/1/6 +f 9/14/7 10/15/7 11/16/7 12/17/7 +f 13/18/8 14/19/8 15/20/8 16/21/8 +f 16/22/9 9/14/9 12/17/9 13/23/9 +f 10/18/10 15/24/10 14/23/10 11/17/10 +f 13/18/11 12/17/11 11/16/11 14/19/11 +f 16/25/12 15/26/12 10/15/12 9/14/12 +f 17/1/1 18/2/1 19/3/1 20/4/1 +f 21/5/2 22/6/2 23/7/2 24/8/2 +f 24/9/3 17/1/3 20/4/3 21/10/3 +f 18/5/4 23/11/4 22/10/4 19/4/4 +f 21/5/5 20/4/5 19/3/5 22/6/5 +f 24/12/6 23/13/6 18/2/6 17/1/6 +f 25/14/13 26/15/13 27/16/13 28/17/13 +f 29/18/14 30/19/14 31/20/14 32/21/14 +f 32/22/15 25/14/15 28/17/15 29/23/15 +f 26/18/16 31/24/16 30/23/16 27/17/16 +f 29/18/17 28/17/17 27/16/17 30/19/17 +f 32/25/18 31/26/18 26/15/18 25/14/18 +f 33/1/1 34/2/1 35/3/1 36/4/1 +f 37/5/2 38/6/2 39/7/2 40/8/2 +f 40/9/3 33/1/3 36/4/3 37/10/3 +f 34/5/4 39/11/4 38/10/4 35/4/4 +f 37/5/5 36/4/5 35/3/5 38/6/5 +f 40/12/6 39/13/6 34/2/6 33/1/6 +f 41/14/13 42/15/13 43/16/13 44/17/13 +f 45/18/14 46/19/14 47/20/14 48/21/14 +f 48/22/19 41/14/19 44/17/19 45/23/19 +f 42/18/20 47/24/20 46/23/20 43/17/20 +f 45/18/21 44/17/21 43/16/21 46/19/21 +f 48/25/22 47/26/22 42/15/22 41/14/22 +f 49/1/1 50/2/1 51/3/1 52/4/1 +f 53/5/2 54/6/2 55/7/2 56/8/2 +f 56/9/3 49/1/3 52/4/3 53/10/3 +f 50/5/4 55/11/4 54/10/4 51/4/4 +f 53/5/5 52/4/5 51/3/5 54/6/5 +f 56/12/6 55/13/6 50/2/6 49/1/6 +f 57/14/7 58/15/7 59/16/7 60/17/7 +f 61/18/8 62/19/8 63/20/8 64/21/8 +f 64/22/23 57/14/23 60/17/23 61/23/23 +f 58/18/24 63/24/24 62/23/24 59/17/24 +f 61/18/25 60/17/25 59/16/25 62/19/25 +f 64/25/26 63/26/26 58/15/26 57/14/26 +f 65/27/1 66/28/1 67/29/1 68/30/1 +f 69/31/2 70/32/2 71/33/2 72/34/2 +f 72/35/3 65/27/3 68/30/3 69/36/3 +f 66/31/4 71/37/4 70/36/4 67/30/4 +f 69/31/5 68/30/5 67/29/5 70/32/5 +f 72/38/6 71/39/6 66/28/6 65/27/6 +f 73/40/1 74/41/1 75/42/1 76/43/1 +f 77/44/2 78/45/2 79/46/2 80/47/2 +f 80/48/3 73/40/3 76/43/3 77/49/3 +f 74/44/4 79/50/4 78/49/4 75/43/4 +f 77/44/5 76/43/5 75/42/5 78/45/5 +f 80/51/6 79/52/6 74/41/6 73/40/6 +f 81/53/1 82/54/1 83/55/1 84/56/1 +f 85/57/2 86/58/2 87/59/2 88/60/2 +f 88/61/27 81/53/27 84/56/27 85/62/27 +f 82/63/28 87/64/28 86/62/28 83/56/28 +f 85/57/29 84/56/29 83/55/29 86/58/29 +f 88/65/30 87/66/30 82/54/30 81/53/30 +f 89/53/1 90/54/1 91/55/1 92/56/1 +f 93/57/2 94/58/2 95/59/2 96/60/2 +f 96/61/30 89/53/30 92/56/30 93/62/30 +f 90/63/29 95/64/29 94/62/29 91/56/29 +f 93/57/27 92/56/27 91/55/27 94/58/27 +f 96/65/28 95/66/28 90/54/28 89/53/28 +f 97/67/31 98/68/31 99/69/31 100/70/31 +f 101/71/32 102/72/32 103/73/32 104/74/32 +f 104/75/33 97/67/33 100/70/33 101/76/33 +f 98/77/34 103/78/34 102/76/34 99/70/34 +f 101/71/5 100/70/5 99/69/5 102/72/5 +f 104/79/6 103/80/6 98/68/6 97/67/6 +f 105/67/34 106/68/34 107/69/34 108/70/34 +f 109/71/33 110/72/33 111/73/33 112/74/33 +f 112/75/31 105/67/31 108/70/31 109/76/31 +f 106/77/32 111/78/32 110/76/32 107/70/32 +f 109/71/5 108/70/5 107/69/5 110/72/5 +f 112/79/6 111/80/6 106/68/6 105/67/6 +f 113/81/1 114/82/1 115/83/1 116/84/1 +f 117/85/2 118/86/2 119/87/2 120/88/2 +f 120/89/3 113/81/3 116/84/3 117/90/3 +f 114/85/4 119/91/4 118/90/4 115/84/4 +f 117/85/5 116/84/5 115/83/5 118/86/5 +f 120/92/6 119/93/6 114/82/6 113/81/6 +f 121/81/1 122/82/1 123/83/1 124/84/1 +f 125/85/2 126/86/2 127/87/2 128/88/2 +f 128/89/3 121/81/3 124/84/3 125/90/3 +f 122/85/4 127/91/4 126/90/4 123/84/4 +f 125/85/5 124/84/5 123/83/5 126/86/5 +f 128/92/6 127/93/6 122/82/6 121/81/6 +f 129/81/1 130/82/1 131/83/1 132/84/1 +f 133/85/2 134/86/2 135/87/2 136/88/2 +f 136/89/3 129/81/3 132/84/3 133/90/3 +f 130/85/4 135/91/4 134/90/4 131/84/4 +f 133/85/5 132/84/5 131/83/5 134/86/5 +f 136/92/6 135/93/6 130/82/6 129/81/6 +f 137/81/1 138/82/1 139/83/1 140/84/1 +f 141/85/2 142/86/2 143/87/2 144/88/2 +f 144/89/3 137/81/3 140/84/3 141/90/3 +f 138/85/4 143/91/4 142/90/4 139/84/4 +f 141/85/5 140/84/5 139/83/5 142/86/5 +f 144/92/6 143/93/6 138/82/6 137/81/6 +f 145/94/1 146/95/1 147/96/1 148/97/1 +f 149/98/2 150/99/2 151/100/2 152/101/2 +f 152/102/3 145/94/3 148/97/3 149/103/3 +f 146/104/4 151/105/4 150/103/4 147/97/4 +f 149/98/5 148/97/5 147/96/5 150/99/5 +f 152/106/6 151/107/6 146/95/6 145/94/6 +f 153/94/1 154/95/1 155/96/1 156/97/1 +f 157/98/2 158/99/2 159/100/2 160/101/2 +f 160/102/3 153/94/3 156/97/3 157/103/3 +f 154/104/4 159/105/4 158/103/4 155/97/4 +f 157/98/5 156/97/5 155/96/5 158/99/5 +f 160/106/6 159/107/6 154/95/6 153/94/6 +f 161/108/1 162/109/1 163/110/1 164/111/1 +f 165/112/2 166/113/2 167/114/2 168/115/2 +f 168/116/3 161/108/3 164/111/3 165/117/3 +f 162/118/4 167/119/4 166/117/4 163/111/4 +f 165/112/5 164/111/5 163/110/5 166/113/5 +f 168/120/6 167/121/6 162/109/6 161/108/6 +f 169/108/1 170/109/1 171/110/1 172/111/1 +f 173/112/2 174/113/2 175/114/2 176/115/2 +f 176/116/3 169/108/3 172/111/3 173/117/3 +f 170/118/4 175/119/4 174/117/4 171/111/4 +f 173/112/5 172/111/5 171/110/5 174/113/5 +f 176/120/6 175/121/6 170/109/6 169/108/6 +f 177/122/1 178/123/1 179/124/1 180/125/1 +f 181/126/2 182/127/2 183/128/2 184/129/2 +f 184/130/3 177/122/3 180/125/3 181/131/3 +f 178/126/4 183/132/4 182/131/4 179/125/4 +f 181/126/5 180/125/5 179/124/5 182/127/5 +f 184/133/6 183/134/6 178/123/6 177/122/6 +f 185/122/1 186/135/1 187/136/1 188/137/1 +f 189/125/2 190/138/2 191/139/2 192/140/2 +f 192/141/3 185/122/3 188/137/3 189/142/3 +f 186/125/4 191/143/4 190/142/4 187/137/4 +f 189/125/5 188/137/5 187/136/5 190/138/5 +f 192/144/6 191/145/6 186/135/6 185/122/6 +f 193/122/1 194/123/1 195/124/1 196/125/1 +f 197/126/2 198/127/2 199/128/2 200/129/2 +f 200/130/3 193/122/3 196/125/3 197/131/3 +f 194/126/4 199/132/4 198/131/4 195/125/4 +f 197/126/5 196/125/5 195/124/5 198/127/5 +f 200/133/6 199/134/6 194/123/6 193/122/6 +f 201/122/1 202/135/1 203/136/1 204/137/1 +f 205/125/2 206/138/2 207/139/2 208/140/2 +f 208/141/3 201/122/3 204/137/3 205/142/3 +f 202/125/4 207/143/4 206/142/4 203/137/4 +f 205/125/5 204/137/5 203/136/5 206/138/5 +f 208/144/6 207/145/6 202/135/6 201/122/6 +f 209/122/1 210/123/1 211/124/1 212/125/1 +f 213/126/2 214/127/2 215/128/2 216/129/2 +f 216/130/3 209/122/3 212/125/3 213/131/3 +f 210/126/4 215/132/4 214/131/4 211/125/4 +f 213/126/5 212/125/5 211/124/5 214/127/5 +f 216/133/6 215/134/6 210/123/6 209/122/6 +f 217/122/1 218/135/1 219/136/1 220/137/1 +f 221/125/2 222/138/2 223/139/2 224/140/2 +f 224/141/3 217/122/3 220/137/3 221/142/3 +f 218/125/4 223/143/4 222/142/4 219/137/4 +f 221/125/5 220/137/5 219/136/5 222/138/5 +f 224/144/6 223/145/6 218/135/6 217/122/6 +f 225/122/1 226/123/1 227/124/1 228/125/1 +f 229/126/2 230/127/2 231/128/2 232/129/2 +f 232/130/3 225/122/3 228/125/3 229/131/3 +f 226/126/4 231/132/4 230/131/4 227/125/4 +f 229/126/5 228/125/5 227/124/5 230/127/5 +f 232/133/6 231/134/6 226/123/6 225/122/6 +f 233/122/1 234/135/1 235/136/1 236/137/1 +f 237/125/2 238/138/2 239/139/2 240/140/2 +f 240/141/3 233/122/3 236/137/3 237/142/3 +f 234/125/4 239/143/4 238/142/4 235/137/4 +f 237/125/5 236/137/5 235/136/5 238/138/5 +f 240/144/6 239/145/6 234/135/6 233/122/6 +f 241/14/7 242/15/7 243/16/7 244/17/7 +f 245/18/8 246/19/8 247/20/8 248/21/8 +f 248/22/9 241/14/9 244/17/9 245/23/9 +f 242/18/10 247/24/10 246/23/10 243/17/10 +f 245/18/11 244/17/11 243/16/11 246/19/11 +f 248/25/12 247/26/12 242/15/12 241/14/12 +f 249/14/13 250/15/13 251/16/13 252/17/13 +f 253/18/14 254/19/14 255/20/14 256/21/14 +f 256/22/15 249/14/15 252/17/15 253/23/15 +f 250/18/16 255/24/16 254/23/16 251/17/16 +f 253/18/17 252/17/17 251/16/17 254/19/17 +f 256/25/18 255/26/18 250/15/18 249/14/18 +f 257/14/13 258/15/13 259/16/13 260/17/13 +f 261/18/14 262/19/14 263/20/14 264/21/14 +f 264/22/19 257/14/19 260/17/19 261/23/19 +f 258/18/20 263/24/20 262/23/20 259/17/20 +f 261/18/21 260/17/21 259/16/21 262/19/21 +f 264/25/22 263/26/22 258/15/22 257/14/22 +f 265/14/7 266/15/7 267/16/7 268/17/7 +f 269/18/8 270/19/8 271/20/8 272/21/8 +f 272/22/23 265/14/23 268/17/23 269/23/23 +f 266/18/24 271/24/24 270/23/24 267/17/24 +f 269/18/25 268/17/25 267/16/25 270/19/25 +f 272/25/26 271/26/26 266/15/26 265/14/26 +f 273/40/1 274/41/1 275/42/1 276/43/1 +f 277/44/2 278/45/2 279/46/2 280/47/2 +f 280/48/3 273/40/3 276/43/3 277/49/3 +f 274/44/4 279/50/4 278/49/4 275/43/4 +f 277/44/5 276/43/5 275/42/5 278/45/5 +f 280/51/6 279/52/6 274/41/6 273/40/6 +f 281/53/1 282/54/1 283/55/1 284/56/1 +f 285/57/2 286/58/2 287/59/2 288/60/2 +f 288/61/27 281/53/27 284/56/27 285/62/27 +f 282/63/28 287/64/28 286/62/28 283/56/28 +f 285/57/29 284/56/29 283/55/29 286/58/29 +f 288/65/30 287/66/30 282/54/30 281/53/30 +f 289/53/1 290/54/1 291/55/1 292/56/1 +f 293/57/2 294/58/2 295/59/2 296/60/2 +f 296/61/30 289/53/30 292/56/30 293/62/30 +f 290/63/29 295/64/29 294/62/29 291/56/29 +f 293/57/27 292/56/27 291/55/27 294/58/27 +f 296/65/28 295/66/28 290/54/28 289/53/28 +f 297/67/31 298/68/31 299/69/31 300/70/31 +f 301/71/32 302/72/32 303/73/32 304/74/32 +f 304/75/33 297/67/33 300/70/33 301/76/33 +f 298/77/34 303/78/34 302/76/34 299/70/34 +f 301/71/5 300/70/5 299/69/5 302/72/5 +f 304/79/6 303/80/6 298/68/6 297/67/6 +f 305/67/34 306/68/34 307/69/34 308/70/34 +f 309/71/33 310/72/33 311/73/33 312/74/33 +f 312/75/31 305/67/31 308/70/31 309/76/31 +f 306/77/32 311/78/32 310/76/32 307/70/32 +f 309/71/5 308/70/5 307/69/5 310/72/5 +f 312/79/6 311/80/6 306/68/6 305/67/6 +f 313/81/1 314/82/1 315/83/1 316/84/1 +f 317/85/2 318/86/2 319/87/2 320/88/2 +f 320/89/3 313/81/3 316/84/3 317/90/3 +f 314/85/4 319/91/4 318/90/4 315/84/4 +f 317/85/5 316/84/5 315/83/5 318/86/5 +f 320/92/6 319/93/6 314/82/6 313/81/6 +f 321/81/1 322/82/1 323/83/1 324/84/1 +f 325/85/2 326/86/2 327/87/2 328/88/2 +f 328/89/3 321/81/3 324/84/3 325/90/3 +f 322/85/4 327/91/4 326/90/4 323/84/4 +f 325/85/5 324/84/5 323/83/5 326/86/5 +f 328/92/6 327/93/6 322/82/6 321/81/6 +f 329/81/1 330/82/1 331/83/1 332/84/1 +f 333/85/2 334/86/2 335/87/2 336/88/2 +f 336/89/3 329/81/3 332/84/3 333/90/3 +f 330/85/4 335/91/4 334/90/4 331/84/4 +f 333/85/5 332/84/5 331/83/5 334/86/5 +f 336/92/6 335/93/6 330/82/6 329/81/6 +f 337/81/1 338/82/1 339/83/1 340/84/1 +f 341/85/2 342/86/2 343/87/2 344/88/2 +f 344/89/3 337/81/3 340/84/3 341/90/3 +f 338/85/4 343/91/4 342/90/4 339/84/4 +f 341/85/5 340/84/5 339/83/5 342/86/5 +f 344/92/6 343/93/6 338/82/6 337/81/6 +f 345/53/1 346/54/1 347/55/1 348/56/1 +f 349/57/2 350/58/2 351/59/2 352/60/2 +f 352/61/27 345/53/27 348/56/27 349/62/27 +f 346/63/28 351/64/28 350/62/28 347/56/28 +f 349/57/29 348/56/29 347/55/29 350/58/29 +f 352/65/30 351/66/30 346/54/30 345/53/30 +f 353/53/1 354/54/1 355/55/1 356/56/1 +f 357/57/2 358/58/2 359/59/2 360/60/2 +f 360/61/30 353/53/30 356/56/30 357/62/30 +f 354/63/29 359/64/29 358/62/29 355/56/29 +f 357/57/27 356/56/27 355/55/27 358/58/27 +f 360/65/28 359/66/28 354/54/28 353/53/28 +f 361/67/31 362/68/31 363/69/31 364/70/31 +f 365/71/32 366/72/32 367/73/32 368/74/32 +f 368/75/33 361/67/33 364/70/33 365/76/33 +f 362/77/34 367/78/34 366/76/34 363/70/34 +f 365/71/5 364/70/5 363/69/5 366/72/5 +f 368/79/6 367/80/6 362/68/6 361/67/6 +f 369/67/34 370/68/34 371/69/34 372/70/34 +f 373/71/33 374/72/33 375/73/33 376/74/33 +f 376/75/31 369/67/31 372/70/31 373/76/31 +f 370/77/32 375/78/32 374/76/32 371/70/32 +f 373/71/5 372/70/5 371/69/5 374/72/5 +f 376/79/6 375/80/6 370/68/6 369/67/6 +f 377/122/1 378/135/1 379/136/1 380/137/1 +f 381/125/2 382/138/2 383/139/2 384/140/2 +f 384/141/3 377/122/3 380/137/3 381/142/3 +f 378/125/4 383/143/4 382/142/4 379/137/4 +f 381/125/5 380/137/5 379/136/5 382/138/5 +f 384/144/6 383/145/6 378/135/6 377/122/6 +f 385/122/1 386/135/1 387/136/1 388/137/1 +f 389/125/2 390/138/2 391/139/2 392/140/2 +f 392/141/3 385/122/3 388/137/3 389/142/3 +f 386/125/4 391/143/4 390/142/4 387/137/4 +f 389/125/5 388/137/5 387/136/5 390/138/5 +f 392/144/6 391/145/6 386/135/6 385/122/6 +f 393/122/1 394/135/1 395/136/1 396/137/1 +f 397/125/2 398/138/2 399/139/2 400/140/2 +f 400/141/3 393/122/3 396/137/3 397/142/3 +f 394/125/4 399/143/4 398/142/4 395/137/4 +f 397/125/5 396/137/5 395/136/5 398/138/5 +f 400/144/6 399/145/6 394/135/6 393/122/6 +f 401/122/1 402/135/1 403/136/1 404/137/1 +f 405/125/2 406/138/2 407/139/2 408/140/2 +f 408/141/3 401/122/3 404/137/3 405/142/3 +f 402/125/4 407/143/4 406/142/4 403/137/4 +f 405/125/5 404/137/5 403/136/5 406/138/5 +f 408/144/6 407/145/6 402/135/6 401/122/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.mtl b/src/main/resources/assets/bloodmagic/models/block/blockincensealtar.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockIncenseAltar.mtl rename to src/main/resources/assets/bloodmagic/models/block/blockincensealtar.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/blockincensealtar.obj b/src/main/resources/assets/bloodmagic/models/block/blockincensealtar.obj new file mode 100644 index 00000000..3c6790d1 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/blockincensealtar.obj @@ -0,0 +1,650 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib blockincensealtar.mtl +o BlockIncenseAltar_(1) +v 0.659375 0.159375 0.871875 +v 0.659375 -0.000000 0.871875 +v 0.871875 -0.000000 0.871875 +v 0.871875 0.159375 0.871875 +v 0.871875 0.159375 0.659375 +v 0.871875 -0.000000 0.659375 +v 0.659375 -0.000000 0.659375 +v 0.659375 0.159375 0.659375 +v 0.659375 0.159375 0.340625 +v 0.659375 0.000000 0.340625 +v 0.871875 0.000000 0.340625 +v 0.871875 0.159375 0.340625 +v 0.871875 0.159375 0.128125 +v 0.871875 0.000000 0.128125 +v 0.659375 0.000000 0.128125 +v 0.659375 0.159375 0.128125 +v 0.128125 0.159375 0.871875 +v 0.128125 -0.000000 0.871875 +v 0.340625 -0.000000 0.871875 +v 0.340625 0.159375 0.871875 +v 0.340625 0.159375 0.659375 +v 0.340625 -0.000000 0.659375 +v 0.128125 -0.000000 0.659375 +v 0.128125 0.159375 0.659375 +v 0.128125 0.159375 0.340625 +v 0.128125 0.000000 0.340625 +v 0.340625 0.000000 0.340625 +v 0.340625 0.159375 0.340625 +v 0.340625 0.159375 0.128125 +v 0.340625 0.000000 0.128125 +v 0.128125 0.000000 0.128125 +v 0.128125 0.159375 0.128125 +v 0.128125 0.212500 0.871875 +v 0.128125 0.159375 0.871875 +v 0.871875 0.159375 0.871875 +v 0.871875 0.212500 0.871875 +v 0.871875 0.212500 0.128125 +v 0.871875 0.159375 0.128125 +v 0.128125 0.159375 0.128125 +v 0.128125 0.212500 0.128125 +v 0.314062 0.984629 0.371221 +v 0.314062 0.195516 0.260344 +v 0.685938 0.195516 0.260344 +v 0.685938 0.984629 0.371221 +v 0.685938 0.992021 0.318614 +v 0.685938 0.202908 0.207737 +v 0.314062 0.202908 0.207737 +v 0.314062 0.992021 0.318614 +v 0.628779 0.984629 0.685938 +v 0.739656 0.195516 0.685938 +v 0.792263 0.202908 0.685938 +v 0.681387 0.992021 0.685938 +v 0.681387 0.992021 0.314063 +v 0.792263 0.202908 0.314063 +v 0.739656 0.195516 0.314063 +v 0.628779 0.984629 0.314063 +v 0.318612 0.992017 0.685938 +v 0.207735 0.202893 0.685938 +v 0.260343 0.195502 0.685938 +v 0.371220 0.984625 0.685938 +v 0.371220 0.984626 0.314063 +v 0.260343 0.195502 0.314063 +v 0.207735 0.202893 0.314063 +v 0.318612 0.992017 0.314063 +v 0.314062 0.992017 0.681388 +v 0.314062 0.202893 0.792265 +v 0.685938 0.202893 0.792265 +v 0.685938 0.992017 0.681388 +v 0.685938 0.984625 0.628780 +v 0.685938 0.195502 0.739657 +v 0.314062 0.195502 0.739657 +v 0.314062 0.984625 0.628780 +v 0.576198 0.952884 0.733023 +v 0.687075 0.171447 0.842819 +v 0.844898 0.193406 0.839734 +v 0.734021 0.974844 0.729938 +v 0.734021 0.952669 0.572113 +v 0.844898 0.171232 0.681909 +v 0.687075 0.149272 0.684995 +v 0.576198 0.930709 0.575199 +v 0.576198 0.930713 0.424802 +v 0.687075 0.149287 0.315005 +v 0.844898 0.171246 0.318091 +v 0.734021 0.952673 0.427888 +v 0.734021 0.974849 0.270065 +v 0.844898 0.193422 0.160268 +v 0.687075 0.171463 0.157182 +v 0.576198 0.952889 0.266979 +v 0.265976 0.952668 0.427887 +v 0.155100 0.171231 0.318088 +v 0.312924 0.149272 0.315003 +v 0.423802 0.930709 0.424801 +v 0.423802 0.952884 0.266979 +v 0.312924 0.171448 0.157181 +v 0.155100 0.193407 0.160266 +v 0.265976 0.974844 0.270064 +v 0.265976 0.974840 0.729939 +v 0.155100 0.193391 0.839737 +v 0.312924 0.171432 0.842822 +v 0.423802 0.952880 0.733024 +v 0.423802 0.930704 0.575199 +v 0.312924 0.149257 0.684997 +v 0.155100 0.171216 0.681912 +v 0.265976 0.952664 0.572113 +v 0.181250 1.009375 0.818750 +v 0.181250 0.956250 0.818750 +v 0.340625 0.956250 0.818750 +v 0.340625 1.009375 0.818750 +v 0.340625 1.009375 0.181250 +v 0.340625 0.956250 0.181250 +v 0.181250 0.956250 0.181250 +v 0.181250 1.009375 0.181250 +v 0.659375 1.009375 0.818750 +v 0.659375 0.956250 0.818750 +v 0.659375 0.956250 0.659375 +v 0.659375 1.009375 0.659375 +v 0.340625 1.009375 0.659375 +v 0.340625 0.956250 0.659375 +v 0.340625 0.956250 0.818750 +v 0.340625 1.009375 0.818750 +v 0.659375 1.009375 0.818750 +v 0.659375 0.956250 0.818750 +v 0.818750 0.956250 0.818750 +v 0.818750 1.009375 0.818750 +v 0.818750 1.009375 0.181250 +v 0.818750 0.956250 0.181250 +v 0.659375 0.956250 0.181250 +v 0.659375 1.009375 0.181250 +v 0.659375 1.009375 0.340625 +v 0.659375 0.956250 0.340625 +v 0.659375 0.956250 0.181250 +v 0.659375 1.009375 0.181250 +v 0.340625 1.009375 0.181250 +v 0.340625 0.956250 0.181250 +v 0.340625 0.956250 0.340625 +v 0.340625 1.009375 0.340625 +v 0.739062 1.062500 0.845313 +v 0.739062 1.009375 0.845313 +v 0.845312 1.009375 0.845313 +v 0.845312 1.062500 0.845313 +v 0.845312 1.062500 0.739063 +v 0.845312 1.009375 0.739063 +v 0.739062 1.009375 0.739063 +v 0.739062 1.062500 0.739063 +v 0.792188 1.115625 0.845313 +v 0.792188 1.062500 0.845313 +v 0.845312 1.062500 0.845313 +v 0.845312 1.115625 0.845313 +v 0.845312 1.115625 0.792188 +v 0.845312 1.062500 0.792188 +v 0.792188 1.062500 0.792188 +v 0.792188 1.115625 0.792188 +v 0.154687 1.062500 0.845313 +v 0.154687 1.009375 0.845313 +v 0.260938 1.009375 0.845313 +v 0.260938 1.062500 0.845313 +v 0.260938 1.062500 0.739063 +v 0.260938 1.009375 0.739063 +v 0.154687 1.009375 0.739063 +v 0.154687 1.062500 0.739063 +v 0.154687 1.115625 0.845313 +v 0.154687 1.062500 0.845313 +v 0.207812 1.062500 0.845313 +v 0.207812 1.115625 0.845313 +v 0.207812 1.115625 0.792188 +v 0.207812 1.062500 0.792188 +v 0.154687 1.062500 0.792188 +v 0.154687 1.115625 0.792188 +v 0.739062 1.062500 0.260938 +v 0.739062 1.009375 0.260938 +v 0.845312 1.009375 0.260938 +v 0.845312 1.062500 0.260938 +v 0.845312 1.062500 0.154688 +v 0.845312 1.009375 0.154688 +v 0.739062 1.009375 0.154688 +v 0.739062 1.062500 0.154688 +v 0.792188 1.115625 0.207813 +v 0.792188 1.062500 0.207813 +v 0.845312 1.062500 0.207813 +v 0.845312 1.115625 0.207813 +v 0.845312 1.115625 0.154688 +v 0.845312 1.062500 0.154688 +v 0.792188 1.062500 0.154688 +v 0.792188 1.115625 0.154688 +v 0.154687 1.062500 0.260938 +v 0.154687 1.009375 0.260938 +v 0.260938 1.009375 0.260938 +v 0.260938 1.062500 0.260938 +v 0.260938 1.062500 0.154688 +v 0.260938 1.009375 0.154688 +v 0.154687 1.009375 0.154688 +v 0.154687 1.062500 0.154688 +v 0.154687 1.115625 0.207813 +v 0.154687 1.062500 0.207813 +v 0.207812 1.062500 0.207813 +v 0.207812 1.115625 0.207813 +v 0.207812 1.115625 0.154688 +v 0.207812 1.062500 0.154688 +v 0.154687 1.062500 0.154688 +v 0.154687 1.115625 0.154688 +v 0.367188 0.956250 0.632813 +v 0.367188 0.903125 0.632813 +v 0.632812 0.903125 0.632813 +v 0.632812 0.956250 0.632813 +v 0.632812 0.956250 0.367188 +v 0.632812 0.903125 0.367188 +v 0.367188 0.903125 0.367188 +v 0.367188 0.956250 0.367188 +v 0.314062 0.984629 0.371221 +v 0.314062 0.195516 0.260344 +v 0.685938 0.195516 0.260344 +v 0.685938 0.984629 0.371221 +v 0.685938 0.992021 0.318614 +v 0.685938 0.202908 0.207737 +v 0.314062 0.202908 0.207737 +v 0.314062 0.992021 0.318614 +v 0.628779 0.984629 0.685938 +v 0.739656 0.195516 0.685938 +v 0.792263 0.202908 0.685938 +v 0.681387 0.992021 0.685938 +v 0.681387 0.992021 0.314063 +v 0.792263 0.202908 0.314063 +v 0.739656 0.195516 0.314063 +v 0.628779 0.984629 0.314063 +v 0.318612 0.992017 0.685938 +v 0.207735 0.202893 0.685938 +v 0.260343 0.195502 0.685938 +v 0.371220 0.984625 0.685938 +v 0.371220 0.984626 0.314063 +v 0.260343 0.195502 0.314063 +v 0.207735 0.202893 0.314063 +v 0.318612 0.992017 0.314063 +v 0.314062 0.992017 0.681388 +v 0.314062 0.202893 0.792265 +v 0.685938 0.202893 0.792265 +v 0.685938 0.992017 0.681388 +v 0.685938 0.984625 0.628780 +v 0.685938 0.195502 0.739657 +v 0.314062 0.195502 0.739657 +v 0.314062 0.984625 0.628780 +v 0.792188 1.115625 0.845313 +v 0.792188 1.062500 0.845313 +v 0.845312 1.062500 0.845313 +v 0.845312 1.115625 0.845313 +v 0.845312 1.115625 0.792188 +v 0.845312 1.062500 0.792188 +v 0.792188 1.062500 0.792188 +v 0.792188 1.115625 0.792188 +v 0.154687 1.115625 0.845313 +v 0.154687 1.062500 0.845313 +v 0.207812 1.062500 0.845313 +v 0.207812 1.115625 0.845313 +v 0.207812 1.115625 0.792188 +v 0.207812 1.062500 0.792188 +v 0.154687 1.062500 0.792188 +v 0.154687 1.115625 0.792188 +v 0.792188 1.115625 0.207813 +v 0.792188 1.062500 0.207813 +v 0.845312 1.062500 0.207813 +v 0.845312 1.115625 0.207813 +v 0.845312 1.115625 0.154688 +v 0.845312 1.062500 0.154688 +v 0.792188 1.062500 0.154688 +v 0.792188 1.115625 0.154688 +v 0.154687 1.115625 0.207813 +v 0.154687 1.062500 0.207813 +v 0.207812 1.062500 0.207813 +v 0.207812 1.115625 0.207813 +v 0.207812 1.115625 0.154688 +v 0.207812 1.062500 0.154688 +v 0.154687 1.062500 0.154688 +v 0.154687 1.115625 0.154688 +vt 0.062500 0.937500 +vt 0.062500 0.890625 +vt 0.125000 0.890625 +vt 0.125000 0.937500 +vt 0.187500 0.937500 +vt 0.187500 0.890625 +vt 0.250000 0.890625 +vt 0.250000 0.937500 +vt 0.062500 1.000000 +vt 0.125000 1.000000 +vt 0.187500 1.000000 +vt 0.000000 0.937500 +vt 0.000000 0.890625 +vt 0.265625 0.781250 +vt 0.265625 0.765625 +vt 0.484375 0.765625 +vt 0.484375 0.781250 +vt 0.703125 0.781250 +vt 0.703125 0.765625 +vt 0.921875 0.765625 +vt 0.921875 0.781250 +vt 0.265625 1.000000 +vt 0.484375 1.000000 +vt 0.703125 1.000000 +vt 0.046875 0.781250 +vt 0.046875 0.765625 +vt 0.015625 0.734375 +vt 0.015625 0.500000 +vt 0.125000 0.500000 +vt 0.125000 0.734375 +vt 0.140625 0.734375 +vt 0.140625 0.500000 +vt 0.250000 0.500000 +vt 0.250000 0.734375 +vt 0.015625 0.750000 +vt 0.125000 0.750000 +vt 0.234375 0.734375 +vt 0.234375 0.750000 +vt 0.000000 0.734375 +vt 0.000000 0.500000 +vt 0.375000 0.640625 +vt 0.375000 0.406250 +vt 0.390625 0.406250 +vt 0.390625 0.640625 +vt 0.500000 0.640625 +vt 0.500000 0.406250 +vt 0.515625 0.406250 +vt 0.515625 0.640625 +vt 0.375000 0.750000 +vt 0.390625 0.750000 +vt 0.406250 0.640625 +vt 0.406250 0.750000 +vt 0.265625 0.640625 +vt 0.265625 0.406250 +vt 0.046875 0.437500 +vt 0.046875 0.203125 +vt 0.093750 0.203125 +vt 0.093750 0.437500 +vt 0.140625 0.437500 +vt 0.140625 0.203125 +vt 0.187500 0.203125 +vt 0.187500 0.437500 +vt 0.046875 0.484375 +vt 0.093750 0.484375 +vt 0.140625 0.484375 +vt 0.000000 0.437500 +vt 0.000000 0.203125 +vt 0.203125 0.015625 +vt 0.203125 0.000000 +vt 0.250000 0.000000 +vt 0.250000 0.015625 +vt 0.437500 0.015625 +vt 0.437500 0.000000 +vt 0.484375 0.000000 +vt 0.484375 0.015625 +vt 0.203125 0.203125 +vt 0.250000 0.203125 +vt 0.296875 0.015625 +vt 0.296875 0.203125 +vt 0.015625 0.015625 +vt 0.015625 0.000000 +vt 0.593750 0.015625 +vt 0.593750 0.000000 +vt 0.640625 0.000000 +vt 0.640625 0.015625 +vt 0.734375 0.015625 +vt 0.734375 0.000000 +vt 0.781250 0.000000 +vt 0.781250 0.015625 +vt 0.593750 0.109375 +vt 0.640625 0.109375 +vt 0.687500 0.015625 +vt 0.687500 0.109375 +vt 0.500000 0.015625 +vt 0.500000 0.000000 +vt 0.234375 0.234375 +vt 0.234375 0.218750 +vt 0.265625 0.218750 +vt 0.265625 0.234375 +vt 0.296875 0.234375 +vt 0.296875 0.218750 +vt 0.328125 0.218750 +vt 0.328125 0.234375 +vt 0.234375 0.265625 +vt 0.265625 0.265625 +vt 0.296875 0.265625 +vt 0.203125 0.234375 +vt 0.203125 0.218750 +vt 0.218750 0.250000 +vt 0.218750 0.234375 +vt 0.234375 0.250000 +vt 0.250000 0.250000 +vt 0.250000 0.234375 +vt 0.265625 0.250000 +vt 0.218750 0.265625 +vt 0.250000 0.265625 +vt 0.203125 0.250000 +vt 0.281250 0.312500 +vt 0.281250 0.296875 +vt 0.359375 0.296875 +vt 0.359375 0.312500 +vt 0.437500 0.312500 +vt 0.437500 0.296875 +vt 0.515625 0.296875 +vt 0.515625 0.312500 +vt 0.281250 0.390625 +vt 0.359375 0.390625 +vt 0.437500 0.390625 +vt 0.203125 0.312500 +vt 0.203125 0.296875 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 -0.139100 0.990300 +vn 0.000000 0.139100 -0.990300 +vn 0.000000 0.990300 0.139200 +vn 0.000000 -0.990300 -0.139100 +vn -0.139200 0.990300 0.000000 +vn 0.139100 -0.990300 -0.000000 +vn 0.990300 0.139100 0.000000 +vn -0.990300 -0.139100 -0.000000 +vn 0.139100 0.990300 0.000000 +vn -0.139100 -0.990300 -0.000000 +vn 0.990300 -0.139100 -0.000000 +vn -0.990300 0.139100 0.000000 +vn 0.000000 0.139100 0.990300 +vn 0.000000 -0.139100 -0.990300 +vn 0.000000 0.990300 -0.139200 +vn 0.000000 -0.990300 0.139100 +vn -0.139100 0.980600 -0.137800 +vn 0.139100 -0.980600 0.137800 +vn 0.990300 0.137800 -0.019400 +vn -0.990300 -0.137800 0.019400 +vn -0.139100 0.980600 0.137800 +vn 0.139100 -0.980600 -0.137800 +vn 0.990300 0.137800 0.019400 +vn -0.990300 -0.137800 -0.019400 +vn 0.139100 0.980600 0.137800 +vn -0.139100 -0.980600 -0.137800 +vn 0.990300 -0.137800 -0.019400 +vn -0.990300 0.137800 0.019400 +vn 0.139100 0.980600 -0.137800 +vn -0.139100 -0.980600 0.137800 +vn 0.990300 -0.137800 0.019400 +vn -0.990300 0.137800 -0.019400 +usemtl None +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 8/9/3 1/1/3 4/4/3 5/10/3 +f 2/5/4 7/11/4 6/10/4 3/4/4 +f 5/5/5 4/4/5 3/3/5 6/6/5 +f 8/12/6 7/13/6 2/2/6 1/1/6 +f 9/1/1 10/2/1 11/3/1 12/4/1 +f 13/5/2 14/6/2 15/7/2 16/8/2 +f 16/9/3 9/1/3 12/4/3 13/10/3 +f 10/5/4 15/11/4 14/10/4 11/4/4 +f 13/5/5 12/4/5 11/3/5 14/6/5 +f 16/12/6 15/13/6 10/2/6 9/1/6 +f 17/1/1 18/2/1 19/3/1 20/4/1 +f 21/5/2 22/6/2 23/7/2 24/8/2 +f 24/9/3 17/1/3 20/4/3 21/10/3 +f 18/5/4 23/11/4 22/10/4 19/4/4 +f 21/5/5 20/4/5 19/3/5 22/6/5 +f 24/12/6 23/13/6 18/2/6 17/1/6 +f 25/1/1 26/2/1 27/3/1 28/4/1 +f 29/5/2 30/6/2 31/7/2 32/8/2 +f 32/9/3 25/1/3 28/4/3 29/10/3 +f 26/5/4 31/11/4 30/10/4 27/4/4 +f 29/5/5 28/4/5 27/3/5 30/6/5 +f 32/12/6 31/13/6 26/2/6 25/1/6 +f 33/14/1 34/15/1 35/16/1 36/17/1 +f 37/18/2 38/19/2 39/20/2 40/21/2 +f 40/22/3 33/14/3 36/17/3 37/23/3 +f 34/18/4 39/24/4 38/23/4 35/17/4 +f 37/18/5 36/17/5 35/16/5 38/19/5 +f 40/25/6 39/26/6 34/15/6 33/14/6 +f 41/27/7 42/28/7 43/29/7 44/30/7 +f 45/31/8 46/32/8 47/33/8 48/34/8 +f 48/35/9 41/27/9 44/30/9 45/36/9 +f 42/37/10 47/38/10 46/36/10 43/30/10 +f 45/31/5 44/30/5 43/29/5 46/32/5 +f 48/39/6 47/40/6 42/28/6 41/27/6 +f 49/41/1 50/42/1 51/43/1 52/44/1 +f 53/45/2 54/46/2 55/47/2 56/48/2 +f 56/49/11 49/41/11 52/44/11 53/50/11 +f 50/51/12 55/52/12 54/50/12 51/44/12 +f 53/45/13 52/44/13 51/43/13 54/46/13 +f 56/53/14 55/54/14 50/42/14 49/41/14 +f 57/41/1 58/42/1 59/43/1 60/44/1 +f 61/45/2 62/46/2 63/47/2 64/48/2 +f 64/49/15 57/41/15 60/44/15 61/50/15 +f 58/51/16 63/52/16 62/50/16 59/44/16 +f 61/45/17 60/44/17 59/43/17 62/46/17 +f 64/53/18 63/54/18 58/42/18 57/41/18 +f 65/27/19 66/28/19 67/29/19 68/30/19 +f 69/31/20 70/32/20 71/33/20 72/34/20 +f 72/35/21 65/27/21 68/30/21 69/36/21 +f 66/37/22 71/38/22 70/36/22 67/30/22 +f 69/31/5 68/30/5 67/29/5 70/32/5 +f 72/39/6 71/40/6 66/28/6 65/27/6 +f 73/55/19 74/56/19 75/57/19 76/58/19 +f 77/59/20 78/60/20 79/61/20 80/62/20 +f 80/63/23 73/55/23 76/58/23 77/64/23 +f 74/59/24 79/65/24 78/64/24 75/58/24 +f 77/59/25 76/58/25 75/57/25 78/60/25 +f 80/66/26 79/67/26 74/56/26 73/55/26 +f 81/55/7 82/56/7 83/57/7 84/58/7 +f 85/59/8 86/60/8 87/61/8 88/62/8 +f 88/63/27 81/55/27 84/58/27 85/64/27 +f 82/59/28 87/65/28 86/64/28 83/58/28 +f 85/59/29 84/58/29 83/57/29 86/60/29 +f 88/66/30 87/67/30 82/56/30 81/55/30 +f 89/55/7 90/56/7 91/57/7 92/58/7 +f 93/59/8 94/60/8 95/61/8 96/62/8 +f 96/63/31 89/55/31 92/58/31 93/64/31 +f 90/59/32 95/65/32 94/64/32 91/58/32 +f 93/59/33 92/58/33 91/57/33 94/60/33 +f 96/66/34 95/67/34 90/56/34 89/55/34 +f 97/55/19 98/56/19 99/57/19 100/58/19 +f 101/59/20 102/60/20 103/61/20 104/62/20 +f 104/63/35 97/55/35 100/58/35 101/64/35 +f 98/59/36 103/65/36 102/64/36 99/58/36 +f 101/59/37 100/58/37 99/57/37 102/60/37 +f 104/66/38 103/67/38 98/56/38 97/55/38 +f 105/68/1 106/69/1 107/70/1 108/71/1 +f 109/72/2 110/73/2 111/74/2 112/75/2 +f 112/76/3 105/68/3 108/71/3 109/77/3 +f 106/78/4 111/79/4 110/77/4 107/71/4 +f 109/72/5 108/71/5 107/70/5 110/73/5 +f 112/80/6 111/81/6 106/69/6 105/68/6 +f 113/82/5 114/83/5 115/84/5 116/85/5 +f 117/86/6 118/87/6 119/88/6 120/89/6 +f 120/90/3 113/82/3 116/85/3 117/91/3 +f 114/92/4 119/93/4 118/91/4 115/85/4 +f 117/86/2 116/85/2 115/84/2 118/87/2 +f 120/94/1 119/95/1 114/83/1 113/82/1 +f 121/68/1 122/69/1 123/70/1 124/71/1 +f 125/72/2 126/73/2 127/74/2 128/75/2 +f 128/76/3 121/68/3 124/71/3 125/77/3 +f 122/78/4 127/79/4 126/77/4 123/71/4 +f 125/72/5 124/71/5 123/70/5 126/73/5 +f 128/80/6 127/81/6 122/69/6 121/68/6 +f 129/82/5 130/83/5 131/84/5 132/85/5 +f 133/86/6 134/87/6 135/88/6 136/89/6 +f 136/90/3 129/82/3 132/85/3 133/91/3 +f 130/92/4 135/93/4 134/91/4 131/85/4 +f 133/86/2 132/85/2 131/84/2 134/87/2 +f 136/94/1 135/95/1 130/83/1 129/82/1 +f 137/96/1 138/97/1 139/98/1 140/99/1 +f 141/100/2 142/101/2 143/102/2 144/103/2 +f 144/104/3 137/96/3 140/99/3 141/105/3 +f 138/100/4 143/106/4 142/105/4 139/99/4 +f 141/100/5 140/99/5 139/98/5 142/101/5 +f 144/107/6 143/108/6 138/97/6 137/96/6 +f 145/109/1 146/110/1 147/96/1 148/111/1 +f 149/112/2 150/113/2 151/99/2 152/114/2 +f 152/115/3 145/109/3 148/111/3 149/104/3 +f 146/112/4 151/116/4 150/104/4 147/111/4 +f 149/112/5 148/111/5 147/96/5 150/113/5 +f 152/117/6 151/107/6 146/110/6 145/109/6 +f 153/96/1 154/97/1 155/98/1 156/99/1 +f 157/100/2 158/101/2 159/102/2 160/103/2 +f 160/104/3 153/96/3 156/99/3 157/105/3 +f 154/100/4 159/106/4 158/105/4 155/99/4 +f 157/100/5 156/99/5 155/98/5 158/101/5 +f 160/107/6 159/108/6 154/97/6 153/96/6 +f 161/109/1 162/110/1 163/96/1 164/111/1 +f 165/112/2 166/113/2 167/99/2 168/114/2 +f 168/115/3 161/109/3 164/111/3 165/104/3 +f 162/112/4 167/116/4 166/104/4 163/111/4 +f 165/112/5 164/111/5 163/96/5 166/113/5 +f 168/117/6 167/107/6 162/110/6 161/109/6 +f 169/96/1 170/97/1 171/98/1 172/99/1 +f 173/100/2 174/101/2 175/102/2 176/103/2 +f 176/104/3 169/96/3 172/99/3 173/105/3 +f 170/100/4 175/106/4 174/105/4 171/99/4 +f 173/100/5 172/99/5 171/98/5 174/101/5 +f 176/107/6 175/108/6 170/97/6 169/96/6 +f 177/109/1 178/110/1 179/96/1 180/111/1 +f 181/112/2 182/113/2 183/99/2 184/114/2 +f 184/115/3 177/109/3 180/111/3 181/104/3 +f 178/112/4 183/116/4 182/104/4 179/111/4 +f 181/112/5 180/111/5 179/96/5 182/113/5 +f 184/117/6 183/107/6 178/110/6 177/109/6 +f 185/96/1 186/97/1 187/98/1 188/99/1 +f 189/100/2 190/101/2 191/102/2 192/103/2 +f 192/104/3 185/96/3 188/99/3 189/105/3 +f 186/100/4 191/106/4 190/105/4 187/99/4 +f 189/100/5 188/99/5 187/98/5 190/101/5 +f 192/107/6 191/108/6 186/97/6 185/96/6 +f 193/109/1 194/110/1 195/96/1 196/111/1 +f 197/112/2 198/113/2 199/99/2 200/114/2 +f 200/115/3 193/109/3 196/111/3 197/104/3 +f 194/112/4 199/116/4 198/104/4 195/111/4 +f 197/112/5 196/111/5 195/96/5 198/113/5 +f 200/117/6 199/107/6 194/110/6 193/109/6 +f 201/118/1 202/119/1 203/120/1 204/121/1 +f 205/122/2 206/123/2 207/124/2 208/125/2 +f 208/126/3 201/118/3 204/121/3 205/127/3 +f 202/122/4 207/128/4 206/127/4 203/121/4 +f 205/122/5 204/121/5 203/120/5 206/123/5 +f 208/129/6 207/130/6 202/119/6 201/118/6 +f 209/27/7 210/28/7 211/29/7 212/30/7 +f 213/31/8 214/32/8 215/33/8 216/34/8 +f 216/35/9 209/27/9 212/30/9 213/36/9 +f 210/37/10 215/38/10 214/36/10 211/30/10 +f 213/31/5 212/30/5 211/29/5 214/32/5 +f 216/39/6 215/40/6 210/28/6 209/27/6 +f 217/41/1 218/42/1 219/43/1 220/44/1 +f 221/45/2 222/46/2 223/47/2 224/48/2 +f 224/49/11 217/41/11 220/44/11 221/50/11 +f 218/51/12 223/52/12 222/50/12 219/44/12 +f 221/45/13 220/44/13 219/43/13 222/46/13 +f 224/53/14 223/54/14 218/42/14 217/41/14 +f 225/41/1 226/42/1 227/43/1 228/44/1 +f 229/45/2 230/46/2 231/47/2 232/48/2 +f 232/49/15 225/41/15 228/44/15 229/50/15 +f 226/51/16 231/52/16 230/50/16 227/44/16 +f 229/45/17 228/44/17 227/43/17 230/46/17 +f 232/53/18 231/54/18 226/42/18 225/41/18 +f 233/27/19 234/28/19 235/29/19 236/30/19 +f 237/31/20 238/32/20 239/33/20 240/34/20 +f 240/35/21 233/27/21 236/30/21 237/36/21 +f 234/37/22 239/38/22 238/36/22 235/30/22 +f 237/31/5 236/30/5 235/29/5 238/32/5 +f 240/39/6 239/40/6 234/28/6 233/27/6 +f 241/109/1 242/110/1 243/96/1 244/111/1 +f 245/112/2 246/113/2 247/99/2 248/114/2 +f 248/115/3 241/109/3 244/111/3 245/104/3 +f 242/112/4 247/116/4 246/104/4 243/111/4 +f 245/112/5 244/111/5 243/96/5 246/113/5 +f 248/117/6 247/107/6 242/110/6 241/109/6 +f 249/109/1 250/110/1 251/96/1 252/111/1 +f 253/112/2 254/113/2 255/99/2 256/114/2 +f 256/115/3 249/109/3 252/111/3 253/104/3 +f 250/112/4 255/116/4 254/104/4 251/111/4 +f 253/112/5 252/111/5 251/96/5 254/113/5 +f 256/117/6 255/107/6 250/110/6 249/109/6 +f 257/109/1 258/110/1 259/96/1 260/111/1 +f 261/112/2 262/113/2 263/99/2 264/114/2 +f 264/115/3 257/109/3 260/111/3 261/104/3 +f 258/112/4 263/116/4 262/104/4 259/111/4 +f 261/112/5 260/111/5 259/96/5 262/113/5 +f 264/117/6 263/107/6 258/110/6 257/109/6 +f 265/109/1 266/110/1 267/96/1 268/111/1 +f 269/112/2 270/113/2 271/99/2 272/114/2 +f 272/115/3 265/109/3 268/111/3 269/104/3 +f 266/112/4 271/116/4 270/104/4 267/111/4 +f 269/112/5 268/111/5 267/96/5 270/113/5 +f 272/117/6 271/107/6 266/110/6 265/109/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockInputRoutingNode.json b/src/main/resources/assets/bloodmagic/models/block/blockinputroutingnode.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockInputRoutingNode.json rename to src/main/resources/assets/bloodmagic/models/block/blockinputroutingnode.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockMasterRoutingNode.json b/src/main/resources/assets/bloodmagic/models/block/blockmasterroutingnode.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockMasterRoutingNode.json rename to src/main/resources/assets/bloodmagic/models/block/blockmasterroutingnode.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockOutputRoutingNode.json b/src/main/resources/assets/bloodmagic/models/block/blockoutputroutingnode.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockOutputRoutingNode.json rename to src/main/resources/assets/bloodmagic/models/block/blockoutputroutingnode.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPhantom.json b/src/main/resources/assets/bloodmagic/models/block/blockphantom.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPhantom.json rename to src/main/resources/assets/bloodmagic/models/block/blockphantom.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPillarCapEast.json b/src/main/resources/assets/bloodmagic/models/block/blockpillarcapeast.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPillarCapEast.json rename to src/main/resources/assets/bloodmagic/models/block/blockpillarcapeast.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPillarCapNorth.json b/src/main/resources/assets/bloodmagic/models/block/blockpillarcapnorth.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPillarCapNorth.json rename to src/main/resources/assets/bloodmagic/models/block/blockpillarcapnorth.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPillarCapSouth.json b/src/main/resources/assets/bloodmagic/models/block/blockpillarcapsouth.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPillarCapSouth.json rename to src/main/resources/assets/bloodmagic/models/block/blockpillarcapsouth.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPillarCapWest.json b/src/main/resources/assets/bloodmagic/models/block/blockpillarcapwest.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPillarCapWest.json rename to src/main/resources/assets/bloodmagic/models/block/blockpillarcapwest.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPillarX.json b/src/main/resources/assets/bloodmagic/models/block/blockpillarx.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPillarX.json rename to src/main/resources/assets/bloodmagic/models/block/blockpillarx.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockPillarZ.json b/src/main/resources/assets/bloodmagic/models/block/blockpillarz.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockPillarZ.json rename to src/main/resources/assets/bloodmagic/models/block/blockpillarz.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockSoulForge.json b/src/main/resources/assets/bloodmagic/models/block/blocksoulforge.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockSoulForge.json rename to src/main/resources/assets/bloodmagic/models/block/blocksoulforge.json diff --git a/src/main/resources/assets/bloodmagic/models/block/BlockSpectral.json b/src/main/resources/assets/bloodmagic/models/block/blockspectral.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/BlockSpectral.json rename to src/main/resources/assets/bloodmagic/models/block/blockspectral.json diff --git a/src/main/resources/assets/bloodmagic/models/block/bloodaltar.json b/src/main/resources/assets/bloodmagic/models/block/bloodaltar.json new file mode 100644 index 00000000..8f1f343e --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/bloodaltar.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/blockaltar.obj", + "textures": { + "default": "bloodmagic:models/altar", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal1.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal1.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal1.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal1.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal1.obj deleted file mode 100644 index e314fe52..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal1.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal1.mtl -o Crystal1_Cube.002 -v 0.541309 0.522193 0.565775 -v 0.475462 0.818325 0.429288 -v 0.364893 0.461758 0.462174 -v 0.390526 0.258066 0.560703 -v 0.523738 0.510684 0.334361 -v 0.467179 0.253186 0.344289 -v 0.625975 0.304529 0.481768 -v 0.494567 -0.066932 0.498392 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.554600 0.268800 0.787500 -vn -0.644800 0.122900 -0.754400 -vn 0.678500 -0.232200 -0.697000 -vn 0.338600 -0.133400 0.931400 -vn -0.915300 -0.246300 -0.318600 -vn 0.958400 0.272000 -0.086300 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal2.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal2.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal2.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal2.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal2.obj deleted file mode 100644 index 879cc0dc..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal2.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal2.mtl -o Crystal2_Cube.003 -v 0.583418 0.194815 0.355811 -v 0.590795 0.338364 0.208300 -v 0.443486 0.156662 0.275360 -v 0.491321 -0.033342 0.518335 -v 0.739315 0.387694 -0.018903 -v 0.565149 0.127821 0.081910 -v 0.781085 0.191352 0.180536 -v 0.652954 0.018450 0.289613 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.509600 0.627400 0.588800 -vn -0.784400 0.386700 -0.485000 -vn 0.468500 -0.628400 -0.621000 -vn 0.744000 0.043000 0.666800 -vn -0.493000 -0.785700 -0.373600 -vn 0.558900 0.619400 0.551300 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal3.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal3.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal3.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal3.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal3.obj deleted file mode 100644 index 39622f29..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal3.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal3.mtl -o Crystal3_Cube.004 -v 0.599699 0.234431 0.715050 -v 0.561549 0.133651 0.487765 -v 0.490610 -0.051382 0.494637 -v 0.573184 0.095593 0.709620 -v 0.705541 0.197807 0.627045 -v 0.617341 0.039525 0.599787 -v 0.814451 0.310805 0.883878 -v 0.698243 0.101404 0.775472 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.952700 0.287100 0.099200 -vn 0.728300 -0.301000 -0.615600 -vn 0.884700 -0.409700 -0.222600 -vn -0.561200 -0.040200 0.826700 -vn 0.026100 -0.886100 0.462800 -vn -0.015500 0.916400 -0.400000 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal4.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal4.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal4.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal4.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal4.obj deleted file mode 100644 index e8f1cc50..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal4.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal4.mtl -o Crystal4_Cube.005 -v 0.231425 0.272568 0.295285 -v 0.148716 0.421674 0.074512 -v 0.229979 0.123255 0.182833 -v 0.279143 0.056276 0.408796 -v 0.403338 0.307055 0.170708 -v 0.450289 0.076509 0.254075 -v 0.408191 0.195351 0.365302 -v 0.484596 -0.035550 0.505028 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.965600 -0.150500 0.212200 -vn 0.232800 -0.281000 -0.931100 -vn 0.957000 0.284200 0.058600 -vn -0.184300 0.445100 0.876300 -vn -0.177800 -0.931100 -0.318400 -vn 0.187400 0.849200 0.493700 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal5.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal5.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal5.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal5.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal5.obj deleted file mode 100644 index 0443a2c1..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal5.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal5.mtl -o Crystal5_Cube.006 -v 0.349231 0.423691 0.937667 -v 0.305391 0.245339 0.724533 -v 0.367605 0.076317 0.717276 -v 0.460587 0.191248 0.826603 -v 0.391454 0.159733 0.568418 -v 0.492172 -0.045920 0.485475 -v 0.470717 0.292579 0.676822 -v 0.542313 0.166856 0.649094 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.594700 -0.452900 0.664200 -vn -0.894900 -0.312500 -0.318500 -vn 0.398800 0.470300 -0.787300 -vn 0.892800 0.342800 0.292300 -vn 0.544200 -0.664400 0.512300 -vn -0.373400 0.733900 -0.567400 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal6.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal6.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal6.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal6.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal6.obj deleted file mode 100644 index e1a9c758..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal6.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal6.mtl -o Crystal6_Cube.007 -v 0.239487 0.278413 0.616538 -v 0.028163 0.346273 0.526362 -v 0.189094 0.113959 0.535716 -v 0.335860 0.041917 0.579906 -v 0.235427 0.257442 0.421622 -v 0.320816 0.037582 0.451232 -v 0.393389 0.239035 0.522345 -v 0.490528 -0.046537 0.496835 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.432900 -0.287300 0.854500 -vn -0.585200 -0.380500 -0.716100 -vn 0.442400 0.152600 -0.883700 -vn 0.524900 0.093900 0.846000 -vn -0.459900 -0.884000 0.083600 -vn 0.279000 0.954200 -0.108500 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal7.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal7.mtl deleted file mode 100644 index 8cea6585..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal7.mtl +++ /dev/null @@ -1,11 +0,0 @@ -# Blender MTL File: 'CrystalEdited.blend' -# Material Count: 1 - -newmtl Material.001 -#Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -#Ks 0.8 0.8 0.8 -d 1 -#illum 2 -map_Kd crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal7.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal7.obj deleted file mode 100644 index 06103068..00000000 --- a/src/main/resources/assets/bloodmagic/models/block/crystal/Crystal7.obj +++ /dev/null @@ -1,30 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib Crystal7.mtl -o Crystal7_Cube.008 -v 0.679569 0.173016 0.537214 -v 0.753542 0.268537 0.442736 -v 0.647951 0.146157 0.391809 -v 0.483178 -0.044230 0.496270 -v 0.932224 0.344260 0.450676 -v 0.777536 0.161952 0.399277 -v 0.798431 0.176811 0.535512 -v 0.709441 0.067096 0.475384 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vn -0.752300 0.657500 0.042100 -vn -0.061900 0.364900 -0.929000 -vn 0.776200 -0.628400 -0.050500 -vn 0.206700 -0.449100 0.869200 -vn 0.198600 -0.634800 -0.746700 -vn -0.189400 0.650900 0.735200 -usemtl Material.001 -#s 1 -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 2/1/2 5/2/2 6/3/2 3/4/2 -f 5/1/3 7/2/3 8/3/3 6/4/3 -f 7/1/4 1/2/4 4/3/4 8/4/4 -f 4/1/5 3/2/5 6/3/5 8/4/5 -f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal1.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal1.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal1.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal1.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal1.obj new file mode 100644 index 00000000..820c4245 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal1.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal1.mtl +o Crystal1_Cube.002 +v 0.541309 0.522193 0.565775 +v 0.475462 0.818325 0.429288 +v 0.364893 0.461758 0.462174 +v 0.390526 0.258066 0.560703 +v 0.523738 0.510684 0.334361 +v 0.467179 0.253186 0.344289 +v 0.625975 0.304529 0.481768 +v 0.494567 -0.066932 0.498392 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.554600 0.268800 0.787500 +vn -0.644800 0.122900 -0.754400 +vn 0.678500 -0.232200 -0.697000 +vn 0.338600 -0.133400 0.931400 +vn -0.915300 -0.246300 -0.318600 +vn 0.958400 0.272000 -0.086300 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal2.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal2.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal2.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal2.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal2.obj new file mode 100644 index 00000000..ef42163c --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal2.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal2.mtl +o Crystal2_Cube.003 +v 0.583418 0.194815 0.355811 +v 0.590795 0.338364 0.208300 +v 0.443486 0.156662 0.275360 +v 0.491321 -0.033342 0.518335 +v 0.739315 0.387694 -0.018903 +v 0.565149 0.127821 0.081910 +v 0.781085 0.191352 0.180536 +v 0.652954 0.018450 0.289613 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.509600 0.627400 0.588800 +vn -0.784400 0.386700 -0.485000 +vn 0.468500 -0.628400 -0.621000 +vn 0.744000 0.043000 0.666800 +vn -0.493000 -0.785700 -0.373600 +vn 0.558900 0.619400 0.551300 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal3.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal3.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal3.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal3.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal3.obj new file mode 100644 index 00000000..346e90fb --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal3.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal3.mtl +o Crystal3_Cube.004 +v 0.599699 0.234431 0.715050 +v 0.561549 0.133651 0.487765 +v 0.490610 -0.051382 0.494637 +v 0.573184 0.095593 0.709620 +v 0.705541 0.197807 0.627045 +v 0.617341 0.039525 0.599787 +v 0.814451 0.310805 0.883878 +v 0.698243 0.101404 0.775472 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.952700 0.287100 0.099200 +vn 0.728300 -0.301000 -0.615600 +vn 0.884700 -0.409700 -0.222600 +vn -0.561200 -0.040200 0.826700 +vn 0.026100 -0.886100 0.462800 +vn -0.015500 0.916400 -0.400000 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal4.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal4.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal4.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal4.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal4.obj new file mode 100644 index 00000000..a1733ba6 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal4.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal4.mtl +o Crystal4_Cube.005 +v 0.231425 0.272568 0.295285 +v 0.148716 0.421674 0.074512 +v 0.229979 0.123255 0.182833 +v 0.279143 0.056276 0.408796 +v 0.403338 0.307055 0.170708 +v 0.450289 0.076509 0.254075 +v 0.408191 0.195351 0.365302 +v 0.484596 -0.035550 0.505028 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.965600 -0.150500 0.212200 +vn 0.232800 -0.281000 -0.931100 +vn 0.957000 0.284200 0.058600 +vn -0.184300 0.445100 0.876300 +vn -0.177800 -0.931100 -0.318400 +vn 0.187400 0.849200 0.493700 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal5.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal5.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal5.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal5.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal5.obj new file mode 100644 index 00000000..cc75d4b8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal5.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal5.mtl +o Crystal5_Cube.006 +v 0.349231 0.423691 0.937667 +v 0.305391 0.245339 0.724533 +v 0.367605 0.076317 0.717276 +v 0.460587 0.191248 0.826603 +v 0.391454 0.159733 0.568418 +v 0.492172 -0.045920 0.485475 +v 0.470717 0.292579 0.676822 +v 0.542313 0.166856 0.649094 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.594700 -0.452900 0.664200 +vn -0.894900 -0.312500 -0.318500 +vn 0.398800 0.470300 -0.787300 +vn 0.892800 0.342800 0.292300 +vn 0.544200 -0.664400 0.512300 +vn -0.373400 0.733900 -0.567400 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal6.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal6.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal6.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal6.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal6.obj new file mode 100644 index 00000000..9206e935 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal6.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal6.mtl +o Crystal6_Cube.007 +v 0.239487 0.278413 0.616538 +v 0.028163 0.346273 0.526362 +v 0.189094 0.113959 0.535716 +v 0.335860 0.041917 0.579906 +v 0.235427 0.257442 0.421622 +v 0.320816 0.037582 0.451232 +v 0.393389 0.239035 0.522345 +v 0.490528 -0.046537 0.496835 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.432900 -0.287300 0.854500 +vn -0.585200 -0.380500 -0.716100 +vn 0.442400 0.152600 -0.883700 +vn 0.524900 0.093900 0.846000 +vn -0.459900 -0.884000 0.083600 +vn 0.279000 0.954200 -0.108500 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal7.mtl b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal7.mtl new file mode 100644 index 00000000..8312afd8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal7.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'CrystalEdited.blend' +# Material Count: 1 + +newmtl Material.001 +#Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +#Ks 0.8 0.8 0.8 +d 1 +#illum 2 +map_Kd #crystal \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal/crystal7.obj b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal7.obj new file mode 100644 index 00000000..0a2094b6 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal/crystal7.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib crystal7.mtl +o Crystal7_Cube.008 +v 0.679569 0.173016 0.537214 +v 0.753542 0.268537 0.442736 +v 0.647951 0.146157 0.391809 +v 0.483178 -0.044230 0.496270 +v 0.932224 0.344260 0.450676 +v 0.777536 0.161952 0.399277 +v 0.798431 0.176811 0.535512 +v 0.709441 0.067096 0.475384 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.752300 0.657500 0.042100 +vn -0.061900 0.364900 -0.929000 +vn 0.776200 -0.628400 -0.050500 +vn 0.206700 -0.449100 0.869200 +vn 0.198600 -0.634800 -0.746700 +vn -0.189400 0.650900 0.735200 +usemtl Material.001 +#s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/1/2 5/2/2 6/3/2 3/4/2 +f 5/1/3 7/2/3 8/3/3 6/4/3 +f 7/1/4 1/2/4 4/3/4 8/4/4 +f 4/1/5 3/2/5 6/3/5 8/4/5 +f 7/1/6 5/2/6 2/3/6 1/4/6 diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal1.json b/src/main/resources/assets/bloodmagic/models/block/crystal1.json new file mode 100644 index 00000000..41a7581c --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal1.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal1.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal2.json b/src/main/resources/assets/bloodmagic/models/block/crystal2.json new file mode 100644 index 00000000..5e50ae32 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal2.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal2.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal3.json b/src/main/resources/assets/bloodmagic/models/block/crystal3.json new file mode 100644 index 00000000..592f0dca --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal3.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal3.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal4.json b/src/main/resources/assets/bloodmagic/models/block/crystal4.json new file mode 100644 index 00000000..2fa0a75e --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal4.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal4.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal5.json b/src/main/resources/assets/bloodmagic/models/block/crystal5.json new file mode 100644 index 00000000..eab5ad29 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal5.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal5.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal6.json b/src/main/resources/assets/bloodmagic/models/block/crystal6.json new file mode 100644 index 00000000..f82b438e --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal6.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal6.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/crystal7.json b/src/main/resources/assets/bloodmagic/models/block/crystal7.json new file mode 100644 index 00000000..345d1916 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/crystal7.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/crystal/crystal7.obj", + "textures": { + "crystal": "bloodmagic:models/defaultcrystal", + "particle": "#crystal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/demoncrucible.json b/src/main/resources/assets/bloodmagic/models/block/demoncrucible.json new file mode 100644 index 00000000..ca99080f --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/demoncrucible.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/blockdemoncrucible.obj", + "textures": { + "default": "bloodmagic:models/demoncrucible", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/demoncrystallizer.json b/src/main/resources/assets/bloodmagic/models/block/demoncrystallizer.json new file mode 100644 index 00000000..0bd7c2bb --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/demoncrystallizer.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/blockdemoncrystallizer.obj", + "textures": { + "default": "bloodmagic:models/demoncrystallizer", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/demonpylon.json b/src/main/resources/assets/bloodmagic/models/block/demonpylon.json new file mode 100644 index 00000000..de39d9ab --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/demonpylon.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/blockdemonpylon.obj", + "textures": { + "default": "bloodmagic:models/demonpylon", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/ethereal_mimic.json b/src/main/resources/assets/bloodmagic/models/block/ethereal_mimic.json new file mode 100644 index 00000000..3245d768 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/ethereal_mimic.json @@ -0,0 +1,3 @@ +{ + "loader": "bloodmagic:mimicloader_ethereal" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/incensealtar.json b/src/main/resources/assets/bloodmagic/models/block/incensealtar.json new file mode 100644 index 00000000..4f824ef3 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/incensealtar.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/blockincensealtar.obj", + "textures": { + "default": "bloodmagic:models/incensealtar", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/ModelAlchemyTable.mtl b/src/main/resources/assets/bloodmagic/models/block/modelalchemytable.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/ModelAlchemyTable.mtl rename to src/main/resources/assets/bloodmagic/models/block/modelalchemytable.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/modelalchemytable.obj b/src/main/resources/assets/bloodmagic/models/block/modelalchemytable.obj new file mode 100644 index 00000000..188da6f7 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/modelalchemytable.obj @@ -0,0 +1,1257 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib modelalchemytable.mtl +o Decanter1 +v -0.125000 0.837500 0.718750 +v -0.306111 0.837500 0.767279 +v -0.306111 1.025000 0.767279 +v -0.125000 1.025000 0.718750 +v -0.257582 0.837500 0.948390 +v -0.076471 0.837500 0.899861 +v -0.076471 1.025000 0.899861 +v -0.257582 1.025000 0.948390 +vt 0.023438 0.000000 +vt 0.046875 0.000000 +vt 0.046875 0.023438 +vt 0.023438 0.023438 +vt 0.070313 0.000000 +vt 0.093750 0.000000 +vt 0.093750 0.023438 +vt 0.070313 0.023438 +vt 0.046875 0.046875 +vt 0.023438 0.046875 +vt 0.070313 0.046875 +vt 0.000000 0.000000 +vt 0.000000 0.023438 +vn -0.258800 0.000000 -0.965900 +vn 0.258800 -0.000000 0.965900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.965900 0.000000 -0.258800 +vn -0.965900 -0.000000 0.258800 +usemtl None +#s off +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 4/4/3 3/3/3 8/9/3 7/10/3 +f 6/3/4 5/8/4 2/11/4 1/9/4 +f 6/12/5 1/1/5 4/4/5 7/13/5 +f 2/2/6 5/5/6 8/8/6 3/3/6 +o CarpetLow1 +v 1.054228 0.423099 0.250000 +v 0.992678 0.412246 0.250000 +v 0.970972 0.535347 0.250000 +v 1.032522 0.546200 0.250000 +v 0.992678 0.412246 0.750000 +v 1.054228 0.423099 0.750000 +v 1.032522 0.546200 0.750000 +v 0.970972 0.535347 0.750000 +vt 0.843750 0.757813 +vt 0.851563 0.757813 +vt 0.851563 0.773438 +vt 0.843750 0.773438 +vt 0.914063 0.757813 +vt 0.921875 0.757813 +vt 0.921875 0.773438 +vt 0.914063 0.773438 +vt 0.851563 0.835938 +vt 0.843750 0.835938 +vt 0.859375 0.773438 +vt 0.859375 0.835938 +vt 0.781250 0.757813 +vt 0.781250 0.773438 +vn -0.000000 0.000000 -1.000000 +vn 0.000000 -0.000000 1.000000 +vn -0.173600 0.984800 0.000000 +vn 0.173600 -0.984800 -0.000000 +vn 0.984800 0.173600 0.000000 +vn -0.984800 -0.173600 -0.000000 +usemtl None +#s off +f 9/14/7 10/15/7 11/16/7 12/17/7 +f 13/18/8 14/19/8 15/20/8 16/21/8 +f 12/17/9 11/16/9 16/22/9 15/23/9 +f 14/16/10 13/24/10 10/25/10 9/22/10 +f 14/26/11 9/14/11 12/17/11 15/27/11 +f 10/15/12 13/18/12 16/21/12 11/16/12 +o CarpetLowest2 +v -1.057387 0.301657 0.250000 +v -1.113075 0.330031 0.250000 +v -1.056326 0.441407 0.250000 +v -1.000638 0.413033 0.250000 +v -1.113075 0.330031 0.750000 +v -1.057387 0.301657 0.750000 +v -1.000638 0.413033 0.750000 +v -1.056326 0.441407 0.750000 +vt 0.843750 0.664063 +vt 0.851563 0.664063 +vt 0.851563 0.679688 +vt 0.843750 0.679688 +vt 0.914063 0.664063 +vt 0.921875 0.664063 +vt 0.921875 0.679688 +vt 0.914063 0.679688 +vt 0.851563 0.742188 +vt 0.843750 0.742188 +vt 0.859375 0.679688 +vt 0.859375 0.742188 +vt 0.781250 0.664063 +vt 0.781250 0.679688 +vn 0.000000 0.000000 -1.000000 +vn -0.000000 0.000000 1.000000 +vn 0.454000 0.891000 0.000000 +vn -0.454000 -0.891000 -0.000000 +vn 0.891000 -0.454000 -0.000000 +vn -0.891000 0.454000 0.000000 +usemtl None +#s off +f 17/28/13 18/29/13 19/30/13 20/31/13 +f 21/32/14 22/33/14 23/34/14 24/35/14 +f 20/31/15 19/30/15 24/36/15 23/37/15 +f 22/30/16 21/38/16 18/39/16 17/36/16 +f 22/40/17 17/28/17 20/31/17 23/41/17 +f 18/29/18 21/32/18 24/35/18 19/30/18 +o Decanter2 +v -0.185370 1.025000 0.734926 +v -0.366481 1.025000 0.783455 +v -0.366481 1.087500 0.783455 +v -0.185370 1.087500 0.734926 +v -0.317953 1.025000 0.964566 +v -0.136842 1.025000 0.916037 +v -0.136842 1.087500 0.916037 +v -0.317953 1.087500 0.964566 +vt 0.023438 0.062500 +vt 0.046875 0.062500 +vt 0.046875 0.070313 +vt 0.023438 0.070313 +vt 0.070313 0.062500 +vt 0.093750 0.062500 +vt 0.093750 0.070313 +vt 0.070313 0.070313 +vt 0.046875 0.093750 +vt 0.023438 0.093750 +vt 0.070313 0.093750 +vt 0.000000 0.062500 +vt 0.000000 0.070313 +vn -0.258800 0.000000 -0.965900 +vn 0.258800 0.000000 0.965900 +vn 0.000000 1.000000 0.000000 +vn -0.000000 -1.000000 -0.000000 +vn 0.965900 0.000000 -0.258800 +vn -0.965900 0.000000 0.258800 +usemtl None +#s off +f 25/42/19 26/43/19 27/44/19 28/45/19 +f 29/46/20 30/47/20 31/48/20 32/49/20 +f 28/45/21 27/44/21 32/50/21 31/51/21 +f 30/44/22 29/49/22 26/52/22 25/50/22 +f 30/53/23 25/42/23 28/45/23 31/54/23 +f 26/43/24 29/46/24 32/49/24 27/44/24 +o Pipe1 +v -0.373208 1.087147 0.866346 +v -0.548929 1.122100 0.811057 +v -0.536736 1.183399 0.811057 +v -0.361015 1.148446 0.866346 +v -0.567004 1.125696 0.870778 +v -0.391284 1.090743 0.926067 +v -0.379091 1.152042 0.926067 +v -0.554811 1.186995 0.870778 +vt 0.007813 0.132813 +vt 0.031250 0.132813 +vt 0.031250 0.140625 +vt 0.007813 0.140625 +vt 0.039063 0.132813 +vt 0.062500 0.132813 +vt 0.062500 0.140625 +vt 0.039063 0.140625 +vt 0.031250 0.148438 +vt 0.007813 0.148438 +vt 0.054688 0.140625 +vt 0.054688 0.148438 +vt 0.000000 0.132813 +vt 0.000000 0.140625 +vn 0.289200 -0.057500 -0.955500 +vn -0.289200 0.057500 0.955500 +vn 0.195100 0.980800 -0.000000 +vn -0.195100 -0.980800 0.000000 +vn 0.937200 -0.186400 0.294900 +vn -0.937200 0.186400 -0.294900 +usemtl None +#s off +f 33/55/25 34/56/25 35/57/25 36/58/25 +f 37/59/26 38/60/26 39/61/26 40/62/26 +f 36/58/27 35/57/27 40/63/27 39/64/27 +f 38/57/28 37/65/28 34/66/28 33/63/28 +f 38/67/29 33/55/29 36/58/29 39/68/29 +f 34/56/30 37/59/30 40/62/30 35/57/30 +o Base +v 1.000000 0.002500 0.000000 +v -1.000000 0.002500 0.000000 +v -1.000000 0.127500 0.000000 +v 1.000000 0.127500 0.000000 +v -1.000000 0.002500 1.000000 +v 1.000000 0.002500 1.000000 +v 1.000000 0.127500 1.000000 +v -1.000000 0.127500 1.000000 +vt 0.125000 0.859375 +vt 0.375000 0.859375 +vt 0.375000 0.875000 +vt 0.125000 0.875000 +vt 0.500000 0.859375 +vt 0.750000 0.859375 +vt 0.750000 0.875000 +vt 0.500000 0.875000 +vt 0.375000 1.000000 +vt 0.125000 1.000000 +vt 0.625000 0.875000 +vt 0.625000 1.000000 +vt 0.000000 0.859375 +vt 0.000000 0.875000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +usemtl None +#s off +f 41/69/31 42/70/31 43/71/31 44/72/31 +f 45/73/32 46/74/32 47/75/32 48/76/32 +f 44/72/33 43/71/33 48/77/33 47/78/33 +f 46/71/34 45/79/34 42/80/34 41/77/34 +f 46/81/35 41/69/35 44/72/35 47/82/35 +f 42/70/36 45/73/36 48/76/36 43/71/36 +o Pipe2 +v -0.538497 1.119845 0.809794 +v -0.705303 1.166575 0.738041 +v -0.688443 1.226758 0.738041 +v -0.521637 1.180028 0.809794 +v -0.728334 1.173027 0.795784 +v -0.561528 1.126297 0.867537 +v -0.544668 1.186480 0.867537 +v -0.711474 1.233210 0.795784 +vt 0.007813 0.156250 +vt 0.031250 0.156250 +vt 0.031250 0.164063 +vt 0.007813 0.164063 +vt 0.039063 0.156250 +vt 0.062500 0.156250 +vt 0.062500 0.164063 +vt 0.039063 0.164063 +vt 0.031250 0.171875 +vt 0.007813 0.171875 +vt 0.054688 0.164063 +vt 0.054688 0.171875 +vt 0.000000 0.156250 +vt 0.000000 0.164063 +vn 0.368500 -0.103200 -0.923900 +vn -0.368500 0.103200 0.923900 +vn 0.269800 0.962900 0.000000 +vn -0.269800 -0.962900 0.000000 +vn 0.889600 -0.249200 0.382700 +vn -0.889600 0.249200 -0.382700 +usemtl None +#s off +f 49/83/37 50/84/37 51/85/37 52/86/37 +f 53/87/38 54/88/38 55/89/38 56/90/38 +f 52/86/39 51/85/39 56/91/39 55/92/39 +f 54/85/40 53/93/40 50/94/40 49/91/40 +f 54/95/41 49/83/41 52/86/41 55/96/41 +f 50/84/42 53/87/42 56/90/42 51/85/42 +o JarContent1 +v 0.897244 0.868750 0.414703 +v 0.775448 0.868750 0.442822 +v 0.775448 1.056250 0.442822 +v 0.897244 1.056250 0.414703 +v 0.803567 0.868750 0.564619 +v 0.925363 0.868750 0.536500 +v 0.925363 1.056250 0.536500 +v 0.803567 1.056250 0.564619 +vt 0.117188 0.406250 +vt 0.132813 0.406250 +vt 0.132813 0.429688 +vt 0.117188 0.429688 +vt 0.148438 0.406250 +vt 0.164063 0.406250 +vt 0.164063 0.429688 +vt 0.148438 0.429688 +vt 0.132813 0.445313 +vt 0.117188 0.445313 +vt 0.148438 0.445313 +vt 0.101563 0.406250 +vt 0.101563 0.429688 +vn -0.225000 0.000000 -0.974400 +vn 0.225000 -0.000000 0.974400 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.974400 -0.000000 -0.225000 +vn -0.974400 0.000000 0.225000 +usemtl None +#s off +f 57/97/43 58/98/43 59/99/43 60/100/43 +f 61/101/44 62/102/44 63/103/44 64/104/44 +f 60/100/45 59/99/45 64/105/45 63/106/45 +f 62/99/46 61/104/46 58/107/46 57/105/46 +f 62/108/47 57/97/47 60/100/47 63/109/47 +f 58/98/48 61/101/48 64/104/48 59/99/48 +o BeamCasing +v 0.875000 0.275000 0.437500 +v -0.875000 0.275000 0.437500 +v -0.875000 0.400000 0.437500 +v 0.875000 0.400000 0.437500 +v -0.875000 0.275000 0.562500 +v 0.875000 0.275000 0.562500 +v 0.875000 0.400000 0.562500 +v -0.875000 0.400000 0.562500 +vt 0.015625 0.500000 +vt 0.234375 0.500000 +vt 0.234375 0.515625 +vt 0.015625 0.515625 +vt 0.250000 0.500000 +vt 0.468750 0.500000 +vt 0.468750 0.515625 +vt 0.250000 0.515625 +vt 0.234375 0.531250 +vt 0.015625 0.531250 +vt 0.453125 0.515625 +vt 0.453125 0.531250 +vt 0.000000 0.500000 +vt 0.000000 0.515625 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +usemtl None +#s off +f 65/110/49 66/111/49 67/112/49 68/113/49 +f 69/114/50 70/115/50 71/116/50 72/117/50 +f 68/113/51 67/112/51 72/118/51 71/119/51 +f 70/112/52 69/120/52 66/121/52 65/118/52 +f 70/122/53 65/110/53 68/113/53 71/123/53 +f 66/111/54 69/114/54 72/117/54 67/112/54 +o CrucibleLeg2 +v -0.682350 0.837500 0.913320 +v -0.740093 0.837500 0.889403 +v -0.740093 0.962500 0.889403 +v -0.682350 0.962500 0.913320 +v -0.764011 0.837500 0.947145 +v -0.706268 0.837500 0.971063 +v -0.706268 0.962500 0.971063 +v -0.764011 0.962500 0.947145 +vt 0.007813 0.828125 +vt 0.015625 0.828125 +vt 0.015625 0.843750 +vt 0.007813 0.843750 +vt 0.023438 0.828125 +vt 0.031250 0.828125 +vt 0.031250 0.843750 +vt 0.023438 0.843750 +vt 0.015625 0.851563 +vt 0.007813 0.851563 +vt 0.023438 0.851563 +vt 0.000000 0.828125 +vt 0.000000 0.843750 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 0.000000 0.923900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 73/124/55 74/125/55 75/126/55 76/127/55 +f 77/128/56 78/129/56 79/130/56 80/131/56 +f 76/127/57 75/126/57 80/132/57 79/133/57 +f 78/126/58 77/131/58 74/134/58 73/132/58 +f 78/135/59 73/124/59 76/127/59 79/136/59 +f 74/125/60 77/128/60 80/131/60 75/126/60 +o Jar2 +v 0.897748 0.837500 0.809359 +v 0.765165 0.837500 0.676777 +v 0.765165 1.150000 0.676777 +v 0.897748 1.150000 0.809359 +v 0.632583 0.837500 0.809359 +v 0.765165 0.837500 0.941942 +v 0.765165 1.150000 0.941942 +v 0.632583 1.150000 0.809359 +vt 0.023438 0.312500 +vt 0.046875 0.312500 +vt 0.046875 0.351563 +vt 0.023438 0.351563 +vt 0.070313 0.312500 +vt 0.093750 0.312500 +vt 0.093750 0.351563 +vt 0.070313 0.351563 +vt 0.046875 0.375000 +vt 0.023438 0.375000 +vt 0.070313 0.375000 +vt 0.000000 0.312500 +vt 0.000000 0.351563 +vn 0.707100 0.000000 -0.707100 +vn -0.707100 -0.000000 0.707100 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 0.707100 0.000000 0.707100 +vn -0.707100 0.000000 -0.707100 +usemtl None +#s off +f 81/137/61 82/138/61 83/139/61 84/140/61 +f 85/141/62 86/142/62 87/143/62 88/144/62 +f 84/140/63 83/139/63 88/145/63 87/146/63 +f 86/139/64 85/144/64 82/147/64 81/145/64 +f 86/148/65 81/137/65 84/140/65 87/149/65 +f 82/138/66 85/141/66 88/144/66 83/139/66 +o Jar3 +v 0.546330 0.837500 0.810056 +v 0.365219 0.837500 0.761527 +v 0.365219 1.212500 0.761527 +v 0.546330 1.212500 0.810056 +v 0.316691 0.837500 0.942639 +v 0.497802 0.837500 0.991167 +v 0.497802 1.212500 0.991167 +v 0.316691 1.212500 0.942639 +vt 0.023438 0.179688 +vt 0.046875 0.179688 +vt 0.046875 0.226563 +vt 0.023438 0.226563 +vt 0.070313 0.179688 +vt 0.093750 0.179688 +vt 0.093750 0.226563 +vt 0.070313 0.226563 +vt 0.046875 0.250000 +vt 0.023438 0.250000 +vt 0.070313 0.250000 +vt 0.000000 0.179688 +vt 0.000000 0.226563 +vn 0.258800 0.000000 -0.965900 +vn -0.258800 -0.000000 0.965900 +vn -0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.965900 0.000000 0.258800 +vn -0.965900 0.000000 -0.258800 +usemtl None +#s off +f 89/150/67 90/151/67 91/152/67 92/153/67 +f 93/154/68 94/155/68 95/156/68 96/157/68 +f 92/153/69 91/152/69 96/158/69 95/159/69 +f 94/152/70 93/157/70 90/160/70 89/158/70 +f 94/161/71 89/150/71 92/153/71 95/162/71 +f 90/151/72 93/154/72 96/157/72 91/152/72 +o BeamCore +v 0.843750 0.306250 0.468750 +v -0.843750 0.306250 0.468750 +v -0.843750 0.368750 0.468750 +v 0.843750 0.368750 0.468750 +v -0.843750 0.306250 0.531250 +v 0.843750 0.306250 0.531250 +v 0.843750 0.368750 0.531250 +v -0.843750 0.368750 0.531250 +vt 0.007813 0.476563 +vt 0.218750 0.476563 +vt 0.218750 0.484375 +vt 0.007813 0.484375 +vt 0.226563 0.476563 +vt 0.437500 0.476563 +vt 0.437500 0.484375 +vt 0.226563 0.484375 +vt 0.218750 0.492188 +vt 0.007813 0.492188 +vt 0.429688 0.484375 +vt 0.429688 0.492188 +vt 0.000000 0.476563 +vt 0.000000 0.484375 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +usemtl None +#s off +f 97/163/73 98/164/73 99/165/73 100/166/73 +f 101/167/74 102/168/74 103/169/74 104/170/74 +f 100/166/75 99/165/75 104/171/75 103/172/75 +f 102/165/76 101/173/76 98/174/76 97/171/76 +f 102/175/77 97/163/77 100/166/77 103/176/77 +f 98/164/78 101/167/78 104/170/78 99/165/78 +o CrucibleSide1 +v -0.682350 0.962500 0.913320 +v -0.971063 0.962500 0.793732 +v -0.971063 1.025000 0.793732 +v -0.682350 1.025000 0.913320 +v -0.994980 0.962500 0.851474 +v -0.706268 0.962500 0.971063 +v -0.706268 1.025000 0.971063 +v -0.994980 1.025000 0.851474 +vt 0.007813 0.765625 +vt 0.046875 0.765625 +vt 0.046875 0.773438 +vt 0.007813 0.773438 +vt 0.054688 0.765625 +vt 0.093750 0.765625 +vt 0.093750 0.773438 +vt 0.054688 0.773438 +vt 0.046875 0.781250 +vt 0.007813 0.781250 +vt 0.085938 0.773438 +vt 0.085938 0.781250 +vt 0.000000 0.765625 +vt 0.000000 0.773438 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 0.000000 0.923900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 105/177/79 106/178/79 107/179/79 108/180/79 +f 109/181/80 110/182/80 111/183/80 112/184/80 +f 108/180/81 107/179/81 112/185/81 111/186/81 +f 110/179/82 109/187/82 106/188/82 105/185/82 +f 110/189/83 105/177/83 108/180/83 111/190/83 +f 106/178/84 109/181/84 112/184/84 107/179/84 +o JarContent3 +v 0.508057 0.868750 0.832153 +v 0.387316 0.868750 0.799801 +v 0.387316 1.181250 0.799801 +v 0.508057 1.181250 0.832153 +v 0.354964 0.868750 0.920541 +v 0.475705 0.868750 0.952894 +v 0.475705 1.181250 0.952894 +v 0.354964 1.181250 0.920541 +vt 0.117188 0.179688 +vt 0.132813 0.179688 +vt 0.132813 0.218750 +vt 0.117188 0.218750 +vt 0.148438 0.179688 +vt 0.164063 0.179688 +vt 0.164063 0.218750 +vt 0.148438 0.218750 +vt 0.132813 0.234375 +vt 0.117188 0.234375 +vt 0.148438 0.234375 +vt 0.101563 0.179688 +vt 0.101563 0.218750 +vn 0.258800 0.000000 -0.965900 +vn -0.258800 -0.000000 0.965900 +vn -0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 0.965900 0.000000 0.258800 +vn -0.965900 0.000000 -0.258800 +usemtl None +#s off +f 113/191/85 114/192/85 115/193/85 116/194/85 +f 117/195/86 118/196/86 119/197/86 120/198/86 +f 116/194/87 115/193/87 120/199/87 119/200/87 +f 118/193/88 117/198/88 114/201/88 113/199/88 +f 118/202/89 113/191/89 116/194/89 119/203/89 +f 114/192/90 117/195/90 120/198/90 115/193/90 +o CrucibleLeg4 +v -0.817649 0.837500 0.586680 +v -0.875392 0.837500 0.562762 +v -0.875392 0.962500 0.562762 +v -0.817649 0.962500 0.586680 +v -0.899310 0.837500 0.620504 +v -0.841567 0.837500 0.644422 +v -0.841567 0.962500 0.644422 +v -0.899310 0.962500 0.620504 +vt 0.007813 0.828125 +vt 0.015625 0.828125 +vt 0.015625 0.843750 +vt 0.007813 0.843750 +vt 0.023438 0.828125 +vt 0.031250 0.828125 +vt 0.031250 0.843750 +vt 0.023438 0.843750 +vt 0.015625 0.851563 +vt 0.007813 0.851563 +vt 0.023438 0.851563 +vt 0.000000 0.828125 +vt 0.000000 0.843750 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 0.000000 0.923900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 121/204/91 122/205/91 123/206/91 124/207/91 +f 125/208/92 126/209/92 127/210/92 128/211/92 +f 124/207/93 123/206/93 128/212/93 127/213/93 +f 126/206/94 125/211/94 122/214/94 121/212/94 +f 126/215/95 121/204/95 124/207/95 127/216/95 +f 122/205/96 125/208/96 128/211/96 123/206/96 +o Carpet2 +v -0.968750 0.524375 0.250000 +v -1.031250 0.524375 0.250000 +v -1.031250 0.836875 0.250000 +v -0.968750 0.836875 0.250000 +v -1.031250 0.524375 0.750000 +v -0.968750 0.524375 0.750000 +v -0.968750 0.836875 0.750000 +v -1.031250 0.836875 0.750000 +vt 0.695313 0.750000 +vt 0.703125 0.750000 +vt 0.703125 0.789063 +vt 0.695313 0.789063 +vt 0.765625 0.750000 +vt 0.773438 0.750000 +vt 0.773438 0.789063 +vt 0.765625 0.789063 +vt 0.703125 0.851563 +vt 0.695313 0.851563 +vt 0.710938 0.789063 +vt 0.710938 0.851563 +vt 0.632813 0.750000 +vt 0.632813 0.789063 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 -0.000000 0.000000 +usemtl None +#s off +f 129/217/97 130/218/97 131/219/97 132/220/97 +f 133/221/98 134/222/98 135/223/98 136/224/98 +f 132/220/99 131/219/99 136/225/99 135/226/99 +f 134/219/100 133/227/100 130/228/100 129/225/100 +f 134/229/101 129/217/101 132/220/101 135/230/101 +f 130/218/102 133/221/102 136/224/102 131/219/102 +o CrucibleLeg1 +v -0.913320 0.837500 0.817650 +v -0.971063 0.837500 0.793732 +v -0.971063 0.962500 0.793732 +v -0.913320 0.962500 0.817650 +v -0.994980 0.837500 0.851474 +v -0.937238 0.837500 0.875392 +v -0.937238 0.962500 0.875392 +v -0.994980 0.962500 0.851474 +vt 0.007813 0.828125 +vt 0.015625 0.828125 +vt 0.015625 0.843750 +vt 0.007813 0.843750 +vt 0.023438 0.828125 +vt 0.031250 0.828125 +vt 0.031250 0.843750 +vt 0.023438 0.843750 +vt 0.015625 0.851563 +vt 0.007813 0.851563 +vt 0.023438 0.851563 +vt 0.000000 0.828125 +vt 0.000000 0.843750 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 0.000000 0.923900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 137/231/103 138/232/103 139/233/103 140/234/103 +f 141/235/104 142/236/104 143/237/104 144/238/104 +f 140/234/105 139/233/105 144/239/105 143/240/105 +f 142/233/106 141/238/106 138/241/106 137/239/106 +f 142/242/107 137/231/107 140/234/107 143/243/107 +f 138/232/108 141/235/108 144/238/108 139/233/108 +o Top +v 1.000000 0.587500 0.000000 +v -1.000000 0.587500 0.000000 +v -1.000000 0.837500 0.000000 +v 1.000000 0.837500 0.000000 +v -1.000000 0.587500 1.000000 +v 1.000000 0.587500 1.000000 +v 1.000000 0.837500 1.000000 +v -1.000000 0.837500 1.000000 +vt 0.125000 0.695313 +vt 0.375000 0.695313 +vt 0.375000 0.726563 +vt 0.125000 0.726563 +vt 0.500000 0.695313 +vt 0.750000 0.695313 +vt 0.750000 0.726563 +vt 0.500000 0.726563 +vt 0.375000 0.851563 +vt 0.125000 0.851563 +vt 0.625000 0.726563 +vt 0.625000 0.851563 +vt 0.000000 0.695313 +vt 0.000000 0.726563 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 -0.000000 0.000000 +vn -1.000000 -0.000000 0.000000 +usemtl None +#s off +f 145/244/109 146/245/109 147/246/109 148/247/109 +f 149/248/110 150/249/110 151/250/110 152/251/110 +f 148/247/111 147/246/111 152/252/111 151/253/111 +f 150/246/112 149/254/112 146/255/112 145/252/112 +f 150/256/113 145/244/113 148/247/113 151/257/113 +f 146/245/114 149/248/114 152/251/114 147/246/114 +o Pillar2 +v -0.309500 -0.007739 0.312500 +v -0.674888 0.076617 0.312500 +v -0.534294 0.685599 0.312500 +v -0.168905 0.601242 0.312500 +v -0.674888 0.076617 0.687500 +v -0.309500 -0.007739 0.687500 +v -0.168905 0.601242 0.687500 +v -0.534294 0.685599 0.687500 +vt 0.046875 0.562500 +vt 0.093750 0.562500 +vt 0.093750 0.640625 +vt 0.046875 0.640625 +vt 0.140625 0.562500 +vt 0.187500 0.562500 +vt 0.187500 0.640625 +vt 0.140625 0.640625 +vt 0.093750 0.687500 +vt 0.046875 0.687500 +vt 0.140625 0.687500 +vt 0.000000 0.562500 +vt 0.000000 0.640625 +vn -0.000000 0.000000 -1.000000 +vn -0.000000 -0.000000 1.000000 +vn 0.225000 0.974400 0.000000 +vn -0.224900 -0.974400 -0.000000 +vn 0.974400 -0.225000 -0.000000 +vn -0.974400 0.225000 0.000000 +usemtl None +#s off +f 153/258/115 154/259/115 155/260/115 156/261/115 +f 157/262/116 158/263/116 159/264/116 160/265/116 +f 156/261/117 155/260/117 160/266/117 159/267/117 +f 158/260/118 157/265/118 154/268/118 153/266/118 +f 158/269/119 153/258/119 156/261/119 159/270/119 +f 154/259/120 157/262/120 160/265/120 155/260/120 +o Jar1 +v 0.920663 0.837500 0.377225 +v 0.737969 0.837500 0.419403 +v 0.737969 1.087500 0.419403 +v 0.920663 1.087500 0.377225 +v 0.780147 0.837500 0.602097 +v 0.962842 0.837500 0.559919 +v 0.962842 1.087500 0.559919 +v 0.780147 1.087500 0.602097 +vt 0.023438 0.406250 +vt 0.046875 0.406250 +vt 0.046875 0.437500 +vt 0.023438 0.437500 +vt 0.070313 0.406250 +vt 0.093750 0.406250 +vt 0.093750 0.437500 +vt 0.070313 0.437500 +vt 0.046875 0.460938 +vt 0.023438 0.460938 +vt 0.070313 0.460938 +vt 0.000000 0.406250 +vt 0.000000 0.437500 +vn -0.224900 0.000000 -0.974400 +vn 0.224900 -0.000000 0.974400 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.974400 0.000000 -0.225000 +vn -0.974400 0.000000 0.224900 +usemtl None +#s off +f 161/271/121 162/272/121 163/273/121 164/274/121 +f 165/275/122 166/276/122 167/277/122 168/278/122 +f 164/274/123 163/273/123 168/279/123 167/280/123 +f 166/273/124 165/278/124 162/281/124 161/279/124 +f 166/282/125 161/271/125 164/274/125 167/283/125 +f 162/272/126 165/275/126 168/278/126 163/273/126 +o Carpet1 +v 1.031250 0.524375 0.250000 +v 0.968750 0.524375 0.250000 +v 0.968750 0.836875 0.250000 +v 1.031250 0.836875 0.250000 +v 0.968750 0.524375 0.750000 +v 1.031250 0.524375 0.750000 +v 1.031250 0.836875 0.750000 +v 0.968750 0.836875 0.750000 +vt 0.695313 0.750000 +vt 0.703125 0.750000 +vt 0.703125 0.789063 +vt 0.695313 0.789063 +vt 0.765625 0.750000 +vt 0.773438 0.750000 +vt 0.773438 0.789063 +vt 0.765625 0.789063 +vt 0.703125 0.851563 +vt 0.695313 0.851563 +vt 0.710938 0.789063 +vt 0.710938 0.851563 +vt 0.632813 0.750000 +vt 0.632813 0.789063 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 -0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +usemtl None +#s off +f 169/284/127 170/285/127 171/286/127 172/287/127 +f 173/288/128 174/289/128 175/290/128 176/291/128 +f 172/287/129 171/286/129 176/292/129 175/293/129 +f 174/286/130 173/294/130 170/295/130 169/292/130 +f 174/296/131 169/284/131 172/287/131 175/297/131 +f 170/285/132 173/288/132 176/291/132 171/286/132 +o CrucibleJarContent +v -0.709170 0.962500 0.733088 +v -0.824655 0.962500 0.685252 +v -0.824655 1.275000 0.685252 +v -0.709170 1.275000 0.733088 +v -0.872490 0.962500 0.800737 +v -0.757005 0.962500 0.848573 +v -0.757005 1.275000 0.848573 +v -0.872490 1.275000 0.800737 +vt 0.304688 0.179688 +vt 0.320313 0.179688 +vt 0.320313 0.218750 +vt 0.304688 0.218750 +vt 0.335938 0.179688 +vt 0.351563 0.179688 +vt 0.351563 0.218750 +vt 0.335938 0.218750 +vt 0.320313 0.234375 +vt 0.304688 0.234375 +vt 0.335938 0.234375 +vt 0.289063 0.179688 +vt 0.289063 0.218750 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 -0.000000 0.923900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 177/298/133 178/299/133 179/300/133 180/301/133 +f 181/302/134 182/303/134 183/304/134 184/305/134 +f 180/301/135 179/300/135 184/306/135 183/307/135 +f 182/300/136 181/305/136 178/308/136 177/306/136 +f 182/309/137 177/298/137 180/301/137 183/310/137 +f 178/299/138 181/302/138 184/305/138 179/300/138 +o CarpetLow2 +v -0.992678 0.412246 0.250000 +v -1.054228 0.423099 0.250000 +v -1.032522 0.546200 0.250000 +v -0.970972 0.535347 0.250000 +v -1.054228 0.423099 0.750000 +v -0.992678 0.412246 0.750000 +v -0.970972 0.535347 0.750000 +v -1.032522 0.546200 0.750000 +vt 0.843750 0.757813 +vt 0.851563 0.757813 +vt 0.851563 0.773438 +vt 0.843750 0.773438 +vt 0.914063 0.757813 +vt 0.921875 0.757813 +vt 0.921875 0.773438 +vt 0.914063 0.773438 +vt 0.851563 0.835938 +vt 0.843750 0.835938 +vt 0.859375 0.773438 +vt 0.859375 0.835938 +vt 0.781250 0.757813 +vt 0.781250 0.773438 +vn 0.000000 0.000000 -1.000000 +vn -0.000000 -0.000000 1.000000 +vn 0.173600 0.984800 0.000000 +vn -0.173600 -0.984800 -0.000000 +vn 0.984800 -0.173600 -0.000000 +vn -0.984800 0.173600 0.000000 +usemtl None +#s off +f 185/311/139 186/312/139 187/313/139 188/314/139 +f 189/315/140 190/316/140 191/317/140 192/318/140 +f 188/314/141 187/313/141 192/319/141 191/320/141 +f 190/313/142 189/321/142 186/322/142 185/319/142 +f 190/323/143 185/311/143 188/314/143 191/324/143 +f 186/312/144 189/315/144 192/318/144 187/313/144 +o CrucibleJar +v -0.668340 0.925000 0.716175 +v -0.841567 0.925000 0.644422 +v -0.841567 1.300000 0.644422 +v -0.668340 1.300000 0.716175 +v -0.913320 0.925000 0.817650 +v -0.740093 0.925000 0.889403 +v -0.740093 1.300000 0.889403 +v -0.913320 1.300000 0.817650 +vt 0.203125 0.179688 +vt 0.226563 0.179688 +vt 0.226563 0.226563 +vt 0.203125 0.226563 +vt 0.250000 0.179688 +vt 0.273438 0.179688 +vt 0.273438 0.226563 +vt 0.250000 0.226563 +vt 0.226563 0.250000 +vt 0.203125 0.250000 +vt 0.250000 0.250000 +vt 0.179688 0.179688 +vt 0.179688 0.226563 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 -0.000000 0.923900 +vn 0.000000 1.000000 -0.000000 +vn -0.000000 -1.000000 0.000000 +vn 0.923900 -0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 193/325/145 194/326/145 195/327/145 196/328/145 +f 197/329/146 198/330/146 199/331/146 200/332/146 +f 196/328/147 195/327/147 200/333/147 199/334/147 +f 198/327/148 197/332/148 194/335/148 193/333/148 +f 198/336/149 193/325/149 196/328/149 199/337/149 +f 194/326/150 197/329/150 200/332/150 195/327/150 +o DecanterContent +v -0.147097 0.868750 0.757023 +v -0.267838 0.868750 0.789376 +v -0.267838 0.993750 0.789376 +v -0.147097 0.993750 0.757023 +v -0.235485 0.868750 0.910116 +v -0.114745 0.868750 0.877764 +v -0.114745 0.993750 0.877764 +v -0.235485 0.993750 0.910116 +vt 0.117188 0.015625 +vt 0.132813 0.015625 +vt 0.132813 0.031250 +vt 0.117188 0.031250 +vt 0.148438 0.015625 +vt 0.164063 0.015625 +vt 0.164063 0.031250 +vt 0.148438 0.031250 +vt 0.132813 0.046875 +vt 0.117188 0.046875 +vt 0.148438 0.046875 +vt 0.101563 0.015625 +vt 0.101563 0.031250 +vn -0.258800 0.000000 -0.965900 +vn 0.258800 0.000000 0.965900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.965900 0.000000 -0.258800 +vn -0.965900 0.000000 0.258800 +usemtl None +#s off +f 201/338/151 202/339/151 203/340/151 204/341/151 +f 205/342/152 206/343/152 207/344/152 208/345/152 +f 204/341/153 203/340/153 208/346/153 207/347/153 +f 206/340/154 205/345/154 202/348/154 201/346/154 +f 206/349/155 201/338/155 204/341/155 207/350/155 +f 202/339/156 205/342/156 208/345/156 203/340/156 +o Pillar1 +v 0.674888 0.076617 0.312500 +v 0.309499 -0.007739 0.312500 +v 0.168905 0.601242 0.312500 +v 0.534294 0.685598 0.312500 +v 0.309499 -0.007739 0.687500 +v 0.674888 0.076617 0.687500 +v 0.534294 0.685598 0.687500 +v 0.168905 0.601242 0.687500 +vt 0.046875 0.562500 +vt 0.093750 0.562500 +vt 0.093750 0.640625 +vt 0.046875 0.640625 +vt 0.140625 0.562500 +vt 0.187500 0.562500 +vt 0.187500 0.640625 +vt 0.140625 0.640625 +vt 0.093750 0.687500 +vt 0.046875 0.687500 +vt 0.140625 0.687500 +vt 0.000000 0.562500 +vt 0.000000 0.640625 +vn -0.000000 0.000000 -1.000000 +vn -0.000000 -0.000000 1.000000 +vn -0.224900 0.974400 0.000000 +vn 0.224900 -0.974400 -0.000000 +vn 0.974400 0.225000 0.000000 +vn -0.974400 -0.225000 -0.000000 +usemtl None +#s off +f 209/351/157 210/352/157 211/353/157 212/354/157 +f 213/355/158 214/356/158 215/357/158 216/358/158 +f 212/354/159 211/353/159 216/359/159 215/360/159 +f 214/353/160 213/358/160 210/361/160 209/359/160 +f 214/362/161 209/351/161 212/354/161 215/363/161 +f 210/352/162 213/355/162 216/358/162 211/353/162 +o CrucibleSide4 +v -0.841567 0.962500 0.644422 +v -0.899310 0.962500 0.620504 +v -0.899310 1.025000 0.620504 +v -0.841567 1.025000 0.644422 +v -0.971063 0.962500 0.793732 +v -0.913320 0.962500 0.817650 +v -0.913320 1.025000 0.817650 +v -0.971063 1.025000 0.793732 +vt 0.078125 0.796875 +vt 0.085938 0.796875 +vt 0.085938 0.804688 +vt 0.078125 0.804688 +vt 0.109375 0.796875 +vt 0.117188 0.796875 +vt 0.117188 0.804688 +vt 0.109375 0.804688 +vt 0.085938 0.828125 +vt 0.078125 0.828125 +vt 0.093750 0.804688 +vt 0.093750 0.828125 +vt 0.054688 0.796875 +vt 0.054688 0.804688 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 -0.000000 0.923900 +vn 0.000000 1.000000 -0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 217/364/163 218/365/163 219/366/163 220/367/163 +f 221/368/164 222/369/164 223/370/164 224/371/164 +f 220/367/165 219/366/165 224/372/165 223/373/165 +f 222/366/166 221/374/166 218/375/166 217/372/166 +f 222/376/167 217/364/167 220/367/167 223/377/167 +f 218/365/168 221/368/168 224/371/168 219/366/168 +o JarContent2 +v 0.853553 0.868750 0.809359 +v 0.765165 0.868750 0.720971 +v 0.765165 1.118750 0.720971 +v 0.853553 1.118750 0.809359 +v 0.676777 0.868750 0.809359 +v 0.765165 0.868750 0.897748 +v 0.765165 1.118750 0.897748 +v 0.676777 1.118750 0.809359 +vt 0.117188 0.312500 +vt 0.132813 0.312500 +vt 0.132813 0.343750 +vt 0.117188 0.343750 +vt 0.148438 0.312500 +vt 0.164063 0.312500 +vt 0.164063 0.343750 +vt 0.148438 0.343750 +vt 0.132813 0.359375 +vt 0.117188 0.359375 +vt 0.148438 0.359375 +vt 0.101563 0.312500 +vt 0.101563 0.343750 +vn 0.707100 0.000000 -0.707100 +vn -0.707100 0.000000 0.707100 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.707100 0.000000 0.707100 +vn -0.707100 0.000000 -0.707100 +usemtl None +#s off +f 225/378/169 226/379/169 227/380/169 228/381/169 +f 229/382/170 230/383/170 231/384/170 232/385/170 +f 228/381/171 227/380/171 232/386/171 231/387/171 +f 230/380/172 229/385/172 226/388/172 225/386/172 +f 230/389/173 225/378/173 228/381/173 231/390/173 +f 226/379/174 229/382/174 232/385/174 227/380/174 +o CarpetLowest1 +v 1.113075 0.330031 0.250000 +v 1.057387 0.301657 0.250000 +v 1.000638 0.413033 0.250000 +v 1.056326 0.441407 0.250000 +v 1.057387 0.301657 0.750000 +v 1.113075 0.330031 0.750000 +v 1.056326 0.441407 0.750000 +v 1.000638 0.413033 0.750000 +vt 0.843750 0.664063 +vt 0.851563 0.664063 +vt 0.851563 0.679688 +vt 0.843750 0.679688 +vt 0.914063 0.664063 +vt 0.921875 0.664063 +vt 0.921875 0.679688 +vt 0.914063 0.679688 +vt 0.851563 0.742188 +vt 0.843750 0.742188 +vt 0.859375 0.679688 +vt 0.859375 0.742188 +vt 0.781250 0.664063 +vt 0.781250 0.679688 +vn -0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn -0.454000 0.891000 0.000000 +vn 0.454000 -0.891000 -0.000000 +vn 0.891000 0.454000 0.000000 +vn -0.891000 -0.454000 -0.000000 +usemtl None +#s off +f 233/391/175 234/392/175 235/393/175 236/394/175 +f 237/395/176 238/396/176 239/397/176 240/398/176 +f 236/394/177 235/393/177 240/399/177 239/400/177 +f 238/393/178 237/401/178 234/402/178 233/399/178 +f 238/403/179 233/391/179 236/394/179 239/404/179 +f 234/392/180 237/395/180 240/398/180 235/393/180 +o Decanter3 +v -0.220741 1.087500 0.813602 +v -0.401852 1.087500 0.862131 +v -0.401852 1.150000 0.862131 +v -0.220741 1.150000 0.813602 +v -0.385676 1.087500 0.922501 +v -0.204564 1.087500 0.873973 +v -0.204564 1.150000 0.873973 +v -0.385676 1.150000 0.922501 +vt 0.007813 0.109375 +vt 0.031250 0.109375 +vt 0.031250 0.117188 +vt 0.007813 0.117188 +vt 0.039063 0.109375 +vt 0.062500 0.109375 +vt 0.062500 0.117188 +vt 0.039063 0.117188 +vt 0.031250 0.125000 +vt 0.007813 0.125000 +vt 0.054688 0.117188 +vt 0.054688 0.125000 +vt 0.000000 0.109375 +vt 0.000000 0.117188 +vn -0.258800 0.000000 -0.965900 +vn 0.258800 0.000000 0.965900 +vn 0.000000 1.000000 0.000000 +vn -0.000000 -1.000000 -0.000000 +vn 0.965900 0.000000 -0.258800 +vn -0.965900 0.000000 0.258800 +usemtl None +#s off +f 241/405/181 242/406/181 243/407/181 244/408/181 +f 245/409/182 246/410/182 247/411/182 248/412/182 +f 244/408/183 243/407/183 248/413/183 247/414/183 +f 246/407/184 245/415/184 242/416/184 241/413/184 +f 246/417/185 241/405/185 244/408/185 247/418/185 +f 242/406/186 245/409/186 248/412/186 243/407/186 +o CrucibleSide3 +v -0.610597 0.962500 0.740093 +v -0.668340 0.962500 0.716175 +v -0.668340 1.025000 0.716175 +v -0.610597 1.025000 0.740093 +v -0.740093 0.962500 0.889403 +v -0.682350 0.962500 0.913320 +v -0.682350 1.025000 0.913320 +v -0.740093 1.025000 0.889403 +vt 0.078125 0.796875 +vt 0.085938 0.796875 +vt 0.085938 0.804688 +vt 0.078125 0.804688 +vt 0.109375 0.796875 +vt 0.117188 0.796875 +vt 0.117188 0.804688 +vt 0.109375 0.804688 +vt 0.085938 0.828125 +vt 0.078125 0.828125 +vt 0.093750 0.804688 +vt 0.093750 0.828125 +vt 0.054688 0.796875 +vt 0.054688 0.804688 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 -0.000000 0.923900 +vn -0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 249/419/187 250/420/187 251/421/187 252/422/187 +f 253/423/188 254/424/188 255/425/188 256/426/188 +f 252/422/189 251/421/189 256/427/189 255/428/189 +f 254/421/190 253/429/190 250/430/190 249/427/190 +f 254/431/191 249/419/191 252/422/191 255/432/191 +f 250/420/192 253/423/192 256/426/192 251/421/192 +o Recipe +v 0.746155 0.846250 0.501083 +v 0.490214 0.846250 0.775162 +v 0.216135 0.846250 0.519221 +v 0.472076 0.846250 0.245142 +vt 0.046875 0.953125 +vt 0.093750 0.953125 +vt 0.093750 1.000000 +vt 0.046875 1.000000 +vn 0.000000 1.000000 -0.000000 +usemtl None +#s off +f 260/433/193 259/434/193 258/435/193 257/436/193 +o CrucibleSide2 +v -0.586680 0.962500 0.682350 +v -0.875392 0.962500 0.562762 +v -0.875392 1.025000 0.562762 +v -0.586680 1.025000 0.682350 +v -0.899310 0.962500 0.620504 +v -0.610597 0.962500 0.740093 +v -0.610597 1.025000 0.740093 +v -0.899310 1.025000 0.620504 +vt 0.007813 0.765625 +vt 0.046875 0.765625 +vt 0.046875 0.773438 +vt 0.007813 0.773438 +vt 0.054688 0.765625 +vt 0.093750 0.765625 +vt 0.093750 0.773438 +vt 0.054688 0.773438 +vt 0.046875 0.781250 +vt 0.007813 0.781250 +vt 0.085938 0.773438 +vt 0.085938 0.781250 +vt 0.000000 0.765625 +vt 0.000000 0.773438 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 0.000000 0.923900 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 261/437/194 262/438/194 263/439/194 264/440/194 +f 265/441/195 266/442/195 267/443/195 268/444/195 +f 264/440/196 263/439/196 268/445/196 267/446/196 +f 266/439/197 265/447/197 262/448/197 261/445/197 +f 266/449/198 261/437/198 264/440/198 267/450/198 +f 262/438/199 265/441/199 268/444/199 263/439/199 +o CrucibleLeg3 +v -0.586680 0.837500 0.682350 +v -0.644422 0.837500 0.658433 +v -0.644422 0.962500 0.658433 +v -0.586680 0.962500 0.682350 +v -0.668340 0.837500 0.716175 +v -0.610597 0.837500 0.740093 +v -0.610597 0.962500 0.740093 +v -0.668340 0.962500 0.716175 +vt 0.007813 0.828125 +vt 0.015625 0.828125 +vt 0.015625 0.843750 +vt 0.007813 0.843750 +vt 0.023438 0.828125 +vt 0.031250 0.828125 +vt 0.031250 0.843750 +vt 0.023438 0.843750 +vt 0.015625 0.851563 +vt 0.007813 0.851563 +vt 0.023438 0.851563 +vt 0.000000 0.828125 +vt 0.000000 0.843750 +vn 0.382700 0.000000 -0.923900 +vn -0.382700 -0.000000 0.923900 +vn -0.000000 1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.923900 -0.000000 0.382700 +vn -0.923900 0.000000 -0.382700 +usemtl None +#s off +f 269/451/200 270/452/200 271/453/200 272/454/200 +f 273/455/201 274/456/201 275/457/201 276/458/201 +f 272/454/202 271/453/202 276/459/202 275/460/202 +f 274/453/203 273/458/203 270/461/203 269/459/203 +f 274/462/204 269/451/204 272/454/204 275/463/204 +f 270/452/205 273/455/205 276/458/205 271/453/205 diff --git a/src/main/resources/assets/bloodmagic/models/block/nothing.json b/src/main/resources/assets/bloodmagic/models/block/nothing.json new file mode 100644 index 00000000..0e0dcd23 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/nothing.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/opaquemimic.json b/src/main/resources/assets/bloodmagic/models/block/opaquemimic.json new file mode 100644 index 00000000..2b819ba0 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/opaquemimic.json @@ -0,0 +1,3 @@ +{ + "loader": "bloodmagic:mimicloader" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeBase.mtl b/src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodebase.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeBase.mtl rename to src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodebase.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeBase.obj b/src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodebase.obj similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeBase.obj rename to src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodebase.obj diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeCore.mtl b/src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodecore.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeCore.mtl rename to src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodecore.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeCore.obj b/src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodecore.obj similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelMasterRoutingNodeCore.obj rename to src/main/resources/assets/bloodmagic/models/block/routing/modelmasterroutingnodecore.obj diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeBase.mtl b/src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodebase.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeBase.mtl rename to src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodebase.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeBase.obj b/src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodebase.obj similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeBase.obj rename to src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodebase.obj diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeCore.mtl b/src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodecore.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeCore.mtl rename to src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodecore.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeCore.obj b/src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodecore.obj similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/ModelRoutingNodeCore.obj rename to src/main/resources/assets/bloodmagic/models/block/routing/modelroutingnodecore.obj diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/OutputRoutingNodeCore.json b/src/main/resources/assets/bloodmagic/models/block/routing/outputroutingnodecore.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/OutputRoutingNodeCore.json rename to src/main/resources/assets/bloodmagic/models/block/routing/outputroutingnodecore.json diff --git a/src/main/resources/assets/bloodmagic/models/block/routing/RoutingNodeBase.json b/src/main/resources/assets/bloodmagic/models/block/routing/routingnodebase.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/routing/RoutingNodeBase.json rename to src/main/resources/assets/bloodmagic/models/block/routing/routingnodebase.json diff --git a/src/main/resources/assets/bloodmagic/models/block/soulforge.json b/src/main/resources/assets/bloodmagic/models/block/soulforge.json new file mode 100644 index 00000000..6aa32fd9 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/soulforge.json @@ -0,0 +1,10 @@ +{ + "parent": "block/block", + "loader": "forge:obj", + "flip-v": true, + "model": "bloodmagic:models/block/blockhellfireforge.obj", + "textures": { + "default": "bloodmagic:models/hellfireforge", + "particle": "#default" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/BlockAltar.mtl b/src/main/resources/assets/bloodmagic/models/block/sub/blockaltar.mtl similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/sub/BlockAltar.mtl rename to src/main/resources/assets/bloodmagic/models/block/sub/blockaltar.mtl diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/BlockAltar.obj b/src/main/resources/assets/bloodmagic/models/block/sub/blockaltar.obj similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/sub/BlockAltar.obj rename to src/main/resources/assets/bloodmagic/models/block/sub/blockaltar.obj diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/BlockSoulForge.json b/src/main/resources/assets/bloodmagic/models/block/sub/blocksoulforge.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/sub/BlockSoulForge.json rename to src/main/resources/assets/bloodmagic/models/block/sub/blocksoulforge.json diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/BlockSpellModifierCore.json b/src/main/resources/assets/bloodmagic/models/block/sub/blockspellmodifiercore.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/sub/BlockSpellModifierCore.json rename to src/main/resources/assets/bloodmagic/models/block/sub/blockspellmodifiercore.json diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/BlockSpellModifierInput.json b/src/main/resources/assets/bloodmagic/models/block/sub/blockspellmodifierinput.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/sub/BlockSpellModifierInput.json rename to src/main/resources/assets/bloodmagic/models/block/sub/blockspellmodifierinput.json diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/BlockSpellModifierOutput.json b/src/main/resources/assets/bloodmagic/models/block/sub/blockspellmodifieroutput.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/block/sub/BlockSpellModifierOutput.json rename to src/main/resources/assets/bloodmagic/models/block/sub/blockspellmodifieroutput.json diff --git a/src/main/resources/assets/bloodmagic/models/block/sub/shaped_charge.json b/src/main/resources/assets/bloodmagic/models/block/sub/shaped_charge.json new file mode 100644 index 00000000..28ae6a06 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/block/sub/shaped_charge.json @@ -0,0 +1,136 @@ +{ + "parent": "block/block", + "credit": "Made with Blockbench", + "textures": { + "1": "dungeon_tile", + "3": "dungeon_stone", + "4": "blankrune", + "5": "largebloodstonebrick", + "6": "defaultcrystal", + "particle": "dungeon_stone" + }, + "elements": [ + { + "name": "base", + "from": [2, 0, 2], + "to": [14, 2, 14], + "faces": { + "north": {"uv": [0, 6, 10, 8], "texture": "#3"}, + "east": {"uv": [0, 6, 10, 8], "texture": "#3"}, + "south": {"uv": [0, 6, 10, 8], "texture": "#3"}, + "west": {"uv": [6, 14, 16, 16], "texture": "#3"}, + "up": {"uv": [10, 10, 0, 0], "texture": "#3"}, + "down": {"uv": [10, 0, 0, 10], "texture": "#3"} + } + }, + { + "name": "core", + "from": [4, 2, 4], + "to": [12, 5, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 9, 13]}, + "faces": { + "north": {"uv": [4, 5, 12, 8], "texture": "#6"}, + "east": {"uv": [4, 5, 12, 8], "texture": "#6"}, + "south": {"uv": [4, 5, 12, 8], "texture": "#6"}, + "west": {"uv": [4, 5, 12, 8], "texture": "#6"}, + "up": {"uv": [4, 4, 12, 12], "texture": "#6"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#6"} + } + }, + { + "name": "casing1", + "from": [7, 2, 3], + "to": [9, 6, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 10, 11]}, + "faces": { + "north": {"uv": [0, 0, 2, 4], "texture": "#5"}, + "east": {"uv": [0, 0, 10, 4], "texture": "#5"}, + "south": {"uv": [0, 0, 2, 4], "texture": "#5"}, + "west": {"uv": [0, 0, 10, 4], "texture": "#5"}, + "up": {"uv": [0, 0, 2, 10], "texture": "#5"}, + "down": {"uv": [0, 0, 2, 10], "texture": "#5"} + } + }, + { + "name": "casing2", + "from": [3, 2, 7], + "to": [13, 6, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [11, 10, 15]}, + "faces": { + "north": {"uv": [0, 0, 10, 4], "texture": "#5"}, + "east": {"uv": [0, 0, 2, 4], "texture": "#5"}, + "south": {"uv": [0, 0, 10, 4], "texture": "#5"}, + "west": {"uv": [0, 0, 2, 4], "texture": "#5"}, + "up": {"uv": [0, 0, 10, 2], "texture": "#5"}, + "down": {"uv": [0, 0, 10, 2], "texture": "#5"} + } + }, + { + "from": [6, 5, 6], + "to": [10, 7, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 13, 14]}, + "faces": { + "north": {"uv": [0, 0, 4, 2], "texture": "#4"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#4"}, + "south": {"uv": [0, 0, 4, 2], "texture": "#4"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#4"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#4"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#4"} + } + }, + { + "name": "edge1", + "from": [3, 2, 3], + "to": [6, 3, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 8, 9]}, + "faces": { + "north": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "east": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "south": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "west": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "up": {"uv": [5, 5, 8, 8], "rotation": 180, "texture": "#1"}, + "down": {"uv": [5, 5, 8, 8], "rotation": 180, "texture": "#1"} + } + }, + { + "name": "edge2", + "from": [3, 2, 10], + "to": [6, 3, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 8, 16]}, + "faces": { + "north": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "east": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "south": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "west": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "up": {"uv": [5, 5, 8, 8], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 5, 8, 8], "rotation": 90, "texture": "#1"} + } + }, + { + "name": "edge3", + "from": [10, 2, 3], + "to": [13, 3, 6], + "faces": { + "north": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "east": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "south": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "west": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "up": {"uv": [5, 5, 8, 8], "rotation": 270, "texture": "#1"}, + "down": {"uv": [5, 5, 8, 8], "rotation": 270, "texture": "#1"} + } + }, + { + "name": "edge4", + "from": [10, 2, 10], + "to": [13, 3, 13], + "faces": { + "north": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "east": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "south": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "west": {"uv": [5, 7, 8, 8], "texture": "#1"}, + "up": {"uv": [5, 5, 8, 8], "texture": "#1"}, + "down": {"uv": [5, 6, 8, 9], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/bloodaltar-fixeUV.obj b/src/main/resources/assets/bloodmagic/models/bloodaltar-fixeuv.obj similarity index 100% rename from src/main/resources/assets/bloodmagic/models/bloodaltar-fixeUV.obj rename to src/main/resources/assets/bloodmagic/models/bloodaltar-fixeuv.obj diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockAlchemyArray.json b/src/main/resources/assets/bloodmagic/models/item/BlockAlchemyArray.json deleted file mode 100644 index 67c44a6e..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockAlchemyArray.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockAlchemyArray", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockBloodLight.json b/src/main/resources/assets/bloodmagic/models/item/BlockBloodLight.json deleted file mode 100644 index 68fd1bc5..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockBloodLight.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockBloodLight", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockDimensionalPortal.json b/src/main/resources/assets/bloodmagic/models/item/BlockDimensionalPortal.json deleted file mode 100644 index c342e9c0..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockDimensionalPortal.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockDimensionalPortal", - "display": { - "thirdperson": { - "rotation": [ - 10, - -45, - 170 - ], - "translation": [ - 0, - 1.5, - -2.75 - ], - "scale": [ - 0.375, - 0.375, - 0.375 - ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockPedestal0.json b/src/main/resources/assets/bloodmagic/models/item/BlockPedestal0.json deleted file mode 100644 index 7e9dac62..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockPedestal0.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockPedestal0", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockPedestal1.json b/src/main/resources/assets/bloodmagic/models/item/BlockPedestal1.json deleted file mode 100644 index f8f8a3a4..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockPedestal1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockPedestal1", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockPhantom.json b/src/main/resources/assets/bloodmagic/models/item/BlockPhantom.json deleted file mode 100644 index 106c3501..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockPhantom.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockPhantom", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/BlockSpectral.json b/src/main/resources/assets/bloodmagic/models/item/BlockSpectral.json deleted file mode 100644 index 67bd40b9..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/BlockSpectral.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "bloodmagic:block/BlockSpectral", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrb.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrb.json deleted file mode 100644 index 12d55a89..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrb.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/WeakBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbApprentice.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbApprentice.json deleted file mode 100644 index 1d1a48af..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbApprentice.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/ApprenticeBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbArchmage.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbArchmage.json deleted file mode 100644 index 0f7289fa..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbArchmage.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/ArchmageBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbMagician.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbMagician.json deleted file mode 100644 index b1a6d7ec..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbMagician.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/MagicianBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbMaster.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbMaster.json deleted file mode 100644 index 27d6c881..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbMaster.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/MasterBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbTranscendent.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbTranscendent.json deleted file mode 100644 index 20eba4e8..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbTranscendent.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/TranscendentBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbWeak.json b/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbWeak.json deleted file mode 100644 index 12d55a89..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemBloodOrbWeak.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/WeakBloodOrb" - } -} diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemModelBase.json b/src/main/resources/assets/bloodmagic/models/item/ItemModelBase.json deleted file mode 100644 index a5461048..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemModelBase.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent":"item/generated" -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSentientArmourGem0.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientArmourGem0.json deleted file mode 100644 index 60cf7592..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemSentientArmourGem0.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/SentientArmourGem_deactivated" - } -} - - - - - diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSentientArmourGem1.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientArmourGem1.json deleted file mode 100644 index 5998ca9e..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemSentientArmourGem1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parent":"bloodmagic:item/ItemModelBase", - "textures": { - "layer0":"bloodmagic:items/SentientArmourGem_activated" - } -} - - - - - - diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemToolBase.json b/src/main/resources/assets/bloodmagic/models/item/ItemToolBase.json deleted file mode 100644 index 420f57b7..00000000 --- a/src/main/resources/assets/bloodmagic/models/item/ItemToolBase.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parent":"builtin/generated", - "display": { - "thirdperson": { - "rotation": [ 0, 90, -35 ], - "translation": [ 0, 1.25, -3.5 ], - "scale": [ 0.85, 0.85, 0.85 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/alchemytable.json b/src/main/resources/assets/bloodmagic/models/item/alchemytable.json new file mode 100644 index 00000000..53bc252a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/alchemytable.json @@ -0,0 +1,10 @@ +{ + "parent": "bloodmagic:block/alchemytable", + "display": { + "gui": { + "rotation": [ 30, 225, 0 ], + "translation": [ -2.5, -1, 0 ], + "scale":[ 0.4, 0.4, 0.4 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/altar.json b/src/main/resources/assets/bloodmagic/models/item/altar.json new file mode 100644 index 00000000..945aff81 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/altar.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/bloodaltar" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/book.json b/src/main/resources/assets/bloodmagic/models/item/book.json new file mode 100644 index 00000000..11cfc959 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/book.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/sanguine_scientiem_guide_book" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive_pulling_0.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive_pulling_0.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive_pulling_0.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive_pulling_1.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive_pulling_1.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive_pulling_1.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive_pulling_2.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_corrosive_pulling_2.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_corrosive_pulling_2.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive_pulling_0.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive_pulling_0.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive_pulling_0.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive_pulling_1.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive_pulling_1.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive_pulling_1.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive_pulling_2.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_destructive_pulling_2.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_destructive_pulling_2.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_pulling_0.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_pulling_0.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_pulling_0.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_pulling_1.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_pulling_1.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_pulling_1.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_pulling_2.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_pulling_2.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_pulling_2.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast_pulling_0.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast_pulling_0.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast_pulling_0.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast_pulling_1.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast_pulling_1.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast_pulling_1.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast_pulling_2.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_steadfast_pulling_2.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_steadfast_pulling_2.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful_pulling_0.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful_pulling_0.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful_pulling_0.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful_pulling_1.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful_pulling_1.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful_pulling_1.json diff --git a/src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful_pulling_2.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/bow/ItemSentientBow_vengeful_pulling_2.json rename to src/main/resources/assets/bloodmagic/models/item/bow/itemsentientbow_vengeful_pulling_2.json diff --git a/src/main/resources/assets/bloodmagic/models/item/demoncrucible.json b/src/main/resources/assets/bloodmagic/models/item/demoncrucible.json new file mode 100644 index 00000000..00ca898b --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/demoncrucible.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/demoncrucible" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/demoncrystallizer.json b/src/main/resources/assets/bloodmagic/models/item/demoncrystallizer.json new file mode 100644 index 00000000..e10f069e --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/demoncrystallizer.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/demoncrystallizer" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/demonpylon.json b/src/main/resources/assets/bloodmagic/models/item/demonpylon.json new file mode 100644 index 00000000..7a67ce9b --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/demonpylon.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/demonpylon" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/doubt_bucket.json b/src/main/resources/assets/bloodmagic/models/item/doubt_bucket.json new file mode 100644 index 00000000..7988cf44 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/doubt_bucket.json @@ -0,0 +1,5 @@ +{ + "parent": "forge:item/bucket_drip", + "loader": "forge:bucket", + "fluid": "bloodmagic:test_fluid" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/incensealtar.json b/src/main/resources/assets/bloodmagic/models/item/incensealtar.json new file mode 100644 index 00000000..2ae61ae6 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/incensealtar.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/incensealtar" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/life_essence_bucket.json b/src/main/resources/assets/bloodmagic/models/item/life_essence_bucket.json new file mode 100644 index 00000000..7988cf44 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/life_essence_bucket.json @@ -0,0 +1,5 @@ +{ + "parent": "forge:item/bucket_drip", + "loader": "forge:bucket", + "fluid": "bloodmagic:test_fluid" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/ritual_dismantler.json b/src/main/resources/assets/bloodmagic/models/item/ritual_dismantler.json new file mode 100644 index 00000000..dc88c182 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/ritual_dismantler.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "bloodmagic:items/ritual_dismantler" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow.json b/src/main/resources/assets/bloodmagic/models/item/sentient_bow.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/ItemSentientBow.json rename to src/main/resources/assets/bloodmagic/models/item/sentient_bow.json diff --git a/src/main/resources/assets/bloodmagic/models/item/soulforge.json b/src/main/resources/assets/bloodmagic/models/item/soulforge.json new file mode 100644 index 00000000..3b715b5e --- /dev/null +++ b/src/main/resources/assets/bloodmagic/models/item/soulforge.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/soulforge" +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/Corridor1.json b/src/main/resources/assets/bloodmagic/schematics/Corridor1.json deleted file mode 100644 index 7e60e3f4..00000000 --- a/src/main/resources/assets/bloodmagic/schematics/Corridor1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "dungeonWeight": 4, - "structureMap": { - "bloodmagic:Corridor1": { - "x": 0, - "y": 0, - "z": 0 - } - }, - "doorMap": { - "west": [ - { - "x": 0, - "y": 0, - "z": 3 - } - ], - "south": [ - { - "x": 3, - "y": 0, - "z": 6 - } - ], - "north": [ - { - "x": 3, - "y": 0, - "z": 0 - } - ] - }, - "descriptorList": [ - { - "minimumOffset": { - "x": 0, - "y": 0, - "z": 0 - }, - "maximumOffset": { - "x": 5, - "y": 3, - "z": 7 - }, - "blockPosCache": [], - "cache": true - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/HallChest1.json b/src/main/resources/assets/bloodmagic/schematics/HallChest1.json deleted file mode 100644 index 43d78664..00000000 --- a/src/main/resources/assets/bloodmagic/schematics/HallChest1.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "structureMap": { - "bloodmagic:HallChest1": { - "x": 0, - "y": 0, - "z": 0 - } - }, - "doorMap": { - "west": [ - { - "x": 0, - "y": 0, - "z": 4 - } - ], - "east": [ - { - "x": 11, - "y": 0, - "z": 4 - } - ] - }, - "descriptorList": [ - { - "minimumOffset": { - "x": 0, - "y": 0, - "z": 0 - }, - "maximumOffset": { - "x": 12, - "y": 5, - "z": 9 - }, - "blockPosCache": [], - "cache": true - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/RawBuilding1.json b/src/main/resources/assets/bloodmagic/schematics/RawBuilding1.json deleted file mode 100644 index 007753c7..00000000 --- a/src/main/resources/assets/bloodmagic/schematics/RawBuilding1.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "dungeonWeight": 4, - "structureMap": { - "bloodmagic:Building1": { - "x": 0, - "y": 0, - "z": 0 - } - }, - "doorMap": { - "south": [ - { - "x": 7, - "y": 0, - "z": 14 - }, - { - "x": 4, - "y": 8, - "z": 14 - } - ], - "north": [ - { - "x": 4, - "y": 8, - "z": 0 - } - ] - }, - "descriptorList": [ - { - "minimumOffset": { - "x": 0, - "y": 0, - "z": 0 - }, - "maximumOffset": { - "x": 15, - "y": 13, - "z": 15 - }, - "blockPosCache": [], - "cache": true - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/Schematics.json b/src/main/resources/assets/bloodmagic/schematics/Schematics.json deleted file mode 100644 index 7590e9f6..00000000 --- a/src/main/resources/assets/bloodmagic/schematics/Schematics.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "bloodmagic:Corridor1", - "bloodmagic:HallChest1", - "bloodmagic:RawBuilding1" -] \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json new file mode 100644 index 00000000..6e3e792f --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json @@ -0,0 +1,56 @@ +{ + "dungeonWeight": 2, + "structureMap": { + "bloodmagic:four_way_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 0, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 6, + "z": 11 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json new file mode 100644 index 00000000..6ceff35d --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json @@ -0,0 +1,56 @@ +{ + "dungeonWeight": 1, + "structureMap": { + "bloodmagic:four_way_corridor_loot": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 5, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 5, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 5, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 5, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 11, + "z": 11 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json b/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json new file mode 100644 index 00000000..ec51994a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json @@ -0,0 +1,69 @@ +{ + "dungeonWeight": 4, + "structureMap": { + "bloodmagic:ore_hold_1": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + }, + { + "x": 2, + "y": 5, + "z": 0 + }, + { + "x": 12, + "y": 5, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 14 + }, + { + "x": 2, + "y": 5, + "z": 14 + }, + { + "x": 12, + "y": 5, + "z": 14 + } + ], + "west": [ + { + "x": 0, + "y": 5, + "z": 7 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 15, + "y": 12, + "z": 15 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/overlapped_corridor.json b/src/main/resources/assets/bloodmagic/schematics/overlapped_corridor.json new file mode 100644 index 00000000..dfbd5e4a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/overlapped_corridor.json @@ -0,0 +1,70 @@ +{ + "dungeonWeight": 2, + "structureMap": { + "bloodmagic:overlapped_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 4, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 4, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 3, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 8, + "y": 5, + "z": 11 + }, + "blockPosCache": [], + "cache": true + }, + { + "minimumOffset": { + "x": 0, + "y": 4, + "z": 3 + }, + "maximumOffset": { + "x": 11, + "y": 9, + "z": 8 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/schematics.json b/src/main/resources/assets/bloodmagic/schematics/schematics.json new file mode 100644 index 00000000..a1915c05 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/schematics.json @@ -0,0 +1,7 @@ +[ + "bloodmagic:t_corridor", + "bloodmagic:four_way_corridor_loot", + "bloodmagic:four_way_corridor", + "bloodmagic:ore_hold_1", + "bloodmagic:straight_corridor" +] \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/spiral_staircase.json b/src/main/resources/assets/bloodmagic/schematics/spiral_staircase.json new file mode 100644 index 00000000..31eda76a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/spiral_staircase.json @@ -0,0 +1,81 @@ +{ + "dungeonWeight": 4, + "structureMap": { + "bloodmagic:spiral_staircase": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + }, + { + "x": 5, + "y": 12, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 14 + }, + { + "x": 5, + "y": 12, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 0, + "z": 5 + }, + { + "x": 0, + "y": 12, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 5 + }, + { + "x": 10, + "y": 6, + "z": 5 + }, + { + "x": 10, + "y": 12, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 18, + "z": 11 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json b/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json new file mode 100644 index 00000000..537eee82 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json @@ -0,0 +1,42 @@ +{ + "dungeonWeight": 2, + "structureMap": { + "bloodmagic:straight_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "west": [ + { + "x": 0, + "y": 0, + "z": 2 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 2 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 5, + "z": 5 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/t_corridor.json b/src/main/resources/assets/bloodmagic/schematics/t_corridor.json new file mode 100644 index 00000000..6bc5f643 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/t_corridor.json @@ -0,0 +1,49 @@ +{ + "dungeonWeight": 2, + "structureMap": { + "bloodmagic:t_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + } + ], + "west": [ + { + "x": 0, + "y": 0, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 5, + "z": 8 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/shaders/beam-broken.frag b/src/main/resources/assets/bloodmagic/shaders/beam-broken.frag deleted file mode 100644 index 63693c95..00000000 --- a/src/main/resources/assets/bloodmagic/shaders/beam-broken.frag +++ /dev/null @@ -1,10 +0,0 @@ - uniform sampler2D bgl_RenderedTexture; - uniform int time; - - void main() { - vec2 texcoord = vec2(gl_TexCoord[0]); - vec4 color = texture2D(bgl_RenderedTexture, texcoord); - float r = sin(texcoord.x * 6 - 1.5 + sin(texcoord.y - time / 3.0)) * 1.1; //(sin((texcoord.x - texcoord.y) * 4 - time) + 1) / 2; - - gl_FragColor = vec4(min(1 - r, color.r * gl_Color.r), min(1 - r, color.g * gl_Color.g), color.b * gl_Color.b, color.a * gl_Color.a); - } diff --git a/src/main/resources/assets/bloodmagic/shaders/beam.frag b/src/main/resources/assets/bloodmagic/shaders/beam.frag deleted file mode 100644 index 62741dfc..00000000 --- a/src/main/resources/assets/bloodmagic/shaders/beam.frag +++ /dev/null @@ -1,12 +0,0 @@ - uniform sampler2D bgl_RenderedTexture; - uniform int time; - - void main() { - vec2 texcoord = vec2(gl_TexCoord[0]); - vec4 color = texture2D(bgl_RenderedTexture, texcoord); - - float gs = (color.r + color.g + color.b) / 3; - float r = sin(texcoord.x * 6 - 1.5 + sin(texcoord.y - time / 3.0)) * 1.1; //(sin((texcoord.x - texcoord.y) * 4 - time) + 1) / 2; - - gl_FragColor = vec4(gs, gs, max(gs, r), gl_Color.a); - } diff --git a/src/main/resources/assets/bloodmagic/structures/Building1.nbt b/src/main/resources/assets/bloodmagic/structures/Building1.nbt deleted file mode 100644 index 13fd2edf..00000000 Binary files a/src/main/resources/assets/bloodmagic/structures/Building1.nbt and /dev/null differ diff --git a/src/main/resources/assets/bloodmagic/structures/Corridor1.nbt b/src/main/resources/assets/bloodmagic/structures/Corridor1.nbt deleted file mode 100644 index 611688cf..00000000 Binary files a/src/main/resources/assets/bloodmagic/structures/Corridor1.nbt and /dev/null differ diff --git a/src/main/resources/assets/bloodmagic/structures/HallChest1.nbt b/src/main/resources/assets/bloodmagic/structures/HallChest1.nbt deleted file mode 100644 index 2962206b..00000000 Binary files a/src/main/resources/assets/bloodmagic/structures/HallChest1.nbt and /dev/null differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/AccelerationRune.png b/src/main/resources/assets/bloodmagic/textures/block/accelerationrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/AccelerationRune.png rename to src/main/resources/assets/bloodmagic/textures/block/accelerationrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/AirRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/airritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/AirRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/airritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/AltarCapacityRune.png b/src/main/resources/assets/bloodmagic/textures/block/altarcapacityrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/AltarCapacityRune.png rename to src/main/resources/assets/bloodmagic/textures/block/altarcapacityrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/arc_bottom.png b/src/main/resources/assets/bloodmagic/textures/block/arc_bottom.png new file mode 100644 index 00000000..2ab0e120 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/arc_bottom.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/arc_front.png b/src/main/resources/assets/bloodmagic/textures/block/arc_front.png new file mode 100644 index 00000000..7b6cffb4 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/arc_front.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/arc_side.png b/src/main/resources/assets/bloodmagic/textures/block/arc_side.png new file mode 100644 index 00000000..ec176079 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/arc_side.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/arc_top.png b/src/main/resources/assets/bloodmagic/textures/block/arc_top.png new file mode 100644 index 00000000..8baa7de3 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/arc_top.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/BetterCapacityRune.png b/src/main/resources/assets/bloodmagic/textures/block/bettercapacityrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/BetterCapacityRune.png rename to src/main/resources/assets/bloodmagic/textures/block/bettercapacityrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/BlankRune.png b/src/main/resources/assets/bloodmagic/textures/block/blankrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/BlankRune.png rename to src/main/resources/assets/bloodmagic/textures/block/blankrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/LargeBloodStoneBrick.png b/src/main/resources/assets/bloodmagic/textures/block/bloodlight.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/LargeBloodStoneBrick.png rename to src/main/resources/assets/bloodmagic/textures/block/bloodlight.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/BloodSocket.png b/src/main/resources/assets/bloodmagic/textures/block/bloodsocket.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/BloodSocket.png rename to src/main/resources/assets/bloodmagic/textures/block/bloodsocket.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/BloodStoneBrick.png b/src/main/resources/assets/bloodmagic/textures/block/bloodstonebrick.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/BloodStoneBrick.png rename to src/main/resources/assets/bloodmagic/textures/block/bloodstonebrick.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/bloodtank.png b/src/main/resources/assets/bloodmagic/textures/block/bloodtank.png new file mode 100644 index 00000000..053e8280 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/bloodtank.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/ChargingRune.png b/src/main/resources/assets/bloodmagic/textures/block/chargingrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/ChargingRune.png rename to src/main/resources/assets/bloodmagic/textures/block/chargingrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_1.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_1.png new file mode 100644 index 00000000..a6005e5a Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_1.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_2.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_2.png new file mode 100644 index 00000000..cf6e8cf0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_2.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_3.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_3.png new file mode 100644 index 00000000..b0bc850b Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_3.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_4.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_4.png new file mode 100644 index 00000000..ad7ba3bb Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_4.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_5.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_5.png new file mode 100644 index 00000000..78631666 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_5.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_6.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_6.png new file mode 100644 index 00000000..6dc36ae0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_6.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_7.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_7.png new file mode 100644 index 00000000..ee33cede Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_7.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_8.png b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_8.png new file mode 100644 index 00000000..0ca1b657 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/creeping_doubt_8.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/DislocationRune.png b/src/main/resources/assets/bloodmagic/textures/block/dislocationrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/DislocationRune.png rename to src/main/resources/assets/bloodmagic/textures/block/dislocationrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick1_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick1_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick2_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick2_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_brick3_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_brick3_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_eye_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_eye_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_metal_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_metal_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_ore.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_ore.png new file mode 100644 index 00000000..3771f3a2 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_ore.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillar_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillar_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarbottom_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarbottom_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarheart_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarheart_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillarspecial_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillarspecial_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_pillartop_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_pillartop_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_polished_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_polished_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_smallbrick_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_smallbrick_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_stone_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_stone_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tile_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tile_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_c.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_c.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_c.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_c.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_d.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_d.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_d.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_d.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_s.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_s.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_s.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_s.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_v.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_v.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/dungeon/dungeon_tilespecial_v.png rename to src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_tilespecial_v.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/DuskRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/duskritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/DuskRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/duskritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/EarthRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/earthritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/EarthRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/earthritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/EfficiencyRune.png b/src/main/resources/assets/bloodmagic/textures/block/efficiencyrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/EfficiencyRune.png rename to src/main/resources/assets/bloodmagic/textures/block/efficiencyrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/empty.png b/src/main/resources/assets/bloodmagic/textures/block/empty.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/empty.png rename to src/main/resources/assets/bloodmagic/textures/block/empty.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/EmptySocket.png b/src/main/resources/assets/bloodmagic/textures/block/emptysocket.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/EmptySocket.png rename to src/main/resources/assets/bloodmagic/textures/block/emptysocket.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/EtherealOpaqueMimic.png b/src/main/resources/assets/bloodmagic/textures/block/etherealopaquemimic.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/EtherealOpaqueMimic.png rename to src/main/resources/assets/bloodmagic/textures/block/etherealopaquemimic.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/FireRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/fireritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/FireRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/fireritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/ImperfectRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/imperfectritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/ImperfectRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/imperfectritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/largebloodstonebrick.png b/src/main/resources/assets/bloodmagic/textures/block/largebloodstonebrick.png new file mode 100644 index 00000000..4935a71f Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/largebloodstonebrick.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceFlowing.png b/src/main/resources/assets/bloodmagic/textures/block/lifeessenceflowing.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceFlowing.png rename to src/main/resources/assets/bloodmagic/textures/block/lifeessenceflowing.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceFlowing.png.mcmeta b/src/main/resources/assets/bloodmagic/textures/block/lifeessenceflowing.png.mcmeta similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceFlowing.png.mcmeta rename to src/main/resources/assets/bloodmagic/textures/block/lifeessenceflowing.png.mcmeta diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceStill.png b/src/main/resources/assets/bloodmagic/textures/block/lifeessencestill.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceStill.png rename to src/main/resources/assets/bloodmagic/textures/block/lifeessencestill.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceStill.png.mcmeta b/src/main/resources/assets/bloodmagic/textures/block/lifeessencestill.png.mcmeta similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/lifeEssenceStill.png.mcmeta rename to src/main/resources/assets/bloodmagic/textures/block/lifeessencestill.png.mcmeta diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/LightRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/lightritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/LightRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/lightritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_flowing.png b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_flowing.png new file mode 100644 index 00000000..3eaa219e Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_flowing.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_flowing.png.mcmeta b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_flowing.png.mcmeta new file mode 100644 index 00000000..8e55e43b --- /dev/null +++ b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_flowing.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 3 + } +} diff --git a/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_still.png b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_still.png new file mode 100644 index 00000000..b9c8daf0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_still.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_still.png.mcmeta b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_still.png.mcmeta new file mode 100644 index 00000000..7ceb3639 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/textures/block/liquid_doubt_still.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/MasterRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/masterritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/MasterRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/masterritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/masterritualstone_inverted.png b/src/main/resources/assets/bloodmagic/textures/block/masterritualstone_inverted.png new file mode 100644 index 00000000..9ba93d8b Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/masterritualstone_inverted.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/nether_soil.png b/src/main/resources/assets/bloodmagic/textures/block/nether_soil.png new file mode 100644 index 00000000..4241d53f Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/nether_soil.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/block/nether_soil.png.mcmeta b/src/main/resources/assets/bloodmagic/textures/block/nether_soil.png.mcmeta new file mode 100644 index 00000000..7ceb3639 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/textures/block/nether_soil.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/ObsidianBrickPath.png b/src/main/resources/assets/bloodmagic/textures/block/obsidianbrickpath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/ObsidianBrickPath.png rename to src/main/resources/assets/bloodmagic/textures/block/obsidianbrickpath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/ObsidianTilePath.png b/src/main/resources/assets/bloodmagic/textures/block/obsidiantilepath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/ObsidianTilePath.png rename to src/main/resources/assets/bloodmagic/textures/block/obsidiantilepath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/OrbCapacityRune.png b/src/main/resources/assets/bloodmagic/textures/block/orbcapacityrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/OrbCapacityRune.png rename to src/main/resources/assets/bloodmagic/textures/block/orbcapacityrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/PhantomBlock.png b/src/main/resources/assets/bloodmagic/textures/block/phantomblock.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/PhantomBlock.png rename to src/main/resources/assets/bloodmagic/textures/block/phantomblock.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/RitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/ritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/RitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/ritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/RuneOfSacrifice.png b/src/main/resources/assets/bloodmagic/textures/block/sacrificerune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/RuneOfSacrifice.png rename to src/main/resources/assets/bloodmagic/textures/block/sacrificerune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/RuneOfSelfSacrifice.png b/src/main/resources/assets/bloodmagic/textures/block/selfsacrificerune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/RuneOfSelfSacrifice.png rename to src/main/resources/assets/bloodmagic/textures/block/selfsacrificerune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SentientMimic.png b/src/main/resources/assets/bloodmagic/textures/block/sentientmimic.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SentientMimic.png rename to src/main/resources/assets/bloodmagic/textures/block/sentientmimic.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/ShardCluster.png b/src/main/resources/assets/bloodmagic/textures/block/shardcluster.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/ShardCluster.png rename to src/main/resources/assets/bloodmagic/textures/block/shardcluster.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/ShardClusterBrick.png b/src/main/resources/assets/bloodmagic/textures/block/shardclusterbrick.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/ShardClusterBrick.png rename to src/main/resources/assets/bloodmagic/textures/block/shardclusterbrick.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SimpleTransCircle.png b/src/main/resources/assets/bloodmagic/textures/block/simpletranscircle.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SimpleTransCircle.png rename to src/main/resources/assets/bloodmagic/textures/block/simpletranscircle.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SolidClearMimic.png b/src/main/resources/assets/bloodmagic/textures/block/solidclearmimic.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SolidClearMimic.png rename to src/main/resources/assets/bloodmagic/textures/block/solidclearmimic.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SolidLightMimic.png b/src/main/resources/assets/bloodmagic/textures/block/solidlightmimic.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SolidLightMimic.png rename to src/main/resources/assets/bloodmagic/textures/block/solidlightmimic.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SolidOpaqueMimic.png b/src/main/resources/assets/bloodmagic/textures/block/solidopaquemimic.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SolidOpaqueMimic.png rename to src/main/resources/assets/bloodmagic/textures/block/solidopaquemimic.png diff --git a/src/main/resources/assets/bloodmagic/textures/block/soul_forge.png b/src/main/resources/assets/bloodmagic/textures/block/soul_forge.png new file mode 100644 index 00000000..1001bb27 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/block/soul_forge.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SoulForge.png b/src/main/resources/assets/bloodmagic/textures/block/soulforge.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SoulForge.png rename to src/main/resources/assets/bloodmagic/textures/block/soulforge.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SpectralBlock.png b/src/main/resources/assets/bloodmagic/textures/block/spectralblock.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SpectralBlock.png rename to src/main/resources/assets/bloodmagic/textures/block/spectralblock.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/SpeedRune.png b/src/main/resources/assets/bloodmagic/textures/block/speedrune.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/SpeedRune.png rename to src/main/resources/assets/bloodmagic/textures/block/speedrune.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/StoneBrickPath.png b/src/main/resources/assets/bloodmagic/textures/block/stonebrickpath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/StoneBrickPath.png rename to src/main/resources/assets/bloodmagic/textures/block/stonebrickpath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/StoneTilePath.png b/src/main/resources/assets/bloodmagic/textures/block/stonetilepath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/StoneTilePath.png rename to src/main/resources/assets/bloodmagic/textures/block/stonetilepath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/Teleposer_Side.png b/src/main/resources/assets/bloodmagic/textures/block/teleposer_side.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/Teleposer_Side.png rename to src/main/resources/assets/bloodmagic/textures/block/teleposer_side.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/Teleposer_Top.png b/src/main/resources/assets/bloodmagic/textures/block/teleposer_top.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/Teleposer_Top.png rename to src/main/resources/assets/bloodmagic/textures/block/teleposer_top.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/WaterRitualStone.png b/src/main/resources/assets/bloodmagic/textures/block/waterritualstone.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/WaterRitualStone.png rename to src/main/resources/assets/bloodmagic/textures/block/waterritualstone.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/WoodBrickPath.png b/src/main/resources/assets/bloodmagic/textures/block/woodbrickpath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/WoodBrickPath.png rename to src/main/resources/assets/bloodmagic/textures/block/woodbrickpath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/WoodTilePath.png b/src/main/resources/assets/bloodmagic/textures/block/woodtilepath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/WoodTilePath.png rename to src/main/resources/assets/bloodmagic/textures/block/woodtilepath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/WornStoneBrickPath.png b/src/main/resources/assets/bloodmagic/textures/block/wornstonebrickpath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/WornStoneBrickPath.png rename to src/main/resources/assets/bloodmagic/textures/block/wornstonebrickpath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/WornStoneTilePath.png b/src/main/resources/assets/bloodmagic/textures/block/wornstonetilepath.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/blocks/WornStoneTilePath.png rename to src/main/resources/assets/bloodmagic/textures/block/wornstonetilepath.png diff --git a/src/main/resources/assets/bloodmagic/textures/blocks/BloodTank.png b/src/main/resources/assets/bloodmagic/textures/blocks/BloodTank.png deleted file mode 100644 index 7c0348df..00000000 Binary files a/src/main/resources/assets/bloodmagic/textures/blocks/BloodTank.png and /dev/null differ diff --git a/src/main/resources/assets/bloodmagic/textures/entities/bloodElytra.png b/src/main/resources/assets/bloodmagic/textures/entities/bloodelytra.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/bloodElytra.png rename to src/main/resources/assets/bloodmagic/textures/entities/bloodelytra.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/defaultCrystalLayer.png b/src/main/resources/assets/bloodmagic/textures/entities/defaultcrystallayer.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/defaultCrystalLayer.png rename to src/main/resources/assets/bloodmagic/textures/entities/defaultcrystallayer.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/energyBlastProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/energyblastprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/energyBlastProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/energyblastprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/explosionProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/explosionprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/explosionProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/explosionprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/fireProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/fireprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/fireProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/fireprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/holyProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/holyprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/holyProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/holyprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/iceProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/iceprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/iceProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/iceprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/lightningProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/lightningprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/lightningProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/lightningprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/mudProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/mudprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/mudProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/mudprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/nodeBeam.png b/src/main/resources/assets/bloodmagic/textures/entities/nodebeam.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/nodeBeam.png rename to src/main/resources/assets/bloodmagic/textures/entities/nodebeam.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/soulArrow.png b/src/main/resources/assets/bloodmagic/textures/entities/soularrow.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/soulArrow.png rename to src/main/resources/assets/bloodmagic/textures/entities/soularrow.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/soulArrow_corrosive.png b/src/main/resources/assets/bloodmagic/textures/entities/soularrow_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/soulArrow_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/entities/soularrow_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/soulArrow_destructive.png b/src/main/resources/assets/bloodmagic/textures/entities/soularrow_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/soulArrow_destructive.png rename to src/main/resources/assets/bloodmagic/textures/entities/soularrow_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/soulArrow_steadfast.png b/src/main/resources/assets/bloodmagic/textures/entities/soularrow_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/soulArrow_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/entities/soularrow_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/soulArrow_vengeful.png b/src/main/resources/assets/bloodmagic/textures/entities/soularrow_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/soulArrow_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/entities/soularrow_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/waterProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/waterprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/waterProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/waterprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/entities/windGustProjectile.png b/src/main/resources/assets/bloodmagic/textures/entities/windgustprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/entities/windGustProjectile.png rename to src/main/resources/assets/bloodmagic/textures/entities/windgustprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/gui/alchemyTable.png b/src/main/resources/assets/bloodmagic/textures/gui/alchemyTable.png deleted file mode 100644 index b30ff88a..00000000 Binary files a/src/main/resources/assets/bloodmagic/textures/gui/alchemyTable.png and /dev/null differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/alchemytable.png b/src/main/resources/assets/bloodmagic/textures/gui/alchemytable.png new file mode 100644 index 00000000..a92eac01 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/gui/alchemytable.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/arc_gui.png b/src/main/resources/assets/bloodmagic/textures/gui/arc_gui.png new file mode 100644 index 00000000..5bd03fae Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/gui/arc_gui.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/GuiTrap.png b/src/main/resources/assets/bloodmagic/textures/gui/guitrap.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/gui/GuiTrap.png rename to src/main/resources/assets/bloodmagic/textures/gui/guitrap.png diff --git a/src/main/resources/assets/bloodmagic/textures/gui/masterRoutingNode.png b/src/main/resources/assets/bloodmagic/textures/gui/masterroutingnode.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/gui/masterRoutingNode.png rename to src/main/resources/assets/bloodmagic/textures/gui/masterroutingnode.png diff --git a/src/main/resources/assets/bloodmagic/textures/gui/patchouli_book/crafting.png b/src/main/resources/assets/bloodmagic/textures/gui/patchouli_book/crafting.png new file mode 100644 index 00000000..15f1ffd5 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/gui/patchouli_book/crafting.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/patchouli_book/page_filler.png b/src/main/resources/assets/bloodmagic/textures/gui/patchouli_book/page_filler.png new file mode 100644 index 00000000..c26fdf41 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/gui/patchouli_book/page_filler.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/routingNode.png b/src/main/resources/assets/bloodmagic/textures/gui/routingnode.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/gui/routingNode.png rename to src/main/resources/assets/bloodmagic/textures/gui/routingnode.png diff --git a/src/main/resources/assets/bloodmagic/textures/gui/soulForge.png b/src/main/resources/assets/bloodmagic/textures/gui/soulforge.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/gui/soulForge.png rename to src/main/resources/assets/bloodmagic/textures/gui/soulforge.png diff --git a/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png b/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png index b03af3fe..e69de29b 100644 Binary files a/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png and b/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/widgets.png b/src/main/resources/assets/bloodmagic/textures/gui/widgets.png index 456166c9..4c80a03c 100644 Binary files a/src/main/resources/assets/bloodmagic/textures/gui/widgets.png and b/src/main/resources/assets/bloodmagic/textures/gui/widgets.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/activationCrystalAwakened.png b/src/main/resources/assets/bloodmagic/textures/item/activationcrystalawakened.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/activationCrystalAwakened.png rename to src/main/resources/assets/bloodmagic/textures/item/activationcrystalawakened.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/activationCrystalCreative.png b/src/main/resources/assets/bloodmagic/textures/item/activationcrystalcreative.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/activationCrystalCreative.png rename to src/main/resources/assets/bloodmagic/textures/item/activationcrystalcreative.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/activationCrystalWeak.png b/src/main/resources/assets/bloodmagic/textures/item/activationcrystalweak.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/activationCrystalWeak.png rename to src/main/resources/assets/bloodmagic/textures/item/activationcrystalweak.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/AirScribeTool.png b/src/main/resources/assets/bloodmagic/textures/item/airscribetool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/AirScribeTool.png rename to src/main/resources/assets/bloodmagic/textures/item/airscribetool.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/AirSigil.png b/src/main/resources/assets/bloodmagic/textures/item/airsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/AirSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/airsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_liquid.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_liquid.png new file mode 100644 index 00000000..4930364f Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_liquid.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon.png new file mode 100644 index 00000000..7a497e46 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon_will.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon_will.png new file mode 100644 index 00000000..d6fbc202 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon_will.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial.png new file mode 100644 index 00000000..3062b21d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial_will.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial_will.png new file mode 100644 index 00000000..d087b452 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial_will.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/AltarMaker.png b/src/main/resources/assets/bloodmagic/textures/item/altarmaker.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/AltarMaker.png rename to src/main/resources/assets/bloodmagic/textures/item/altarmaker.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/AmpouleEmpty.png b/src/main/resources/assets/bloodmagic/textures/item/ampouleempty.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/AmpouleEmpty.png rename to src/main/resources/assets/bloodmagic/textures/item/ampouleempty.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/AmpouleFull.png b/src/main/resources/assets/bloodmagic/textures/item/ampoulefull.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/AmpouleFull.png rename to src/main/resources/assets/bloodmagic/textures/item/ampoulefull.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/Antiseptic.png b/src/main/resources/assets/bloodmagic/textures/item/antiseptic.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/Antiseptic.png rename to src/main/resources/assets/bloodmagic/textures/item/antiseptic.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ApprenticeBloodOrb.png b/src/main/resources/assets/bloodmagic/textures/item/apprenticebloodorb.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ApprenticeBloodOrb.png rename to src/main/resources/assets/bloodmagic/textures/item/apprenticebloodorb.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ArcaneAshes.png b/src/main/resources/assets/bloodmagic/textures/item/arcaneashes.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ArcaneAshes.png rename to src/main/resources/assets/bloodmagic/textures/item/arcaneashes.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ArchmageBloodOrb.png b/src/main/resources/assets/bloodmagic/textures/item/archmagebloodorb.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ArchmageBloodOrb.png rename to src/main/resources/assets/bloodmagic/textures/item/archmagebloodorb.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul.png b/src/main/resources/assets/bloodmagic/textures/item/basemonstersoul.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul.png rename to src/main/resources/assets/bloodmagic/textures/item/basemonstersoul.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BaseMonsterSoul_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/basemonstersoul_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BasicCuttingFluid.png b/src/main/resources/assets/bloodmagic/textures/item/basiccuttingfluid.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BasicCuttingFluid.png rename to src/main/resources/assets/bloodmagic/textures/item/basiccuttingfluid.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BlackPudding.png b/src/main/resources/assets/bloodmagic/textures/item/blackpudding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BlackPudding.png rename to src/main/resources/assets/bloodmagic/textures/item/blackpudding.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BlankSigil.png b/src/main/resources/assets/bloodmagic/textures/item/blanksigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BlankSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/blanksigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BlankSlate.png b/src/main/resources/assets/bloodmagic/textures/item/blankslate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BlankSlate.png rename to src/main/resources/assets/bloodmagic/textures/item/blankslate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BloodLightSigil.png b/src/main/resources/assets/bloodmagic/textures/item/bloodlightsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BloodLightSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/bloodlightsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BloodPack.png b/src/main/resources/assets/bloodmagic/textures/item/bloodpack.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BloodPack.png rename to src/main/resources/assets/bloodmagic/textures/item/bloodpack.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BounceSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/bouncesigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BounceSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/bouncesigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BounceSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/bouncesigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BounceSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/bouncesigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BoundAxe_activated.png b/src/main/resources/assets/bloodmagic/textures/item/boundaxe_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BoundAxe_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/boundaxe_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BoundPickaxe_activated.png b/src/main/resources/assets/bloodmagic/textures/item/boundpickaxe_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BoundPickaxe_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/boundpickaxe_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BoundShovel_activated.png b/src/main/resources/assets/bloodmagic/textures/item/boundshovel_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BoundShovel_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/boundshovel_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BoundSword_activated.png b/src/main/resources/assets/bloodmagic/textures/item/boundsword_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BoundSword_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/boundsword_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BoundTool.png b/src/main/resources/assets/bloodmagic/textures/item/boundtool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BoundTool.png rename to src/main/resources/assets/bloodmagic/textures/item/boundtool.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BridgeSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/bridgesigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BridgeSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/bridgesigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/BridgeSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/bridgesigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/BridgeSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/bridgesigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ClawSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/clawsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ClawSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/clawsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ClawSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/clawsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ClawSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/clawsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/Coagulant.png b/src/main/resources/assets/bloodmagic/textures/item/coagulant.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/Coagulant.png rename to src/main/resources/assets/bloodmagic/textures/item/coagulant.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/CoalSand.png b/src/main/resources/assets/bloodmagic/textures/item/coalsand.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/CoalSand.png rename to src/main/resources/assets/bloodmagic/textures/item/coalsand.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ComponentFrameParts.png b/src/main/resources/assets/bloodmagic/textures/item/componentframeparts.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ComponentFrameParts.png rename to src/main/resources/assets/bloodmagic/textures/item/componentframeparts.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/CompressionSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/compressionsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/CompressionSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/compressionsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/CompressionSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/compressionsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/CompressionSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/compressionsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/copperfragment.png b/src/main/resources/assets/bloodmagic/textures/item/copperfragment.png new file mode 100644 index 00000000..b668f31a Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/copperfragment.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/coppergravel.png b/src/main/resources/assets/bloodmagic/textures/item/coppergravel.png new file mode 100644 index 00000000..7a5b958a Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/coppergravel.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/coppersand.png b/src/main/resources/assets/bloodmagic/textures/item/coppersand.png new file mode 100644 index 00000000..586ec8d6 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/coppersand.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/CorrosiveCrystal.png b/src/main/resources/assets/bloodmagic/textures/item/corrosivecrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/CorrosiveCrystal.png rename to src/main/resources/assets/bloodmagic/textures/item/corrosivecrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/corrupted_dust.png b/src/main/resources/assets/bloodmagic/textures/item/corrupted_dust.png new file mode 100644 index 00000000..78d4bf16 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/corrupted_dust.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/corrupted_tinydust.png b/src/main/resources/assets/bloodmagic/textures/item/corrupted_tinydust.png new file mode 100644 index 00000000..8d2caac1 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/corrupted_tinydust.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/crucibleupgrade.png b/src/main/resources/assets/bloodmagic/textures/item/crucibleupgrade.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/crucibleupgrade.png rename to src/main/resources/assets/bloodmagic/textures/item/crucibleupgrade.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/crystalline_resonator.png b/src/main/resources/assets/bloodmagic/textures/item/crystalline_resonator.png new file mode 100644 index 00000000..4c1f0282 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/crystalline_resonator.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/DaggerOfSacrifice.png b/src/main/resources/assets/bloodmagic/textures/item/daggerofsacrifice.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DaggerOfSacrifice.png rename to src/main/resources/assets/bloodmagic/textures/item/daggerofsacrifice.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DawnScribeTool.png b/src/main/resources/assets/bloodmagic/textures/item/dawnscribetool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DawnScribeTool.png rename to src/main/resources/assets/bloodmagic/textures/item/dawnscribetool.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DefaultCrystal.png b/src/main/resources/assets/bloodmagic/textures/item/defaultcrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DefaultCrystal.png rename to src/main/resources/assets/bloodmagic/textures/item/defaultcrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DemonBloodShard.png b/src/main/resources/assets/bloodmagic/textures/item/demonbloodshard.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DemonBloodShard.png rename to src/main/resources/assets/bloodmagic/textures/item/demonbloodshard.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DemonicTeleposerFocus.png b/src/main/resources/assets/bloodmagic/textures/item/demonicteleposerfocus.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DemonicTeleposerFocus.png rename to src/main/resources/assets/bloodmagic/textures/item/demonicteleposerfocus.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DemonSlate.png b/src/main/resources/assets/bloodmagic/textures/item/demonslate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DemonSlate.png rename to src/main/resources/assets/bloodmagic/textures/item/demonslate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DemonWillGauge.png b/src/main/resources/assets/bloodmagic/textures/item/demonwillgauge.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DemonWillGauge.png rename to src/main/resources/assets/bloodmagic/textures/item/demonwillgauge.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DestructiveCrystal.png b/src/main/resources/assets/bloodmagic/textures/item/destructivecrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DestructiveCrystal.png rename to src/main/resources/assets/bloodmagic/textures/item/destructivecrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/DivinationSigil.png b/src/main/resources/assets/bloodmagic/textures/item/divinationsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DivinationSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/divinationsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/dungeon_tester.png b/src/main/resources/assets/bloodmagic/textures/item/dungeon_tester.png new file mode 100644 index 00000000..8a46b4d1 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/dungeon_tester.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/DuskScribeTool.png b/src/main/resources/assets/bloodmagic/textures/item/duskscribetool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/DuskScribeTool.png rename to src/main/resources/assets/bloodmagic/textures/item/duskscribetool.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/EarthScribeTool.png b/src/main/resources/assets/bloodmagic/textures/item/earthscribetool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/EarthScribeTool.png rename to src/main/resources/assets/bloodmagic/textures/item/earthscribetool.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ElementalSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/elementalsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ElementalSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/elementalsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ElementalSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/elementalsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ElementalSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/elementalsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/EnhancedTeleposerFocus.png b/src/main/resources/assets/bloodmagic/textures/item/enhancedteleposerfocus.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/EnhancedTeleposerFocus.png rename to src/main/resources/assets/bloodmagic/textures/item/enhancedteleposerfocus.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/EtherealSlate.png b/src/main/resources/assets/bloodmagic/textures/item/etherealslate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/EtherealSlate.png rename to src/main/resources/assets/bloodmagic/textures/item/etherealslate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ExperienceBook.png b/src/main/resources/assets/bloodmagic/textures/item/experiencebook.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ExperienceBook.png rename to src/main/resources/assets/bloodmagic/textures/item/experiencebook.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ExplosivePowder.png b/src/main/resources/assets/bloodmagic/textures/item/explosivepowder.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ExplosivePowder.png rename to src/main/resources/assets/bloodmagic/textures/item/explosivepowder.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/FireScribeTool.png b/src/main/resources/assets/bloodmagic/textures/item/firescribetool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/FireScribeTool.png rename to src/main/resources/assets/bloodmagic/textures/item/firescribetool.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/fluidrouterfilterexact.png b/src/main/resources/assets/bloodmagic/textures/item/fluidrouterfilterexact.png new file mode 100644 index 00000000..5de1391d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/fluidrouterfilterexact.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/fragment_netherite_scrap.png b/src/main/resources/assets/bloodmagic/textures/item/fragment_netherite_scrap.png new file mode 100644 index 00000000..eb3371df Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/fragment_netherite_scrap.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/furnacecell_primitive.png b/src/main/resources/assets/bloodmagic/textures/item/furnacecell_primitive.png new file mode 100644 index 00000000..8df342d5 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/furnacecell_primitive.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/goldfragment.png b/src/main/resources/assets/bloodmagic/textures/item/goldfragment.png new file mode 100644 index 00000000..24d21b30 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/goldfragment.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/goldgravel.png b/src/main/resources/assets/bloodmagic/textures/item/goldgravel.png new file mode 100644 index 00000000..142a993a Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/goldgravel.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/GoldSand.png b/src/main/resources/assets/bloodmagic/textures/item/goldsand.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/GoldSand.png rename to src/main/resources/assets/bloodmagic/textures/item/goldsand.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/gravel_netherite_scrap.png b/src/main/resources/assets/bloodmagic/textures/item/gravel_netherite_scrap.png new file mode 100644 index 00000000..1ccb1dd1 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/gravel_netherite_scrap.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/GrowthSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/growthsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/GrowthSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/growthsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/GrowthSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/growthsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/GrowthSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/growthsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/HarvestGoddessSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/harvestgoddesssigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/HarvestGoddessSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/harvestgoddesssigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/HarvestGoddessSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/harvestgoddesssigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/HarvestGoddessSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/harvestgoddesssigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/HasteSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/hastesigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/HasteSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/hastesigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/HasteSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/hastesigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/HasteSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/hastesigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/icarusscroll_activated.png b/src/main/resources/assets/bloodmagic/textures/item/icarusscroll_activated.png new file mode 100644 index 00000000..767852ce Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/icarusscroll_activated.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/icarusscroll_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/icarusscroll_deactivated.png new file mode 100644 index 00000000..d16e87e0 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/icarusscroll_deactivated.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/IceSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/icesigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/IceSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/icesigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/IceSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/icesigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/IceSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/icesigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/information.png b/src/main/resources/assets/bloodmagic/textures/item/information.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/information.png rename to src/main/resources/assets/bloodmagic/textures/item/information.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/InfusedSlate.png b/src/main/resources/assets/bloodmagic/textures/item/infusedslate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/InfusedSlate.png rename to src/main/resources/assets/bloodmagic/textures/item/infusedslate.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/ingot_hellforged.png b/src/main/resources/assets/bloodmagic/textures/item/ingot_hellforged.png new file mode 100644 index 00000000..0f58d71e Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/ingot_hellforged.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/InputRoutingFocus.png b/src/main/resources/assets/bloodmagic/textures/item/inputroutingfocus.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/InputRoutingFocus.png rename to src/main/resources/assets/bloodmagic/textures/item/inputroutingfocus.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/ironfragment.png b/src/main/resources/assets/bloodmagic/textures/item/ironfragment.png new file mode 100644 index 00000000..dd381fb5 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/ironfragment.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/irongravel.png b/src/main/resources/assets/bloodmagic/textures/item/irongravel.png new file mode 100644 index 00000000..ee1a7b0a Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/irongravel.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/IronSand.png b/src/main/resources/assets/bloodmagic/textures/item/ironsand.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/IronSand.png rename to src/main/resources/assets/bloodmagic/textures/item/ironsand.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/Item_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/item_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/Item_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/item_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterExact.png b/src/main/resources/assets/bloodmagic/textures/item/itemrouterfilterexact.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterExact.png rename to src/main/resources/assets/bloodmagic/textures/item/itemrouterfilterexact.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterIgnoreNBT.png b/src/main/resources/assets/bloodmagic/textures/item/itemrouterfilterignorenbt.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterIgnoreNBT.png rename to src/main/resources/assets/bloodmagic/textures/item/itemrouterfilterignorenbt.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterModItems.png b/src/main/resources/assets/bloodmagic/textures/item/itemrouterfiltermoditems.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterModItems.png rename to src/main/resources/assets/bloodmagic/textures/item/itemrouterfiltermoditems.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterOreDict.png b/src/main/resources/assets/bloodmagic/textures/item/itemrouterfilteroredict.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ItemRouterFilterOreDict.png rename to src/main/resources/assets/bloodmagic/textures/item/itemrouterfilteroredict.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LavaCrystal.png b/src/main/resources/assets/bloodmagic/textures/item/lavacrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LavaCrystal.png rename to src/main/resources/assets/bloodmagic/textures/item/lavacrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LavaSigil.png b/src/main/resources/assets/bloodmagic/textures/item/lavasigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LavaSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/lavasigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LifeBucket.png b/src/main/resources/assets/bloodmagic/textures/item/lifebucket.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LifeBucket.png rename to src/main/resources/assets/bloodmagic/textures/item/lifebucket.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LivingBoots.png b/src/main/resources/assets/bloodmagic/textures/item/livingboots.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LivingBoots.png rename to src/main/resources/assets/bloodmagic/textures/item/livingboots.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LivingHelmet.png b/src/main/resources/assets/bloodmagic/textures/item/livinghelmet.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LivingHelmet.png rename to src/main/resources/assets/bloodmagic/textures/item/livinghelmet.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LivingLeggings.png b/src/main/resources/assets/bloodmagic/textures/item/livingleggings.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LivingLeggings.png rename to src/main/resources/assets/bloodmagic/textures/item/livingleggings.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/LivingPlate.png b/src/main/resources/assets/bloodmagic/textures/item/livingplate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/LivingPlate.png rename to src/main/resources/assets/bloodmagic/textures/item/livingplate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/MagicianBloodOrb.png b/src/main/resources/assets/bloodmagic/textures/item/magicianbloodorb.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MagicianBloodOrb.png rename to src/main/resources/assets/bloodmagic/textures/item/magicianbloodorb.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/MailOrder.png b/src/main/resources/assets/bloodmagic/textures/item/mailorder.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MailOrder.png rename to src/main/resources/assets/bloodmagic/textures/item/mailorder.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/MasterBloodOrb.png b/src/main/resources/assets/bloodmagic/textures/item/masterbloodorb.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MasterBloodOrb.png rename to src/main/resources/assets/bloodmagic/textures/item/masterbloodorb.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/melee_anointment.png b/src/main/resources/assets/bloodmagic/textures/item/melee_anointment.png new file mode 100644 index 00000000..049b2d75 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/melee_anointment.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/MiningSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/miningsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MiningSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/miningsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/MiningSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/miningsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MiningSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/miningsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/MundaneLengtheningCatalyst.png b/src/main/resources/assets/bloodmagic/textures/item/mundanelengtheningcatalyst.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MundaneLengtheningCatalyst.png rename to src/main/resources/assets/bloodmagic/textures/item/mundanelengtheningcatalyst.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/MundanePowerCatalyst.png b/src/main/resources/assets/bloodmagic/textures/item/mundanepowercatalyst.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/MundanePowerCatalyst.png rename to src/main/resources/assets/bloodmagic/textures/item/mundanepowercatalyst.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/NeuroToxin.png b/src/main/resources/assets/bloodmagic/textures/item/neurotoxin.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/NeuroToxin.png rename to src/main/resources/assets/bloodmagic/textures/item/neurotoxin.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/NodeRouter.png b/src/main/resources/assets/bloodmagic/textures/item/noderouter.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/NodeRouter.png rename to src/main/resources/assets/bloodmagic/textures/item/noderouter.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/PlantFibres.png b/src/main/resources/assets/bloodmagic/textures/item/plantfibres.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/PlantFibres.png rename to src/main/resources/assets/bloodmagic/textures/item/plantfibres.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/PlantOil.png b/src/main/resources/assets/bloodmagic/textures/item/plantoil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/PlantOil.png rename to src/main/resources/assets/bloodmagic/textures/item/plantoil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/PotionFlask_outline.png b/src/main/resources/assets/bloodmagic/textures/item/potionflask_outline.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/PotionFlask_outline.png rename to src/main/resources/assets/bloodmagic/textures/item/potionflask_outline.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/PotionFlask_overlay.png b/src/main/resources/assets/bloodmagic/textures/item/potionflask_overlay.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/PotionFlask_overlay.png rename to src/main/resources/assets/bloodmagic/textures/item/potionflask_overlay.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/PotionFlask_underlay.png b/src/main/resources/assets/bloodmagic/textures/item/potionflask_underlay.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/PotionFlask_underlay.png rename to src/main/resources/assets/bloodmagic/textures/item/potionflask_underlay.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/primitive_crystalline_resonator.png b/src/main/resources/assets/bloodmagic/textures/item/primitive_crystalline_resonator.png new file mode 100644 index 00000000..542a89fe Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/primitive_crystalline_resonator.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/primitive_explosive_cell.png b/src/main/resources/assets/bloodmagic/textures/item/primitive_explosive_cell.png new file mode 100644 index 00000000..def67745 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/primitive_explosive_cell.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/primitive_hydration_cell.png b/src/main/resources/assets/bloodmagic/textures/item/primitive_hydration_cell.png new file mode 100644 index 00000000..5b6c29ae Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/primitive_hydration_cell.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentAffinity.png b/src/main/resources/assets/bloodmagic/textures/item/reagentaffinity.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentAffinity.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentaffinity.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentAir.png b/src/main/resources/assets/bloodmagic/textures/item/reagentair.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentAir.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentair.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentBinding.png b/src/main/resources/assets/bloodmagic/textures/item/reagentbinding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentBinding.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentbinding.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentBloodLight.png b/src/main/resources/assets/bloodmagic/textures/item/reagentbloodlight.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentBloodLight.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentbloodlight.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentBounce.png b/src/main/resources/assets/bloodmagic/textures/item/reagentbounce.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentBounce.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentbounce.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentBridge.png b/src/main/resources/assets/bloodmagic/textures/item/reagentbridge.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentBridge.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentbridge.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentClaw.png b/src/main/resources/assets/bloodmagic/textures/item/reagentclaw.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentClaw.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentclaw.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentCompression.png b/src/main/resources/assets/bloodmagic/textures/item/reagentcompression.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentCompression.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentcompression.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentFastMiner.png b/src/main/resources/assets/bloodmagic/textures/item/reagentfastminer.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentFastMiner.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentfastminer.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentFrost.png b/src/main/resources/assets/bloodmagic/textures/item/reagentfrost.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentFrost.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentfrost.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentGrowth.png b/src/main/resources/assets/bloodmagic/textures/item/reagentgrowth.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentGrowth.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentgrowth.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentHaste.png b/src/main/resources/assets/bloodmagic/textures/item/reagenthaste.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentHaste.png rename to src/main/resources/assets/bloodmagic/textures/item/reagenthaste.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentHolding.png b/src/main/resources/assets/bloodmagic/textures/item/reagentholding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentHolding.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentholding.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentLava.png b/src/main/resources/assets/bloodmagic/textures/item/reagentlava.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentLava.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentlava.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentMagnetism.png b/src/main/resources/assets/bloodmagic/textures/item/reagentmagnetism.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentMagnetism.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentmagnetism.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentSeverance.png b/src/main/resources/assets/bloodmagic/textures/item/reagentseverance.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentSeverance.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentseverance.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentSight.png b/src/main/resources/assets/bloodmagic/textures/item/reagentsight.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentSight.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentsight.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentSuppression.png b/src/main/resources/assets/bloodmagic/textures/item/reagentsuppression.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentSuppression.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentsuppression.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentTeleposition.png b/src/main/resources/assets/bloodmagic/textures/item/reagentteleposition.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentTeleposition.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentteleposition.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentTransposition.png b/src/main/resources/assets/bloodmagic/textures/item/reagenttransposition.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentTransposition.png rename to src/main/resources/assets/bloodmagic/textures/item/reagenttransposition.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentVoid.png b/src/main/resources/assets/bloodmagic/textures/item/reagentvoid.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentVoid.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentvoid.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentWater.png b/src/main/resources/assets/bloodmagic/textures/item/reagentwater.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentWater.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentwater.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReagentWind.png b/src/main/resources/assets/bloodmagic/textures/item/reagentwind.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReagentWind.png rename to src/main/resources/assets/bloodmagic/textures/item/reagentwind.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReinforcedSlate.png b/src/main/resources/assets/bloodmagic/textures/item/reinforcedslate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReinforcedSlate.png rename to src/main/resources/assets/bloodmagic/textures/item/reinforcedslate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ReinforcedTeleposerFocus.png b/src/main/resources/assets/bloodmagic/textures/item/reinforcedteleposerfocus.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ReinforcedTeleposerFocus.png rename to src/main/resources/assets/bloodmagic/textures/item/reinforcedteleposerfocus.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/ritual_dismantler.png b/src/main/resources/assets/bloodmagic/textures/item/ritual_dismantler.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/ritual_dismantler.png rename to src/main/resources/assets/bloodmagic/textures/item/ritual_dismantler.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/RitualDiviner.png b/src/main/resources/assets/bloodmagic/textures/item/ritualdiviner.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/RitualDiviner.png rename to src/main/resources/assets/bloodmagic/textures/item/ritualdiviner.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/ritualdivinerdawn.png b/src/main/resources/assets/bloodmagic/textures/item/ritualdivinerdawn.png new file mode 100644 index 00000000..e06871c7 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/ritualdivinerdawn.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/ritualdivinerdusk.png b/src/main/resources/assets/bloodmagic/textures/item/ritualdivinerdusk.png new file mode 100644 index 00000000..e06871c7 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/ritualdivinerdusk.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/RitualTinkerer.png b/src/main/resources/assets/bloodmagic/textures/item/ritualtinkerer.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/RitualTinkerer.png rename to src/main/resources/assets/bloodmagic/textures/item/ritualtinkerer.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/sacrificePlate.png b/src/main/resources/assets/bloodmagic/textures/item/sacrificeplate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/sacrificePlate.png rename to src/main/resources/assets/bloodmagic/textures/item/sacrificeplate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SacrificialDagger.png b/src/main/resources/assets/bloodmagic/textures/item/sacrificialdagger.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SacrificialDagger.png rename to src/main/resources/assets/bloodmagic/textures/item/sacrificialdagger.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/CeremonialDagger.png b/src/main/resources/assets/bloodmagic/textures/item/sacrificialdagger_ceremonial.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/CeremonialDagger.png rename to src/main/resources/assets/bloodmagic/textures/item/sacrificialdagger_ceremonial.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/Saltpeter.png b/src/main/resources/assets/bloodmagic/textures/item/saltpeter.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/Saltpeter.png rename to src/main/resources/assets/bloodmagic/textures/item/saltpeter.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/sand_hellforged.png b/src/main/resources/assets/bloodmagic/textures/item/sand_hellforged.png new file mode 100644 index 00000000..ad1fe281 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/sand_hellforged.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/sand_netherite.png b/src/main/resources/assets/bloodmagic/textures/item/sand_netherite.png new file mode 100644 index 00000000..e6420a5c Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/sand_netherite.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/sanguine_scientiem_guide_book.png b/src/main/resources/assets/bloodmagic/textures/item/sanguine_scientiem_guide_book.png new file mode 100644 index 00000000..c7b9026b Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/sanguine_scientiem_guide_book.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/SanguineBook.png b/src/main/resources/assets/bloodmagic/textures/item/sanguinebook.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SanguineBook.png rename to src/main/resources/assets/bloodmagic/textures/item/sanguinebook.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/sanguinereverter.png b/src/main/resources/assets/bloodmagic/textures/item/sanguinereverter.png new file mode 100644 index 00000000..729c693f Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/sanguinereverter.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/SeerSigil.png b/src/main/resources/assets/bloodmagic/textures/item/seersigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SeerSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/seersigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/selfSacrificePlate.png b/src/main/resources/assets/bloodmagic/textures/item/selfsacrificeplate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/selfSacrificePlate.png rename to src/main/resources/assets/bloodmagic/textures/item/selfsacrificeplate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_corrosive_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_corrosive_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_corrosive_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_corrosive_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_corrosive_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_corrosive_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_corrosive_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_corrosive_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_destructive_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_destructive_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_destructive_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_destructive_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_destructive_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_destructive_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_destructive_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_destructive_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_steadfast_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_steadfast_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_steadfast_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_steadfast_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_steadfast_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_steadfast_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_steadfast_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_steadfast_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_vengeful_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_vengeful_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_vengeful_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_vengeful_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_vengeful_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_vengeful_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArmourGem_vengeful_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarmourgem_vengeful_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientArrow.png b/src/main/resources/assets/bloodmagic/textures/item/sentientarrow.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientArrow.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientarrow.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBoots.png b/src/main/resources/assets/bloodmagic/textures/item/sentientboots.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBoots.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientboots.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBoots_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientboots_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBoots_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientboots_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBoots_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientboots_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBoots_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientboots_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBoots_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/sentientboots_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBoots_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientboots_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBoots_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/sentientboots_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBoots_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientboots_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive_pulling_0.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive_pulling_0.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive_pulling_0.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive_pulling_0.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive_pulling_1.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive_pulling_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive_pulling_1.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive_pulling_1.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive_pulling_2.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive_pulling_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_corrosive_pulling_2.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_corrosive_pulling_2.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive_pulling_0.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive_pulling_0.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive_pulling_0.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive_pulling_0.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive_pulling_1.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive_pulling_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive_pulling_1.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive_pulling_1.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive_pulling_2.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive_pulling_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_destructive_pulling_2.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_destructive_pulling_2.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_0.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_pulling_0.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_0.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_pulling_0.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_1.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_pulling_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_1.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_pulling_1.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_2.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_pulling_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_2.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_pulling_2.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast_pulling_0.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast_pulling_0.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast_pulling_0.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast_pulling_0.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast_pulling_1.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast_pulling_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast_pulling_1.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast_pulling_1.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast_pulling_2.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast_pulling_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_steadfast_pulling_2.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_steadfast_pulling_2.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful_pulling_0.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful_pulling_0.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful_pulling_0.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful_pulling_0.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful_pulling_1.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful_pulling_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful_pulling_1.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful_pulling_1.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful_pulling_2.png b/src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful_pulling_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientBow_vengeful_pulling_2.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientbow_vengeful_pulling_2.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientHelmet.png b/src/main/resources/assets/bloodmagic/textures/item/sentienthelmet.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientHelmet.png rename to src/main/resources/assets/bloodmagic/textures/item/sentienthelmet.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientHelmet_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/sentienthelmet_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientLeggings.png b/src/main/resources/assets/bloodmagic/textures/item/sentientleggings.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientLeggings.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientleggings.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientleggings_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientleggings_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientleggings_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientleggings_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/sentientleggings_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientleggings_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/sentientleggings_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientLeggings_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientleggings_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientPlate.png b/src/main/resources/assets/bloodmagic/textures/item/sentientplate.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientPlate.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientplate.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientPlate_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientplate_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientPlate_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientplate_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientPlate_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/sentientplate_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientPlate_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientplate_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientPlate_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/sentientplate_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientPlate_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientplate_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SentientPlate_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/sentientplate_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SentientPlate_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/sentientplate_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/Set_area.png b/src/main/resources/assets/bloodmagic/textures/item/set_area.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/Set_area.png rename to src/main/resources/assets/bloodmagic/textures/item/set_area.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/set_will_types.png b/src/main/resources/assets/bloodmagic/textures/item/set_will_types.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/set_will_types.png rename to src/main/resources/assets/bloodmagic/textures/item/set_will_types.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SheathedItem.png b/src/main/resources/assets/bloodmagic/textures/item/sheatheditem.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SheathedItem.png rename to src/main/resources/assets/bloodmagic/textures/item/sheatheditem.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfHolding.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofholding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfHolding.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofholding.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfMagnetism_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofmagnetism_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfMagnetism_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofmagnetism_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfMagnetism_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofmagnetism_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfMagnetism_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofmagnetism_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfSeverance_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofseverance_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfSeverance_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofseverance_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfSeverance_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofseverance_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfSeverance_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofseverance_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfSuppression_activated.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofsuppression_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfSuppression_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofsuppression_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOfSuppression_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/sigilofsuppression_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOfSuppression_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/sigilofsuppression_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SigilOverlay.png b/src/main/resources/assets/bloodmagic/textures/item/sigiloverlay.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SigilOverlay.png rename to src/main/resources/assets/bloodmagic/textures/item/sigiloverlay.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/slate_ampoule.png b/src/main/resources/assets/bloodmagic/textures/item/slate_ampoule.png new file mode 100644 index 00000000..c40f1b5d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/slate_ampoule.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulAxe.png b/src/main/resources/assets/bloodmagic/textures/item/soulaxe.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulAxe.png rename to src/main/resources/assets/bloodmagic/textures/item/soulaxe.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulAxe_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulaxe_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulAxe_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulaxe_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulAxe_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulaxe_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulAxe_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulaxe_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulAxe_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulaxe_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulAxe_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulaxe_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulAxe_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulaxe_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulAxe_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulaxe_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemcommon.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemcommon.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemCommon_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemcommon_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgrand.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgrand.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGrand_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgrand_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgreater.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgreater.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemGreater_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemgreater_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemlesser.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemlesser.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemLesser_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgemlesser_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty.png b/src/main/resources/assets/bloodmagic/textures/item/soulgempetty.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgempetty.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgempetty_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgempetty_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulgempetty_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgempetty_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulgempetty_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgempetty_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulgempetty_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulGemPetty_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulgempetty_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe.png b/src/main/resources/assets/bloodmagic/textures/item/soulpickaxe.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe.png rename to src/main/resources/assets/bloodmagic/textures/item/soulpickaxe.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulPickaxe_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulpickaxe_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/soulscythe.png b/src/main/resources/assets/bloodmagic/textures/item/soulscythe.png new file mode 100644 index 00000000..2adb8ae5 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/soulscythe.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/soulscythe_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_corrosive.png new file mode 100644 index 00000000..79328204 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_corrosive.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/soulscythe_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_destructive.png new file mode 100644 index 00000000..adeb8589 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_destructive.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/soulscythe_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_steadfast.png new file mode 100644 index 00000000..bdac5fbf Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_steadfast.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/soulscythe_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_vengeful.png new file mode 100644 index 00000000..9c3c04f5 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/soulscythe_vengeful.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulShovel.png b/src/main/resources/assets/bloodmagic/textures/item/soulshovel.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulShovel.png rename to src/main/resources/assets/bloodmagic/textures/item/soulshovel.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulShovel_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulshovel_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulShovel_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulshovel_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulShovel_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulshovel_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulShovel_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulshovel_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulShovel_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulshovel_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulShovel_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulshovel_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulShovel_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulshovel_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulShovel_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulshovel_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSnare.png b/src/main/resources/assets/bloodmagic/textures/item/soulsnare.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSnare.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsnare.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSnare_corrosive.png b/src/main/resources/assets/bloodmagic/textures/item/soulsnare_corrosive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSnare_corrosive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsnare_corrosive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSnare_destructive.png b/src/main/resources/assets/bloodmagic/textures/item/soulsnare_destructive.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSnare_destructive.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsnare_destructive.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSnare_steadfast.png b/src/main/resources/assets/bloodmagic/textures/item/soulsnare_steadfast.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSnare_steadfast.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsnare_steadfast.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSnare_vengeful.png b/src/main/resources/assets/bloodmagic/textures/item/soulsnare_vengeful.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSnare_vengeful.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsnare_vengeful.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_activated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_corrosive_activated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_corrosive_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_corrosive_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_corrosive_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_corrosive_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_corrosive_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_corrosive_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_corrosive_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_destructive_activated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_destructive_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_destructive_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_destructive_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_destructive_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_destructive_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_destructive_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_destructive_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_steadfast_activated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_steadfast_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_steadfast_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_steadfast_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_steadfast_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_steadfast_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_steadfast_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_steadfast_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_vengeful_activated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_vengeful_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_vengeful_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_vengeful_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulSword_vengeful_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/soulsword_vengeful_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulSword_vengeful_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/soulsword_vengeful_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SteadfastCrystal.png b/src/main/resources/assets/bloodmagic/textures/item/steadfastcrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SteadfastCrystal.png rename to src/main/resources/assets/bloodmagic/textures/item/steadfastcrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/Sulfur.png b/src/main/resources/assets/bloodmagic/textures/item/sulfur.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/Sulfur.png rename to src/main/resources/assets/bloodmagic/textures/item/sulfur.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/TeleposerFocus.png b/src/main/resources/assets/bloodmagic/textures/item/teleposerfocus.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/TeleposerFocus.png rename to src/main/resources/assets/bloodmagic/textures/item/teleposerfocus.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/TelepositionSigil.png b/src/main/resources/assets/bloodmagic/textures/item/telepositionsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/TelepositionSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/telepositionsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger.png b/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger.png new file mode 100644 index 00000000..c73953b4 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger_letter.png b/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger_letter.png new file mode 100644 index 00000000..50051eed Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger_letter.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger_syringe.png b/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger_syringe.png new file mode 100644 index 00000000..501b6360 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/throwing_dagger_syringe.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/items/TranscendentBloodOrb.png b/src/main/resources/assets/bloodmagic/textures/item/transcendentbloodorb.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/TranscendentBloodOrb.png rename to src/main/resources/assets/bloodmagic/textures/item/transcendentbloodorb.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/TranspositionSigil.png b/src/main/resources/assets/bloodmagic/textures/item/transpositionsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/TranspositionSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/transpositionsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/UpgradeTome.png b/src/main/resources/assets/bloodmagic/textures/item/upgradetome.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/UpgradeTome.png rename to src/main/resources/assets/bloodmagic/textures/item/upgradetome.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/UpgradeTrainer.png b/src/main/resources/assets/bloodmagic/textures/item/upgradetrainer.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/UpgradeTrainer.png rename to src/main/resources/assets/bloodmagic/textures/item/upgradetrainer.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/VengefulCrystal.png b/src/main/resources/assets/bloodmagic/textures/item/vengefulcrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/VengefulCrystal.png rename to src/main/resources/assets/bloodmagic/textures/item/vengefulcrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/VoidSigil.png b/src/main/resources/assets/bloodmagic/textures/item/voidsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/VoidSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/voidsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WarriorSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/warriorsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WarriorSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/warriorsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WarriorSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/warriorsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WarriorSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/warriorsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WaterScribeTool.png b/src/main/resources/assets/bloodmagic/textures/item/waterscribetool.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WaterScribeTool.png rename to src/main/resources/assets/bloodmagic/textures/item/waterscribetool.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WaterSigil.png b/src/main/resources/assets/bloodmagic/textures/item/watersigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WaterSigil.png rename to src/main/resources/assets/bloodmagic/textures/item/watersigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WeakBloodOrb.png b/src/main/resources/assets/bloodmagic/textures/item/weakbloodorb.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WeakBloodOrb.png rename to src/main/resources/assets/bloodmagic/textures/item/weakbloodorb.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WeakBloodShard.png b/src/main/resources/assets/bloodmagic/textures/item/weakbloodshard.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WeakBloodShard.png rename to src/main/resources/assets/bloodmagic/textures/item/weakbloodshard.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WindSigil_activated.png b/src/main/resources/assets/bloodmagic/textures/item/windsigil_activated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WindSigil_activated.png rename to src/main/resources/assets/bloodmagic/textures/item/windsigil_activated.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/WindSigil_deactivated.png b/src/main/resources/assets/bloodmagic/textures/item/windsigil_deactivated.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/WindSigil_deactivated.png rename to src/main/resources/assets/bloodmagic/textures/item/windsigil_deactivated.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/potions.png b/src/main/resources/assets/bloodmagic/textures/misc/potions.png index 49c30a6e..f2892812 100644 Binary files a/src/main/resources/assets/bloodmagic/textures/misc/potions.png and b/src/main/resources/assets/bloodmagic/textures/misc/potions.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T1.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T1.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t1.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T2.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T2.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t2.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T3.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t3.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T3.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t3.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T4.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t4.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T4.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t4.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T5.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t5.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T5.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t5.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T6.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t6.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/T6.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/altars/t6.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/Ring1.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/ring1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/Ring1.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/ring1.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/Ring2.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/ring2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/Ring2.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/demons/ring2.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Alchemy.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/alchemy.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Alchemy.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/alchemy.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/AnimalGrowth.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/animalgrowth.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/AnimalGrowth.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/animalgrowth.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/BeatingAnvil.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/beatinganvil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/BeatingAnvil.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/beatinganvil.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Binding.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/binding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Binding.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/binding.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Containment.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/containment.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Containment.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/containment.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Convocation.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/convocation.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Convocation.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/convocation.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Crusher.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/crusher.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Crusher.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/crusher.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Dome.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/dome.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Dome.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/dome.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Ellipsoid.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/ellipsoid.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Ellipsoid.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/ellipsoid.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/EternalSoul.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/eternalsoul.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/EternalSoul.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/eternalsoul.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Evaporation.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/evaporation.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Evaporation.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/evaporation.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Expulsion.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/expulsion.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Expulsion.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/expulsion.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/FeatheredEarth.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/featheredearth.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/FeatheredEarth.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/featheredearth.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/FeatheredKnife.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/featheredknife.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/FeatheredKnife.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/featheredknife.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Flight.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/flight.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Flight.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/flight.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Gaia.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/gaia.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Gaia.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/gaia.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/GreenGrove.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/greengrove.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/GreenGrove.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/greengrove.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Harvest.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/harvest.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Harvest.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/harvest.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Interdiction.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/interdiction.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Interdiction.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/interdiction.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Jump.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/jump.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Jump.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/jump.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Lava.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/lava.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Lava.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/lava.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Magnetism.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/magnetism.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Magnetism.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/magnetism.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Meteor.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/meteor.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Meteor.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/meteor.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/PhantomHands.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/phantomhands.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/PhantomHands.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/phantomhands.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Regeneration.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/regeneration.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Regeneration.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/regeneration.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Sacrosanctity.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/sacrosanctity.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Sacrosanctity.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/sacrosanctity.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Speed.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/speed.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Speed.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/speed.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/StallingOmega.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/stallingomega.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/StallingOmega.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/stallingomega.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Stomach.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/stomach.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Stomach.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/stomach.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/SymmetryOmega.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/symmetryomega.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/SymmetryOmega.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/symmetryomega.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Unbinding.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/unbinding.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Unbinding.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/unbinding.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/VeilOfEvil.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/veilofevil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/VeilOfEvil.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/veilofevil.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Water.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/water.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Water.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/water.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/WellOfSuffering.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/wellofsuffering.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/WellOfSuffering.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/wellofsuffering.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Zephyr.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/zephyr.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/Zephyr.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/rituals/zephyr.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Conduit.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/conduit.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Conduit.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/conduit.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Effect.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/effect.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Effect.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/effect.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Enhancement.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/enhancement.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Enhancement.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/enhancement.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Modifier.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/modifier.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Modifier.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/modifier.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Paradigm.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/paradigm.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/Paradigm.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/paradigm.png diff --git a/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/SimpleSpellTable.png b/src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/simplespelltable.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/SimpleSpellTable.png rename to src/main/resources/assets/bloodmagic/textures/misc/screenshots/spells/simplespelltable.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BaseArray.png b/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BaseArray.png deleted file mode 100644 index cacd9047..00000000 Binary files a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BaseArray.png and /dev/null differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/AirSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/airsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/AirSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/airsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/basearray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/basearray.png new file mode 100644 index 00000000..1d3709be Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/basearray.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BindingArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/bindingarray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BindingArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/bindingarray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BindingLightningArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/bindinglightningarray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BindingLightningArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/bindinglightningarray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BounceArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/bouncearray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/BounceArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/bouncearray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/DivinationSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/divinationsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/DivinationSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/divinationsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/ElementalAffinitySigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/elementalaffinitysigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/ElementalAffinitySigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/elementalaffinitysigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/FastMinerSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/fastminersigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/FastMinerSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/fastminersigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/furnacearray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/furnacearray.png new file mode 100644 index 00000000..5639657d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/furnacearray.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/GrowthSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/growthsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/GrowthSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/growthsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/HasteSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/hastesigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/HasteSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/hastesigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/LavaSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/lavasigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/LavaSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/lavasigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/LightSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/lightsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/LightSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/lightsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/MagnetismSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/magnetismsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/MagnetismSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/magnetismsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/mobsacrifice.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/mobsacrifice.png new file mode 100644 index 00000000..71701844 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/mobsacrifice.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarray.png new file mode 100644 index 00000000..ef620b91 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarray.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarrayinside.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarrayinside.png new file mode 100644 index 00000000..16cfc50d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarrayinside.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarrayoutside.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarrayoutside.png new file mode 100644 index 00000000..d6c7dd9d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarrayoutside.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarraysymbols.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarraysymbols.png new file mode 100644 index 00000000..438c9a11 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/moonarraysymbols.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/MovementArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/movementarray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/MovementArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/movementarray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/shardoflaputa.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/shardoflaputa.png new file mode 100644 index 00000000..2ae4fd52 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/shardoflaputa.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SightSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sightsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SightSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sightsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SkeletonTurret1.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/skeletonturret1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SkeletonTurret1.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/skeletonturret1.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SkeletonTurret2.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/skeletonturret2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SkeletonTurret2.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/skeletonturret2.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/spikearray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/spikearray.png new file mode 100644 index 00000000..7e312f51 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/spikearray.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/StupidArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/stupidarray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/StupidArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/stupidarray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarray.png new file mode 100644 index 00000000..edd7d778 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarray.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarraycircle.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarraycircle.png new file mode 100644 index 00000000..5b882d6e Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarraycircle.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarrayspikes.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarrayspikes.png new file mode 100644 index 00000000..172e248d Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/sunarrayspikes.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SuppressionSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/suppressionsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/SuppressionSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/suppressionsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/teleportation.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/teleportation.png new file mode 100644 index 00000000..de03c724 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/teleportation.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/TeleportationArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/teleportationarray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/TeleportationArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/teleportationarray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/UpdraftArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/updraftarray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/UpdraftArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/updraftarray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/VoidSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/voidsigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/VoidSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/voidsigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/WaterSigil.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/watersigil.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/WaterSigil.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/watersigil.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/WIPArray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/wiparray.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/WIPArray.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/wiparray.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/ZombieBeacon.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/zombiebeacon.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/AlchemyArrays/ZombieBeacon.png rename to src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/zombiebeacon.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/CorrosiveCrystal.png b/src/main/resources/assets/bloodmagic/textures/models/corrosivecrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/CorrosiveCrystal.png rename to src/main/resources/assets/bloodmagic/textures/models/corrosivecrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/DefaultCrystal.png b/src/main/resources/assets/bloodmagic/textures/models/defaultcrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/DefaultCrystal.png rename to src/main/resources/assets/bloodmagic/textures/models/defaultcrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/DestructiveCrystal.png b/src/main/resources/assets/bloodmagic/textures/models/destructivecrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/DestructiveCrystal.png rename to src/main/resources/assets/bloodmagic/textures/models/destructivecrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/EnergyBazookaMainProjectile.png b/src/main/resources/assets/bloodmagic/textures/models/energybazookamainprojectile.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/EnergyBazookaMainProjectile.png rename to src/main/resources/assets/bloodmagic/textures/models/energybazookamainprojectile.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/Meteor.png b/src/main/resources/assets/bloodmagic/textures/models/meteor.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/Meteor.png rename to src/main/resources/assets/bloodmagic/textures/models/meteor.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/mobsacrificeswirl.png b/src/main/resources/assets/bloodmagic/textures/models/mobsacrificeswirl.png new file mode 100644 index 00000000..023cf956 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/mobsacrificeswirl.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/models/ModelInputRoutingNode.png b/src/main/resources/assets/bloodmagic/textures/models/modelinputroutingnode.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/ModelInputRoutingNode.png rename to src/main/resources/assets/bloodmagic/textures/models/modelinputroutingnode.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/ModelMasterRoutingNode.png b/src/main/resources/assets/bloodmagic/textures/models/modelmasterroutingnode.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/ModelMasterRoutingNode.png rename to src/main/resources/assets/bloodmagic/textures/models/modelmasterroutingnode.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/ModelOutputRoutingNode.png b/src/main/resources/assets/bloodmagic/textures/models/modeloutputroutingnode.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/ModelOutputRoutingNode.png rename to src/main/resources/assets/bloodmagic/textures/models/modeloutputroutingnode.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/Pedestal.png b/src/main/resources/assets/bloodmagic/textures/models/pedestal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/Pedestal.png rename to src/main/resources/assets/bloodmagic/textures/models/pedestal.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/Plinth.png b/src/main/resources/assets/bloodmagic/textures/models/plinth.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/Plinth.png rename to src/main/resources/assets/bloodmagic/textures/models/plinth.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/Reagent.png b/src/main/resources/assets/bloodmagic/textures/models/reagent.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/Reagent.png rename to src/main/resources/assets/bloodmagic/textures/models/reagent.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/SimpleTransCircle.png b/src/main/resources/assets/bloodmagic/textures/models/simpletranscircle.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/SimpleTransCircle.png rename to src/main/resources/assets/bloodmagic/textures/models/simpletranscircle.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/SteadfastCrystal.png b/src/main/resources/assets/bloodmagic/textures/models/steadfastcrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/SteadfastCrystal.png rename to src/main/resources/assets/bloodmagic/textures/models/steadfastcrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/VengefulCrystal.png b/src/main/resources/assets/bloodmagic/textures/models/vengefulcrystal.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/VengefulCrystal.png rename to src/main/resources/assets/bloodmagic/textures/models/vengefulcrystal.png diff --git a/src/main/resources/assets/bloodmagic/textures/models/WritingTable.png b/src/main/resources/assets/bloodmagic/textures/models/writingtable.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/models/WritingTable.png rename to src/main/resources/assets/bloodmagic/textures/models/writingtable.png diff --git a/src/main/resources/assets/bloodmagicguide/lang/en_US.lang b/src/main/resources/assets/bloodmagicguide/lang/en_US.lang deleted file mode 100644 index be367a5d..00000000 --- a/src/main/resources/assets/bloodmagicguide/lang/en_US.lang +++ /dev/null @@ -1,258 +0,0 @@ -# Book Information -guide.BloodMagic.title=Sanguine Scientiem -guide.BloodMagic.display=Sanguine Scientiem -guide.BloodMagic.author=Blood Magic -guide.BloodMagic.welcome=Blood Magic - -# Page Information -guide.BloodMagic.page.bloodAltar=Blood Altar Recipe -guide.BloodMagic.page.soulForge=Hellfire Forge Recipe -guide.BloodMagic.page.tier=Tier: %d -guide.BloodMagic.page.lp=LP: %d -guide.BloodMagic.page.minimumWill=Minimum Will: %f -guide.BloodMagic.page.drainedWill=Drained Will: %f -guide.BloodMagic.shapelessOrb=Shapeless Orb Recipe -guide.BloodMagic.shapedOrb=Shaped Orb Recipe -guide.BloodMagic.page.alchemyArray=Alchemy Array - - -# Categories -guide.BloodMagic.category.architect=The Architect -guide.BloodMagic.category.ritual=The Ritual Master -guide.BloodMagic.category.demon=The Demon Kin -guide.BloodMagic.category.spell=The Battle Mage -guide.BloodMagic.category.alchemy=The Alchemist - -# Ritual Master Entries -guide.BloodMagic.entry.ritual.intro=Introduction -guide.BloodMagic.entry.ritual.basics=The Basics of Rituals -guide.BloodMagic.entry.ritual.ritualStone=Ritual Stones -guide.BloodMagic.entry.ritual.masterRitualStone=Master Ritual Stone -guide.BloodMagic.entry.ritual.activationCrystal=Activation Crystals -guide.BloodMagic.entry.ritual.diviner=The Ritual Diviner -guide.BloodMagic.entry.ritual.fullSpring=Ritual of the Full Spring -guide.BloodMagic.entry.ritual.lava=Serenade of the Nether -guide.BloodMagic.entry.ritual.greenGrove=Ritual of the Green Grove -guide.BloodMagic.entry.ritual.magnetism=Ritual of Magnetism -guide.BloodMagic.entry.ritual.crusher=Ritual of the Crusher -guide.BloodMagic.entry.ritual.highJump=Ritual of the High Jump -guide.BloodMagic.entry.ritual.speed=Ritual of Speed -guide.BloodMagic.entry.ritual.wellOfSuffering=Well of Suffering -guide.BloodMagic.entry.ritual.featheredKnife=Ritual of the Feathered Knife -guide.BloodMagic.entry.ritual.regen=Ritual of Regeneration -guide.BloodMagic.entry.ritual.harvest=Reap of the Harvest Moon -guide.BloodMagic.entry.ritual.interdiction=Ritual of Interdiction -guide.BloodMagic.entry.ritual.containment=Ritual of Containment -guide.BloodMagic.entry.ritual.suppression=Dome of Suppression -guide.BloodMagic.entry.ritual.expulsion=Aura of Expulsion -guide.BloodMagic.entry.ritual.zephyr=Call of the Zephyr -guide.BloodMagic.entry.ritual.laying=Laying of the Filler -guide.BloodMagic.entry.ritual.timberman=Crash of the Timberman -guide.BloodMagic.entry.ritual.meteor=Mark of the Falling Tower -guide.BloodMagic.entry.ritual.downgrade=Penance of the Leadened Soul - -# Ritual Master Entry Text -guide.BloodMagic.entry.ritual.intro.info=Good evening. My name is Magus Arcana. I have had many guises over the years: a thief and a vigilante, a wizard and a warrior, a roaming nomad and even a politician. The title that I hold nowadays is one that many cannot comprehend, that at the very mention of it brings forth images of brutality that in some cases have been earned but in many others are misguided. I am of course talking about being a Blood Mage, though my friends simply call me Magus whereas my enemies refer to me as The Ritual Master.\n\tMy students have been pestering me for many months now, attempting to get me to document all of the myriad adventures that I have had in some form of book for me to distribute among any aspiring mages. I had been resistant, but it was Tiberius who put it best: "Although you may not see the value of it yourself, hearing the intricacies of any sort of craft from a man who has achieved mastership of the field will prove invaluable for future generations. It doesn't matter how accurately someone else retells it, if you don't have the utmost confidence in a source the gold sand could be nothing more than sulfur." You could tell he was delving into a bit of alchemy at that point, but since he was my first student for a long time I tend to value his opinion.\n\tSo, aspiring Blood Mage, training in the arcane that many yet do not fully understand, lend me your ears for these are words worth heeding: the field that you are studying has many aspects, and without careful consideration you may find your tools lacking. Therefore make sure to review this book often - I have put many enchantments on the tome that you carry with you so that whenever I write in my master copy the words will change for you.\n\tSo sit back, relax, and enjoy the teachings of a very old man. You may learn more than you've bargained for. -guide.BloodMagic.entry.ritual.basics.info=Modern day rituals are a lot different from those that were conducted centuries past. There was a time when people would inscribe arcane constructs out of dust on the ground and dance around until they got what they wanted. I even remember one hermit witch who gathered energy from her garden. I laughed at it all until she sicced her pet owl on me. \n\tThe rituals that Blood Mages use require the precise alignment of marked stones to focus and transform the power that a mage pumps into it. One day, my apprentice Tiberius was rummaging through some of the old artifacts that I had procured over the years in the closet of his new room. There was a vial of liquid Etherium that I haven't touched in ages (I was meaning to get back to that, but I haven't had any time) as well as a crystal ball that always seemed to say "Tuesday" when you peered through the glass. When one of the boxes that was labeled "Runic Dust" was knocked over a small red gem tumbled out and knocked against Tiberius's foot. Immediately a bright ruby light emanated from it and reacted with the dust in the box that he was carrying.\n\tNaturally, an explosion occurred. The unfocused energy that Tiberius inadvertently released through the gem sparked the runic dust and stones around him, and without a means of containing the power it simply was pushed outwards. After a few days in the medical ward, Tiberius and I started to get to work.\n\tThrough a mixture of several sleepless nights and a hardy helping of caffeine (I've really got to thank Mister Player for the coffee supply, I salute your efforts for a more awake tomorrow!) we eventually perfected the key ingredients for all rituals.\n\tThrough our experimentation, we learned that we needed four different things: we needed a bunch of ritual stones placed around an area in a set pattern, a few different inks that are applied to the ritual stones to help further specify the pattern, a central ritual stone that acts as a central conduit of power, and a crystal that activates the ritual. I think it's best to talk about these one by one. -guide.BloodMagic.entry.ritual.ritualStone.info.1=The Ritual Stone acts as a simple receptacle for magical energy, shaping it and further redirecting it in different ways depending on how the stone is configured. When you start off, there are five different stones that you have access to: Blank (the base stone that does not have any markings applied), Water, Fire, Air, and Earth. Every single ritual will have a number of these, and depending on how they are arranged around the Master Ritual Stone the overall effect will be different. -guide.BloodMagic.entry.ritual.ritualStone.info.2=In order to inscribe the correct symbols onto the ritual stones you must have a set of inscription tools. I have since developed a method for people to more easily apply the correct inks to the ritual stones while placing them in the correct configuration, but if one were to wish to do this manually they can use these tools. When you activate a ritual stone with one of the inscription tools in your hand (right clicking on the stone) you will apply some ink to the stone, changing it to the same type as the tool. In early tiers, you only have access to the base four colours, however once you become more powerful you will have more tools at your disposal. -guide.BloodMagic.entry.ritual.masterRitualStone.info=As with most magics, without a guiding force the effect of the ritual will either become uncontrollable or simply will not work at all. Thus, in order to control the rituals a Master Ritual Stone is required (I usually abbreviate this to "MRS" in my notes, but saying it in public is a little awkward. "I need more mrs please!"). The MRS takes in power from the owner's Soul Network and pushes it through the ritual stones, thus performing the ritual. \n\tAttaching the Soul Network to a large stone that we don't hold in our hands proved to be a bit tricky. I managed to do this one time by meditating on top of the stone in the lotus position, focusing my power through the stone and trying to link the tendrils of my network into the inner workings of the ritual. Although I got it working for a few minutes, all I was really awarded was a pair of wet pants as water condensed onto the ritual stones. I've learned to not meditate on any of my experiments again. -guide.BloodMagic.entry.ritual.activationCrystal.info.1=Instead of waiting an hour at a time to meditate a ritual active, we took the red gem that fell out of the box originally and started to analyze it. Tiberius was certain that it had the ability to "establish links between the corporeal realm of our reality and the incorporeal essence that is the manifested Soul Network." Sometimes I wonder if it was a good idea to have him become my apprentice, but it is times like these that I see his knack for the more arcane aspects of magic. Oh, I should probably write what he meant in English: by using this crystal, we could link our soul networks to the Master Ritual Stone in order to supply it with energy. -guide.BloodMagic.entry.ritual.activationCrystal.info.2=Thus we had ourselves a Weak Activation Crystal and a means in which to recreate its structure. The main ingredient for the crystal is another crystal that can be linked to my Soul Network: a Lava Crystal. Then, by quickly inscribing some instructions onto the crystal's surface the Blood Altar can do the rest of the work to transmute it into an activation crystal. Naturally, this crystal has to be bound to the user's soul network in order to function. When the ritual's stones are laid correctly around the MRS, the user should touch the activation crystal to the MRS and push out enough energy to jump start the ritual in question. If you have enough LP inside of your Soul Network the ritual will activate. If you do not, or if the stones are not laid out correctly, the ritual will simply not activate and no LP cost is incurred. -guide.BloodMagic.entry.ritual.diviner.info.1=After discerning the size and layout of many rituals I started to find it a little bothersome to continually consult my notes in order to build the rituals. That is why I worked to create a device that would allow anyone to simply place down the stones in the correct position through simple gestures and movements. I've placed this entry further up the list chronologically because it is best for people to learn of this item before starting with the actual construction of rituals. Otherwise they may find out that they don't have everything they need, or will summon a meteor from hell instead of a fresh bottle of spring water. -guide.BloodMagic.entry.ritual.diviner.info.2=The Ritual Diviner is essentially an encyclopaedia for rituals. By cycling through the diviner (shift-left click and shift-right click) you can select a different ritual from its store of knowledge. Gazing into the diviner will also tell you some simple information about the ritual. If you have Ritual Stones on your person and you touch the diviner onto the MRS (right click) you can place a stone for the ritual you want to construct. Doing this enough times will net you a completed ritual! -guide.BloodMagic.entry.ritual.fullSpring.info=A few years ago a travelling merchant stopped by the village near my house, peddling his wares to all who were willing to part with their coin. There was a drought at the time and the crops were dying, so the merchant brought forth a silver talisman with a blue gem set inside of it. "This, my friends," he said with great zeal, "will make sure that your rivers will not dry out! By using alchemy I can bring forth water from the very air!"\n\tUnfortunately for the village it seemed that the gem was a simple piece of sapphire, and before anyone realized that they were tricked he was already several miles away. I tend to not intervene in the affairs of the village because they tend not to like my magic, but in this case I made an exception. After I had a lovely chat with the "alchemist," I spent a few hours meditating near the irrigation channels. By condensing the water vapour in the air I managed to create enough water to keep the crops watered until the next downfall. This wasn't exactly an efficient method and I was drained for the next few days, using some of the water from the channel to rehydrate myself.\n\tRemembering this, I employed the same principles to create the Ritual of the Full Spring. By channeling a small amount of energy into the ritual, it condenses the moisture in the air around it to produce a source of water on top of the master ritual stone. The cost to activate the ritual is fairly insignificant, and the maintenance even more so. \n\tThe water's range can be expanded by using the ritual tinkerer and even placed in a different location, so one does not need to worry about where a ritual is placed if they are worrying about aesthetics. The miracles of magic! -guide.BloodMagic.entry.ritual.lava.info=Lava, perhaps one of the most rudimentary power sources. I tend not to use it much in my own research because it can be a little difficult to work with - it's not like you can use a simple iron bucket to pick some up! \n\tOne of the local tinkerers came by my house one day asking me if there were any sources nearby since they recently acquired some new hardware that they needed to power. I said that there were a few but most of them were already owned, but I decided to come to his place to look at the contraption.\n\tIt was a smeltery at least 5 metres high and just as wide, hooked up to several tanks that stood empty and barren. Although I wasn't entirely sure on how it operated I could tell that the raw heat of lava would be perfect for it - electricity would work well if it was modified correctly, but I could tell this wasn't from Immersive Industries. \n\tAfter a small chat with the tinkerer money changed hands and I asked him to stand back as I prepared my ritual stones. To enact what I wished I took four fire stones and arranged them in a cross around the master ritual stone and then pushed hard with my activation crystal while imagining the process in my head. In theory, it should be simple: take some rocks from deep in the earth and compress them with some energy, causing them to melt under the intense pressure and turn molten. This lava could them be retrieved off of the ritual stone and the process can be repeated.\n\tWhile simple in theory, in practice it was a little difficult. For my simple network at the time, the activation cost was quite steep because of the initial pressure required, and the drain for each source of lava was not something I was prepared for. (20000 LP to activate, 500 LP per source block)\n\tI staggered out of the building with a grin on my face, however: the tanks were full of lava, enough to keep the tinkerer in business for a couple fortnights until he could procure a more permanent source of lava. I made sure to pick up my ritual stones after I finished, though. \n\t----------\n\tWith no modifications to the ritual, the ritual will attempt to place a source of lava on the block directly above itself at a cost of 500 LP every tick if there is room, displacing liquids if they are flowing. This placement range, by default, can be expanded to a maximum of 9 blocks at a maximum distance of 3 away from the ritual.\n\tBy augmenting the ritual with Raw Will, the LP cost will decrease in proportion to the Will that is in the Aura, consuming Will proportional to the amount of LP that is saved. Using this Will can also grant the ability to place lava directly into a block's internal tanks, at a rate comparable to normal ritual operations.\n\tCorrosive Will causes the ritual to invert the invincibility granted from fire immunity, causing all entities that are immune to fire within a set area to be damaged severely based on the amount of Will in the Aura. Those that are not immune to fire are unhurt by this effect.\n\tWhen Vengeful Will is applied to the ritual, a volatile gas is released and causes all non-player entities within its specified range to be affected by Fire Fuse. When the timer of the debuff goes to 0, the entity will explode, forcefully propelling them into the air with explosive force.\n\tDestructive Will increases the maximum range and volume that the ritual may influence. The more Will you have, the more lava blocks that can be placed by a single ritual. Thankfully, the ritual does not drain any Destructive Will, however if your Will drops and the ritual's maximum range is lower than what you set it at, the ritual will not work at all until fixed.\n\tFinally, Steadfast Will grants all players within its range a Fire Resistance buff, whose time applied and cost in Will is affected by the amount of Will in the Aura. Careful note should be taken, because if you are affected by Fire Resistance you can be damaged by the ritual's Corrosive effect. -guide.BloodMagic.entry.ritual.greenGrove.info=Last week I started to teach Tiberius his cross-disciplinary magic. Every apprentice that I have had has had to learn another form of magic while learning Blood Magic. It doesn't matter much which one they choose as long as it does not consume some form of finite resource - I used to employ a form of magic from the Ars clan from the far East, but since the world's source of Etherium was consumed into scarcity it died out long ago. \n\tTiberius decided to learn Thaumaturgy, which employs using the magic of the world to perform your magic. This is a good counterbalance to Blood Magic, which uses the magic of life. As such, these magics use different means to perform the same tasks. To demonstrate I decided to highlight the differences to Tiberius when it comes to crop growth.\n\t"Thaumaturgy uses a growth catalyst that is fueled by the essentia Herba," I state while pointing towards the Essentia Flowchart that was pinned to the classroom wall. Sure, Tiberius was sitting at the only desk there, but sometimes a guy has to have some fun. "A small trickle of Aura and this essentia stimulates the photosynthetic process of the plant, encouraging it to grow by giving it more solar energy. This process requires that the soil is well fertilized, or else the crop can simply wither and die."\n\tI then take four earth and water ritual stones and place them in a circle around a master ritual stone. "Conversely, Blood Magic uses a different process." While speaking, I activate the ritual and cover it with some simple dirt. "By using your life force or the energy of animals, you can fertilize the plants in such a way that they don't need as much fertilizer. In essence, it force-feeds the plants so that they always have a high concentration of nutrients."\n\tI throw a few seeds onto the dirt and cover them slightly, uncorking and emptying a vial of water from inside my robes. "This process doesn't need any extra sunlight, because it uses a different source of energy. Though it does work much better when there is some light - the plant isn't exactly used to these sorts of conditions!"\n\tA few shoots have already poked their leaves out of the dirt while I was explaining, seemingly waving in response. I felt the mild strain on my body as each new leaf sprouted, minor each time but when accumulated it started to stack up. Once I finished the class I cleared up the dirt from the experiment and decided to have a nice stroll to the village: I had a bushel of wheat that needed selling. \n\t----------\n\tThe Ritual of the Green Grove, as the name may suggest, accelerates the rate of growth of plants that are nearby. By using the player's blood as a rich fertilizer, it will attempt to grow anything that it deems as a plant, such as wheat and carrots, growing anything within its range periodically. Through default operations, the ritual will look at the 3x3 area two blocks above itself and attempt to grow each block with a 30%% success rate every second. If manipulated with the Ritual Tinkerer, the ritual can handle a maximum of 81 crops at a time within a 5 block radius of the MRS. As another note\n\tWhen augmented with Demon Will, there are several effects that can be obtained. If Raw Will is used, the ritual will perform all operations at an accelerated rate, consuming 0.05 Will per successful growth and increasing its speed relative to how much Will is in the Aura.\n\tIf infused with Vengeful Will, the ritual will consume 0.05 Will per successful growth and will increase the chance that a given operational tick will be successful on the plant. By default without Will it is 30%%, but for instance if you have 100 Vengeful Will the rate will increase to 80%%.\n\tDestructive Will increases the effective maximum range of the ritual, meaning the more Will you have the more crops/plants a single ritual can handle. Thankfully, the ritual does not drain any Destructive Will, however if your Will drops and the ritual's maximum range is lower than what you set it at, the ritual will not work at all until fixed.\n\tSteadfast Will grants the ability to set an area around the ritual that will be automatically tilled and hydrated. Additionally, any seed that is within this range will be planted on a nearby block if possible. This costs a small amount of Steadfast Will, and its effects do not scale with Will in the Aura.\n\tWhen Corrosive Will is used in the ritual, the fundamental nature of the ritual may shift. When supplied and the new range is properly set, any mobs that enter in the ritual's area of influence will have the "Leech" effect applied. Every few ticks, the plants near the mobs will be damaged and the mob will be damaged proportionally. Fertilizing with mobs directly can prove beneficial! Every 10 seconds that the debuff is applied per mob, 0.2 Corrosive Will will be consumed. -guide.BloodMagic.entry.ritual.magnetism.info=The Ritual of Magnetism is the bread and butter of anyone who enjoys quarries. The ritual creates a revolving magnetic field, pulling up the rich ores from the ground underneath it and placing the contents in its area. This does not displace any rock, so no gaping holes will appear in the land - assuming that the land isn't made up entirely of ore. The ritual operates once every 40 ticks and costs 50LP per successful operation.\n\tThe default radius that this ritual operates is 3 blocks in each cardinal direction, giving an area of 7x7 blocks centered on the MRS. Because the ritual currently does not have any Will augments, you can only increase the radius of effect for the ritual by placing a valuable block directly underneath the MRS. If an iron block is used the radius becomes 7. If a gold block is used, the radius becomes 15. Finally, if a diamond block is used the radius expands to 31, meaning any ores below the ritual in a 63x63 area will be slowly pulled up into its 3x3x3 volume above the MRS. -guide.BloodMagic.entry.ritual.crusher.info=The Ritual of the Crusher's operation is rather simple. The ritual needs to have some form of inventory linked to it, which when unaltered simply sits on top of the MRS. While in operation, the ritual will look inside of its crushing range (by default the 3x3x3 area below the ritual) and break one block at a time at a rate of once every 2 seconds at the cost of 7 LP per successful operation. The broken blocks will then be transferred to the linked inventory - if there is no room for the items, they will instead be spewed on top of the chest.\n\tWhen fueled with Raw Will, the ritual will work at a faster rate based on the total amount of Will in the Aura. While sped up, it will consume 0.05 Raw Will per successful operation.\n\tDestructive Will causes blocks that are broken by the ritual to have Fortune applied to it. Currently the fortune level does not vary and is instead level 3 regardless of the Will amount. This will consume 0.2 Will per successful operation, regardless of whether it was useful.\n\tSteadfast Will will instead cause blocks to be broken with the Silk Touch effect. This costs 0.02 Will per operation, and will override the Destructive effect where possible.\n\tCorrosive Will makes it so that blocks that are broken by the ritual will be processed with some form of cutting fluid. This means that for instance if it is an iron block the result will be two pieces of iron sand. The current "cutting fluids" that the ritual uses are: Basic Cutting Fluid and Explosive Powder. The ritual consumes a different amount of Will based on what was used, and will only consume the Will if the effect applies. This overrides Silk Touch where applicable.\n\tVengeful Will causes it so that when a successful operation takes place the inventory has its contents compressed similar to the Sigil of Compression: if there is 65 redstone dust inside of the chest, one block of redstone will be crafted and 56 dust will remain. Will is only consumed when this is successful, and it costs 0.2 Will. -guide.BloodMagic.entry.ritual.highJump.info=This ritual uses a huge burst of air to propel all those who walk on top of it into the sky. What is more, if the user lands in the ritual's area of effect they will not suffer any fall damage. Players who sneak inside this ritual also are not affected.\n\tThe ritual costs 5LP per entity per tick of successful operation, so it won't cost anything if it doesn't fling people in the air. -guide.BloodMagic.entry.ritual.speed.info=As the name may suggest, the Ritual of Speed is used for transportation of various sorts. The ritual may be placed in the direction of any of the cardinal directions and any entities within its range will be launched in the direction that the ritual is pointing. When looking at a ritual, this direction is where the dusk ritual stone is. By default, the ritual has a radius of 2 blocks from the MRS, though this can be expanded or contracted when using a ritual tinkerer. This will apply a speed of 3 blocks/tick in the direction of the ritual and 1.2 blocks/tick vertically.\n\tIf the ritual is fueled with Raw Will, the speed of the ritual is increased substantially based on the Will that is in the Aura. For instance, the speed will be doubled if there is 100 Will inside of the Aura. For each successful operation, 0.1 Will is consumed.\n\tVengeful Will prevents the ritual from moving adult mobs, and Destructive Will prevents the ritual from moving child mobs. If either one of these are used, players are also prevented from using the ritual. If both of them are used, however, the effect is that only players may use the ritual and mobs cannot. These augmentations can be used effectively for sorting animal farms or even getting rid of those pesky child zombies in your sacrificial pen. The ritual will consume 0.05 Will for each type that is in effect on successful operation, so if a child enters the ritual space when you use Destructive Will it will not cost Will or LP. -guide.BloodMagic.entry.ritual.wellOfSuffering.info=For those of you who prefer to use mobs instead of your own health, the Well of Suffering damages all living non-player entities in a 10 block radius and places the health in a connected altar. The ritual will look for a blood altar within its range, checking 5 blocks horizontally and 10 blocks vertically unaltered. When it finds an altar, it will store its location internally - if there isn't an altar nearby, the ritual will not work. The ritual will deal 1 HP per entity and place 25 LP into the altar (100 for peaceful animals), which can be augmented with Sacrifice runes. -guide.BloodMagic.entry.ritual.featheredKnife.info=The Ritual of the Feathered Knife taps into the user's body, draining away their life force in order to fill a blood altar nearby. The ritual will look for a blood altar within its range, checking 5 blocks horizontally and 10 blocks vertically unaltered. When it finds an altar, it will store its location internally - if there isn't an altar nearby, the ritual will not work. When a player then enters within the ritual's damage range, which by default is a radius of 15 blocks horizontally and 20 blocks vertically, the ritual will damage the player for 1HP and then place that health into the connected altar directly (respecting blood runes). There are some safety mechanisms on the ritual, which cause it to not work on a player with less than 30%% of their max health. Unaugmented, the ritual does this once every second.\n\tThere are a few useful augmentations that you can use if you use Demon Will. If Raw Will is consumed by the ritual, the ritual will attempt to damage players within its range at a faster rate, operating twice per second. The ritual will consume 0.05 Raw Will per successful operation.\n\tIf you have more than 10 Steadfast Will in the Aura, the ritual will increase its safety threshold and instead will not work on players with less than 70%% health. This function currently does not consume Will.\n\tIf you have more than 10 Vengeful Will in the Aura, the ritual will remove some of its safety limitations, causing it to work on players until they only have 10%% of their maximum health left. If the ritual also has Steadfast Will augmented onto it the threshold will still be 70%% for the owner of the ritual only. This function currently does not consume Will.\n\tWhen Destructive Will is applied to the ritual, the ritual becomes a lot more efficient with its HP to LP conversion. The amount of LP that is added to the altar per health point increases based on the Will in the Aura, up to a maximum of +20%% for 100 Destructive Will. This effect stacks multiplicatively with runes, Living Armour Upgrades, and Incense. This consumes 0.05 Destructive Will per HP sacrificed.\n\tSpeaking of incense, if Corrosive Will is used in the ritual the ritual will respect the effects of incense on you. If you do not have the Soul Fray debuff on and you are empowered by an Incense Altar, the ritual will consume all of your HP up to the set threshold and pump all of the resultant LP into the altar. It will also remove the incense that you incurred and apply Soul Fray onto you. This effect stacks with the Destructive Will buff. -guide.BloodMagic.entry.ritual.regen.info=Arguably one of the best rituals for any potential Blood Mage who wishes to use his own life force to fuel his magic, the Ritual of Regeneration casts a veil of energy around itself, healing entities that find themselves within its range. Every 2.5 seconds the ritual will cast Regeneration I on living entities in its 15 block radius, costing 100LP per player and 10LP per other living entities for the 2.5 seconds of regen. \n\tIf Corrosive Will is used to augment the ritual a second range will be available, a "vampiric range". Any non-player entities within this range will be randomly damaged in order to directly heal players within the regular healing range. This costs 0.04 Will to use and will transfer 1HP per operational tick. -guide.BloodMagic.entry.ritual.harvest.info=This ritual will seek any harvestable plant block within its range (default is the 9x9x5 high area above the MRS) and try to harvest it, replanting any seeds if the plant can drop seeds. All of the drops from the plant will appear where the plant was harvested. The ritual will attempt to harvest plants once every 5 ticks and will cost 20LP per successful operation.\n\tPlants that can be harvested include, but are not limited to: pumpkins, wheat, carrots, potatos, nether wart, cactus, reeds. Keep in mind that the ritual makes no assumptions about the thing it is harvesting - it can only harvest mod-added crops if the mod in question registers a harvesting handler with the mod. -guide.BloodMagic.entry.ritual.interdiction.info=Based on an archaic alchemical device of legend, the Ritual of Interdiction attempts to forcibly push all non-player mobs away from the center of the ritual. By default, all mobs that are within two blocks of the MRS are pushed away from the MRS by setting their velocity. It should be noted that mobs within this range are not affected by fall damage, though that safety net wares off as soon as they are pushed away. -guide.BloodMagic.entry.ritual.containment.info=The opposite of Interdiction, the Ritual of Containment attempts to pull mobs within its area of effect towards the space above the MRS, suspending them in the air where they cannot move. The default range of the ritual is a 3 block horizontal radius from the bottom of the master stone to the top of the top-most runes, though this range can of course be altered.\n\tThis ritual costs 1LP per mob pulled every tick. -guide.BloodMagic.entry.ritual.suppression.info=The Dome of Suppression "suppresses" all liquids in a set radius, able to temporarily replace fluids in a hemisphere with a 10 block radius with air. If the ritual is turned off, this fluid will return in the same state it was before. This costs 2LP per operational tick. -guide.BloodMagic.entry.ritual.expulsion.info=If you play on a server you can face a situation where you have unwanted player visitors. Sometimes force fields and giant bloody rotors are not enough of a deterrent and they still manage to get into your base. This ritual attempts to alleviate this through the use of teleportation magic!\n\tIf a player that is not the owner enters the range of the ritual (default 12 block radius) the ritual will teleport the player randomly within a radius of 100 blocks away. However, if there is a chest on top of the MRS with a bound item from a player that player will be exempted from the teleportation, acting effectively like a whitelist.\n\tThe ritual costs 2000LP per successful teleportation. -guide.BloodMagic.entry.ritual.zephyr.info=Modelled after an ancient sword of proverb, the Call of the Zephyr uses the power of wind to collect the items that are around it and place them inside of the linked chest (default is right above the MRS). This is done instantly, meaning that the items are teleported directly into the inventory - no need to worry about weird suction effects!\n\tThe default item radius is 5 blocks away from the MRS. -guide.BloodMagic.entry.ritual.laying.info=As many are aware, being able to place blocks can be important in various automation tasks. This ritual takes the items/blocks from the connected chest (defaults to on top of the MRS) and places the blocks within the ritual, which is a radius of 2 on the same level as the MRS. This can be useful if you are trying to lay out saplings for a tree farm or if there are other blocks that must be placed. The ritual takes 50LP per successful operation. -guide.BloodMagic.entry.ritual.timberman.info=Got wood? This ritual has you covered. The Crash of the Timberman tethers a spectral entity using the LP of the owner to harvest the leaves and logs of all trees within its range and places the results inside of the connected chest. It will try to find all "trees" in a 10 block horizontal radius and up to 30 blocks above the MRS (by default) and use 10LP per felled block. -guide.BloodMagic.entry.ritual.meteor.info=For all intents and purposes, this is one of the most powerful rituals currently in the game. It costs one million LP to activate and can only be used once before needing to be reactivated. The ritual, once specific sacrifices are made, pulls a meteor from outer space and causes it to plummet towards the ground, causing a large explosion once it hits something solid. Because these meteors are not from the Overworld, they can hold a rich ore density never seen anywhere else.\n\tSacrifices can include: an iron block, a gold block, a diamond. This is configurable by the mudpack or user. -guide.BloodMagic.entry.ritual.downgrade.info=In order to gain more power, sometimes you have to sacrifice something in return. The Penance of the Leadened Soul does just that - by sacrificing a few items to an unseen entity, you may reduce the effectiveness of some aspect of your Living Armour and get an increase in the number of upgrade points as compensation. When you construct the ritual you have to place an item frame on the top-most Blank ritual stone facing towards the Master Ritual stone, and some sort of inventory (see: chest) on top of the Dusk ritual stone. To acquire a Living Armour Downgrade, you then have to place the key item in the item frame and the consumables in the chest. Once the ritual is activated, you can sneak on top of the Master Ritual Stone at any time and acquire the downgrade.\n\tIn the case of the Quenched Living Armour Downgrade, its key item is a water bottle (placed in the item frame) and the recipe is Dragon's Breath (placed in the chest). The key item is never consumed, but the recipe is.\n\tIn order to view the recipe for the downgrades you can look them up in JEI - check the usage of the Master Ritual Stone and you will see the recipes for the Penance ritual. Also you can just check the recipe for the max level downgrade in JEI and then check the usage of the key item - the key item is always the same for the specific downgrade. - -# Architect Entries -guide.BloodMagic.entry.architect.intro=Foreword -guide.BloodMagic.entry.architect.bloodaltar=The Blood Altar -guide.BloodMagic.entry.architect.ash=Arcane Ash -guide.BloodMagic.entry.architect.divination=Divination Sigil -guide.BloodMagic.entry.architect.soulnetwork=Soul Network -guide.BloodMagic.entry.architect.weakorb=Weak Blood Orb -guide.BloodMagic.entry.architect.incense=Incense Altar -guide.BloodMagic.entry.architect.bloodrune=Upgrading your Altar -guide.BloodMagic.entry.architect.inspectoris=Inspectoris Scandalum (Block Reader) -guide.BloodMagic.entry.architect.runeSpeed=Speed Rune -guide.BloodMagic.entry.architect.water=Water Sigil -guide.BloodMagic.entry.architect.lava=Lava Sigil -guide.BloodMagic.entry.architect.lavaCrystal=Lava Crystal -guide.BloodMagic.entry.architect.apprenticeorb=Apprentice Blood Orb -guide.BloodMagic.entry.architect.dagger=Dagger of Sacrifice -guide.BloodMagic.entry.architect.runeSacrifice=Rune of Sacrifice -guide.BloodMagic.entry.architect.runeSelfSacrifice=Rune of Self Sacrifice -guide.BloodMagic.entry.architect.holding=Sigil of Holding -guide.BloodMagic.entry.architect.air=Air Sigil -guide.BloodMagic.entry.architect.void=Void Sigil -guide.BloodMagic.entry.architect.greenGrove=Sigil of the Green Grove -guide.BloodMagic.entry.architect.fastMiner=Sigil of the Fast Miner -guide.BloodMagic.entry.architect.seer=Seer's Sigil -guide.BloodMagic.entry.architect.magicianOrb=Magician Blood Orb -guide.BloodMagic.entry.architect.capacity=Rune of Capacity -guide.BloodMagic.entry.architect.displacement=Displacement Rune -guide.BloodMagic.entry.architect.affinity=Sigil of Elemental Affinity -guide.BloodMagic.entry.architect.lamp=Sigil of the Blood Lamp -guide.BloodMagic.entry.architect.magnetism=Sigil of Magnetism -guide.BloodMagic.entry.architect.peritia=Tome of Peritia -guide.BloodMagic.entry.architect.livingArmour=Living Armour -guide.BloodMagic.entry.architect.upgradeTome=Living Armour Upgrade Tomes -guide.BloodMagic.entry.architect.teleposer=Teleposer -guide.BloodMagic.entry.architect.boundBlade=Bound Blade -guide.BloodMagic.entry.architect.boundTool=Bound Tools -guide.BloodMagic.entry.architect.weakShard=Weak Blood Shard -guide.BloodMagic.entry.architect.masterOrb=Master Blood Orb -guide.BloodMagic.entry.architect.runeOrb=Rune of the Orb -guide.BloodMagic.entry.architect.suppression=Sigil of Suppression -guide.BloodMagic.entry.architect.haste=Sigil of Haste -guide.BloodMagic.entry.architect.severance=Sigil of Ender Severance -guide.BloodMagic.entry.architect.teleposition=Teleposition Sigil -guide.BloodMagic.entry.architect.compression=Sigil of Compression -guide.BloodMagic.entry.architect.bridge=Sigil of the Phantom Bridge -guide.BloodMagic.entry.architect.mimic=Mimics -guide.BloodMagic.entry.architect.downgrade=Living Armour Downgrades - -guide.BloodMagic.entry.architect.augmentedCapacity=Rune of Augmented Capacity -guide.BloodMagic.entry.architect.charging=Charging Rune -guide.BloodMagic.entry.architect.acceleration=Rune of Acceleration - -# Architect Entry Texts -guide.BloodMagic.entry.architect.intro.info=Hello, everyone. My name is Tiberius. You can probably tell by this entry that the book is not exactly complete, and you would be right. Because of the 1.7.10 -> 1.8.9 and 1.9.4 (and above) updates, a lot of stuff has changed in the mod. As such, the books have had to be rewritten. Because the ultimate plan for these documents is to have each book in the form of a research journal / actual book, these documents will take a while to flesh out. As such, I am going to be updating this book periodically in order to fill in the necessary gaps. It will start as flavourless garbage to start with (Yeah... not the most appetizing of illustrations to go with for documents, but whatever!), but slowly it will be morphed into a story about a bunch of blood magi on a journey through discovery.\n\tBut enough about that, I need to get into character. *Cough cough*\n\tMy name is Tiberius, and I am a Blood Mage, and also otherwise known as The Architect. This book contains all of my research regarding the ethereal phenomenon called the "Soul Network," as well as the physical properties of some of the most central devices that any Blood Mage in training should be accustomed to. From the art of laying out the structure of a powerful Blood Altar, to the intricacies of sacrificing life force to increase a mage's power, and further to the powers gained through arcane glyphs and sigils, I have discovered, revised, and created new ways into train one's self to new heights.\n\tSo enter, Mage, for a new realm awaits you!\n\t...Yeah, Magus says that I can get a little grandiose, but what can you do? -guide.BloodMagic.entry.architect.bloodaltar.info.1=The Blood Altar is one of the most central devices in the mod. There are two main uses for the altar: either for crafting certain items essential for progressing through the mod, or for filling up one's Blood Orb. Both of these actions require the player to fill up the basin with Life Essence, which can be extracted from two different sources: monsters and peaceful creatures, and the player's own health. -guide.BloodMagic.entry.architect.bloodaltar.info.2=To add your own Life Essence into the basin, you need to craft yourself a Sacrificial Knife and right click it while next to the altar. This will take a heart of health and add a total of 200LP to the unupgraded altar. "LP" is Life Points, which is a measure of how much life force is used in a task - no, it is not like YuGi-Oh. The Blood Altar has a capacity of 10,000LP. If you then right-click on the altar, you can place an item into the basin, and if it is a valid item the altar will start the crafting process.\n\tThe altar crafts an item by consuming the LP in the basin if the altar is a high enough tier. If there is enough LP, the altar will drain a bit of LP from the basin each tick and increase the progress of the crafting, emitting red particles. If there is no longer any LP in the basin, the altar will emit gray particles and the crafting will start to lose progress, which is not good at all! Finally, if the altar is filling up a Blood Orb, the altar will emit purple particles to indicate it is syphoning LP from the basin.\n\tThere are actually a total of three tanks in the Blood Altar: the main tank, which has a default capacity of 10 kLP as previously indicated, as well as an input tank and an output tank which both have 10%% of the total capacity of the main tank. Every 20 ticks by default, the LP in the input tank will transfer to the main tank at 20LP/s, and the LP in the main tank will transfer to the output tank at 20LP/s. As the names suggest, the input tank accepts the LP that is pumped into the altar acting as a buffer to limit the speed of transferring from outside sources, and the output tank can be pulled from using pipes out of the altar. -guide.BloodMagic.entry.architect.ash.info=Although not strictly part of the overall theme of this book, Arcane Ash is necessary in order to progress through the mod and get some of the more powerful devices available. This ash is crafted using the Hellfire Forge and Demon Will, so if you are new to this concept please consult the "Demon Kin." In essence, this is a way to craft items out of two separate items: a reagent of some sort to act as a catalyst, and a secondary item. \n\tThe ash has a total of twenty uses before you need to craft another. When you right click on the ground (or a wall, though it will only render one direction), you will inscribe a simple circle out of ash. If you click on the ash again with an item, it will be "placed inside of the ash" - assuming that this item is a valid catalyst, the circle will change shape to represent that it is ready for the next item. If it doesn't change shape, then you did something wrong.\n\tOnce it has changed shape, you can then place in the secondary item. If this item matches with the first item, the circle will start rotating and performing different actions depending on the recipe it is working on. After a while, if properly executed, an item will pop out.\n\tAll of the recipes for the Arcane Ash crafting (I call it Alchemy Array Crafting) can be found in JEI by checking the uses for Arcane Ash - the first item shown is the catalyst, and the second item is the secondary item. -guide.BloodMagic.entry.architect.divination.info=The Divination Sigil is one of the most useful tools in the mod, able to tell you many values that will make your life easier. This sigil is crafted using a piece of redstone and a blank slate (crafted in the Blood Altar) using an alchemy array.\n\tWhen you right click a Blood Altar with the sigil, you can see the current tier, amount of LP inside of the main basin, as well as the max capacity of the Blood Altar. Spam-clicking the altar with the sigil will overwrite the previous text from the sigil, meaning that there will not be any spam in your chat.\n\tIf you right click in the air with the sigil, the sigil will tell you the current amount of LP that is in your Soul Network. Although this is rather mundane to start with, this function alone will make it very likely that you will want to keep this sigil on you at all times. -guide.BloodMagic.entry.architect.soulnetwork.info=The Soul Network (commonly abbreviated as SN) is the term for the connections between the player and all of the items and structures that they have linked their soul to. When a blood mage becomes more powerful, the strength of their soul increases and thickens these bonds. These connections are ethereal strands of the soul, and only the most powerful of Blood Magi are able to see these in their physical form. To date, no mage has attained this ability...\n\tIn-game, the Soul Network is tied directly to the player. The data is stored inside of the world, and every player has only a single network - the LP placed into the network is not stored in any item, but is instead placed and drawn from a single pool. \n\tTo bind things to your network, the most common way is to simply right click an item that uses a network to power itself. Once bound, the item will indicate that it is owned by you and it can never be unbound (with current technology). If this item is used and it has an LP cost attributed to it, it will take the LP from the owner's network. If there is not enough LP in this network, it will take the missing LP directly from the user's health (not the owner's). Be careful when using items when you have a low amount of LP - it could end up being deadly. -guide.BloodMagic.entry.architect.weakorb.info.1=What good is any mage without a power source? A Blood Orb is a device that consumes physical LP and transfers it into the owner's Soul Network. Although not a battery itself, it does act as a conduit in order to fill up the power reserves of the blood mage. -guide.BloodMagic.entry.architect.weakorb.info.2=The Weak Blood Orb is the first such orb that you can make. By infusing a diamond inside of a Blood Altar with 2 kLP, you can create this orb. When bound and placed inside of an altar with some LP in it, the orb will syphon from the basin and transfer that LP directly into the network. Each orb has a maximum capacity that can only be extended by advanced runes on the altar. For the Weak Blood Orb, this maximum capacity is 5 kLP.\n\tBlood Orbs can also be filled directly from the player by simply right-clicking with them - this will transfer a heart of health into the orb and give you 200LP. This cannot increase past the orb's maximum capacity.\n\tA Blood Orb can only be filled by its tier of altar or higher; this means that if you have a T3 orb, it has to be filled in an altar that is greater than T3. A simple T1 altar would not do in this situation. -guide.BloodMagic.entry.architect.incense.info.1=One will quickly find that the speed of LP generation can become increasingly burdensome. Sure, by adding special runes to the Blood Altar you are able to increase the yield of self-sacrificing, but this can be a slow process all the same. If only there was a way to further increase how much LP you can get from yourself?\n\tEnter the Incense Altar. The Incense Altar acts as a central point for a tranquil area, calming the soul itself with the gentle wafts that emanate from the basin. Where this scent comes from you aren't entirely sure, but what could possibly go wrong?\n\tThe goal of this block is to create an area of tranquility to increase how much LP you get from a heart of health. When you are near the block (about five blocks) fire particles will be emitted to show that it is working - when you are affected by this tranquility, your Sacrificial Dagger will transform to indicate that you have an increased yield at the Blood Altar. This process takes about 5 seconds, and you will know you are finished when the fire particles stop appearing. At this point, if you use your Sacrificial Dagger at the Blood Altar you will sacrifice 90%% of your maximum health all at once and pump LP into the altar proportional to the amount of health sacrificed multiplied by a bonus based on how tranquil the surrounding area is: this bonus is +20%% by default.\n\tAs a side note, the Divination Sigil can be used on the Incense Altar to determine the amount of Tranquility as well as how much of a bonus the current altar gives. -guide.BloodMagic.entry.architect.incense.info.2=Of course just an additional 20%% is all well and good, but it can be further expanded by expanding the range of influence of the Incense Altar. If you place a row of three Wooden Path blocks two blocks away from the incense altar in each of the cardinal directions (making sure that all path blocks are on the same y-level, up to five blocks up or down from the incense altar) you can define an area. Any block placed within this area (a block that is the same distance horizontally away from the Incense Altar as the path blocks are horizontally, and on the same level or up to two blocks higher vertically from the path blocks) can add to the Tranquility of the Incense Altar. Another row of path blocks can be added past this initial row following the same rule: the new row must all be on the same y-level as each other, and the entire row has to be within 5 blocks vertically from the previous row of path blocks. This means that layouts such as pyramids, inverted pyramids, or more advanced staircase structures are possible.\n\tAll path blocks have a maximum distance that they can be from the Incense Altar in order to take effect. The Wooden Path blocks are able to work up to a total of three rows from the Incense Altar. Stone paths work up to five, worn stone paths seven and obsidian paths to nine. So at a certain point you have to use better path blocks to extend your tranquility area, however you can use higher tiered path blocks in place of lower tiered path blocks, just not the other way around.\n\tBack to Tranquility. Only certain blocks are able to affect the Tranquility of an area, and there are different types of Tranquility blocks. If you place a crop such as potatoes in the area, you add a bit of Tranquility (using the Crops category). However, if you add another crop like potatoes again or even carrots, you will get less tranquility. Adding something from a different Tranquility category, you get the full effect. But adding more stuff using the same category has diminishing returns. Therefore in order to get the most Tranquility out of a certain area, it is most optimal to mix and match using as many different types of Tranquility as possible.\n\tSome things that add Tranquility are: Crops, logs, leaves, lava, netherrack, farmland, water, Life Essence, and other assorted things. -guide.BloodMagic.entry.architect.bloodrune.info.1=As you go through the mod you'll slowly learn that the humble blood altar before you is not powerful enough for you to fulfil your true ambitions. By placing special blocks known as Blood Runes around the altar you are able to expand the altar's strength significantly, unlocking higher tiers of recipes as well as allowing you to augment the abilities of the altar itself.\n\tTo upgrade the altar to its second tier, you need to place 8 blood runes around the altar and one level lower. If you are confused about the precise configuration, the item "Inspectoris Scandalum" can tell you the precise placement for the blocks required for the next tier.\n\tAlthough a blank rune is fine for simply getting your altar upgrade and running to a higher tier, it is advantageous to use upgrade runes for your altar. Each of the runes in a blood altar may be swapped out for any upgrade rune (the only exception to this is that at Tier 2 you cannot use the corner runes as upgrade runes - T3 onwards you can use these). There are runes that affect the speed of crafting, the capacity of the altar, as well as the efficiency of sacrificing at the altar. These runes can be found in their respective entries. -guide.BloodMagic.entry.architect.inspectoris.info.1=Literally "Block Reader" in Latin, this item's purpose is to give you more information about the more complex blocks in the mod when the blocks are in the world. Currently the only implementation for this item is the Blood Altar, and by simply shift-right clicking on a Blood Altar in the world it will tell you what blocks are required in the world for the next altar tier.\n\tIf this method doesn't suit you, you may shift-right click the item in the air to cycle through the tiers. If you then shift-right click on the altar, the altar will display ghost blocks in the world, showing exactly where the blood runes and the pillars are required in order to achieve that tier. If you set the displayed tier to 1, it will remove the hologram. -guide.BloodMagic.entry.architect.runeSpeed.info.1=The speed rune applies a pressure to the altar's basin, forcing the transmutation process so that crafting is a lot quicker. Each speed rune increases the consumption of the altar by +20%% per rune, effectively increasing the speed of the altar. This also affects the speed at which the blood orbs are filled by the altar at the same rate per rune. -guide.BloodMagic.entry.architect.water.info.1=The Water Sigil, as the name suggests, is able to gather moisture from the air to create a source of water at the point of contact on the ground. What is more, by clicking on a machine that accepts a fluid, you can insert up to 1000mB of water into the machine for the same cost as if you put it on the ground. For all intents and purposes, it acts as an infinite bucket of water - it won't work if you place it inside of a machine, however. 50LP per use. -guide.BloodMagic.entry.architect.lava.info.1=The Yang to the Water Sigil's Yin, this sigil heats up the rock in the local area and gathers it in one place, forming a source of lava where the sigil makes contact. A similar process occurs when you interact on a fluid-accepting machine, generating up to 1000mB of lava inside of the machine for the same cost. For some reason your hand is not burnt when you use it, however it doesn't mean that it is a wise choice to take a bath in it! 1000LP per use. -guide.BloodMagic.entry.architect.lavaCrystal.info.1=The lava crystal is a stone that has a piece of lava encased in the center of it that does not lose its heat. When placed as a fuel source inside of a furnace, it will "burn" for an amount that is enough to cook a single item in a standard furnace at the cost of 50LP from the owner's network. If the network does not have enough power in it (or if there is no owner) the crystal will simply not burn and will inflict nausea on the owner due to the strain.\n\tThis crystal will work for any solid fuel burning machine that accepts any fuel. -guide.BloodMagic.entry.architect.apprenticeorb.info.1=While out using the various devices, you will quickly realise that your 5kLP maximum capacity in your Soul Network will quickly run out. This is where you will start looking for a more powerful orb for your network.\n\tThe Apprentice Blood Orb requires a Tier 2 altar, and has a maximum capacity of 25kLP. It also allows you to create more powerful items and runes. -guide.BloodMagic.entry.architect.dagger.info.1=After a while of strengthening yourself through the use of self-sacrifice, you may be keen to attempt to try sacrificing the blood of mobs. The Dagger of Sacrifice, when used on a non-boss, non-player entity next to a Blood Altar, will kill the entity in one hit and pump all of the blood into the altar, converting it into life essence depending on the quality of the mob. Normally, hostile mobs will tend to give much more LP than peaceful mobs. -guide.BloodMagic.entry.architect.runeSacrifice.info.1=The Rune of Sacrifice, as the name may imply, increases the yield of all activities that sacrifice the health of mobs in return for LP. Each rune provides a +10%% increase in yield, additively. -guide.BloodMagic.entry.architect.runeSelfSacrifice.info.1=Similar to the Rune of Sacrifice, the Rune of Self Sacrifice increases the yield of LP provided from the player. Each rune provides a +10%% increase in yield, additively. -guide.BloodMagic.entry.architect.holding.info.1=As you will start to realize, there are a lot of useful sigils that are available - some toggleable, others active use. Because of this your inventory will quickly become clogged up. This need is filled by the Sigil of Holding.\n\tThis sigil can hold up to five other sigils (no, it cannot hold other Sigils of Holding) in its internal inventory. By pressing the "Holding" key, default 'H', you can open up the sigil's GUI to rearrange the sigils that are held. If you shift and use the scroll-wheel while it is equipped, you will cycle through the contained sigils. Once you land on the sigil that you want to use, you can use the sigil as if it was the one selected! \n\tNaturally, you can have multiple Sigils of Holding, each with their own inventory. To help determine which one is which at a glance, you can dye the sigil using the Alchemy Table. To do this, either place the Sigil of Holding in the Alchemy Table with a dye, or the sigil with a name tag with the colour that you want in 0xZZZZZZ format for the name. -guide.BloodMagic.entry.architect.air.info.1=The Air Sigil uses a rudimentary form of fission to generate a steady stream of air behind the user by the traces of water vapour in the air, propelling them forward. In essence, by using this sigil you can be launched forward a considerable distance. It should be noted that the sigil will only cancel the user's fall distance when used, so if you want to stick the landing you have to use it close to the ground! -guide.BloodMagic.entry.architect.void.info.1=As the name suggests, the Void Sigil will create a vacuum at the point of contact which will suck up the liquid source that it is used on, completely destroying the source. This is probably best used in conjunction with the Water Sigil or the Lava Sigil. -guide.BloodMagic.entry.architect.greenGrove.info.1=By using your blood as a simple growth catalyst of sorts, the Sigil of the Green Grove will increase the growth speed of any plants in a nearby area while activated. To activate the sigil, shift-right click it to toggle between activated and deactivated (easily seen by the tooltip or by the glowing symbols on the sigil). Keep in mind that every few seconds the sigil will syphon a bit of LP from the user to fuel the accelerated growth.\n\tIf used directly on a plant, the sigil will apply a bone-meal effect. This can be used to grow tall grass or other crops, just the same as bone-meal. -guide.BloodMagic.entry.architect.fastMiner.info.1=As any good Blood Mage should be aware of, blood has a high amount of iron within it. If skilled enough, one can manipulate blood while it is still within the body - it should be noted, however, that only the most advanced Blood Mages can twist the blood of those that are unwilling.\n\tOne of the principle uses is to accelerate the functions of one's own body. By magnetising the iron in the user's blood, the Sigil of the Fast Miner increases the speed of mining dramatically, applying Haste II while activated. This magnetism is too weak to affect things outside of one's own body, however it is sufficient enough to mine obsidian and a considerable speed. -guide.BloodMagic.entry.architect.seer.info.1=When tinkering around with the Blood Altar, you can sometimes get lost in the hidden intricacies of its operation that the Divination Sigil seems to be unable to divine. This is where the Seer's Sigil comes into play. Essentially an upgrade to the Divination Sigil, this sigil provides additional information about different stats of the altar. These range from the speed of the altar, the current LP, as well as the current progress of the crafted item. It also gives info about the player's soul network. -guide.BloodMagic.entry.architect.magicianOrb.info.1=Another tier, another Blood Orb. This time, in order to progress further in the mod you will have to craft yourself the Magician Blood Orb. In the default recipe you can see that it takes 25kLP in order to craft, however the maximum capacity of the Blood Altar is 10kLP. This means that for a successful craft to occur you will need to add LP into the Altar while it is in the process of crafting the orb. Be prepared, since it can be a difficult task if you do not have everything you need! -guide.BloodMagic.entry.architect.capacity.info.1=You are not exactly sure how it works the way it does, but the Rune of Capacity increases the capacity of the Blood Altar by 2kLP additively. Perhaps there is some sort of resonance effect that decreases the volume of the LP, therefore allowing you to pack more into the static basin? It does give you an idea on how to improve it further, though...\n\tIt should be reiterated that the size of the input and output buffers are 10%% of the maximum capacity of the main tank, so these runes will increase the buffer capacities as well. -guide.BloodMagic.entry.architect.displacement.info.1=By default, the transfer of LP between the buffer and main tanks is limited to 20LP/s. For systems that want to remove and re-add LP to the altar this speed is a sluggish crawl. That is where this rune comes into play.\n\tThe Displacement Rune increases the amount of LP transferred per operation. Each rune multiplies the transfer rate by 1.2x, stacking multiplicatively. So one rune would be 24LP per operation, two runes would be 28.8LP per operation, and three runes 34.56LP. If you have 20 runes on an altar, this jumps all the way up to 767LP per operation - that would clear a full altar in only 13 seconds. -guide.BloodMagic.entry.architect.affinity.info.1=At first glance, the Sigil of Elemental Affinity simply grants immunity to fire, drowning, and damage from heights while activated. Its operation is a lot more nuanced, however. This sigil creates a thin barrier of air around the user by using the sweat (and when required, blood) from the user, keeping the body away from the harsh elements. \n\tThis air barrier acts as a buffer between the skin and the fire or lava, circulating when required to prevent overheating. It also fills the lungs while under water to equalize the pressure of the body and the surrounding water. Finally, when falling from a large height, the air will shift to below the person's feet, acting as a cushion to dampen the fall. -guide.BloodMagic.entry.architect.lamp.info.1=There are quite a few "impurities" within the body and a person's blood. By harvesting some noble gases and encasing them with a source of heat, you can generate a ball of light that can be flung a large distance, sticking to the surface that it impacts with.\n\tThe Sigil of the Blood Lamp has two uses: you can either directly click a block and place a light source or fire a projectile that will generate a source of light at the point of contact. These light sources can be broken just like torches in one hit. -guide.BloodMagic.entry.architect.magnetism.info.1=This sigil magnetizes the iron in the blood stream of the user to attract small objects towards the sigil, allowing a quick and painless pickup. In essence this acts as an item magnet, but instead of actually "vacuuming" up items towards the player, it causes the player to pick up the item from a distance, so items don't need to fly around the place. Thankfully the magnetism is tuned so that it does not attract living objects, so you won't find creepers suddenly wanting to hug you at Mach 3. - -guide.BloodMagic.entry.architect.peritia.info.1=In the world, certain actions impress experiences on a person: slaying monsters, mining elements, and smelting ingots or food can give experience that is accumulated over a period of time. Through some arcane mechanisms, some structures and devices actually drains these experiences from you in order to fuel their own processes. It can therefore be useful to store these experiences in some medium.\n\tAlthough some containers store experience as a physical substance, the Tome of Peritia allows the person to transcribe their experiences into the book - by writing in the tome, the pages are imbued with your thoughts and past actions, storing them away for later use. If you then want to acquire these experiences back, you can hold your hand to the page and syphon them back; this will remove the writing from the page and transmit those actions back to your memory.\n\tNow for the actual usage; by shift-right clicking the tome in your hand, you can store a level of experience into the book (or down to the level if you have a partial level). Right clicking with the tome will grant you up to the next level if there is enough experience stored in the book. The total experience, as well as the equivalent level stored, is displayed on the tooltip of the tome. -guide.BloodMagic.entry.architect.livingArmour.info.1=Any person in Minecraft, especially with the newer incarnations of the world, will know that a good set of armour means difference between life and death. Usually when you pick a set of armour you choose a static set of benefits - does this armour offer more protection? Do I get flight when I wear this? Can I jump really high, or move really fast? These are all valid options on a set of armour, but you can never get a set that is tailored exactly to your needs. At least that is what they thought.\n\tA set of Living Armour is an engineered lifeform that is integrated with a simple set of iron armour. When worn, it enters a symbiotic relationship with the user - when you move, it moves. When you attack, it attacks. When you eat, it senses this and compensates. And just like a normal human body, it will start to grow and strengthen depending on what you do, being trained by your actions. \n\tLet's give an example. If you equip a new set of armour on and run around a lot, you will notice that you will receive an upgrade on the chest plate called "Quick Feet" - this upgrade provides an incremental increase to your speed at level 1, while subsequent levels provide a larger boost. You will also notice that the "Upgrade Points" now read "3/100" - each upgrade requires a number of upgrade points to be applied, and the chest plate has a maximum number of points that it can hold. If an upgrade that you can get is not obtainable with the number of free upgrade points you have it cannot be gained. \n\tKeep in mind that the Living Armour will only be trained when you have a full set of armour on, and the armour's effects will only take effect when a full set of armour is used.\n\tThe maximum number of upgrade points can be modified by a few different means. One of them is to create alchemical concoctions that will strengthen the bonds between the user and the Living Armour, vastly increasing the number of points you can have on a given set of equipment. One such example is the "Draft of Angelus," which increases the maximum number of points to 200. Information about these brews, as well as how to create them, can be found in "The Alchemist". -guide.BloodMagic.entry.architect.upgradeTome.info.1=Sometimes you may not be happy with the upgrades that you have gotten on your Living Armour. By using the ritual "Sound of the Cleansing Soul" (more information can be found in "The Ritual Master"), you can remove all of the upgrades from the armour and receive them in the form of "Upgrade Tomes". If you right-click these while wearing a full set of Living Armour (and while you have space for the upgrade) you can add the upgrade to your armour. \n\tThese tomes may also be combined in an anvil - if you combine two of the exact same upgrade tomes (same upgrade, same level) together in an anvil, you can get a single tome that is one level higher. So if you combine Quick Feet II with another Quick Feet II, you will get Quick Feet III. This can then be applied to the armour in the same way. -guide.BloodMagic.entry.architect.teleposer.info.1=The Teleposer is a device that teleports not just entities but blocks as well. In order to set up a Teleposer, you need at least two Teleposers and one Teleposition focus. One of the Teleposers acts as the Destination, and the other acts as the Beginning.\n\tTo set this up, you need to first bind the focus to you by right clicking it. You then right click the focus onto the Destination Teleposer to save its location (and dimension) and then insert the focus into the Beginning Teleposer by right clicking the Teleposer without a focus in your hand and placing the focus inside of the GUI.\n\tPowering the Beginning Teleposer (the one with the focus) with a strong redstone signal will cause the Teleposers to swap the entities and blocks (including any content in the tiles such as chest inventories) between the Teleposers, assuming that there is a Teleposer at the Destination. \n\tYou can either have one Teleposer have a focus, have both of the Teleposers have foci that are linked to each other, or you can have one Teleposer linked to another Teleposer that is not linked to it, so depending on how you set them up you can have very intricate systems.\n\tKeep in mind that currently the Teleposer will only swap the blocks and entities that are right above the block, and the size depends on the focus - the T1 focus only swaps the block on top of the Teleposer, the T2 focus swaps a 3x3x3 area above the Teleposer, etc. -guide.BloodMagic.entry.architect.boundBlade.info.1=The Bound Blade is an artifact from the past, a blade that is created by binding an entity to a sword in the same process that creates the Living Armour. It should be noted that this, as well as the Bound Tools, will change in later versions of the mod.\n\tThe sword has an active and inactive mode, which can be toggled by shift-right clicking. The sword does not deal any damage at all when inactive, but while active there will be a small LP drain over time. Likewise, when you damage a mob you will drain LP from your network. Sure, you have a lot of damage, but it may kill you!\n\tWhen a monster is killed, the monster has a chance to drop a Weak Blood Shard. These shards are used in order to upgrade your Blood Altar to a T4 altar. -guide.BloodMagic.entry.architect.boundTool.info.1=Similar to the Bound Blade, these Bound Tools (pickaxe, axe, and shovel) will eventually be modified to fit better in the mod. Like the Blade, the tools have an active and inactive mode that can be toggled between by shift-right clicking them. \n\tSomething that these tools have is something called "Beast Mode". If you hold right click, you can charge up the tool and unleash a powerful cleave that will instantly break the blocks that can be broken by the given tool - when fully charged, this is an 11x11x11 cube above you at a cost of 10kLP. Be careful with this powerful tool, since it may be your last! -guide.BloodMagic.entry.architect.weakShard.info.1=Everything that has life can have the ethereal connections that is known as the Soul Network. As seen in your experiences, non-living things can also have a Soul Network attached to them, such as sigils and rituals; however, these connections are the strongest in creatures and, naturally, humans. \n\tWhen you attack a monster with a Bound Blade, their Soul Network temporarily hardens and a piece of it will remain after death. This piece takes the form of a Weak Blood Shard, so named after the fact its reddish hue matches the colour of the Weak Blood Orb. At this point, it is not clear if there are stronger forms of blood shards, but you can tell that this would be very helpful in increasing the power of your own Soul Network -guide.BloodMagic.entry.architect.masterOrb.info.1=One of the uses for this increased affinity for the Soul Network is to use the Weak Blood Shard in a new blood orb: the Master Blood Orb. This orb has a maximum capacity of 1 million LP, and thus allows the wielder of the orb to access more powerful items and rituals. Perhaps meteors are not out of your reach... -guide.BloodMagic.entry.architect.runeOrb.info.1=Initially, this rune can be seen as somewhat useless. By thickening the ties between the blood orb in the altar and the Soul Network, the Rune of the Orb increases the maximum capacity of a blood orb filled by a Blood Altar by +2%% per rune, additively. For something like the Weak Blood Orb, this is just +100LP capacity, however for the Master Blood Orb this is a remarkable +20kLP capacity per rune. If you have a high tier blood orb and a few extra runes to spare on your altar, this may be something to round out your network. -guide.BloodMagic.entry.architect.suppression.info.1=The Sigil of Suppression uses the technology that is used in a Teleposer in order to temporarily displace fluids that are near it when active. This is done by teleposing the liquids in a sphere around the user to a hidden pocket dimension, replacing the liquid with air. Unfortunately, because you are overcharging the field used by the Teleposer, the teleposition is temporary - if the user walks away from the area that the liquid was teleposed away from or deactivates the sigil, the liquids will pop back where they were before as if nothing has happened, assuming that there are no newly-placed blocks there. This allows for fancy transportation when on foot, walking under the water instead of swimming through it or even parting the red seas of the Nether. -guide.BloodMagic.entry.architect.haste.info.1=Sugar and caffeine are interesting chemicals that the human body can process. One acts as a reservoir of energy that is quickly burned, whereas the other increases your wakefulness and allows you to access energy in other means. By mimicking these chemical processes to unleash more chemical energy, the Sigil of Haste allows the user to increase their movement abilities. \n\tWhile activated, the user can run a lot faster and is able to jump significantly higher. What is more, the sigil also offers "Step Assist," which allows the user to step up one block high ridges without needing to jump. It's like auto-jump, but less sucky. -guide.BloodMagic.entry.architect.severance.info.1=Teleportation is one of those odd powers that people can't fully explain. In most instances, teleportation can be described as a temporary warp in space-time, linking two places in space together so that the object in question can simply "step" through to the other side. The Sigil of Ender Severance attempts to stop this warping that teleportation requires, preventing creatures from teleporting when they are around the user. This does not stop some of the larger means of teleportation such as portals, but it will prevent Endermen from using their powers to warp around the user. -guide.BloodMagic.entry.architect.teleposition.info.1=The Teleposition Sigil has a contained Teleposer and focus in its structure. If you right click a Teleposer with this sigil, you can bind the coordinates and dimension to the sigil. Now, whenever you right click the sigil it will telepose you directly to the Teleposer (if it is there). Unfortunately, it doesn't seem like you are able to do a return trip... -guide.BloodMagic.entry.architect.compression.info.1=A miner will quickly find that during a long expedition their inventory will become filled with redstone dust, lapis, and several other materials. Most of these have recipes that will compress them down to storage blocks such as redstone blocks and blocks of diamonds, however they normally require a crafting table in order to combine them. \n\tThis sigil creases a miniature field of compression in the inventory of the user when activated, compressing items down to the lowest number of slots needed for the inventory. What this means is that if you have 63 redstone dust it will not do anything. However, if you have 64 dust it will compress 9 of them into a block of redstone. While this is technically not the ideal situation if you have exactly a stack of redstone dust, it will guarantee that you aren't left in the dust due to full pockets. If other mods are present this will work for other crafting recipes as well. -guide.BloodMagic.entry.architect.bridge.info.1=When activated and while the user is on solid ground, the Sigil of the Phantom Bridge solidifies the air beneath the user so that they may walk on it, essentially creating a Phantom Bridge. When you are shifting in the air, the bridge will instead form directly underneath you, allowing you to catch yourself in the air if you were falling. Although some calibration is needed in order to make it more effective for vertical travel as well as horizontal travel when moving quickly (due to lag messing up the creation of the bridge), it is a fancy way to effectively fly to different areas. -guide.BloodMagic.entry.architect.mimic.info.1=Mimics are arcane constructs that are designed to mimic whatever they are set to. When the mimic comes into contact with some form of block, its molecules shift their orientation in order to take on the shape, look, and feel of the block. Not all of the properties are copied, however: for instance, a normal mimic block when coming into contact with glowstone will not emit any form of light. \n\tWith normal use, there are two ways to use a mimic block. The first is my placing the mimic block down and then right-clicking the mimic with the block that you want it to copy. This will place the block inside of the mimic and have the mimic take on the -default- shape of the block. So if a mimic is clicked with a stair, the mimic will always orient themselves in the same way.\n\tThe second method is to hold the mimic block in your hand and shift-click the block you want to replace. This will replace the block with the mimic and the mimic will have the exact same orientation that the replaced block had. This can be seen with stairs and chests, as well as other orientation-dependent blocks such as logs.\n\tThere are a few different variants of the normal mimics. The Opaque Mimic is the default mimic, able to take on the form and general properties of blocks - light cannot travel through these, however, so care should be taken with glass. The Ethereal Opaque Mimic can be walked through without any trouble because it has no hitbox, which is perfect for hidden doorways. Clear Mimic blocks work the same as their opaque variants, however they allow light through them even if it appears completely solid. Finally, the Lighted Mimic block is opaque and solid, but no matter what is placed inside of it, it will emit a strong light. No more dark areas in your base without torch spam!\n\tThere is one special variant of the mimic that you have to be warry of: the Sentient Mimic. If a player comes too close to one of these in the world, it will get up from where it is and attack you with a high degree of ferocity. These can be found in a variety of areas, but they are especially fond of dungeons. If one is mimicking a chest, however, be careful: they bite.\n\t***Creative Usage Only***\n\tThere are a few interesting features you can add to any mimic block when you are in creative mode. If you right click on a set mimic with a potion or potion flask, you can set the mimic to spawn potions around it if a player is nearby. If it is a regular mimic and you click on the east or west side, you can increase or decrease the radius that the potion will spawn in. If you click on the north or south side, you can increase or decrease the radius that the mimic will check for players around it before spawning the potions. Finally, clicking on the top or bottom of the block will increase or decrease the potion spawning interval, which is the number of ticks between dropped potions.\n\tIf the mimic is a sentient mimic, you can click the mimic anywhere to increase or decrease the detection radius for players - if a player is within this area and they can see the block, the mimic will spawn and jump at the player. \n\tAnother thing is that if the block is placed on the mimic while the placer is in creative, the block that is being mimicked will NOT drop when the mimic is destroyed.\n\tFinally, if the mimic is placed on any inventory or chest, the sentient mimic will place the chest on the ground with its contents once defeated - the regular mimic will instead just spew the contents everywhere when broken. -guide.BloodMagic.entry.architect.downgrade.info=Please see the entry "Penance of the Leadened Soul" in "The Ritual Master" for a detailed explanation about what these are as well as how to obtain them. - -guide.BloodMagic.entry.architect.augmentedCapacity.info=The Rune of Augmented Capacity functions similar to the Rune of Capacity in the sense that it increases the capacity of the Blood Altar. However, multiple runes on the same altar will begin to resonate with each other, increasing the capacity exponentially the more there are. One rune by itself will apply a +10%% increase to the capacity of the altar, however this functions multiplicatively with other Runes of Augmented Capacity: if there are two runes, it is a +21%% increase, three runes is +33.1%% increase, etc.\n\tUnfortunately, this multiplicative effect does not stack with the Rune of Capacity, meaning you will still only get the +2kLP bonus per rune. -guide.BloodMagic.entry.architect.charging.info=The Charging Rune is one of those beauties that will completely change the operation of the Blood Altar to something that can be seen as more useful for one-stop crafting. By syphoning off the LP from the Blood Altar slowly, the Charging rune begins storing "Charge," an internal value of the Blood Altar that can be seen using the Sigil of Sight. If the Blood Altar has enough Charge when it gets something to craft, it will use the required Charge up immediately and craft the item instantaneously. If there is not enough Charge, the Charge is all used to increase the progress of the item at a 1:1 Charge:LP ratio. \n\tThe maximum amount of Charge that can be stored in the Blood Altar is a function of the number of Charging Runes that it has multiplied by the current capacity of the altar (the capacity of the altar only comes into effect if it is greater than 20k). The rate that it charges is also related directly to the speed of the altar times the number of Charging Runes it has, and it will convert LP into Charge once every 20 ticks (one second). So if you were to design a Blood Altar with this rune, careful consideration will have to be made for all of the synergistic relationships that it has. -guide.BloodMagic.entry.architect.acceleration.info=Unlike most runes, the Rune of Acceleration works best only when paired with other runes, and its effects only increase to a limited amount. What this rune does is it increases the number of processing ticks that can occur in a given period of time, specifically when it comes to the Displacement Rune and Charging Rune. For each rune added, the number of ticks before the next processing tick decreases by one. For instance, by default the Displacement Rune displaces liquids at a rate of one operation per 20 ticks - with 10 Runes of Acceleration, this would occur at a rate of one operation per 10 ticks.\n\tObviously the maximum number of Acceleration Runes that presently matter is 19 - if you have this many, the Displacement Rune and Charging Rune will both activate their effects each tick. Noice! - -# Demon Kin Entries -guide.BloodMagic.entry.demon.intro=Bella Highborn -guide.BloodMagic.entry.demon.snare=Demon Will and Snares -guide.BloodMagic.entry.demon.forge=Hellfire Forge -guide.BloodMagic.entry.demon.petty=Petty Tartaric Gem -guide.BloodMagic.entry.demon.sword=Sentient Sword -guide.BloodMagic.entry.demon.lesser=Lesser Tartaric Gem -guide.BloodMagic.entry.demon.reactions=Unexpected Reactions -guide.BloodMagic.entry.demon.sentientGem=Sentient Armour -guide.BloodMagic.entry.demon.routing=Item Routing -guide.BloodMagic.entry.demon.aura=Demon Will Aura -guide.BloodMagic.entry.demon.types=Different Will Types -guide.BloodMagic.entry.demon.crucible=Demon Crucible -guide.BloodMagic.entry.demon.crystallizer=Demon Crystallizer -guide.BloodMagic.entry.demon.cluster=Demon Crystal Cluster -guide.BloodMagic.entry.demon.pylon=Demon Pylon -guide.BloodMagic.entry.demon.gauge=Demon Will Aura Gauge - -# Demon Kin Entry Texts -guide.BloodMagic.entry.demon.intro.info=My name is Bella Highborn, and I am known as the Demon Kin. Several months ago my village was attacked by a wave of demons, killing all other people while destroying every single building. I don't remember much from the attack, other than the screams of pain as each and every person I knew left this world for a happier one. Thankfully the demons did not hear me as I cowered underneath the fruit baskets in the basement of the church of Intactilis, trying desperately to keep my screams from joining the chorus of other voices. \nThere was one horrible moment when I accidentally knocked down the incense altar of the church and a demon came bounding into the sanctuary, unperturbed by what we assumed was a sacred place. It was a huge four-legged monster, with curved tusks hanging past a jutting mouth, saliva dripping onto serrated swords taking the place of his claws. It took a look around the room and I swear it locked eyes with me for a solid second, but then it just simply left as if it neither heard nor saw anything. Everything afterwards was a blur. \nIt was a full day before anyone came to see what happened. A trading caravan saw the smoke in the distance and decided to take the long way around past the demons. Many of the traders didn't even want to look at me, fearing that because I alone managed to survive unscathed it was a bad omen. But two brothers decided to take pity on me and try to convince the rest of the caravan to consider having me ride along. It took me selling the priestess's wand and locket, but I managed to buy safe passage to a village far enough away from the demons' path of destruction. -guide.BloodMagic.entry.demon.snare.info.1=Magus was telling me one day that every living being has a soul: humans, chicken, sheep, and even creepers have this life force that would give the body the will to live. It seems that Magus has done a lot of experiments in his time, and has even heard of a powerful mage that could take these souls and transfuse them into empty vessels such as zombies. But that made me wonder: if zombies and skeletons did not have souls, how is it that they had a will to live? What animated them so that they would try to hunt down any living creature and try to kill them? \n\tIt all came back to will, each and every single time. Anything "living" had to have a will in order to survive, but it didn't mean that it had to be their own. When I brought this up to Magus he pondered a little, and then brought out a blackboard and chalk (from where, who knows) and started to sketch some notes about other forms of magic. "In Thaumaturgy," he said while sketching out the form of a straw man, "golems are animated beings that are tasked to perform many mundane operations. They live, breathe, and can even die if they fall out of favour with their masters. In the current iteration of Thaumaturgy, and yes there have been several versions of this art over the centuries, the magician would imbue their will into their inanimate creation and bring them to life.\n\t"That, Bella, is how golems operate: by an imbuement of will."\n\tSo if a golem could live by another entity imbuing its will into an empty shell, maybe some other entity is imbuing its will into the bodies of the dead, bringing zombies and skeletons into existence. At this point I shivered, remembering briefly what happened in my old village. Only a demon could do something so cruel. But to test this hypothesis, I needed more proof. -guide.BloodMagic.entry.demon.snare.info.2=With some direction from Magus, and Tiberius when he could lend a hand from his own work, I made myself a rudimentary snare out of some iron, string, and a bit of redstone. Tiberius, who studied Thaumaturgy in-depth as his cross-discipline magic of choice, said that the snare should be able to disrupt the will of an entity that is controlling an animated object. "I was messing around with this when playing around with golems," he said with a smile. We all knew how well that turned out. "Redstone seemed to disrupt the connection between my golems and my will for them to move. In theory, if something is controlling the zombies or skeletons, you should be able to cut off the will."\n\tHe said that all I needed to do was to throw it - if it worked, some white dust should stream off of the entity for a period of time. "So you have to kill it after this happens in order for anything to really happen. But the snare might only work 25%% of the time, so be slightly liberal with them!"\n\tAfter crafting sixteen of them, I went out with my sword during the night. It was quite tricky, actually: I had to track down several zombies, ducking and dodging their lumbering swipes while chucking a few snares at them. Once the white particles came off of them, I killed them swiftly and picked up what was left of their bodies. A small amount of a blue viscous fluid seemed to lay in the gritty dust, beckoning to me. I picked it up, and it seemed like there was some otherworldly "presence" coming from the fluid. Quickly stowing the samples away, I elected to look at them more deeply when I got back home. \n\tIt seemed that the size and shape of each "Demonic Will" varied, as if the quality of the will depended on the source. Using a completely arbitrary unit of measurement, the Will that I got from the snares seem to range from zero to five "Will Quality". I am not sure what I can use this substance for yet, but it is very intriguing none the less. I can't tell if this is the imprint of the will of some sort of demon, or just a random crystal found in their bodies. More research is needed. -guide.BloodMagic.entry.demon.forge.info.1=I have spent several weeks researching the uses and properties of demonic will. There has been some success these past few days, however it has been infrequent. Tiberius asked me the other day if he could take a sample of demonic will for a few of his other experiments: he mentioned that it might be what he needed to construct a new blood altar to replace the beat-up basin that we were using in Magus's basement, since trying to replicate that old thing with just stone never seemed to create the right... receptacle for our blood magic. In other words, he thinks it may help.\n\tIt hasn't been a complete waste, however! I consulted several different alchemy textbooks discussing "Equivalent Exchange" and the many different ways to manipulate matter. I also talked to a couple of alchemists that were passing by, and they gave me a few tips on how to deconstruct matter and energy in order to study it more closely. (As a side note, I must say I loved the dark purple armour that one alchemist was wearing - just looking at it made me feel like I was being pulled by a dense object. Not talking about Tiberius, either!) From using those simple arrays with the little samples that I had, I managed to see that there were ways to actually tap into the power source inside of the demonic will. I just needed the right configuration. -guide.BloodMagic.entry.demon.forge.info.2=Just today, I managed to get a structure that I believed would fuse together items using this raw will. Dubbed the "Hellfire Forge", the structure uses a simple alchemy array carved into the glass on the top of it to fuse up to four items together while injecting it with demonic will. The piece of demonic will is placed on the right-hand side and the four ingredients are placed around the circle. It appears that there are many different "recipes" available in this forge, but there are some gating effects on these. \n\tFor starters, there is a minimum amount of demonic will that has to be in the sample in order for the items to combine - if there isn't enough will in the structure, nothing seems to happen. Next, it seems that although there is a minimum amount of will needed, most of the recipes don't drain the entire sample of its will. Some recipes need a vast amount of demonic will in order to start the process, but only a little bit is used in the crafting, if any at all. Some recipes seem to be very easy to create in large quantities, but others... not so much. -guide.BloodMagic.entry.demon.petty.info.1=I went out on one of my now-daily nighttime adventures in order to harvest some demonic will when I began to realize one of the major problems with the collection method: my bag kept on getting full from all of the samples! For some reason, perhaps because the ultimate source of the demonic will is different for each sample, the will would not compress into a more manageable form. At least the physical manifestation of the will. \n\tThus, I went to work with the hellfire forge that was nestled in my corner of the house, pushing aside some of Tiberius's least unpleasant experiments and getting some raw materials for my own study. One of these days I am going to make Tiberius his own forge, since I am tired of trying to get rid of all of the dust that coats my workplace from his "arcane experiments". I don't care that you are "trying to bridge the gap between the ethereal strands of the Soul Network and the physical construction of the slates", get your damned ash out of my stuff! -guide.BloodMagic.entry.demon.petty.info.2=Anyway, it did take a while in order to find materials that were most likely to resonate with the demonic will in order to store it in a better manner. Lapis seems to be the most readily available conductor of this energy, acting as a pathway for the will to be channeled. After adding some redstone to act as a shielding from electric fields in the air (adding two energies together seem to cause disastrous effects, at least that is what Magus said), gold as a dampening agent, and glass as a simple housing, I managed to create a very simple "Tartaric Gem". This means "a gem from the underworld, Tartarus."\n\tAfter further tests, I found out that this gem could hold up to a will quality of 64. (When I presented these findings to Magus, he remarked that it seemed like a nice, round number.) When I tried to pick up demonic will afterwards, it seemed to go directly into the gem unless full - after that, the will just seemed to... disappear. Convenient for my backpack, but otherwise a mystery. I also learned that if I hold the gem in my hand and focused (right clicked), about 10%% of the maximum capacity of the gem would flow into other gems I had on my person. I think this last feature is very helpful, especially if we were to find other, more powerful tartaric gems. -guide.BloodMagic.entry.demon.sword.info.1=My snares got tangled again.\n\tIt doesn't seem to matter how much I try to improve the design of them, the rudimentary snare never seems to work perfectly. It just gets tangled most of the time, and when I finally do manage to hit a zombie with it it's more likely to not work than work. In order to stop myself from pulling my own hair out, I went to the forge again and got to work right away.\n\tWell, not right away, since I had to first clean the ash off the top of it again. -guide.BloodMagic.entry.demon.sword.info.2=I infused the demon will-holding capabilities of the petty tartaric gem with an iron sword, and managed to create a blade that... was very dull and hardly did more damage than my fist. I was actually very disappointed with the outcome, because it took a long time of fiddling with the forge so that it would not overheat from the strain of using a petty tartaric gem as its power source.\n\tHowever, as soon as I picked up my Tartaric gem, the sword started to glow with a new energy. It seems that the higher the amount of demonic Will I have on my person, the more damage I seem to do with the sword as well as the more demon will that drops. Whenever you don't have a gem, the Will amount is very... miniscule.\n\tAfter a bit of testing I came to another realization: depending on what I kill, I receive different amounts of Will. It seems proportional to the amount of maximum health that the monster has - a spider, since it has a max health of 8 hearts gives 80%% the health of a zombie, which has 10 hearts. This is probably because these monsters require more Will to animate. I should keep this in mind for later. -guide.BloodMagic.entry.demon.lesser.info.1=I was chatting with Tiberius today, discussing some of the projects that he is working on. I must say, when we start talking about his research it seems that he just keeps going on and on and on! Anyway, one of the recent inventions he wanted to talk about was his sigils: so far he managed to create a Water Sigil and a Lava Sigil, using the Hellfire Forge I finally constructed for him as a means to create them. I wasn't entirely sure how he actually made them - I knew he experimented by taking some ingredients and combining them inside of the forge using the tartaric gem as a catalyst, but I haven't actually seen him actively experimenting yet. Well, I got some insight finally as to what he uses that blasted ash for.\n\tLet's see if I can mimic what he said properly. Ahem. "By using the Demon Will contained inside of these gems to transmute the ingredients, a reaction occurs between things that normally don't do anything when combined. By harnessing this forced synergy, I am able to inscribe several arcane symbols in patterns that will direct the energy that I add myself to perform the desired task." Although it doesn't show well in writing, picture me saying this while pushing glasses up the bridge of my nose. I'm not sure if he's normally like this, but I swear he gets all... science-y when he explains things to me.\n\tAt any rate, he showed me how he created a Water Sigil by demonstrating it to me. After the, admittedly flashy, demonstration, he then got to the meat of the discussion. "When I try to replicate this process with some more advanced materials, it seems that the reagents tend to... explode when added to the alchemy array. They seem very unstable. My thinking is that the ingredients aren't getting properly fused together - perhaps there is not enough energy in the forge to fuse them properly."\n\tAfter thinking about this for a few minutes, I got to work - as I mentioned in a previous entry, I figured that a more powerful Tartaric gem would be required, but I still haven't figured out exactly how I could do this in an elegant way. So, I decided that a brute-force approach would be sufficient for this! -guide.BloodMagic.entry.demon.lesser.info.2=I took a block of lapis, block of redstone, and a diamond as well as an empty petty Tartaric gem that I had lying around - part of a past experiment that... didn't exactly go very well. All I can say about it is that I am surprised Magus can make holes in a solid concrete wall simply disappear. I then combined these four items in the Hellfire forge with a filled petty Tartaric gem to act as a power source - a minimum of 60 Will seems to be needed. After a bit of effort trying to find an optimal arrangement, I then set them together and watched as the empty Tartaric gem started to grow inside of the forge.\n\tJust as a side note, I tried using a block of gold instead of a diamond to grow the gem, but it seems that having another crystal structure was more beneficial.\n\tThis new, "Lesser Tartaric gem" seems to have a much larger capacity, able to hold a total of 256 raw Will. Hopefully this is enough to sate Tiberius's need for large amounts of Will for a while. But alas it seems that I will need to fill up this gem. Another long night is ahead of me! -guide.BloodMagic.entry.demon.reactions.info=I woke up in a hospital bed today, aching something fierce. I opened my eyes and saw the dull magenta that made up the ceiling of the "Intense Curse" wing of the hospital in Veteres, which is the closest major city to our village. I wasn't exactly worried by this information: it more so puzzled me that I somehow ended up here while seemingly only covered in scrapes and bruises, plus a simple cast on my left leg. Someone must have cast an "Ossa Fracta" curse on me or something, since all it could be was a simple broken bone! \n\tWhen Magus came in with one of the nurses with a solemn face, I knew it was something more drastic. Apparently, one of my experiments with the new Lesser Tartaric gem rebounded and created a small but forceful explosion. That much I could understand easily enough, but that wasn't it: the mixture of obsidian, iron and diamond that I used coated my lower left leg, forming into a rigid shell that couldn't be removed. The cast that I had on my leg wasn't actually a cast, but some form of runic matrix covering the light-blue shell. \n\tCalmly, I asked what Magus thought, even though I was pretty sure what had occurred. "I think," he said, giving a side-long glance towards the nurse that was listening intently before looking back at me, "that it is simply some sort of residue that is diamond-based, which is the main reason we can't remove it. It is also laced with a bit of... otherworldly energy, which is the main reason that you are here instead of a bed at the local clinic - the Conglomerate is rather stringent about unknown energy directly contacting people, ever since the Eldritch Incident, so we had to make sure that there wasn't any issues."\n\t"I see..." Normally Magus doesn't bother much with formalities such as making sure that the Conglomerate is informed about unknown energies - I've been experimenting with Demon Will for quite a while, and it isn't like the Conglomerate came knocking on our door to have this magic registered. I won't go into much detail here, since I am not well versed in politics, but I know that Magus partakes in it only sparingly. This meant that the power from this Will concerned Magus a lot, perhaps through some of his past dealings...?\n\t"Ah well, enough about that for now," Magus said, rolling up the sleeves of his robes. "I tried to break the shell when I first saw it, obviously after checking what it was. It didn't have an effect last time, but now..."\n\tThere was a searing heat on my left leg, accompanied by a blinding red light as Magus cupped his hands on top of the blue shell. After what felt like an eternity, but what must have been only a couple of seconds, the shell started to crack and fracture, falling apart. Honestly, it was kind of anticlimactic. \n\tI tried to get up, but Magus pushed me back into the bed with a small shove. "Bella, you need to stay and rest. You can work with your research on the gems later." I was initially annoyed, but that soon passed as I had a lot of time to think. The only reason that Magus wasn't able to do the exact same thing earlier was probably because I still had my Tartaric gem on my person after the explosion. So whatever happened to my leg had to be directly tied to the demon Will, and as soon as my gem was taken the shell was able to be removed. It got me thinking... -guide.BloodMagic.entry.demon.sentientGem.info.1=After a few days of some "well needed bed rest," prescribed and enforced by Magus, I decided to do a bit of research primarily on the sentient equipment that I have made so far. There is just so much that I do not know about the sentient sword as well as Demon Will in general. Sure, we know some of the theory, but considering that Magus and I were the ones that developed the theory in the first place it is hard to tell how accurate it is.\n\tFor this, I needed to get creative. Magus told me that whenever he takes an apprentice, he insists that they must learn another form of magic alongside the research that he is doing. Tiberius offered for me to learn Botany, but I scoffed at the idea - a bunch of flowers weren't going to help me much when fighting demons! -guide.BloodMagic.entry.demon.sentientGem.info.2=The Sentient Armour Gem is a toggleable item that is used to equip and unequip your Sentient Armour. When you right-click with the gem while you have a minimum of 16 Demon Will in your inventory, your armour will be replaced with a set of Sentient Armour that copies all of the enchants from the armour that you replaced - when you activate the gem again, your original armour is returned to you. This also works when you have no armour on at all to begin with.\n\tThe Sentient Armour initially acts as a simple set of iron armour, yielding no additional abilities besides protection. Similarly to other sentient tools, however, the armour provides more protection when you have more Demon Will in your possession. This makes the protection provided really powerful when you have a large quantity of Demon Will accumulated. The downside to this is that every hit you take will syphon a small bit of Demon Will from your Tartaric gems, and if you get too low your armour will revert back to its original form. Could be bad! -guide.BloodMagic.entry.demon.routing.info=Item transport in Blood Magic comes from linking strands of Demonic Will between routing nodes, which act as conduits in order to transfer items from one inventory to another. To start off with, let us explain how each individual item works.\n\tEvery single routing system needs a Master Routing node, which acts as the brains of the system. An Input Routing node inputs items into your system, and an Output Routing node outputs items from your system, and a regular routing node doesn't have any special function.\n\tTo form a network, you need to shift-click a node with your Node Router and then shift click another node that you want to connect. This links the two nodes together. As long as a node can trace some form of route to another node (and if it is connected to a Master Routing node) they can "talk" to each other.\n\tAs a rule of thumb, items are pulled from an inventory next to an input node and are pushed into an inventory next to an output node. In order to set what goes where, a filter should be used. By clicking on one of the buttons in the node's interface you can select what goes into the inventory in the given direction (N indicates North, etc). If you place an Item Filter into the left-most slot of the node you can specify the quantities and types of items that the node may interact with based on the filter. If you set a filter on an input filter, you can only pull those types of items from the inventory (keeping at least the given amount if you specify a quantity). If you set a filter on an output filter, you can only push those types of items into the inventory, up to a max of the quantity specified.\n\tThere are four types of filters: \n\tPrecise - The item needs to be matched exactly, including NBT and metadata\n\tMod Item - The item matches if it is from one of the filered mods.\n\tIgnore NBT - The item filter does not take into account any NBT\n\tOre Dictionary - Any item that matches one of the ore dictionary references of the filters are allowed.\n\tThere are two numbers that you will be able to see when you insert the filter into the routing node: the quantity and the priority. When you click on one of the items in the filter, the name of the item you have selected will appear and right below that is the quantity of items. By setting this number you can tell the filter how many of this type of item it will keep in stock in the connected inventory (either filling to that amount if it is an output node or making sure it keeps that amount left in the inventory if it is an input node). If you decrease the filter's amount to 0, you can set so that the filter allows "Everything," as in any amount, for that particular filter. Input nodes will pull as much as it can from the inventory, and output nodes will push as much as possible.\n\tThe second number is the priority of the node, altered by the arrow buttons next to it. This number is different for each side of the node. The node that has the LOWER NUMBER in the network will be used first. -guide.BloodMagic.entry.demon.aura.info=When an entity is killed normally, it evaporates over time and returns to the creator. When captured in a snare, it is pulled into this plane from the ethereal and is sort of stuck. We have, for all intents and purposes, broken its programming and it has frozen all action. When we burn it, it returns to an ethereal state and is able to resume normal operations. If this Will is injected into the air, we can then harness it in a variety of ways. Some of them are mundane in nature, whereas others are quite powerful.\n\tDemon Will when injected into the air stays within the chunk that it was put in without migrating. Each chunk has their own stored Will, with each type of Will stored individually (more on that in a different section). This Will can be accessed and manipulated by other blocks and items. -guide.BloodMagic.entry.demon.types.info=So far, the only type of Demon Will that we have discussed is raw Will. As the name suggests, it is the most raw and unadulterated form of Will there is, but this does not mean that it is pure. In fact, Demon Will takes on many different forms: Raw is the type we deal with normally, but there is also Corrosive, Destructive, Vengeful, and Steadfast. Raw Will is composed of a mixture of all four of these types, and perhaps mixed with other as of yet undiscovered types, but once split into these different Will types it seems impossible to recombine them.\n\tIt is not clear yet whether these different types of Will come from different sources, however we do know the process of generating these different types of Will. When Will of the same type bump into each other in the Aura it tends to congregate similar to how impurities in an otherwise homogeneous liquid clump together. If a device is able to latch onto these clumps within the Raw Will in the Aura, chunks of pure Will of a particular type can be gathered. One such device is the Demon Crystallizer, whose entry can be found further down.\n\tEach of these four types of Will represent different aspects of one's desire. There may be more types of Will, however they are either not pure enough or simply cannot be created in this form.\n\tCorrosive represents the desire to break down all things around oneself, either with acid or by crushing force. One who can master this Will can wield debilitating status effects and are immune to horrible poisons.\n\tVengeful can be viewed as the desire to seek a target without tiring. Usually, this can be seen either as an increased speed of the body to seek their pray or to make sure that a target is not able to get away as you continually attack them.\n\tDestructive, as you can probably tell, is pure force. Attack strength and overall physical prowess can be gained if this Will is properly harnessed. It can also be used to crush and smash things when used in other applications.\n\tSteadfast is seen as the desire to prevent damage to oneself. In most cases, masters of this Will are the defensive bulwark of the party, able to withstand powerful attacks and not even feel it. If you need to stay alive, through your armour or by rituals, this is one choice that should be considered. -guide.BloodMagic.entry.demon.crucible.info=The Demon Crucible is a device that is able to burn the Demon Will inside of a Tartaric Gem and other items in order to inject it into the Aura of the chunk that it is in. There are a few different ways to use the crucible: one of the simplest ways is to place a Tartaric Gem inside of the crucible by right clicking on it with a gem in your hand. The crucible will then in that case drain the Will from the gem until either the Aura is saturated with that type of Will (a max of 100 by default) or until the gem is empty.\n\tAnother mode is to use the contained Tartaric Gem to drain the Will from the Aura - this is done by applying a strong redstone signal to the crucible and then the contained gem will attempt to drain as much Will as possible.\n\tFinally, a discrete piece of Will can be burned in the crucible if there is enough room in the Aura of that type. One example of this is a Demon Will Crystal, which has a value of 50. -guide.BloodMagic.entry.demon.crystallizer.info=As discussed previously, Demon Aura is the ethereal manifestation of Demon Will, and the substance obtained when killing a mob is its physical manifestation. The Demon Crystallizer acts as an anchoring point for Demon Will in the Aura to latch on to, transforming the ethereal Will back into a physical form once again in the form of a crystal.\n\tYou may be curious why you do not just take the Will from a Tartaric Gem directly and form a crystal from it. That is because by transforming the Will to its ethereal form we purify it and allow the Will to attempt to resume its normal operations - keep in mind that when we kill a monster with Demon Will attached to them, we freeze the programming of the Will so that it cannot do what it was sent out to do. By converting it into the ethereal form in the Aura, the Will becomes more active, and that is the Will that is grabbed by the crystallizer. Just don't look at it funny.\n\tIn order for the Demon Crystallizer to work it must be in a chunk with a high amount of Demon Will (80) of a particular type, and after a certain amount of time it will consume the Will from the Aura in order to create a Demon Crystal Cluster with a single spire. There are two ways for the Crystallizer to work: it can form a crystal from an aspected type of Will (Corrosive, Destructive, Vengeful, and Steadfast) if there is enough Will of that particular type, or it will take Raw Will from the Aura to create a crystal. \n\tWhen it generates a crystal from Raw Will, there is a small chance (~40%%) for the formed crystal to be of one of the aspected types. Essentially, this is how you can initially gather the different types of Will. -guide.BloodMagic.entry.demon.cluster.info=The Demon Crystal Cluster can either be created by a Demon Crystallizer or by crafting one in the Hellfire Forge with Demon Will Crystals. Crafted clusters can be placed on any solid surface, such as the floor, walls, and ceilings. There are a max of seven spires on the crystal when fully grown, and when broken with a pickaxe it will drop the spires as Demon Will Crystals. However, if you right-click the cluster when you have a Tartaric Gem with more than 1024 Raw Will inside of it, you can break off a single spire from the cluster without breaking the cluster itself; this will never break the main spire from the cluster.\n\tWhen left to its own devices, the cluster will syphon some Will of the same type from the Aura to grow itself slowly. This process is a bit slow, but there is a minor net gain.\n\tThere are two rituals that are used to grow and harvest these crystals: the Gathering of the Forsaken Souls and the Crash of the Crystal. In order to find out how to use them, please refer to The Ritual Master. -guide.BloodMagic.entry.demon.pylon.info=As you may know, Demon Aura remains in its own chunk if there are not any outside influences. Well, this is one of those influences. The Demon Pylon acts as a beacon for Will in the Aura, pulling the Will from neighbouring chunks (those chunks that are directly next to it in the four cardinal directions, not diagonal) into its chunk. The Pylon will attempt to equalize the Will in its chunk with its neighbour so that the Pylon's chunk has as much Will as its highest neighbour for each Will type. This process only happens one way, however: if the neighbouring chunk has less Will in it than the Pylon's chunk, the Will will not transfer the other direction. -guide.BloodMagic.entry.demon.gauge.info=In order to tell how much Will you have in a given chunk you need to have a Demon Will Gauge. When in your inventory, the gauge will display the Will in the chunk that you have in five bars in the top-left corner of the screen. You can tell how much there is exactly by shifting; numbers will appear to the right of the bars to give the amount rounded to the nearest whole number. - - - -# Alchemy Entries -guide.BloodMagic.entry.alchemy.intro=Introduction -guide.BloodMagic.entry.alchemy.ash=Arcane Ash -guide.BloodMagic.entry.alchemy.speed=Movement Array -guide.BloodMagic.entry.alchemy.updraft=Updraft Array -guide.BloodMagic.entry.alchemy.bounce=Bouncing Array -guide.BloodMagic.entry.alchemy.turret=Skeleton Turret Array -guide.BloodMagic.entry.alchemy.buff=Buff Arrays -guide.BloodMagic.entry.alchemy.fastMiner=Fast Miner Array - - - - -# Alchemy Entry Texts -guide.BloodMagic.entry.alchemy.intro.info=My name is Vlad Highborn, and I am a Blood Mage. I have studied the intricate workings of alchemy and the process of "Equivalent Exchange," which governs all aspects of magic. Basically, you cannot create something from nothing, although many have tried when searching for a particular stone. That obviously didn't end well, because people are clamoring for a fake variant even today. Of course simply saying that I am an alchemist isn't enough, because one of the main things I do is study Blood Magic with The Ritual Master and The Architect, both of whom have achieved those titles by their own merits. Magus and Tiberius have been busy recording their own works over the years, although I don't think Magus has everything written down in a book - I have yet to find any actual proof.\n\tMy book deals with all things alchemical in Blood Magic. From the uses of Arcane Ash to the intricate workings of the Alchemy Table, you will find everything you need to know about some of the more complex elements in the world. Not everything you need to know is in this book - for a full understanding about Blood Magic, you will need to read the other entries in this entire tome.\n\tBut for now, I hope you enjoy my research notes. You shan't find any lies between these covers. -guide.BloodMagic.entry.alchemy.ash.info=Arcane Ash is necessary in order to create alchemy arrays, powerful circles that are able to provide various effects. This ash is crafted using the Hellfire Forge and Demon Will, so if you are new to this concept please consult the "Demon Kin." \n\tThe ash has a total of twenty uses before you need to craft another. When you right click on the ground (or a wall, though it will only render one direction), you will inscribe a simple circle out of ash. If you click on the ash again with an item, it will be "placed inside of the ash" - assuming that this item is valid, the circle will change shape to represent that it is ready for the next item. If it doesn't change shape, then you did something wrong.\n\tOnce it has changed shape, you can then place in the secondary item. If this item matches with the first item, the circle will start rotating and performing different actions depending on the recipe it is working on. \n\tEvery non-crafting effect that can be performed using these arrays can be found in this book, and even if the recipe changes through 3rd party means it will show updated here. The items shown are the order they need to be placed in. -guide.BloodMagic.entry.alchemy.speed.info=The Movement Array creates a small vortex of air at its center and uses a small amount of energy to heat it up. After that, once an animal or any other type of entity walks into its area of effect, they will be launched forward in the direction that it was placed in by the force of the air. What is more, if fallen onto from a large height, the array will eliminate the fall damage that would have incurred. Just be prepared for some mild motion afterward. \n\tThe direction of motion is in the direction of the arrow on the array.\n\tIt should also be noted that you will gain a much greater distance if you fall or jump onto the array than if you simply walked into its area. This has to do with the turbulence from your movements causing a much greater reaction. -guide.BloodMagic.entry.alchemy.updraft.info=Using the exact same principles as the Movement Array, this array launches the entity that steps on top of it vertically in the air. Naturally, any user would have to be careful because the way down may be a little arduous! -guide.BloodMagic.entry.alchemy.bounce.info=By using a source of heat near its center that is pushed downward, the array attempts to soften the ground underneath it. After it has done this, it then converts carbon and hydrogen into a rubbery material inside of the earth. This combination causes any entity to impact the surface to bounce in the air and eliminating the fall damage that would otherwise be sustained. This bouncing can be stopped by simply shifting, and it will still cushion your fall. -guide.BloodMagic.entry.alchemy.turret.info=By utilizing the Demon Will that is still controlling a mob, you can take over the mind of a skeleton in order to make it do your bidding. If a skeleton finds itself inside of the area of this array, it will act as a sentry and attack hostile monsters nearby. Unfortunately this array is still highly experimental, so it may not work very well or consistently. -guide.BloodMagic.entry.alchemy.buff.info=Through rigorous study, you realize that alchemical arrays have a wide range of applications. So far, you have managed to create powerful items through crafting arrays, as well as a couple of arrays that provide functional benefits such as rapid movement and weak forms of teleportation. However, one of the uses that you have yet to tap into is providing powerful buffs through an active array.\n\t"Buff Arrays" are the general term for alchemy arrays that provide some buff to players within its area of effect. These areas of effect tends to have a very large radius which cannot be manipulated (unlike Rituals). However, because alchemy arrays have no concept of a Soul Network, they have to power their effects through other means: mainly through direct blood offerings. In simplified terms, this means that whenever the array will apply a buff, it will damage (take HP) from the player that it is cast on. \n\tBecause of the direct nature of these sacrifices, the HP -> buff conversion is a lot more favourable for players in the early game compared to similar buffs in the mod. For instance, if a buff from a sigil cost 100 LP for 10 seconds of activation, a more powerful buff can be applied by the array for 30 seconds for 1 HP (which is 100 LP in a T1 altar with no runes). This can be seen as a lot more efficient in the early tiers, while during the later tiers it is not as efficient of an effect. However, because of the stationary nature of the arrays, they will tend to provide a stronger effect than their sigil counter parts, so people may wish to still use it in the late-game. -guide.BloodMagic.entry.alchemy.fastMiner.info=When tasked with carving out a large area of land, sometimes it is best to just do it by hand. For those occasions, this array is for you. The array applies a Haste III buff to players within a 10 block radius, costing the user 1 HP per 30 seconds. Because it is a general Haste buff, it will also increase your attack speed while in its area of effect, though you will have to be careful since other players will benefit from this too! diff --git a/src/main/resources/assets/bloodmagicguide/textures/gui/alchemyArrayCrafting.png b/src/main/resources/assets/bloodmagicguide/textures/gui/alchemyArrayCrafting.png deleted file mode 100644 index fc3a6eab..00000000 Binary files a/src/main/resources/assets/bloodmagicguide/textures/gui/alchemyArrayCrafting.png and /dev/null differ diff --git a/src/main/resources/assets/bloodmagicguide/textures/gui/altar.png b/src/main/resources/assets/bloodmagicguide/textures/gui/altar.png deleted file mode 100644 index 1ec33349..00000000 Binary files a/src/main/resources/assets/bloodmagicguide/textures/gui/altar.png and /dev/null differ diff --git a/src/main/resources/assets/bloodmagicguide/textures/gui/bullet_point.png b/src/main/resources/assets/bloodmagicguide/textures/gui/bullet_point.png deleted file mode 100644 index fd56d1bb..00000000 Binary files a/src/main/resources/assets/bloodmagicguide/textures/gui/bullet_point.png and /dev/null differ diff --git a/src/main/resources/assets/bloodmagicguide/textures/gui/soulForge.png b/src/main/resources/assets/bloodmagicguide/textures/gui/soulForge.png deleted file mode 100644 index 7ee6acd2..00000000 Binary files a/src/main/resources/assets/bloodmagicguide/textures/gui/soulForge.png and /dev/null differ diff --git a/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_upgrade_tomes.png b/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_upgrade_tomes.png deleted file mode 100644 index 7cd035e0..00000000 Binary files a/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_upgrade_tomes.png and /dev/null differ diff --git a/src/main/resources/data/bloodmagic/anointment/bow_power.json b/src/main/resources/data/bloodmagic/anointment/bow_power.json new file mode 100644 index 00000000..602a88c4 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/bow_power.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:bow_power", + "bonuses": { + "damage": [ + 1.25, + 1.5, + 1.75 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/anointment/hidden_knowledge.json b/src/main/resources/data/bloodmagic/anointment/hidden_knowledge.json new file mode 100644 index 00000000..b7e2a2d6 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/hidden_knowledge.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:hidden_knowledge", + "bonuses": { + "exp": [ + 2, + 4, + 6 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/anointment/holy_water.json b/src/main/resources/data/bloodmagic/anointment/holy_water.json new file mode 100644 index 00000000..58a29778 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/holy_water.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:holy_water", + "bonuses": { + "damage": [ + 5, + 10, + 15 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/anointment/melee_damage.json b/src/main/resources/data/bloodmagic/anointment/melee_damage.json new file mode 100644 index 00000000..e0a0f500 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/melee_damage.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:melee_damage", + "bonuses": { + "damage": [ + 3, + 6, + 9 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/anointment/quick_draw.json b/src/main/resources/data/bloodmagic/anointment/quick_draw.json new file mode 100644 index 00000000..6f9f3685 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/quick_draw.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:quick_draw", + "bonuses": { + "speed": [ + 0.5, + 1, + 1.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/arrow_protect.json b/src/main/resources/data/bloodmagic/living_armor/arrow_protect.json new file mode 100644 index 00000000..ae1ea715 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/arrow_protect.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:arrow_protect", + "levels": [ + { "xp": 30, "cost": 4 }, + { "xp": 200, "cost": 9 }, + { "xp": 400, "cost": 16 }, + { "xp": 800, "cost": 30 }, + { "xp": 1500, "cost": 60 }, + { "xp": 2500, "cost": 90 }, + { "xp": 3500, "cost": 125 }, + { "xp": 5000, "cost": 165 }, + { "xp": 7000, "cost": 210 }, + { "xp": 15000, "cost": 250 } + ], + "bonuses": { + "protection": [ + 0.1, + 0.3, + 0.4, + 0.6, + 0.7, + 0.75, + 0.77, + 0.8, + 0.83, + 0.85 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/arrow_shot.json b/src/main/resources/data/bloodmagic/living_armor/arrow_shot.json new file mode 100644 index 00000000..009585b7 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/arrow_shot.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:arrow_shot", + "levels": [ + { "xp": 50, "cost": 20 }, + { "xp": 200, "cost": 50 }, + { "xp": 700, "cost": 90 }, + { "xp": 1500, "cost": 160 }, + { "xp": 3000, "cost": 290 } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/critical_strike.json b/src/main/resources/data/bloodmagic/living_armor/critical_strike.json new file mode 100644 index 00000000..6089c9be --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/critical_strike.json @@ -0,0 +1,19 @@ +{ + "id": "bloodmagic:critical_strike", + "levels": [ + { "xp": 200, "cost": 5 }, + { "xp": 800, "cost": 12 }, + { "xp": 1300, "cost": 22 }, + { "xp": 2500, "cost": 35 }, + { "xp": 3000, "cost": 49 } + ], + "bonuses": { + "damage_boost": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/digging.json b/src/main/resources/data/bloodmagic/living_armor/digging.json new file mode 100644 index 00000000..96a24ecb --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/digging.json @@ -0,0 +1,53 @@ +{ + "id": "bloodmagic:digging", + "levels": [ + { "xp": 128, "cost": 5 }, + { "xp": 512, "cost": 10 }, + { "xp": 1024, "cost": 18 }, + { "xp": 2048, "cost": 32 }, + { "xp": 8192, "cost": 60 }, + { "xp": 16000, "cost": 90 }, + { "xp": 32000, "cost": 140 }, + { "xp": 50000, "cost": 180 }, + { "xp": 80000, "cost": 240 }, + { "xp": 150000, "cost": 300 } + ], + "bonuses": { + "speed_time": [ + 0, + 50, + 60, + 100, + 100, + 100, + 100, + 150, + 150, + 150 + ], + "speed_level": [ + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 2 + ], + "speed_modifier": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.8, + 1, + 1.2, + 1.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/experienced.json b/src/main/resources/data/bloodmagic/living_armor/experienced.json new file mode 100644 index 00000000..304dd659 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/experienced.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:experienced", + "levels": [ + { "xp": 100, "cost": 7 }, + { "xp": 400, "cost": 13 }, + { "xp": 1000, "cost": 22 }, + { "xp": 1600, "cost": 40 }, + { "xp": 3200, "cost": 65 }, + { "xp": 5000, "cost": 90 }, + { "xp": 7000, "cost": 130 }, + { "xp": 9200, "cost": 180 }, + { "xp": 11500, "cost": 250 }, + { "xp": 14000, "cost": 350 } + ], + "bonuses": { + "exp": [ + 0.15, + 0.3, + 0.45, + 0.6, + 0.75, + 0.9, + 1.05, + 1.2, + 1.35, + 1.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/fall_protect.json b/src/main/resources/data/bloodmagic/living_armor/fall_protect.json new file mode 100644 index 00000000..2e30bafa --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/fall_protect.json @@ -0,0 +1,19 @@ +{ + "id": "bloodmagic:fall_protect", + "levels": [ + { "xp": 30, "cost": 2 }, + { "xp": 200, "cost": 5 }, + { "xp": 400, "cost": 9 }, + { "xp": 800, "cost": 15 }, + { "xp": 1500, "cost": 25 } + ], + "bonuses": { + "protection": [ + 0.2, + 0.4, + 0.6, + 0.8, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/fire_resist.json b/src/main/resources/data/bloodmagic/living_armor/fire_resist.json new file mode 100644 index 00000000..6266703d --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/fire_resist.json @@ -0,0 +1,26 @@ +{ + "id": "bloodmagic:fire_resist", + "levels": [ + { "xp": 1200, "cost": 2 }, + { "xp": 3600, "cost": 6 }, + { "xp": 12000, "cost": 14 }, + { "xp": 24000, "cost": 25 }, + { "xp": 30000, "cost": 40 } + ], + "bonuses": { + "cooldown_time": [ + 6000, + 4800, + 4800, + 3600, + 2400 + ], + "resist_duration": [ + 600, + 600, + 800, + 1000, + 1200 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/grave_digger.json b/src/main/resources/data/bloodmagic/living_armor/grave_digger.json new file mode 100644 index 00000000..38152a35 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/grave_digger.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:grave_digger", + "levels": [ + { "xp": 200, "cost": 5 }, + { "xp": 800, "cost": 12 }, + { "xp": 1300, "cost": 20 }, + { "xp": 2500, "cost": 35 }, + { "xp": 3800, "cost": 49 }, + { "xp": 5000, "cost": 78 }, + { "xp": 7000, "cost": 110 }, + { "xp": 9200, "cost": 160 }, + { "xp": 11500, "cost": 215 }, + { "xp": 14000, "cost": 320 } + ], + "bonuses": { + "damage": [ + 1 + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/health.json b/src/main/resources/data/bloodmagic/living_armor/health.json new file mode 100644 index 00000000..46debd74 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/health.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:health", + "levels": [ + { "xp": 80, "cost": 5 }, + { "xp": 200, "cost": 12 }, + { "xp": 340, "cost": 20 }, + { "xp": 540, "cost": 35 }, + { "xp": 800, "cost": 49 }, + { "xp": 1600, "cost": 78 }, + { "xp": 2800, "cost": 110 }, + { "xp": 5000, "cost": 160 }, + { "xp": 7600, "cost": 215 }, + { "xp": 10000, "cost": 320 } + ], + "bonuses": { + "hp": [ + 4, + 8, + 12, + 16, + 20, + 26, + 32, + 38, + 44, + 50 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/jump.json b/src/main/resources/data/bloodmagic/living_armor/jump.json new file mode 100644 index 00000000..3bfe6019 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/jump.json @@ -0,0 +1,41 @@ +{ + "id": "bloodmagic:jump", + "levels": [ + { "xp": 30, "cost": 3 }, + { "xp": 200, "cost": 6 }, + { "xp": 400, "cost": 11 }, + { "xp": 700, "cost": 23 }, + { "xp": 1100, "cost": 37 }, + { "xp": 1500, "cost": 50 }, + { "xp": 2000, "cost": 70 }, + { "xp": 2800, "cost": 100 }, + { "xp": 3600, "cost": 140 }, + { "xp": 5000, "cost": 200 } + ], + "bonuses": { + "jump": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.7, + 0.75, + 0.9, + 1.1, + 1.3 + ], + "fall": [ + 0.33, + 0.4, + 0.45, + 0.5, + 0.55, + 0.60, + 0.65, + 0.75, + 0.85, + 0.95 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/knockback_resist.json b/src/main/resources/data/bloodmagic/living_armor/knockback_resist.json new file mode 100644 index 00000000..e74626ea --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/knockback_resist.json @@ -0,0 +1,26 @@ +{ + "id": "bloodmagic:knockback_resist", + "levels": [ + { "xp": 100, "cost": 3 }, + { "xp": 200, "cost": 7 }, + { "xp": 300, "cost": 13 }, + { "xp": 500, "cost": 26 }, + { "xp": 1000, "cost": 42 } + ], + "bonuses": { + "kb": [ + 0.2, + 0.4, + 0.6, + 0.8, + 1.0 + ], + "hp": [ + 0, + 0, + 0, + 4, + 10 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/melee_damage.json b/src/main/resources/data/bloodmagic/living_armor/melee_damage.json new file mode 100644 index 00000000..963cc11c --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/melee_damage.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:melee_damage", + "levels": [ + { "xp": 200, "cost": 5 }, + { "xp": 800, "cost": 12 }, + { "xp": 1300, "cost": 20 }, + { "xp": 2500, "cost": 35 }, + { "xp": 3800, "cost": 49 }, + { "xp": 5000, "cost": 78 }, + { "xp": 7000, "cost": 110 }, + { "xp": 9200, "cost": 160 }, + { "xp": 11500, "cost": 215 }, + { "xp": 14000, "cost": 320 } + ], + "bonuses": { + "damage": [ + 0.5, + 1, + 1.5, + 2, + 2.5, + 3, + 4, + 5, + 6, + 7 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/physical_protect.json b/src/main/resources/data/bloodmagic/living_armor/physical_protect.json new file mode 100644 index 00000000..bfb72198 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/physical_protect.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:physical_protect", + "levels": [ + { "xp": 30, "cost": 5 }, + { "xp": 200, "cost": 10 }, + { "xp": 400, "cost": 18 }, + { "xp": 800, "cost": 35 }, + { "xp": 1500, "cost": 65 }, + { "xp": 2500, "cost": 100 }, + { "xp": 3500, "cost": 140 }, + { "xp": 5000, "cost": 190 }, + { "xp": 7000, "cost": 250 }, + { "xp": 15000, "cost": 300 } + ], + "bonuses": { + "protection": [ + 0.1, + 0.3, + 0.4, + 0.6, + 0.7, + 0.75, + 0.77, + 0.8, + 0.83, + 0.85 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/poison_resist.json b/src/main/resources/data/bloodmagic/living_armor/poison_resist.json new file mode 100644 index 00000000..42312197 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/poison_resist.json @@ -0,0 +1,26 @@ +{ + "id": "bloodmagic:poison_resist", + "levels": [ + { "xp": 1200, "cost": 2 }, + { "xp": 3600, "cost": 6 }, + { "xp": 12000, "cost": 14 }, + { "xp": 24000, "cost": 25 }, + { "xp": 30000, "cost": 40 } + ], + "bonuses": { + "cooldown": [ + 1200, + 800, + 600, + 300, + 100 + ], + "max_cure": [ + 0, + 1, + 2, + 2, + 3 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/self_sacrifice.json b/src/main/resources/data/bloodmagic/living_armor/self_sacrifice.json new file mode 100644 index 00000000..08ba85f7 --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/self_sacrifice.json @@ -0,0 +1,29 @@ +{ + "id": "bloodmagic:self_sacrifice", + "levels": [ + { "xp": 30, "cost": 7 }, + { "xp": 200, "cost": 13 }, + { "xp": 400, "cost": 22 }, + { "xp": 700, "cost": 40 }, + { "xp": 1100, "cost": 65 }, + { "xp": 1500, "cost": 90 }, + { "xp": 2000, "cost": 130 }, + { "xp": 2800, "cost": 180 }, + { "xp": 3600, "cost": 250 }, + { "xp": 5000, "cost": 350 } + ], + "bonuses": { + "self_mod": [ + 0.15, + 0.3, + 0.45, + 0.6, + 0.75, + 0.9, + 1.05, + 1.2, + 1.35, + 1.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/speed.json b/src/main/resources/data/bloodmagic/living_armor/speed.json new file mode 100644 index 00000000..717abf5b --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/speed.json @@ -0,0 +1,53 @@ +{ + "id": "bloodmagic:speed", + "levels": [ + { "xp": 200, "cost": 3 }, + { "xp": 1000, "cost": 7 }, + { "xp": 2000, "cost": 13 }, + { "xp": 4000, "cost": 26 }, + { "xp": 7000, "cost": 42 }, + { "xp": 15000, "cost": 60 }, + { "xp": 25000, "cost": 90 }, + { "xp": 35000, "cost": 130 }, + { "xp": 50000, "cost": 180 }, + { "xp": 70000, "cost": 250 } + ], + "bonuses": { + "speed_time": [ + 0, + 0, + 0, + 0, + 0, + 20, + 60, + 60, + 100, + 200 + ], + "speed_level": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 2 + ], + "speed_modifier": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.7, + 0.9, + 1.1, + 1.3, + 1.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/living_armor/sprint_attack.json b/src/main/resources/data/bloodmagic/living_armor/sprint_attack.json new file mode 100644 index 00000000..f9c7166c --- /dev/null +++ b/src/main/resources/data/bloodmagic/living_armor/sprint_attack.json @@ -0,0 +1,26 @@ +{ + "id": "bloodmagic:sprint_attack", + "levels": [ + { "xp": 200, "cost": 3 }, + { "xp": 800, "cost": 7 }, + { "xp": 1300, "cost": 15 }, + { "xp": 2500, "cost": 25 }, + { "xp": 3800, "cost": 40 } + ], + "bonuses": { + "damage_boost": [ + 0.5, + 0.75, + 1, + 1.25, + 1.5 + ], + "kb": [ + 1, + 2, + 3, + 4, + 5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/loot_modifiers/fortune.json b/src/main/resources/data/bloodmagic/loot_modifiers/fortune.json new file mode 100644 index 00000000..d62cfa37 --- /dev/null +++ b/src/main/resources/data/bloodmagic/loot_modifiers/fortune.json @@ -0,0 +1,11 @@ +{ + "type": "bloodmagic:fortune", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/loot_modifiers/looting.json b/src/main/resources/data/bloodmagic/loot_modifiers/looting.json new file mode 100644 index 00000000..fe391f6f --- /dev/null +++ b/src/main/resources/data/bloodmagic/loot_modifiers/looting.json @@ -0,0 +1,12 @@ +{ + "type": "bloodmagic:looting", + "conditions": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/loot_modifiers/silk_touch_bamboo.json b/src/main/resources/data/bloodmagic/loot_modifiers/silk_touch_bamboo.json new file mode 100644 index 00000000..1e88d9b9 --- /dev/null +++ b/src/main/resources/data/bloodmagic/loot_modifiers/silk_touch_bamboo.json @@ -0,0 +1,11 @@ +{ + "type": "bloodmagic:silk_touch_bamboo", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/loot_modifiers/smelt.json b/src/main/resources/data/bloodmagic/loot_modifiers/smelt.json new file mode 100644 index 00000000..4e9bf5a5 --- /dev/null +++ b/src/main/resources/data/bloodmagic/loot_modifiers/smelt.json @@ -0,0 +1,11 @@ +{ + "type": "bloodmagic:smelt", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/book.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/book.json new file mode 100644 index 00000000..4d8fef9b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/book.json @@ -0,0 +1,23 @@ +{ + "name": "guide.bloodmagic.name", + "subtitle": "Alchemical Wizardry", + "landing_text": "Welcome to $(6)Blood Magic$()! $(br2)$(l:bloodmagic:utility/nyi)A lot of stuff$() isn't yet implemented, so please excuse our dust. $(br2)Click $(l:bloodmagic:utility/getting_started)HERE$() to get started. If you find any bugs, please report them on our $(l:https://github.com/WayofTime/BloodMagic/issues)Github$().", + "book_texture": "patchouli:textures/gui/book_red.png", + "filler_texture": "bloodmagic:textures/gui/patchouli_book/page_filler.png", + "creative_tab": "bloodmagictab", + "model": "bloodmagic:book", + "show_progress": false, + "macros": { + "$(water)": "$(#0000AA)", + "$(air)": "$(#AAAA00)", + "$(fire)": "$(#AA0000)", + "$(earth)": "$(#00AA00)", + "$(blank)": "$(#888888)", + "$(steadfast)": "$(#0000AA)", + "$(destructive)": "$(#AAAA00)", + "$(vengeful)": "$(#AA0000)", + "$(corrosive)": "$(#00AA00)", + "$(raw)": "$(#36C6C6)", + "$(blood)": "$(#AA0000)" + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array.json new file mode 100644 index 00000000..1896d31d --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array.json @@ -0,0 +1,6 @@ +{ + "name": "Alchemy Arrays", + "description": "Alchemy Arrays are simple effects that originate from circles that are drawn on the ground using $(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Arcane Ashes.$(/l) They are simple to build and can be really useful in both early game and late game applications.", + "icon": "bloodmagic:arcaneashes", + "sortnum": 2 +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/functional_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/functional_array.json new file mode 100644 index 00000000..96640011 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/functional_array.json @@ -0,0 +1,7 @@ +{ + "name": "Functional Arrays", + "description": "", + "icon": "bloodmagic:arcaneashes", + "parent": "bloodmagic:alchemy_array", + "sortnum": 0 +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/living_equipment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/living_equipment.json new file mode 100644 index 00000000..b864678c --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/living_equipment.json @@ -0,0 +1,7 @@ +{ + "name": "Living Equipment", + "description": "with some $(item)Arcane Ashes$() and a handful of this new $(item)Binding Reagent$(), a whole world of defense and utility has opened up before you.", + "icon": "bloodmagic:livinghelmet", + "parent": "bloodmagic:alchemy_array", + "sortnum": 2 +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/living_equipment/armor_upgrades.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/living_equipment/armor_upgrades.json new file mode 100644 index 00000000..0ea58b6e --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/living_equipment/armor_upgrades.json @@ -0,0 +1,6 @@ +{ + "name": "Living Armor Upgrades", + "description": "A list of available Living Armor Upgrades.", + "icon": "bloodmagic:upgradetome", + "parent": "bloodmagic:alchemy_array/living_equipment" +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/sigil.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/sigil.json new file mode 100644 index 00000000..af82aeeb --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_array/sigil.json @@ -0,0 +1,7 @@ +{ + "name": "Sigils", + "description": "$(item)Sigils$() are formed using an $(l:bloodmagic:alchemy_array/crafting_array)Alchemy Array$(), some form of $(item)Reagent$() and a $(l:bloodmagic:altar/slates)Slate$(). They draw LP from your $(altar/soul_network)Soul Network$() in order to perform all sorts of useful tasks.", + "icon": "bloodmagic:divinationsigil", + "parent": "bloodmagic:alchemy_array", + "sortnum": 1 +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_table.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_table.json new file mode 100644 index 00000000..958b5ccf --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_table.json @@ -0,0 +1,6 @@ +{ + "name": "Alchemy Table", + "description": "", + "icon": "bloodmagic:alchemytable", + "sortnum": 1 +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_table/anointments.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_table/anointments.json new file mode 100644 index 00000000..66adbb00 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/alchemy_table/anointments.json @@ -0,0 +1,6 @@ +{ + "name": "Anointments", + "description": "", + "icon": "bloodmagic:smelting_anointment", + "parent": "bloodmagic:alchemy_table" +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/altar.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/altar.json new file mode 100644 index 00000000..b82a7c93 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/altar.json @@ -0,0 +1,6 @@ +{ + "name": "Blood Altars", + "description": "One of the central concepts of Blood Magic is building a glorious ziggurat to focus your power. These pages will guide you in the construction of this masterwork.", + "icon": "bloodmagic:altar", + "sortnum": 0 +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/altar/blood_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/altar/blood_rune.json new file mode 100644 index 00000000..2d89895a --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/altar/blood_rune.json @@ -0,0 +1,6 @@ +{ + "name": "Blood Runes", + "description": "There's lots of different runes. They do cool stuff! Take your pick.", + "icon": "bloodmagic:blankrune", + "parent": "bloodmagic:altar" +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/demon_will.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/demon_will.json new file mode 100644 index 00000000..ce8f99e1 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/demon_will.json @@ -0,0 +1,6 @@ +{ + "name": "Demon Will", + "description": "$(item)Demon Will$() is one of the first things you can create with $(6)Blood Magic$(). Once you have gathered some with a $(l:bloodmagic:demon_will/soul_snare)Soul Snare$(), you will be able to craft a $(l:bloodmagic:demon_will/soul_gem)Petty Tartaric Gem$() and a $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$(/l)$().", + "icon": "bloodmagic:basemonstersoul", + "sortnum": 3 +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/rituals.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/rituals.json new file mode 100644 index 00000000..047ec904 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/rituals.json @@ -0,0 +1,6 @@ +{ + "name": "Rituals", + "description": "Rituals consume LP from your $(l:bloodmagic:altar/soul_network)Soul Network$(/l) in order to do a variety of tasks. $(br2)For information on specific rituals, click the Master Ritual Stone below.$(br2)>>> <<<", + "icon": "bloodmagic:ritualdiviner", + "sortnum": 4 +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/rituals/ritual_list.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/rituals/ritual_list.json new file mode 100644 index 00000000..065d9f1a --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/rituals/ritual_list.json @@ -0,0 +1,6 @@ +{ + "name": "List of Rituals", + "description": "Some simpler $(item)rituals$() will be available to you when you have a Tier III $(l:bloodmagic:altar/blood_altar)Blood Altar$(), but the more advanced ones will require Dusk Runes, and thus a Tier IV Altar. $(br2) Use the $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$() to assemble the rituals, and don't forget to keep your $(l:bloodmagic:altar/soul_network)Soul Network$() topped off!", + "icon": "bloodmagic:masterritualstone", + "parent": "bloodmagic:rituals" +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/utility.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/utility.json new file mode 100644 index 00000000..08a62079 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/categories/utility.json @@ -0,0 +1,6 @@ +{ + "name": "Utility Blocks & Items", + "description": "AKA the \"Miscellaneous\" bin. General information about the mod goes here, along with anything else that doesn't quite fit in another category, yet doesn't have enough to warrant a category of its own.", + "icon": "bloodmagic:incensealtar", + "sortnum": 99 +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/arcane_ash.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/arcane_ash.json new file mode 100644 index 00000000..22a0d810 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/arcane_ash.json @@ -0,0 +1,36 @@ +{ + "name": "Alchemy Array Basics", + "icon": "bloodmagic:arcaneashes", + "category": "bloodmagic:alchemy_array/functional_array", + "extra_recipe_mappings":[["bloodmagic:arcaneashes", 1]], + "pages": [ + { + "type": "text", + "text": "$(item)Arcane Ashes$() is an item that is pivotal in the creation of Alchemy Arrays. $(item)Arcane Ashes$() can be crafted in the $(l:bloodmagic:alchemy_table/alchemy_table)Alchemy Table($()) using some early game items." + }, + { + "type": "crafting_alchemy_table", + "heading": "Arcane Ashes", + "recipe": "bloodmagic:alchemytable/arcane_ash" + }, + { + "type": "text", + "text": "In order to create an Alchemy Array, right click the top of the ground with the $(item)Arcane Ashes$() (although any solid block face works) - this will consume 1 durability out of 20 from the $(item)Arcane Ashes$() and draw a simple Alchemy Array, that by itself has no effects.$(bl2)When you click on the Alchemy Array, it will consume a single item from the stack in your hand and hold it in the array. These items are then used to determine the Alchemy Array's effect." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/alchemy_array/simple_array.png", + "bloodmagic:images/entries/alchemy_array/divination_array_1.png", + "bloodmagic:images/entries/alchemy_array/divination_array_2.png" + ], + "title": "Alchemy Array", + "border": true, + "text": "Alchemy Array showing array with: no inputs; only the base item; both base and catalyst." + }, + { + "type": "text", + "text": "Each effect requires two items: a base and a catalyst. The base is the first item that you click the array with after it is drawn, and the catalyst is the second item. When you apply the input, the design of the array will change if it is valid, and the array will start activating once you apply the catalyst.$(br2)Although only a few arrays are currently implemented, eventually you will have arrays that range from simple $(l:bloodmagic:alchemy_array/crafting_array)crafting arrays$(/l) to even teleportation arrays." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/crafting_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/crafting_array.json new file mode 100644 index 00000000..c652a006 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/crafting_array.json @@ -0,0 +1,15 @@ +{ + "name": "Crafting with Arrays", + "icon": "bloodmagic:divinationsigil", + "category": "bloodmagic:alchemy_array/functional_array", + "pages": [ + { + "type": "text", + "text": "$(1)Alchemy Arrays of Crafting$() are one of the simplest forms of array. These arrays inscribe the $(item)base item$() onto the $(item)catalyst$(), transforming them both into a useful item (after a small, pretty animation)." + }, + { + "type": "text", + "text": "While some of these resulting items can be crafted $(l:bloodmagic:alchemy_array/sigil/divination)using very simple ingredients$(/l), others require additional steps to create useful items." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/movement_arrays.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/movement_arrays.json new file mode 100644 index 00000000..303671fd --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/movement_arrays.json @@ -0,0 +1,20 @@ +{ + "name": "Movement Array", + "icon": "minecraft:feather", + "category": "bloodmagic:alchemy_array/functional_array", + "pages": [ + { + "type": "text", + "text": "The Movement Arrays are a pair of arrays that thows players, mobs, items, etc in a specific direction. One will throw the items horizontally, while the other will throw them vertically." + }, + { + "type": "2x_functional_array", + "a.heading": "Speed Array", + "a.recipe": "bloodmagic:array/movement", + "a.image": "movementarray.png", + "b.heading": "Updraft Array", + "b.recipe": "bloodmagic:array/updraft", + "b.image": "updraftarray.png" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/spike_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/spike_array.json new file mode 100644 index 00000000..84e73b99 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/spike_array.json @@ -0,0 +1,17 @@ +{ + "name": "Spike Array", + "icon": "minecraft:iron_ingot", + "category": "bloodmagic:alchemy_array/functional_array", + "pages": [ + { + "type": "text", + "text": "The Spike Array is a rather simple array with a single purpose. When a living entity steps into the array, they are hit with a full heart of damage. This is good for mob traps, or for making your base a bit spikier for players." + }, + { + "type": "functional_array", + "heading": "Spike Array", + "recipe": "bloodmagic:array/spike", + "image": "spikearray.png" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/time_arrays.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/time_arrays.json new file mode 100644 index 00000000..a14c9526 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/functional_arrays/time_arrays.json @@ -0,0 +1,20 @@ +{ + "name": "Day/Night Arrays", + "icon": "minecraft:clock", + "category": "bloodmagic:alchemy_array/functional_array", + "pages": [ + { + "type": "text", + "text": "Time-based arrays are straight-forward arrays that control the time of day. The items will be consumed once the array starts changing the time. These recipes are temporary and will change in the future.$(br2)The Day array will change the time of day to the next sunrise. The Night array will change the time of day to the next sunset." + }, + { + "type": "2x_functional_array", + "a.heading": "New Dawn", + "a.recipe": "bloodmagic:array/day", + "a.image": "sunarray.png", + "b.heading": "True Twilight", + "b.recipe": "bloodmagic:array/night", + "b.image": "moonarray.png" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/body_builder.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/body_builder.json new file mode 100644 index 00000000..50a5f4eb --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/body_builder.json @@ -0,0 +1,11 @@ +{ + "name": "Body Builder", + "icon": "minecraft:cooked_beef", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Grants Knockback Resistance and bonus Health. Caps out at 100% Resistance and 10 half-hearts of health. $(br2)Trained by: Eating food. $(br2)Maximum level: 5" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/charging_strike.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/charging_strike.json new file mode 100644 index 00000000..be90ac0c --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/charging_strike.json @@ -0,0 +1,11 @@ +{ + "name": "Charging Strike", + "icon": "minecraft:golden_axe", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Increases damage and knockback from sprinting attacks, up to +50%. $(br2)Trained by: Dealing damage while sprinting. $(br2)Maximum level: 5" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/dwarven_might.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/dwarven_might.json new file mode 100644 index 00000000..4c631ac8 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/dwarven_might.json @@ -0,0 +1,11 @@ +{ + "name": "Dwarven Might", + "icon": "minecraft:diamond_pickaxe", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Increases mining speed while mining identical blocks. After a certain level, gives a Haste buff after breaking blocks. $(br2)Trained by: Mining. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/experienced.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/experienced.json new file mode 100644 index 00000000..72d28543 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/experienced.json @@ -0,0 +1,11 @@ +{ + "name": "Experienced", + "icon": "minecraft:experience_bottle", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Increases XP drops from killing mobs, up to 150%. $(br2)Trained by: Collecting XP. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/gift_of_ignis.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/gift_of_ignis.json new file mode 100644 index 00000000..fe91e876 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/gift_of_ignis.json @@ -0,0 +1,11 @@ +{ + "name": "Gift of Ignis", + "icon": "minecraft:blaze_powder", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Provides Fire Resistance. Higher levels last longer and recharge faster. $(br2)Trained by: Being on Fire. ($(item)Potions of Fire Resistance$() may be your friend here.) $(br2)Maximum level: 5" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/healthy.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/healthy.json new file mode 100644 index 00000000..7c116464 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/healthy.json @@ -0,0 +1,11 @@ +{ + "name": "Healthy", + "icon": "minecraft:golden_apple", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Grants additional health, up to 50 half-hearts. $(br2)Trained by: Restoring health (Ordinary healing, or via $(item)Potions of Healing$() or $(item)Potions of Regeneration$().) $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/pin_cushion.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/pin_cushion.json new file mode 100644 index 00000000..2db0a331 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/pin_cushion.json @@ -0,0 +1,11 @@ +{ + "name": "Pin Cushion", + "icon": "minecraft:arrow", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Offers protection from arrows. $(br2)Trained by: Being shot. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/poison_resistance.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/poison_resistance.json new file mode 100644 index 00000000..80969677 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/poison_resistance.json @@ -0,0 +1,11 @@ +{ + "name": "Poison Resistance", + "icon": "minecraft:milk_bucket", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Cures Poison. Has a cooldown which shortens with additional levels. $(br2)Trained by: Being Poisoned. $(br2)Maximum level: 5" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/quick_feet.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/quick_feet.json new file mode 100644 index 00000000..086ac451 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/quick_feet.json @@ -0,0 +1,11 @@ +{ + "name": "Quick Feet", + "icon": "minecraft:sugar", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Increases player movement speed up to 150%. $(br2)Trained by: Running around. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/soft_fall.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/soft_fall.json new file mode 100644 index 00000000..a24cff98 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/soft_fall.json @@ -0,0 +1,11 @@ +{ + "name": "Soft Fall", + "icon": "minecraft:feather", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Reduces fall damage, up to complete immunity. $(br2)Trained by: Getting hurt from falls. $(br2)Maximum level: 5" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/strong_legs.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/strong_legs.json new file mode 100644 index 00000000..9b99545f --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/strong_legs.json @@ -0,0 +1,11 @@ +{ + "name": "Strong Legs", + "icon": "minecraft:diamond_leggings", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Increases jump height and reduces fall damage, up to a maximum of an additional 7.5 blocks and 83% fall resistance. $(br2)Trained by: Jumping around. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/tough.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/tough.json new file mode 100644 index 00000000..aedce14b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/tough.json @@ -0,0 +1,11 @@ +{ + "name": "Tough", + "icon": "minecraft:shield", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Protects you from non-projectile harm. $(br2)Trained by: Taking damage from anything but projectiles. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/tough_palms.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/tough_palms.json new file mode 100644 index 00000000..857cb83b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/armor_upgrades/tough_palms.json @@ -0,0 +1,11 @@ +{ + "name": "Tough Palms", + "icon": "bloodmagic:sacrificialdagger", + "category": "bloodmagic:alchemy_array/living_equipment/armor_upgrades", + "pages": [ + { + "type": "text", + "text": "Effect: Grants a bonus to Self Sacrifice, up to an additional 150%. $(br2)Trained by: Sacrificing Blood with the Sacrificial Knife. $(br2)Maximum level: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/living_basics.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/living_basics.json new file mode 100644 index 00000000..a4fb2a4e --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/living_basics.json @@ -0,0 +1,30 @@ +{ + "name": "Living Equipment Basics", + "icon": "bloodmagic:reagentbinding", + "priority": true, + "category": "bloodmagic:alchemy_array/living_equipment", + "priority": "true", + "extra_recipe_mappings":[["bloodmagic:reagentbinding", 1]], + "pages": [ + { + "type": "text", + "text": "To create $(item)Living Equipment$(), you will first need $(item)Iron Armor$() (or $(item)Iron Armour$(), if you prefer), some $(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Arcane Ash$(), and some $(item)Binding Reagent$(). You'll also need at least a $(br)$(l:bloodmagic:demon_will/soul_gem)Common Tartaric Gem$() in order to hold the $(item)Demon Will$() required." + }, + { + "type": "crafting_alchemy_table", + "heading": "Binding Reagent", + "recipe": "bloodmagic:alchemytable/reagent_binding", + "text": "$(italic)It clings to me tightly...$()" + }, + { + "type": "text", + "text": "as with any other Alchemy Array, right click the top of the ground with the $(item)Arcane Ashes$() and apply the $(item)Binding Reagent$(). Then place in your $(item)Iron Helmet$(), $(item)Iron Chestplate$(), $(item)Iron Leggings$() or $(item)Iron Boots$(), stand back, and watch the show.$(br2) Living Equipment starts off equivalent to Iron, but it has $(item)Upgrade Points$() that can, with care, be spent to train it in specific ways. It starts with 100, but there may be ways to surpass this limitation..." + }, + { + "type": "crafting_array", + "heading": "Ritual of Binding", + "recipe": "bloodmagic:array/living_helmet", + "text": "It's alive, all right... and it's learning from me. I'd best be careful what I teach it. $(br2)I can keep a closer eye on what it's learned so far by holding shift when I look at it." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/living_upgrades.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/living_upgrades.json new file mode 100644 index 00000000..92a18ee9 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/living_equipment/living_upgrades.json @@ -0,0 +1,17 @@ +{ + "name": "Living Equipment Upgrades", + "icon": "bloodmagic:upgradetome", + "priority": true, + "category": "bloodmagic:alchemy_array/living_equipment", + "extra_recipe_mappings":[["bloodmagic:upgradetome", 0]], + "pages": [ + { + "type": "text", + "text": "While wearing this new armour, you have felt it growing, trying to assist you with various tasks it has seen you perform. $(br2)It seems to be able to perform in a number of areas, but its growth is limited, and trying to do everything at once is quite fruitless." + }, + { + "type": "text", + "text": "Perhaps multiple specialised sets may be a good idea? Of course, you'll have to train it carefully if you want more than a smattering of poorly-directed benefits. $(br2)Fortunately, you have devised a $(l:rituals/ritual_list/ritual_upgrade_remove)Ritual$() that will assist with training, and $(l:rituals/ritual_list/ritual_armour_evolve)another one$() that will imbue your armour with a greater ability to grow." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/air.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/air.json new file mode 100644 index 00000000..3cc3dc28 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/air.json @@ -0,0 +1,23 @@ +{ + "name": "Air Sigil", + "icon": "bloodmagic:airsigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentair", 1], + ["bloodmagic:airsigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "Throws you in the direction you're facing, at a cost of 50 LP per use. Note that this does not provide any sort of Feather Falling effect, so be careful when landing! A good way to get around quickly, albeit with some risk. Many an unwary mage has met their end by running out of LP in their $(l:bloodmagic:altar/soul_network)Soul Network$() while flying miles above the countryside." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Air Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_air", + "array.heading": "Air Sigil", + "array.recipe": "bloodmagic:array/airsigil", + "array.text": "$(italic)I feel lighter already..." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/blood_light.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/blood_light.json new file mode 100644 index 00000000..c7d0c769 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/blood_light.json @@ -0,0 +1,23 @@ +{ + "name": "Sigil of the Blood Lamp", + "icon": "bloodmagic:bloodlightsigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentbloodlight", 1], + ["bloodmagic:bloodlightsigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Sigil of the Blood Lamp$() is a handy tool for any miner, dungeon delver, or simply any Blood Mage that doesn't like dark patches and feels that torches and glowstone blocks get in the way. When used, this sigil launches a Blood Light in the direction you are facing. When it hits a block, it spawns a nearly-invisible light source at a cost of 10LP." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Blood Lamp Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_blood_light", + "array.heading": "Sigil of the Blood Lamp", + "array.recipe": "bloodmagic:array/bloodlightsigil", + "array.text": "$(italic)I see a light!" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/divination.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/divination.json new file mode 100644 index 00000000..612488ed --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/divination.json @@ -0,0 +1,33 @@ +{ + "name": "Divination Sigil", + "icon": "bloodmagic:divinationsigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:divinationsigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Divination Sigil$() is probably the first of many sigils that you would like to craft in Blood Magic. In order to craft the sigil, you need to create an $(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Alchemy Array$(/l) and use $(item)Redstone Dust$() and a $(item)Blank Slate$() as the base and catalyst items, respectively." + }, + { + "type": "crafting_array", + "heading": "Divination Sigil", + "recipe": "bloodmagic:array/divinationsigil", + "text": " $(italic)Peer into the soul." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/sigil/divination_sigil.png" + ], + "title": "Divination Sigil Array", + "border": true, + "text": "The Divination Sigil, next to its crafting array." + }, + { + "type": "text", + "text": "The Divination Sigil has two primary uses: $(br)$(li)When the player right-clicks in the air with the sigil, it will display the amount of LP that is in the owner's $(l:bloodmagic:altar/soul_network)Soul Network.$(/l)$(li)When clicking on a $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l), it will tell the player the altar's current Tier, the amount of LP stored in the altar, as well as its current max capacity. Having a $(item)Divination Sigil$() on hand can also be helpful for other block applications, but that will be covered later." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/grove.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/grove.json new file mode 100644 index 00000000..0d3bf70a --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/grove.json @@ -0,0 +1,37 @@ +{ + "name": "Sigil of the Green Grove", + "icon": "bloodmagic:growthsigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentgrowth", 1], + ["bloodmagic:growthsigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Sigil of the Green Grove$() is an item that has multiple uses. Crafted in an array with a $(item)Growth Reagent$(item) and a $(item)Reinforced Slate$(), the sigil can use the power of your stored life force to nourish and grow nearby plants." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Growth Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_growth", + "array.heading": "Sigil of the Green Grove", + "array.recipe": "bloodmagic:array/growthsigil" + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/sigil/grove_sigil1.png", + "bloodmagic:images/entries/sigil/grove_sigil2.png", + "bloodmagic:images/entries/sigil/grove_sigil3.png" + ], + "title": "Green Grove Sigil Array", + "border": true, + "text": "The Sigil of the Green Grove's array, plus its primary uses." + }, + { + "type": "text", + "text": "If you right click on a block that is $(2)IGrowable$(), it will apply the bonemeal effect while consuming 150LP.$(br2)However, if you shift-right-click the sigil in the air, the sigil will light up to indicate that it is activated, and will consume 150LP every 10 seconds. Every block in a 7x7x5 high volume centered on the player will have a growth tick applied to it. Good for farming those taters!" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/holding.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/holding.json new file mode 100644 index 00000000..abadeedf --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/holding.json @@ -0,0 +1,23 @@ +{ + "name": "Sigil of Holding", + "icon": "bloodmagic:sigilofholding", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentholding", 1], + ["bloodmagic:sigilofholding", 1] + ], + "pages": [ + { + "type": "text", + "text": "[Needs content pass from Wrince or WayofTime]$(br2)Press \"$(k:bloodmagic.keybind.open_holding)\" while holding the sigil to open its inventory.$()$(br)Press \"$(k:bloodmagic.keybind.cycle_holding_pos)\" to cycle forward,$() or \"$(k:bloodmagic.keybind.cycle_holding_neg)\" to cycle backwards.$() Sneaking and using your mousewheel also works.$(br2)If you don't see any keybinds there, then you don't have any set yet." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Holding Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_holding", + "array.heading": "Sigil of Holding", + "array.recipe": "bloodmagic:array/holdingsigil", + "array.text": "$(italic)Sigil-ception" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/ice.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/ice.json new file mode 100644 index 00000000..770bdf2e --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/ice.json @@ -0,0 +1,14 @@ +{ + "name": "Sigil of the Frozen Lake [NYI]", + "icon": "bloodmagic:icesigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:icesigil", 0] + ], + "pages": [ + { + "type": "text", + "text": "[WIP Notes]$(br)[Not Yet Implemented]$(br2)Frostwalker Enchantment as a Sigil." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/lava.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/lava.json new file mode 100644 index 00000000..5602904c --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/lava.json @@ -0,0 +1,33 @@ +{ + "name": "Lava Sigil", + "icon": "bloodmagic:lavasigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentlava", 1], + ["bloodmagic:lavasigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The sister sigil to the $(l:bloodmagic:alchemy_array/sigil/water)Water Sigil,$(/l) the $(item)Lava Sigil$() creates a source block of lava where you click on the ground for the cost of 1000LP. Crafted in an $(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Alchemy Array$(/l) using a $(item)Lava Reagent$() and a $(item)Blank Slate,$() it'll drain 5 hearts from you if you don't have enough LP in your $(l:bloodmagic:altar/soul_network)Soul Network.$(/l)" + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Lava Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_lava", + "array.heading": "Lava Sigil", + "array.recipe": "bloodmagic:array/lavasigil", + "array.text": "$(italic)HOT! DO NOT EAT" + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/sigil/lava_sigil1.png", + "bloodmagic:images/entries/sigil/lava_sigil2.png" + ], + "title": "Lava Sigil Array", + "border": true, + "text": "The Lava Sigil, next to its crafting array, plus its primary use." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/magnetism.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/magnetism.json new file mode 100644 index 00000000..9c83a3a5 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/magnetism.json @@ -0,0 +1,22 @@ +{ + "name": "Sigil of Magnetism", + "icon": "bloodmagic:sigilofmagnetism", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentmagnetism", 1], + ["bloodmagic:sigilofmagnetism", 1] + ], + "pages": [ + { + "type": "text", + "text": "[WIP Notes]$(br)[Not Yet Implemented]$(br2)Attacts items in the world towards the holder for pickup." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Magnetism Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_magnetism", + "array.heading": "Sigil of Magnetism", + "array.recipe": "bloodmagic:array/magnetismsigil" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/mining.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/mining.json new file mode 100644 index 00000000..bf620f8f --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/mining.json @@ -0,0 +1,32 @@ +{ + "name": "Sigil of the Fast Miner", + "icon": "bloodmagic:miningsigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentfastminer", 1], + ["bloodmagic:miningsigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Sigil of the Fast Miner$() is a sigil that, when activated using shift-right-click, will consume 100LP every 10 seconds and apply the Haste potion effect. Thus, it increases your mining, digging, and cutting speeds. Crafted using the $(item)Mining Reagent$() and $(item)Reinforced Slate$() in an alchemy array." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Mining Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_fastminer", + "array.heading": "Sigil of the Fast Miner", + "array.recipe": "bloodmagic:array/fastminersigil" + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/sigil/mining_sigil1.png", + "bloodmagic:images/entries/sigil/mining_sigil2.png" + ], + "title": "Fast Miner Sigil Array", + "border": true, + "text": "The Sigil of the Fast Miner's array, plus its primary uses." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/seer.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/seer.json new file mode 100644 index 00000000..21264a53 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/seer.json @@ -0,0 +1,36 @@ +{ + "name": "Seer's Sigil", + "icon": "bloodmagic:seersigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentsight", 2], + ["bloodmagic:seersigil", 2] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Seer's Sigil$() is a more advanced form of the $(l:bloodmagic:alchemy_array/sigil/divination)Divination Sigil$(). Alongside showing the amount of LP in the bound player's $(l:bloodmagic:altar/soul_network)Soul Network$(/l), it also shows more information when looking at a $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l)." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Sight Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_sight", + "array.heading": "Seer's Sigil", + "array.recipe": "bloodmagic:array/seersigil", + "array.text": "$(italic)When seeing all is not enough" + }, + { + "type": "text", + "text": "From top to bottom, we have: $(li)The current Tier of the $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l). $(li)The amount of blood currently inside the Altar, and the current total capacity of the Altar. (This defaults to 10,000mb, but may be increased with $(l:bloodmagic:altar/blood_rune/capacity_rune)Runes of Capacity$() and $(l:bloodmagic:altar/blood_rune/aug_capacity_rune)Runes of Augmented Capacity.$() $(li)The current crafting progress, if any. $(li)LP Consumption/Tick - how much LP the Altar will use per tick when crafting. $(li) Current LP Storage of any $(l:bloodmagic:altar/blood_rune/charging_rune)Charging Runes$() you may have." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/sigil/seer_sigil_info.png" + ], + "title": "Seer's Sigil Display", + "border": true, + "text": "The Seer's Sigil's displays this HUD when you are looking at a blood Altar." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/void.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/void.json new file mode 100644 index 00000000..6bfa76ab --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/void.json @@ -0,0 +1,23 @@ +{ + "name": "Void Sigil", + "icon": "bloodmagic:voidsigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentvoid", 1], + ["bloodmagic:voidsigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Void sigil$(), when right-clicked on any fluid, will destroy it at a cost of 50LP per block. Good for clearing out irksome lava flows without all that tedious placing and breaking of individual blocks." + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Void Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_void", + "array.heading": "Void Sigil", + "array.recipe": "bloodmagic:array/voidsigil", + "array.text": "$(italic)Better than a Swiffer\u00AE!" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/water.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/water.json new file mode 100644 index 00000000..e43be9df --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_array/sigil/water.json @@ -0,0 +1,33 @@ +{ + "name": "Water Sigil", + "icon": "bloodmagic:watersigil", + "category": "bloodmagic:alchemy_array/sigil", + "extra_recipe_mappings":[ + ["bloodmagic:reagentwater", 1], + ["bloodmagic:watersigil", 1] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Water Sigil$() is a rather simple sigil. By right clicking on a block, you can drain 100LP from your $(l:bloodmagic:altar/soul_network)Soul Network$(/l) to place a source block of water in the world. If there's not enough LP, it will instead drain the toll from your health. Crafted using a $(item)Water Reagent$() and a $(item)Blank Slate.$()" + }, + { + "type": "crafting_2-step_sigil", + "alchemy_table.heading": "Water Reagent", + "alchemy_table.recipe": "bloodmagic:alchemytable/reagent_water", + "array.heading": "Water Sigil", + "array.recipe": "bloodmagic:array/watersigil", + "array.text": "$(italic)Infinite water, anyone?" + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/sigil/water_sigil1.png", + "bloodmagic:images/entries/sigil/water_sigil2.png" + ], + "title": "Water Sigil Array", + "border": true, + "text": "The Water Sigil, next to its crafting array, plus its primary use." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/alchemy_table.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/alchemy_table.json new file mode 100644 index 00000000..48a57843 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/alchemy_table.json @@ -0,0 +1,95 @@ +{ + "name": "Alchemy Table", + "icon": "bloodmagic:alchemytable", + "category": "bloodmagic:alchemy_table", + "extra_recipe_mappings":[ + ["bloodmagic:plantoil", 8], + ["bloodmagic:coalsand", 9] + ], + "pages": [ + { + "type": "text", + "text": "The Alchemy Table takes a little LP and a few ingredients to do some wondrous things!$(br2)A lot of its content is NYI. $(br2)Mouse over the LP arrow for more info." + }, + { + "type": "crafting", + "recipe": "bloodmagic:alchemy_table" + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/alchemy_table/alchemy_table_gui.png" + ], + "title": "Alchemy Table GUI", + "border": true, + "text": "The Alchemy Table can be inserted into or extracted from. This is how it's configured." + }, + { + "type": "text", + "text": "The $(item)Alchemy Table$() has a number of buttons on its right hand side. These are, in order, $(underline)D$()own, $(underline)U$()p, $(underline)N$()orth, $(underline)S$()outh, $(underline)W$()est, and $(underline)e$()ast. To use them, first click on any slot in the Alchemy Table. (Here, we have selected the central 'finished item' slot, for demonstration.) Next, click on one of these six buttons to toggle whether or not the $(item)Alchemy Table$() should allow $(item)Hoppers$(), pipes, or other such external interference from this face. To return to the table's normal function," + }, + { + "type": "text", + "text": "simply click the slot again to deselect it. The icon displayed in the slot shows whether it is accepting inputs or providing outputs. In the example picture, we are allowing pipes to take from our central slot only on the $(underline)D$()own slot, and any attempts to extract items from other sides will not succeed. $(br2)The following pages document a number of recipes currently available for the Alchemy Table." + }, + + { + "type": "crafting_alchemy_table", + "heading": "Basic Cutting Fluid", + "anchor": "cutting_fluid", + "recipe": "bloodmagic:alchemytable/basic_cutting_fluid", + "text": "Basic Cutting Fluid is used for 2x Ore Processing. It is also used in the $(l:bloodmagic:utility/alchemical_reaction_chamber)Alchemical Reaction Chamber$(/l) and the $(l:bloodmagic:rituals/ritual_list/ritual_crushing)Ritual of the Crusher$() for the same purpose." + }, + { + "type": "2x_crafting_alchemy_table", + "a.heading": "Iron Sand", + "a.recipe": "bloodmagic:alchemytable/sand_iron", + "b.heading": "Gold Sand", + "b.recipe": "bloodmagic:alchemytable/sand_gold" + }, + { + "type": "text", + "text": "The Alchemy Table provides several ways to get vanilla items." + }, + { + "type": "3x_crafting_alchemy_table", + "a.heading": "Grass", + "a.recipe": "bloodmagic:alchemytable/grass_block", + "b.heading": "Leather", + "b.recipe": "bloodmagic:alchemytable/leather_from_flesh", + "c.heading": "Bread", + "c.recipe": "bloodmagic:alchemytable/bread" + }, + { + "type": "2x_crafting_alchemy_table", + "a.heading": "Clay", + "a.recipe": "bloodmagic:alchemytable/clay_from_sand", + "b.heading": "String", + "b.recipe": "bloodmagic:alchemytable/string" + }, + { + "type": "2x_crafting_alchemy_table", + "a.heading": "Flint", + "a.recipe": "bloodmagic:alchemytable/flint_from_gravel", + "b.heading": "Gunpowder", + "b.recipe": "bloodmagic:alchemytable/gunpowder", + "b.text": "Saltpeter NYI in Blood Magic." + }, + { + "type": "3x_crafting_alchemy_table", + "a.heading": "Plant Oil", + "a.recipe": "bloodmagic:alchemytable/plantoil_from_wheat", + "b.recipe": "bloodmagic:alchemytable/plantoil_from_carrots", + "c.recipe": "bloodmagic:alchemytable/plantoil_from_taters" + }, + { + "type": "3x_crafting_alchemy_table", + "a.heading": "Plant Oil Cont.", + "a.recipe": "bloodmagic:alchemytable/plantoil_from_beets", + "b.heading": "Coal Sand", + "b.recipe": "bloodmagic:alchemytable/sand_coal", + "c.heading": "Explosive Powder", + "c.recipe": "bloodmagic:alchemytable/explosive_powder" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments.json new file mode 100644 index 00000000..fc0265ce --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments.json @@ -0,0 +1,18 @@ +{ + "name": "Anointments", + "icon": "bloodmagic:melee_anointment", + "category": "bloodmagic:alchemy_table", + "extra_recipe_mappings":[["bloodmagic:slate_vial", 1]], + "pages": [ + { + "type": "text", + "text": "$(item)Anointments$() are essentially $(item)potions$() for your tools, weapons, and even your $(l:bloodmagic:demon_will/explosive_charges)Charges$(). By right-clicking with the $(item)anointment$() in one hand, it will be applied to the item in your other hand, if possible. Not all anointments work on all equipment! $(br2)Unlike $(item)potions$(), $(item)anointments$() aren't timed; rather, they wear off a bit at a time as your tool or weapon is used." + }, + { + "type": "crafting_alchemy_table", + "heading": "Slate-infused Vial", + "recipe": "bloodmagic:alchemytable/slate_vial", + "text": "A sturdy Vial that can contain otherwise uncontainable mixtures." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/bow_power_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/bow_power_anointment.json new file mode 100644 index 00000000..9a93a8ba --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/bow_power_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Iron Tip", + "icon": "bloodmagic:bow_power_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:bow_power_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Iron Tip", + "recipe": "bloodmagic:alchemytable/bow_power_anointment", + "text": "Increases the damage of fired arrows by 25%. Also stacks with Vanilla enchantments. $(br2)Valid items: Bows, Crossbows.$(br2)Applies: Heavy Shot I (256 shots)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/fortune_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/fortune_anointment.json new file mode 100644 index 00000000..bda05b21 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/fortune_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Fortuna Extract", + "icon": "bloodmagic:fortune_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:fortune_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Fortuna Extract", + "recipe": "bloodmagic:alchemytable/fortune_anointment", + "text": "Increases the yield of some harvested blocks. Also stacks with the Fortune enchantment. $(br2)Valid items: Tools, Swords, Charges. $(br2)Applies: Fortunate I (256 blocks)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/hidden_knowledge_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/hidden_knowledge_anointment.json new file mode 100644 index 00000000..524f64e9 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/hidden_knowledge_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Miner's Secrets", + "icon": "bloodmagic:hidden_knowledge_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:hidden_knowledge_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Miner's Secrets", + "recipe": "bloodmagic:alchemytable/hidden_knowledge_anointment", + "text": "Blocks drop exp on successful harvest. Drops +2exp per block. $(br2)Valid items: Tools, Swords, Charges.$(br2)Applies: Miner's Secrets I (256 blocks)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/holy_water_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/holy_water_anointment.json new file mode 100644 index 00000000..17e0bc58 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/holy_water_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Holy Water", + "icon": "bloodmagic:holy_water_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:holy_water_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Holy Water", + "recipe": "bloodmagic:alchemytable/holy_water_anointment", + "text": "Temporarily increases the melee damage dealt to undead mobs by +5. $(br2)Valid items: Tools, Swords.$(br2)Applies: Holy Light I (256 hits)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/looting_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/looting_anointment.json new file mode 100644 index 00000000..a236c120 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/looting_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Plunderer's Glint", + "icon": "bloodmagic:looting_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:looting_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Plunderer's Glint", + "recipe": "bloodmagic:alchemytable/looting_anointment", + "text": "Increases the drops from killed mobs. Also stacks with the Looting enchantment.$(br2)Valid items: Tools, Swords.$(br2)Applies: Plundering I (256 hits)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/melee_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/melee_anointment.json new file mode 100644 index 00000000..0f9deec8 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/melee_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Honing Oil", + "icon": "bloodmagic:melee_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:melee_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Honing Oil", + "recipe": "bloodmagic:alchemytable/melee_damage_anointment", + "text": "Temporarily increases the melee damage dealt by +3. $(br2)Valid items: Tools, Swords.$(br2)Applies: Whetstone I (256 hits)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/quick_draw_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/quick_draw_anointment.json new file mode 100644 index 00000000..7c19afc0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/quick_draw_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Dexterity Alkahest", + "icon": "bloodmagic:quick_draw_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:quick_draw_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Dexterity Alkahest", + "recipe": "bloodmagic:alchemytable/quick_draw_anointment", + "text": "Lowers the draw time of bows and crossbows by 33%. $(br2)Valid items: Bows, Crossbows.$(br2)Applies: Deft Hands I (256 shots)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/silk_touch_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/silk_touch_anointment.json new file mode 100644 index 00000000..54fee0d5 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/silk_touch_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Soft Coating", + "icon": "bloodmagic:silk_touch_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:silk_touch_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Soft Coating", + "recipe": "bloodmagic:alchemytable/silk_touch_anointment", + "text": "Applies Silk Touch to blocks harvested. Does not stack with the vanilla enchantment.$(br2)Valid items: Tools, Swords, Charges.$(br2)Applies: Soft Touch I (256 blocks)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/smelting_anointment.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/smelting_anointment.json new file mode 100644 index 00000000..693f0660 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/alchemy_table/anointments/smelting_anointment.json @@ -0,0 +1,14 @@ +{ + "name": "Slow-burning Oil", + "icon": "bloodmagic:smelting_anointment", + "category": "bloodmagic:alchemy_table/anointments", + "extra_recipe_mappings":[["bloodmagic:smelting_anointment", 0]], + "pages": [ + { + "type": "crafting_alchemy_table", + "heading": "Slow-burning Oil", + "recipe": "bloodmagic:alchemytable/smelting_anointment", + "text": "Uses heat to smelt harvested blocks. $(br2)Valid items: Tools, Swords, Charges. $(br2)Applies: Heated Tool I (256 blocks)" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_altar.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_altar.json new file mode 100644 index 00000000..26acc078 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_altar.json @@ -0,0 +1,178 @@ +{ + "name": "The Blood Altar", + "icon": "bloodmagic:altar", + "category": "bloodmagic:altar", + "priority": "true", + "extra_recipe_mappings":[ + ["bloodmagic:daggerofsacrifice", 13] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Blood Altar$() is the central block of the mod, able to convert raw blood into pure life essence. While it may start off small and insignificant, its strength and size grows throughout the mod, acting as a cornerstone for most of your power." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_altar" + }, + { + "type": "text", + "text": "When placed into the world, the Blood Altar converts $(1)Life Essence$() into power to transfigure items placed into it. By right-clicking on the Altar, you may insert one item from your hand into the Altar's internal inventory. Right-clicking with an empty hand will extract the item." + }, + { + "type": "multiblock", + "name": "Tier 1 Blood Altar", + "multiblock":{ + "pattern":[ + ["0"], + ["_"] + ], + "mapping":{ + "0": "bloodmagic:altar" + }, + "symmetrical": true + }, + "text": "The Tier 1 Blood Altar, which has no runes." + }, + { + "type": "text", + "text": "In order for you to add $(1)Life Essence$(), measured as \"LP\", you first have to craft a $(item)Sacrificial Knife$(). By right-clicking in the air with the knife, you can \"extract\" 200LP for the cost of one heart, placing it into a nearby Altar. The Altar starts with a maximum capacity of 10,000LP, and the blood level in the basin indicates the percentage filled. The $(l:bloodmagic:alchemy_array/sigil/divination)Divination Sigil$(/l) allows more detailed information about the Altar." + }, + { + "type": "crafting", + "recipe": "bloodmagic:sacrificial_dagger", + "anchor": "knife", + "text": "Keep in mind that 10% of the total LP the altar can hold will be absorbed into an invisible internal 'tank' used for extracting and inserting Life Essence into the Altar." + }, + { + "type": "text", + "text": "The Blood Altar will attempt to start to craft as soon as an item is placed inside by a player (or after a periodic 5 seconds). The LP inside of the Altar will slowly drain, indicated by red particles, transforming the item. If there is no LP in the Altar, gray smoke will appear to indicate that the Altar is losing progress instead. Once enough LP is consumed (cost multiplied by number in the item stack), the full stack will be transformed into a new item." + }, + { + "type": "text", + "text": "The first item that you will want to craft is a $(l:bloodmagic:altar/soul_network)Weak Blood Orb$(/l), which by default is a diamond plus 2000LP inside of a Tier 1 Blood Altar. All items that can be crafted by the Blood Altar can be found using Just Enough Items (JEI)." + }, + { + "type": "text", + "anchor": "blank_rune", + "text": "To upgrade the Blood Altar, you need to craft $(item)Blood Runes$() and place them around the Altar. Blood Runes act as upgrades to the Altar, and by using more advanced versions of the Blood Runes you can confer different effects on the Altar. The basic version, the $(item)Blank Rune$(), does not give any upgrades barring upgrading the Tier of the Altar." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_blank" + }, + { + "type": "text", + "text": "In order to upgrade the Blood Altar to Tier 2, you must place 8 $(item)Blood Runes$() around the Altar. The runes in the cardinals can be upgraded, but the corner runes cannot act as upgrade runes until Tier 3." + }, + { + "type": "multiblock", + "name": "Tier 2 Blood Altar", + "multiblock": { + "pattern":[ + ["___", "_0_", "___"], + ["___", "_A_", "___"], + ["BRB", "R_R", "BRB"] + ], + "mapping":{ + "A": "bloodmagic:altar", + "B": "bloodmagic:blankrune", + "R": "#bloodmagic:altar_components/bloodrune" + }, + "symmetrical": true + }, + "text": "The Tier 2 Blood Altar, which has 8 total runes." + }, + { + "type": "text", + "anchor": "dagger_of_sacrifice", + "text": "Now that you have a Tier 2 Altar, you can look into getting blood from somewhere other than yourself. The $(item)Dagger of Sacrifice$() will allow you to kill any mob (monster or passive) that stands within 2 blocks of your Altar, instantly killing them and granting you a decent sum of LP. You can increase the amount you get per kill with $(l:bloodmagic:altar/blood_rune/sacrifice_rune)Runes of Sacrifice$(). Different entities give different amounts of LP. Check your configs for more info." + }, + { + "type": "crafting_altar", + "heading": "Dagger of Sacrifice", + "recipe": "bloodmagic:altar/daggerofsacrifice", + "text": "Slaughtering villagers for fun and profit!" + }, + { + "type": "text", + "text": "To upgrade the Blood Altar to Tier 3, place 5 $(item)Blood Runes$() one block down and two blocks away from the previous set of runes along each edge. Then place two blocks (indicated by the $(item)Stone Bricks$()) in each corner, starting above the new ring of runes, and then cap each pillar with $(item)Glowstone Blocks$().$(br)To check that it is successfully upgraded, use a $(l:bloodmagic:alchemy_array/sigil/divination)Divination Sigil$(/l) to check the tier. Note that any non-air block can be used for the pillars below the Glowstone." + }, + { + "type": "multiblock", + "name": "Tier 3 Blood Altar", + "multiblock": { + "pattern":[ + ["G_____G", "_______", "_______", "___0___", "_______", "_______", "G_____G"], + ["P_____P", "_______", "_______", "___A___", "_______", "_______", "P_____P"], + ["P_____P", "_______", "__RRR__", "__R_R__", "__RRR__", "_______", "P_____P"], + ["_RRRRR_", "R_____R", "R_____R", "R_____R", "R_____R", "R_____R", "_RRRRR_"] + ], + "mapping":{ + "A": "bloodmagic:altar", + "R": "#bloodmagic:altar_components/bloodrune", + "G": "#bloodmagic:altar_components/glowstone", + "P": "minecraft:stone_bricks" + }, + "symmetrical": true + }, + "text": "The Tier 3 Blood Altar, which has 28 total runes." + }, + { + "type": "text", + "text": "To upgrade the Blood Altar to Tier 4, place 7 $(item) Blood Runes$() one block down and two blocks away from the previous set of runes along each edge. Then place four solid blocks in each corner, starting above the new ring of runes, and then cap each pillar with $(l:bloodmagic:utility/bloodstone_bricks)Bloodstone Bricks$(/l) and/or $(l:bloodmagic:utility/bloodstone_bricks)Large Bloodstone Bricks$(/l)." + }, + { + "type": "multiblock", + "name": "Tier 4 Blood Altar", + "multiblock": { + "pattern":[ + ["B_________B", "___________", "___________", "___________", "___________", "___________", "___________", "___________", "___________", "___________", "B_________B"], + ["P_________P", "___________", "__G_____G__", "___________", "___________", "_____0_____", "___________", "___________", "__G_____G__", "___________", "P_________P"], + ["P_________P", "___________", "__P_____P__", "___________", "___________", "_____A_____", "___________", "___________", "__P_____P__", "___________", "P_________P"], + ["P_________P", "___________", "__P_____P__", "___________", "____RRR____", "____R_R____", "____RRR____", "___________", "__P_____P__", "___________", "P_________P"], + ["P_________P", "___________", "___RRRRR___", "__R_____R__", "__R_____R__", "__R_____R__", "__R_____R__", "__R_____R__", "___RRRRR___", "___________", "P_________P"], + ["__RRRRRRR__", "___________", "R_________R", "R_________R", "R_________R", "R_________R", "R_________R", "R_________R", "R_________R", "___________", "__RRRRRRR__"] + ], + "mapping":{ + "A": "bloodmagic:altar", + "R": "#bloodmagic:altar_components/bloodrune", + "B": "#bloodmagic:altar_components/bloodstone", + "G": "#bloodmagic:altar_components/glowstone", + "P": "minecraft:stone_bricks" + }, + "symmetrical": true + }, + "text": "The Tier 4 Blood Altar, which has 56 total runes." + }, + { + "type": "text", + "text": "[WIP Notes]$(br)[Tier-5 has No Content yet!]" + }, + { + "type": "multiblock", + "name": "Tier 5 Blood Altar", + "multiblock": { + "pattern":[ + ["_________________", "_________________", "_________________", "___B_________B___", "_________________", "_________________", "_________________", "_________________", "_________________", "_________________", "_________________", "_________________", "_________________", "___B_________B___", "_________________", "_________________", "_________________"], + ["_________________", "_________________", "_________________", "___P_________P___", "_________________", "_____G_____G_____", "_________________", "_________________", "________0________", "_________________", "_________________", "_____G_____G_____", "_________________", "___P_________P___", "_________________", "_________________", "_________________"], + ["_________________", "_________________", "_________________", "___P_________P___", "_________________", "_____P_____P_____", "_________________", "_________________", "________A________", "_________________", "_________________", "_____P_____P_____", "_________________", "___P_________P___", "_________________", "_________________", "_________________"], + ["_________________", "_________________", "_________________", "___P_________P___", "_________________", "_____P_____P_____", "_________________", "_______RRR_______", "_______R_R_______", "_______RRR_______", "_________________", "_____P_____P_____", "_________________", "___P_________P___", "_________________", "_________________", "_________________"], + ["_________________", "_________________", "_________________", "___P_________P___", "_________________", "______RRRRR______", "_____R_____R_____", "_____R_____R_____", "_____R_____R_____", "_____R_____R_____", "_____R_____R_____", "______RRRRR______", "_________________", "___P_________P___", "_________________", "_________________", "_________________"], + ["N_______________N", "_________________", "_________________", "_____RRRRRRR_____", "_________________", "___R_________R___", "___R_________R___", "___R_________R___", "___R_________R___", "___R_________R___", "___R_________R___", "___R_________R___", "_________________", "_____RRRRRRR_____", "_________________", "_________________", "N_______________N"], + ["__RRRRRRRRRRRRR__", "_________________", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "R_______________R", "_________________", "__RRRRRRRRRRRRR__"] + ], + "mapping":{ + "A": "bloodmagic:altar", + "R": "#bloodmagic:altar_components/bloodrune", + "B": "#bloodmagic:altar_components/bloodstone", + "G": "#bloodmagic:altar_components/glowstone", + "N": "#bloodmagic:altar_components/beacon", + "P": "minecraft:stone_bricks" + }, + "symmetrical": true + }, + "text": "The Tier 5 Blood Altar, which has 108 total runes." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/acceleration_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/acceleration_rune.json new file mode 100644 index 00000000..14048e61 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/acceleration_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Acceleration Rune", + "icon": "bloodmagic:accelerationrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Acceleration Rune$() increases the rate of a couple operations. While normally the operations of the $(l:bloodmagic:altar/blood_rune/charging_rune)Charging Rune$(/l) and $(l:bloodmagic:altar/blood_rune/dislocation_rune)Displacement Rune$(/l) occur every 20 ticks, one tick of the delay is removed per rune, down to a minimum of 1 operation per tick." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_acceleration" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/aug_capacity_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/aug_capacity_rune.json new file mode 100644 index 00000000..2ff083b0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/aug_capacity_rune.json @@ -0,0 +1,16 @@ +{ + "name": "Rune of Aug. Capacity", + "icon": "bloodmagic:bettercapacityrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Rune of Augmented Capacity$() increases the capacity of the $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l) by a multiplicative +7.5% per rune. The Augmented Capacity runes apply $(o)after$() the regular $(l:bloodmagic:altar/blood_rune/capacity_rune)Capacity runes$()." + }, + { + "type": "crafting", + "title": "Rune of Aug. Capacity", + "recipe": "bloodmagic:blood_rune_aug_capacity" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/capacity_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/capacity_rune.json new file mode 100644 index 00000000..93ca32cd --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/capacity_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Rune of Capacity", + "icon": "bloodmagic:altarcapacityrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Rune of Capacity$() increases the capacity of the $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l) by an additive +20% per rune." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_capacity" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/charging_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/charging_rune.json new file mode 100644 index 00000000..f9a77e09 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/charging_rune.json @@ -0,0 +1,19 @@ +{ + "name": "Charging Rune", + "icon": "bloodmagic:chargingrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Charging Rune$() is a unique Rune upgrade. When the $(l:bloodmagic:altar/blood_altar)Blood Altar$() is not crafting nor filling a $(l:bloodmagic:altar/soul_network)Blood Orb$(), it will syphon LP to charge an internal buffer. When next an item is placed inside of the Blood Altar, it will instantaneously consume the stored charge and apply it to the crafting of the item at a 1:1 ratio." + }, + { + "type": "text", + "text": " The Blood Altar does a charging tick once per 20 in-game ticks, which is reduced by 1 per $(l:bloodmagic:altar/blood_rune/acceleration_rune)Acceleration Rune.$(/l)$(br) The speed that the Blood Altar charges at per charging tick is: [10LP x $(l:bloodmagic:altar/blood_rune/charging_rune)Charging Runes$() x (1 + $(l:bloodmagic:altar/blood_rune/speed_rune)Speed Runes$()/10)] $(br)The maximum charge that a Blood Altar can hold is 1000LP per $(item)Charging Rune$(), which is then multiplied by: [(capacity of the main Blood Altar tank)/20000] if that value is above 1." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_charging" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/dislocation_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/dislocation_rune.json new file mode 100644 index 00000000..d6b5a64b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/dislocation_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Displacement Rune", + "icon": "bloodmagic:dislocationrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Displacement Rune$() increases the flowrate of LP into and out of the altar." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_displacement" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/orb_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/orb_rune.json new file mode 100644 index 00000000..c936f70b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/orb_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Rune of The Orb", + "icon": "bloodmagic:orbcapacityrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Rune of The Orb$() increases the capacity of the $(item)Blood Orb$() that is inside of the Altar by +2% additively per rune while it is inside of the Altar." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_orb" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/sacrifice_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/sacrifice_rune.json new file mode 100644 index 00000000..56fbbd23 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/sacrifice_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Rune of Sacrifice", + "icon": "bloodmagic:sacrificerune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Rune of Sacrifice$() increases the LP gained in the Blood Altar through means that take health from non-player entities. Each rune gives a bonus of +10% additively per rune." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_sacrifice" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/self_sacrifice_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/self_sacrifice_rune.json new file mode 100644 index 00000000..190204a9 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/self_sacrifice_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Rune of Self Sacrifice", + "icon": "bloodmagic:selfsacrificerune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Rune of Self Sacrifice$() increases the LP gained in the Blood Altar through means that use a player's health. Each rune gives a bonus of +10% additively per rune." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_self_sacrifice" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/speed_rune.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/speed_rune.json new file mode 100644 index 00000000..6bf4192b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/blood_rune/speed_rune.json @@ -0,0 +1,15 @@ +{ + "name": "Speed Rune", + "icon": "bloodmagic:speedrune", + "category": "bloodmagic:altar/blood_rune", + "pages": [ + { + "type": "text", + "text": "The $(item)Speed Rune$() increases all of the crafting operations of the Blood Altar. The crafting speed (and speed that the progress is lost when empty) increases by an additive +20% per rune." + }, + { + "type": "crafting", + "recipe": "bloodmagic:blood_rune_speed" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/redstone_automation.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/redstone_automation.json new file mode 100644 index 00000000..8e9c5be0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/redstone_automation.json @@ -0,0 +1,31 @@ +{ + "name": "Redstone and Automation", + "icon": "minecraft:redstone", + "category": "bloodmagic:altar", + "pages": [ + { + "type": "text", + "text": "The $(l:bloodmagic:altar/blood_altar)Blood Altar$() is a fantastic tool, but standing around and waiting for slates to craft is not your idea of a good time. Luckily, items and LP can be automatically piped in and out of the altar, albeit with a few caveats. $(br2)While a simple $(item)Hopper$() lets you pipe items in, the Altar won't stop it from inputting more than 1 at a time. It will happily craft 64 slates in one" + }, + { + "type": "text", + "text": "go, consuming 64 times as much LP as usual to do so - but if you can't supply said LP fast enough, you're going to run into trouble. $(br2)Additionally, the altar makes no distinction between input and output, so without some sort of filter, items will be pulled in and out as fast as your item transfer system can handle. Perhaps a look at the Routing Nodes will be helpful... (once they're implemented, that is.)" + }, + { + "type": "text", + "text": "The altar also supports the transfer of blood, both to and from an external tank. Simply hook up your fluid pipe of choice and you can store excess blood for later crafts. $(br2)Note that the transfer speed is very slow by default. If you want to speed it up, you'd best look into $(l:bloodmagic:altar/blood_rune/acceleration_rune)Acceleration Runes$() and $(l:bloodmagic:altar/blood_rune/dislocation_rune)Displacement Runes$()." + }, + { + "type": "text", + "text": "Don't forget that this blood isn't taken directly from the altar itself, but rather from a second, secret internal tank. This tank can hold up to 10% of the blood that the altar itself can, so if the numbers don't appear to be adding up exactly right, or if blood appears to be vanishing from your altar, this is probably where it's going. The same limitations apply to blood being piped in." + }, + { + "type": "text", + "text": "(Also not implemented:) $(strike)The blood altar's LP value can be read via a comparator on the side, similar to a vanilla chest. $(br2)If you place a $(item)Bloodstone Brick$()$(strike) underneath the altar, the comparator will instead read the value of the $(l:bloodmagic:altar/soul_network)Soul Network$(/l) of the owner of any orb that is placed into the Altar. $(br2)The signal strength depends on the size of the orb in the altar, not the maximum LP of the network, so if you have" + }, + { + "type": "text", + "text": "$(strike)500,000 LP, a Weak Blood Orb would show as completely full, but a Master Blood Orb would show as only half full. This can be used to, for example, deactivate certain rituals when you are running low on LP, to ensure you don't run out. $(br2)Lastly, placing a $(item)Redstone Lamp$()$(strike) underneath the altar will make it output a redstone signal upon finishing a crafting operation. With a bit of cunning, this should allow you to fully automate the production of slates." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/slates.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/slates.json new file mode 100644 index 00000000..65b6b3d1 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/slates.json @@ -0,0 +1,33 @@ +{ + "name": "Tiers of Slates", + "icon": "bloodmagic:blankslate", + "category": "bloodmagic:altar", + "extra_recipe_mappings":[ + ["bloodmagic:blankslate", 1], + ["bloodmagic:reinforcedslate", 1], + ["bloodmagic:infusedslate", 2], + ["bloodmagic:demonslate", 2] + ], + "pages": [ + { + "type": "text", + "text": "The $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l)'s main use is the production of $(item)Slates$(). Each tier of slate requires the previous tier and a more powerful altar than the last. $(br2)Note that $(item)Etherial Slates$() aren't currently implemented by default, but may be if you're playing in a modpack. Check JEI for details." + }, + { + "type": "2x_crafting_altar", + "a.heading": "Blank Slate", + "a.recipe": "bloodmagic:altar/slate", + "b.heading": "Reinforced Slate", + "b.recipe": "bloodmagic:altar/reinforcedslate" + }, + { + "type": "2x_crafting_altar", + "a.heading": "Imbued Slate", + "a.recipe": "bloodmagic:altar/imbuedslate", + "b.heading": "Demonic Slate", + "b.recipe": "bloodmagic:altar/demonicslate" + } + ] +} + + diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/soul_network.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/soul_network.json new file mode 100644 index 00000000..ae6945fe --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/altar/soul_network.json @@ -0,0 +1,39 @@ +{ + "name": "Soul Network", + "icon": "bloodmagic:weakbloodorb", + "category": "bloodmagic:altar", + "extra_recipe_mappings":[ + ["bloodmagic:weakbloodorb", 3], + ["bloodmagic:apprenticebloodorb", 3], + ["bloodmagic:magicianbloodorb", 4], + ["bloodmagic:masterbloodorb", 4] + ], + "pages": [ + { + "type": "text", + "text": "The Soul Network is the network that connects the user's soul to all of their bound items and blocks. Functionally, it is a global storage of LP unique to each player that can be added to and extracted from, using the player's bound items as an itermediary. When a player first uses an item that can be bound to a Soul Network, it will bind to the player and will be labeled as being" + }, + { + "type": "text", + "text": "\"owned\" by that player - any action that the item does that has an LP cost will drain from the owner's Soul Network. In some cases, if the item cannot get its LP from the Soul Network, it will instead directly take the LP from the user's health.$(br2) In order to fill the user's Soul Network the user will need to construct a $(item)Blood Orb$(). Blood orbs suck up LP from either the user when they are right-clicked at a 1 heart:200LP ratio, or by a bound orb" + }, + { + "type": "text", + "text": "being placed inside of a $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l) with LP.$(br2) There is a separate Blood Orb that can be created for each Tier of the Blood Altar:$(li)$(item)Weak Blood Orb$(), Max capacity: 5k LP.$(li)$(item)Apprentice Blood Orb$(), Max capacity: 25k LP. $(li)$(item)Magician Blood Orb$(), Max capacity: 150k LP.$(li)$(item)Master Blood Orb$(), Max capacity: 1M LP." + }, + { + "type": "2x_crafting_altar", + "a.heading": "Weak Blood Orb", + "a.recipe": "bloodmagic:altar/weakbloodorb", + "b.heading": "Apprentice Blood Orb", + "b.recipe": "bloodmagic:altar/apprenticebloodorb" + }, + { + "type": "2x_crafting_altar", + "a.heading": "Magician Blood Orb", + "a.recipe": "bloodmagic:altar/magicianbloodorb", + "b.heading": "Master Blood Orb", + "b.recipe": "bloodmagic:altar/masterbloodorb" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/aspected_will.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/aspected_will.json new file mode 100644 index 00000000..d61578b6 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/aspected_will.json @@ -0,0 +1,54 @@ +{ + "name": "Demon Will Aspects", + "icon": "bloodmagic:vengefulcrystal", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[ + ["bloodmagic:steadfastdemoncrystal", 2], + ["bloodmagic:corrosivedemoncrystal", 2], + ["bloodmagic:destructivedemoncrystal", 2], + ["bloodmagic:vengefuldemoncrystal", 2], + ["bloodmagic:steadfastcrystal", 2], + ["bloodmagic:corrosivecrystal", 2], + ["bloodmagic:destructivecrystal", 2], + ["bloodmagic:vengefulcrystal", 2], + ["bloodmagic:basemonstersoul_vengeful", 2], + ["bloodmagic:basemonstersoul_corrosive", 2], + ["bloodmagic:basemonstersoul_steadfast", 2], + ["bloodmagic:basemonstersoul_destructive", 2] + ], + "pages": [ + { + "type": "text", + "text": "Unleashing $(l:bloodmagic:demon_will/demon_will)Demon Will$() into the atmosphere was definitely an excellent idea. Not only has it proven most useful in empowering $(item)Rituals$(), you have also successfully condensed it into a $(l:bloodmagic:demon_will/crystallized_will)Crystal Cluster$(), and are wondering what to turn your eye to next. $(br2)These $(item)Crystals$() feel somehow... conflicted, to you. A certain $(l:bloodmagic:rituals/ritual_list/ritual_crystal_split)Ritual$() may help coax them out into purer forms..." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/demon_will/will_splitting.png" + ], + "title": "Aspects of Will", + "border": true, + "text": "The $(l:bloodmagic:rituals/ritual_list/ritual_crystal_split)Resonance of the Faceted Crystal$() ritual in action." + }, + { + "type": "text", + "text": "Now we have $(item)Crystallized Will$() in four spicy new flavours! on the $(water)Water Rune$() we have $(steadfast)Steadfast Will$(), on the $(air)Air Rune$() we get $(destructive)Destructive Will$(), on the $(fire)Fire Rune$() comes $(vengeful)Vengeful Will$() and on the $(earth)Earth Rune$() we find $(corrosive)Corrosive Will.$() $(br2)These various new types of Will can be burned in the $(item)Demon Crucible$() just like Raw Will, and from there can be fed into various Rituals to great and fascinating effect." + }, + { + "type": "text", + "text": "However, they also change how your Sentient Tools behave, making them more powerful.$(br) $(li)$(raw)Raw Will$(): Increases damage and attack speed. $(corrosive)$(li)Corrosive Will$(): Attacks have a chance to apply poison or wither to your foes, otherwise same as $(raw)Raw$(). $(vengeful)$(li)Vengeful Will$(): increases damage, but not as much as $(raw)Raw$(). Increases attack speed more than any other type. Gives a movement speed buff that increases with higher amounts of Will." + }, + { + "type": "text", + "text": "$(steadfast)$(li)Steadfast Will$(): Increases damage (but not as much as $(raw)Raw$()) and grants Absorption after a kill. $(destructive)$(li)Destructive Will$(): Increases damage more than any other will type, but increases attack speed more slowly than any other type. Top Tier is still faster than an unempowered tool / equivalent iron tool, but slower than any other will type." + }, + { + "type": "text", + "text": "You may be wondering: \"How on earth do I get this will into a usable form?\" Well, the answer is simple. Just place an EMPTY $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() into a $(l:bloodmagic:demon_will/soul_forge)Hellfire Forge$() in the same chunk as a $(item)Demon Crucible$(), then feed the Demon Crucible with Will Crystals of the desired aspect. Your $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() will fill with that aspect of will. You can change which kind of will your $(raw)Sentient Tools$() use by right-clicking while holding them." + }, + { + "type": "text", + "text": "Note that your $(raw)Sentient Tools$() will take on the aspect of the largest amount of $(raw)Will$() in your inventory. If you're carrying 10 $(corrosive)Corrosive Will$() in one $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), and 1,000 $(raw)Raw Will$() in another, then your sword will remain $(raw)Raw$()." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/crystallized_will.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/crystallized_will.json new file mode 100644 index 00000000..6bc4ef7e --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/crystallized_will.json @@ -0,0 +1,57 @@ +{ + "name": "Crystallized Will", + "icon": "bloodmagic:defaultcrystal", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[ + ["bloodmagic:demoncrucible", 1], + ["bloodmagic:demoncrystallizer", 4], + ["bloodmagic:rawdemoncrystal", 4], + ["bloodmagic:defaultcrystal", 4] + ], + "pages": [ + { + "type": "text", + "text": "Now that you have plenty of $(l:bloodmagic:demon_will/demon_will)Demon Will$() in your $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), it's time to explore what happens when you unleash it upon the world. $(br)First off, you'll need to create a $(item)Demon Crucible$(), and then fill it with $(l:bloodmagic:demon_will/demon_will)Demon Will$()." + }, + { + "type": "crafting_soulforge", + "heading": "Demon Crucible", + "recipe": "bloodmagic:soulforge/demon_crucible", + "text": "This will burn $(l:bloodmagic:demon_will/demon_will)Demon Will$() and release it into the atmosphere. Put a charged $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() or any aspect of $(item)Demon Crystal$() into it and let it run." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/demon_will/demon_crucible.png" + ], + "title": "Demon Crucible", + "border": true, + "text": "The $(item)Demon Crucible$(), with a $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() inside it." + }, + { + "type": "text", + "text": "Now we have $(raw)Raw Will$() in the atmosphere. Great, now what? $(br2)Some $(l:bloodmagic:rituals/ritual_tinkerer)Rituals$() benefit from $(raw)Raw Will$(), but the main benefit from this is the ability to create $(item)Demon Will Crystals$() and from there, split them into their $(l:bloodmagic:demon_will/aspected_will)Aspects$(). $(br2)Once you have some of these Aspected Will Crystals, you can burn them in the crucible to unleash them into the atmosphere for your rituals to benefit from." + }, + { + "type": "crafting_soulforge", + "heading": "Demon Crystallizer", + "recipe": "bloodmagic:soulforge/demon_crystallizer", + "text": "This will slowly consume $(l:bloodmagic:demon_will/demon_will)Demon Will$() from the atmosphere to produce $(item)Will Crystals$(). The first spire costs about 100 will to form, and all subsequent spires cost 40 each, but can be burned for 50 in the $(item)Demon Crucible$(). The largest $(item)Crystal Cluster$() can be up to 7 spires." + }, + { + "type": "text", + "text": "If you have at least 1,000 total Will in your inventory (Across any number of $(l:bloodmagic:demon_will/soul_gem)Tartaric Gems$()), you can harvest these crystals by right-clicking the spire with an empty hand. This will remove all but the central spire. $(br2)However, if you have not got this much will, $(italic)really$() need that central spire, or are just in a hurry, you can harvest the whole lot with a pickaxe." + }, + { + "type": "relations", + "title": "Related Links", + "entries": [ + "rituals/ritual_tinkerer", + "rituals/rituals_list/ritual_crystal_split", + "rituals/rituals_list/ritual_crystal_harvest", + "demon_will/aspected_will" + ], + "text": "There's more I can do, I can feel it..." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/demon_will.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/demon_will.json new file mode 100644 index 00000000..053561f4 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/demon_will.json @@ -0,0 +1,26 @@ +{ + "name": "Demon Will", + "icon": "bloodmagic:basemonstersoul", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[["bloodmagic:basemonstersoul", 0]], + "pages": [ + { + "type": "text", + "text": "Once you have a $(l:bloodmagic:altar/blood_altar)Blood Altar$(), you'll need to gather a few $(item)Demon Wills$(). There are two ways to get Demon Will:$(br)$(li)Killing a mob that has been hit with a $(l:bloodmagic:demon_will/soul_snare)Soul Snare$(/l) and is killed when white particle effects appear.$(li)By killing a hostile mob with a $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$().$(br)Since you are just beginning to use the mod, you will not yet have a $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$()," + }, + { + "type": "text", + "text": "and thus will need to use a $(l:bloodmagic:demon_will/soul_snare)Soul Snare$(). $(br2)$(item)Demon Will$() is a recurring resource in $(6)Blood Magic$(), and is used to power the $(l:bloodmagic:demon_will/soul_forge)Hellfire Forge$(). $(br2)In the lore of $(6)Blood Magic$(), $(raw)Demon Will$() is the residual effect of when a demon imbues its will into the bodies of the dead." + }, + { + "type": "image", + "images": ["bloodmagic:images/entries/demon_will/demon_will.png"], + "title": "Demon Will", + "border": true + }, + { + "type": "text", + "text": "Once you have some $(raw)Will$(), you can use it to craft useful tools in the $(l:bloodmagic:demon_will/soul_forge)Hellfire Forge,$(). If you find them cluttering up your inventory, perhaps a $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() may help." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/explosive_charges.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/explosive_charges.json new file mode 100644 index 00000000..f99d722b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/explosive_charges.json @@ -0,0 +1,85 @@ +{ + "name": "Explosive Charges", + "icon": "bloodmagic:shaped_charge", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[ + ["bloodmagic:shaped_charge", 2], + ["bloodmagic:deforester_charge", 4], + ["bloodmagic:vein_charge", 6], + ["bloodmagic:fungal_charge", 8] + ], + "pages":[ + { + "type": "text", + "text": "Mining and foresting is all well and good for those who refuse to dream big, but what self-respecting sanguimancer would ever stoop to that? $(br2)With this in mind, you have devised some devious little devices. Simply throw them at some pesky trees, rocks, or whatever else you wish to cease to be and wait for them to self-ignite." + }, + { + "type": "text", + "text": "Not only that, you can improve their functionality by $(item)Anointing$() them with certain ingredients and a little $(raw)Will$(), as described after each entry. $(br2)The currently avaliable anointments are as follows: $(li)Fortunate - broken blocks are affected by $(item)Fortune I$(). $(li)Heated Tool - Broken blocks are $(item)Smelted$(). $(li)Soft Touch - Broken blocks are affected by $(item)Silk Touch$()." + }, + { + "type": "crafting_soulforge", + "heading": "Shaped Charge", + "recipe": "bloodmagic:soulforge/shaped_charge", + "anchor":"shaped_charge", + "text": "The $(item)Shaped Charge$() will destroy a 5x5x5 cube facing whichever side of a block it lands on, dropping all blocks as though mined with a pickaxe. It even works on Obsidian, and provides a most satisfying $(o)KABOOM$() whilst doing so." + }, + { + "type": "3x_crafting_soulforge", + "a.heading": "Fortunate", + "a.recipe": "bloodmagic:soulforge/shaped_charge_fortune_1", + "b.heading": "Heated Tool", + "b.recipe": "bloodmagic:soulforge/shaped_charge_smelting", + "c.heading": "Soft Touch", + "c.recipe": "bloodmagic:soulforge/shaped_charge_silk_touch" + }, + { + "type": "crafting_soulforge", + "heading": "Deforester Charge", + "recipe": "bloodmagic:soulforge/deforester_charge", + "anchor":"deforester_charge", + "text": "The $(item)Deforester Charge$() is for felling trees. It can be used on logs or leaves, and will fell all but the mightiest of trees, breaking up to $(item)two stacks$() of logs at a time (and neatly stripping away any leaves it encounters in the process!) Even the giant trees of the Jungle will fall in a matter of seconds." + }, + { + "type": "3x_crafting_soulforge", + "a.heading": "Fortunate", + "a.recipe": "bloodmagic:soulforge/deforester_charge_fortune_1", + "b.heading": "Heated Tool", + "b.recipe": "bloodmagic:soulforge/deforester_charge_smelting", + "c.heading": "Soft Touch", + "c.recipe": "bloodmagic:soulforge/deforester_charge_silk_touch" + }, + { + "type": "crafting_soulforge", + "heading": "Controlled Charge", + "recipe": "bloodmagic:soulforge/vein_charge", + "anchor":"controlled_charge", + "text": "The $(item)Controlled Charge$(), only destroys blocks $(underline)identical to the block it lands on$(). It will destroy up to $(item)Three stacks$() of blocks, seeking out from the original point. As with other charges, all mined blocks will be dropped." + }, + { + "type": "3x_crafting_soulforge", + "a.heading": "Fortunate", + "a.recipe": "bloodmagic:soulforge/vein_charge_fortune_1", + "b.heading": "Heated Tool", + "b.recipe": "bloodmagic:soulforge/vein_charge_smelting", + "c.heading": "Soft Touch", + "c.recipe": "bloodmagic:soulforge/vein_charge_silk_touch" + }, + { + "type": "crafting_soulforge", + "heading": "Fungal Charge", + "recipe": "bloodmagic:soulforge/fungal_charge", + "anchor":"fungal_charge", + "text": "The $(item)Fungal Charge$() is for felling giant mushrooms, both in the Overworld and the Nether. Although doubtful that you will ever reach this in a single charge, it can break up to $(item)three stacks of blocks$()." + }, + { + "type": "3x_crafting_soulforge", + "a.heading": "Fortunate", + "a.recipe": "bloodmagic:soulforge/fungal_charge_fortune_1", + "b.heading": "Heated Tool", + "b.recipe": "bloodmagic:soulforge/fungal_charge_smelting", + "c.heading": "Soft Touch", + "c.recipe": "bloodmagic:soulforge/fungal_charge_silk_touch" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/sentient_sword.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/sentient_sword.json new file mode 100644 index 00000000..00058e13 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/sentient_sword.json @@ -0,0 +1,18 @@ +{ + "name": "Sentient Sword", + "icon": "bloodmagic:soulsword", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[["bloodmagic:soulsword", 1]], + "pages": [ + { + "type": "text", + "text": "The $(item)Sentient Sword$() is a much more effective tool for collecting $(l:bloodmagic:demon_will/demon_will)Demon Will$() than $(l:bloodmagic:demon_will/soul_snare)Soul Snares$() could ever hope to be. It may seem weak at first, but it is powered by the Wills you carry, so crafting a $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() is a must. $(br2) Note that the sword, as with all $(l:bloodmagic:demon_will/sentient_tools)Sentient Tools$(), can be repaired with $(l:bloodmagic:demon_will/crystallized_will)Crystallized Will$() in an Anvil." + }, + { + "type": "crafting_soulforge", + "heading": "Sentient Sword", + "recipe": "bloodmagic:soulforge/sentientsword", + "text": "This sword will serve you well." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/sentient_tools.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/sentient_tools.json new file mode 100644 index 00000000..f8e80fd2 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/sentient_tools.json @@ -0,0 +1,53 @@ +{ + "name": "Sentient Tools", + "icon": "bloodmagic:soulpickaxe", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[ + ["bloodmagic:soulpickaxe", 1], + ["bloodmagic:soulscythe", 3], + ["bloodmagic:soulaxe", 5], + ["bloodmagic:soulshovel", 7] + ], + "pages": [ + { + "type": "text", + "text": "The $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$() has proven to be a resounding success. You find yourself wondering how other tools may react to a similar treatment... $(br2) Note that these tools, as with the $(l:bloodmagic:demon_will/sentient_sword)Sentient sword$(), can be repaired with $(l:bloodmagic:demon_will/crystallized_will)Crystallized Will$() in an Anvil." + }, + { + "type": "crafting_soulforge", + "heading": "Sentient Pickaxe", + "recipe": "bloodmagic:soulforge/sentientpickaxe", + "text": "This pickaxe improves with Will, cutting through stone with ease. With no Will to power it, it is only slightly better than the $(item)Iron Pickaxe$() it was crafted from; However, with a full enough $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), you forsee it surpassing even a $(item)Netherite Pickaxe$()." + }, + { + "type": "text", + "text": "The $(item)Sentient Scythe$() is a slightly different tool to its iron counterpart. Infusing it with will has transmuted it into a fearsone weapon. While slow and not as powerful as the other weapons, its great swings will damage all enemies in its range, making it an excellent choice for crowd control." + }, + { + "type": "crafting_soulforge", + "heading": "Sentient Scythe", + "recipe": "bloodmagic:soulforge/sentientscythe", + "text": "As with the pickaxe, with no Will to power your scythe, it is comparatively blunt and unwieldy; However, with a full enough $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), you forsee it becoming a devestating tool. $(br)Did we mention that it still functions as a hoe?" + }, + { + "type": "text", + "text": "Much like the $(item)Sentient Pickaxe$(), the $(item)Sentient Axe$() is a noticable improvement over its Iron counterpart. Additionally, it gets a noticable buff in its damage output, making it a fearsome weapon for those who don't mind its unwieldy nature." + }, + { + "type": "crafting_soulforge", + "heading": "Sentient Axe", + "recipe": "bloodmagic:soulforge/sentientaxe", + "text": "As with the pickaxe, with no Will to power your axe, it is only slightly better than the $(item)Iron Axe$() it was crafted from; However, with a full enough $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), you forsee it surpassing even a $(item)Netherite Axe$()." + }, + { + "type": "text", + "text": "Much like the $(item)Sentient Pickaxe$(), the $(item)Sentient Shovel$() is a noticable improvement over its Iron counterpart, even without additional $(l:bloodmagic:demon_will/demon_will)Demon Will$() to power it." + }, + { + "type": "crafting_soulforge", + "heading": "Sentient Shovel", + "recipe": "bloodmagic:soulforge/sentientshovel", + "text": "As with the pickaxe, with no Will to power your shovel, it is only slightly better than the $(item)Iron shovel$() it was crafted from; However, with a full enough $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), you forsee it surpassing even a $(item)Netherite Shovel$()." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_forge.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_forge.json new file mode 100644 index 00000000..0f14fd5a --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_forge.json @@ -0,0 +1,15 @@ +{ + "name": "Hellfire Forge", + "icon": "bloodmagic:soulforge", + "category": "bloodmagic:demon_will", + "pages": [ + { + "type": "text", + "text": "The $(item)Hellfire Forge$() is one of the core crafting mechanics of $(6)Blood Magic$(), alongside the $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l) itself. Here, you can work with the $(l:bloodmagic:demon_will/demon_will)Demon Will$() you have harvested from mobs, to allow you to create $(l:bloodmagic:demon_will/sentient_tools)Sentient Tools$(), including the $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$(), $(l:bloodmagic:demon_will/soul_gem)Tartaric Gems$(), various $(item)reagents$(), $(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Arcane Ash$(), and many things besides." + }, + { + "type": "crafting", + "recipe": "bloodmagic:soul_forge" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_gem.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_gem.json new file mode 100644 index 00000000..b39397ab --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_gem.json @@ -0,0 +1,53 @@ +{ + "name": "Tartaric Gems", + "icon": "bloodmagic:soulgemgreater", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[ + ["bloodmagic:soulgempetty", 1], + ["bloodmagic:soulgemlesser", 3], + ["bloodmagic:soulgemcommon", 5], + ["bloodmagic:soulgemgreater", 7] + ], + "pages": [ + { + "type": "text", + "text": "$(l:bloodmagic:demon_will/demon_will)Demon Will$() is a very useful resource, but the fragments you have been getting so far are decidedly lacking in power. What you need is a storage item; A $(item)Tartaric Gem$() seems just the thing. What's more, it can absorb any leftover $(l:bloodmagic:demon_will/demon_will)Demon Will$() you might have lying around. Just drop them onto the floor and your shiny new gem will absorb them." + }, + { + "type": "crafting_soulforge", + "heading": "Petty Tartaric Gem", + "recipe": "bloodmagic:soulforge/pettytartaricgem", + "text": "Your first gem will hold a maximum of 64 $(l:bloodmagic:demon_will/demon_will)Will$(). Much more compact than before!" + }, + { + "type": "text", + "text": "Your $(item)Petty Tartaric Gem$() is a useful tool, but it's clearly lacking in power. By carefully working it with $(item)Diamond$(), $(item)Lapis$(), and $(item)Redstone$(), you have found a way to quadruple its storage capabilities." + }, + { + "type": "crafting_soulforge", + "heading": "Lesser Tartaric Gem", + "recipe": "bloodmagic:soulforge/lessertartaricgem", + "text": "This reinforced gem can hold up to 256 $(l:bloodmagic:demon_will/demon_will)Will$(). $(br2)Note: You only need one gem when upgrading - the $(item)Hellfire Forge$() will draw $(raw)Will$() from the gem it's crafting before trying to use will from the gem in its Gem Slot. Don't worry, the newly crafted gem will hold any leftover $(raw)Will$() from the process." + }, + { + "type": "text", + "text": "Your $(item)Lesser Tartaric Gem$() is a noted improvement, but once more you chafe under its limitations. To progress further will involve focusing on your $(l:bloodmagic:altar/blood_altar)Blood Altar$(), as you require the powers of an $(l:bloodmagic:altar/slates)Imbued Slate$(). Combining this slate with your gem and further refining it with another $(item)Diamond$() and a $(item)Block of Gold$(), you have found a way to once again quadruple its storage capabilities." + }, + { + "type": "crafting_soulforge", + "heading": "Common Tartaric Gem", + "recipe": "bloodmagic:soulforge/commontartaricgem", + "text": "This intricate gem can hold an impressive 1,024 $(l:bloodmagic:demon_will/demon_will)Will$()." + }, + { + "type": "text", + "text": "You have clearly outdone yourself with the creation of the $(item)Common Tartaric Gem$(), but you feel there is still more you can do. However, getting more out of your gem will involve the culmination of all your work so far. Not only do you need a $(l:bloodmagic:altar/slates)Demonic Slate$(), you also require a $(l:bloodmagic:utility/alchemical_reaction_chamber#blood_shard)Weak Blood Shard$() $(o)and$() a $(l:bloodmagic:demon_will/crystallized_will)Demon Will Crystal$(). Of course, it will come with rewards to match, powering your $(l:bloodmagic:demon_will/sentient_tools)Sentient Tools$() like nothing you have seen before..." + }, + { + "type": "crafting_soulforge", + "heading": "Greater Tartaric Gem", + "recipe": "bloodmagic:soulforge/greatertartaricgem", + "text": "This masterpiece of artifice can hold an astounding 4,096 $(l:bloodmagic:demon_will/demon_will)Will$()." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_snare.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_snare.json new file mode 100644 index 00000000..29babbd6 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/soul_snare.json @@ -0,0 +1,30 @@ +{ + "name": "Your First Will", + "icon": "bloodmagic:soulsnare", + "category": "bloodmagic:demon_will", + "priority": "true", + "pages": [ + { + "type": "crafting_altar", + "heading": "Soul Snare", + "recipe": "bloodmagic:altar/soul_snare", + "text": "$(item)Soul Snares$() are your gateway into the $(l:bloodmagic:demon_will/demon_will)Demon Will$() portion of $(6)Blood Magic$()." + }, + { + "type": "text", + "text": "Using the Snare is simple enough - craft a good quantity of them and throw them at hostile mobs. White particle effects will appear around them; then it's time to go in for the kill. On death, they will drop a $(l:bloodmagic:demon_will/demon_will)Demon Will$(). Before you ask, yes, the Looting enchantment will improve your odds. Once you've gathered a couple, you can get to work on crafting yourself a $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$() and a $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$() - these will make collecting $(l:bloodmagic:demon_will/demon_will)Demon Will$() much easier." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/demon_will/snare_particles.png" + ], + "title": "Snare on Skeleton", + "border": true, + "text": "A skeleton with white particles after hit by a snare." + } + ] +} + + + diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/throwing_daggers.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/throwing_daggers.json new file mode 100644 index 00000000..5f38fb40 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/demon_will/throwing_daggers.json @@ -0,0 +1,36 @@ +{ + "name": "Throwing Daggers", + "icon": "bloodmagic:throwing_dagger", + "category": "bloodmagic:demon_will", + "extra_recipe_mappings":[ + ["bloodmagic:throwing_dagger", 1], + ["bloodmagic:throwing_dagger_syringe", 2], + ["bloodmagic:slate_ampoule", 3] + ], + "pages":[ + { + "type": "text", + "text": "$(item)Bows$() and $(item)Crossbows$() are fine enough in their way, but sifting through $(item)Gravel$() for $(item)Flint$() and murdering chickens for their $(item)Feathers$() is, frankly, beneath you. These shiny (and extremely sharp) $(item)Throwing Daggers$() also have some quite devious effects, if you do say so yourself." + }, + { + "type": "crafting_soulforge", + "heading": "Iron Throwing Dagger", + "recipe": "bloodmagic:soulforge/throwing_dagger", + "anchor":"iron_throwing_dagger", + "text": "The $(item)Iron Throwing Dagger$() is a fast-hitting attack, dealing 10 damage with a decent cooldown. Not only that, but if you have some $(l:bloodmagic:demon_will/demon_will)Demon Will$() on you (be it in its raw form, or stored within a $(l:bloodmagic:demon_will/soul_gem)Tartaric Gem$(), it will drop $(raw)Will$() as a $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$() would." + }, + { + "type": "crafting_soulforge", + "heading": "Syringe Throwing Dagger", + "recipe": "bloodmagic:soulforge/throwing_dagger_syringe", + "anchor":"syringe_throwing_dagger", + "text": "The $(item)Syringe Throwing Dagger$() is for the Sanguimancer more interested of the acquisition of $(blood)Blood$() than $(raw)Will$(). While it deals slightly less damage, it is noticeably cheaper, and enemies killed by this weapon have a chance of dropping a $(item)Slate Ampoule$() - or more, if they're hearty enough." + }, + { + "type": "spotlight", + "item": "bloodmagic:slate_ampoule", + "title": "Slate Ampoule", + "text": "These delightful little vials can be crushed when near a $(l:bloodmagic:altar/blood_altar)Blood Altar$() in order to transfer $(blood)500 LP$() into it, destroying the $(item)Ampoule$() in the process. These gains are unaffected by any $(item)Runes$() you may have." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/activation_crystals.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/activation_crystals.json new file mode 100644 index 00000000..e5cb0378 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/activation_crystals.json @@ -0,0 +1,30 @@ +{ + "name": "Activation Crystals", + "icon": "bloodmagic:activationcrystalweak", + "category": "bloodmagic:rituals", + "extra_recipe_mappings":[ + ["bloodmagic:activationcrystalweak", 1], + ["bloodmagic:activationcrystalawakened", 3] + ], + "pages": [ + { + "type": "text", + "text": "Your rituals require more than simply the correct arrangement of blocks and Sigils. An effort of will is required to open a channel from your Soul Network to the ritual, and The $(item)Activation Crystal$() will allow you to focus yourself enough to activate your rituals." + }, + { + "type": "crafting_altar", + "heading": "Weak Activation Crystal", + "recipe": "bloodmagic:weak_activation_crystal", + "text": "This crystal should do for now." + }, + { + "type": "text", + "text": "Eventually, you will find rituals that are too demanding for your current crystal. For now, you do not know what to do, save that a stronger crystal will be needed..." + }, + { + "type": "text", + "title": "Awakened Activation Crystal", + "text": "Not Yet Implemented." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_basics.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_basics.json new file mode 100644 index 00000000..e1be7278 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_basics.json @@ -0,0 +1,32 @@ +{ + "name": "Rituals - Getting Started", + "icon": "bloodmagic:activationcrystalcreative", + "category": "bloodmagic:rituals", + "priority": "true", + "pages": [ + { + "type": "text", + "text": "Once you have gotten your $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l) to Tier 3, you can delve into the wonderful world of Rituals. $(br2)For working with rituals, you will require the following: $(li)An $(l:bloodmagic:rituals/activation_crystals)Activation Crystal$(). At tier 3 only the $(item)Weak Crystal$() is avaliable. $(li)A $(item)Master Ritual Stone$(). Every ritual requires exactly one of these at its centre." + }, + { + "type": "text", + "text": "$(li)Enough Ritual Stones to built the Ritual. $(li)(Recommended) A $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$(). Although not required, it will make ritual construction significantly easier. $(br2)Building a ritual is relatively straightforward. Simply shift+click with the Ritual Diviner in hand until it displays the name of the desired ritual. Check the number of runes required by mousing over it in your" + }, + { + "type": "text", + "text": "inventory and holding shift. $(br2)Place down a Master Ritual Stone, and hold right-click until all the stones have been placed and painted with the correct element. Finally, right click the Master Ritual Stone with your Activation Crystal. If you've done everything right, you should get a message saying 'A rush of energy flows through the ritual!'. The ritual is now active." + }, + { + "type": "text", + "text": "If this does not occur, a few things may have gone wrong. If you instead get text saying 'You feel a push, but are too weak to complete this ritual', then you do not have enough LP in your Soul Network to activate the ritual. $(br2) If the message reads 'You feel that these runes are not configured correctly...', then something has gone wrong in the placement of the runes. Check the area for any blockages (such as grass, stone, etc) and try again." + }, + { + "type": "text", + "text": "Remember that some rituals extend several blocks above and below the Master Ritual Stone. If you get no error, ensure that the activation crystal is bound to your soul network - this can be accomplished by right-clicking it. $(br2) It is important to note that the crystal does not have to be bound to YOUR network - if you can get a hold of another player's crystal, you can activate rituals using their blood-pool. Guard yours well!" + }, + { + "type": "text", + "text": "one last note; all rituals respond to a $(item)Redstone$() signal, so sticking a lever on the side of the Master Ritual Stone is a good way to deactivate it. You can combine this knowledge with some of the information in $(l:bloodmagic:altar/redstone_automation)Redstone and Automation$() to ensure your rituals shut down automatically long before your Soul Network runs dry." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_diviner.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_diviner.json new file mode 100644 index 00000000..4cbe1545 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_diviner.json @@ -0,0 +1,51 @@ +{ + "name": "The Ritual Diviner", + "icon": "bloodmagic:ritualdiviner", + "category": "bloodmagic:rituals", + "extra_recipe_mappings":[ + ["bloodmagic:airscribetool", 4], + ["bloodmagic:firescribetool", 4], + ["bloodmagic:waterscribetool", 5], + ["bloodmagic:earthscribetool", 5], + ["bloodmagic:duskscribetool", 6] + ], + "pages": [ + { + "type": "text", + "text": "Crafting rituals is an intricate business; Even if you have the correct $(item)Inscription Tools$(), you can't just slap runic inscriptions down any old how and expect things to happen. Luckily, the $(item)Ritual Diviner$() is here to help." + }, + { + "type": "crafting", + "recipe": "bloodmagic:ritual_diviner_0" + }, + { + "type": "text", + "text": "The base Ritual Diviner requires one of each $(item)Elemental Inscription Tool$() for its construction, and thus a tier 3 $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l). The four base Elemental Inscription Tools can be crafted in your Altar for 1,000 LP each, as defined on the following pages. You can also use these tools to inscribe runes by hand, but this should only seriously be used for decorative purposes, as it is both slow and inaccurate." + }, + { + "type": "crafting", + "recipe": "bloodmagic:ritual_diviner_1", + "anchor": "dusk", + "text": "There is also an augmented version of the Ritual Diviner, for creating more powerful rituals." + }, + { + "type": "2x_crafting_altar", + "a.heading": "Inscription Tool: Air", + "a.recipe": "bloodmagic:altar/air_tool", + "b.heading": "Inscription Tool: Fire", + "b.recipe": "bloodmagic:altar/fire_tool" + }, + { + "type": "2x_crafting_altar", + "a.heading": "Inscription Tool: Water", + "a.recipe": "bloodmagic:altar/water_tool", + "b.heading": "Inscription Tool: Earth", + "b.recipe": "bloodmagic:altar/earth_tool" + }, + { + "type": "crafting_altar", + "heading": "Inscription Tool: Dusk", + "recipe": "bloodmagic:altar/dusk_tool" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_animal_growth.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_animal_growth.json new file mode 100644 index 00000000..a9ab94b4 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_animal_growth.json @@ -0,0 +1,71 @@ +{ + "name": "Ritual of the Shepherd", + "icon": "minecraft:white_wool", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of the Shepherd", + "multiblock":{ + "pattern":[ + ["_EDE_", + "A_W_A", + "DW0WD", + "A_W_A", + "_EDE_"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone", + "A": "#bloodmagic:ritual_stones/air_or_earth", + "E": "#bloodmagic:ritual_stones/earth_or_air", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Increases the maturity rate of baby animals within its range.$(br2)$(water)Water Runes: 4$(br)$(air)Air Runes: 4$(br)$(br)$(earth)Earth Runes: 4$(br)$()Dusk Runes: 4$(br2)$()Total Runes: 16" + }, + { + "type": "spotlight", + "item": "bloodmagic:defaultcrystal", + "title": "Raw", + "text": "Increases the speed of the ritual based on the total amount of $(raw)Raw Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:vengefulcrystal", + "title": "Vengeful", + "text": "Decreases the time it takes for adults to breed again." + }, + { + "type": "spotlight", + "item": "bloodmagic:destructivecrystal", + "title": "Destructive", + "text": "Causes adults that have not bred lately to run at mobs and explode." + }, + { + "type": "spotlight", + "item": "bloodmagic:steadfastcrystal", + "title": "Steadfast", + "text": "Automatically breeds adults within its area using items in the connected chest." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Growth) Animals within this range will grow much faster. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 7 $(li)Vertical Radius: 7" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Chest) Chest for breeding items (if properly augmented, requires $(steadfast)Steadfast Will$()).$(br) $(li)Maximum Volume: 1 $(li)Horizontal Radius: 3 $(li)Vertical Radius: 3" + } + ] +} + + diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_armour_evolve.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_armour_evolve.json new file mode 100644 index 00000000..ffc86706 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_armour_evolve.json @@ -0,0 +1,32 @@ +{ + "name": "Ritual of Living Evolution", + "icon": "bloodmagic:livingplate", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of Living Evolution", + "multiblock":{ + "pattern":[ + ["_________", "_________", "_________", "____E____", "___E_E___", "____E____", "_________", "_________", "_________"], + ["_________", "_E_____E_", "_________", "___D_D___", "_________", "___D_D___", "_________", "_E_____E_", "_________"], + ["_________", "_E_____E_", "_________", "_________", "_________", "_________", "_________", "_E_____E_", "_________"], + ["_________", "_E_____E_", "_________", "___D_D___", "_________", "___D_D___", "_________", "_E_____E_", "_________"], + ["____E____", "_E_____E_", "__FF_FF__", "__FD_DF__", "E___0___E", "__FD_DF__", "__FF_FF__", "_E_____E_", "____E____"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Increases the amount of maximum Upgrade Points on your Living Armor to 300.$(br2)$(fire)Fire Runes: 12$(br)$(earth)Earth Runes: 24$(br)$()Dusk Runes: 12$(br2)$()Total Runes: 48" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crushing.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crushing.json new file mode 100644 index 00000000..62b053e0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crushing.json @@ -0,0 +1,72 @@ +{ + "name": "Ritual of the Crusher", + "icon": "minecraft:iron_pickaxe", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of the Crusher", + "multiblock":{ + "pattern":[ + ["__A__", "_____", "A___A", "_____", "__A__"], + ["D_F_D", "__E__", "FE0EF", "__E__", "D_F_D"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "A": "bloodmagic:airritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Breaks blocks within its $(item)Crushing Range$() and places the items into the linked $(item)Chest$().$(br2)$(air)Air Runes: 4$(br)$(fire)Fire Runes: 4$(br)$(earth)Earth Runes: 4$(br)$()Dusk Runes: 4$(br2)$()Total Runes: 16" + }, + { + "type": "spotlight", + "item": "bloodmagic:defaultcrystal", + "title": "Raw", + "text": "Increases the speed of the ritual based on the total amount of $(raw)Raw Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:corrosivecrystal", + "title": "Corrosive", + "text": "All blocks are broken to be processed with a form of $(l:bloodmagic:alchemy_table/alchemy_table#cutting_fluid)Cutting Fluid$(). Overrides $(item)Silk Touch$() where applicable." + }, + { + "type": "spotlight", + "item": "bloodmagic:vengefulcrystal", + "title": "Vengeful", + "text": "Compresses the inventory on successful operation (e.g. coal into Coal Blocks, Redstone into Blocks of Redstone, etc). Currently only does one compression per operation." + }, + { + "type": "spotlight", + "item": "bloodmagic:destructivecrystal", + "title": "Destructive", + "text": "Blocks are broken down forcefully: all blocks broken are affected by $(item)Fortune III.$()" + }, + { + "type": "spotlight", + "item": "bloodmagic:steadfastcrystal", + "title": "Steadfast", + "text": "Causes all blocks that are broken to be picked up with $(item)Silk Touch$(). Overrides $(item)Fortune$() where applicable." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Chest) The location of the inventory that the ritual will place the broken blocks into. $(br) $(li)Maximum Volume: 1 $(li)Horizontal Radius: 3 $(li)Vertical Radius: 3" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Crushing) The blocks that the ritual will break. $(br) $(li)Maximum Volume: 50 $(li)Horizontal Radius: 10 $(li)Vertical Radius: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crystal_harvest.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crystal_harvest.json new file mode 100644 index 00000000..cba3241c --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crystal_harvest.json @@ -0,0 +1,37 @@ +{ + "name": "Crack of the Fractured Crystal", + "icon": "bloodmagic:defaultcrystal", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Crack of the Fractured Crystal", + "multiblock":{ + "pattern":[ + ["_______", "_______", "___D___", "__D_D__", "___D___", "_______", "_______"], + ["ED___DE", "D_____D", "__A_A__", "___0___", "__A_A__", "D_____D", "ED___DE"], + ["E_FFF_E", "___F___", "F__F__F", "FFF_FFF", "F__F__F", "___F___", "E_FFF_E"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "A": "bloodmagic:airritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Breaks $(raw)Demon Will$() Crystal Clusters of all aspects within its range, dropping the results on top of the crystals. $(br2)$(air)Air Runes: 4 $(br)$(fire)Fire Runes: 20 $(br)$(earth)Earth Runes: 8 $(br)$()Dusk Runes: 12 $(br2)$()Total Runes: 44" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Crystal) All $(raw)Demon Will$() crystal clusters have a single crystal broken off, spawning the crystal into the world. If there is only one crystal on the cluster, it will not break it. $(br) $(li)Maximum Volume: 250 $(li)Horizontal Radius: 5 $(li)Vertical Radius: 7" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crystal_split.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crystal_split.json new file mode 100644 index 00000000..85f767bc --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_crystal_split.json @@ -0,0 +1,43 @@ +{ + "name": "Resonance of the Faceted Crystal", + "icon": "bloodmagic:vengefulcrystal", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Resonance of the Faceted Crystal", + "multiblock":{ + "pattern":[ + ["__D__", "_BFB_", "DE0AD", "_BWB_", "__D__"], + ["_D_D_", "D___D", "_____", "D___D", "_D_D_"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "B": "bloodmagic:ritualstone", + "W": "#bloodmagic:ritual_stones/water_earth_fire_air", + "A": "#bloodmagic:ritual_stones/air_water_earth_fire", + "F": "#bloodmagic:ritual_stones/fire_air_water_earth", + "E": "#bloodmagic:ritual_stones/earth_fire_air_water", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": false + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Splits apart a well-grown $(raw)Raw Crystal Cluster$() into several aspected crystal clusters. For additional setup information, see the next page. For more information on Aspected Will, see $(l:bloodmagic:demon_will/aspected_will)Aspected Will$(). $(br2)$(blank)Blank Runes: 4 $(br)$(water)Water Runes: 1 $(br)$(air)Air Runes: 1 $(br)$(fire)Fire Runes: 1 $(br)$(earth)Earth Runes: 1 $(br)$()Dusk Runes: 12 $(br2)$()Total Runes: 20" + }, + { + "type": "image", + "title": "Ritual Setup", + "images": ["bloodmagic:images/entries/demon_will/will_splitting.png"], + "border": true, + "text": "Recommended setup for the Resonance of the Faceted Crystal ritual." + }, + { + "type": "text", + "text": "This ritual takes a well grown (5 spires) $(l:bloodmagic:demon_will/crystallized_will)Raw Crystal Cluster$(/l) located 2 blocks above the $(item)Master Ritual Stone$(), and splits it into new single spires of each $(l:bloodmagic:demon_will/aspected_will)Aspected Will$(/l) Crystal Clusters located directly above the 4 elemental Ritual Stones. This spacing is designed to accommodate a $(item)Demon Crystallizer$() on top of the $(item)Master Ritual Stone$().$(br2)For information on growing Demon Will Crystals, please see $(l:bloodmagic:demon_will/crystallized_will)Crystallized Will$(/l)." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_ellipse.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_ellipse.json new file mode 100644 index 00000000..553d3e51 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_ellipse.json @@ -0,0 +1,52 @@ +{ + "name": "Focus of the Ellipsoid", + "icon": "minecraft:bucket", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Focus of the Ellipsoid", + "multiblock":{ + "pattern":[ + ["_____AAA___", + "_____A_____", + "__WWW__EE__", + "F_W_____E__", + "F___D_D_E__", + "FF___0___FF", + "__E_D_D___F", + "__E_____W_F", + "__EE__WWW__", + "_____A_____", + "___AAA_____"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "#bloodmagic:ritual_stones/water_or_earth", + "A": "#bloodmagic:ritual_stones/air_or_fire", + "F": "#bloodmagic:ritual_stones/fire_or_air", + "E": "#bloodmagic:ritual_stones/earth_or_water", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": false + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Creates a hollow spheroid around the ritual using the blocks in the attached chest. Good for building complicated shapes, such as the mighty gold dome above your Evil Lair. ... You do have one of those, right? $(br2)$(water)Water Runes: 8$(br)$(air)Air Runes: 8$(br)$(fire)Fire Runes: 8$(br)$(earth)Earth Runes: 8$(br)$()Dusk Runes: 4$(br2)$()Total Runes: 36" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Chest) The location of the inventory that the ritual will grab blocks from to place in the world. $(br) $(li)Maximum Volume: 1 $(li)Horizontal Radius: 3 $(li)Vertical Radius: 3" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Placement) The range that the ritual will place its blocks in. Note that the Spheroid is centered on the ritual - if one side is shorter than the side opposite, the spheroid will be truncated. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 32 $(li)Vertical Radius: 32" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_feathered_knife.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_feathered_knife.json new file mode 100644 index 00000000..03865209 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_feathered_knife.json @@ -0,0 +1,77 @@ +{ + "name": "Ritual of the Feathered Knife", + "icon": "bloodmagic:sacrificialdagger", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of the Feathered Knife", + "multiblock":{ + "pattern":[ + ["_EE___EE_", "EA_____AE", "E_______E", "____D____", "___D0D___", "____D____", "E_______E", "EA_____AE", "_EE___EE_"], + ["__F___F__", "_________", "F___W___F", "___A_A___", "__W___W__", "___A_A___", "F___W___F", "_________", "__F___F__"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone", + "A": "bloodmagic:airritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Drains health from players in its area and puts the LP into a nearby blood altar. LP Gains are affected by $(l:bloodmagic:altar/blood_rune/self_sacrifice_rune)Runes of Self Sacrifice.$() $(br2)$(water)Water Runes: 4$() $(br)$(air)Air Runes: 8$() $(br)$(fire)Fire Runes: 8$() $(br)$(earth)Earth Runes: 16$() $(br)Dusk Runes: 4 $(br2)Total Runes: 40" + }, + { + "type": "spotlight", + "item": "bloodmagic:defaultcrystal", + "title": "Raw", + "text": "Increases the speed of the ritual based on the total amount of $(raw)Raw Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:corrosivecrystal", + "title": "Corrosive", + "text": "Uses the player's current Incense Bonus (if any) to increase the yield. Stand near an $(l:bloodmagic:utility/incense_altar)Incense Altar$() to maintain this bonus." + }, + { + "type": "spotlight", + "item": "bloodmagic:vengefulcrystal", + "title": "Vengeful", + "text": "Sets the minimum health for sacrificing to 10%. Overridden by $(steadfast)Steadfast$() for the Owner if active." + }, + { + "type": "spotlight", + "item": "bloodmagic:destructivecrystal", + "title": "Destructive", + "text": "Increases the yield of the ritual based on the total amount of $(destructive)Destructive Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:steadfastcrystal", + "title": "Steadfast", + "text": "Sets the minimum health for sacrificing from 30% to 70%." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Altar) This range defines the area that the ritual searches for the $(l:bloodmagic:altar/blood_altar)Blood Altar$(/l). Changing this will either expand or limit the range to a certain region. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 10 $(li)Vertical Radius: 15" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Damage) This defines where the ritual will damage a player. Players inside of this range will receive damage over time up to the specified limit. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 25 $(li)Vertical Radius: 15" + } + ] +} + + + + diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_green_grove.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_green_grove.json new file mode 100644 index 00000000..736054b7 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_green_grove.json @@ -0,0 +1,77 @@ +{ + "name": "Ritual of the Green Grove", + "icon": "minecraft:bone_meal", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of the Green Grove", + "multiblock":{ + "pattern":[ + ["EWE", + "W0W", + "EWE"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "E": "bloodmagic:earthritualstone", + "W": "bloodmagic:waterritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$(/l) for easier construction." + }, + { + "type": "text", + "text": "Grows crops within its area.$(br2)$(water)Water Runes: 4$() $(br)$(earth)Earth Runes: 4$() $(br2)Total Runes: 8" + }, + { + "type": "spotlight", + "item": "bloodmagic:defaultcrystal", + "title": "Raw", + "text": "Increases the speed of all ritual operations based on the total amount of $(raw)Raw Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:corrosivecrystal", + "title": "Corrosive", + "text": "Entities within range are attacked by nearby plants, leeching away their life to feed their own growth." + }, + { + "type": "spotlight", + "item": "bloodmagic:vengefulcrystal", + "title": "Vengeful", + "text": "Increases the rate that a growth tick is successful." + }, + { + "type": "spotlight", + "item": "bloodmagic:destructivecrystal", + "title": "Destructive", + "text": "Increases the maximum growth range of the ritual based on the total amount of $(destructive)Destructive Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:steadfastcrystal", + "title": "Steadfast", + "text": "Seeds are replanted and blocks are hydrated within the specified range." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Growth) The area that the ritual will grow plants in. $(br) $(li)Maximum Volume: 81 $(li)Horizontal Radius: 4 $(li)Vertical Radius: 4" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Steadfast) Blocks within this range are rehydrated into farmland, and seeds within the area are planted nearby. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 15 $(li)Vertical Radius: 15" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Corrosive) Entities in this area have their life drained to grow nearby crops. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 15 $(li)Vertical Radius: 15" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_harvest.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_harvest.json new file mode 100644 index 00000000..615e679b --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_harvest.json @@ -0,0 +1,41 @@ +{ + "name": "Reap of the Harvest Moon", + "icon": "minecraft:wheat", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Reap of the Harvest Moon", + "multiblock":{ + "pattern":[ + ["_WE_EW_", + "W__E__W", + "E_D_D_E", + "_E_0_E_", + "E_D_D_E", + "W__E__W", + "_WE_EW_"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Harvests plants within its range, dropping the results on the ground.$(br2)$(water)Water Runes: 8$(br)$(earth)Earth Runes: 12$(br)$()Dusk Runes: 4$(br2)$()Total Runes: 24" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Harvesting) Plants within this range will be harvested. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 15 $(li)Vertical Radius: 15" + } + ] +} + diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_lava.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_lava.json new file mode 100644 index 00000000..f9a8c693 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_lava.json @@ -0,0 +1,88 @@ +{ + "name": "Serenade of the Nether", + "icon": "minecraft:lava_bucket", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Serenade of the Nether", + "multiblock":{ + "pattern":[ + ["_F_", + "F0F", + "_F_"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "F": "bloodmagic:fireritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$(/l) for easier construction." + }, + { + "type": "text", + "text": "Generates a source of lava from the master ritual stone.$(br2)$(fire)Fire Runes: 4$()$(br2)Total Runes: 4" + }, + { + "type": "spotlight", + "item": "bloodmagic:defaultcrystal", + "title": "Raw", + "text": "Decreases the LP cost of placing lava and allows the lava to be directly placed into a tank or other fluid-handling block." + }, + { + "type": "spotlight", + "item": "bloodmagic:corrosivecrystal", + "title": "Corrosive", + "text": "Entities within range that are immune to fire (e.g. pigmen, blazes) are damaged severely." + }, + { + "type": "spotlight", + "item": "bloodmagic:vengefulcrystal", + "title": "Vengeful", + "text": "Entities in this range are afflicted by Fire Fuse. When the debuff ends, they will do a wonderful impression of a firework." + }, + { + "type": "spotlight", + "item": "bloodmagic:destructivecrystal", + "title": "Destructive", + "text": "Lava placement range is increased based on the total amount of $(destructive)Destructive Will$() in the Aura." + }, + { + "type": "spotlight", + "item": "bloodmagic:steadfastcrystal", + "title": "Steadfast", + "text": "Players in this range have Fire Resist applied." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Lava) The area that the ritual will place lava source blocks. $(br) $(li)Maximum Volume: 9 $(li)Horizontal Radius: 3 $(li)Vertical Radius: 3" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Corrosive) Entities within this range that are immune to fire damage are hurt proportional to the Will. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 10 $(li)Vertical Radius: 10" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Vengeful) Entities in this range are afflicted by Fire Fuse. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 10 $(li)Vertical Radius: 10" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Steadfast) Players in this range have Fire Resist applied. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 10 $(li)Vertical Radius: 10" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Raw) The tank that the ritual will place lava into. $(br) $(li)Maximum Volume: 1 $(li)Horizontal Radius: 10 $(li)Vertical Radius: 10" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_magnetic.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_magnetic.json new file mode 100644 index 00000000..79d74155 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_magnetic.json @@ -0,0 +1,40 @@ +{ + "name": "Ritual of Magnetism", + "icon": "minecraft:iron_ore", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of Magnetism", + "multiblock":{ + "pattern":[ + ["__F__", "_____", "F___F", "_____", "__F__"], + ["A_E_A", "_____", "E___E", "_____", "A_E_A"], + ["_____", "_E_E_", "__0__", "_E_E_", "_____"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "A": "bloodmagic:airritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$(/l) for easier construction." + }, + { + "type": "text", + "text": "Pulls up ores from the ground below and puts them into its placement range.$(br2)$(air)Air Runes: 4$(br)$(fire)Fire Runes: 4$(br)$(earth)Earth Runes: 8$(br2)$()Total Runes: 16" + }, + { + "type": "text", + "text": "By default, the $()Ritual of Magnetism$() searches down to bedrock in a radius of 3 blocks out from the $(item)Master Ritual Stone$() for ores to collect. This can be augmented by placing an expensive block directly underneath the MRS, as follows: $(br2)$(li)$(item)Block of Iron$() - 7 blocks. $(li)$(item)Block of Gold$() - 15 blocks. $(li)$(item)Block of Diamond$() - 31 blocks." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Placement) The range that the ritual will place the grabbed ores into. $(br) $(li)Maximum Volume: 50 $(li)Horizontal Radius: 4 $(li)Vertical Radius: 4" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_regeneration.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_regeneration.json new file mode 100644 index 00000000..57cacbfe --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_regeneration.json @@ -0,0 +1,49 @@ +{ + "name": "Ritual of Regeneration", + "icon": "minecraft:golden_apple", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of Regeneration", + "multiblock":{ + "pattern":[ + ["EEW_F_F_WEE", "E____F____E", "W_D_____D_W", "___________", "A_________A", "_A___0___A_", "A_________A", "___________", "W_D_____D_W", "E____F____E", "EEW_F_F_WEE"], + ["_E_______E_", "E_________E", "___________", "___________", "___________", "___________", "___________", "___________", "___________", "E_________E", "_E_______E_"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone", + "A": "#bloodmagic:ritual_stones/air_or_fire", + "F": "#bloodmagic:ritual_stones/fire_or_air", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Casts regeneration on entities within its range if they are missing health. $(br2)$(water)Water Runes: 8 $(br)$(air)Air Runes: 6 $(br)$(fire)Fire Runes: 6 $(br)$(earth)Earth Runes: 20 $(br)$()Dusk Runes: 4$(br2)$()Total Runes: 44" + }, + { + "type": "spotlight", + "item": "bloodmagic:corrosivecrystal", + "title": "Corrosive", + "text": "Steals health from non-players inside of its Vampirism range and directly heals players." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Healing) Entities within this range will receive a regeneration buff. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 20 $(li)Vertical Radius: 20" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Vampirism) Mobs within this range have their health syphoned to heal players in the Healing range. $(br) $(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 20 $(li)Vertical Radius: 20" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_upgrade_remove.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_upgrade_remove.json new file mode 100644 index 00000000..2bb7d05f --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_upgrade_remove.json @@ -0,0 +1,34 @@ +{ + "name": "Sound of the Cleansing Soul", + "icon": "bloodmagic:upgradetome", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Sound of the Cleansing Soul", + "multiblock":{ + "pattern":[ + ["_________", "_________", "_________", "____A____", "___A_A___", "____A____", "_________", "_________", "_________"], + ["_________", "_E_____E_", "_________", "___W_W___", "_________", "___W_W___", "_________", "_E_____E_", "_________"], + ["_________", "_E_____E_", "_________", "_________", "_________", "_________", "_________", "_E_____E_", "_________"], + ["_________", "_E_____E_", "_________", "___W_W___", "_________", "___W_W___", "_________", "_E_____E_", "_________"], + ["____E____", "_E_____E_", "__FF_FF__", "__FD_DF__", "E___0___E", "__FD_DF__", "__FF_FF__", "_E_____E_", "____E____"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone", + "A": "bloodmagic:airritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner#dusk)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "Removes all upgrades (and downgrades) from your $(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$() and gives you the corresponding Upgrade (and Downgrade) $(l:bloodmagic:alchemy_array/living_equipment/living_upgrades)Tomes$(). You can right click while holding one of these $(item)Tomes$() to re-apply them to your $(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$() again.$(br2)$(water)Water Runes: 8 $(br)$(air)Air Runes: 4 $(br)$(fire)Fire Runes: 12 $(br)$(earth)Earth Runes: 20 $(br)$()Dusk Runes: 4 $(br2)$()Total Runes: 48" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_water.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_water.json new file mode 100644 index 00000000..518f74a0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_water.json @@ -0,0 +1,40 @@ +{ + "name": "Ritual of the Full Spring", + "icon": "minecraft:water_bucket", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Ritual of the Full Spring", + "multiblock":{ + "pattern":[ + ["W_W", + "_0_", + "W_W"] + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$(/l) for easier construction." + }, + { + "type": "text", + "text": "Generates a source of water from the master ritual stone.$(br2)$(water)Water Runes: 4$()$(br2)Total Runes: 4" + }, + { + "type": "spotlight", + "item": "bloodmagic:defaultcrystal", + "title": "Raw", + "text": "allows the water to be directly placed into a Tank or other fluid-handling block." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Water) The area within which the Ritual will place Source Blocks. $(br2)$(li)Maximum Volume: 9 $(li)Horizontal Radius: 3 $(li)Vertical Radius: 3 " + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_well_of_suffering.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_well_of_suffering.json new file mode 100644 index 00000000..135c7740 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_list/ritual_well_of_suffering.json @@ -0,0 +1,45 @@ +{ + "name": "Well of Suffering", + "icon": "bloodmagic:life_essence_bucket", + "category": "bloodmagic:rituals/ritual_list", + "pages": [ + { + "type": "multiblock", + "name": "Well Of Suffering", + "multiblock":{ + "pattern":[ + ["____A____", "_________", "_________", "_________", "A_______A", "_________", "_________", "_________", "____A____"], + ["___W_W___", "_________", "_________", "W__F_F__W", "____0____", "W__F_F__W", "_________", "_________", "___W_W___"], + ["__W___W__", "_D_____D_", "W_F_E_F_W", "_________", "__E___E__", "_________", "W_F_E_F_W", "_D_____D_", "__W___W__"] + + ], + "mapping":{ + "0": "bloodmagic:masterritualstone", + "W": "bloodmagic:waterritualstone", + "A": "bloodmagic:airritualstone", + "F": "bloodmagic:fireritualstone", + "E": "bloodmagic:earthritualstone", + "D": "bloodmagic:duskritualstone" + }, + "symetrical": true + }, + "text": "Use a $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner [Dusk]$(/l) for easier construction." + }, + { + "type": "text", + "text": "This ritual attacks mobs within its damage zone and puts the harvested $(blood)Blood$() into a nearby $(l:bloodmagic:altar/blood_altar)Blood Altar$(). Put a $(l:bloodmagic:altar/soul_network)Blood Orb$() in the Altar, maybe add a few $(l:bloodmagic:altar/blood_rune/sacrifice_rune)Runes of Sacrifice$() for good measure and you'll never have to worry about your LP supplies again... As long as you can supply enough mobs.$(br)$(water)Water Runes: 16$(br)$(air)Air Runes: 4$(br)$(fire)Fire Runes: 8$(br)$(earth)Earth Runes: 4$(br)$()Dusk Runes: 4$(br2)$()Total Runes: 36" + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Altar) The area that the ritual searches for a $(l:bloodmagic:altar/blood_altar)Blood Altar$() to deposit its Blood into. $(br2)$(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 10 $(li)Vertical Radius: 15 " + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualtinkerer", + "title": "Range", + "text": "(Damage) All mobs within this area will take damage every second or so until they die. This does not include players, fortunately. $(br2)Mobs will drop $(item)Items$(), so be sure to set up something to clean up the mess. $(br2)$(li)Maximum Volume: Full Range. $(li)Horizontal Radius: 15 $(li)Vertical Radius: 15 " + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_stones.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_stones.json new file mode 100644 index 00000000..5e27ac42 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_stones.json @@ -0,0 +1,23 @@ +{ + "name": "Ritual Stones", + "icon": "bloodmagic:waterritualstone", + "category": "bloodmagic:rituals", + "extra_recipe_mappings":[ + ["bloodmagic:airritualstone", 0], + ["bloodmagic:fireritualstone", 0], + ["bloodmagic:waterritualstone", 0], + ["bloodmagic:earthritualstone", 0], + ["bloodmagic:duskritualstone", 0] + ], + "pages": [ + { + "type": "text", + "text": "$(item)Ritual Stones$() are the canvas upon which you will draw your $(item)Rituals$(). They also look quite nifty, and can be manually painted with the various $(l:bloodmagic:rituals/ritual_diviner)Elemental Inscription Tools$()." + }, + { + "type": "crafting", + "recipe": "bloodmagic:ritual_stone_blank", + "recipe2": "bloodmagic:ritual_stone_master" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_tinkerer.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_tinkerer.json new file mode 100644 index 00000000..62e82de5 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/rituals/ritual_tinkerer.json @@ -0,0 +1,24 @@ +{ + "name": "Ritual Tinkerer", + "icon": "bloodmagic:ritualtinkerer", + "category": "bloodmagic:rituals", + "priority": "true", + "pages": [ + { + "type": "text", + "text": "The $(item)Ritual Tinkerer$() is an essential tool for the advanced Blood Mage who is looking for all they can get out of their Rituals. It has three main modes, as described overleaf." + }, + { + "type": "crafting", + "recipe": "bloodmagic:ritual_reader" + }, + { + "type": "text", + "text": "$(li)Information: Describes the function of the ritual, similar to the Ritual Diviner. $(li)Set Will Consumed: Tells the ritual which kinds of Demon Will (if any) to consume from the Aura. Specify this by carrying Demon Will Crystals in your hotbar, one for each type of will you wish the Ritual to consume. Further information about the effects of Demon Will upon Rituals can be found on each Ritual's respective page in this book." + }, + { + "type": "text", + "text": "$(li)Define Area: Specifies the zone that the ritual should work in, and displays the current zone. If multiple zones can be specified, shift-clicking will cycle through them. Some rituals can be expanded far beyond their default areas, but keep in mind that this will increase the LP cost to match..." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/alchemical_reaction_chamber.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/alchemical_reaction_chamber.json new file mode 100644 index 00000000..389ff102 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/alchemical_reaction_chamber.json @@ -0,0 +1,125 @@ +{ + "name": "Alchemical Reaction Chamber", + "icon": "bloodmagic:alchemicalreactionchamber", + "category": "bloodmagic:utility", + "extra_recipe_mappings":[ + ["bloodmagic:sanguinereverter", 2], + ["bloodmagic:weakbloodshard", 3], + ["bloodmagic:explosivepowder", 6], + ["bloodmagic:ironfragment", 7], + ["bloodmagic:goldfragment", 7], + ["bloodmagic:fragment_netherite_scrap", 7], + ["bloodmagic:irongravel", 9], + ["bloodmagic:goldgravel", 9], + ["bloodmagic:gravel_netherite_scrap", 9], + ["bloodmagic:ironsand", 7], + ["bloodmagic:goldsand", 7], + ["bloodmagic:sand_netherite", 7], + ["bloodmagic:sulfur", 7], + ["bloodmagic:primitive_crystalline_resonator", 8], + ["bloodmagic:basiccuttingfluid", 10] + ], + "pages": [ + { + "type": "text", + "text": "The $(item)Alchemical Reaction Chamber$() isn't fully implemented yet, but among other things it can function as a furnace, offers a form of ore-tripling, revert Blood Orbs, and is currently the only way to get $(item)Weak Blood Shards$(), specifically from an $(l:bloodmagic:altar/slates)Imbued Slate$()." + }, + { + "type": "crafting", + "recipe": "bloodmagic:arc" + }, + { + "type": "crafting_soulforge", + "heading": "Sanguine Reverter", + "recipe": "bloodmagic:soulforge/sanguine_reverter", + "anchor": "blood_shard", + "text": "The Sanguine Reverter is used to create Weak Blood Shards, and revert Blood Orbs to their input crafting item." + }, + { + "type": "3x_crafting_arc", + "a.heading": "Weak Blood Shard", + "a.recipe": "bloodmagic:arc/weakbloodshard", + "b.heading": "Revert Weak Blood Orb", + "b.recipe": "bloodmagic:arc/reversion/weak_blood_orb", + "c.heading": "Revert Apprentice Blood Orb", + "c.recipe": "bloodmagic:arc/reversion/apprentice_blood_orb" + }, + { + "type": "2x_crafting_arc", + "a.heading": "Revert Magician Blood Orb", + "a.recipe": "bloodmagic:arc/reversion/magician_blood_orb", + "b.heading": "Revert Master Blood Orb", + "b.recipe": "bloodmagic:arc/reversion/master_blood_orb", + "b.text": "Turn the page for more uses of the ARC." + }, + { + "type": "empty" + }, + { + "type": "crafting_alchemy_table", + "heading": "Explosive Powder", + "anchor": "ore_processing", + "recipe": "bloodmagic:alchemytable/explosive_powder", + "text": "Explosive Powder in the ARC is used to turn Ores into Ore Fragments for 3x Ore Processing, or turn Ingots into their Sand variant. It can also turn Netherrack into Sulfur and 5mb of Lava." + }, + { + "type": "3x_crafting_arc", + "a.heading": "Ore to 3 Ore Fragments", + "a.recipe": "bloodmagic:arc/fragmentsiron", + "b.heading": "Ingot to Metal Sand", + "b.recipe": "bloodmagic:arc/dustsfrom_ingot_iron", + "c.heading": "Sulfur and Lava", + "c.recipe": "bloodmagic:arc/netherrack_to_sulfer", + "c.fluid_output": "minecraft:lava_bucket" + }, + { + "type": "crafting_soulforge", + "heading": "Resonator", + "recipe": "bloodmagic:soulforge/primitive_crystalline_resonator", + "text": "The Resonator is used to turn Ore Fragments into the relevant Gravel for continued ore processing, and creates some tiny dusts that are NYI." + }, + { + "type": "crafting_arc", + "heading": "Ore Fragment to Metal Gravel", + "recipe": "bloodmagic:arc/gravelsiron" + }, + { + "type": "crafting_alchemy_table", + "heading": "Basic Cutting Fluid", + "recipe": "bloodmagic:alchemytable/basic_cutting_fluid", + "text": "Cutting Fluid turns a metal's Gravel into that metal's Sand for continued 3x ore processing. It can also turn an ore directly into two metal Sand for 2x Ore Processing. The same 2x Ore Processing is possible in the Alchemy Table, but doing it in the ARC will save you some LP." + }, + { + "type": "2x_crafting_arc", + "a.heading": "Metal Gravel to Metal Sand", + "a.recipe": "bloodmagic:arc/dustsfrom_gravel_iron", + "b.heading": "Ore to 2 Metal Sand", + "b.recipe": "bloodmagic:arc/dustsfrom_ore_iron" + }, + { + "type": "crafting", + "heading": "Fuel Cell (Furnace)", + "recipe": "bloodmagic:primitive_furnace_cell", + "text": "The ARC also functions as a Furnace, but the only fuel sources it accepts is the $(item)Primitive Fuel Cell$() or $(l:bloodmagic:utility/lava_crystal)Lava Crystal$(/l)." + }, + { + "type": "text", + "text": "The Primitive Fuel Cell is good for 128 individual uses. That's more than the Block of Coal used to craft it (60 items), and since it only loses durability when the crafting is finished it will not wase fuel." + }, + { + "type": "crafting", + "heading": "Hydration Cell", + "recipe": "bloodmagic:primitive_hydration_cell", + "text": "The Hydration Cell is used to make Clay, the Cornerstone of Balance." + }, + { + "type": "2x_crafting_arc", + "a.heading": "Clay from Sand", + "a.recipe": "bloodmagic:arc/clay_from_sand", + "a.fluid_input": "minecraft:water_bucket", + "b.heading": "Clay from Terracotta", + "b.recipe": "bloodmagic:arc/clay_from_terracotta", + "b.fluid_input": "minecraft:water_bucket" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/bloodstone_bricks.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/bloodstone_bricks.json new file mode 100644 index 00000000..c1753cb3 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/bloodstone_bricks.json @@ -0,0 +1,16 @@ +{ + "name": "Bloodstone Bricks", + "icon": "bloodmagic:largebloodstonebrick", + "category": "bloodmagic:utility", + "pages":[ + { + "type": "text", + "text": "Bloodstone Bricks are a decorational block, and used as the capstones for the Tier-4 Blood Altar." + }, + { + "type": "crafting", + "recipe": "bloodmagic:largebloodstonebrick", + "recipe2": "bloodmagic:bloodstonebrick" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/book_experience.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/book_experience.json new file mode 100644 index 00000000..6946e58d --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/book_experience.json @@ -0,0 +1,15 @@ +{ + "name": "Tome of Peritia", + "icon": "bloodmagic:experiencebook", + "category": "bloodmagic:utility", + "pages": [ + { + "type": "text", + "text": "The $(item)Tome of Peritia$() allows you to safely store your experience $(br2)Shift + Right Click stores a level. Right Click retrieves a level. Hold right-click to store/retrive multiple levels." + }, + { + "type": "crafting", + "recipe": "bloodmagic:experience_tome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/changelog.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/changelog.json new file mode 100644 index 00000000..18dbe6c1 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/changelog.json @@ -0,0 +1,117 @@ +{ + "name": "Changelog", + "icon": "minecraft:map", + "category": "bloodmagic:utility", + "priority": "true", + "pages":[ + { + "type": "text", + "text": "All the changelogs of $(6)Blood Magic$() to date, from most recent to oldest." + }, + { + "type": "text", + "title": "3.1.0-15", + "text": "$(li)Majorly refactored the progression of the mod. Instead of starting with a $(l:bloodmagic:demon_will/soul_snare)Snare$(), you instead start by crafting the $(l:bloodmagic:altar/blood_altar)Blood Altar$(). The changes are documented in the guide, and you can follow its $(l:bloodmagic:utility/getting_started)Getting Started$() entry!$(li)Changed the tooltips so that they are gray, more easily differentiating them from the name of the item." + }, + { + "type": "text", + "text": "$(li)Added the $(l:bloodmagic:alchemy_array/holding)Sigil of Holding$().$(li)Changed the crafting of $(l:bloodmagic:demon_will/soul_gem)Tartaric Gems$() so that you no longer need to use the previous tier gem in the gem slot.$(li2)The $(l:bloodmagic:demon_will/soul_forge)Hellfire Forge$() will now syphon from the gem in the crafting table first, and all unused will from the consumed gem will be placed in the crafted gem." + }, + { + "type": "text", + "text": "$(li)Changed the GUI for the $(l:bloodmagic:alchemy_table/alchemy_table)Alchemy Table$(). See the updated section.$(li)Fixed $(l:bloodmagic:alchemy_table/anointments/looting_anointment)Plunderer's Glint$() not properly applying the Looting level.$(li)Also fixed a NPE crash due to $(l:bloodmagic:alchemy_table/anointments/bow_power_anointment)Iron Tip$(). Fixes some crashes due to mods using the ItemUsedFinish event.$(li)Fixed the $(l:bloodmagic:blood_altar/blood_altar)Blood Altar$() not being able to input fluids. About time, Way!" + }, + { + "type": "text", + "text": "$(li)Added new $(l:bloodmagic:demon_will/explosive_charges)Explosive Charges.$()$(li2)$(item)Fungal Charge$(), which is very useful for giant mushrooms and nether mushrooms.$(li2)$(item)Controlled Charge$(), which will destroy only blocks that match the block it is placed on.$(li)Added the ability to apply a few select Anointments to the charges. Only one can be applied to a charge at a time.$(li2)$(l:bloodmagic:alchemy_table/anointments/silk_touch_anointment)Soft Coating$()$(li2)$(l:bloodmagic:alchemy_table/anointments/fortune_anointment)Fortuna Extract$()" + }, + { + "type": "text", + "text": "$(li2)$(l:bloodmagic:alchemy_table/anointments/smelting_anointment)Slow-burning Oil$()$(li)Fixed the $(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$() so that you cannot use an upgrade tome to usurp the point cap.$(li2)Fixed $(l:bloodmagic:alchemy_array/living_equipment/armor_upgrades/strong_legs)Strong Legs$()so that it no longer runs the program \"CrunchyLegs.exe\" - as a result, you no longer suffer fall damage from jumping on the same level. Removed the direct fall damage mitigation from Strong Legs." + }, + { + "type": "text", + "text": "$(li)Added two types of $(l:bloodmagic:demon_will/throwing_daggers)Throwing Daggers$() to the Blood Mage's offensive kit.$(li2)$(item)Iron Throwing Dagger$()$(li2)$(item)Syringe Throwing Dagger$()$(li)Refactored the guide so that it provides +2 to awesomeness.$()" + }, + { + "type": "text", + "title": "3.0.6-11", + "text": " $(li)Reimplemented the $(l:bloodmagic:rituals/ritual_list/ritual_well_of_suffering)Well of Suffering$(). $(li)Added several new items, called \"$(l:bloodmagic:alchemy_table/anointments)Anointments$()\"! These are items that provide temporary buffs to your tools and weapons, such as silk touch, higher damage, and more! Look them up in the Utility section of the book. These include: $(li2)Honing Oil $(li2)Soft Coating $(li2)Fortuna Extract $(li2)Holy Water" + }, + { + "type": "text", + "text": "$(li2)Miner's Secrets $(li2)Dexterity Alkahest $(li2)Iron Tip $(li2)Plunderer's Glint $(li2)Slow-burning Oil $(li)Made the $(l:bloodmagic:demon_will/explosive_charges#shaped_charge)Shaped Charge$() and $(l:bloodmagic:demon_will/explosive_charges#deforester_charge)Deforester Charge$() throwable." + }, + { + "type": "text", + "title": "3.0.5-10", + "text": "Fixed a crash with the $(l:bloodmagic:altar/blood_altar)Blood Altar$() on unload and adjusted the recipe for the $(l:bloodmagic:alchemy_array/functional_arrays/time_arrays)Day array$() to use $(item)Coal$() instead of $(item)Clocks$()." + }, + { + "type": "text", + "title": "3.0.4-9", + "text": "$(li)Added two new $(l:bloodmagic:demon_will/explosive_charges)explosives$(): $(li2)The $(l:bloodmagic:demon_will/explosive_charges#shaped_charge)Shaped Charge$(), which will break a 5x5x5 volume when placed. $(li2)The $(l:bloodmagic:demon_will/explosive_charges#deforester_charge)Deforester Charge$(), which can chop down a tree up to a maximum of 128 logs. $(li)(Both explosives drop all blocks affected, and do not cause further environmental nor entity damage.)" + }, + { + "type": "text", + "text": "$(li)Added new alchemy arrays: $(li2)$(l:bloodmagic:alchemy_array/functional_arrays/time_arrays)Two arrays$(), which changes the current daylight cycle to day and night. Recipes are temp. $(li)Fixed the following $(l:bloodmagic:alchemy_array/living_equipment/living_upgrades)Living Armour upgrades$() so that they are now obtainable: $(li2)Experienced $(li2)Body Builder" + }, + { + "type": "text", + "title": "3.0.3-8", + "text": "$(li)Updated the $(item)Sanguine Scientiem$() - it's very well written! Special thanks to both $(fire)VT-14$() and $(raw)Wrincewind$() for their long hours of effort to make this book better than I could have done! $(li)Fixed a crash with the $(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$() when crafted and worn right after enchanting." + }, + { + "type": "text", + "title": "3.0.2-7", + "text": "Readded the $(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$(). Currently only with a few $(l:bloodmagic:alchemy_array/living_equipment/living_upgrades)upgrades$(), and no downgrades. $(li)Pin Cushion $(li)Soft Fall $(li)Tough $(li)Strong Legs (Now can be temporarily deactivated when jumping by sneaking) $(li)Healthy $(li)Experienced $(li)Charging Strike $(li)Tough Palms $(li)Quick Feet $(li)Poison Resistance" + }, + { + "type": "text", + "text": "$(li)Gift of Ignis $(li)Dwarven Might $(li)Body Builder $(br2)Reimplemented the following rituals: $(li)$(l:bloodmagic:rituals/ritual_list/ritual_crystal_split)Resonance of the Faceted Crystal$() $(li)$(l:bloodmagic:rituals/ritual_list/ritual_crystal_harvest)Crack of the Fractured Crystal$() $(li)$(l:bloodmagic:rituals/ritual_list/ritual_harvest)Reap of the Harvest Moon$() (Mainly vanilla crops) $(li)$(l:bloodmagic:rituals/ritual_list/ritual_animal_growth)Ritual of the Shepherd$() $(li)$(l:bloodmagic:rituals/ritual_list/ritual_green_grove)Ritual of the Green Grove$() $(li)$(l:bloodmagic:rituals/ritual_list/ritual_ellipse)Focus of the Ellipsoid$() $(li)$(l:bloodmagic:rituals/ritual_list/ritual_upgrade_remove)Sound of the Cleansing Soul$()" + }, + { + "type": "text", + "text": "$(li)$(l:bloodmagic:rituals/ritual_list/ritual_armour_evolve)Ritual of Living Evolution$()" + }, + { + "type": "text", + "title": "3.0.1-6", + "text": "$(li)Reimplemented the $(l:bloodmagic:utility/incense_altar)Incense Altar$() with all appropriate blocks. $(li)Added guide entries for the $(l:bloodmagic:utility/incense_altar)Incense Altar$() and $(l:bloodmagic:altar/blood_altar)Blood Altar$(). Other misc entries added, too. $(li)Fixed a server-related crash on the client on the $(l:bloodmagic:alchemy_array/sigil/grove)Sigil of the Green Grove$(). $(li)Added $(l:bloodmagic:utility/alchemical_reaction_chamber#ore_processing)ore processing$() to $(item)Ancient Debris.$() $(li)Readded the other $(l:bloodmagic:demon_will/sentient_tools)Sentient Tool$() types (with one more on the way)." + }, + { + "type": "text", + "text": "$(li)Added a few WIP items that cannot be used yet - they're part of the D*$)@ D*#@(@* system that I'm adding for Tier 4. $(li)Added the API - It's still in flux, so expect it to change very soon! $(li)Probably forgot something important. $(li)Fixed a crash for the $(l:bloodmagic:utility/lava_crystal)Lava Crystal$() that made it blow up the Client if used on a server. No, that was not the intended purpose!" + }, + { + "type": "text", + "text": "$(li)Added the $(l:bloodmagic:rituals/ritual_tinkerer)Ritual Tinkerer$() for Rituals. $(li)Added the \"$(l:bloodmagic:utility/book_experience)Tome of Peritia$()\" again - stores EXP." + }, + { + "type": "text", + "title": "3.0.0-3", + "text": "$(li)Fix for an issue with the Will Handler, which would cause massive lag. $(li)Reimplemented some recipes which... were not properly implemented. These include the $(l:bloodmagic:alchemy_table/alchemy_table#cutting_fluid)Cutting Fluid$() recipes in the $(l:bloodmagic:alchemy_table/alchemy_table)Alchemy Table$(). Whoops! $(li)Reduced the cost of the $(l:bloodmagic:altar/blood_altar#blank_rune)Blank Rune$(), swapping one of the $(l:bloodmagic:altar/slates)Blank Slates$() for $(item)Smooth Stone$()." + }, + { + "type": "text", + "title": "3.0.0-1", + "text": "First update for $(item)Minecraft 1.16.3$()! Supposedly it should also work for 1.16.4, however it was built for 1.16.3. $(br2)This release is what I can best describe as \"early alpha\" - a lot of the systems are in place and working, however a few things are notably absent. This can mean that the system will either be fully revamped, reimplemented from previous MC versions at a later date, or" + }, + { + "type": "text", + "text": "will not be added to make room for another system. $(br2)Some of the things that are currently missing from this version of Blood Magic are: $(li)$(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$(), which will need to be completely rewritten to fix some client-server bugs. $(li)Several rituals. Rituals ARE in this release, but only a handful. Most of the rituals WILL be readded. $(li)The $(l:bloodmagic:utility/incense_altar)Incense Altar$(). Will be reimplemented soon." + }, + { + "type": "text", + "text": "$(li)The Item Routing System. Might need to be reimplemented? And it'll need a bunch of insecticide, since there's some bugs that I've heard about. $(li)Tier 5 - there's not currently much in T5 from previous versions, so it's temporarily disabled until I've fully decided the upgrade path towards it. Although I won't give much away, it will involve demons. And *^$%@)$#. $(li)Tier 6 - Why do people still ask about this?" + }, + { + "type": "text", + "text": "And other systems and items that I have not specifically mentioned. $(br2)Notable new content that's currently being experimented with and/or tweaked: $(li)The $(item)Blood Magic Guide$()! It's being completely rewritten and is currently using the mod Patchouli! $(strike)It's a pretty Neat mod by Vazkii$() It's in its early stages of writing, but for now the plan is to have it be purely informational - main reason I am temporarily ditching the narrative-based" + }, + { + "type": "text", + "text": "guide is that I need some form of in-game guide that tells the user about all the new and improved systems in the mod. And building a comprehensive narrative makes such a thing slow moving. $(li)The $(l:bloodmagic:utility/alchemical_reaction_chamber)Alchemical Reaction Chamber$()! It's a multiple-use block that can process ores and is integral for reaching Tier 4. It's still being balanced, so any feedback on this is greatly appreciated. $(br2)I hope you will enjoy the mod! $(br) - WayofTime" + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/getting_started.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/getting_started.json new file mode 100644 index 00000000..5ade9211 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/getting_started.json @@ -0,0 +1,66 @@ +{ + "name": "Tiers & Getting Started", + "icon": "bloodmagic:sacrificialdagger", + "category": "bloodmagic:utility", + "priority": "true", + "pages": [ + { + "type": "text", + "text": "$(6)Blood Magic 3$()'s progression is still being reworked, and the first few steps are significantly different from Blood Magic 2's.$(br2)We do plan on adding better guideance, such as entry unlocking, but we are waiting until the progression is locked down. In the mean time, here is a quick overview on how to progress in this alpha version of $(6)Blood Magic 3$()." + }, + { + "type": "spotlight", + "item": "bloodmagic:altar", + "title": "Blood Altar (Tier-1)", + "text": "The first step of $(6)Blood Magic$() is to build a $(l:bloodmagic:altar/blood_altar)Blood Altar$() and $(l:bloodmagic:altar/blood_altar#knife)Sacrificial Knife$(). Use these to generate $(blood)LP$() from Self-Sacrificing.$(br2)Use this $(blood)LP$() to craft a $(l:bloodmagic:altar/soul_network)Weak Blood Orb$(), several $(l:bloodmagic:altar/slates)Blank Slates$(), and a few $(l:bloodmagic:demon_will/soul_snare)Soul Snares$()." + }, + { + "type": "spotlight", + "item": "bloodmagic:alchemytable", + "title": "Alchemy Table (Tier-1)", + "text": "The $(l:bloodmagic:alchemy_table/alchemy_table)Alchemy Table$() uses $(blood)LP$() from a player's $(blood)Soul Network$() (drawn from the $(l:bloodmagic:altar/soul_network)bound Blood Orb$() in it) to craft various different objects, such as:$(li)$(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Arcane Ashes$()$(li)$(item)Reagents for Sigils$()$(li)$(item)Anointments$()$(li)$(thing)2x Ore Processing$()$(li)and various other odds and ends." + }, + { + "type": "spotlight", + "item": "bloodmagic:arcaneashes", + "title": "Alchemy Array (Tier-1)", + "text": "An $(thing)Alchemy Array$() is made by placing some $(l:bloodmagic:alchemy_array/functional_arrays/arcane_ash)Arcane Ashes$() on the ground. The Alchemy Array can have 2 items right clicked into it, and will either craft an item (such as a $(l:bloodmagic:alchemy_array/sigil/divination)Divination Sigil$()) or perform some kind of function (such as $(l:bloodmagic:alchemy_array/functional_arrays/time_arrays)turning day into night$())." + }, + { + "type": "spotlight", + "item": "bloodmagic:soulforge", + "title": "Hellfire Forge (Tier-1)", + "text": "The $(l:bloodmagic:demon_will/soul_forge)Hellfire Forge$() crafts using $(l:bloodmagic:demon_will/demon_will)Demon Will$(). You get your first $(raw)Will$() by using $(l:bloodmagic:demon_will/soul_snare)Soul Snares$(), though upgrading to a $(l:bloodmagic:demon_will/sentient_sword)Sentient Sword$() is recommended. The $(item)Hellfire Forge$() is used for stuff directly related to $(raw)Demon Will$() (like $(l:bloodmagic:demon_will/soul_gem)Tartaric Gems$() and $(l:bloodmagic:demon_will/sentient_tools)Sentient Tools$()), and consumables (like $(l:bloodmagic:demon_will/explosive_charges)Explosive Charges$() and $(l:bloodmagic:demon_will/throwing_daggers)Throwing Daggers$())." + }, + { + "type": "spotlight", + "item": "bloodmagic:daggerofsacrifice", + "title": "Tier Two", + "text": "At this point, you will be able to craft a $(l:bloodmagic:altar/blood_altar#dagger_of_sacrifice)Dagger of Sacrifice$() in order to slaughter mobs for more LP. Various $(item)Upgrade Runes$() should be avaliable for your $(item)Blood Altar$(), and some more $(item)Sigils$() will be available. As before, you should focus on further upgrading your $(l:bloodmagic:altar/blood_altar)Altar$()." + }, + { + "type": "spotlight", + "item": "bloodmagic:ritualdiviner", + "title": "Tier Three", + "text": "By this point, you will have the ability to create some $(l:bloodmagic:rituals/ritual_basics)basic Rituals$() and $(l:bloodmagic:alchemy_array/living_equipment/living_basics)Living Armour$() as well. This armour is very versatile, though you'll have to work hard to unlock its full potential. At this point you should look into upgrading your Altar and your $(l:bloodmagic:rituals/ritual_diviner)Ritual Diviner$()." + }, + { + "type": "spotlight", + "item": "bloodmagic:vengefulcrystal", + "title": "Tier Four", + "text": "This is the top tier. At this point you have access to everything that $(6)Blood Magic$() has to offer. You may want to look into the $(l:bloodmagic:rituals/ritual_tinkerer)Ritual Tinkerer$() and the various kinds of $(l:bloodmagic:demon_will/aspected_will)Will Aspects$() avaliable to you, and consider how they may be used to refine your existing rituals and alter how your $(l:bloodmagic:demon_will/sentient_tools)Sentient Tools$() and $(l:bloodmagic:demon_will/sentient_sword)Weapons$() work." + }, + { + "type": "spotlight", + "item": "bloodmagic:activationcrystalawakened", + "title": "Tier Five", + "text": "Currently, this is just a myth. Nothing's implemented at this stage." + }, + { + "type": "spotlight", + "item": "minecraft:barrier", + "title": "Tier Six?", + "text": "What? No. Look, even in 1.12, this only existed as a favor to pack makers and was otherwise unimplemented. You've come too far. Go back two pages." + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/incense_altar.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/incense_altar.json new file mode 100644 index 00000000..01916ffe --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/incense_altar.json @@ -0,0 +1,107 @@ +{ + "name": "Incense Altar", + "icon": "bloodmagic:incensealtar", + "category": "bloodmagic:utility", + "pages": [ + { + "type": "text", + "text": " The $(item)Incense Altar$() is a multiblock structure that can be used to boost your self-sacrificing at a $(l:bloodmagic:altar/blood_altar)Blood Altar.$(/l) By standing nearby your setup, the $(item)Incense Altar$() will calm your soul based on the area's total \"Tranquility\", allowing you to significantly increase your LP gains." + }, + { + "type": "crafting", + "recipe": "bloodmagic:incense_altar" + }, + { + "type": "text", + "text": " The basic Tier 1 setup of an $(item)Incense Altar$() is the altar itself; place it down anywhere (You may want to set up a 3x3 block platform, this will be helpful later) and stay within a 5 block radius of the altar.$(br2) While the altar is working, it will emit flame particles from its top and transform your $(l:bloodmagic:altar/blood_altar#knife)Sacrificial Knife.$(/l) Once your knife starts to shine, holding and releasing right click near a Blood Altar will sacrifice 90% of your health all at once." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/utility/incense_altar1.png" + ], + "title": "Basic Setup", + "border": true, + "text": "Basic setup showing the 3x3 square of blocks before the path blocks." + }, + { + "type": "text", + "text": " What is more, based on the total Tranquility of the area you will receive a bonus to the LP added to the altar. Hovering over the $(item)Incense Altar$() with either a $(l:bloodmagic:alchemy_array/sigil/divination)Divination Sigil$(/l) or $(l:bloodmagic:alchemy_array/sigil/seer)Seer's Sigil$() will display the total Tranquility of the setup (top number) and the percentage bonus received when sacrificing (bottom number). When you sacrifice, it will take the LP that you would normally get and multiply it by (1 + bonus/100)." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/utility/incense_altar2.png" + ], + "title": "Incense HUD", + "border": true, + "text": "Incense HUD, default in top left corner, showing a self-sacrifice bonus of +20%." + }, + { + "type": "text", + "text": " \"But Way, how can I increase this bonus?\" Why, by increasing the tranquility of the surrounding area! ...That may be a bit ambiguous.$(br2) To increase the Tranquility of the area, you must place paths leading out from your Incense Altar. These paths need to be constructed from a three wide set of Path blocks, such as the $(item)Wooden Path$(), that extend from the 3x3 set of solid reference blocks in all four cardinal directions." + }, + { + "type": "crafting", + "recipe": "bloodmagic:path/path_wood", + "recipe2": "bloodmagic:path/path_woodtile" + }, + { + "type": "crafting", + "recipe": "bloodmagic:path/path_stone", + "recipe2": "bloodmagic:path/path_stonetile" + }, + { + "type": "crafting", + "recipe": "bloodmagic:path/path_wornstone", + "recipe2": "bloodmagic:path/path_wornstonetile" + }, + { + "type": "text", + "text": " Each new \"ring\" of path blocks follow a set of rules:$(li)All path blocks on the same ring have to be on the same level.$(li)The next ring of path blocks may not be more than 5 blocks higher/lower than the previous ring.$(li)The blocks that are the same level or up to two blocks above the path blocks' ring count towards the total Tranquility - these are indicated by the glass blocks in the picture." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/utility/incense_altar.png" + ], + "title": "Incense Altar", + "border": true, + "text": "Incense Altar with different Path orientations." + }, + { + "type": "text", + "text": "Furthermore:$(li)The efficacy of each type of path block only lasts a certain distance: wooden paths can only go three rings, stone paths for up to five rings, worn stone paths for seven rings, and obsidian paths for nine rings.$(bn2) Now obviously, not every type of block will count towards your Tranquility. Not just any ol' cobble will do, no! We need crops, dirt, and even... lava?" + }, + { + "type": "text", + "text": " There are multiple block categories that count towards the total Tranquility. In no particular order, they are: Plants, Crops, Trees, Earthen, Water, Fire, and Lava. The Incense Altar will look at all of the blocks that are within its range (set by the path blocks) and tabulate how much total Tranquility of each Type there is. Once done, it will calculate the total Tranquility by square-rooting the Tranquility of each type and then adding them together." + }, + { + "type": "text", + "text": "This means that for later-game setups, it is best to have many different types of Tranquility. Although other mods may add their own, and more will be added later, the blocks that contribute to Tranquility are: Lava, Water, Life Essence, Netherrack, Dirt, Farmland, Potatoes, Carrots, Wheat, Netherwart, Beetroots, Leaves, Logs, Fire, and Grass." + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/utility/incense_altar3.png" + ], + "title": "Incense Altar Setup", + "border": true, + "text": "Late-game Incense Altar setup with many different levels." + }, + { + "type": "text", + "text": "Of course, your setup can be as steep or as shallow as you want (Within reason, as defined earlier in this entry). $(br2) It is important to note that the tranquility bonus is capped by the size of your altar (and thus, the tier of path you are using). The caps are as follows: $(li) No Path: 20%. $(li) Wooden Path: 60%. $(li) Stone Path: 120%. $(li) Worn Stone Path: 200%. $(li) Obsidian Path: 300%. (Obsidian is NYI, sadly)" + }, + { + "type": "image", + "images": [ + "bloodmagic:images/entries/utility/incense_altar4.png" + ], + "title": "Incense Altar Setup", + "border": true, + "text": "A very simple Incense Altar. Note the (optional) mixing of different path blocks." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/lava_crystal.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/lava_crystal.json new file mode 100644 index 00000000..3b7438e0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/lava_crystal.json @@ -0,0 +1,16 @@ +{ + "name": "Lava Crystal", + "icon": "bloodmagic:lavacrystal", + "category": "bloodmagic:utility", + "pages": [ + { + "type": "text", + "text": "The $(item)Lava Crystal$() is a source of great heat. Between the lava used in its creation and the power of your Soul Network, you feel confident that it will never cool.$(br2) Right clicking on any block in the world will ignite it, at a cost of 100 LP." + }, + { + "type": "crafting", + "recipe": "bloodmagic:lava_crystal", + "text": "$(br)Furthermore, if placed in the fuel slot of a furnace, it will act as a never-ending fuel source, consuming 50LP to burn for 10 seconds, or long enough to cook one item." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/life_essence_bucket.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/life_essence_bucket.json new file mode 100644 index 00000000..491d4e60 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/life_essence_bucket.json @@ -0,0 +1,18 @@ +{ + "name": "Bucket of Life", + "icon": "bloodmagic:life_essence_bucket", + "category": "bloodmagic:utility", + "extra_recipe_mappings":[["bloodmagic:life_essence_bucket", 1]], + "pages": [ + { + "type": "text", + "text": "Life Essence is all fine and good in the altar, where it can be used for crafting or funnelled into an $(l:bloodmagic:altar/soul_network)Orb$() to power Rituals, but what if you want to build a moat of the stuff around your $(l:bloodmagic:utility/incense_altar)Incense Altar$()? Fortunarely, extracting $(item)Life Essence$() is relatively trivial. Simply place a $(item)Bucket$() in the Blood Altar and wait a few seconds for it to fill up. 1LP=1mb, so 1,000LP should be plenty for your Bucket." + }, + { + "type": "crafting_altar", + "heading": "Bucket of Life", + "recipe": "bloodmagic:altar/bucket_life", + "text": "$(italic)It's definitely not blood. Blood would have coagulated by now. $(br2)... Why are you looking at me like that?$()" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/nyi.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/nyi.json new file mode 100644 index 00000000..de49065d --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/entries/utility/nyi.json @@ -0,0 +1,36 @@ +{ + "name": "NOT YET IMPLEMENTED", + "icon": "minecraft:barrier", + "category": "bloodmagic:utility", + "pages": [ + { + "type": "text", + "text": "OK. Breaking the fourth wall here. Blood Magic is still in an early alpha, and a lot of things you may recall from earlier versions are Not Yet Implemented. Some of these things may come back in the future, others are done and dusted. (Looking at you, Bound Armour and Weapons...)$(br)$(li)Will Automation. Some of the rituals are being reworked, this is still under development." + }, + { + "type": "text", + "text": "$(li)Arcane Ash Rituals. Some of these are coming back soon(tm),for now wait and see. $(li)Ritual of Binding. This went out with 1.7.10, stop asking. $(li)Imperfect Rituals (Lapis etc). $(li)Sigil of Magnetism. $(li)Sigil of the Frozen Lake. $(li)Sigil of Elasticity. $(li)Potion Flasks. $(li)Sigil of Elemental Affinity. $(li)Sigil of the Claw. $(li)Demon Will Aura Gauge. $(li)Transfer Nodes." + }, + { + "type": "text", + "text": "$(li)Additional Living Armour Traits. (Some are in, but not all) $(li)Interdiction Ritual. $(li)Ritual of Containment. $(li)Ritual of High Jump. $(li)Ritual of the Satiated Stomach. $(li)Call of the Zephyr. $(li)Le Vulcano Frigius. $(li)Crash of the Timberman. $(li)Laying of the Filler. $(li)Ritual of Suppression. $(li)Teleposers. $(li)Ritual Dismantler. $(li)Ritual Diviner (Dawn)." + }, + { + "type": "text", + "text": "$(li)Demon Pylon. $(li)Grand Tartaric Gem. $(li)Spectral Weapons and Tools. $(li)Teleposition Sigil. $(li)Sigil of Suppression. $(li)Transposition Sigil. $(li)Sigil of Ender Severance. $(li)Sigil of Compression. $(li)Sigil of the Phantom Bridge. $(li)Assembly of the High Altar. $(li)Cry of the Eternal Soul. $(li)Hymn of Syphoning. $(li)Mark of the Falling Tower. $(li)Reverence of the Condor." + }, + { + "type": "text", + "text": "$(li)Ritual of Grounding. $(li)Ritual of Speed. $(li)The Gate of the Fold. $(li)Ritual of the Feathered Earth. $(li)Ritual of Expulsion. $(li)Most of Tier V. $(li)Archmage Blood Orb. $(li)Awakened Activation Crystal." + }, + { + "type": "text", + "text": "$(li)Training Bracelets. $(li)Penance of the Leadened Soul. $(br2)Other things may appear or disappear as the mod marches onwards from Alpha, through Beta, and hopefully one day to a full Stable Release. $(br2)For more information, check out the $(l:https://github.com/WayofTime/BloodMagic)Blood Magic Github$(), the $(l:https://www.curseforge.com/minecraft/mc-mods/blood-magic)Blood Magic Curseforge Page$(), and the $(l:https://discord.gg/VtNrGrs)Blood Magic Discord$()." + }, + { + "type": "text", + "text": "This manual was put together by Wrincewind and VT-14, building on Way's original manual, with some help from Patchouli and MinecraftGuides.net. Thank you for playing! :)"} + ] +} + + diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_alchemy_table.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_alchemy_table.json new file mode 100644 index 00000000..c59a542a --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_alchemy_table.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "crafting_alchemy_table", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_alchemy_table", + "as": "b", + "x": 0, + "y": 53 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_altar.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_altar.json new file mode 100644 index 00000000..12e73437 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_altar.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "crafting_altar", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_altar", + "as": "b", + "x": 0, + "y": 75 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_arc.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_arc.json new file mode 100644 index 00000000..ae6a4498 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_arc.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "crafting_arc", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_arc", + "as": "b", + "x": 0, + "y": 53 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_array.json new file mode 100644 index 00000000..9d192548 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_array.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "crafting_array", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_array", + "as": "b", + "x": 0, + "y": 65 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_soulforge.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_soulforge.json new file mode 100644 index 00000000..2e8d7d18 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_crafting_soulforge.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "crafting_soulforge", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_soulforge", + "as": "b", + "x": 0, + "y": 65 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_functional_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_functional_array.json new file mode 100644 index 00000000..61f095a1 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/2x_functional_array.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "functional_array", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "functional_array", + "as": "b", + "x": 0, + "y": 65 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_alchemy_table.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_alchemy_table.json new file mode 100644 index 00000000..93144042 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_alchemy_table.json @@ -0,0 +1,22 @@ +{ + "include": [ + { + "template": "crafting_alchemy_table", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_alchemy_table", + "as": "b", + "x": 0, + "y": 53 + }, + { + "template": "crafting_alchemy_table", + "as": "c", + "x": 0, + "y": 106 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_arc.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_arc.json new file mode 100644 index 00000000..ba3d6a42 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_arc.json @@ -0,0 +1,22 @@ +{ + "include": [ + { + "template": "crafting_arc", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_arc", + "as": "b", + "x": 0, + "y": 53 + }, + { + "template": "crafting_arc", + "as": "c", + "x": 0, + "y": 106 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_soulforge.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_soulforge.json new file mode 100644 index 00000000..dc944e66 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/3x_crafting_soulforge.json @@ -0,0 +1,22 @@ +{ + "include": [ + { + "template": "crafting_soulforge", + "as": "a", + "x": 0, + "y": 0 + }, + { + "template": "crafting_soulforge", + "as": "b", + "x": 0, + "y": 53 + }, + { + "template": "crafting_soulforge", + "as": "c", + "x": 0, + "y": 106 + } + ] +} diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_2-step_sigil.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_2-step_sigil.json new file mode 100644 index 00000000..adaaa240 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_2-step_sigil.json @@ -0,0 +1,16 @@ +{ + "include": [ + { + "template": "crafting_alchemy_table", + "as": "alchemy_table", + "x": 0, + "y": 0 + }, + { + "template": "crafting_array", + "as": "array", + "x": 0, + "y": 60 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_alchemy_table.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_alchemy_table.json new file mode 100644 index 00000000..3a261c22 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_alchemy_table.json @@ -0,0 +1,109 @@ +{ + "processor": "wayoftime.bloodmagic.compat.patchouli.processors.AlchemyTableProcessor", + "components": [ + { + "type": "header", + "text": "#heading", + "x": -1, + "y": -6 + }, + { + "type": "text", + "text": "#text", + "x": 0, + "y": 51 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 2, + "y": 4, + "u": 0, + "v": 154, + "texture_width": 128, + "texture_height": 256, + "width": 62, + "height": 43 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 65, + "y": 4, + "u": 44, + "v": 111, + "texture_width": 128, + "texture_height": 256, + "width": 49, + "height": 43 + }, + { + "type": "item", + "item": "bloodmagic:alchemytable", + "x": 94, + "y": 27 + }, + { + "type": "item", + "item": "#input1", + "x": 6, + "y": 8 + }, + { + "type": "item", + "item": "#input2", + "x": 25, + "y": 8 + }, + { + "type": "item", + "item": "#input3", + "x": 44, + "y": 8 + }, + { + "type": "item", + "item": "#input4", + "x": 6, + "y": 27 + }, + { + "type": "item", + "item": "#input5", + "x": 25, + "y": 27 + }, + { + "type": "item", + "item": "#input6", + "x": 44, + "y": 27 + }, + { + "type": "item", + "item": "#orb", + "x": 69, + "y": 27 + }, + { + "type": "tooltip", + "tooltip": ["Cost: #syphon# LP", "Duration: #time# Ticks"], + "x": 69, + "y": 8, + "width": 16, + "height": 16 + }, + { + "type": "text", + "text": "LP", + "x": 74, + "y": 6 + }, + { + "type": "item", + "item": "#output", + "x": 94, + "y": 8 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_altar.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_altar.json new file mode 100644 index 00000000..ae327e85 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_altar.json @@ -0,0 +1,52 @@ +{ + "processor": "wayoftime.bloodmagic.compat.patchouli.processors.BloodAltarProcessor", + "components": [ + { + "type": "header", + "text": "#heading", + "x": -1, + "y": -6 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 9, + "y": 4, + "u": 0, + "v": 51, + "texture_width": 128, + "texture_height": 256, + "width": 98, + "height": 60 + }, + { + "type": "item", + "item": "bloodmagic:altar", + "x": 87, + "y": 46 + }, + { + "type": "item", + "item": "#input", + "x": 30, + "y": 8 + }, + { + "type": "item", + "item": "#output", + "x": 87, + "y": 27 + }, + { + "type": "text", + "text": "Tier: #tier# $(br)LP: #lp#", + "x": 59, + "y": 5 + }, + { + "type": "text", + "text": "#text", + "y": 67 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_arc.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_arc.json new file mode 100644 index 00000000..b46dcbda --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_arc.json @@ -0,0 +1,120 @@ +{ + "processor": "wayoftime.bloodmagic.compat.patchouli.processors.ARCProcessor", + "components": [ + { + "type": "header", + "text": "#heading", + "x": -1, + "y": -6 + }, + { + "type": "text", + "text": "#text", + "x": 0, + "y": 51 + }, + { + "type": "item", + "item": "#fluid_input", + "x": 6, + "y": 26 + }, + { + "type": "item", + "item": "#fluid_output", + "x": 94, + "y": 7 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 2, + "y": 4, + "u": 0, + "v": 198, + "texture_width": 128, + "texture_height": 256, + "width": 112, + "height": 43 + }, + { + "type": "item", + "item": "bloodmagic:alchemicalreactionchamber", + "x": 94, + "y": 26 + }, + { + "type": "item", + "item": "#input", + "x": 6, + "y": 7 + }, + { + "type": "item", + "item": "#tool", + "x": 31, + "y": 26 + }, + { + "type": "item", + "item": "#output1", + "x": 56, + "y": 7 + }, + { + "type": "item", + "item": "#output2", + "x": 75, + "y": 7 + }, + { + "type": "text", + "text": "#chance2#%", + "guard": "#show_chance2", + "x": 75, + "y": 6 + }, + { + "type": "item", + "item": "#output3", + "x": 56, + "y": 26 + }, + { + "type": "text", + "text": "#chance3#%", + "guard": "#show_chance3", + "x": 56, + "y": 25 + }, + { + "type": "item", + "item": "#output4", + "x": 75, + "y": 26 + }, + { + "type": "text", + "text": "#chance4#%", + "guard": "#show_chance4", + "x": 75, + "y": 25 + }, + { + "type": "tooltip", + "guard": "#show_fluid_tooltip", + "tooltip": ["Input: #tooltip_fluid_input#", "Output: #tooltip_fluid_output#"], + "x": 31, + "y": 7, + "width": 16, + "height": 16 + }, + { + "type": "text", + "guard": "#show_fluid_tooltip", + "text": "Fluid", + "x": 31, + "y": 5 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_array.json new file mode 100644 index 00000000..dbd6c723 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_array.json @@ -0,0 +1,52 @@ +{ + "processor": "wayoftime.bloodmagic.compat.patchouli.processors.AlchemyArrayProcessor", + "components": [ + { + "type": "header", + "text": "#heading", + "x": -1, + "y": -6 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 11, + "y": 4, + "u": 0, + "v": 0, + "texture_width": 128, + "texture_height": 256, + "width": 94, + "height": 50 + }, + { + "type": "item", + "item": "#baseinput", + "x": 28, + "y": 22 + }, + { + "type": "item", + "item": "#addedinput", + "x": 63, + "y": 10 + }, + { + "type": "item", + "item": "#output", + "x": 85, + "y": 22 + }, + { + "type": "item", + "item": "bloodmagic:arcaneashes", + "x": 85, + "y": 40 + }, + { + "type": "text", + "text": "#text", + "y": 58 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_soulforge.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_soulforge.json new file mode 100644 index 00000000..6a375357 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/crafting_soulforge.json @@ -0,0 +1,84 @@ +{ + "processor": "wayoftime.bloodmagic.compat.patchouli.processors.TartaricForgeProcessor", + "components": [ + { + "type": "header", + "text": "#heading", + "x": -1, + "y": -6 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 11, + "y": 4, + "u": 0, + "v": 111, + "texture_width": 128, + "texture_height": 256, + "width": 93, + "height": 43 + }, + { + "type": "item", + "item": "#input1", + "x": 15, + "y": 8 + }, + { + "type": "item", + "item": "#input2", + "x": 34, + "y": 8 + }, + { + "type": "item", + "item": "#input3", + "x": 15, + "y": 27 + }, + { + "type": "item", + "item": "#input4", + "x": 34, + "y": 27 + }, + { + "type": "item", + "item": "#will", + "x": 59, + "y": 27 + }, + { + "type": "item", + "item": "#output", + "x": 84, + "y": 8 + }, + { + "type": "item", + "item": "bloodmagic:soulforge", + "x": 84, + "y": 27 + }, + { + "type": "tooltip", + "tooltip": ["Minimum: #willrequired# Will", "Drained: #willdrain# Will"], + "x": 59, + "y": 8, + "width": 16, + "height": 16 + }, + { + "type": "text", + "text": "Will", + "x": 61, + "y": 6 + }, + { + "type": "text", + "text": "#text", + "y": 51 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/functional_array.json b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/functional_array.json new file mode 100644 index 00000000..7be37120 --- /dev/null +++ b/src/main/resources/data/bloodmagic/patchouli_books/guide/en_us/templates/functional_array.json @@ -0,0 +1,71 @@ +{ + "processor": "wayoftime.bloodmagic.compat.patchouli.processors.AlchemyArrayProcessor", + "components": [ + { + "type": "header", + "text": "#heading", + "x": -1, + "y": -6 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 3, + "y": 4, + "u": 0, + "v": 0, + "texture_width": 128, + "texture_height": 256, + "width": 68, + "height": 50 + }, + { + "type": "image", + "image": "bloodmagic:textures/gui/patchouli_book/crafting.png", + "x": 71, + "y": 9, + "u": 62, + "v": 154, + "texture_width": 128, + "texture_height": 256, + "width": 40, + "height": 40 + }, + { + "type": "item", + "item": "#baseinput", + "x": 20, + "y": 22 + }, + { + "type": "item", + "item": "#addedinput", + "x": 55, + "y": 10 + }, + { + "type": "item", + "item": "bloodmagic:arcaneashes", + "x": 55, + "y": 35 + }, + { + "type": "text", + "text": "#text", + "y": 58 + }, + { + "type": "image", + "image": "bloodmagic:textures/models/alchemyarrays/#image#", + "x": 75, + "y": 13, + "u": 0, + "v": 0, + "texture_width": 512, + "texture_height": 512, + "width": 512, + "height": 512, + "scale": 0.0625 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/recipes/guide.json b/src/main/resources/data/bloodmagic/recipes/guide.json new file mode 100644 index 00000000..97922e75 --- /dev/null +++ b/src/main/resources/data/bloodmagic/recipes/guide.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "minecraft:book" + }, + { + "item": "minecraft:glass" + } + ], + "result": { + "item": "patchouli:guide_book", + "nbt": { + "patchouli:book": "bloodmagic:guide" + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/3x3_tnt.nbt b/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/3x3_tnt.nbt new file mode 100644 index 00000000..b3d28725 Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/3x3_tnt.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/test.nbt b/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/test.nbt new file mode 100644 index 00000000..2883b7ac Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/test.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/test2.nbt b/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/test2.nbt new file mode 100644 index 00000000..60931552 Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/dungeon/pavilion/test2.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/four_way_corridor.nbt b/src/main/resources/data/bloodmagic/structures/four_way_corridor.nbt new file mode 100644 index 00000000..e8a47680 Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/four_way_corridor.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/four_way_corridor_loot.nbt b/src/main/resources/data/bloodmagic/structures/four_way_corridor_loot.nbt new file mode 100644 index 00000000..2fdf1a41 Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/four_way_corridor_loot.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/ore_hold_1.nbt b/src/main/resources/data/bloodmagic/structures/ore_hold_1.nbt new file mode 100644 index 00000000..6ecc7b1e Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/ore_hold_1.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/straight_corridor.nbt b/src/main/resources/data/bloodmagic/structures/straight_corridor.nbt new file mode 100644 index 00000000..0f244757 Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/straight_corridor.nbt differ diff --git a/src/main/resources/data/bloodmagic/structures/t_corridor.nbt b/src/main/resources/data/bloodmagic/structures/t_corridor.nbt new file mode 100644 index 00000000..a9caf7e5 Binary files /dev/null and b/src/main/resources/data/bloodmagic/structures/t_corridor.nbt differ diff --git a/src/main/resources/data/bloodmagic/tags/blocks/altar_components/beacon.json b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/beacon.json new file mode 100644 index 00000000..7b3492ad --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/beacon.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:beacon" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/altar_components/bloodrune.json b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/bloodrune.json new file mode 100644 index 00000000..7f6f93b0 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/bloodrune.json @@ -0,0 +1,14 @@ +{ + "values": [ + "bloodmagic:blankrune", + "bloodmagic:speedrune", + "bloodmagic:sacrificerune", + "bloodmagic:selfsacrificerune", + "bloodmagic:dislocationrune", + "bloodmagic:altarcapacityrune", + "bloodmagic:bettercapacityrune", + "bloodmagic:orbcapacityrune", + "bloodmagic:accelerationrune", + "bloodmagic:chargingrune" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/altar_components/bloodstone.json b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/bloodstone.json new file mode 100644 index 00000000..d4a485db --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/bloodstone.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:largebloodstonebrick", + "bloodmagic:bloodstonebrick" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/altar_components/glowstone.json b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/glowstone.json new file mode 100644 index 00000000..770fbfb2 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/altar_components/glowstone.json @@ -0,0 +1,6 @@ +{ + "values": [ + "minecraft:glowstone", + "minecraft:sea_lantern" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_or_earth.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_or_earth.json new file mode 100644 index 00000000..4ed8fb27 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_or_earth.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:airritualstone", + "bloodmagic:earthritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_or_fire.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_or_fire.json new file mode 100644 index 00000000..61cd9671 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_or_fire.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:airritualstone", + "bloodmagic:fireritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_water_earth_fire.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_water_earth_fire.json new file mode 100644 index 00000000..de155609 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/air_water_earth_fire.json @@ -0,0 +1,8 @@ +{ + "values": [ + "bloodmagic:airritualstone", + "bloodmagic:waterritualstone", + "bloodmagic:earthritualstone", + "bloodmagic:fireritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_fire_air_water.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_fire_air_water.json new file mode 100644 index 00000000..0d59ce19 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_fire_air_water.json @@ -0,0 +1,8 @@ +{ + "values": [ + "bloodmagic:earthritualstone", + "bloodmagic:fireritualstone", + "bloodmagic:airritualstone", + "bloodmagic:waterritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_or_air.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_or_air.json new file mode 100644 index 00000000..3c15e031 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_or_air.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:earthritualstone", + "bloodmagic:airritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_or_water.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_or_water.json new file mode 100644 index 00000000..01f41b58 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/earth_or_water.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:earthritualstone", + "bloodmagic:waterritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/fire_air_water_earth.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/fire_air_water_earth.json new file mode 100644 index 00000000..75c96637 --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/fire_air_water_earth.json @@ -0,0 +1,8 @@ +{ + "values": [ + "bloodmagic:fireritualstone", + "bloodmagic:airritualstone", + "bloodmagic:waterritualstone", + "bloodmagic:earthritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/fire_or_air.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/fire_or_air.json new file mode 100644 index 00000000..14dd35bf --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/fire_or_air.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:fireritualstone", + "bloodmagic:airritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/water_earth_fire_air.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/water_earth_fire_air.json new file mode 100644 index 00000000..a343481d --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/water_earth_fire_air.json @@ -0,0 +1,8 @@ +{ + "values": [ + "bloodmagic:waterritualstone", + "bloodmagic:earthritualstone", + "bloodmagic:fireritualstone", + "bloodmagic:airritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/water_or_earth.json b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/water_or_earth.json new file mode 100644 index 00000000..74fd587b --- /dev/null +++ b/src/main/resources/data/bloodmagic/tags/blocks/ritual_stones/water_or_earth.json @@ -0,0 +1,6 @@ +{ + "values": [ + "bloodmagic:waterritualstone", + "bloodmagic:earthritualstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json b/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json new file mode 100644 index 00000000..af646989 --- /dev/null +++ b/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "entries": [ + "bloodmagic:silk_touch_bamboo", + "bloodmagic:fortune", + "bloodmagic:looting", + "bloodmagic:smelt" + ] +} \ No newline at end of file diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info deleted file mode 100644 index f531fc4a..00000000 --- a/src/main/resources/mcmod.info +++ /dev/null @@ -1,16 +0,0 @@ -[ -{ - "modid": "BloodMagic", - "name": "Blood Magic: Alchemical Wizardry", - "description": "Rituals, spells, and more!", - "version": "${version}", - "mcversion": "1.8.9", - "url": "http://www.minecraftforum.net/topic/1899223-bloodmagic", - "updateUrl": "", - "authorList": [ "WayofTime" ], - "credits": "", - "logoFile": "", - "screenshots": [], - "dependencies": [] -} -] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..db8911aa --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,7 @@ +{ + "pack": { + "description": "BloodMagic resources", + "pack_format": 6, + "_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods." + } +} diff --git a/src/main/resources/todo.txt b/src/main/resources/todo.txt deleted file mode 100644 index 8c06bf8c..00000000 --- a/src/main/resources/todo.txt +++ /dev/null @@ -1,2 +0,0 @@ --Create effect for the light ritual block. --Create effect for the fire ritual block. \ No newline at end of file